/*!
 * Tema AppMonitor — baseado no design system do Gentelella v4
 * Gentelella: Copyright (c) 2014–2026 Aigars Silkalns & Colorlib — MIT License
 * https://github.com/ColorlibHQ/gentelella
 *
 * Aplica os tokens, o shell (sidebar/topbar) e os componentes do Gentelella
 * sobre o Bootstrap 3 já usado pelas views, sem exigir mudanças nelas.
 */

/* ───────────────────────── TOKENS ───────────────────────── */
:root {
    --sidebar-bg: #1a2332;
    --sidebar-hover: rgba(255,255,255,0.04);
    --sidebar-active: rgba(26,187,156,0.08);
    --sidebar-text: #7b8fa3;
    --sidebar-text-hover: #c5d0dc;
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-w: 252px;
    --topbar-h: 56px;

    --primary: #1ABB9C;
    --primary-lt: rgba(26,187,156,0.08);
    --primary-dk: #169f85;

    --body-bg: #f5f7fb;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f9fafb;

    --border-color: #e6e7eb;
    --border-color-light: #eff0f3;
    --border-translucent: rgba(4,32,69,0.08);

    --text: #1e2633;
    --text-secondary: #626d7d;
    --text-muted: #7e8896;
    --text-disabled: #c0c7cf;

    --blue: #066fd1;
    --azure: #4299e1;
    --green: #2fb344;
    --yellow: #f59f00;
    --orange: #f76707;
    --red: #d63939;
    --purple: #ae3ec9;
    --cyan: #17a2b8;

    --green-lt: rgba(47,179,68,0.08);
    --red-lt: rgba(214,57,57,0.08);
    --yellow-lt: rgba(245,159,0,0.10);
    --blue-lt: rgba(6,111,209,0.08);
    --azure-lt: rgba(66,153,225,0.08);
    --cyan-lt: rgba(23,162,184,0.08);
    --purple-lt: rgba(174,62,201,0.08);

    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 8px;

    --shadow: rgba(30,38,51,0.04) 0 2px 4px 0;
    --shadow-card: 0 0 0 1px var(--border-translucent), rgba(30,38,51,0.04) 0 2px 4px 0;
    --shadow-modal: 0 24px 48px rgba(15,23,42,0.18), 0 0 0 1px var(--border-translucent);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;
    --font-size: 14px;
    --line-height: 1.4286;

    /* terminal do output de processo: escuro nos dois temas (SPEC-output-build-signalr.md, D15) */
    --terminal-bg: #0d1117;
    --terminal-topo: #161b22;
    --terminal-borda: rgba(255,255,255,0.08);
    --terminal-hover: rgba(255,255,255,0.04);
    --terminal-texto: #d1d7e0;
    --terminal-apagado: #6e7681;
    --terminal-info: #58c4dc;
    --terminal-erro: #ff7b72;
    --terminal-erro-bg: rgba(248,81,73,0.12);
    --terminal-aviso: #e3b341;
    --terminal-aviso-bg: rgba(210,153,34,0.12);
    /* SPEC-ibpt-situacao-status.md, 4.3: verde do terminal (situação Nova, barra e "Concluído") */
    --terminal-ok: #3fb950;
    --terminal-ok-bg: rgba(46,160,67,0.15);
    --terminal-info-bg: rgba(88,196,220,0.08);
}

[data-theme="dark"] {
    --body-bg: #0f1623;
    --bg-surface: #1a2332;
    --bg-surface-secondary: #141d2b;

    --border-color: rgba(255,255,255,0.08);
    --border-color-light: rgba(255,255,255,0.05);
    --border-translucent: rgba(255,255,255,0.08);

    --text: #e6ebf2;
    --text-secondary: #b3bccb;
    --text-muted: #8a93a3;
    --text-disabled: #5a6473;

    --primary-lt: rgba(26,187,156,0.14);
    --green-lt: rgba(47,179,68,0.16);
    --red-lt: rgba(214,57,57,0.16);
    --yellow-lt: rgba(245,159,0,0.16);
    --blue-lt: rgba(6,111,209,0.18);
    --azure-lt: rgba(66,153,225,0.16);
    --cyan-lt: rgba(23,162,184,0.16);
    --purple-lt: rgba(174,62,201,0.16);

    --shadow: rgba(0,0,0,0.4) 0 2px 4px 0;
    --shadow-card: 0 0 0 1px var(--border-translucent), rgba(0,0,0,0.3) 0 2px 4px 0;
    --shadow-modal: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px var(--border-translucent);
    color-scheme: dark;
}

/* ───────────────────────── BASE ───────────────────────── */
html { font-size: 10px; }
body {
    padding: 0;
    font-family: var(--font);
    font-size: var(--font-size);
    line-height: var(--line-height);
    color: var(--text);
    background: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

a { color: var(--primary); }
a:hover, a:focus { color: var(--primary-dk); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font);
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.2px;
}
hr { border-top-color: var(--border-color-light); }
small, .small { color: inherit; }
code, kbd, pre, samp { font-family: var(--font-mono); }
pre {
    color: var(--text);
    background: var(--bg-surface-secondary);
    border-color: var(--border-color);
    border-radius: var(--radius);
}
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--green); }
.text-info { color: var(--azure); }
.text-warning { color: var(--yellow); }
.text-danger, .error, .field-validation-error { color: var(--red); }
.bg-primary { background: var(--primary); color: #fff; }
:focus, a:focus, button:focus, .btn:focus, .btn:active:focus { outline: none; }
:focus-visible, a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sidebar a:focus-visible, .sidebar button:focus-visible { outline-offset: -2px; }

/* ───────────────────────── SIDEBAR ───────────────────────── */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    z-index: 1031;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 220ms cubic-bezier(0.2, 0, 0, 1);
}
.sidebar-brand {
    height: var(--topbar-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    text-decoration: none !important;
}
.brand-icon {
    width: 28px; height: 28px;
    background: var(--primary);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.brand-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.2px;
    white-space: nowrap;
}
.brand-name small {
    font-weight: 400;
    color: var(--sidebar-text);
    font-size: 12px;
    margin-left: 2px;
}

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }

.nav-group { padding: 0 8px; margin-bottom: 2px; }
.nav-label {
    padding: 16px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(123,143,163,0.5);
    white-space: nowrap;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 120ms, color 120ms;
    margin-bottom: 1px;
    min-height: 32px;
    white-space: nowrap;
}
.nav-link:hover, .nav-link:focus {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-hover);
    text-decoration: none;
}
.nav-link.active {
    color: var(--sidebar-text-active);
    background: var(--sidebar-active);
    font-weight: 500;
}
.nav-link .icon {
    width: 18px;
    font-size: 14px;
    text-align: center;
    opacity: 0.55;
    flex-shrink: 0;
}
.nav-link:hover .icon, .nav-link.active .icon { opacity: 0.9; }
.nav-link .nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border: 0;
    border-radius: 3px;
    line-height: 1.6;
}
.sidebar .badge.badge-red { background: rgba(214,57,57,0.15); color: #f87171; }
/* .badge-teal saiu de uso: o badge de Usuários é vermelho como os outros (SPEC-padrao-visual, 4.7) */
.sidebar .badge.badge-blue { background: rgba(66,153,225,0.12); color: #60a5fa; }

/* Submenu (accordion) */
.nav-tree { display: flex; flex-direction: column; }
.nav-toggle { background: transparent; border: 0; font: inherit; width: 100%; text-align: left; }
.nav-chev { margin-left: auto; font-size: 10px; opacity: 0.55; transition: transform 200ms cubic-bezier(0.2, 0, 0, 1); }
.nav-tree.open > .nav-toggle .nav-chev { transform: rotate(90deg); opacity: 1; }
.nav-tree.has-active > .nav-toggle { color: var(--sidebar-text-hover); }
.nav-tree .nav-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 220ms cubic-bezier(0.2, 0, 0, 1); }
.nav-tree.open .nav-sub { grid-template-rows: 1fr; }
.nav-sub-inner { overflow: hidden; min-height: 0; position: relative; padding: 4px 0 4px 28px; }
/* submenus longos (ex.: Plugins Instalados): nomes extensos cortam com reticências; o nome completo fica no title */
.nav-tree .nav-sublink { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-tree .nav-toggle .badge { margin-left: auto; }
.nav-tree .nav-toggle .badge + .nav-chev { margin-left: 6px; }

/* Badge do atalho de teclado (ALT + número) */
.nav-kbd {
    flex-shrink: 0;
    min-width: 34px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    color: #9fe8d9;
    background: rgba(26,187,156,0.12);
    border: 1px solid rgba(26,187,156,0.35);
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 rgba(26,187,156,0.25);
}
.sidebar .nav-link .badge + .nav-kbd { margin-left: -4px; }
.nav-tree .nav-toggle .nav-kbd + .nav-chev { margin-left: 6px; }
.nav-link.active .nav-kbd { color: #fff; border-color: rgba(26,187,156,0.6); }
.nav-sub-inner::before {
    content: '';
    position: absolute;
    left: 19px; top: 4px; bottom: 4px;
    width: 1px;
    background: var(--sidebar-border);
}
.nav-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    font-size: 12.5px;
    color: var(--sidebar-text);
    border-radius: var(--radius-sm);
    text-decoration: none;
    position: relative;
    margin: 1px 0;
}
.nav-sublink::before {
    content: '';
    position: absolute;
    left: -9px; top: 50%;
    width: 8px; height: 1px;
    background: var(--sidebar-border);
}
.nav-sublink:hover, .nav-sublink:focus { color: var(--sidebar-text-hover); background: var(--sidebar-hover); text-decoration: none; }
.nav-sublink.active { color: var(--sidebar-text-active); background: var(--sidebar-active); font-weight: 500; }
.nav-sublink.active::before { background: var(--primary); width: 12px; left: -13px; }

/* Rodapé da sidebar (usuário) */
.sidebar-footer { border-top: 1px solid var(--sidebar-border); padding: 8px; flex-shrink: 0; }
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.sidebar-user .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: #fff;
    flex-shrink: 0;
    position: relative;
    text-transform: uppercase;
}
.sidebar-user .avatar .online {
    position: absolute; bottom: -1px; right: -1px;
    width: 8px; height: 8px;
    background: var(--green);
    border: 2px solid var(--sidebar-bg);
    border-radius: 50%;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name {
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
    white-space: normal;          /* nome/e-mail inteiro, sem "…" (SPEC-dash-layout 9) */
    overflow-wrap: anywhere;
}
.sidebar-user-info .role { color: var(--sidebar-text); font-size: 11px; line-height: 1.3; }
.sidebar-footer .more-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    color: var(--sidebar-text);
    border-radius: var(--radius-sm);
    text-decoration: none;
}
.sidebar-footer .more-btn:hover { color: #fff; background: var(--sidebar-hover); }

/* ───────────────────────── TOPBAR ───────────────────────── */
.topbar,
.topbar.navbar-fixed-top {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    margin: 0;
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1030;
    transition: left 220ms cubic-bezier(0.2, 0, 0, 1);
}
[data-theme="dark"] .topbar { background: rgba(20,29,43,0.85); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 2px; }

.sidebar-toggle {
    display: inline-flex;
    width: 34px; height: 34px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    transition: background 120ms, color 120ms;
}
.sidebar-toggle:hover { background: var(--body-bg); color: var(--text); }

.topbar .breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
}
.topbar .breadcrumb .current { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.topbar .breadcrumb .sep { color: var(--text-disabled); }
.topbar .breadcrumb a { color: inherit; text-decoration: none; }
.topbar .breadcrumb a:hover { color: var(--primary); }

.tb-btn {
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 15px;
    text-decoration: none !important;
    transition: background 120ms, color 120ms;
    position: relative;
}
.tb-btn:hover, .tb-btn:focus { background: var(--body-bg); color: var(--text); }
.tb-btn.tb-pill {
    width: auto;
    padding: 0 12px;
    gap: 6px;
    margin-left: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-lt);
    border: 1px solid rgba(26,187,156,0.25);
}
.tb-btn.tb-pill:hover { color: var(--primary-dk); background: rgba(26,187,156,0.15); }
.tb-btn.tb-pill.active { color: #fff; background: var(--primary); border-color: var(--primary-dk); }
.theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: inline-block; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: none; }

.tb-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}
.tb-counter b { color: var(--text); font-variant-numeric: tabular-nums; }
/* caixa da busca de links no topo (SPEC-padrao-visual, 4.3 — .search-box do Gentelella) */
.search-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 260px;
    max-width: 32vw;
    height: 32px;
    padding: 0 8px 0 10px;
    margin: 0 12px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-disabled);
    text-align: left;
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 150ms, box-shadow 150ms;
}
.search-box:hover { border-color: var(--text-muted); }
.search-box:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.search-box .s-icon { font-size: 12px; color: var(--text-muted); }
.search-box .search-box-texto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-box kbd {
    padding: 1px 6px;
    font-family: var(--font);
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

/* modal da busca (command palette do Gentelella, _components.scss) */
.cmdk-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    background: rgba(15,22,35,0.4);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: cmdk-fade-in 120ms ease-out;
}
.cmdk-backdrop[hidden] { display: none; }
@keyframes cmdk-fade-in { from { opacity: 0; } to { opacity: 1; } }
.cmdk-dialog {
    width: min(580px, calc(100vw - 32px));
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    animation: cmdk-pop-in 140ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes cmdk-pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.cmdk-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-color-light); }
.cmdk-search-icon { flex-shrink: 0; color: var(--text-muted); }
.cmdk-input { flex: 1; min-width: 0; font-family: var(--font); font-size: 14px; color: var(--text); background: transparent; border: 0; outline: 0; }
.cmdk-input::placeholder { color: var(--text-muted); }
.cmdk-esc, .cmdk-footer kbd {
    padding: 1px 6px;
    font-family: var(--font);
    font-size: 10.5px;
    color: var(--text-muted);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: none;
}
.cmdk-list { flex: 1; overflow-y: auto; padding: 6px; }
.cmdk-section { padding: 10px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted); }
.cmdk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    text-decoration: none !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.cmdk-item:hover, .cmdk-item:focus, .cmdk-item.active { color: var(--primary); background: var(--primary-lt); }
.cmdk-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px; height: 24px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-surface-secondary);
    border-radius: var(--radius-sm);
}
.cmdk-item.active .cmdk-item-icon { color: var(--primary); background: rgba(26,187,156,0.14); }
.cmdk-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item-secao { color: var(--text-muted); }
.cmdk-item.active .cmdk-item-secao { color: inherit; opacity: 0.75; }
.cmdk-item-kbd { font-size: 11px; color: var(--text-muted); opacity: 0; }
.cmdk-item-kbd.cmdk-item-atalho { opacity: 1; font-family: var(--font); padding: 0; background: none; border: 0; box-shadow: none; }
.cmdk-item.active .cmdk-item-kbd { opacity: 1; }
.cmdk-empty { padding: 32px 16px; font-size: 13px; text-align: center; color: var(--text-muted); }
.cmdk-footer { display: flex; justify-content: flex-end; gap: 14px; padding: 8px 16px; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border-color-light); }
.cmdk-footer kbd { margin-right: 4px; }
body.cmdk-aberto { overflow: hidden; }

