/* ==========================================================================
   EquipControl — Tema visual
   Bootstrap 5.3 + variáveis próprias, com suporte a modo claro/escuro.
   ========================================================================== */

:root {
    --app-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --app-primary: #4f46e5;
    --app-primary-600: #4338ca;
    --app-primary-rgb: 79, 70, 229;
    --app-accent: #06b6d4;
    --app-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #06b6d4 120%);

    --app-bg: #f4f6fb;
    --app-surface: #ffffff;
    --app-surface-2: #f8fafc;
    --app-border: #e6e9f2;
    --app-text: #1e293b;
    --app-muted: #64748b;
    --app-heading: #0f172a;

    --app-sidebar-bg: #0f1629;
    --app-sidebar-bg-2: #141d36;
    --app-sidebar-text: #a3adc6;
    --app-sidebar-text-strong: #ffffff;
    --app-sidebar-hover: rgba(255, 255, 255, .06);
    --app-sidebar-width: 268px;
    --app-sidebar-collapsed: 84px;
    --app-topbar-h: 68px;

    --app-radius: 16px;
    --app-radius-sm: 10px;
    --app-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --app-shadow: 0 4px 24px -6px rgba(15, 23, 42, .10), 0 2px 6px -2px rgba(15, 23, 42, .05);
    --app-shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, .25);

    /* Paleta de status (texto / fundo) */
    --st-success: #059669; --st-success-bg: #d1fae5;
    --st-primary: #4338ca; --st-primary-bg: #e0e7ff;
    --st-warning: #b45309; --st-warning-bg: #fef3c7;
    --st-info: #0369a1;    --st-info-bg: #e0f2fe;
    --st-orange: #c2410c;  --st-orange-bg: #ffedd5;
    --st-teal: #0f766e;    --st-teal-bg: #ccfbf1;
    --st-purple: #7e22ce;  --st-purple-bg: #f3e8ff;
    --st-secondary: #475569; --st-secondary-bg: #e2e8f0;
    --st-danger: #b91c1c;  --st-danger-bg: #fee2e2;

    --bs-body-font-family: var(--app-font);
    --bs-primary: var(--app-primary);
    --bs-primary-rgb: var(--app-primary-rgb);
    --bs-link-color: var(--app-primary);
    --bs-link-color-rgb: var(--app-primary-rgb);
    --bs-link-hover-color: var(--app-primary-600);
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 14px;
}

[data-bs-theme="dark"] {
    --app-bg: #0b1120;
    --app-surface: #111a2e;
    --app-surface-2: #0f172a;
    --app-border: #1f2a44;
    --app-text: #cbd5e1;
    --app-muted: #8391ab;
    --app-heading: #f1f5f9;
    --app-sidebar-bg: #0a0f1d;
    --app-sidebar-bg-2: #0d1426;
    --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --app-shadow: 0 4px 24px -6px rgba(0, 0, 0, .45);

    --st-success: #34d399; --st-success-bg: rgba(16, 185, 129, .15);
    --st-primary: #a5b4fc; --st-primary-bg: rgba(99, 102, 241, .18);
    --st-warning: #fbbf24; --st-warning-bg: rgba(245, 158, 11, .15);
    --st-info: #7dd3fc;    --st-info-bg: rgba(14, 165, 233, .15);
    --st-orange: #fdba74;  --st-orange-bg: rgba(249, 115, 22, .15);
    --st-teal: #5eead4;    --st-teal-bg: rgba(20, 184, 166, .15);
    --st-purple: #d8b4fe;  --st-purple-bg: rgba(168, 85, 247, .16);
    --st-secondary: #94a3b8; --st-secondary-bg: rgba(148, 163, 184, .15);
    --st-danger: #fca5a5;  --st-danger-bg: rgba(239, 68, 68, .15);

    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--app-text);
    --bs-border-color: var(--app-border);
    --bs-secondary-bg: var(--app-surface-2);
    --bs-tertiary-bg: var(--app-surface-2);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html, body { height: 100%; }

body {
    font-family: var(--app-font);
    background: var(--app-bg);
    color: var(--app-text);
    font-size: .925rem;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--app-heading);
    font-weight: 700;
    letter-spacing: -.015em;
}

a { text-decoration: none; }
.text-muted, .text-secondary { color: var(--app-muted) !important; }
.fw-semibold { font-weight: 600 !important; }
.small-caps { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--app-muted); }

::selection { background: rgba(var(--app-primary-rgb), .18); }

/* Scrollbar discreta */
* { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, .35) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 8px; }

/* --------------------------------------------------------------------------
   Estrutura: sidebar + conteúdo
   -------------------------------------------------------------------------- */
