/* ==========================================================================
   Painel LLEVON — tema escuro (fundo #0b1426, acento #ff6b2b)
   ========================================================================== */

:root {
    --bg: #0b1426;
    --bg-soft: #101d35;
    --surface: #13213c;
    --surface-2: #182a4a;
    --border: rgba(255, 255, 255, .10);
    --border-strong: rgba(255, 255, 255, .20);
    --text: #eaf0fb;
    --muted: #93a4c4;
    --accent: #ff6b2b;
    --accent-soft: rgba(255, 107, 43, .14);
    --accent-dark: #e45a1d;
    --success: #27c093;
    --danger: #ff5566;
    --warning: #ffb547;
    --info: #4aa8ff;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 18px 40px rgba(0, 0, 0, .35);
    --sidebar-w: 248px;
    --sidebar-w-collapsed: 74px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
code, pre { font-family: var(--mono); font-size: .86em; }
.muted { color: var(--muted); font-size: .88rem; margin: 0; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.hidden, [hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.flex { display: flex; align-items: center; gap: .5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #22395f; }

/* ===================== Sidebar ===================== */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--bg-soft);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: width .18s ease, transform .18s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.1rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #ff9a5c);
    color: #0b1426;
    font-weight: 800;
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.brand-text small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }

.sidebar-nav { flex: 1 1 auto; padding: .75rem .6rem; overflow-y: auto; }
.sidebar-footer { padding: .6rem; border-top: 1px solid var(--border); }

.nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .62rem .7rem;
    margin-bottom: .22rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .93rem;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}
.nav-link:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: #ffd3bc; box-shadow: inset 3px 0 0 var(--accent); }
.nav-link.active .icon { color: var(--accent); }

.sidebar-backdrop { display: none; }

body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar .brand-text,
body.sidebar-collapsed .nav-link span { display: none; }
body.sidebar-collapsed .nav-link { justify-content: center; padding-left: 0; padding-right: 0; }
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

/* ===================== Topo / conteúdo ===================== */

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin .18s ease; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 1rem;
    padding: .85rem 1.4rem;
    background: rgba(11, 20, 38, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { flex: 1 1 auto; min-width: 0; }
.topbar-title h1 { margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }

.session-timer { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.session-timer.warn { color: var(--warning); }

.content { padding: 1.4rem; flex: 1 1 auto; max-width: 1500px; width: 100%; }

/* ===================== Menu do usuário ===================== */

.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: .55rem;
    padding: .3rem .55rem .3rem .3rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    color: var(--text); font: inherit; cursor: pointer;
}
.user-btn:hover { border-color: var(--border-strong); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #0b1426; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.user-info { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.user-info strong { font-size: .82rem; }
.user-info small { color: var(--muted); font-size: .7rem; }

.user-dropdown {
    position: absolute; right: 0; top: calc(100% + .5rem);
    min-width: 230px; padding: .4rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); display: none; z-index: 50;
}
.user-dropdown.open { display: block; }
.dropdown-head { padding: .5rem .6rem; color: var(--muted); font-size: .78rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; word-break: break-all; }
.user-dropdown button {
    display: flex; align-items: center; gap: .5rem; width: 100%;
    padding: .55rem .6rem; border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer;
}
.user-dropdown button:hover { background: var(--surface-2); }
.user-dropdown form { margin: 0; }

/* ===================== Botões ===================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .55rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #11182b; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger { background: transparent; border-color: rgba(255, 85, 102, .5); color: #ff8e99; }
.btn-danger:hover { background: rgba(255, 85, 102, .14); }
.btn-ghost { background: transparent; }
.btn-sm { padding: .34rem .62rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--accent); font: inherit; font-size: .85rem; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; padding: 0;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.2rem; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); }

.btn-group { display: inline-flex; gap: .35rem; flex-wrap: wrap; }

/* ===================== Cards ===================== */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.1rem; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 1.1rem; }
.card-body.tight { padding: .6rem 1.1rem; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ===================== KPIs ===================== */

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.kpi .kpi-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.kpi .kpi-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin: .25rem 0 .1rem; font-variant-numeric: tabular-nums; }
.kpi .kpi-foot { font-size: .8rem; color: var(--muted); }
.kpi .up { color: var(--success); }
.kpi .down { color: var(--danger); }
.kpi-list { margin: .3rem 0 0; padding: 0; list-style: none; font-size: .82rem; }
.kpi-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .18rem 0; border-bottom: 1px dashed var(--border); }
.kpi-list li:last-child { border-bottom: 0; }
.kpi-list span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-list b { font-variant-numeric: tabular-nums; }

/* ===================== Tabelas ===================== */

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.table th, table.table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; white-space: nowrap; }
table.table tbody tr:hover { background: rgba(255, 255, 255, .03); }
table.table td.actions { white-space: nowrap; text-align: right; }
table.table .main-cell strong { display: block; }
table.table .main-cell small { color: var(--muted); }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); }