/* botão "Atualizar · Ns" (SPEC-padrao-visual, 4.2) */
.tb-refresh { font-family: var(--font); cursor: pointer; transition: background 120ms, color 120ms, border-color 120ms; }
.tb-refresh:hover, .tb-refresh:focus-visible { color: var(--primary); background: var(--primary-lt); border-color: rgba(26,187,156,0.3); outline: none; }
.tb-refresh > i { font-size: 12px; color: var(--primary); }
.tb-refresh.girando > i { animation: tb-girar 0.8s linear infinite; }
@keyframes tb-girar { to { transform: rotate(360deg); } }
.tb-counter .pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(47,179,68,0.5);
    animation: tb-pulse 1.6s infinite;
}
@keyframes tb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(47,179,68,0.5); }
    70% { box-shadow: 0 0 0 6px rgba(47,179,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(47,179,68,0); }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.4);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 1030;
}
.sidebar-backdrop[hidden] { display: none; }

/* ───────────────────────── CONTEÚDO ───────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    padding-top: var(--topbar-h);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 220ms cubic-bezier(0.2, 0, 0, 1);
}
.page-wrapper { padding: 20px 24px 40px; flex: 1; }
.page-wrapper .page-header { margin: 0 0 20px; padding: 0; border: 0; }
.page-pretitle {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.page-title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--text); margin: 0; }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.card-body { padding: 16px; }
.page-card > .card-body > .row { margin-bottom: 0; }

/* copyright e build no rodapé da sidebar, abaixo do usuário, com o botão sair à direita (SPEC-dash-layout 4.3 e 9) */
.sidebar-meta {
    margin-top: 4px;
    padding: 4px 8px 2px;          /* mesma margem do avatar */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sidebar-meta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    font-size: 11px;
    line-height: 1.3;
    color: var(--sidebar-text);
    text-align: left;
}
.sidebar-copy, .sidebar-build { white-space: nowrap; }
.sidebar-build .build-tag {
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(26,187,156,0.12);
    color: #7fdcc8;
}
.sidebar-logout { flex-shrink: 0; }

/* ───────────────────────── RESPONSIVO / RAIL ───────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 220ms ease; z-index: 1040; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; overflow-x: clip; }
    .topbar, .topbar.navbar-fixed-top { left: 0; padding: 0 12px; }
    .topbar .breadcrumb, .tb-counter:not(.tb-refresh) { display: none; }
    /* no celular o botão de atualizar fica só com o ícone */
    .tb-refresh { width: 32px; padding: 0; justify-content: center; margin-right: 2px; }
    .tb-refresh .tb-refresh-texto { display: none; }
    /* no celular a busca vira só a lupa */
    .search-box { width: 32px; max-width: none; padding: 0; margin: 0 4px 0 auto; justify-content: center; background: transparent; border-color: transparent; }
    .search-box .search-box-texto, .search-box kbd { display: none; }
    .search-box .s-icon { font-size: 15px; color: var(--text-secondary); }
    .cmdk-backdrop { padding-top: 8vh; }
    .page-wrapper { padding: 12px; min-width: 0; }
    .page-card > .card-body { overflow-x: auto; }
    body.sidebar-open { overflow: hidden; }
}
@media (min-width: 769px) {
    .sidebar-backdrop { display: none !important; }
    body.sidebar-rail { --sidebar-w: 64px; }
    body.sidebar-rail .sidebar { overflow: visible; }
    body.sidebar-rail .sidebar-brand { padding: 0; justify-content: center; }
    body.sidebar-rail .brand-name,
    body.sidebar-rail .nav-label,
    body.sidebar-rail .nav-link .nav-text,
    body.sidebar-rail .nav-link .badge,
    body.sidebar-rail .nav-link .nav-kbd,
    body.sidebar-rail .nav-chev,
    body.sidebar-rail .nav-tree .nav-sub,
    body.sidebar-rail .sidebar-user-info,
    body.sidebar-rail .sidebar-meta-text { display: none; }
    body.sidebar-rail .sidebar-meta { justify-content: center; padding: 4px 0 0; }
    body.sidebar-rail .sidebar-nav { overflow: visible; }
    body.sidebar-rail .nav-link { justify-content: center; gap: 0; padding: 8px; position: relative; }
    body.sidebar-rail .sidebar-user { flex-direction: column; padding: 4px 0; }
    body.sidebar-rail .nav-link[data-rail-label]::after {
        content: attr(data-rail-label);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%) translateX(-4px);
        background: var(--text);
        color: var(--bg-surface);
        font-size: 11.5px;
        font-weight: 500;
        padding: 5px 9px;
        border-radius: var(--radius-sm);
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 120ms, transform 120ms;
        z-index: 1100;
    }
    body.sidebar-rail .nav-link[data-rail-label]:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
    body.sidebar-rail .sidebar-toggle i { transform: rotate(180deg); }
}

/* ───────────────────────── AUTENTICAÇÃO ───────────────────────── */
.auth-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(26,187,156,0.10), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(66,153,225,0.08), transparent 60%),
        var(--body-bg);
}
/* cartão do login no modelo do login.html (SPEC-padrao-visual, 4.1 — portado do _auth.scss) */
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand .brand-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 7px; }
.auth-brand .brand-name { color: var(--text); font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.auth-brand .brand-name small { color: var(--text-muted); font-weight: 400; font-size: 13px; margin-left: 2px; }
.auth-title { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 4px; letter-spacing: -0.3px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.auth-card .form-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--text); }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .text-danger { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 500; color: var(--red); }
.auth-card .auth-erros ul { margin: 0 0 14px; padding-left: 18px; }
.auth-card .auth-erros:empty, .auth-card .validation-summary-valid { display: none; }
.auth-card .btn-auth { width: 100%; height: 38px; margin-top: 8px; justify-content: center; }
.auth-footer { margin-top: 20px; font-size: 12.5px; color: var(--text-muted); text-align: center; }
/* Tela de erro não tratado (SPEC-pagina-erro-generico.md, 4.2): mesmo cartão do login, com o código da ocorrência */
.erro-card .auth-title i { color: var(--red); margin-right: 4px; }
.erro-card .auth-subtitle { margin-bottom: 16px; }
.erro-codigo {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; margin-bottom: 18px;
    background: var(--bg-surface-secondary); border: 1px solid var(--border-color); border-radius: var(--radius);
}
.erro-codigo-rotulo { font-size: 12px; color: var(--text-muted); }
.erro-codigo code { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text); background: none; padding: 0; }
.erro-codigo .btn { margin-left: auto; }
.erro-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.erro-acoes .btn { flex: 1 1 auto; justify-content: center; }
.erro-detalhes { margin-top: 18px; font-size: 12px; color: var(--text-muted); }
.erro-detalhes summary { cursor: pointer; }
.erro-detalhes pre { margin-top: 8px; max-height: 300px; overflow: auto; font-size: 11px; white-space: pre-wrap; word-break: break-word; color: var(--text); background: var(--bg-surface-secondary); border-color: var(--border-color); }
@media (max-width: 480px) { .auth-card { padding: 24px 20px; } }