.app-shell { min-height: 100vh; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--app-sidebar-width);
    background:
        radial-gradient(600px 300px at -10% -10%, rgba(124, 58, 237, .28), transparent 60%),
        radial-gradient(500px 300px at 120% 110%, rgba(6, 182, 212, .14), transparent 60%),
        linear-gradient(180deg, var(--app-sidebar-bg) 0%, var(--app-sidebar-bg-2) 100%);
    color: var(--app-sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width .25s ease, transform .25s ease;
    border-right: 1px solid rgba(255, 255, 255, .04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: var(--app-topbar-h);
    padding: 0 1.35rem;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-brand:hover { color: #fff; }
.brand-logo {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--app-gradient);
    box-shadow: 0 8px 20px -6px rgba(124, 58, 237, .7);
    flex-shrink: 0;
}
.brand-logo svg { width: 22px; height: 22px; }
.brand-text { line-height: 1.1; white-space: nowrap; overflow: hidden; }
.brand-text strong { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text small { font-size: .7rem; color: var(--app-sidebar-text); letter-spacing: .04em; }

.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .5rem .85rem 1rem; }

.sidebar-section {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    color: rgba(163, 173, 198, .55);
    padding: 1.1rem .75rem .45rem;
    white-space: nowrap;
}

.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav .nav-item { margin-bottom: 2px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .62rem .8rem;
    border-radius: 11px;
    color: var(--app-sidebar-text);
    font-weight: 500;
    font-size: .9rem;
    white-space: nowrap;
    position: relative;
    transition: background .15s, color .15s;
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
}
.sidebar-link > i:first-child { font-size: 1.1rem; width: 1.25rem; text-align: center; flex-shrink: 0; }
.sidebar-link:hover { background: var(--app-sidebar-hover); color: var(--app-sidebar-text-strong); }
.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, .95), rgba(124, 58, 237, .9));
    box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .9), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.sidebar-link.open:not(.active) { color: #fff; }
.sidebar-link .chevron { margin-left: auto; font-size: .75rem; transition: transform .2s; }
.sidebar-link[aria-expanded="true"] .chevron { transform: rotate(90deg); }

.sidebar-sub { list-style: none; padding: .25rem 0 .35rem 2.15rem; margin: 0; position: relative; }
.sidebar-sub::before {
    content: ""; position: absolute; left: 1.42rem; top: .35rem; bottom: .55rem;
    width: 1px; background: rgba(255, 255, 255, .09);
}
.sidebar-sub a {
    display: block;
    padding: .42rem .75rem;
    border-radius: 8px;
    color: var(--app-sidebar-text);
    font-size: .855rem;
    position: relative;
    white-space: nowrap;
}
.sidebar-sub a::before {
    content: ""; position: absolute; left: -.78rem; top: 50%;
    width: 7px; height: 7px; border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--app-sidebar-bg-2);
    border: 1.5px solid rgba(255, 255, 255, .2);
}
.sidebar-sub a:hover { color: #fff; background: var(--app-sidebar-hover); }
.sidebar-sub a.active { color: #fff; font-weight: 600; }
.sidebar-sub a.active::before { background: var(--app-accent); border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(6, 182, 212, .2); }

.sidebar-footer { padding: .85rem; border-top: 1px solid rgba(255, 255, 255, .06); flex-shrink: 0; }
.sidebar-user {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem; border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    white-space: nowrap; overflow: hidden;
}
.sidebar-user .meta { line-height: 1.2; overflow: hidden; }
.sidebar-user .meta strong { color: #fff; font-size: .85rem; display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .meta small { font-size: .72rem; }

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

/* Sidebar recolhida (desktop) */
@media (min-width: 992px) {
    body.sidebar-collapsed .app-sidebar { width: var(--app-sidebar-collapsed); }
    body.sidebar-collapsed .app-main { margin-left: var(--app-sidebar-collapsed); }
    body.sidebar-collapsed .brand-text,
    body.sidebar-collapsed .sidebar-section,
    body.sidebar-collapsed .sidebar-link span,
    body.sidebar-collapsed .sidebar-link .chevron,
    body.sidebar-collapsed .sidebar-sub,
    body.sidebar-collapsed .sidebar-user .meta { display: none !important; }
    body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
    body.sidebar-collapsed .sidebar-link { justify-content: center; padding: .7rem; }
    body.sidebar-collapsed .sidebar-user { justify-content: center; background: none; }
    body.sidebar-collapsed .sidebar-section { height: 1px; padding: 0; margin: .8rem .5rem; background: rgba(255,255,255,.07); }
}

/* Mobile: sidebar como gaveta */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); box-shadow: var(--app-shadow-lg); }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-backdrop {
        position: fixed; inset: 0; z-index: 1035;
        background: rgba(2, 6, 23, .5);
        backdrop-filter: blur(2px);
        opacity: 0; visibility: hidden; transition: opacity .2s;
    }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    body.sidebar-open { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.app-topbar {
    position: sticky; top: 0; z-index: 1020;
    height: var(--app-topbar-h);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.75rem;
    background: color-mix(in srgb, var(--app-bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 70%, transparent);
}

.btn-icon {
    width: 40px; height: 40px;
    display: inline-grid; place-items: center;
    border-radius: 11px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-muted);
    transition: all .15s;
    position: relative;
    padding: 0;
}
.btn-icon:hover { color: var(--app-primary); border-color: rgba(var(--app-primary-rgb), .35); background: var(--app-surface); }
.btn-icon .indicator {
    position: absolute; top: 8px; right: 9px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #f43f5e; border: 2px solid var(--app-surface);
}

.topbar-search { position: relative; max-width: 420px; flex: 1; }
.topbar-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--app-muted); }
.topbar-search .form-control {
    padding-left: 2.5rem; height: 40px;
    border-radius: 11px;
    background: var(--app-surface);
    border-color: var(--app-border);
}
.topbar-search kbd {
    position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
    font-size: .68rem; background: var(--app-surface-2); color: var(--app-muted);
    border: 1px solid var(--app-border); box-shadow: none; padding: .15rem .4rem;
}

