/* ============================================================
   LicitaSimple — CSS Principal
   Fuente: Poppins (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables ─────────────────────────────────────────────── */
:root {
    --primary:        #2563eb;
    --primary-d:      #1d4ed8;
    --primary-l:      #eff6ff;
    --primary-xl:     #dbeafe;
    --secondary:      #0f172a;
    --accent:         #06b6d4;
    --success:        #16a34a;
    --success-l:      #dcfce7;
    --error:          #dc2626;
    --error-l:        #fee2e2;
    --warning:        #d97706;
    --warning-l:      #fef3c7;
    --text:           #0f172a;
    --text-2:         #475569;
    --text-3:         #94a3b8;
    --border:         #e2e8f0;
    --border-d:       #cbd5e1;
    --bg:             #f8fafc;
    --bg-2:           #f1f5f9;
    --white:          #ffffff;
    --radius-sm:      6px;
    --radius:         10px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --shadow-sm:      0 1px 2px rgba(0,0,0,.06);
    --shadow:         0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
    --shadow-md:      0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
    --shadow-lg:      0 10px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
    --font:           'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition:     .18s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-d); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ─── Layout ────────────────────────────────────────────────── */
.container      { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm   { max-width: 720px;  margin: 0 auto; padding: 0 1.25rem; }
.main-content   { min-height: calc(100vh - 148px); padding: 0; }
/* Las secciones con hero propio se pegan al navbar. Páginas internas usan .page-inner-pad */
.page-inner-pad { padding: 2.5rem 0; }

/* ─── NAVBAR ────────────────────────────────────────────────── */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.navbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.5px;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.navbar-logo span { color: var(--secondary); }
.navbar-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.navbar-menu a {
    color: var(--text-2);
    font-size: .875rem;
    font-weight: 500;
    padding: .45rem .8rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.navbar-menu a:hover   { background: var(--bg-2); color: var(--text); }
.navbar-menu a.active  { background: var(--primary-l); color: var(--primary); }
.navbar-divider { width: 1px; height: 24px; background: var(--border); margin: 0 .25rem; }

/* ─── FOOTER ────────────────────────────────────────────────── */
.footer {
    background: var(--secondary);
    color: #94a3b8;
    padding: 2rem 0;
    margin-top: 4rem;
}
.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .82rem;
}
.footer-logo { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.footer-nav  { display: flex; gap: 1.5rem; }
.footer-nav a { color: #94a3b8; transition: color var(--transition); }
.footer-nav a:hover { color: var(--white); }

/* ─── BOTONES ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .6rem 1.25rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: .01em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary  { background: var(--primary); color: var(--white); border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.btn-primary:hover  { background: var(--primary-d); border-color: var(--primary-d); color: var(--white); box-shadow: 0 4px 16px rgba(37,99,235,.35); }

.btn-secondary { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.btn-secondary:hover { background: #1e293b; color: var(--white); }

.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover  { background: var(--primary-l); }

.btn-ghost    { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover    { background: var(--bg-2); color: var(--text); }

.btn-danger   { background: var(--error); color: var(--white); border-color: var(--error); }
.btn-danger:hover   { background: #b91c1c; color: var(--white); }

.btn-sm    { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg    { padding: .8rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon  { padding: .5rem; border-radius: var(--radius-sm); }

/* ─── ALERTS / FLASH ────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: .875rem;
    font-weight: 500;
    animation: slideDown .25s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.alert-success { background: var(--success-l); color: var(--success);  border: 1px solid #bbf7d0; }
.alert-error   { background: var(--error-l);   color: var(--error);    border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-l); color: var(--warning);  border: 1px solid #fde68a; }
.alert-info    { background: var(--primary-xl);color: var(--primary);  border: 1px solid #bfdbfe; }

/* ─── FORMULARIOS ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.form-control {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-3); }
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-control:disabled { background: var(--bg-2); cursor: not-allowed; color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; }

.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-hint    { font-size: .78rem; color: var(--text-3); margin-top: .3rem; }
.form-error   { font-size: .78rem; color: var(--error); margin-top: .3rem; }

/* ─── CARDS ─────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.card-title  { font-size: 1rem; font-weight: 700; }

/* ─── BADGES ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .65rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.badge-blue       { background: var(--primary-xl); color: var(--primary); }
.badge-green      { background: var(--success-l);  color: var(--success); }
.badge-red        { background: var(--error-l);    color: var(--error); }
.badge-yellow     { background: var(--warning-l);  color: var(--warning); }
.badge-gray       { background: var(--bg-2);       color: var(--text-2); }
.badge-cyan       { background: #cffafe; color: #0e7490; }
.badge-purple     { background: #ede9fe; color: #7c3aed; }

/* Estados de proceso */
.badge-borrador      { background: var(--bg-2);       color: var(--text-2); }
.badge-publicado     { background: var(--primary-xl); color: var(--primary); }
.badge-en_evaluacion { background: var(--warning-l);  color: var(--warning); }
.badge-adjudicado    { background: var(--success-l);  color: var(--success); }
.badge-desierto      { background: var(--error-l);    color: var(--error); }
.badge-cancelado     { background: #f1f5f9;            color: #64748b; }
.badge-verificado    { background: var(--success-l);  color: var(--success); }
.badge-rubro         { background: var(--primary-xl); color: var(--primary); }
.badge-region        { background: #f0fdf4;           color: #15803d; }
.badge-tipo-producto { background: #ede9fe; color: #7c3aed; }
.badge-tipo-servicio { background: #cffafe; color: #0e7490; }

/* ─── TABLAS ────────────────────────────────────────────────── */
.table-wrap { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.table thead { background: var(--bg-2); }
.table th {
    padding: .85rem 1.1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border);
}
.table td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg); }

/* ─── SECTION HEADERS ───────────────────────────────────────── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }

/* ─── HERO ──────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #0284c7 100%);
    color: var(--white);
    padding: 4.5rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 50%;
    height: 150%;
    background: radial-gradient(circle, rgba(6,182,212,.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.2);
    color: #bfdbfe;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .3rem 1rem;
    border-radius: 99px;
    margin-bottom: 1.25rem;
}
.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -.02em;
}
.hero h1 em { color: #7dd3fc; font-style: normal; }
.hero-sub {
    font-size: 1.05rem;
    opacity: .85;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    font-weight: 400;
}
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
    background: var(--white);
    color: var(--primary);
    padding: .8rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    transition: all var(--transition);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0,0,0,.28); color: var(--primary-d); }
.btn-hero-outline {
    background: rgba(255,255,255,.12);
    color: var(--white);
    padding: .8rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    border: 1.5px solid rgba(255,255,255,.35);
    backdrop-filter: blur(4px);
    transition: all var(--transition);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.22); color: var(--white); }

/* ─── SEARCH BAR ────────────────────────────────────────────── */
.search-bar-section {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.search-form {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 2; min-width: 200px; }
.search-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: .65rem .9rem .65rem 2.6rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: inherit;
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.search-select {
    flex: 1;
    min-width: 150px;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--transition);
}
.search-select:focus { outline: none; border-color: var(--primary); }

/* ─── RESULTADOS / PROVEEDORES ──────────────────────────────── */
.resultados-section { padding: 2.5rem 0; }
.resultados-header { margin-bottom: 1.75rem; }
.resultados-count { font-size: .875rem; color: var(--text-3); margin-top: .25rem; }

.grid-proveedores { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

.card-proveedor {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.card-proveedor:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-proveedor-top { display: flex; align-items: flex-start; gap: .9rem; }
.card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.card-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.card-proveedor h3 { font-size: .95rem; font-weight: 700; margin: 0 0 .2rem; }
.card-proveedor h3 a { color: var(--text); }
.card-proveedor h3 a:hover { color: var(--primary); }
.card-meta { display: flex; flex-wrap: wrap; gap: .3rem; }
.card-desc { font-size: .82rem; color: var(--text-2); line-height: 1.6; flex: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--border); }
.card-rating { font-size: .82rem; color: var(--warning); font-weight: 600; }

/* ─── AUTH ──────────────────────────────────────────────────── */
.auth-body {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-wrapper { width: 100%; max-width: 440px; }
.auth-logo-wrap { text-align: center; margin-bottom: 2rem; }
.auth-logo-text { font-size: 1.75rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.auth-logo-sub { font-size: .82rem; color: var(--text-3); margin-top: .2rem; }

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.8);
}
.auth-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--text);
}
.auth-card-sub {
    font-size: .875rem;
    color: var(--text-2);
    margin-bottom: 1.75rem;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0;
    font-size: .8rem;
    color: var(--text-3);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer-text { margin-top: 1.5rem; text-align: center; font-size: .875rem; color: var(--text-2); }
.auth-footer-text a { font-weight: 600; color: var(--primary); }

/* ─── DASHBOARD ─────────────────────────────────────────────── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.dashboard-greeting { font-size: 1.5rem; font-weight: 700; }
.dashboard-greeting span { color: var(--primary); }
.dashboard-sub { font-size: .9rem; color: var(--text-2); margin-top: .2rem; }
.dashboard-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.stat-icon-blue   { background: var(--primary-xl); }
.stat-icon-green  { background: var(--success-l); }
.stat-icon-yellow { background: var(--warning-l); }
.stat-icon-red    { background: var(--error-l); }
.stat-body {}
.stat-numero { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label  { font-size: .78rem; color: var(--text-3); font-weight: 500; margin-top: .15rem; text-transform: uppercase; letter-spacing: .04em; }

.dashboard-section { margin-bottom: 2.5rem; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-3);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.empty-state-text { font-size: .9rem; margin-bottom: 1.25rem; }

/* ─── NOTIFICACIONES ────────────────────────────────────────── */
.notif-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.notif-item {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: .9rem 1.1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    transition: background var(--transition);
}
.notif-item.notif-nueva { border-left: 3px solid var(--primary); background: var(--primary-l); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: .35rem; }
.notif-body { flex: 1; }
.notif-title { font-weight: 600; color: var(--text); }
.notif-text  { color: var(--text-2); margin-top: .15rem; font-size: .82rem; }
.notif-time  { font-size: .75rem; color: var(--text-3); margin-top: .2rem; }

/* ─── VITRINA PÚBLICA ───────────────────────────────────────── */
.vitrina-hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 2.5rem;
}
.vitrina-hero-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.vitrina-logo-wrap {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    border: 3px solid rgba(255,255,255,.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}
.vitrina-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.vitrina-info-main { flex: 1; }
.vitrina-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem; }
.vitrina-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.vitrina-badge-v { background: rgba(22,163,74,.25); border: 1px solid rgba(22,163,74,.4); color: #86efac; font-size: .75rem; font-weight: 600; padding: .2rem .7rem; border-radius: 99px; }
.vitrina-ubicacion { font-size: .875rem; opacity: .75; margin-top: .4rem; }
.vitrina-rating-big { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; }
.stars-big { color: #fbbf24; font-size: 1.1rem; }
.rating-text { font-size: .875rem; opacity: .8; }

.vitrina-body { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.vitrina-main {}
.vitrina-aside {}

.vitrina-section { margin-bottom: 2.25rem; }
.vitrina-section-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: .5rem; }
.vitrina-section-title::before { content: ''; display: block; width: 4px; height: 1.1em; background: var(--primary); border-radius: 2px; }

.grid-catalogo { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.card-catalogo {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.card-catalogo:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-catalogo h4 { font-size: .9rem; font-weight: 700; margin-bottom: .35rem; }
.card-catalogo p  { font-size: .8rem; color: var(--text-2); }
.catalogo-precio { font-weight: 700; color: var(--primary); font-size: .9rem; margin-top: .5rem; }

.resenas-list { display: flex; flex-direction: column; gap: .85rem; }
.card-resena {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.resena-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.resena-autor { font-weight: 600; font-size: .875rem; }
.resena-stars { color: #f59e0b; font-size: .9rem; }
.resena-text  { font-size: .85rem; color: var(--text-2); }

/* Contacto aside */
.vitrina-contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}
.vitrina-contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.vitrina-contact-card p  { font-size: .85rem; color: var(--text-2); margin-bottom: 1.1rem; }

/* ─── PROCESOS ──────────────────────────────────────────────── */
.page-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.75rem 0;
    margin-bottom: 2rem;
}
.page-title    { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.page-subtitle { font-size: .875rem; color: var(--text-2); margin-top: .25rem; }
.page-header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }

.proceso-form { max-width: 760px; }
.form-section  { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: none; }
.form-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.form-section-title span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: var(--primary); color: var(--white); border-radius: 50%; font-size: .75rem; font-weight: 700; }

/* Proceso detail */
.proceso-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.proceso-meta-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}
.proceso-meta-row { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.proceso-meta-row:last-child { border-bottom: none; }
.proceso-meta-label { color: var(--text-3); font-weight: 500; }
.proceso-meta-value { font-weight: 600; color: var(--text); }

/* ─── ADMIN ─────────────────────────────────────────────────── */
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.admin-stat {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.admin-stat-num   { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.admin-stat-label { font-size: .8rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ─── ERROR PAGES ───────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 6rem 0;
}
.error-code { font-size: 6rem; font-weight: 800; color: var(--primary-xl); line-height: 1; margin-bottom: .5rem; }
.error-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.error-msg { color: var(--text-2); margin-bottom: 2rem; }

/* ─── FORMULARIOS MEJORADOS ─────────────────────────────────── */
.form-floating { position: relative; }
.form-floating .form-control { padding-top: 1.4rem; padding-bottom: .4rem; }
.form-floating label { position: absolute; top: .65rem; left: .9rem; font-size: .72rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; transition: none; pointer-events: none; }

/* Input con ícono izquierda */
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon-wrap .form-control { padding-left: 2.5rem; }

/* Select estilizado */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.5rem;
}

/* Checkbox / radio custom */
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; cursor: pointer; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-d);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
    background: var(--white);
}
.form-check input[type="radio"] { border-radius: 50%; }
.form-check input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.form-check input[type="radio"]:checked { border-color: var(--primary); box-shadow: inset 0 0 0 4px var(--primary); }
.form-check label { font-size: .875rem; font-weight: 400; color: var(--text); cursor: pointer; text-transform: none; letter-spacing: 0; }

/* Código público */
.codigo-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .3rem .75rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: .05em;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: background var(--transition);
}
.codigo-badge:hover { background: var(--border); }
.codigo-badge small { font-weight: 400; color: var(--text-3); margin-right: .2rem; font-family: var(--font); letter-spacing: 0; }

/* ─── MENSAJERÍA ─────────────────────────────────────────────── */
.mensajes-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 600px;
}
.mensajes-sidebar {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg);
}
.mensajes-sidebar-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: .95rem;
    background: var(--white);
}
.conversacion-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text);
}
.conversacion-item:hover { background: var(--white); }
.conversacion-item.activa { background: var(--primary-l); border-left: 3px solid var(--primary); }
.conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.conv-body { flex: 1; min-width: 0; }
.conv-nombre { font-weight: 600; font-size: .875rem; }
.conv-preview { font-size: .78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.conv-time { font-size: .72rem; color: var(--text-3); white-space: nowrap; }
.conv-unread { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--primary); color: var(--white); border-radius: 99px; font-size: .68rem; font-weight: 700; }

.mensajes-chat { display: flex; flex-direction: column; }
.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .85rem;
    background: var(--white);
}
.chat-header-info { flex: 1; }
.chat-header-nombre { font-weight: 700; font-size: .95rem; }
.chat-header-sub { font-size: .78rem; color: var(--text-3); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    background: var(--bg);
    min-height: 400px;
}
.mensaje-burbuja {
    max-width: 70%;
    padding: .7rem 1rem;
    border-radius: var(--radius-lg);
    font-size: .875rem;
    line-height: 1.6;
    position: relative;
}
.mensaje-enviado {
    align-self: flex-end;
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}
.mensaje-recibido {
    align-self: flex-start;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.mensaje-meta { font-size: .72rem; opacity: .65; margin-top: .3rem; }
.mensaje-enviado .mensaje-meta { text-align: right; }

.chat-input-area {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    background: var(--white);
}
.chat-form { display: flex; gap: .75rem; align-items: flex-end; }
.chat-textarea {
    flex: 1;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    transition: border-color var(--transition);
}
.chat-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    gap: .75rem;
    padding: 3rem;
}
.chat-empty-icon { font-size: 3rem; }

/* ─── MISC ──────────────────────────────────────────────────── */
.text-muted    { color: var(--text-3); }
.text-center   { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .vitrina-body            { grid-template-columns: 1fr; }
    .proceso-detail-grid     { grid-template-columns: 1fr; }
    .vitrina-aside           { order: -1; }
}
@media (max-width: 640px) {
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .stats-row, .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .navbar-menu { gap: .1rem; }
    .hero h1   { font-size: 1.6rem; }
    .vitrina-name { font-size: 1.3rem; }
    .auth-card { padding: 1.75rem 1.25rem; }
}
@media (max-width: 400px) {
    .stats-row, .admin-stats-grid { grid-template-columns: 1fr; }
}