/* input com ícone à esquerda (input-group .input-icon do Gentelella, _forms.scss) */
.input-group.has-icon { position: relative; }
.input-group.has-icon > .form-control { padding-left: 34px; border-radius: var(--radius-sm) !important; }
.input-group.has-icon > .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    /* acima do input focado: o Bootstrap 3 dá z-index 2 ao .form-control do input-group e 3 no foco,
       e o input (com fundo) cobria o ícone ao clicar (SPEC-login-loading-tema, 4.2) */
    z-index: 4;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}
/* olho da senha dentro de um input-group (login / alterar senha): também acima do input */
.input-group.input-affix > .input-affix-btn { z-index: 4; }
.input-group.has-icon.input-affix > .form-control { padding-left: 34px; padding-right: 38px; }

/* ───────────────────────── BOTÕES ───────────────────────── */
.btn {
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: background 120ms, border-color 120ms, color 120ms, box-shadow 120ms;
    box-shadow: none;
    text-shadow: none;
    background-image: none;
}
.btn:not(.btn-xs):not(.btn-sm):not(.btn-lg):not(.thumbnail) { padding: 7px 12px; line-height: 18px; }
.btn-xs { font-size: 11px; padding: 2px 7px; border-radius: var(--radius-sm); }
.btn-sm { font-size: 12px; padding: 5px 10px; border-radius: var(--radius-sm); }
.btn-lg { font-size: 14px; padding: 9px 16px; border-radius: var(--radius); }
.btn:focus, .btn.focus, .btn:active:focus { outline: none; box-shadow: 0 0 0 3px var(--primary-lt); }
.btn.active, .btn:active { box-shadow: none; }

.btn-default {
    color: var(--text-secondary);
    background: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}
.btn-default:hover, .btn-default:focus, .btn-default.focus,
.btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {
    color: var(--text);
    background: var(--bg-surface-secondary);
    border-color: var(--border-color);
}
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary-dk); }
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus,
.btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary,
.btn-primary:active:hover, .btn-primary.active:hover { color: #fff; background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-success { color: #fff; background: var(--green); border-color: #26923a; }
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active { color: #fff; background: #26923a; border-color: #26923a; }
.btn-info { color: #fff; background: var(--azure); border-color: #3182c6; }
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active { color: #fff; background: #3182c6; border-color: #3182c6; }
.btn-warning { color: #fff; background: var(--yellow); border-color: #d18800; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active { color: #fff; background: #d18800; border-color: #d18800; }
/* perigo suavizado (SPEC-padrao-visual, 4.5): fundo claro, texto e borda vermelhos */
.btn-danger { color: var(--red); background: var(--red-lt); border-color: rgba(214,57,57,0.35); }
.btn-danger:hover, .btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active,
.btn-danger:active:hover, .btn-danger:active:focus, .open > .dropdown-toggle.btn-danger {
    color: var(--red); background: rgba(214,57,57,0.16); border-color: rgba(214,57,57,0.5);
}
.btn-danger:focus, .btn-danger.focus { box-shadow: 0 0 0 3px var(--red-lt); }
.btn-danger.disabled, .btn-danger[disabled], .btn-danger.disabled:hover, .btn-danger[disabled]:hover { color: var(--red); background: var(--red-lt); border-color: rgba(214,57,57,0.35); }
[data-theme="dark"] .btn-danger, [data-theme="dark"] .btn-danger:hover, [data-theme="dark"] .btn-danger:focus,
[data-theme="dark"] .btn-danger:active, [data-theme="dark"] .btn-danger.active { color: #f87171; }
.btn-link { color: var(--primary); }
.btn-link:hover, .btn-link:focus { color: var(--primary-dk); }
.btn.disabled, .btn[disabled], fieldset[disabled] .btn { opacity: 0.55; box-shadow: none; }

/* ───────────────────────── FORMULÁRIOS ───────────────────────── */
label, .control-label { font-size: 12px; font-weight: 500; color: var(--text); }
.form-group { margin-bottom: 14px; }
.form-control {
    height: 34px;
    padding: 6px 12px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: none;
    transition: border-color 150ms, box-shadow 150ms;
}
.form-control::placeholder { color: var(--text-disabled); }
.form-control:hover:not(:focus):not([disabled]):not([readonly]) { border-color: var(--text-muted); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
    background-color: var(--bg-surface-secondary);
    color: var(--text-muted);
}
textarea.form-control { height: auto; }
select.form-control option { background: var(--bg-surface); color: var(--text); }
.input-sm { height: 30px; font-size: 12px; }
.input-lg { height: 40px; font-size: 14px; }

.input-group-addon {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}
.input-group-btn > .btn { height: 34px; }
.input-group-btn > .btn-xs, .input-group-btn > .btn-sm { height: auto; }

/* input-group em flex (SPEC-padrao-visual, 4.8): o rótulo (addon) e o campo ficam sempre na mesma linha,
 * sem a quebra do display:table do Bootstrap 3. Vale para todo input-group / input-group-addon / input-group-btn. */
.input-group { display: flex; flex-wrap: nowrap; align-items: stretch; width: 100%; }
.input-group > .input-group-addon,
.input-group > .input-group-btn {
    display: flex;
    align-items: center;
    width: auto;
    white-space: nowrap;
    flex: 0 0 auto;
}
.input-group > .input-group-addon { gap: 6px; padding: 0 10px; margin: 0; line-height: 1; }
.input-group > .input-group-addon > i { font-size: 12px; color: var(--text-muted); }
.input-group > .input-group-addon .label,
.input-group > .input-group-addon .badge { font-size: 10.5px; }
.input-group > .form-control,
.input-group > select,
.input-group > .bootstrap-select,
.input-group > .twitter-typeahead {
    float: none;
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
    max-width: none !important;
}
.input-group > .bootstrap-select > .btn { height: 34px; }
/* o bootstrap-select marca o wrapper como input-group-btn quando está num input-group: ele continua ocupando o espaço do campo */
.input-group > .bootstrap-select.input-group-btn { flex: 1 1 auto; width: 1% !important; min-width: 120px; }
.input-group > .bootstrap-select:not(:first-child) > .btn { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group > .input-group-btn > .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Barra padrão de ações e filtros (SPEC-padrao-visual, 4.8): ações à esquerda, filtros à direita (modelo BuildRevolution).
 *   <div class="toolbar-acoes">
 *     <div class="toolbar-acoes-esq"> …botões… </div>
 *     <div class="toolbar-filtros">
 *       <div class="input-group"><label class="input-group-addon"><i class="fa-solid fa-code-branch"></i> Branch</label><select class="form-control">…</select></div>
 *       …um input-group por par rótulo + campo… <button class="btn btn-primary">…</button>
 *     </div>
 *   </div> */
.toolbar-acoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}
.toolbar-acoes-esq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    min-width: 0;
}
.toolbar-filtros > .input-group { width: auto; flex: 0 1 auto; min-width: 220px; }
.toolbar-acoes-esq > .input-group { width: auto; flex: 0 1 auto; min-width: 260px; }
.toolbar-filtros > .input-group > .form-control,
.toolbar-filtros > .input-group > select { min-width: 120px; }
.input-group-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    cursor: pointer;
}
.input-group-check > i { font-size: 12px; color: var(--text-muted); }
.input-group-check > input[type="checkbox"] { margin: 0; }
.input-group-check.hide { display: none; }
.toolbar-filtros > .btn,
.toolbar-filtros > .btn-group { flex: 0 0 auto; }
.toolbar-filtros .btn i, .toolbar-acoes-esq .btn i { margin-right: 2px; }
@media (max-width: 768px) {
    .toolbar-acoes { flex-direction: column; align-items: stretch; }
    .toolbar-acoes-esq, .toolbar-filtros { width: 100%; margin-left: 0; }
    .toolbar-acoes-esq > .btn, .toolbar-acoes-esq > .btn-group { flex: 1 1 auto; }
    /* grupos longos (ex.: Congelar/Descongelar + sistema do Status) quebram linha em vez de rolar para o lado */
    .toolbar-acoes-esq > .btn-group { flex-wrap: wrap; }
    .toolbar-filtros { justify-content: stretch; }
    .toolbar-filtros > .input-group,
    .toolbar-filtros > .input-group-check,
    .toolbar-filtros > .btn { flex: 1 1 100%; min-width: 0; }
    .toolbar-filtros > .btn { justify-content: center; }
}
.has-error .form-control { border-color: var(--red); }
.has-error .form-control:focus { box-shadow: 0 0 0 3px var(--red-lt); }
.has-success .form-control { border-color: var(--green); }
.validation-summary-errors ul { padding-left: 18px; margin: 0 0 10px; color: var(--red); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
fieldset legend, legend {
    color: var(--text);
    border-bottom-color: var(--border-color-light);
    font-size: 14px;
    font-weight: 600;
}

/* ───────────────────────── TABELAS ───────────────────────── */
.table {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    margin-bottom: 0;
}
.table > thead > tr > th,
body table.dataTable thead th,
body table.dataTable thead td {
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-color) !important;
    border-top: 0 !important;
    vertical-align: middle;
    white-space: nowrap;
}
body table.dataTable thead tr,
body table.dataTable thead tr th { background-color: var(--bg-surface-secondary); color: var(--text-muted); }
.table > tbody > tr > td, .table > tbody > tr > th,
.table > tfoot > tr > td, .table > tfoot > tr > th {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color-light);
    vertical-align: middle;
}
.table-condensed > tbody > tr > td, .table-condensed > thead > tr > th { padding: 5px 8px; }
.table-striped > tbody > tr:nth-of-type(odd),
body table.dataTable.stripe tbody tr.odd,
body table.dataTable.display tbody tr.odd { background-color: var(--bg-surface-secondary); }
body table.dataTable tbody tr { background-color: var(--bg-surface); }
.table-hover > tbody > tr:hover,
body table.dataTable.hover tbody tr:hover,
body table.dataTable.display tbody tr:hover { background-color: var(--primary-lt); }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-color: var(--border-color-light); }
.table > tbody > tr.active > td, .table > tbody > tr > td.active { background-color: var(--bg-surface-secondary); }
.table > tbody > tr.success > td, .table > tbody > tr > td.success { background-color: var(--green-lt); }
.table > tbody > tr.info > td, .table > tbody > tr > td.info { background-color: var(--azure-lt); }
.table > tbody > tr.warning > td, .table > tbody > tr > td.warning { background-color: var(--yellow-lt); }
.table > tbody > tr.danger > td, .table > tbody > tr > td.danger { background-color: var(--red-lt); }
/* linhas de status suavizadas (SPEC-padrao-visual, 4.5): tom leve + faixa de 3px à esquerda; o texto continua normal */
.table > tbody > tr.success > td, .table > tbody > tr.info > td,
.table > tbody > tr.warning > td, .table > tbody > tr.danger > td,
.table > tbody > tr > td.success, .table > tbody > tr > td.info,
.table > tbody > tr > td.warning, .table > tbody > tr > td.danger { color: var(--text); }
.table > tbody > tr.success > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.table > tbody > tr.info > td:first-child { box-shadow: inset 3px 0 0 var(--azure); }
.table > tbody > tr.warning > td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.table > tbody > tr.danger > td:first-child { box-shadow: inset 3px 0 0 var(--red); }
/* hover das linhas de status: um pouco mais forte, sem o tom pesado do Bootstrap */
.table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr > td.success:hover { background-color: rgba(47,179,68,0.14); }
.table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr > td.info:hover { background-color: rgba(66,153,225,0.14); }
.table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr > td.warning:hover { background-color: rgba(245,159,0,0.16); }
.table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr > td.danger:hover { background-color: rgba(214,57,57,0.13); }
body tr.group, body tr.group:hover, body tr.group td {
    background-color: var(--primary-lt) !important;
    color: var(--text);
    font-weight: 600 !important;
    font-size: 13px !important;
}
.table-responsive { border: 0; }

/* Coluna "Ação" — padrão para todos os grids (atuais e futuros):
 *   <table class="table ... table-acao">
 *     <thead><tr> ... <th class="col-acao">Ação</th></tr></thead>
 *     <tbody><tr> ... <td><div class="btn-group"> <button class="btn btn-xs ...">…</button> … </div></td></tr></tbody>
 *   </table>
 * Não usar largura fixa (width) no <th>: a coluna se ajusta aos botões, que ficam numa única linha.
 * A regra pega a última coluna, então funciona também para linhas montadas via JS/DataTables. */
.table-acao > thead > tr > th:last-child,
.table-acao > tbody > tr > td:last-child,
.table-acao > tfoot > tr > td:last-child,
.col-acao {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}
.table-acao > tbody > tr > td:last-child .btn-group,
.table-acao > tbody > tr > td:last-child .btn-toolbar {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    float: none;
}
.table-acao > tbody > tr > td:last-child .btn-toolbar { gap: 4px; }
.table-acao > tbody > tr > td:last-child .btn-toolbar > * { float: none; margin-left: 0; }

/* Button groups (SPEC-padrao-visual, 4.6 — modelo "Button groups" do form_buttons.html):
 * botões colados, divisória de 1px entre eles e só as pontas arredondadas. Vale para a coluna Ação e para qualquer .btn-group. */
.btn-group { display: inline-flex; flex-wrap: nowrap; align-items: stretch; vertical-align: middle; }
.btn-group > .btn,
.btn-group > .btn-group > .btn {
    float: none;
    position: relative;
    margin-left: -1px;
    border-radius: 0 !important;
    box-shadow: none;
}
.btn-group > .btn:first-child,
.btn-group > .btn-group:first-child > .btn { margin-left: 0; }
.btn-group > .btn:first-child,
.btn-group > .btn-group:first-child > .btn {
    border-top-left-radius: var(--radius-sm) !important;
    border-bottom-left-radius: var(--radius-sm) !important;
}
.btn-group > .btn:last-child,
.btn-group > .btn-group:last-child > .btn,
.btn-group > .btn.dropdown-toggle:last-of-type {
    border-top-right-radius: var(--radius-sm) !important;
    border-bottom-right-radius: var(--radius-sm) !important;
}
.btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn.active { z-index: 2; }
.btn-group > .btn-group { float: none; margin-left: -1px; }
.btn-group > .btn-group:first-child { margin-left: 0; }
/* o bootstrap-select também é um .btn-group: continua com o comportamento dele */
.bootstrap-select.btn-group { display: inline-block; }
.bootstrap-select.btn-group > .btn { margin-left: 0; border-radius: var(--radius-sm) !important; }

/* Tabela dentro de um "card" (estilo Gentelella) */
.table, body .dataTables_wrapper {
    border-radius: var(--radius-lg);
}
body .dataTables_wrapper .table, body .dataTables_scroll {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
body .dataTables_scroll .table { border: 0; border-radius: 0; }
body table.dataTable.no-footer { border-bottom: 1px solid var(--border-color); }
body .dataTables_wrapper > table.dataTable { width: 100% !important; }
body .dataTables_scrollBody { border-bottom: 0 !important; }

/* ───────────────────────── DATATABLES 1.x ───────────────────────── */
body .dataTables_wrapper { font-size: 13px; color: var(--text-secondary); }
body .dataTables_wrapper .dataTables_length,
body .dataTables_wrapper .dataTables_filter,
body .dataTables_wrapper .dataTables_info,
body .dataTables_wrapper .dataTables_processing,
body .dataTables_wrapper .dataTables_paginate { color: var(--text-muted); font-size: 12px; }
body .dataTables_wrapper .dataTables_filter { margin-bottom: 10px; }
body .dataTables_wrapper .dataTables_filter label,
body .dataTables_wrapper .dataTables_length label { font-weight: 500; color: var(--text-muted); }
body .dataTables_wrapper .dataTables_filter input,
body .dataTables_wrapper .dataTables_length select {
    height: 32px;
    padding: 0 10px;
    margin-left: 6px;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 150ms, box-shadow 150ms;
}
body .dataTables_wrapper .dataTables_filter input:focus,
body .dataTables_wrapper .dataTables_length select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
body .dataTables_wrapper .dataTables_info { padding-top: 14px; }
body .dataTables_wrapper .dataTables_paginate { padding-top: 10px; }
body .dataTables_wrapper .dataTables_paginate .paginate_button,
.pagination > li > a, .pagination > li > span {
    min-width: 28px;
    height: 28px;
    padding: 0 8px !important;
    margin-left: 4px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
}
body .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.pagination > li > a:hover { color: var(--text) !important; background: var(--bg-surface-secondary) !important; }
body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > span {
    color: #fff !important;
    background: var(--primary) !important;
    border-color: var(--primary-dk) !important;
}
body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.pagination > .disabled > a { color: var(--text-disabled) !important; opacity: 0.6; }
body .dataTables_wrapper .dataTables_processing {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    color: var(--text);
}
body .dt-buttons { padding-bottom: 10px; }
body .dt-buttons .dt-button, body div.dt-button-collection .dt-button {
    height: 30px;
    padding: 0 12px;
    margin-right: 4px;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow);
    background-image: none !important;
}
body .dt-buttons .dt-button:hover:not(.disabled) { color: var(--text); background: var(--bg-surface-secondary) !important; }
body div.dt-button-collection {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-modal);
}
body table.dataTable thead .sorting, body table.dataTable thead .sorting_asc, body table.dataTable thead .sorting_desc { cursor: pointer; }
body table.dataTable thead .sorting_asc, body table.dataTable thead .sorting_desc { color: var(--text); }
body table.fixedHeader-floating { background: var(--bg-surface); }
body table.dataTable tbody tr.selected, body table.dataTable tbody tr.selected td { background-color: var(--primary-lt) !important; color: var(--text); }

/* ───────────────────────── MODAIS ───────────────────────── */
.modal-backdrop { background-color: rgb(15,23,42); }
.modal-backdrop.in { opacity: 0.45; }
.modal-content {
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
}
.modal-header { padding: 14px 18px; border-bottom: 1px solid var(--border-color-light); }
.modal-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.1px; }
.modal-body { padding: 16px 18px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--border-color-light); }
.close {
    color: var(--text-muted);
    text-shadow: none;
    opacity: 0.8;
    font-weight: 400;
}
.close:hover, .close:focus { color: var(--text); opacity: 1; }
.modal-dialog-m { width: 80%; margin: auto; padding: 0; }
.modal-content-m { height: auto; min-height: 80%; border-radius: var(--radius-lg); }
.modal-dialog-max { width: 100%; margin: 0; padding: 0; }
.modal-content-max { height: auto; min-height: 100%; border-radius: 0; }

