/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light:#eff6ff;
    --success:      #16a34a;
    --warning:      #d97706;
    --danger:       #dc2626;
    --gray-50:      #f9fafb;
    --gray-100:     #f3f4f6;
    --gray-200:     #e5e7eb;
    --gray-400:     #9ca3af;
    --gray-600:     #4b5563;
    --gray-700:     #374151;
    --gray-800:     #1f2937;
    --gray-900:     #111827;
    --white:        #ffffff;
    --shadow-sm:    0 1px 2px rgba(0,0,0,.05);
    --shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --radius:       8px;
    --radius-sm:    4px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    background: #e8edf5;
    line-height: 1.5;
}

/* ============================================================
   AUTH PAGE (login) — doc.synapsysglobal.com
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: #0b1220;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}

/* ── Panel de marca ───────────────────────────────────────── */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px 48px;
    color: #e8eefb;
    background:
        radial-gradient(120% 90% at 15% 0%,  rgba(59,130,246,.30) 0%, transparent 55%),
        radial-gradient(90%  80% at 90% 100%, rgba(29,78,216,.34) 0%, transparent 60%),
        linear-gradient(160deg, #101b33 0%, #0b1220 55%, #070d19 100%);
}

/* Retícula de puntos */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148,180,255,.16) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(circle at 40% 45%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 40% 45%, #000 0%, transparent 78%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    width: 100%;
    max-width: 520px;
}

/* Wordmark */
.auth-wordmark { display: flex; align-items: center; gap: 13px; margin-bottom: 40px; }

.auth-mark {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    flex-shrink: 0;
    border-radius: 12px;
    color: #bfd6ff;
    background: rgba(96,165,250,.12);
    border: 1px solid rgba(147,197,253,.24);
}
.auth-mark svg { width: 24px; height: 24px; }

.auth-wordmark strong {
    display: block;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.2px;
    color: #ffffff;
}
.auth-wordmark em {
    display: block;
    font-style: normal;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7f9ac9;
    margin-top: 1px;
}

/* Titular */
.auth-headline {
    font-size: 34px;
    line-height: 1.18;
    font-weight: 640;
    letter-spacing: -.9px;
    color: #ffffff;
}
.auth-headline span { color: #7cb0ff; }

.auth-sub {
    margin-top: 14px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #9db0d4;
    max-width: 40ch;
}

/* Ilustración */
.auth-art { margin: 22px 0 26px; }
.auth-art svg {
    width: 100%;
    max-width: 384px;
    height: auto;
    display: block;
    filter: drop-shadow(0 22px 42px rgba(3,9,24,.6));
    animation: authFloat 7s ease-in-out infinite;
}
.auth-art-check {
    stroke-dasharray: 52;
    stroke-dashoffset: 52;
    animation: authCheck .7s cubic-bezier(.65,0,.35,1) .45s forwards;
}
@keyframes authFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}
@keyframes authCheck { to { stroke-dashoffset: 0; } }

/* Puntos de valor */
.auth-points { list-style: none; display: grid; gap: 15px; }

.auth-points li { display: flex; align-items: flex-start; gap: 11px; }

.auth-points svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #6ea8fe;
}

.auth-points span { font-size: 13px; line-height: 1.5; color: #93a8cd; }
.auth-points strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #dce7fa;
    margin-bottom: 1px;
}

/* Dominio */
.auth-domain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    letter-spacing: .01em;
    color: #a8bfe6;
    background: rgba(120,160,230,.09);
    border: 1px solid rgba(147,197,253,.18);
}
.auth-domain svg { width: 15px; height: 15px; color: #6ea8fe; }

/* ── Panel del formulario ─────────────────────────────────── */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    background: var(--white);
}

.auth-form-inner { width: 100%; max-width: 380px; }

.auth-form-head { margin-bottom: 26px; }

.auth-form-head h1 {
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.5px;
    color: var(--gray-900);
}
.auth-form-head p {
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--gray-600);
}

/* Campo con icono */
.auth-field { position: relative; }

.auth-field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--gray-400);
    pointer-events: none;
    transition: color .15s;
}
.auth-field:focus-within .auth-field-icon { color: var(--primary); }