.avatar {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: inline-grid; place-items: center;
    font-weight: 700; font-size: .8rem; color: #fff;
    background: var(--app-gradient);
    flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; border-radius: 9px; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; border-radius: 14px; }

.user-menu-toggle {
    display: flex; align-items: center; gap: .65rem;
    padding: .25rem .5rem .25rem .25rem;
    border-radius: 13px; border: 1px solid transparent;
    background: none; color: var(--app-text);
}
.user-menu-toggle:hover { background: var(--app-surface); border-color: var(--app-border); }
.user-menu-toggle .meta { line-height: 1.15; text-align: left; }
.user-menu-toggle .meta strong { font-size: .85rem; display: block; color: var(--app-heading); }
.user-menu-toggle .meta small { font-size: .72rem; color: var(--app-muted); }

.dropdown-menu {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: var(--app-shadow-lg);
    padding: .45rem;
    background: var(--app-surface);
    font-size: .9rem;
}
.dropdown-item { border-radius: 9px; padding: .5rem .75rem; display: flex; align-items: center; gap: .6rem; color: var(--app-text); }
.dropdown-item i { color: var(--app-muted); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--app-surface-2); color: var(--app-heading); }
.dropdown-item.text-danger i { color: inherit; }

/* --------------------------------------------------------------------------
   Conteúdo
   -------------------------------------------------------------------------- */
.app-content { padding: 1.75rem; flex: 1; }
.app-content > .container-fluid { max-width: 1520px; padding: 0; }

.page-header {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.6rem;
}
.page-title { font-size: 1.55rem; margin: 0; }
.page-subtitle { color: var(--app-muted); margin: .2rem 0 0; }

.breadcrumb { font-size: .8rem; margin-bottom: .45rem; --bs-breadcrumb-divider: "›"; }
.breadcrumb-item a { color: var(--app-muted); }
.breadcrumb-item a:hover { color: var(--app-primary); }
.breadcrumb-item.active { color: var(--app-heading); font-weight: 500; }

.app-footer {
    padding: 1.1rem 1.75rem;
    color: var(--app-muted);
    font-size: .8rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    --bs-card-bg: var(--app-surface);
    --bs-card-border-color: var(--app-border);
    --bs-card-border-radius: var(--app-radius);
    --bs-card-inner-border-radius: calc(var(--app-radius) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-y: 1.35rem;
    --bs-card-spacer-x: 1.4rem;
    box-shadow: var(--app-shadow-sm);
}
.card-header {
    border-bottom: 1px solid var(--app-border);
    padding: 1.05rem 1.4rem;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.card-title { font-size: 1rem; margin: 0; font-weight: 650; color: var(--app-heading); }
.card-subtitle { font-size: .8rem; color: var(--app-muted); margin-top: .15rem; }
.card-footer { background: transparent; border-top: 1px solid var(--app-border); padding: .9rem 1.4rem; }
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--app-shadow); }

/* Cartões de indicador */
.stat-card { position: relative; overflow: hidden; }
.stat-card .card-body { display: flex; flex-direction: column; gap: .9rem; }
.stat-card .stat-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-icon {
    width: 46px; height: 46px; border-radius: 13px;
    display: grid; place-items: center; font-size: 1.3rem;
}
.stat-label { font-size: .82rem; color: var(--app-muted); font-weight: 500; }
.stat-value { font-size: 1.85rem; font-weight: 750; color: var(--app-heading); letter-spacing: -.03em; line-height: 1; }
.stat-trend { font-size: .76rem; font-weight: 600; padding: .2rem .5rem; border-radius: 20px; }
.stat-card::after {
    content: ""; position: absolute; right: -40px; bottom: -40px;
    width: 130px; height: 130px; border-radius: 50%;
    background: currentColor; opacity: .04; pointer-events: none;
}

.tone-primary { color: var(--st-primary); } .bg-tone-primary { background: var(--st-primary-bg); color: var(--st-primary); }
.tone-success { color: var(--st-success); } .bg-tone-success { background: var(--st-success-bg); color: var(--st-success); }
.tone-warning { color: var(--st-warning); } .bg-tone-warning { background: var(--st-warning-bg); color: var(--st-warning); }
.tone-info    { color: var(--st-info); }    .bg-tone-info    { background: var(--st-info-bg); color: var(--st-info); }
.tone-orange  { color: var(--st-orange); }  .bg-tone-orange  { background: var(--st-orange-bg); color: var(--st-orange); }
.tone-teal    { color: var(--st-teal); }    .bg-tone-teal    { background: var(--st-teal-bg); color: var(--st-teal); }
.tone-purple  { color: var(--st-purple); }  .bg-tone-purple  { background: var(--st-purple-bg); color: var(--st-purple); }
.tone-danger  { color: var(--st-danger); }  .bg-tone-danger  { background: var(--st-danger-bg); color: var(--st-danger); }
.tone-secondary { color: var(--st-secondary); } .bg-tone-secondary { background: var(--st-secondary-bg); color: var(--st-secondary); }