/* ───────────────────────── LABELS / BADGES ───────────────────────── */
.label, .badge {
    display: inline-block;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    padding: 1px 7px;
    border-radius: var(--radius-sm);
    text-shadow: none;
}
.badge { color: var(--text-secondary); background: var(--bg-surface-secondary); border: 1px solid var(--border-color); }
/* contador do menu que o JS liga e desliga, ex.: Bloco de notas com 0 (SPEC-bloco-notas.md, 4.6) */
.badge[hidden] { display: none; }
.label-default { color: var(--text-secondary); background: var(--bg-surface-secondary); }
.label-primary, .badge-primary { color: var(--primary); background: var(--primary-lt); border-color: transparent; }
.label-success, .badge-success { color: var(--green); background: var(--green-lt); border-color: transparent; }
.label-info, .badge-info { color: var(--azure); background: var(--azure-lt); border-color: transparent; }
.label-warning, .badge-warning { color: #b45309; background: var(--yellow-lt); border-color: transparent; }
[data-theme="dark"] .label-warning, [data-theme="dark"] .badge-warning { color: var(--yellow); }
.label-danger, .badge-danger { color: var(--red); background: var(--red-lt); border-color: transparent; }
[data-theme="dark"] .label-danger, [data-theme="dark"] .badge-danger { color: #f87171; }
a.label:hover, a.label:focus { color: inherit; filter: brightness(0.95); }

/* ───────────────────────── ALERTAS / PAINÉIS ───────────────────────── */
.alert { border-radius: var(--radius); border: 1px solid transparent; font-size: 13px; }
.alert-success { color: var(--green); background: var(--green-lt); border-color: rgba(47,179,68,0.2); }
.alert-info { color: var(--azure); background: var(--azure-lt); border-color: rgba(66,153,225,0.2); }
.alert-warning { color: #b45309; background: var(--yellow-lt); border-color: rgba(245,159,0,0.25); }
.alert-danger { color: var(--red); background: var(--red-lt); border-color: rgba(214,57,57,0.2); }
.panel, .well, .jumbotron, .list-group-item {
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.panel-heading, .panel-default > .panel-heading {
    color: var(--text);
    background: var(--bg-surface-secondary);
    border-color: var(--border-color-light);
    font-weight: 600;
    font-size: 13px;
}
.panel-footer { background: var(--bg-surface-secondary); border-color: var(--border-color-light); }
.list-group-item { border-radius: 0; box-shadow: none; }
.list-group-item.active, .list-group-item.active:hover { background: var(--primary); border-color: var(--primary-dk); }

/* ───────────────────────── ABAS / DROPDOWN / TOOLTIP ───────────────────────── */
.nav-tabs { border-bottom: 1px solid var(--border-color); }
.nav-tabs > li > a {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-right: 4px;
}
.nav-tabs > li > a:hover { color: var(--text); background: transparent; border-bottom-color: var(--border-color); }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    color: var(--primary);
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--primary);
}
.nav-pills > li.active > a, .nav-pills > li.active > a:hover { background: var(--primary); }
.tab-content { padding-top: 12px; }

.dropdown-menu {
    font-size: 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-modal);
    padding: 4px;
}
.dropdown-menu > li > a { color: var(--text-secondary); border-radius: var(--radius-sm); padding: 6px 10px; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: var(--text); background: var(--bg-surface-secondary); }
.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover { color: #fff; background: var(--primary); }
.dropdown-menu .divider { background: var(--border-color-light); }

.tooltip { font-family: var(--font); }
.tooltip-inner { max-width: 350px; padding: 5px 9px; font-size: 11.5px; background: var(--text); color: var(--bg-surface); border-radius: var(--radius-sm); }
.tooltip.top .tooltip-arrow { border-top-color: var(--text); }
.tooltip.bottom .tooltip-arrow { border-bottom-color: var(--text); }
.tooltip.left .tooltip-arrow { border-left-color: var(--text); }
.tooltip.right .tooltip-arrow { border-right-color: var(--text); }
.popover { background: var(--bg-surface); border-color: var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow-modal); color: var(--text); }
.popover-title { background: var(--bg-surface-secondary); border-color: var(--border-color-light); }

.progress { height: 6px; background: var(--border-color-light); border-radius: 999px; box-shadow: none; }
.progress-bar { background-color: var(--primary); box-shadow: none; }

/* ───────────────────────── TILES (thumbnail das telas iniciais) ───────────────────────── */
.thumbnail {
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}
.thumbnail.btn {
    display: block;
    width: 100%;
    padding: 18px 12px 14px;
    white-space: normal;
    text-align: center;
}
.thumbnail .caption { padding: 6px 0 0; color: var(--text); }
.thumbnail .caption h3 { font-size: 15px; margin: 8px 0 6px; color: var(--text); }
.thumbnail > [class*="fa"], .thumbnail > .glyphicon {
    font-size: 26px;
    color: var(--primary);
    width: 52px; height: 52px;
    line-height: 52px;
    border-radius: 12px;
    background: var(--primary-lt);
}
a.stl:hover .thumbnail:not(.disabled), .thumbnail.btn:not(.disabled):hover {
    color: var(--text);
    background: var(--bg-surface);
    border-color: rgba(26,187,156,0.45);
    box-shadow: 0 0 0 3px var(--primary-lt), var(--shadow);
    transform: translateY(-2px);
}
.thumbnail.disabled { opacity: 0.55; }
.thumbnail.disabled > [class*="fa"], .thumbnail.disabled > .glyphicon { color: var(--text-muted); background: var(--bg-surface-secondary); }
a.stl { display: block; text-decoration: none !important; }
.col-sm-3.btn-default { background: transparent; border: 0; box-shadow: none; }

/* ───────────────────────── CLASSES LEGADAS DAS VIEWS ───────────────────────── */
body .b-1, body .i-f {
    border-color: var(--border-color) !important;
    background: var(--bg-surface);
    color: var(--text-secondary);
}
body .b-1, body .i-f { border-radius: var(--radius); }

/* ───────────────────────── OUTPUT DE PROCESSO (terminal) ─────────────────────────
 * Build, Make Update e toda tela com #logBuild (SPEC-output-build-signalr.md, D11 e D15): um terminal só, igual em todas,
 * escuro nos dois temas, como PowerShell/CMD. Linhas sem caixa nem arredondado (o .alert do Bootstrap e o <style> das views
 * deixavam o Make Update em "caixinhas"). 3 estados: erro (vermelho), aviso (amarelo), normal; o cabeçalho (Info) em destaque. */
body .saida-terminal {
    margin-top: 16px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--terminal-bg);
    box-shadow: 0 0 0 1px var(--terminal-borda), var(--shadow);
}
/* painel acima de uma tabela (Ibpt, SPEC-ibpt-saida-importacao.md, 6.6): espaço antes da tabela/DataTables */
body .saida-terminal + table,
body .saida-terminal + .dataTables_wrapper { margin-top: 16px; }
body .saida-terminal-topo {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: var(--terminal-topo);
    border-bottom: 1px solid var(--terminal-borda);
    color: var(--terminal-apagado);
    font-family: var(--font-mono); font-size: 11.5px;
}
body .saida-terminal-topo i { color: var(--terminal-info); }
body #logBuild {
    max-height: 70vh;
    overflow: auto;
    padding: 8px 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--terminal-texto);
    background: var(--terminal-bg);
}
body #logBuild:empty::before { content: 'Sem saída.'; display: block; padding: 2px 16px; color: var(--terminal-apagado); }
body #logBuild p,
body #logBuild p.alert {
    margin: 0;
    padding: 1px 16px 1px 13px;
    border: 0 !important;
    border-left: 3px solid transparent !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--terminal-texto);
    font-family: inherit; font-size: inherit; line-height: inherit;
    white-space: pre-wrap;
    word-break: break-word;
}
body #logBuild p:hover { background: var(--terminal-hover); }
body #logBuild p > b:first-child { color: var(--terminal-apagado); font-weight: 400; user-select: none; }
body #logBuild p.alert-danger { color: var(--terminal-erro); background: var(--terminal-erro-bg); border-left-color: var(--terminal-erro) !important; }
body #logBuild p.alert-warning { color: var(--terminal-aviso); background: var(--terminal-aviso-bg); border-left-color: var(--terminal-aviso) !important; }
body #logBuild p.alert-default { color: var(--terminal-info); }
body #logBuild p.alert-default > b + b { font-weight: 600; }