.auth-field .form-input {
    padding: 12px 14px 12px 41px;
    font-size: 14.5px;
    background: var(--gray-50);
    border-color: var(--gray-200);
}
.auth-field .form-input:focus { background: var(--white); }
.auth-field .form-input::placeholder { color: #b6bec9; }

.auth-field #password { padding-right: 44px; }

/* Mostrar / ocultar contraseña */
.auth-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: color .15s, background .15s;
}
.auth-eye:hover  { color: var(--gray-600); background: var(--gray-100); }
.auth-eye.is-on  { color: var(--primary); }
.auth-eye svg    { width: 18px; height: 18px; }

/* Botón */
.auth-submit {
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--radius);
    box-shadow: 0 6px 16px rgba(37,99,235,.26);
    transition: background .15s, transform .12s, box-shadow .15s;
}
.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(37,99,235,.32);
}
.auth-submit:active:not(:disabled) { transform: translateY(0); }

/* Notas al pie */
.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 22px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--gray-400);
}
.auth-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

.auth-foot {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-100);
    font-size: 11.5px;
    color: #b6bec9;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; }

    .auth-brand { padding: 40px 32px 34px; }
    .auth-brand-inner { max-width: 620px; margin: 0 auto; text-align: center; }
    .auth-wordmark { justify-content: center; margin-bottom: 26px; }
    .auth-headline { font-size: 27px; }
    .auth-sub { margin-inline: auto; }
    .auth-art { display: none; }
    .auth-points {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        text-align: left;
        margin-top: 26px;
    }
    .auth-domain { margin-top: 26px; }

    .auth-form-panel { padding: 40px 32px 52px; }
}

@media (max-width: 560px) {
    .auth-brand { padding: 32px 22px 28px; }
    .auth-headline { font-size: 23px; }
    .auth-sub { font-size: 13.5px; }
    .auth-points { display: none; }
    .auth-form-panel { padding: 32px 22px 44px; }
    .auth-form-head h1 { font-size: 22px; }
}

/* Pantallas de poca altura (portátiles): compactar para evitar scroll */
@media (min-width: 981px) and (max-height: 900px) {
    .auth-brand      { padding: 36px 44px; }
    .auth-wordmark   { margin-bottom: 26px; }
    .auth-headline   { font-size: 29px; }
    .auth-art        { margin: 16px 0 20px; }
    .auth-art svg    { max-width: 310px; }
    .auth-points     { gap: 12px; }
    .auth-domain     { margin-top: 24px; }
}

@media (min-width: 981px) and (max-height: 730px) {
    .auth-art      { display: none; }
    .auth-headline { font-size: 27px; }
    .auth-points   { margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-art svg { animation: none; }
    .auth-art-check { animation: none; stroke-dashoffset: 0; }
    .auth-submit:hover:not(:disabled) { transform: none; }
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-800);
    transition: border-color .15s, box-shadow .15s;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.form-input.error { border-color: var(--danger); }

.form-input:disabled {
    background: var(--gray-100);
    color: var(--gray-400);
    border-color: var(--gray-200);
    cursor: not-allowed;
}
.form-input:disabled::placeholder { color: var(--gray-400); }

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--gray-400);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    text-decoration: none;
}

.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-sm { padding: 6px 12px; font-size: 13px; width: auto; }