/* Banner de boas-vindas */
.hero-card {
    position: relative; overflow: hidden;
    border: 0; color: #fff;
    background: var(--app-gradient);
    box-shadow: 0 18px 40px -18px rgba(79, 70, 229, .75);
}
.hero-card::before, .hero-card::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}
.hero-card::before { width: 280px; height: 280px; right: -60px; top: -120px; }
.hero-card::after { width: 180px; height: 180px; right: 160px; bottom: -110px; }
.hero-card h2 { color: #fff; font-size: 1.45rem; }
.hero-card p { color: rgba(255, 255, 255, .85); }
.hero-card .btn-light { color: var(--app-primary-600); font-weight: 600; }
.hero-card .btn-outline-light { border-color: rgba(255, 255, 255, .45); }
.hero-illustration { position: absolute; right: 2rem; bottom: -6px; opacity: .95; z-index: 1; }

/* --------------------------------------------------------------------------
   Badges de status
   -------------------------------------------------------------------------- */
.badge-status {
    display: inline-flex; align-items: center; gap: .38rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .74rem; font-weight: 600;
    line-height: 1.1; white-space: nowrap;
}
.badge-status i { font-size: .8rem; }
.badge-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status-success   { background: var(--st-success-bg);   color: var(--st-success); }
.badge-status-primary   { background: var(--st-primary-bg);   color: var(--st-primary); }
.badge-status-warning   { background: var(--st-warning-bg);   color: var(--st-warning); }
.badge-status-info      { background: var(--st-info-bg);      color: var(--st-info); }
.badge-status-orange    { background: var(--st-orange-bg);    color: var(--st-orange); }
.badge-status-teal      { background: var(--st-teal-bg);      color: var(--st-teal); }
.badge-status-purple    { background: var(--st-purple-bg);    color: var(--st-purple); }
.badge-status-secondary { background: var(--st-secondary-bg); color: var(--st-secondary); }
.badge-status-danger    { background: var(--st-danger-bg);    color: var(--st-danger); }

.badge-soft { font-weight: 600; padding: .35em .6em; border-radius: 7px; }

/* --------------------------------------------------------------------------
   Tabelas
   -------------------------------------------------------------------------- */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    --bs-table-border-color: var(--app-border);
    --bs-table-hover-bg: color-mix(in srgb, var(--app-primary) 4%, transparent);
    margin-bottom: 0;
    vertical-align: middle;
}
.table > thead th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--app-muted); font-weight: 600;
    background: var(--app-surface-2);
    border-bottom: 1px solid var(--app-border);
    padding: .8rem 1rem; white-space: nowrap;
}
.table > tbody td { padding: .9rem 1rem; border-color: var(--app-border); }
.table > tbody tr:last-child td { border-bottom: 0; }
.table-card { border-radius: var(--app-radius); overflow: hidden; }
.table .cell-title { font-weight: 600; color: var(--app-heading); display: block; }
.table .cell-sub { font-size: .78rem; color: var(--app-muted); white-space: nowrap; }
.table .equip-icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--app-surface-2); border: 1px solid var(--app-border); color: var(--app-primary); font-size: 1.1rem;
}
.font-mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }

/* --------------------------------------------------------------------------
   Formulários e botões
   -------------------------------------------------------------------------- */