/* Faixa de status do processo (SPEC-ibpt-situacao-status.md, 4.3): fixa entre o topo e o log, criada pelo
 * gentelella-saida.js só quando o processo manda status (hoje a Ibpt). Valor que se substitui, não entra no log. */
body .saida-terminal-estado { margin-left: auto; font-family: var(--font-sans); font-size: 12px; }
body .saida-terminal-estado.rodando { color: var(--terminal-ok); }
body .saida-terminal-estado.rodando::before { content: '\25CF  '; animation: saida-pisca 1s infinite; }
body .saida-terminal-estado.fim { color: var(--terminal-ok); }
body .saida-terminal-estado.fim::before { content: '\2713  '; }
@keyframes saida-pisca { 50% { opacity: .35; } }
body .saida-status {
    padding: 10px 14px 12px;
    border-bottom: 1px solid var(--terminal-borda);
    background: var(--terminal-topo);
    color: var(--terminal-texto);
    font-family: var(--font-mono); font-size: 12px;
}
body .saida-status-topo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
body .saida-status-pos { font-weight: 600; color: var(--terminal-texto); }
body .saida-status-etapa { color: var(--terminal-apagado); }
body .saida-status-tempo { margin-left: auto; color: var(--terminal-apagado); }
body .saida-status-barra { height: 6px; border-radius: 3px; background: var(--terminal-hover); overflow: hidden; margin-bottom: 10px; }
body .saida-status-barra > div { height: 100%; width: 0; background: var(--terminal-ok); transition: width .25s; }
body .saida-status-item { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: 0; }
body .saida-status-item th {
    padding: 0 8px 3px; border: 0; background: transparent;
    font-family: var(--font-sans); font-size: 11px; font-weight: 500; color: var(--terminal-apagado); text-align: left;
}
body .saida-status-item th:nth-child(1) { width: 64px; }
body .saida-status-item th:nth-child(2) { width: 84px; }
body .saida-status-item th:nth-child(3) { width: 40px; }
body .saida-status-item th:nth-child(5) { width: 150px; }
body .saida-status-item th:nth-child(6) { width: 92px; }
body .saida-status-item td {
    padding: 5px 8px; border: 0; background: var(--terminal-info-bg); color: var(--terminal-texto);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body .saida-status-item td:first-child { border-radius: var(--radius) 0 0 var(--radius); }
body .saida-status-item td:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
body .saida-status-anterior { color: var(--terminal-apagado); margin-right: 4px; }
body .saida-status-mudou { color: var(--terminal-aviso); font-weight: 600; }
body .saida-status-cont { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-family: var(--font-sans); }
body .saida-status-pct { color: var(--terminal-apagado); font-size: 12px; }
body .saida-status.concluido .saida-status-item td { background: transparent; color: var(--terminal-apagado); }
body .saida-sit { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: var(--radius); font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
body .saida-sit-nova { color: var(--terminal-ok); background: var(--terminal-ok-bg); }
body .saida-sit-alterada { color: var(--terminal-aviso); background: var(--terminal-aviso-bg); }
body .saida-sit-renovada { color: var(--terminal-texto); background: var(--terminal-hover); }
body .saida-sit-erro { color: var(--terminal-erro); background: var(--terminal-erro-bg); }
@media (max-width: 600px) {
    body .saida-status-item .col-desc { display: none; }
    body .saida-status-item th:nth-child(5) { width: 110px; }
}

/* Faixa de etapas do Build e do Make Update (SPEC-saida-indicador-build-makeupdate.md, 4.4): mesmos tokens do terminal */
body .saida-terminal-estado.falhou { color: var(--terminal-erro); }
body .saida-terminal-estado.falhou::before { content: '\2715  '; }
body .saida-etapas { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
body .saida-etapa {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
    border: 1px solid var(--terminal-borda); border-radius: var(--radius);
    font-family: var(--font-sans); font-size: 11.5px; color: var(--terminal-apagado); white-space: nowrap;
}
body .saida-etapa-marca { font-style: normal; }
body .saida-etapa.feita { color: var(--terminal-ok); border-color: var(--terminal-ok-bg); }
body .saida-etapa.feita .saida-etapa-marca::before { content: '\2713'; }
body .saida-etapa.atual { color: var(--terminal-info); border-color: var(--terminal-info); background: var(--terminal-info-bg); font-weight: 500; }
body .saida-etapa.atual .saida-etapa-marca::before { content: '\25CF'; animation: saida-pisca 1s infinite; }
body .saida-etapa.falhou { color: var(--terminal-erro); border-color: var(--terminal-erro); background: var(--terminal-erro-bg); }
body .saida-etapa.falhou .saida-etapa-marca::before { content: '\2715'; }
body .saida-status-barra.falhou > div { background: var(--terminal-erro); }
/* estimada passou da média: listrada, sem voltar e sem parar em 100% (D5) */
body .saida-status-barra.passou > div {
    width: 100% !important;
    background: repeating-linear-gradient(45deg, var(--terminal-aviso) 0 6px, transparent 6px 12px);
    background-size: 24px 6px; animation: saida-listra 1s linear infinite; opacity: .7;
}
/* estimada sem histórico: faixa correndo (indefinida) */
body .saida-status-barra.indefinida > div {
    width: 30% !important; background: var(--terminal-info);
    animation: saida-indefinida 1.4s ease-in-out infinite;
}
@keyframes saida-listra { to { background-position: 24px 0; } }
@keyframes saida-indefinida { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
body .saida-status-detalhe {
    display: flex; gap: 8px; align-items: center; min-width: 0;
    padding: 5px 8px; border-radius: var(--radius); background: var(--terminal-info-bg);
}
body .saida-status-seta { color: var(--terminal-info); }
body .saida-status-texto { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--terminal-texto); }
body .saida-status.concluido .saida-status-detalhe { background: transparent; }

/* Ibpt: "Última importação" e valor antigo na pesquisa (SPEC-ibpt-situacao-status.md, 4.5) */
body .ibpt-ultima { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--text-secondary); }
body .ibpt-ultima:empty { display: none; }
body .ibpt-ultima + table,
body .ibpt-ultima + .dataTables_wrapper { margin-top: 12px; }
body .ibpt-anterior { color: var(--text-secondary); margin-right: 4px; }
body .ibpt-mudou { font-weight: 600; }
.max-date { width: 126px !important; }

/* ───────────────────────── DASH (index2.html do Gentelella) — SPEC-dash.md ─────────────────────────
 * Grid próprio (dash-grid) para não colidir com o .row/.col-* do Bootstrap 3. */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-light);
    min-height: 44px;
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text); }
.card-subtitle { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.dash-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.dash-col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-col-4-8 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1200px) { .dash-col-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .dash-col-4-8 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) { .dash-col-4 { grid-template-columns: minmax(0, 1fr); } }