.btn-danger  { background: var(--danger);  color: var(--white); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-warning:hover:not(:disabled) { background: #b45309; }
.btn-success { background: var(--success); color: var(--white); }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: var(--warning); border: 1px solid #fde68a; }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    background: var(--gray-900);
    color: var(--white);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

.sidebar-header span {
    font-size: 12px;
    color: var(--gray-400);
}

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--gray-400);
    cursor: pointer;
    transition: background .15s, color .15s;
    font-size: 14px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover    { background: rgba(255,255,255,.05); color: var(--white); }
.nav-item.active   { background: rgba(37,99,235,.3); color: var(--white); }
.nav-item svg      { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.user-info { margin-bottom: 10px; }
.user-info strong { display: block; font-size: 13px; }
.user-info span   { font-size: 12px; color: var(--gray-400); }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.topbar h1 { font-size: 18px; font-weight: 600; color: var(--gray-800); }

/* ── File Viewer Drawer ─────────────────────────────────────── */
.file-drawer {
    position: fixed;
    top: 0;
    right: -580px;
    width: 560px;
    height: 100vh;
    background: #0f172a;
    box-shadow: -6px 0 32px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    transition: right .28s cubic-bezier(.4,0,.2,1);
    z-index: 400;
}
.file-drawer.open { right: 0; }

.fv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #020617;
    border-bottom: 1px solid rgba(255,255,255,.07);
    gap: 8px;
    flex-shrink: 0;
}
.fv-toolbar-left  { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.fv-toolbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.fv-filename {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fv-btn {
    background: rgba(255,255,255,.08);
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    line-height: 1;
}
.fv-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.fv-newtab-btn { font-size: 16px; }
.fv-reset-btn  { font-size: 13px; }

.fv-zoom-controls {
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.05);
    border-radius: 6px;
    padding: 2px 4px;
}
.fv-zoom-pct {
    font-size: 11px;
    color: #64748b;
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.fv-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.fv-pdf-note {
    text-align: center;
    font-size: 11px;
    color: #334155;
    padding: 6px;
    flex-shrink: 0;
}
.fv-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}
.fv-img-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.fv-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
    border-radius: 2px;
}

/* ── Notifications ─────────────────────────────────────────── */
.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    transition: background .15s, color .15s;
}
.notif-btn:hover { background: var(--gray-100); color: var(--gray-800); }
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: #f5f7ff;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(37,99,235,.18);
    z-index: 200;
    overflow: hidden;
}
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: var(--primary);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255,255,255,.8);
    padding: 0;
}
.notif-mark-all:hover { color: #fff; text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #dde4ff;
    transition: background .1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #eaedff; }
.notif-unread { background: #e0e8ff; }
.notif-unread:hover { background: #d0daff; }
.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-text { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-body  { font-size: 12px; color: var(--gray-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time  { font-size: 11px; color: var(--gray-400); margin-top: 3px; }
.notif-dot   { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-empty, .notif-loading { padding: 24px; text-align: center; color: var(--gray-400); font-size: 13px; }

.page-body { flex: 1; padding: 24px; overflow-y: auto; }

/* ── Autocomplete ───────────────────────────────────────────── */
.ac-wrap { position: relative; }
.ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0; right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    max-height: 260px;
    overflow-y: auto;
    z-index: 500;
}
.ac-item {
    padding: 9px 13px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background .1s;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.ac-active { background: var(--primary-light); }
.ac-item strong { color: var(--primary); font-weight: 700; }
.ac-item-desc {
    font-size: 11px;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    flex-wrap: wrap;
    align-items: center;
}
.filter-search { flex: 1; min-width: 200px; max-width: 360px; }
.filter-select { width: auto; min-width: 160px; }

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-label { font-size: 12px; color: var(--gray-600); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); margin-top: 4px; }
.stat-card .stat-sub   { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}
td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending       { background: #fef3c7; color: #92400e; }
.badge-approved      { background: #d1fae5; color: #065f46; }
.badge-rejected      { background: #fee2e2; color: #991b1b; }
.badge-admin         { background: #dbeafe; color: #1e40af; }
.badge-reviewer      { background: #ede9fe; color: #5b21b6; }
.badge-uploader      { background: #d1fae5; color: #065f46; }
.badge-plan-trial    { background: #f0fdf4; color: #166534; border: 1px dashed #86efac; }
.badge-plan-basico   { background: #f3f4f6; color: #374151; }
.badge-plan-estandar { background: #dbeafe; color: #1e40af; }
.badge-plan-premium  { background: #fef3c7; color: #92400e; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal {
    background: var(--white);
    border-radius: 12px;
    width: 100%; max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    max-height: 90vh; overflow-y: auto;
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title { font-size: 16px; font-weight: 600; }

.modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 22px; color: var(--gray-400); line-height: 1;
    padding: 0 4px;
}
.modal-close:hover { color: var(--gray-800); }

.modal-body { padding: 20px; }

/* ============================================================
   FORM UTILITIES
   ============================================================ */
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

textarea.form-input { resize: vertical; min-height: 72px; }
select.form-input   { cursor: pointer; }

/* ============================================================
   INFO GRID (detail pages)
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 11px; font-weight: 600; text-transform: uppercase;
              letter-spacing: .5px; color: var(--gray-400); }

/* ============================================================
   MISC
   ============================================================ */
.loading-state, .empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray-400);
    font-size: 14px;
}

.count-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 99px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

/* ============================================================
   WORKER CARDS
   ============================================================ */
.workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.worker-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gray-200);
    transition: box-shadow .15s;
}

.worker-card:hover              { box-shadow: var(--shadow-md); }
.worker-status-complete         { border-left-color: var(--success); }
.worker-status-rejected         { border-left-color: var(--danger); }
.worker-status-pending          { border-left-color: var(--warning); }
.worker-status-incomplete       { border-left-color: var(--gray-200); }

.worker-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.worker-name        { font-weight: 600; font-size: 15px; }
.worker-position    { font-size: 13px; color: var(--gray-600); margin-top: 2px; }
.worker-id          { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

.worker-progress    { margin-bottom: 10px; }
.worker-badges      { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }

.icon-btn { padding: 4px 8px; font-size: 16px; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-track {
    background: var(--gray-100);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--success);
    border-radius: 99px;
    transition: width .4s ease;
}

.progress-label { font-size: 12px; color: var(--gray-400); }

@keyframes progress-anim {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ============================================================
   DOCUMENT ROWS (worker detail)
   ============================================================ */
.doc-list    { padding: 0; }

.doc-row {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background .1s;
}
.doc-row:last-child  { border-bottom: none; }
.doc-row:hover       { background: var(--gray-50); }
.doc-row-rejected    { background: #fff8f8; }
.doc-row-rejected:hover { background: #fff0f0; }
.doc-row-warning     { background: #fefce8; }
.doc-row-warning:hover { background: #fef9c3; }

.doc-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-type-name  { font-weight: 500; font-size: 14px; }
.doc-description { font-size: 13px; color: var(--gray-600); margin-top: 4px; }

.uploaded-info  {
    font-size: 12px; color: var(--gray-500);
    margin-top: 6px;
}

.rejection-note {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    color: var(--danger);
    margin-top: 8px;
}

.review-meta { color: var(--gray-400); font-size: 12px; }

/* ============================================================
   UPLOAD PREVIEW (modal)
   ============================================================ */
.upload-preview {
    text-align: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
}

.upload-file-icon { font-size: 36px; margin-bottom: 8px; }
.upload-file-name { font-weight: 500; word-break: break-all; }
.upload-file-size { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ============================================================
   REVIEWER STYLES
   ============================================================ */

/* Topbar y página header */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--gray-900); }

/* Badge en sidebar nav */
.nav-badge {
    background: var(--danger);
    color: var(--white);
    border-radius: 99px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}

/* Cola vacía */
.empty-queue {
    text-align: center;
    padding: 80px 40px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.empty-queue-icon { font-size: 48px; color: var(--success); margin-bottom: 12px; }
.empty-queue h3   { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-queue p    { color: var(--gray-400); }

/* Urgencia en cola */
.urgency-high td { background: #fff7f7 !important; }
.urgency-med  td { background: #fffdf0 !important; }

/* ── REVIEW DOCUMENT LAYOUT ── */
.review-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.review-title { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; }

.review-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
    min-height: 0;
}

@media (max-width: 900px) {
    .review-layout { grid-template-columns: 1fr; }
}

/* Document viewer */
.review-viewer {
    background: var(--gray-900);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: stretch;
}

.doc-viewer-frame {
    width: 100%;
    min-height: 600px;
    border: none;
    display: block;
}

/* ── Asignar documentos ─────────────────────────────────── */
.assignments-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    height: calc(100vh - 120px);
}

.assignments-sidebar {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 8px;
}

.assignments-sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 8px 12px 12px;
}

.assignments-reviewer-item {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: background .15s;
}

.assignments-reviewer-item:hover { background: var(--gray-100); }
.assignments-reviewer-item.active { background: #eff6ff; }

.assignments-reviewer-name { font-weight: 600; font-size: 14px; }
.assignments-reviewer-email { font-size: 12px; color: #9ca3af; }
.assignments-empty { font-size: 13px; color: #9ca3af; padding: 12px; }

.assignments-main {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 20px;
    overflow-y: auto;
}

.assignments-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 14px;
}

.assignments-companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.assignments-company-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.assignments-company-card:hover { border-color: var(--primary); }
.assignments-company-card.assigned { border-color: var(--primary); background: #eff6ff; }
.assignments-company-card input[type="checkbox"] { margin-top: 2px; accent-color: var(--primary); }
.assignments-company-info { display: flex; flex-direction: column; gap: 4px; }
.assignments-company-name { font-weight: 600; font-size: 14px; }

.alert-info { background: #eff6ff; color: #1e40af; border-radius: var(--radius-sm); padding: 10px 14px; }
.alert-success { background: #f0fdf4; color: #166534; border-radius: var(--radius-sm); padding: 10px 14px; }

.doc-viewer-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 300px;
    padding: 40px;
    text-align: center;
    color: var(--gray-300);
}

.doc-viewer-fallback-icon {
    font-size: 48px;
    color: #f59e0b;
}

@keyframes pulse-warning {
    0%, 100% { background-color: transparent; color: inherit; box-shadow: none; }
    50%       { background-color: #fef3c7; color: #92400e; box-shadow: 0 0 0 3px #fcd34d; }
}

.btn-pulse-warning {
    animation: pulse-warning 1.6s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.doc-viewer-img-wrap {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    background: var(--gray-800);
}

.doc-viewer-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

.doc-viewer-unknown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--gray-400);
    padding: 60px;
    min-height: 300px;
}

/* Review panel */
.review-panel { display: flex; flex-direction: column; gap: 16px; }

.review-info-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.review-info-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    align-items: baseline;
}
.review-info-row:last-child { border-bottom: none; }
.review-info-row .info-label { color: var(--gray-400); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; padding-top: 2px; }

/* Review sections */
.review-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
}
.review-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.history-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}
.history-row:last-child { border-bottom: none; }

/* Review form card */
.review-form-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
}

/* Approve / Reject options */
.review-options { display: flex; flex-direction: column; gap: 8px; }

.review-option {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.review-option input[type="radio"] { display: none; }
.review-option:hover { border-color: var(--gray-400); }

.selected-approve { border-color: var(--success) !important; background: #f0fdf4; }
.selected-reject  { border-color: var(--danger)  !important; background: #fff5f5; }

.review-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.review-option-icon { font-size: 20px; font-weight: 700; }
.review-option-approve .review-option-icon { color: var(--success); }
.review-option-reject  .review-option-icon { color: var(--danger); }

/* History table cells */
.doc-cell-name { font-weight: 500; }
.doc-cell-sub  { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

.review-note-cell {
    font-size: 13px;
    color: var(--gray-600);
    font-style: italic;
}

/* ============================================================
   PHASE 5 — REPORTS
   ============================================================ */

/* Tabs */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
    width: fit-content;
}

.tab {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.tab:hover  { background: var(--white); color: var(--gray-800); }
.tab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.dot-green  { background: var(--success); }
.dot-red    { background: var(--danger); }
.dot-blue   { background: var(--primary); }
.dot-yellow { background: var(--warning); }
.dot-gray   { background: var(--gray-400); }

.activity-body   { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.activity-action { font-weight: 500; color: var(--gray-800); }
.activity-user   { color: var(--gray-600); }
.activity-time   { color: var(--gray-400); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* Link button */
.link-btn {
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: 12px;
    text-decoration: underline; padding: 0;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

/* Completion matrix */
.matrix-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}
.matrix-cell.approved { background: #d1fae5; color: #065f46; }
.matrix-cell.pending  { background: #fef3c7; color: #92400e; font-size: 11px; }
.matrix-cell.rejected { background: #fee2e2; color: #991b1b; }
.matrix-cell.missing  { background: var(--gray-100); color: var(--gray-400); }

/* Wait badge (pendientes) */
.wait-badge { font-size: 13px; font-weight: 500; }
.urgency-high .wait-badge { color: var(--danger); font-weight: 700; }
.urgency-med  .wait-badge { color: var(--warning); font-weight: 600; }

/* Audit action badge */
.audit-action-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-700);
    white-space: nowrap;
}
.audit-action-badge.audit-success { background: #dcfce7; color: #15803d; }
.audit-action-badge.audit-danger  { background: #fee2e2; color: #b91c1c; }
.audit-action-badge.audit-warning { background: #fef9c3; color: #92400e; }
.audit-action-badge.audit-info    { background: #dbeafe; color: #1d4ed8; }

/* Inactive row */
.row-inactive td { opacity: .55; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--gray-200);
}

/* Stat sub link */
.stat-sub a, .stat-sub button.link-btn { font-size: 12px; }

/* ============================================================
   CHAT / MENSAJERÍA
   ============================================================ */
.chat-layout {
    display: flex;
    height: calc(100vh - 120px);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background: var(--white);
}

.chat-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.chat-contacts { flex: 1; overflow-y: auto; }

.chat-contact {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    transition: background .15s;
}
.chat-contact:hover  { background: var(--gray-50); }
.chat-contact.active { background: #eff6ff; border-left: 3px solid var(--primary); }

.chat-contact-info { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.chat-contact-info strong { font-size: 13px; }

.chat-role-badge {
    font-size: 10px;
    padding: 1px 6px;
    background: var(--gray-100);
    color: var(--gray-500);
    border-radius: 4px;
}

.chat-last-msg {
    font-size: 12px;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.chat-unread-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
}

.chat-section-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray-400);
    padding: 8px 16px 4px;
    letter-spacing: .04em;
}

.chat-empty-contacts { padding: 20px 16px; font-size: 13px; color: var(--gray-400); }

/* Panel principal */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.chat-thread-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-no-msgs { text-align: center; color: var(--gray-400); font-size: 13px; padding: 20px 0; }

.chat-msg { display: flex; flex-direction: column; max-width: 70%; }
.chat-msg-mine   { align-self: flex-end; align-items: flex-end; }
.chat-msg-theirs { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-msg-mine   .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-theirs .chat-bubble { background: var(--gray-100); color: var(--gray-800); border-bottom-left-radius: 4px; }

.chat-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* Input */
.chat-input-area {
    border-top: 1px solid var(--gray-200);
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    position: relative;
}

.chat-textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    min-height: 38px;
    max-height: 100px;
    outline: none;
}
.chat-textarea:focus { border-color: var(--primary); }

/* Emoji picker */
.chat-emoji-wrap { position: relative; }

.chat-emoji-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: background .15s;
}
.chat-emoji-btn:hover { background: var(--gray-100); }

.chat-emoji-picker {
    position: absolute;
    bottom: 40px;
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 100;
}

.chat-emoji-item {
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    text-align: center;
    transition: background .1s;
}
.chat-emoji-item:hover { background: var(--gray-100); }

/* ============================================================
   2FA — código de acceso y panel de seguridad
   ============================================================ */
.auth-2fa-icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    margin-bottom: 14px;
    border-radius: 13px;
    color: var(--primary);
    background: var(--primary-light);
}
.auth-2fa-icon svg { width: 25px; height: 25px; }

.auth-code-input {
    text-align: center;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: .42em;
    text-indent: .42em;   /* compensa el espaciado del último dígito */
    padding: 13px 12px;
    font-variant-numeric: tabular-nums;
}
.auth-code-input::placeholder {
    letter-spacing: .42em;
    color: #d5dae2;
    font-weight: 400;
}

.auth-2fa-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 13px;
}
.auth-2fa-actions .link-btn { font-size: 13px; }
.auth-2fa-actions .link-btn:disabled {
    color: var(--gray-400);
    text-decoration: none;
    cursor: default;
}
.auth-2fa-sep { color: var(--gray-200); }

/* Panel de seguridad */
.sec-status {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: 9px;
    margin-bottom: 14px;
}
.sec-status strong { display: block; font-size: 13.5px; }
.sec-status span   { font-size: 12.5px; color: var(--gray-600); }

.sec-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sec-status-on  { background: #f0fdf4; border: 1px solid #bbf7d0; }
.sec-status-on  .sec-status-dot { background: var(--success); }
.sec-status-off { background: var(--gray-50); border: 1px solid var(--gray-200); }
.sec-status-off .sec-status-dot { background: var(--gray-400); }

.sec-steps {
    margin: 0 0 16px 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--gray-700);
}
.sec-steps li { margin-bottom: 5px; }
.sec-steps code {
    background: var(--gray-100);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}
.sec-warn {
    display: block;
    font-size: 12px;
    color: var(--warning);
    margin-top: 2px;
}

.sec-note {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--gray-600);
    margin-bottom: 14px;
}

.chat-error {
    margin: 0 12px;
    padding: 7px 11px;
    border-radius: 6px;
    font-size: 12.5px;
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}