.form-label { font-weight: 600; font-size: .82rem; color: var(--app-heading); margin-bottom: .4rem; }
.form-label .req { color: #e11d48; margin-left: 2px; }
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--app-border);
    background-color: var(--app-surface);
    padding: .6rem .85rem;
    font-size: .9rem;
    color: var(--app-text);
}
.form-control:focus, .form-select:focus {
    border-color: rgba(var(--app-primary-rgb), .6);
    box-shadow: 0 0 0 4px rgba(var(--app-primary-rgb), .12);
}
.form-control::placeholder { color: #a0aec0; }
.form-text { color: var(--app-muted); font-size: .78rem; }
.input-group-text { background: var(--app-surface-2); border-color: var(--app-border); color: var(--app-muted); border-radius: 10px; }
.form-section-title { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.form-section-title i { color: var(--app-primary); }

.btn { font-weight: 600; border-radius: 10px; padding: .55rem 1.05rem; font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: .75rem 1.4rem; font-size: .95rem; }
.btn-primary {
    --bs-btn-bg: var(--app-primary); --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-600); --bs-btn-hover-border-color: var(--app-primary-600);
    --bs-btn-active-bg: var(--app-primary-600); --bs-btn-active-border-color: var(--app-primary-600);
    --bs-btn-disabled-bg: var(--app-primary); --bs-btn-disabled-border-color: var(--app-primary);
    box-shadow: 0 6px 16px -6px rgba(var(--app-primary-rgb), .7);
}
.btn-gradient { background: var(--app-gradient); color: #fff; border: 0; box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .8); }
.btn-gradient:hover { color: #fff; filter: brightness(1.07); }
.btn-light-soft { background: var(--app-surface); border: 1px solid var(--app-border); color: var(--app-text); }
.btn-light-soft:hover { border-color: rgba(var(--app-primary-rgb), .4); color: var(--app-primary); background: var(--app-surface); }
.btn-soft-primary { background: var(--st-primary-bg); color: var(--st-primary); border: 0; }
.btn-soft-primary:hover { background: var(--app-primary); color: #fff; }
.btn-soft-danger { background: var(--st-danger-bg); color: var(--st-danger); border: 0; }
.btn-soft-danger:hover { background: #dc2626; color: #fff; }

/* --------------------------------------------------------------------------
   Alertas, toasts e modais
   -------------------------------------------------------------------------- */
.alert { border-radius: 12px; border: 1px solid transparent; display: flex; gap: .75rem; align-items: flex-start; }
.alert > i { font-size: 1.15rem; line-height: 1.3; }
.alert-success { background: var(--st-success-bg); color: var(--st-success); border-color: color-mix(in srgb, var(--st-success) 20%, transparent); }
.alert-danger  { background: var(--st-danger-bg);  color: var(--st-danger);  border-color: color-mix(in srgb, var(--st-danger) 20%, transparent); }
.alert-warning { background: var(--st-warning-bg); color: var(--st-warning); border-color: color-mix(in srgb, var(--st-warning) 20%, transparent); }
.alert-info    { background: var(--st-info-bg);    color: var(--st-info);    border-color: color-mix(in srgb, var(--st-info) 20%, transparent); }

.toast-container { z-index: 1090; }
.app-toast {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 14px;
    box-shadow: var(--app-shadow-lg);
    min-width: 320px;
    overflow: hidden;
}
.app-toast .toast-body { display: flex; gap: .8rem; align-items: flex-start; padding: .95rem 1rem; }
.app-toast .toast-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.05rem; }
.app-toast .toast-progress { height: 3px; background: currentColor; opacity: .55; animation: toast-progress 5s linear forwards; }
@keyframes toast-progress { from { width: 100%; } to { width: 0; } }

.modal-content { border: 0; border-radius: 18px; box-shadow: var(--app-shadow-lg); background: var(--app-surface); }
.modal-header { border-bottom: 1px solid var(--app-border); padding: 1.1rem 1.4rem; }
.modal-body { padding: 1.4rem; }
.modal-footer { border-top: 1px solid var(--app-border); padding: .9rem 1.4rem; }
.modal-backdrop.show { opacity: .55; }
.modal-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 1rem; }

/* --------------------------------------------------------------------------
   Paginação
   -------------------------------------------------------------------------- */
.pagination { gap: .3rem; margin: 0; }
.page-link {
    border-radius: 9px !important; border: 1px solid var(--app-border);
    color: var(--app-text); min-width: 36px; height: 36px;
    display: grid; place-items: center; padding: 0 .65rem; font-size: .85rem; font-weight: 500;
    background: var(--app-surface);
}
.page-link:hover { color: var(--app-primary); background: var(--app-surface-2); border-color: var(--app-border); }
.page-item.active .page-link { background: var(--app-primary); border-color: var(--app-primary); color: #fff; box-shadow: 0 6px 14px -6px rgba(var(--app-primary-rgb), .8); }
.page-item.disabled .page-link { background: var(--app-surface); color: var(--app-muted); opacity: .6; }

/* --------------------------------------------------------------------------
   Diversos
   -------------------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--app-border); }
.check-list li:last-child { border-bottom: 0; }
.check-list .check-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }

.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .empty-icon {
    width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 1rem;
    display: grid; place-items: center; font-size: 2rem;
    background: var(--st-primary-bg); color: var(--st-primary);
}

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--app-border); }
.timeline li { position: relative; padding-left: 3.1rem; padding-bottom: 1.3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .tl-icon {
    position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 11px;
    display: grid; place-items: center; font-size: .95rem; border: 3px solid var(--app-surface);
}
.timeline .tl-title { font-weight: 600; color: var(--app-heading); font-size: .88rem; }
.timeline .tl-meta { font-size: .76rem; color: var(--app-muted); }

.chart-box { position: relative; height: 290px; }
.chart-box-sm { position: relative; height: 230px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: .45rem; }

.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--app-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--app-border); }

/* Páginas mínimas (erros) */
.minimal-page {
    min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
    background:
        radial-gradient(800px 400px at 10% 0%, rgba(124, 58, 237, .12), transparent 60%),
        radial-gradient(700px 400px at 100% 100%, rgba(6, 182, 212, .12), transparent 60%),
        var(--app-bg);
}
.error-code {
    font-size: clamp(5rem, 14vw, 8.5rem); font-weight: 800; line-height: 1; letter-spacing: -.05em;
    background: var(--app-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Animação de entrada suave */
.fade-up { animation: fade-up .45s ease both; }
.fade-up-2 { animation-delay: .06s; } .fade-up-3 { animation-delay: .12s; } .fade-up-4 { animation-delay: .18s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsivo */
@media (max-width: 767.98px) {
    .app-content { padding: 1.1rem; }
    .app-topbar { padding: 0 1rem; }
    .page-title { font-size: 1.3rem; }
    .stat-value { font-size: 1.55rem; }
    .hero-illustration { display: none; }
    .app-footer { padding: 1rem; }
    .user-menu-toggle .meta { display: none; }
}

/* Impressão (relatórios) */
@media print {
    .app-sidebar, .app-topbar, .app-footer, .no-print, .toast-container { display: none !important; }
    .app-main { margin: 0 !important; }
    .app-content { padding: 0; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* --------------------------------------------------------------------------
   Stepper do reparo
   -------------------------------------------------------------------------- */
.stepper { display: flex; gap: .25rem; position: relative; overflow-x: auto; padding-bottom: .25rem; }
.step { flex: 1; min-width: 96px; text-align: center; position: relative; }
.step::before {
    content: ""; position: absolute; top: 19px; left: calc(-50% + 22px); right: calc(50% + 22px);
    height: 3px; border-radius: 3px; background: var(--app-border);
}
.step:first-child::before { display: none; }
.step-done::before, .step-current::before { background: linear-gradient(90deg, var(--app-primary), #7c3aed); }
.step-dot {
    width: 40px; height: 40px; border-radius: 13px; margin: 0 auto .5rem;
    display: grid; place-items: center; font-size: 1rem;
    background: var(--app-surface-2); color: var(--app-muted); border: 2px solid var(--app-border);
    position: relative; z-index: 1; transition: all .2s;
}
.step-done .step-dot { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }
.step-current .step-dot {
    background: var(--app-gradient); border-color: transparent; color: #fff;
    box-shadow: 0 0 0 5px rgba(var(--app-primary-rgb), .15), 0 8px 18px -6px rgba(124, 58, 237, .7);
}
.step-label { font-size: .78rem; font-weight: 600; color: var(--app-heading); }
.step-todo .step-label { color: var(--app-muted); font-weight: 500; }
.step-date { font-size: .68rem; color: var(--app-muted); }

/* Lista de definição (detalhes) */
.detail-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.detail-list dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--app-muted); font-weight: 600; margin-bottom: .2rem; }
.detail-list dd { margin: 0; color: var(--app-heading); font-weight: 500; word-break: break-word; }
.detail-block { background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 12px; padding: .9rem 1rem; white-space: pre-line; }

.equip-hero-icon {
    width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem;
    background: var(--app-gradient); color: #fff; box-shadow: 0 12px 26px -10px rgba(124, 58, 237, .75); flex-shrink: 0;
}

/* Kanban da bancada */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban-col { background: color-mix(in srgb, var(--app-surface-2) 70%, transparent); border: 1px solid var(--app-border); border-radius: var(--app-radius); padding: .8rem; min-height: 200px; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: .2rem .3rem .8rem; }
.kanban-head h3 { font-size: .85rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.kanban-card {
    display: block; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 12px;
    padding: .8rem .9rem; margin-bottom: .6rem; color: var(--app-text); box-shadow: var(--app-shadow-sm);
    transition: transform .15s, box-shadow .15s, border-color .15s; border-left: 3px solid var(--kc, var(--app-primary));
}
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--app-shadow); color: var(--app-text); }
.kanban-card .kc-title { font-weight: 600; color: var(--app-heading); font-size: .88rem; }
.kanban-card .kc-meta { font-size: .74rem; color: var(--app-muted); }

/* Upload */
.dropzone { border: 2px dashed var(--app-border); border-radius: 14px; padding: 1.1rem; text-align: center; background: var(--app-surface-2); transition: border-color .15s; }
.dropzone:hover { border-color: rgba(var(--app-primary-rgb), .5); }
.anexo-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--app-border); border-radius: 12px; background: var(--app-surface); color: var(--app-text); }
.anexo-item:hover { border-color: rgba(var(--app-primary-rgb), .4); color: var(--app-primary); }
.anexo-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--app-surface-2); display: grid; place-items: center; flex-shrink: 0; }

/* Relatórios */
.report-card { display: flex; gap: 1rem; align-items: flex-start; color: var(--app-text); height: 100%; }
.report-card:hover { color: var(--app-text); }
.print-header { display: none; }
@media print {
    .print-header { display: block; margin-bottom: 1rem; }
    .table > thead th { background: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================================
   Helpdesk
   ========================================================================== */
.badge-prio { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 7px; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.badge-prio-baixa   { background: var(--st-secondary-bg); color: var(--st-secondary); }
.badge-prio-media   { background: var(--st-info-bg); color: var(--st-info); }
.badge-prio-alta    { background: var(--st-warning-bg); color: var(--st-warning); }
.badge-prio-critica { background: var(--st-danger-bg); color: var(--st-danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st-danger) 30%, transparent); }

.sla-mini { min-width: 150px; font-size: .72rem; color: var(--app-muted); }
.sla-mini .fw-semibold { color: var(--tom); }
.sla-track { height: 5px; border-radius: 5px; background: var(--app-border); margin-top: .3rem; overflow: hidden; }
.sla-fill { height: 100%; border-radius: 5px; background: var(--tom); transition: width .4s; }
.sla-success { --tom: var(--st-success); } .sla-warning { --tom: var(--st-warning); } .sla-danger { --tom: var(--st-danger); }
.sla-secondary { --tom: var(--st-secondary); } .sla-teal { --tom: var(--st-teal); }

.sla-card { border-radius: 14px; padding: 1rem 1.1rem; border: 1px solid var(--app-border); background: var(--app-surface-2); }
.sla-card .sla-track { height: 8px; margin: .6rem 0 .4rem; }
.sla-card .sla-titulo { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--app-muted); }
.sla-card .sla-estado { font-weight: 700; color: var(--tom); font-size: 1rem; }

.estrelas { color: #f59e0b; letter-spacing: 1px; white-space: nowrap; }

/* Conversa do chamado */
.conversa { display: flex; flex-direction: column; gap: 1rem; }
.msg { display: flex; gap: .75rem; max-width: 92%; }
.msg .msg-corpo { border-radius: 4px 16px 16px 16px; padding: .85rem 1rem; background: var(--app-surface); border: 1px solid var(--app-border); box-shadow: var(--app-shadow-sm); min-width: 0; }
.msg .msg-meta { font-size: .74rem; color: var(--app-muted); margin-bottom: .3rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.msg .msg-meta strong { color: var(--app-heading); font-size: .82rem; }
.msg .msg-texto { white-space: pre-wrap; word-break: break-word; font-size: .9rem; color: var(--app-text); }
.msg-atendente { align-self: flex-end; flex-direction: row-reverse; }
.msg-atendente .msg-corpo { border-radius: 16px 4px 16px 16px; background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface)); border-color: color-mix(in srgb, var(--app-primary) 22%, var(--app-border)); }
.msg-interna .msg-corpo { background: color-mix(in srgb, #f59e0b 10%, var(--app-surface)); border: 1px dashed color-mix(in srgb, #f59e0b 55%, transparent); }
.msg-evento { align-self: center; max-width: 100%; font-size: .76rem; color: var(--app-muted); background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 999px; padding: .3rem .85rem; text-align: center; }
.msg-evento i { color: var(--app-primary); }
.msg-anexos { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.msg-anexos a { font-size: .76rem; border: 1px solid var(--app-border); border-radius: 8px; padding: .25rem .55rem; background: var(--app-surface); }

.reply-tabs .nav-link { font-size: .85rem; font-weight: 600; color: var(--app-muted); border-radius: 9px; padding: .45rem .85rem; }
.reply-tabs .nav-link.active { background: var(--st-primary-bg); color: var(--st-primary); }
.reply-tabs .nav-link.interna.active { background: var(--st-warning-bg); color: var(--st-warning); }
.reply-box.modo-interna textarea { background: color-mix(in srgb, #f59e0b 6%, var(--app-surface)); border-color: color-mix(in srgb, #f59e0b 45%, var(--app-border)); }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--app-border); font-size: .85rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list li > span:first-child { color: var(--app-muted); white-space: nowrap; }
.info-list li > span:last-child { text-align: right; font-weight: 500; color: var(--app-heading); min-width: 0; word-break: break-word; }

.tabs-chamados { gap: .35rem; flex-wrap: nowrap; overflow-x: auto; }
.tabs-chamados .nav-link { border-radius: 10px; color: var(--app-muted); font-weight: 600; font-size: .86rem; white-space: nowrap; display: flex; align-items: center; gap: .45rem; padding: .5rem .9rem; }
.tabs-chamados .nav-link:hover { background: var(--app-surface); color: var(--app-heading); }
.tabs-chamados .nav-link.active { background: var(--app-surface); color: var(--app-primary); box-shadow: var(--app-shadow-sm); border: 1px solid var(--app-border); }
.tabs-chamados .contador { font-size: .7rem; background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 20px; padding: .05rem .45rem; color: var(--app-muted); }
.tabs-chamados .nav-link.active .contador { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }

.cat-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.cat-picker input { position: absolute; opacity: 0; pointer-events: none; }
.cat-picker label { display: flex; gap: .65rem; align-items: center; border: 1px solid var(--app-border); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; background: var(--app-surface); font-size: .85rem; font-weight: 600; color: var(--app-heading); height: 100%; transition: all .15s; }
.cat-picker label i { font-size: 1.15rem; color: var(--app-primary); }
.cat-picker label:hover { border-color: rgba(var(--app-primary-rgb), .45); }
.cat-picker input:checked + label { border-color: var(--app-primary); background: var(--st-primary-bg); box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), .12); }
.cat-picker input:focus-visible + label { outline: 2px solid var(--app-primary); }

.prio-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.prio-picker input { position: absolute; opacity: 0; pointer-events: none; }
.prio-picker label { text-align: center; border: 1px solid var(--app-border); border-radius: 12px; padding: .65rem .3rem; cursor: pointer; font-weight: 700; font-size: .82rem; background: var(--app-surface); }
.prio-picker label small { display: block; font-weight: 500; color: var(--app-muted); font-size: .68rem; margin-top: .15rem; }
.prio-picker input:checked + label.p-baixa   { border-color: var(--st-secondary); background: var(--st-secondary-bg); color: var(--st-secondary); }
.prio-picker input:checked + label.p-media   { border-color: var(--st-info); background: var(--st-info-bg); color: var(--st-info); }
.prio-picker input:checked + label.p-alta    { border-color: var(--st-warning); background: var(--st-warning-bg); color: var(--st-warning); }
.prio-picker input:checked + label.p-critica { border-color: var(--st-danger); background: var(--st-danger-bg); color: var(--st-danger); }

.sugestoes-kb { border: 1px solid color-mix(in srgb, var(--app-primary) 25%, var(--app-border)); background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface)); border-radius: 14px; padding: .9rem 1rem; }
.sugestoes-kb a { display: block; padding: .4rem 0; border-bottom: 1px dashed var(--app-border); }
.sugestoes-kb a:last-child { border-bottom: 0; }

.sla-matriz th, .sla-matriz td { vertical-align: middle; }
.sla-matriz input { max-width: 110px; }

.artigo-conteudo { font-size: .95rem; line-height: 1.7; color: var(--app-text); }
.artigo-conteudo ul { padding-left: 1.2rem; }
.artigo-conteudo li { margin-bottom: .3rem; }
.artigo-conteudo code { background: var(--st-warning-bg); color: var(--st-warning); padding: .1rem .35rem; border-radius: 5px; }

/* Sino de notificações */
.notif-menu { width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--app-border); }
.notif-item { display: flex; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--app-border); color: var(--app-text); position: relative; }
.notif-item:hover { background: var(--app-surface-2); color: var(--app-text); }
.notif-item.nao-lida { background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface)); }
.notif-item.nao-lida::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--app-primary); transform: translateY(-50%); }
.notif-item .ni-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.notif-item .ni-titulo { font-size: .84rem; font-weight: 600; color: var(--app-heading); line-height: 1.3; }
.notif-item .ni-msg { font-size: .76rem; color: var(--app-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item .ni-tempo { font-size: .7rem; color: var(--app-muted); margin-top: .15rem; }
.btn-icon .badge-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: #f43f5e; color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--app-bg); }

/* ---------- Notificações (página) e Base de conhecimento ---------- */
.notif-nao-lida { background: rgba(var(--app-primary-rgb), .04); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--app-primary); align-self: center; flex-shrink: 0; }
.kb-hero { background: linear-gradient(135deg, rgba(var(--app-primary-rgb), .12), rgba(124, 58, 237, .10)); border-radius: 18px; padding: 2rem 1.5rem; }
.kb-hero .form-control { height: 52px; border-radius: 14px; padding-left: 2.8rem; font-size: 1rem; }
.kb-hero .kb-search { position: relative; max-width: 640px; }
.kb-hero .kb-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--app-muted); font-size: 1.1rem; }
.kb-cat { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--app-border); background: var(--app-surface); font-size: .8rem; color: var(--app-text); }
.kb-cat.active, .kb-cat:hover { border-color: var(--app-primary); color: var(--app-primary); background: var(--st-primary-bg); }
.kb-card { display: block; height: 100%; color: inherit; }
.kb-card:hover .kb-title { color: var(--app-primary); }
.kb-title { font-weight: 600; color: var(--app-heading); }
.kb-meta { font-size: .75rem; color: var(--app-muted); display: flex; flex-wrap: wrap; gap: .75rem; }
.equipe-membros { display: flex; flex-wrap: wrap; gap: .35rem; }
.membro-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem .2rem .25rem; border-radius: 999px; background: var(--app-surface-2); border: 1px solid var(--app-border); font-size: .76rem; }
.membro-chip .avatar { width: 22px; height: 22px; font-size: .62rem; border-radius: 50%; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.check-card { position: relative; }
.check-card input { position: absolute; opacity: 0; pointer-events: none; }
.check-card label { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--app-border); border-radius: 12px; cursor: pointer; background: var(--app-surface); transition: all .15s; font-size: .85rem; }
.check-card label .ck { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--app-border); display: grid; place-items: center; flex-shrink: 0; color: transparent; font-size: .75rem; }
.check-card input:checked + label { border-color: var(--app-primary); background: var(--st-primary-bg); }
.check-card input:checked + label .ck { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }
.check-card input:focus-visible + label { outline: 2px solid var(--app-primary); }
.check-card.oculto { display: none; }
.opcao-radio { position: relative; }
.opcao-radio input { position: absolute; opacity: 0; pointer-events: none; }
.opcao-radio label { display: block; height: 100%; padding: .8rem .9rem; border: 1px solid var(--app-border); border-radius: 14px; cursor: pointer; background: var(--app-surface); transition: all .15s; }
.opcao-radio label strong { display: flex; align-items: center; gap: .4rem; font-size: .88rem; }
.opcao-radio label small { display: block; color: var(--app-muted); font-size: .75rem; margin-top: .2rem; }
.opcao-radio input:checked + label { border-color: var(--app-primary); background: var(--st-primary-bg); box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), .12); }
.opcao-radio input:focus-visible + label { outline: 2px solid var(--app-primary); }
.expediente-tabela td, .expediente-tabela th { vertical-align: middle; }
.expediente-tabela input[type=time] { min-width: 105px; }
.expediente-tabela tr.inativo input[type=time] { opacity: .4; }
.sla-mini span { white-space: nowrap; }