/* cards de indicador (stat) */
a.dash-stat { display: block; color: inherit; text-decoration: none; transition: border-color 150ms, box-shadow 150ms, transform 150ms; }
a.dash-stat:hover, a.dash-stat:focus { color: inherit; text-decoration: none; border-color: rgba(26,187,156,0.45); box-shadow: 0 0 0 3px var(--primary-lt), var(--shadow); transform: translateY(-1px); }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; }
.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 17px;
}
.stat-icon.teal { background: var(--primary-lt); color: var(--primary); }
.stat-icon.blue { background: var(--blue-lt); color: var(--blue); }
.stat-icon.green { background: var(--green-lt); color: var(--green); }
.stat-icon.yellow { background: var(--yellow-lt); color: var(--yellow); }
.stat-icon.red { background: var(--red-lt); color: var(--red); }
.stat-icon.purple { background: var(--purple-lt); color: var(--purple); }
.stat-content { flex: 1; min-width: 0; }
.stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-value-row { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; }
.stat-value { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.stat-value.data { font-size: 16px; letter-spacing: -0.2px; }
.stat-value.texto { font-size: 15px; letter-spacing: -0.2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.stat-change { font-size: 11px; font-weight: 600; white-space: nowrap; }
.stat-change.ok { color: var(--green); }
.stat-change.atencao { color: #b45309; }
[data-theme="dark"] .stat-change.atencao { color: var(--yellow); }
.stat-change.alerta { color: var(--red); }
.stat-change.neutro { color: var(--text-muted); }
.stat-subtext { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-spark { display: flex; align-items: flex-end; gap: 2px; height: 28px; flex-shrink: 0; }
.stat-spark .bar { width: 3px; border-radius: 2px; background: var(--red); opacity: 0.3; }
.stat-spark .bar:nth-child(odd) { opacity: 0.45; }
.stat-spark .bar:last-child { opacity: 0.9; }

/* card "Ao vivo" */
.dash-live .card-body { padding: 10px 16px 16px; }
.live-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--green); letter-spacing: 0.3px; }
.live-badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: tb-pulse 1.6s infinite; }
a.live-main { display: inline-block; font-size: 42px; font-weight: 700; letter-spacing: -1px; line-height: 1; color: var(--text); text-decoration: none; }
a.live-main:hover { color: var(--primary); text-decoration: none; }
.live-legend { font-size: 11.5px; color: var(--text-muted); margin: 4px 0 14px; }
/* dois números lado a lado no card Informações: conectados hoje + tarefas destinadas a mim (SPEC-tarefas-modal-tags.md, 4.6) */
/* mesmas 2 colunas e gap do .live-grid: o 2º número alinha com a coluna da direita (Lojas, Versão Revolution…);
   legendas em uma linha, sem reticências */
.live-destaques { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.live-destaque { min-width: 0; container-type: inline-size; }
/* coluna estreita (card de 1/3 em tela pouco acima de 1100px): a fonte diminui para caber na largura; o máximo é o 11.5px normal */
.live-destaques .live-legend { white-space: nowrap; font-size: min(11.5px, 7.9cqi); }
.live-legend-destaque { font-weight: 600; color: var(--primary); }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 11.5px; }
.live-grid-sep { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color-light); }
.live-grid a { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.live-grid a:hover .v { color: var(--primary); }
.live-grid .k { color: var(--text-muted); }
.live-grid .v { color: var(--text); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-grid .idade { font-size: 10.5px; font-weight: 600; }
.live-grid .idade.ok, .dash-diff.ok { color: var(--green); }
.live-grid .idade.atencao { color: #b45309; }
[data-theme="dark"] .live-grid .idade.atencao { color: var(--yellow); }
.live-grid .idade.alerta, .dash-diff.alerta { color: var(--red); }
/* selo curto quando hoje ainda não tem dados (SPEC-login-loading-tema, D1): não quebra linha nem aumenta o card */
.dash-selo { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--bg-surface-secondary); color: var(--text-muted); font-size: 10.5px; font-weight: 600; line-height: 16px; white-space: nowrap; vertical-align: 1px; cursor: help; }

/* gráfico de logs */
.dash-chart .card-body { padding: 8px 12px 10px; }
.dash-chart-area { width: 100%; height: 260px; } /* sem cursor de link: só o botão "Ver logs" abre a tela de Log */
/* antes das 08:00 o comparativo ainda não começou (SPEC-kanban.md, seção 11, D15) */
.dash-chart-area.dash-chart-vazio { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-muted); }

/* ───────────────────────── BOTÃO OUTLINE (nome do Gentelella: btn-outline) ───────────────────────── */
.btn-outline {
    color: var(--text-secondary);
    background: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}
.btn-outline:hover, .btn-outline:focus, .btn-outline:active, .btn-outline.active {
    color: var(--text);
    background: var(--bg-surface-secondary);
    border-color: var(--border-color);
}

/* ───────────────────────── VIEW CLIENTE (SPEC-dash-layout, seção 10) ─────────────────────────
 * Popup do propSpan (matriz/filiais) no padrão menu-panel do Gentelella e controles dos modais
 * (classe gtl-modal) no padrão da seção Forms: form-label, file-input, input-affix, switch. */
@keyframes menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.easy-popup-box { display: none !important; } /* fonte do conteúdo; o painel visível é o .easy-popup-panel */
.easy-comportamento-multilinha { white-space: pre-wrap; word-wrap: break-word; }
.easy-popup-panel {
    position: fixed;
    z-index: 1060;
    width: 340px;
    max-width: calc(100vw - 16px);
    max-height: min(70vh, 460px);
    overflow-y: auto;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    animation: menu-in 140ms cubic-bezier(0.2, 0, 0, 1);
}
.easy-popup-panel[hidden] { display: none; }
.easy-popup-panel .easy-matrix-section {
    padding: 12px 14px;
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-color-light);
}
.easy-popup-panel .easy-matrix-section::before {
    content: "Matriz";
    display: block;
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.easy-popup-panel .easy-matrix-name { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.easy-popup-panel .easy-matrix-cnpj { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.easy-popup-panel .easy-branches-title {
    margin: 0;
    padding: 10px 14px 4px;
    border: 0;
    font-family: var(--font);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.easy-popup-panel .easy-popup-list { list-style: none; margin: 0; padding: 0 0 6px; }
.easy-popup-panel .easy-popup-list li { padding: 8px 14px; border-top: 1px solid var(--border-color-light); color: var(--text); }
.easy-popup-panel .easy-popup-list li:first-child { border-top: 0; }
.easy-popup-panel .easy-popup-list li span { color: var(--text-muted); font-weight: 500; font-size: 11.5px; }
.easy-popup-panel .easy-popup-list li b.text-info { color: var(--text-secondary); font-family: var(--font-mono); font-weight: 500; font-size: 12px; }
.easy-popup-panel .easy-popup-list li .easy-comportamento-multilinha b { font-weight: 500; color: var(--text); }

/* modais da view Cliente */
.gtl-modal .modal-body label:not(.file-input):not(.error):not(.input-group-addon):not(.input-group-check),
.gtl-modal .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}
.gtl-modal .form-help { margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }
.gtl-modal label.error { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 500; color: var(--red); }
.gtl-modal .modal-subtitle { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.gtl-modal .modal-subtitle code { padding: 0; background: none; color: var(--text-secondary); font-size: 12px; }
.gtl-modal .modal-footer .btn + .btn { margin-left: 6px; }
/* botões ADD/EDIT das linhas de inclusão: alinhados com os campos (descontam a altura do rótulo) */
.gtl-modal .form-group-btn { padding-top: 23px; white-space: nowrap; }

/* avisos (toast) no lugar do alert() (SPEC-padrao-visual, D2) — Scripts/gentelella-avisos.js */
.aviso-area {
    position: fixed;
    right: 20px;
    bottom: 88px; /* acima do botão do chat */
    z-index: 1090;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}
.aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: max-content;
    max-width: min(380px, calc(100vw - 32px));
    padding: 10px 10px 10px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--azure);
    border-radius: var(--radius);
    box-shadow: var(--shadow-modal);
    pointer-events: auto;
    animation: aviso-entra 160ms cubic-bezier(0.2, 0, 0, 1);
}
.aviso > i { margin-top: 2px; font-size: 14px; color: var(--azure); }
.aviso-texto { flex: 1; min-width: 0; white-space: pre-line; word-wrap: break-word; }
.aviso-fechar {
    flex-shrink: 0;
    width: 22px; height: 22px;
    margin: -2px 0 0;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.aviso-fechar:hover { color: var(--text); background: var(--bg-surface-secondary); }
.aviso-success { border-left-color: var(--green); } .aviso-success > i { color: var(--green); }
.aviso-danger { border-left-color: var(--red); } .aviso-danger > i { color: var(--red); }
.aviso-warning { border-left-color: var(--yellow); } .aviso-warning > i { color: var(--yellow); }
.aviso.saindo { opacity: 0; transform: translateY(4px); transition: opacity 180ms, transform 180ms; }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) {
    .aviso-area { left: 16px; right: 16px; align-items: stretch; }
    .aviso { width: auto; max-width: none; }
}

/* todos os modais no padrão do modal de certificado (SPEC-padrao-visual, 4.4): conteúdo antigo dentro do gtl-modal */
.gtl-modal .modal-header .modal-titulo { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.1px; color: var(--text); }
.gtl-modal .modal-text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.gtl-modal .modal-body > .modal-text + .modal-text, .gtl-modal .modal-body span + .modal-text { margin-top: 8px; }
.gtl-modal .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.gtl-modal .modal-footer .btn + .btn { margin-left: 0; }
.gtl-modal .modal-footer:empty { display: none; }
/* títulos de seção (h4/h3 antigos) dentro do corpo */
.gtl-modal .modal-body h3,
.gtl-modal .modal-body h4 {
    margin: 18px 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.gtl-modal .modal-body > h3:first-child,
.gtl-modal .modal-body > h4:first-child { margin-top: 0; }
.gtl-modal .modal-body h3.text-danger, .gtl-modal .modal-body h4.text-danger { color: var(--red); }
/* no logError o .modal-title do corpo é o texto do erro (preenchido pelo JS), não um título */
.gtl-modal .modal-body h4.modal-title {
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--red);
}
.gtl-modal .modal-body h4 input[type="checkbox"] { margin: 0 0 0 6px; vertical-align: middle; }
/* blocos de texto/log (pre, .b-1, .i-f das views de plugin e de log) */
.gtl-modal .modal-body pre,
.gtl-modal .modal-body .b-1,
.gtl-modal .modal-body .i-f,
.gtl-modal .modal-body .area-txt {
    margin: 0;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius);
}
.gtl-modal .modal-body .options { margin-top: 4px; }
.gtl-modal .modal-body img.b-1 { padding: 4px; background: var(--bg-surface); max-width: 100%; }
.gtl-modal .modal-body .alert { display: flex; gap: 8px; align-items: flex-start; }
.gtl-modal .modal-body .alert > i { margin-top: 2px; }
/* tabela dentro do modal (Ativações, Máquinas, Execuções, Pesquisa Ibpt) */
.gtl-modal .modal-tabela { overflow-x: auto; }
.gtl-modal .modal-body .nav-pills { margin-bottom: 4px; }
.gtl-modal .modal-body .tab-content > .tab-pane > hr:first-child { margin-top: 12px; }
/* modais de tela cheia continuam de tela cheia, com o cabeçalho fixo no padrão */
.gtl-modal .modal-dialog-max .modal-content { border-radius: 0; border: 0; }
.gtl-modal .modal-dialog-max .modal-body { padding: 18px 24px; }

/* checkbox → switch do Gentelella (só CSS; o input continua o mesmo) */
.gtl-modal input[type="checkbox"].form-check-input {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    display: block;
    width: 34px;
    height: 20px;
    margin: 7px 0 0;
    border-radius: 999px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
}
.gtl-modal input[type="checkbox"].form-check-input::before {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,0.25);
    transition: transform 150ms;
}
.gtl-modal input[type="checkbox"].form-check-input:checked { background: var(--primary); border-color: var(--primary-dk); }
.gtl-modal input[type="checkbox"].form-check-input:checked::before { transform: translateX(14px); }
.gtl-modal input[type="checkbox"].form-check-input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* bootstrap-select com o visual do form-control */
.gtl-modal .bootstrap-select { width: 100% !important; }
.gtl-modal .bootstrap-select > .btn.dropdown-toggle {
    height: 34px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: none;
}
.gtl-modal .bootstrap-select > .btn.dropdown-toggle:focus,
.gtl-modal .bootstrap-select.open > .btn.dropdown-toggle { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); outline: none; }
.gtl-modal .bootstrap-select .bs-searchbox .form-control { height: 32px; }