/* ===================== Badges / chips ===================== */

.badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid var(--border-strong); color: var(--muted); white-space: nowrap; }
.badge-success { background: rgba(39, 192, 147, .14); border-color: rgba(39, 192, 147, .45); color: #7ce0c2; }
.badge-warning { background: rgba(255, 181, 71, .14); border-color: rgba(255, 181, 71, .45); color: #ffd79a; }
.badge-danger { background: rgba(255, 85, 102, .14); border-color: rgba(255, 85, 102, .45); color: #ff9aa5; }
.badge-info { background: rgba(74, 168, 255, .14); border-color: rgba(74, 168, 255, .45); color: #a7d3ff; }
.badge-accent { background: var(--accent-soft); border-color: rgba(255, 107, 43, .5); color: #ffb891; }

.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .78rem; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; padding: 0; }
.chip button:hover { color: var(--danger); }

/* ===================== Formulários ===================== */

.field { display: block; margin-bottom: .9rem; }
.field > span { display: block; margin-bottom: .32rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.field .hint { display: block; margin-top: .3rem; color: var(--muted); font-size: .76rem; font-weight: 400; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="url"], input[type="search"],
select, textarea {
    width: 100%;
    padding: .55rem .7rem;
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus, [contenteditable]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
select option { background: var(--bg-soft); color: var(--text); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="file"] { font-size: .84rem; }
.inline-field { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 0 0 1rem; }
legend { padding: 0 .4rem; color: var(--muted); font-size: .8rem; font-weight: 600; }

/* Interruptor ativo/inativo */
.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .84rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); position: relative; transition: background .15s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--accent); }

/* Barra de filtros */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.filters .field { margin: 0; min-width: 150px; }
.filters .btn { height: 38px; }

.preset-group { display: inline-flex; flex-wrap: wrap; gap: .3rem; background: var(--bg-soft); padding: .25rem; border-radius: 999px; border: 1px solid var(--border); }
.preset-group button { padding: .38rem .85rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.preset-group button.active { background: var(--accent); color: #11182b; }

/* ===================== Abas ===================== */

.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1.1rem; }
.tabs button, .tabs a {
    padding: .55rem .95rem; border: 0; border-bottom: 2px solid transparent;
    background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.tabs button:hover, .tabs a:hover { color: var(--text); text-decoration: none; }
.tabs button.active, .tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* ===================== Editor de código / WYSIWYG ===================== */

.code-editor { position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: #0a1426; }
.code-editor .code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-size: .76rem; color: var(--muted); }
.code-editor textarea {
    width: 100%; min-height: 360px; margin: 0; padding: .8rem;
    background: transparent; border: 0; border-radius: 0;
    color: #d8e4ff; font-family: var(--mono); font-size: 13px; line-height: 1.55;
    tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.code-editor textarea:focus { outline: none; }
.code-editor.focus { border-color: var(--accent); }
.code-editor .hl-legend { display: flex; gap: .6rem; font-size: .72rem; }
.code-editor .hl-legend i { font-style: normal; }
.hl-tag { color: #ff9f6e; }
.hl-attr { color: #7cd6ff; }
.hl-str { color: #9ae7a7; }
.hl-comment { color: #6f81a3; }

.wysiwyg-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; background: var(--bg-soft); border: 1px solid var(--border-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.wysiwyg-toolbar button, .wysiwyg-toolbar select {
    padding: .32rem .55rem; min-width: 34px; width: auto;
    border: 1px solid transparent; border-radius: 6px;
    background: transparent; color: var(--text); font: inherit; font-size: .82rem; cursor: pointer;
}
.wysiwyg-toolbar button:hover, .wysiwyg-toolbar select:hover { background: var(--surface-2); }
.wysiwyg-toolbar .sep { width: 1px; background: var(--border); margin: .2rem .25rem; }
.wysiwyg {
    min-height: 420px; max-height: 70vh; overflow-y: auto; padding: 1rem 1.1rem;
    background: #fff; color: #1b2436;
    border: 1px solid var(--border-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.7;
}
.wysiwyg:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.wysiwyg img { max-width: 100%; height: auto; border-radius: 8px; }
.wysiwyg h2 { font-size: 1.5rem; margin: 1.4rem 0 .6rem; }
.wysiwyg h3 { font-size: 1.22rem; margin: 1.2rem 0 .5rem; }
.wysiwyg blockquote { margin: 1rem 0; padding: .3rem 1rem; border-left: 4px solid var(--accent); color: #475169; }
.wysiwyg a { color: #c2491a; }
.wysiwyg pre { background: #f1f3f8; padding: .8rem; border-radius: 8px; overflow-x: auto; }
.wysiwyg table { border-collapse: collapse; width: 100%; }
.wysiwyg td, .wysiwyg th { border: 1px solid #d7dcea; padding: .4rem .6rem; }

/* Galeria de imagens */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.gallery figure { margin: 0; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.gallery img { width: 100%; height: 80px; object-fit: cover; display: block; cursor: pointer; }
.gallery figcaption { padding: .25rem .4rem; font-size: .68rem; color: var(--muted); display: flex; justify-content: space-between; gap: .3rem; }

/* ===================== Alertas ===================== */

.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); margin-bottom: 1rem; font-size: .88rem; }
.alert-info { background: rgba(74, 168, 255, .12); border-color: rgba(74, 168, 255, .4); }
.alert-error { background: rgba(255, 85, 102, .12); border-color: rgba(255, 85, 102, .45); }
.alert-success { background: rgba(39, 192, 147, .12); border-color: rgba(39, 192, 147, .4); }
.alert-warning { background: rgba(255, 181, 71, .12); border-color: rgba(255, 181, 71, .4); }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* ===================== Toasts ===================== */

.toast-stack { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 200; display: flex; flex-direction: column; gap: .55rem; max-width: min(380px, 90vw); }
.toast {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: .7rem .9rem; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow); font-size: .87rem;
    animation: toast-in .18s ease-out;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.05rem; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===================== Modais ===================== */

.modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(5, 10, 20, .72); overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-dialog { width: 100%; max-width: 680px; margin: auto; }
.modal-sm { max-width: 430px; }
.modal-lg { max-width: 950px; }
.modal-content { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 1.1rem; max-height: 70vh; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.1rem; border-top: 1px solid var(--border); background: var(--bg-soft); }

/* ===================== Gráficos ===================== */

.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 250px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .78rem; color: var(--muted); margin-top: .5rem; }

/* ===================== Paginação ===================== */

.pagination { display: flex; gap: .3rem; align-items: center; justify-content: center; padding: .9rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .35rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--muted); font-size: .84rem; }
.pagination a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #11182b; font-weight: 700; }

/* ===================== Login / 2FA ===================== */

.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; background: radial-gradient(1100px 520px at 50% -10%, #16294a 0%, var(--bg) 62%); }
.auth-card { width: 100%; max-width: 420px; padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; margin-bottom: 1.4rem; }
.auth-brand small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }
.auth-card h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.auth-form { margin-top: 1rem; }
.auth-form .btn { margin-top: .4rem; }
.auth-alt { margin-top: .9rem; text-align: center; }
.auth-foot { margin-top: 1.1rem; text-align: center; font-size: .78rem; }
.otp-input { text-align: center; letter-spacing: .5em; font-size: 1.4rem; font-family: var(--mono); padding-left: .5em !important; }
.setup-steps { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); font-size: .85rem; }
.setup-steps li { margin-bottom: .3rem; }
.qr-box { display: grid; place-items: center; padding: .9rem; background: #fff; border-radius: 12px; margin-bottom: .9rem; min-height: 190px; color: #1b2436; font-size: .82rem; text-align: center; }
.qr-box svg { width: 100%; max-width: 210px; height: auto; }
.secret-box { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: space-between; padding: .6rem .75rem; background: var(--bg-soft); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); margin-bottom: 1rem; }
.secret-box code { font-size: .85rem; letter-spacing: .08em; word-break: break-all; }

/* ===================== Instalador ===================== */

.install-page { max-width: 760px; margin: 0 auto; padding: 2rem 1.2rem 4rem; }
.check-list { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.check-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .2rem; border-bottom: 1px solid var(--border); }
.check-list .ok { color: var(--success); font-weight: 600; }
.check-list .fail { color: var(--danger); font-weight: 600; }
.check-list .warn { color: var(--warning); font-weight: 600; }

/* ===================== Responsivo ===================== */

.mobile-only { display: none; }

@media (max-width: 960px) {
    .mobile-only { display: inline-grid; }
    .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 10, 20, .6); z-index: 35; }
    .main, body.sidebar-collapsed .main { margin-left: 0; }
    body.sidebar-collapsed .sidebar { width: var(--sidebar-w); }
    body.sidebar-collapsed .sidebar .brand-text, body.sidebar-collapsed .nav-link span { display: inline; }
    body.sidebar-collapsed .nav-link { justify-content: flex-start; padding-left: .7rem; padding-right: .7rem; }
    .content { padding: 1rem; }
    .user-info { display: none; }
    .session-timer { display: none; }
}

@media (max-width: 600px) {
    .topbar { padding: .7rem .9rem; }
    .topbar-title h1 { font-size: 1.1rem; }
    .topbar-title p { display: none; }
    .kpi .kpi-value { font-size: 1.5rem; }
    table.table th, table.table td { padding: .5rem .55rem; }
}

@media print {
    .sidebar, .topbar, .toast-stack { display: none; }
    .main { margin: 0; }
    body { background: #fff; color: #000; }
}