/* upload no padrão file-input do Gentelella (form.html); o input fica "visível" para o jquery.validate */
.file-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 34px;
    margin: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    font-weight: 400;
    transition: border-color 150ms, box-shadow 150ms;
}
.file-input:hover { border-color: var(--text-muted); }
.file-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lt); }
.file-input-trigger {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-surface-secondary);
    border-right: 1px solid var(--border-color);
}
.file-input-name { flex: 1; min-width: 0; padding: 0 10px; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-input.tem-arquivo .file-input-name { color: var(--text); }
.file-input input[type="file"] { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; }

/* senha com mostrar/ocultar (input-affix do Gentelella) */
.input-affix { position: relative; }
.input-affix .form-control { padding-right: 38px; }
.input-affix-btn {
    position: absolute;
    top: 1px; right: 1px; bottom: 1px;
    width: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
}
.input-affix-btn:hover { color: var(--text); background: var(--bg-surface-secondary); }

/* modal do certificado */
.gtl-modal .cert-card { margin-bottom: 18px; box-shadow: none; }
.gtl-modal .cert-card .card-header { padding: 10px 14px; min-height: 0; }
.gtl-modal .cert-card .card-body { padding: 14px 14px 4px; }
.gtl-modal .cert-actions { display: flex; gap: 6px; }
.gtl-modal .cert-actions .hidden { display: none !important; }
.gtl-modal .form-control-multilinha { height: auto; min-height: 60px; white-space: pre-wrap; word-wrap: break-word; background: var(--bg-surface-secondary); color: var(--text-secondary); }
.gtl-modal .cert-upload-title { margin: 2px 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }

/* ───────────────────────── CHAT (Scripts/gentelella-chat.js) ─────────────────────────
 * Adaptado de src/scss/v4/_apps.scss (chat.html) do Gentelella: a página de 2 colunas
 * vira um painel flutuante de 2 telas (conversas → conversa). Tudo com escopo em .gchat. */
.gchat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1040;
    width: 52px; height: 52px;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 21px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(26,187,156,0.35), 0 2px 6px rgba(15,23,42,0.15);
    cursor: pointer;
    transition: transform 150ms, background 150ms;
}
.gchat-launcher:hover { background: var(--primary-dk); transform: translateY(-2px); }
.gchat-launcher.active { background: var(--primary-dk); }
.gchat-count {
    position: absolute;
    top: -2px; right: -2px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    border: 2px solid var(--body-bg);
    background: var(--red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}
.gchat-count[hidden] { display: none; }

.gchat-panel {
    position: fixed;
    right: 24px;
    bottom: 88px;
    z-index: 1040;
    width: 360px;
    height: 520px;
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    overflow: hidden;
    color: var(--text);
    font-family: var(--font);
}
.gchat-panel[hidden], .gchat-view[hidden] { display: none; }
.gchat-view { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

.gchat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color-light);
    flex-shrink: 0;
}
.gchat-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.2; }
.gchat-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.gchat .chat-rail-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color-light);
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 13px;
}
.gchat .chat-rail-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    box-shadow: none;
}
.gchat .chat-rail-search input::placeholder { color: var(--text-disabled); }

.gchat .chat-conversations { flex: 1 1 auto; overflow-y: auto; }
.gchat .chat-conversation {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color-light);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: background 100ms;
}
.gchat .chat-conversation:hover { background: var(--bg-surface-secondary); }
.gchat .av {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.gchat .av.av-grupo { background: var(--primary-lt); color: var(--primary); font-size: 14px; }
.gchat .chat-conversation .info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gchat .gchat-row { display: flex; justify-content: space-between; gap: 8px; }
.gchat .chat-conversation .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gchat .chat-conversation .name small { color: var(--text-muted); font-weight: normal; font-size: 11px; }
.gchat .gchat-typing { font-size: 11px; color: var(--primary); font-style: italic; min-height: 0; }
.gchat .gchat-typing:empty { display: none; }
.gchat .chat-conversation .unread {
    flex-shrink: 0;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.5;
}
.gchat-vazio { padding: 24px 16px; text-align: center; font-size: 12px; color: var(--text-muted); }

.gchat .chat-thread-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 10px;
    border-bottom: 1px solid var(--border-color-light);
    flex-shrink: 0;
}
.gchat .chat-thread-peer { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.gchat .gchat-peer-info { min-width: 0; }
.gchat .chat-thread-peer .name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gchat .chat-thread-peer .presence { font-size: 11px; color: var(--text-muted); margin-top: 2px; min-height: 14px; }
.gchat .chat-thread-peer .presence.typing { color: var(--primary); font-style: italic; }

.gchat .chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-surface-secondary);
}
.gchat .chat-bubble { display: flex; flex-direction: column; max-width: 80%; }
.gchat .chat-bubble.theirs { align-items: flex-start; align-self: flex-start; }
.gchat .chat-bubble.mine { align-items: flex-end; align-self: flex-end; }
.gchat .chat-bubble .bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.gchat .chat-bubble.theirs .bubble {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}
.gchat .chat-bubble.mine .bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.gchat .chat-bubble .meta { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; padding: 0 4px; }

.gchat .chat-composer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color-light);
    flex-shrink: 0;
    background: var(--bg-surface);
}
.gchat .chat-composer input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-surface-secondary);
    font: inherit;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color 120ms, box-shadow 120ms;
}
.gchat .chat-composer input:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-lt);
}
.gchat .composer-send { height: 34px; padding: 0 12px; border-radius: 17px; display: inline-flex; align-items: center; gap: 6px; }

/* ── anexos e resposta citando (SPEC-chat-anexos.md, 4.4) ── */
.gchat .gchat-thread { position: relative; }
.gchat .gchat-arquivos { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gchat .gchat-anexar { flex-shrink: 0; }
.gchat .gchat-linha { display: flex; align-items: center; gap: 4px; max-width: 100%; }
.gchat .chat-bubble.mine .gchat-linha { flex-direction: row-reverse; }
.gchat .chat-bubble .bubble { min-width: 0; cursor: pointer; }
.gchat .gchat-responder {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    opacity: 0;
    cursor: pointer;
    transition: opacity 120ms;
}
.gchat .chat-bubble:hover .gchat-responder,
.gchat .gchat-responder:focus-visible { opacity: 1; }
.gchat .gchat-responder:hover { background: var(--bg-surface); color: var(--primary); }
@media (hover: none) { .gchat .gchat-responder { opacity: 1; } }
.gchat .chat-bubble.is-destaque .bubble { box-shadow: 0 0 0 3px var(--primary-lt); }
.gchat .gchat-texto { display: block; }

/* trecho citado no topo do balão */
.gchat .gchat-citacao {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 0 6px;
    padding: 4px 8px;
    border: 0;
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    background: var(--bg-surface-secondary);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.gchat .chat-bubble.mine .gchat-citacao { background: rgba(0, 0, 0, 0.14); border-left-color: var(--bg-surface); color: inherit; }
.gchat .gchat-citacao-autor { font-size: 11px; font-weight: 600; color: var(--primary); }
.gchat .chat-bubble.mine .gchat-citacao-autor { color: inherit; }
.gchat .gchat-citacao-resumo {
    font-size: 11.5px;
    opacity: 0.9;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
}

/* arquivo no balão: imagem como miniatura, os outros como cartão */
.gchat .bubble.com-anexo { padding: 6px; }
.gchat .bubble.com-anexo .gchat-texto { padding: 6px 6px 2px; }
.gchat .gchat-anexo-img { display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--bg-surface-secondary); cursor: zoom-in; }
.gchat .gchat-anexo-img img { display: block; max-width: 220px; max-height: 220px; width: auto; height: auto; object-fit: cover; }
.gchat .gchat-arquivo,
.gchat .gchat-fila-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gchat .gchat-arquivo { padding: 6px; border-radius: 10px; background: var(--bg-surface-secondary); color: var(--text); }
.gchat .chat-bubble.mine .gchat-arquivo { background: rgba(0, 0, 0, 0.14); color: inherit; }
.gchat .gchat-arquivo-sigla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.gchat .gchat-arquivo-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.gchat .gchat-arquivo-nome { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gchat .gchat-arquivo-tamanho { font-size: 11px; opacity: 0.8; }
.gchat .gchat-arquivo-baixar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
}
.gchat .gchat-arquivo-baixar:hover { background: var(--bg-surface); color: var(--primary); text-decoration: none; }

/* citação em andamento e arquivos escolhidos, acima da caixa */
.gchat .gchat-citando,
.gchat .gchat-fila { flex-shrink: 0; margin: 0; padding: 8px 12px 0; background: var(--bg-surface); border-top: 1px solid var(--border-color-light); }
.gchat .gchat-citando { display: flex; align-items: center; gap: 8px; }
.gchat .gchat-citando-texto {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px 8px;
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    background: var(--bg-surface-secondary);
    cursor: pointer;
}
.gchat .gchat-citando-autor { font-size: 11px; font-weight: 600; color: var(--primary); }
.gchat .gchat-citando-resumo { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gchat .gchat-fila { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 140px; overflow-y: auto; }
.gchat .gchat-fila + .chat-composer, .gchat .gchat-citando + .gchat-fila { border-top: 0; }
.gchat .gchat-progresso { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--border-color-light); overflow: hidden; }
.gchat .gchat-progresso > span { display: block; width: 0; height: 100%; background: var(--primary); transition: width 120ms; }
.gchat .gchat-citando[hidden], .gchat .gchat-fila[hidden] { display: none; }

/* arrastar e soltar sobre a conversa */
.gchat .gchat-soltar {
    position: absolute;
    inset: 56px 8px 8px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    background: var(--primary-lt);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}
.gchat .gchat-thread.is-soltando .gchat-soltar { display: flex; }

/* imagem ampliada */
.gchat-visualizador {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.82);
    outline: none;
}
.gchat-visualizador[hidden] { display: none; }
.gchat-visualizador-barra { display: flex; align-items: center; gap: 8px; max-width: 90vw; }
.gchat-visualizador-nome { margin-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 13px; font-weight: 600; } /* fundo sempre escuro */
.gchat-visualizador-barra .btn { background: var(--bg-surface); }
.gchat-visualizador img { max-width: 90vw; max-height: calc(90vh - 48px); border-radius: var(--radius); box-shadow: var(--shadow-modal); background: var(--bg-surface); }

@media (max-width: 576px) {
    .gchat-panel { right: 0; bottom: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
    .gchat-launcher { right: 16px; bottom: 16px; }
    .gchat-launcher.active { display: none; }
}

/* ───────────────────────── PLUGINS ───────────────────────── */
.bootstrap-datetimepicker-widget.dropdown-menu { background: var(--bg-surface); }
.bootstrap-datetimepicker-widget table td.active, .bootstrap-datetimepicker-widget table td.active:hover { background-color: var(--primary); }
.bootstrap-datetimepicker-widget table td.day:hover, .bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover, .bootstrap-datetimepicker-widget table td span:hover { background: var(--bg-surface-secondary); }

/* ───────────────────────── LOADING ENTRE PÁGINAS (SPEC-login-loading-tema, 4.3) ───────────────────────── */
/* spinner do Gentelella (.spinner do _components.scss), com outro nome para não colidir com o .spinner do NProgress */
.gtl-spinner {
    display: inline-block;
    width: 36px; height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: tb-girar 700ms linear infinite;
}
.btn-spinner {
    display: inline-block;
    width: 12px; height: 12px;
    border: 1.5px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: tb-girar 700ms linear infinite;
}
.carregando-pagina {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* fundo "nevoado": a tela de trás aparece desfocada, com a cor do tema (SPEC-login-loading-tema, seção 10) */
    background: rgba(245,247,251,0.9);
    background: color-mix(in srgb, var(--body-bg) 55%, transparent);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
    backdrop-filter: blur(6px) saturate(1.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .carregando-pagina { background: color-mix(in srgb, var(--body-bg) 90%, transparent); }
}
.carregando-cartao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal, var(--shadow));
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
}
html.carregando .carregando-pagina {
    visibility: visible;
    pointer-events: auto;
    cursor: progress;
    animation: carregando-aparece 160ms ease var(--carregando-atraso, 0ms) both;
}
/* página nova depois de uma navegação: já nasce visível, sem novo fade de entrada (D10) */
html.carregando.carregando-continua .carregando-pagina { animation: none; opacity: 1; }
html.carregando-fim .carregando-pagina {
    visibility: visible;
    animation: carregando-some 200ms ease both;
}
@keyframes carregando-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes carregando-some { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    html.carregando .carregando-pagina, html.carregando-fim .carregando-pagina { animation-duration: 1ms; }
    .gtl-spinner, .btn-spinner { animation-duration: 1.6s; }
}

/* ───────────────────────── TELA TEMA (SPEC-login-loading-tema, 4.4 — modelo theme.html) ───────────────────────── */
.banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    background: var(--primary-lt);
    border: 1px solid var(--border-translucent);
    font-size: 13px;
    color: var(--text);
}
.banner.banner-info { background: var(--blue-lt); border-color: rgba(6,111,209,0.22); }
.banner-icon { flex-shrink: 0; color: var(--primary); }
.banner.banner-info .banner-icon { color: var(--blue); }
.banner-body { flex: 1; min-width: 0; }
.banner-body strong { color: var(--text); }
.banner-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 576px) { .banner { flex-wrap: wrap; } .banner-actions { width: 100%; } }

.segmented { display: inline-flex; flex-wrap: wrap; background: var(--bg-surface-secondary); border-radius: var(--radius); padding: 3px; gap: 2px; }
.segmented label { position: relative; margin: 0; font-size: 12px; font-weight: 500; color: var(--text-muted); padding: 6px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: background 120ms, color 120ms; }
.segmented label:hover { color: var(--text); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--bg-surface); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 0 0 1px var(--border-translucent); }
.segmented label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-lt); }

input[type="range"].slider { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; padding: 0; background: var(--border-color); border: 0; border-radius: 2px; outline: none; }
input[type="range"].slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg-surface); box-shadow: 0 0 0 1px var(--primary), 0 1px 3px rgba(0,0,0,0.15); cursor: pointer; }
input[type="range"].slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg-surface); box-shadow: 0 0 0 1px var(--primary), 0 1px 3px rgba(0,0,0,0.15); cursor: pointer; }
input[type="range"].slider:focus-visible { box-shadow: 0 0 0 3px var(--primary-lt); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: normal; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; flex-shrink: 0; width: 36px; height: 20px; background: var(--border-color); border-radius: 999px; transition: background 150ms; }
.switch .track::before { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.16); transition: transform 150ms; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::before { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--primary-lt); }
.switch .switch-label { font-size: 13px; color: var(--text); }
/* switch desabilitado (ex.: a própria linha na tela Admin, SPEC-admin-logins.md, 4.3) */
.switch input:disabled + .track { opacity: 0.5; }
.switch.desabilitado { cursor: not-allowed; }
.switch.desabilitado .switch-label { color: var(--text-muted); }

/* tela Admin (SPEC-admin-logins.md, 4.4): switch + selo na mesma célula, sem quebrar; erro do e-mail no form-help */
.admin-situacao { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.table .switch .switch-label { font-size: 12px; }
.has-error .form-help { color: var(--red); }

.tema-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tema-controles { display: flex; flex-direction: column; gap: 16px; }
.tema-controles .card, .tema-previa .card { margin: 0; }
.tema-cores { display: flex; flex-wrap: wrap; gap: 8px; }
.tema-cor { width: 28px; height: 28px; padding: 0; border: 2px solid var(--bg-surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--border-color); cursor: pointer; transition: transform 120ms, box-shadow 120ms; }
.tema-cor:hover { transform: scale(1.08); }
.tema-cor.active { box-shadow: 0 0 0 2px var(--text); }
.tema-cor:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-lt), 0 0 0 1px var(--primary); }
.tema-cor-livre { display: flex; gap: 8px; }
.tema-cor-livre input[type="color"] { width: 42px; height: 34px; padding: 0; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); cursor: pointer; flex-shrink: 0; }
.tema-cor-livre .form-control { flex: 1; font-family: var(--font-mono); font-size: 12.5px; }
.tema-rotulo-valor { display: flex; justify-content: space-between; }
.tema-rotulo-valor span { color: var(--text-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.tema-geometria { display: flex; flex-direction: column; gap: 14px; }
.tema-previa .card-body { display: flex; flex-direction: column; gap: 18px; }
.tema-secao { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-bottom: 8px; }
.tema-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tema-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: center; }
.tema-grafico { height: 200px; border: 1px solid var(--border-color-light); border-radius: var(--radius-sm); padding: 8px; }
.tema-grafico > div { width: 100%; height: 100%; }
.tema-stat { max-width: 340px; }
.tema-exemplo { font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
.tema-tabela { margin: 0; border: 1px solid var(--border-color-light); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 992px) { .tema-layout { grid-template-columns: minmax(0, 1fr); } }

/* ───────────────────────── SINO DE NOTIFICAÇÕES (SPEC-tarefas-notificacoes.md, 4.5) ─────────────────────────
 * Modelo tb-notifications do Gentelella v4: botão do topo ao lado do tema, contador e painel com as não visualizadas.
 * As vistas no painel ficam esmaecidas até o painel fechar (D4). Só tokens do tema (claro e escuro). */
.tb-notif { position: relative; display: inline-flex; }
.tb-notif-btn { position: relative; }
.tb-notif-btn.active { background: var(--body-bg); color: var(--text); }
.tb-notif-count {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg-surface);
    pointer-events: none;
}
.tb-notif-count[hidden] { display: none; }
.tb-notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: -40px;
    z-index: 1040;
    width: 360px;
    max-width: calc(100vw - 16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text);
    box-shadow: var(--shadow-modal);
    animation: menu-in 140ms cubic-bezier(0.2, 0, 0, 1);
}
.tb-notif-panel[hidden] { display: none; }
.tb-notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color-light);
}
.tb-notif-title { font-size: 14px; font-weight: 600; }
.tb-notif-todas { padding: 0; border: 0; background: none; color: var(--primary); font-size: 12px; font-weight: 500; }
.tb-notif-todas:hover, .tb-notif-todas:focus-visible { text-decoration: underline; outline: none; }
.tb-notif-todas[hidden] { display: none; }
.tb-notif-list { max-height: min(420px, 60vh); margin: 0; padding: 4px; overflow-y: auto; list-style: none; }
.tb-notif-item { transition: opacity 300ms; }
.tb-notif-item.is-vista { opacity: 0.45; }
.tb-notif-link {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    text-align: left;
}
.tb-notif-link:hover, .tb-notif-link:focus-visible { background: var(--bg-surface-secondary); outline: none; }
.tb-notif-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-lt);
    color: var(--primary);
    font-size: 13px;
}
.tb-notif-tipo-2 { background: var(--blue-lt); color: var(--blue); }
.tb-notif-tipo-3 { background: var(--purple-lt); color: var(--purple); }
.tb-notif-corpo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-notif-item-titulo { font-size: 13px; font-weight: 600; }
.tb-notif-resumo {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.tb-notif-meta { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-notif-vazio { padding: 24px 12px; font-size: 13px; color: var(--text-muted); text-align: center; }
@media (max-width: 600px) {
    .tb-notif { position: static; }
    .tb-notif-panel { position: fixed; top: 56px; right: 8px; left: 8px; width: auto; }
}
