/* ==========================================================
   GURUINFO TI - ENTERPRISE DESIGN SYSTEM
   Modern Corporate IT Service Desk & Analytics Platform
   ========================================================== */

:root {
    /* Brand & Accent Tokens */
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-primary-light: rgba(37, 99, 235, 0.08);
    --brand-cyber: #0284c7;
    --brand-indigo: #4f46e5;
    --brand-dark: #0f172a;
    --whatsapp-color: #25d366;
    --whatsapp-hover: #128c7e;
    
    /* Light Mode Surfaces (Clean Executive Slate - High Contrast & True Depth) */
    --surface-bg: #e2e8f0;
    --surface-card: #ffffff;
    --surface: #ffffff;
    --surface-sub: #f1f5f9;
    --surface-hover: #e2e8f0;
    --border-color: #94a3b8;
    --border-hover: #64748b;
    --border-glow: rgba(29, 78, 216, 0.28);
    --input-border: #64748b;
    --input-border-hover: #1e293b;
    
    /* Typography */
    --text-main: #020617;
    --text-sub: #1e293b;
    --text-muted: #334155;
    --input-bg: #ffffff;
    --ticket-bg: #ffffff;
    
    /* Status Colors (Rich Corporate Tones) */
    --danger: #b91c1c;
    --danger-hover: #991b1b;
    --danger-bg: rgba(185, 28, 28, 0.10);
    --warning: #b45309;
    --warning-hover: #92400e;
    --warning-bg: rgba(180, 83, 9, 0.10);
    --success: #047857;
    --success-hover: #065f46;
    --success-bg: rgba(4, 120, 87, 0.10);
    --info: #0369a1;
    --info-bg: rgba(3, 105, 161, 0.10);
    
    /* Enterprise Multi-Layer Shadows (High Definition) */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.12), 0 2px 6px -1px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.14), 0 2px 6px -1px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 20px -3px rgba(15, 23, 42, 0.16), 0 4px 8px -4px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    --glow-accent: 0 0 16px rgba(29, 78, 216, 0.22);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Exec Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
}

/* Dark Mode (High-Contrast Corporate Slate - Sharp, Crisp & Ultra Legible) */
body.dark-mode {
    --brand-primary: #10b981;
    --brand-primary-hover: #059669;
    --brand-primary-light: rgba(16, 185, 129, 0.15);
    --brand-cyber: #059669;
    --brand-indigo: #6366f1;
    --brand-dark: #090a0f;
    
    --surface-bg: #0f1117;
    --surface-card: #181b22;
    --surface: #181b22;
    --surface-sub: #1e222b;
    --surface-hover: #262b36;
    --border-color: #2d3340;
    --border-hover: #4b5568;
    --border-glow: rgba(16, 185, 129, 0.25);
    --input-border: #353c4d;
    --input-border-hover: #10b981;
    
    --text-main: #ffffff;
    --text-sub: #cbd5e1;
    --text-muted: #94a3b8;
    --input-bg: #12141a;
    --ticket-bg: #181b22;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --success: #10b981;
    --success-hover: #059669;
    --success-bg: rgba(16, 185, 129, 0.15);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.15);
    
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.65);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.75);
    --shadow-xl: 0 24px 44px rgba(0, 0, 0, 0.85);
    --glow-accent: 0 0 24px rgba(16, 185, 129, 0.20);
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Global Reset & Base Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html, body {
    max-width: 100vw;
    overflow-x: clip;
    width: 100%;
}

/* Anti-flicker: Oculta a tela de login imediatamente se já houver sessão autenticada em cache */
html.user-pre-authenticated #auth-screen {
    display: none !important;
}

body {
    background-color: var(--surface-bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 45%);
}

/* Custom Scrollbars (Clean, Modern & Minimalist) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* ==========================================================
   ENTERPRISE DESKMANAGER LAYOUT & FLUID WORKSPACE (FOTO 2 & 3)
   ========================================================== */
.app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--surface-bg);
    box-sizing: border-box;
    position: relative;
    overflow-x: clip;
}

/* SIDEBAR LATERAL RETRÁTIL (ESTILO DESKMANAGER) */
/* ================================================================
   ★ CYBER SIDEBAR — Barra Lateral Futurista
   ================================================================ */
/* Elementos Mobile Nativos (Ocultos por padrão no Desktop) */
.mobile-bottom-bar,
.bottom-sheet-backdrop,
.bottom-sheet-modal {
    display: none;
}

.app-sidebar {
    width: 268px;
    min-width: 268px;
    background: #ffffff;
    border-right: 1px solid var(--border-color, #cbd5e1);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 150;
    box-shadow: 2px 0 10px rgba(15, 23, 42, 0.04);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

/* Modo escuro — sidebar grafite profunda */
body.dark-mode .app-sidebar,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .app-sidebar {
    background: #0b0f19;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.45);
    background-image: none;
}

/* Topo da Sidebar */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #232732;
    min-height: 68px;
    box-sizing: border-box;
    background: transparent;
    position: relative;
}

.sidebar-header::after {
    display: none;
}

body.dark-mode .sidebar-header {
    border-bottom-color: #232732;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.sidebar-brand-logo {
    background: linear-gradient(135deg, #6366f1, #818cf8 50%, #00f5ff 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(99,102,241,0.4), 0 0 16px rgba(99,102,241,0.5), 0 0 32px rgba(0,245,255,0.15);
    flex-shrink: 0;
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(99,102,241,0.4), 0 0 16px rgba(99,102,241,0.5), 0 0 32px rgba(0,245,255,0.15); }
    50% { box-shadow: 0 0 0 2px rgba(99,102,241,0.6), 0 0 24px rgba(99,102,241,0.7), 0 0 48px rgba(0,245,255,0.25); }
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sidebar-brand-title {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #ffffff;
    white-space: nowrap;
    background: linear-gradient(90deg, #ffffff 0%, #c7d2fe 60%, #00f5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .sidebar-brand-title { color: #ffffff; }

.sidebar-brand-sub {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-toggle-btn {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 10px rgba(99,102,241,0.3);
}

.sidebar-chevron-icon {
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-close-btn {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    background: rgba(239,68,68,0.25);
    box-shadow: 0 0 10px rgba(239,68,68,0.3);
}

/* Campo de Busca Cyber */
.sidebar-search-box {
    padding: 12px 14px 6px 14px;
}

.sidebar-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 9px;
    padding: 7px 10px;
    transition: all 0.25s ease;
}

body.dark-mode .sidebar-search-wrapper { background: rgba(99,102,241,0.06); }

.sidebar-search-wrapper:focus-within {
    border-color: rgba(99,102,241,0.6);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15), 0 0 12px rgba(99,102,241,0.2);
    background: rgba(99,102,241,0.1);
}

.sidebar-search-icon {
    color: #64748b;
    flex-shrink: 0;
}

.sidebar-search-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    color: #cbd5e1;
    width: 100%;
    font-weight: 500;
}

body.dark-mode .sidebar-search-wrapper input { color: #cbd5e1; }

.sidebar-search-wrapper input::placeholder { color: #475569; }

#sidebar-clear-search {
    background: none;
    border: none;
    font-size: 1rem;
    color: #475569;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ★ NOVO: Painel de Atalhos Rápidos Deslizantes (Quick Actions) */
.sidebar-quick-actions {
    padding: 10px 12px 6px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

body.theme-light .sidebar-quick-actions,
body[data-theme="clean-executive"] .sidebar-quick-actions,
body:not(.dark-mode) .sidebar-quick-actions {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.sidebar-quick-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sidebar-quick-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

body.theme-light .sidebar-quick-title,
body:not(.dark-mode) .sidebar-quick-title {
    color: #475569;
}

.sidebar-quick-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.sidebar-quick-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    text-align: left;
}

body.theme-light .sidebar-quick-btn,
body:not(.dark-mode) .sidebar-quick-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sidebar-quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-quick-btn .quick-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-quick-btn .quick-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-quick-btn .quick-name {
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    color: #f1f5f9;
}

body.theme-light .sidebar-quick-btn .quick-name,
body:not(.dark-mode) .sidebar-quick-btn .quick-name {
    color: #0f172a;
}

.sidebar-quick-btn .quick-desc {
    font-size: 0.63rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #64748b;
    line-height: 1.1;
    margin-top: 1px;
}

/* Cores distintas para cada atalho */
.quick-chamado .quick-icon-wrap {
    background: rgba(2, 132, 199, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.quick-chamado:hover {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.12);
}

.quick-cliente .quick-icon-wrap {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
}
.quick-cliente:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.quick-orcamento .quick-icon-wrap {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.35);
}
.quick-orcamento:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.12);
}

.quick-whatsapp .quick-icon-wrap {
    background: rgba(37, 211, 102, 0.18);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.35);
}
.quick-whatsapp:hover {
    border-color: #25d366;
    background: rgba(37, 211, 102, 0.12);
}

/* Scroll da Sidebar Cyber */
.sidebar-nav-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 10px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99,102,241,0.3) transparent;
}

.sidebar-nav-scrollable::-webkit-scrollbar { width: 4px; }
.sidebar-nav-scrollable::-webkit-scrollbar-thumb {
    background: rgba(99,102,241,0.3);
    border-radius: 9999px;
}

/* ★ Seções Cyber */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: all 0.2s ease;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px 5px 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(99,102,241,0.1) 0%, rgba(99,102,241,0.03) 100%);
    border: 1px solid rgba(99,102,241,0.2);
    margin-bottom: 2px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-section-header:hover {
    background: linear-gradient(90deg, rgba(99,102,241,0.18) 0%, rgba(99,102,241,0.06) 100%);
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 12px rgba(99,102,241,0.15);
    transform: translateX(1px);
}

body.dark-mode .sidebar-section-header {
    background: linear-gradient(90deg, rgba(99,102,241,0.1) 0%, rgba(99,102,241,0.02) 100%);
    border-color: rgba(99,102,241,0.2);
}

body.dark-mode .sidebar-section-header:hover {
    background: linear-gradient(90deg, rgba(99,102,241,0.2) 0%, rgba(99,102,241,0.06) 100%);
    border-color: rgba(99,102,241,0.45);
    box-shadow: 0 0 16px rgba(99,102,241,0.2);
}

.sidebar-section-header:focus-visible {
    outline: 2px solid rgba(99,102,241,0.6);
    outline-offset: 1px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 2px 0;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6366f1;
}

body.dark-mode .sidebar-section-title {
    color: #94a3b8;
    text-shadow: none;
    font-weight: 700;
}

.sidebar-section-title svg {
    color: #94a3b8;
    filter: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

body.dark-mode .sidebar-section-title svg {
    color: #94a3b8;
    filter: none;
}

.sidebar-section-header:hover .sidebar-section-title svg { transform: scale(1.15); }

.sidebar-section-toggle {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    padding: 3px 6px;
    cursor: pointer;
    color: #818cf8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.dark-mode .sidebar-section-toggle {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.25);
    color: #818cf8;
}

.sidebar-section-header:hover .sidebar-section-toggle {
    color: #ffffff;
    background: #6366f1;
    border-color: #6366f1;
    box-shadow: 0 0 10px rgba(99,102,241,0.5);
}

body.dark-mode .sidebar-section-header:hover .sidebar-section-toggle {
    box-shadow: 0 0 14px rgba(99,102,241,0.6);
}

.sidebar-section-arrow {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transform: rotate(0deg);
}

.sidebar-section.is-collapsed .sidebar-section-arrow { transform: rotate(-90deg); }
.sidebar-section.is-collapsed .sidebar-menu-list { display: none !important; }

/* ★ Itens de Menu Cyber */
.sidebar-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

body.dark-mode .sidebar-nav-item { 
    color: #e2e8f0; 
    font-weight: 600;
}

.sidebar-nav-item::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #10b981;
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: #2d3340;
    transform: translateX(3px);
}

.sidebar-nav-item:hover::before { height: 60%; }

body.dark-mode .sidebar-nav-item:hover {
    background: #1e222b;
    color: #ffffff;
    border-color: #2d3340;
}

/* Item Ativo — Grafite com Borda Esmeralda */
.sidebar-nav-item.active {
    background: #222630 !important;
    color: #ffffff !important;
    font-weight: 700;
    border-color: #2d3340 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transform: none;
}

.sidebar-nav-item.active::before { 
    height: 70% !important; 
    background: #10b981 !important;
}

.sidebar-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.sidebar-nav-item:hover .sidebar-nav-icon,
.sidebar-nav-item.active .sidebar-nav-icon {
    filter: drop-shadow(0 0 4px rgba(99,102,241,0.6));
}

.sidebar-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ★ Badges Cyber */
.sidebar-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(99,102,241,0.1);
    color: #6366f1;
    border: 1px solid rgba(99,102,241,0.2);
    line-height: 1.4;
    min-width: 22px;
    text-align: center;
}

.sidebar-nav-item.active .sidebar-badge {
    background: rgba(255,255,255,0.15);
    color: #c7d2fe;
    border-color: rgba(165,180,252,0.3);
}

.sidebar-badge.badge-blue {
    background: rgba(0,245,255,0.1);
    color: #22d3ee;
    border-color: rgba(0,245,255,0.25);
}

.sidebar-badge.badge-red {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border-color: rgba(239,68,68,0.3);
    animation: badge-pulse-red 2s infinite;
}

@keyframes badge-pulse-red {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(239,68,68,0.5); }
}

.sidebar-action-pill {
    font-size: 0.82rem;
    font-weight: 900;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(0,245,255,0.1));
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover .sidebar-action-pill {
    background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(0,245,255,0.2));
    box-shadow: 0 0 8px rgba(99,102,241,0.4);
}

.sidebar-logout-btn:hover {
    background: rgba(239,68,68,0.12) !important;
    color: #f87171 !important;
    border-color: rgba(239,68,68,0.3) !important;
    box-shadow: 0 0 12px rgba(239,68,68,0.2) !important;
}

/* ★ Rodapé Cyber */
.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(99,102,241,0.15);
    background: rgba(99,102,241,0.04);
    box-sizing: border-box;
    position: relative;
}

.sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 14px; right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), rgba(0,245,255,0.2), transparent);
}

body.dark-mode .sidebar-footer {
    border-top-color: rgba(99,102,241,0.12);
    background: rgba(99,102,241,0.04);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(99,102,241,0.07);
    border: 1px solid rgba(99,102,241,0.18);
    transition: all 0.2s ease;
    overflow: hidden;
    cursor: pointer;
}

.sidebar-user-card:hover {
    background: rgba(99,102,241,0.14);
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 0 12px rgba(99,102,241,0.15);
}

body.dark-mode .sidebar-user-card {
    background: rgba(99,102,241,0.07);
    border-color: rgba(99,102,241,0.18);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #00f5ff);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.3), 0 0 12px rgba(99,102,241,0.3);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid rgba(99,102,241,0.4);
    transition: all 0.2s ease;
}

.sidebar-user-card:hover .sidebar-user-avatar {
    box-shadow: 0 0 0 2px rgba(99,102,241,0.5), 0 0 20px rgba(99,102,241,0.5);
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .sidebar-user-name { color: #e2e8f0; }

.sidebar-user-role {
    font-size: 0.64rem;
    font-weight: 700;
    color: #818cf8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px rgba(129,140,248,0.4);
}

/* ★ SIDEBAR COLLAPSED (Mini mode desktop >= 768px apenas) */
@media (min-width: 768px) {
    .app-layout.sidebar-collapsed .app-sidebar {
        width: 76px;
        min-width: 76px;
        max-width: 76px;
    }

    .app-layout.sidebar-collapsed .sidebar-chevron-icon { transform: rotate(180deg); }

    .app-layout.sidebar-collapsed .sidebar-brand-text,
    .app-layout.sidebar-collapsed .sidebar-search-box,
    .app-layout.sidebar-collapsed .sidebar-quick-actions,
    .app-layout.sidebar-collapsed .sidebar-section-title span,
    .app-layout.sidebar-collapsed .sidebar-section-toggle,
    .app-layout.sidebar-collapsed .sidebar-nav-label,
    .app-layout.sidebar-collapsed .sidebar-badge,
    .app-layout.sidebar-collapsed .sidebar-action-pill,
    .app-layout.sidebar-collapsed .sidebar-user-info,
    .app-layout.sidebar-collapsed .sidebar-toggle-btn { display: none !important; }

    .app-layout.sidebar-collapsed .sidebar-header { padding: 10px 6px; justify-content: center; }
    .app-layout.sidebar-collapsed .sidebar-brand { display: flex; justify-content: center; margin: 0; }
    .app-layout.sidebar-collapsed .sidebar-section-header { display: none !important; }
    .app-layout.sidebar-collapsed .sidebar-nav-scrollable {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        padding: 8px 0;
    }
    .app-layout.sidebar-collapsed .sidebar-nav-scrollable::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }
    .app-layout.sidebar-collapsed .sidebar-nav-item { justify-content: center; padding: 0; }
    .app-layout.sidebar-collapsed .sidebar-nav-item::before { display: none; }
    .app-layout.sidebar-collapsed .sidebar-user-card { justify-content: center; padding: 0; border: none; background: transparent; }
}

/* ================================================================
   ★ LIGHT THEME SIDEBAR — Barra Lateral Executiva, 100% Opaca & Clara
   Fundos sólidos, contornos corporativos e zero transparência
   ================================================================ */
html.theme-light .app-sidebar,
body.theme-light .app-sidebar,
html:not(.dark-mode) .app-sidebar,
body:not(.dark-mode) .app-sidebar,
[data-theme="clean-executive"] .app-sidebar,
[data-theme="nordic-frost"] .app-sidebar,
[data-theme="warm-sand"] .app-sidebar {
    background-color: #f1f5f9 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 40%, #edf2f7 100%) !important;
    border-right: 1.5px solid var(--border-color, #cbd5e1) !important;
    box-shadow: 3px 0 20px rgba(15, 23, 42, 0.08), inset -1px 0 0 rgba(15, 23, 42, 0.04) !important;
}

/* Customização Específica: Nordic Frost */
[data-theme="nordic-frost"] .app-sidebar {
    background-color: #f0f4f9 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 40%, #e8eef5 100%) !important;
    border-right: 1.5px solid #cbd5e1 !important;
}

/* Customização Específica: Warm Sand (Linho & Terracota) */
[data-theme="warm-sand"] .app-sidebar {
    background-color: #fbf9f5 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbf9f5 40%, #f4efe6 100%) !important;
    border-right: 1.5px solid #d6cbbe !important;
    box-shadow: 3px 0 20px rgba(41, 37, 36, 0.08), inset -1px 0 0 rgba(41, 37, 36, 0.04) !important;
}

html.theme-light .sidebar-header,
body.theme-light .sidebar-header,
html:not(.dark-mode) .sidebar-header,
body:not(.dark-mode) .sidebar-header,
[data-theme="clean-executive"] .sidebar-header,
[data-theme="nordic-frost"] .sidebar-header,
[data-theme="warm-sand"] .sidebar-header {
    background-color: #edf2f7 !important;
    background: linear-gradient(90deg, #edf2f7 0%, #f8fafc 100%) !important;
    border-bottom: 1.5px solid var(--border-color, #cbd5e1) !important;
}

[data-theme="nordic-frost"] .sidebar-header {
    background-color: #e8eef5 !important;
    background: linear-gradient(90deg, #e8eef5 0%, #f4f8fb 100%) !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
}

[data-theme="warm-sand"] .sidebar-header {
    background-color: #f4efe6 !important;
    background: linear-gradient(90deg, #f4efe6 0%, #fbf9f5 100%) !important;
    border-bottom: 1.5px solid #d6cbbe !important;
}

html.theme-light .sidebar-header::after,
body.theme-light .sidebar-header::after,
html:not(.dark-mode) .sidebar-header::after,
body:not(.dark-mode) .sidebar-header::after,
[data-theme="clean-executive"] .sidebar-header::after,
[data-theme="nordic-frost"] .sidebar-header::after,
[data-theme="warm-sand"] .sidebar-header::after {
    background: linear-gradient(90deg, transparent, var(--border-color, #cbd5e1), transparent);
}

body.theme-light .sidebar-brand-logo,
body[data-theme="clean-executive"] .sidebar-brand-logo,
body[data-theme="nordic-frost"] .sidebar-brand-logo,
body[data-theme="warm-sand"] .sidebar-brand-logo,
body:not(.dark-mode) .sidebar-brand-logo {
    background: var(--gradient-primary, linear-gradient(135deg, #2563eb, #3b82f6));
    box-shadow: 0 2px 8px var(--brand-primary-light, rgba(37, 99, 235, 0.2)), 0 0 0 1px rgba(37, 99, 235, 0.15);
    animation: none;
}

body.theme-light .sidebar-brand-title,
body[data-theme="clean-executive"] .sidebar-brand-title,
body[data-theme="nordic-frost"] .sidebar-brand-title,
body[data-theme="warm-sand"] .sidebar-brand-title,
body:not(.dark-mode) .sidebar-brand-title {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--text-main, #0f172a);
    color: var(--text-main, #0f172a);
    font-weight: 800;
}

body.theme-light .sidebar-brand-sub,
body[data-theme="clean-executive"] .sidebar-brand-sub,
body[data-theme="nordic-frost"] .sidebar-brand-sub,
body[data-theme="warm-sand"] .sidebar-brand-sub,
body:not(.dark-mode) .sidebar-brand-sub {
    color: var(--text-muted, #64748b);
}

body.theme-light .sidebar-toggle-btn,
body[data-theme="clean-executive"] .sidebar-toggle-btn,
body[data-theme="nordic-frost"] .sidebar-toggle-btn,
body[data-theme="warm-sand"] .sidebar-toggle-btn,
body:not(.dark-mode) .sidebar-toggle-btn {
    background: var(--surface-sub, #f8fafc);
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-sub, #334155);
}

body.theme-light .sidebar-toggle-btn:hover,
body[data-theme="clean-executive"] .sidebar-toggle-btn:hover,
body[data-theme="nordic-frost"] .sidebar-toggle-btn:hover,
body[data-theme="warm-sand"] .sidebar-toggle-btn:hover,
body:not(.dark-mode) .sidebar-toggle-btn:hover {
    background: var(--brand-primary-light, rgba(37, 99, 235, 0.1));
    border-color: var(--brand-primary, #2563eb);
    color: var(--brand-primary, #2563eb);
    box-shadow: 0 0 8px var(--border-glow, rgba(37, 99, 235, 0.2));
}

body.theme-light .sidebar-close-btn,
body[data-theme="clean-executive"] .sidebar-close-btn,
body[data-theme="nordic-frost"] .sidebar-close-btn,
body[data-theme="warm-sand"] .sidebar-close-btn,
body:not(.dark-mode) .sidebar-close-btn {
    background: var(--danger-bg, rgba(220, 38, 38, 0.08));
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: var(--danger, #dc2626);
}

body.theme-light .sidebar-search-wrapper,
body[data-theme="clean-executive"] .sidebar-search-wrapper,
body[data-theme="nordic-frost"] .sidebar-search-wrapper,
body[data-theme="warm-sand"] .sidebar-search-wrapper,
body:not(.dark-mode) .sidebar-search-wrapper {
    background: #ffffff !important;
    border: 1.5px solid var(--border-color, #cbd5e1) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.theme-light .sidebar-search-wrapper:focus-within,
body[data-theme="clean-executive"] .sidebar-search-wrapper:focus-within,
body[data-theme="nordic-frost"] .sidebar-search-wrapper:focus-within,
body[data-theme="warm-sand"] .sidebar-search-wrapper:focus-within,
body:not(.dark-mode) .sidebar-search-wrapper:focus-within {
    background: #ffffff !important;
    border-color: var(--brand-primary, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

body.theme-light .sidebar-search-wrapper input,
body[data-theme="clean-executive"] .sidebar-search-wrapper input,
body[data-theme="nordic-frost"] .sidebar-search-wrapper input,
body[data-theme="warm-sand"] .sidebar-search-wrapper input,
body:not(.dark-mode) .sidebar-search-wrapper input {
    color: var(--text-main, #0f172a);
}

body.theme-light .sidebar-search-wrapper input::placeholder,
body[data-theme="clean-executive"] .sidebar-search-wrapper input::placeholder,
body[data-theme="nordic-frost"] .sidebar-search-wrapper input::placeholder,
body[data-theme="warm-sand"] .sidebar-search-wrapper input::placeholder,
body:not(.dark-mode) .sidebar-search-wrapper input::placeholder {
    color: var(--text-muted, #64748b);
}

body.theme-light .sidebar-search-icon,
body[data-theme="clean-executive"] .sidebar-search-icon,
body[data-theme="nordic-frost"] .sidebar-search-icon,
body[data-theme="warm-sand"] .sidebar-search-icon,
body:not(.dark-mode) .sidebar-search-icon,
body.theme-light #sidebar-clear-search,
body[data-theme="clean-executive"] #sidebar-clear-search,
body[data-theme="nordic-frost"] #sidebar-clear-search,
body[data-theme="warm-sand"] #sidebar-clear-search,
body:not(.dark-mode) #sidebar-clear-search {
    color: var(--text-muted, #64748b);
}

body.theme-light .sidebar-nav-scrollable,
body[data-theme="clean-executive"] .sidebar-nav-scrollable,
body[data-theme="nordic-frost"] .sidebar-nav-scrollable,
body[data-theme="warm-sand"] .sidebar-nav-scrollable,
body:not(.dark-mode) .sidebar-nav-scrollable {
    scrollbar-color: var(--border-color, #cbd5e1) transparent;
}

body.theme-light .sidebar-nav-scrollable::-webkit-scrollbar-thumb,
body[data-theme="clean-executive"] .sidebar-nav-scrollable::-webkit-scrollbar-thumb,
body[data-theme="nordic-frost"] .sidebar-nav-scrollable::-webkit-scrollbar-thumb,
body[data-theme="warm-sand"] .sidebar-nav-scrollable::-webkit-scrollbar-thumb,
body:not(.dark-mode) .sidebar-nav-scrollable::-webkit-scrollbar-thumb {
    background: var(--border-color, #cbd5e1);
}

body.theme-light .sidebar-section-header,
body[data-theme="clean-executive"] .sidebar-section-header,
body[data-theme="nordic-frost"] .sidebar-section-header,
body[data-theme="warm-sand"] .sidebar-section-header,
body:not(.dark-mode) .sidebar-section-header {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .sidebar-section-header:hover,
body[data-theme="clean-executive"] .sidebar-section-header:hover,
body[data-theme="nordic-frost"] .sidebar-section-header:hover,
body[data-theme="warm-sand"] .sidebar-section-header:hover,
body:not(.dark-mode) .sidebar-section-header:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    border-color: var(--border-hover, #94a3b8) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.theme-light .sidebar-section-title,
body[data-theme="clean-executive"] .sidebar-section-title,
body[data-theme="nordic-frost"] .sidebar-section-title,
body[data-theme="warm-sand"] .sidebar-section-title,
body:not(.dark-mode) .sidebar-section-title {
    color: var(--text-sub, #334155);
}

body.theme-light .sidebar-section-title svg,
body[data-theme="clean-executive"] .sidebar-section-title svg,
body[data-theme="nordic-frost"] .sidebar-section-title svg,
body[data-theme="warm-sand"] .sidebar-section-title svg,
body:not(.dark-mode) .sidebar-section-title svg {
    color: var(--brand-primary, #2563eb);
    filter: none;
}

body.theme-light .sidebar-section-toggle,
body[data-theme="clean-executive"] .sidebar-section-toggle,
body[data-theme="nordic-frost"] .sidebar-section-toggle,
body[data-theme="warm-sand"] .sidebar-section-toggle,
body:not(.dark-mode) .sidebar-section-toggle {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-muted, #64748b);
}

body.theme-light .sidebar-section-header:hover .sidebar-section-toggle,
body[data-theme="clean-executive"] .sidebar-section-header:hover .sidebar-section-toggle,
body[data-theme="nordic-frost"] .sidebar-section-header:hover .sidebar-section-toggle,
body[data-theme="warm-sand"] .sidebar-section-header:hover .sidebar-section-toggle,
body:not(.dark-mode) .sidebar-section-header:hover .sidebar-section-toggle {
    background: var(--brand-primary, #2563eb);
    border-color: var(--brand-primary, #2563eb);
    color: #ffffff;
    box-shadow: 0 0 8px var(--border-glow, rgba(37, 99, 235, 0.3));
}

body.theme-light .sidebar-nav-item,
body[data-theme="clean-executive"] .sidebar-nav-item,
body[data-theme="nordic-frost"] .sidebar-nav-item,
body[data-theme="warm-sand"] .sidebar-nav-item,
body:not(.dark-mode) .sidebar-nav-item {
    color: var(--text-sub, #334155);
    background: transparent;
    border-color: transparent;
}

body.theme-light .sidebar-nav-item .sidebar-nav-icon,
body[data-theme="clean-executive"] .sidebar-nav-item .sidebar-nav-icon,
body[data-theme="nordic-frost"] .sidebar-nav-item .sidebar-nav-icon,
body[data-theme="warm-sand"] .sidebar-nav-item .sidebar-nav-icon,
body:not(.dark-mode) .sidebar-nav-item .sidebar-nav-icon {
    color: var(--text-muted, #64748b);
    filter: none;
}

body.theme-light .sidebar-nav-item:hover,
body[data-theme="clean-executive"] .sidebar-nav-item:hover,
body[data-theme="nordic-frost"] .sidebar-nav-item:hover,
body[data-theme="warm-sand"] .sidebar-nav-item:hover,
body:not(.dark-mode) .sidebar-nav-item:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    color: var(--brand-primary, #2563eb) !important;
    border-color: rgba(37, 99, 235, 0.2) !important;
    transform: translateX(2px);
}

body.theme-light .sidebar-nav-item:hover .sidebar-nav-icon,
body[data-theme="clean-executive"] .sidebar-nav-item:hover .sidebar-nav-icon,
body[data-theme="nordic-frost"] .sidebar-nav-item:hover .sidebar-nav-icon,
body[data-theme="warm-sand"] .sidebar-nav-item:hover .sidebar-nav-icon,
body:not(.dark-mode) .sidebar-nav-item:hover .sidebar-nav-icon {
    color: var(--brand-primary, #2563eb);
    filter: none;
}

body.theme-light .sidebar-nav-item:hover::before,
body[data-theme="clean-executive"] .sidebar-nav-item:hover::before,
body[data-theme="nordic-frost"] .sidebar-nav-item:hover::before,
body[data-theme="warm-sand"] .sidebar-nav-item:hover::before,
body:not(.dark-mode) .sidebar-nav-item:hover::before {
    background: var(--brand-primary, #2563eb);
}

body.theme-light .sidebar-nav-item.active,
body[data-theme="clean-executive"] .sidebar-nav-item.active,
body[data-theme="nordic-frost"] .sidebar-nav-item.active,
body[data-theme="warm-sand"] .sidebar-nav-item.active,
body:not(.dark-mode) .sidebar-nav-item.active {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 3.5px solid #2563eb !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    font-weight: 700 !important;
}

body.theme-light .sidebar-nav-item.active .sidebar-nav-icon,
body[data-theme="clean-executive"] .sidebar-nav-item.active .sidebar-nav-icon,
body[data-theme="nordic-frost"] .sidebar-nav-item.active .sidebar-nav-icon,
body[data-theme="warm-sand"] .sidebar-nav-item.active .sidebar-nav-icon,
body:not(.dark-mode) .sidebar-nav-item.active .sidebar-nav-icon {
    color: #2563eb !important;
    filter: none !important;
}

body.theme-light .sidebar-nav-item.active::before,
body[data-theme="clean-executive"] .sidebar-nav-item.active::before,
body[data-theme="nordic-frost"] .sidebar-nav-item.active::before,
body[data-theme="warm-sand"] .sidebar-nav-item.active::before,
body:not(.dark-mode) .sidebar-nav-item.active::before {
    background: var(--brand-primary, #2563eb) !important;
}

body.theme-light .sidebar-badge,
body[data-theme="clean-executive"] .sidebar-badge,
body[data-theme="nordic-frost"] .sidebar-badge,
body[data-theme="warm-sand"] .sidebar-badge,
body:not(.dark-mode) .sidebar-badge {
    background: var(--surface-hover, #f1f5f9);
    color: var(--text-sub, #334155);
    border: 1px solid var(--border-color, #cbd5e1);
}

body.theme-light .sidebar-nav-item.active .sidebar-badge,
body[data-theme="clean-executive"] .sidebar-nav-item.active .sidebar-badge,
body[data-theme="nordic-frost"] .sidebar-nav-item.active .sidebar-badge,
body[data-theme="warm-sand"] .sidebar-nav-item.active .sidebar-badge,
body:not(.dark-mode) .sidebar-nav-item.active .sidebar-badge {
    background: var(--brand-primary, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--brand-primary, #2563eb) !important;
}

body.theme-light .sidebar-badge.badge-blue,
body[data-theme="clean-executive"] .sidebar-badge.badge-blue,
body[data-theme="nordic-frost"] .sidebar-badge.badge-blue,
body[data-theme="warm-sand"] .sidebar-badge.badge-blue,
body:not(.dark-mode) .sidebar-badge.badge-blue {
    background: var(--brand-primary-light, rgba(37, 99, 235, 0.12));
    color: var(--brand-primary, #2563eb);
    border-color: rgba(37, 99, 235, 0.25);
}

body.theme-light .sidebar-badge.badge-red,
body[data-theme="clean-executive"] .sidebar-badge.badge-red,
body[data-theme="nordic-frost"] .sidebar-badge.badge-red,
body[data-theme="warm-sand"] .sidebar-badge.badge-red,
body:not(.dark-mode) .sidebar-badge.badge-red {
    background: var(--danger-bg, rgba(220, 38, 38, 0.08));
    color: var(--danger, #dc2626);
    border-color: rgba(220, 38, 38, 0.25);
}

body.theme-light .sidebar-action-pill,
body[data-theme="clean-executive"] .sidebar-action-pill,
body[data-theme="nordic-frost"] .sidebar-action-pill,
body[data-theme="warm-sand"] .sidebar-action-pill,
body:not(.dark-mode) .sidebar-action-pill {
    background: var(--brand-primary-light, rgba(37, 99, 235, 0.1));
    color: var(--brand-primary, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

body.theme-light .sidebar-nav-item:hover .sidebar-action-pill,
body[data-theme="clean-executive"] .sidebar-nav-item:hover .sidebar-action-pill,
body[data-theme="nordic-frost"] .sidebar-nav-item:hover .sidebar-action-pill,
body[data-theme="warm-sand"] .sidebar-nav-item:hover .sidebar-action-pill,
body:not(.dark-mode) .sidebar-nav-item:hover .sidebar-action-pill {
    background: var(--brand-primary, #2563eb);
    color: #ffffff;
    box-shadow: 0 0 6px var(--border-glow, rgba(37, 99, 235, 0.3));
}

body.theme-light .sidebar-logout-btn:hover,
body[data-theme="clean-executive"] .sidebar-logout-btn:hover,
body[data-theme="nordic-frost"] .sidebar-logout-btn:hover,
body[data-theme="warm-sand"] .sidebar-logout-btn:hover,
body:not(.dark-mode) .sidebar-logout-btn:hover {
    background: var(--danger-bg, rgba(220, 38, 38, 0.08)) !important;
    color: var(--danger, #dc2626) !important;
    border-color: rgba(220, 38, 38, 0.25) !important;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1) !important;
}

body.theme-light .sidebar-footer,
body[data-theme="clean-executive"] .sidebar-footer,
body[data-theme="nordic-frost"] .sidebar-footer,
body[data-theme="warm-sand"] .sidebar-footer,
body:not(.dark-mode) .sidebar-footer {
    background: linear-gradient(180deg, #edf2f7 0%, #e2e8f0 100%) !important;
    border-top: 1.5px solid var(--border-color, #cbd5e1) !important;
}

body.theme-light .sidebar-footer::before,
body[data-theme="clean-executive"] .sidebar-footer::before,
body[data-theme="nordic-frost"] .sidebar-footer::before,
body[data-theme="warm-sand"] .sidebar-footer::before,
body:not(.dark-mode) .sidebar-footer::before {
    background: linear-gradient(90deg, transparent, var(--border-color, #cbd5e1), transparent);
}

body.theme-light .sidebar-user-card,
body[data-theme="clean-executive"] .sidebar-user-card,
body[data-theme="nordic-frost"] .sidebar-user-card,
body[data-theme="warm-sand"] .sidebar-user-card,
body:not(.dark-mode) .sidebar-user-card {
    background: #ffffff !important;
    border: 1.5px solid var(--border-color, #cbd5e1) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
}

body.theme-light .sidebar-user-card:hover,
body[data-theme="clean-executive"] .sidebar-user-card:hover,
body[data-theme="nordic-frost"] .sidebar-user-card:hover,
body[data-theme="warm-sand"] .sidebar-user-card:hover,
body:not(.dark-mode) .sidebar-user-card:hover {
    background: #ffffff !important;
    border-color: var(--brand-primary, #2563eb) !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.12) !important;
}

body.theme-light .sidebar-user-name,
body[data-theme="clean-executive"] .sidebar-user-name,
body[data-theme="nordic-frost"] .sidebar-user-name,
body[data-theme="warm-sand"] .sidebar-user-name,
body:not(.dark-mode) .sidebar-user-name {
    color: var(--text-main, #0f172a);
    font-weight: 700;
}

body.theme-light .sidebar-user-role,
body[data-theme="clean-executive"] .sidebar-user-role,
body[data-theme="nordic-frost"] .sidebar-user-role,
body[data-theme="warm-sand"] .sidebar-user-role,
body:not(.dark-mode) .sidebar-user-role {
    color: var(--brand-primary, #2563eb);
    text-shadow: none;
    font-weight: 600;
}

body.theme-light .sidebar-user-avatar,
body[data-theme="clean-executive"] .sidebar-user-avatar,
body[data-theme="nordic-frost"] .sidebar-user-avatar,
body[data-theme="warm-sand"] .sidebar-user-avatar,
body:not(.dark-mode) .sidebar-user-avatar {
    box-shadow: 0 0 0 2px var(--surface-card, #ffffff), 0 2px 6px var(--brand-primary-light, rgba(37, 99, 235, 0.2));
    border: 2px solid var(--border-color, #cbd5e1);
}

body.theme-light .app-layout.sidebar-collapsed .sidebar-user-card,
body[data-theme="clean-executive"] .app-layout.sidebar-collapsed .sidebar-user-card,
body[data-theme="nordic-frost"] .app-layout.sidebar-collapsed .sidebar-user-card,
body[data-theme="warm-sand"] .app-layout.sidebar-collapsed .sidebar-user-card,
body:not(.dark-mode) .app-layout.sidebar-collapsed .sidebar-user-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* ★ REGRAS ESPECÍFICAS DE CONTRASTE & TEMA: WARM SAND */
[data-theme="warm-sand"] .sidebar-brand-logo {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%) !important;
    box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25) !important;
}
[data-theme="warm-sand"] .sidebar-brand-title {
    color: #292524 !important;
}
[data-theme="warm-sand"] .sidebar-brand-sub {
    color: #78716c !important;
}
[data-theme="warm-sand"] .sidebar-toggle-btn {
    background: #fbf9f5 !important;
    border: 1px solid #d6cbbe !important;
    color: #44403c !important;
}
[data-theme="warm-sand"] .sidebar-toggle-btn:hover {
    background: rgba(194, 65, 12, 0.1) !important;
    border-color: #c2410c !important;
    color: #c2410c !important;
}
[data-theme="warm-sand"] .sidebar-search-wrapper {
    background: #ffffff !important;
    border: 1.5px solid #d6cbbe !important;
}
[data-theme="warm-sand"] .sidebar-search-wrapper:focus-within {
    border-color: #c2410c !important;
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15) !important;
}
[data-theme="warm-sand"] .sidebar-search-wrapper input {
    color: #292524 !important;
}
[data-theme="warm-sand"] .sidebar-search-wrapper input::placeholder {
    color: #78716c !important;
}
[data-theme="warm-sand"] .sidebar-section-header {
    background: rgba(41, 37, 36, 0.04) !important;
    border: 1px solid rgba(41, 37, 36, 0.08) !important;
}
[data-theme="warm-sand"] .sidebar-section-header:hover {
    background: rgba(41, 37, 36, 0.08) !important;
    border-color: #baa997 !important;
}
[data-theme="warm-sand"] .sidebar-section-title {
    color: #44403c !important;
}
[data-theme="warm-sand"] .sidebar-section-title svg {
    color: #c2410c !important;
}
[data-theme="warm-sand"] .sidebar-nav-item {
    color: #44403c !important;
}
[data-theme="warm-sand"] .sidebar-nav-item:hover {
    background: rgba(194, 65, 12, 0.08) !important;
    color: #c2410c !important;
    border-color: rgba(194, 65, 12, 0.25) !important;
}
[data-theme="warm-sand"] .sidebar-nav-item:hover .sidebar-nav-icon {
    color: #c2410c !important;
}
[data-theme="warm-sand"] .sidebar-nav-item.active {
    background: #ffffff !important;
    color: #c2410c !important;
    border: 1px solid #d6cbbe !important;
    border-left: 3.5px solid #c2410c !important;
    box-shadow: 0 2px 8px rgba(41, 37, 36, 0.08), 0 1px 2px rgba(41, 37, 36, 0.04) !important;
}
[data-theme="warm-sand"] .sidebar-nav-item.active .sidebar-nav-icon {
    color: #c2410c !important;
}
[data-theme="warm-sand"] .sidebar-nav-item.active::before {
    background: #c2410c !important;
}
[data-theme="warm-sand"] .sidebar-footer {
    background-color: #f4efe6 !important;
    background: linear-gradient(180deg, #f4efe6 0%, #ede5d8 100%) !important;
    border-top: 1.5px solid #d6cbbe !important;
}
[data-theme="warm-sand"] .sidebar-user-card {
    background: #ffffff !important;
    border: 1.5px solid #d6cbbe !important;
}
[data-theme="warm-sand"] .sidebar-user-card:hover {
    border-color: #c2410c !important;
    box-shadow: 0 3px 10px rgba(194, 65, 12, 0.12) !important;
}
[data-theme="warm-sand"] .sidebar-user-name {
    color: #292524 !important;
}
[data-theme="warm-sand"] .sidebar-user-role {
    color: #c2410c !important;
}
[data-theme="warm-sand"] .sidebar-user-avatar {
    border: 2px solid #d6cbbe !important;
}

/* ★ REGRAS ESPECÍFICAS DE CONTRASTE & TEMA: NORDIC FROST */
[data-theme="nordic-frost"] .sidebar-brand-logo {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}
[data-theme="nordic-frost"] .sidebar-brand-title {
    color: #0c4a6e !important;
}
[data-theme="nordic-frost"] .sidebar-nav-item:hover {
    background: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}
[data-theme="nordic-frost"] .sidebar-nav-item:hover .sidebar-nav-icon {
    color: #0284c7 !important;
}
[data-theme="nordic-frost"] .sidebar-nav-item.active {
    background: #ffffff !important;
    color: #0284c7 !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 3.5px solid #0284c7 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
[data-theme="nordic-frost"] .sidebar-nav-item.active .sidebar-nav-icon {
    color: #0284c7 !important;
}
[data-theme="nordic-frost"] .sidebar-nav-item.active::before {
    background: #0284c7 !important;
}
[data-theme="nordic-frost"] .sidebar-user-role {
    color: #0284c7 !important;
}

/* ★ MOBILE SIDEBAR — Backdrop + Slide-in */
@media (max-width: 767px) {
    .app-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px !important;
        min-width: 280px !important;
    }

    body.sidebar-mobile-open .app-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 60px rgba(0, 0, 0, 0.8), 0 0 0 1000px rgba(0, 0, 0, 0.55);
    }

    body.theme-light.sidebar-mobile-open .app-sidebar,
    body[data-theme="clean-executive"].sidebar-mobile-open .app-sidebar,
    body[data-theme="nordic-frost"].sidebar-mobile-open .app-sidebar,
    body[data-theme="warm-sand"].sidebar-mobile-open .app-sidebar,
    body:not(.dark-mode).sidebar-mobile-open .app-sidebar {
        box-shadow: 8px 0 35px rgba(15, 23, 42, 0.22) !important;
    }

    body.theme-light .sidebar-backdrop,
    body[data-theme="clean-executive"] .sidebar-backdrop,
    body[data-theme="nordic-frost"] .sidebar-backdrop,
    body[data-theme="warm-sand"] .sidebar-backdrop,
    body:not(.dark-mode) .sidebar-backdrop {
        background: rgba(15, 23, 42, 0.45) !important;
    }

    .sidebar-close-btn { display: inline-flex !important; }
    .sidebar-toggle-btn.desktop-only { display: none !important; }
}

/* ★ Backdrop Overlay Mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}

body.sidebar-mobile-open .sidebar-backdrop {
    display: block;
    background: rgba(0,0,0,0.55);
    pointer-events: all;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ========================================================== */
/* HIGIENIZAÇÃO DO PORTAL DO CLIENTE (SOLICITANTE)             */
/* O que for proibido/restrito ao cliente é totalmente oculto */
/* ========================================================== */
body.user-solicitante #sidebar-item-cancelados,
body.user-solicitante #sidebar-section-noc,
body.user-solicitante .sidebar-section[data-section="noc"],
body.user-solicitante #sidebar-item-conhecimento,
body.user-solicitante #sidebar-nav-conhecimento,
body.user-solicitante #sidebar-item-automacoes,
body.user-solicitante #sidebar-item-monitoramento,
body.user-solicitante #sidebar-item-ativos,
body.user-solicitante #sidebar-section-cadastros,
body.user-solicitante #sidebar-section-indicadores,
body.user-solicitante #sidebar-item-rh,
body.user-solicitante #sidebar-item-reembolsos,
body.user-solicitante #sidebar-item-orcamentos,
body.user-solicitante #sidebar-item-agenda,
body.user-solicitante #sidebar-item-admin,
body.user-solicitante #sidebar-item-financeiro,
body.user-solicitante #sidebar-item-estoque,
body.user-solicitante #sidebar-item-chat,
body.user-solicitante #sidebar-item-mensagens,
body.user-solicitante #view-conhecimento,
body.user-solicitante #btn-topo-painel-remoto,
body.user-solicitante #btn-topo-download-remoto,
body.user-solicitante #btn-navbar-omnisearch,
body.user-solicitante .nav-system-status,
body.user-solicitante #btn-modo-lote,
body.user-solicitante #barra-acoes-lote,
body.user-solicitante #toggle-lista-kanban,
body.user-solicitante button[onclick*="exportarChamadosAtuaisCSV"],
body.user-solicitante #chip-fila,
body.user-solicitante #chip-meus,
body.user-solicitante #chip-alta,
body.user-solicitante #chip-sla,
body.user-solicitante .tab-cyber-btn:not(#tab-nav-central):not(#tab-nav-historico),
body.user-solicitante .btn-wa-action,
body.user-solicitante .btn-lote-trigger,
body.user-solicitante #btn-quick-bater-ponto,
body.user-solicitante #cyber-dashboard-header,
body.user-solicitante #dashboard-stats-grid,
body.user-solicitante #elitte-chamados-summary,
body.user-solicitante .elitte-btn-ajuda {
    display: none !important;
}

body.user-solicitante #painel-titulo-chamados {
    font-size: 1.15rem;
    font-weight: 800;
}

/* Tooltip Flutuante no modo mini */
.app-layout.sidebar-collapsed .sidebar-nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ÁREA PRINCIPAL DA APLICAÇÃO (CONTEÚDO FLUIDO) */
.app-main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--surface-bg);
}

/* CONTROLES NA NAVBAR DO TOPO */
.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.btn-hamburger {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.dark-mode .btn-hamburger {
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
}

.btn-hamburger:hover {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.nav-breadcrumb {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 14px;
    border-left: 1.5px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .nav-breadcrumb {
    border-left-color: rgba(148, 163, 184, 0.2);
}

@media (min-width: 1380px) {
    .nav-breadcrumb {
        display: flex;
    }
}

.nav-breadcrumb .crumb-root {
    color: var(--text-sub);
    font-weight: 500;
}

body.dark-mode .nav-breadcrumb .crumb-root {
    color: #94a3b8;
}

.nav-breadcrumb .crumb-sep {
    color: var(--border-color);
    font-size: 0.72rem;
}

.nav-breadcrumb .crumb-current {
    color: var(--brand-primary);
    font-weight: 800;
}

/* ==========================================================
   NAVBAR (HEADER EXECUTIVO)
   ========================================================== */
.navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-main);
    padding: 10px 18px;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

body.dark-mode .navbar,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .navbar {
    background: rgba(15, 20, 34, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    color: #f8fafc;
}

/* Indicador de Status & Telemetria em Tempo Real (Command Center) */
.nav-system-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 0.72rem;
    font-weight: 700;
    color: #059669;
    letter-spacing: 0.03em;
    user-select: none;
    transition: all 0.2s ease;
}

body.dark-mode .nav-system-status,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .nav-system-status {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.system-status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}

.system-status-indicator.pulse-green {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: liveDotPulse 2s infinite ease-in-out;
}

.system-latency-badge {
    background: rgba(15, 23, 42, 0.06);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: #0f172a;
}

body.dark-mode .system-latency-badge,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .system-latency-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #a7f3d0;
}

@media (max-width: 900px) {
    .nav-system-status {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .navbar {
        padding: 10px 24px;
    }
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    background: linear-gradient(135deg, #2563eb, #3b82f6 50%, #4f46e5 100%);
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .brand-title {
    background: linear-gradient(90deg, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-sub);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
}

body.dark-mode .brand-subtitle {
    color: #94a3b8;
}

.live-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: liveDotPulse 2.4s infinite ease-in-out;
}

@keyframes liveDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
    50% { transform: scale(1.22); opacity: 0.85; box-shadow: 0 0 14px rgba(16, 185, 129, 0.95); }
}

.nav-user-area {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

.nav-user-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

.nav-user-buttons .btn-label-text {
    display: none !important;
}

.nav-user-buttons button {
    height: 36px !important;
    width: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9px !important;
    flex-shrink: 0 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.nav-user-buttons button .btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.user-tag {
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

body.dark-mode .user-tag {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.notification-bell-btn {
    position: relative;
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-bell-btn:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: #d97706;
    transform: translateY(-1px);
}

body.dark-mode .notification-bell-btn {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

body.dark-mode .notification-bell-btn:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #fbbf24;
}

.notification-bell-btn.has-unread {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

body.dark-mode .notification-bell-btn.has-unread {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
}

.notification-bell-btn.has-unread .btn-icon {
    display: inline-block !important;
    transform-origin: top center !important;
    animation: ring-bell 2s infinite ease-in-out;
}

@keyframes ring-bell {
    0%, 100% { transform: rotate(0deg); }
    5%, 15% { transform: rotate(12deg); }
    10%, 20% { transform: rotate(-12deg); }
    25% { transform: rotate(0deg); }
}

.btn-nav-action {
    background: var(--surface-card);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-nav-action:hover {
    background: var(--surface-sub);
    border-color: var(--border-hover);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

body.dark-mode .btn-nav-action {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .btn-nav-action:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-nav-logout {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-nav-logout:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: #ef4444;
    color: #dc2626;
    transform: translateY(-1px);
}

body.dark-mode .btn-nav-logout {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .btn-nav-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
}

.btn-theme-toggle {
    background: var(--surface-card);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-theme-toggle .btn-label-text,
#btn-toggle-notificacoes-navegador .btn-label-text,
.mobile-icon-btn .btn-label-text {
    display: none;
}

.btn-theme-toggle:hover {
    background: var(--surface-sub);
    border-color: var(--border-hover);
    transform: rotate(15deg);
}

body.dark-mode .btn-theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Barra de Ferramentas de IA & Ortografia */
.ia-assist-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 10px;
}

body.dark-mode .ia-assist-toolbar {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.ia-toolbar-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 4px;
}

body.dark-mode .ia-toolbar-label {
    color: #a5b4fc;
}

.btn-ia-action {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s ease;
}

.btn-ia-action:hover:not(:disabled) {
    background: #4f46e5;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-ia-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.dark-mode .btn-ia-action {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.4);
}

body.dark-mode .btn-ia-action:hover:not(:disabled) {
    background: #6366f1;
    color: #ffffff;
}

/* Abas da Biblioteca de Frases Técnicas */
.tab-bib-frase {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-sub);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-bib-frase:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.tab-bib-frase.active {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
    font-weight: 800 !important;
}


/* ==========================================================
   SEGMENTED NAVIGATION TABS (BARRA DE ABAS EXECUTIVA)
   ========================================================== */
.futuristic-tabs-wrapper {
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 14px;
    position: relative;
    box-shadow: var(--shadow-xs);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .futuristic-tabs-wrapper {
    background: #0f172a;
    border-bottom-color: rgba(148, 163, 184, 0.12);
}

.futuristic-tabs-container {
    flex: 1;
    min-width: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
    padding-bottom: 3px;
    padding-top: 2px;
}

.futuristic-tabs-container.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.futuristic-tabs-container::-webkit-scrollbar {
    height: 5px;
    display: block;
}

.futuristic-tabs-container::-webkit-scrollbar-track {
    background: transparent;
}

.futuristic-tabs-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.futuristic-tabs-container::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary, #2563eb);
}

body.dark-mode .futuristic-tabs-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
}

body.dark-mode .futuristic-tabs-container::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

/* Botões de Rolagem Lateral das Abas (Desktop) */
.tabs-scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-sub, #64748b);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tabs-scroll-btn:hover {
    background: var(--brand-primary, #2563eb);
    color: #ffffff;
    border-color: var(--brand-primary, #2563eb);
    transform: scale(1.06);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.tabs-scroll-btn:active {
    transform: scale(0.95);
}

.tabs-scroll-btn:disabled,
.tabs-scroll-btn.is-disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

body.dark-mode .tabs-scroll-btn {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

body.dark-mode .tabs-scroll-btn:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

.tab-text-mobile { display: none; }
.tab-text-desktop { display: inline; }

.tab-cyber-btn {
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-sub);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.tab-cyber-btn:hover {
    background: var(--surface-sub);
    color: var(--brand-primary);
    border-color: var(--border-color);
}

body.dark-mode .tab-cyber-btn,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .tab-cyber-btn {
    color: #94a3b8;
}

body.dark-mode .tab-cyber-btn:hover,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .tab-cyber-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.12);
}

.tab-cyber-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
    border-color: #0284c7;
    font-weight: 700;
}

body.dark-mode .tab-cyber-btn.active,
body:not(.theme-light):not([data-theme="clean-executive"]):not([data-theme="nordic-frost"]):not([data-theme="warm-sand"]) .tab-cyber-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.4);
    border-color: #38bdf8;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
    padding: 2px 7px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.tab-cyber-btn:not(.active) .tab-badge {
    background: var(--surface-sub);
    color: var(--text-sub);
    border: 1px solid var(--border-color);
}

body.dark-mode .tab-cyber-btn:not(.active) .tab-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================
   MAIN LAYOUT & CONTAINERS (FLUIDO DE PONTA A PONTA)
   ========================================================== */
.main-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    box-sizing: border-box;
    overflow-x: clip;
}

@media (min-width: 1440px) {
    .main-wrapper {
        padding: 24px 36px;
        gap: 24px;
    }
}

/* ==========================================================
   KPI STATS CARDS (MÉTRICAS EXECUTIVAS)
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color, var(--brand-primary));
    opacity: 0.85;
    transition: opacity 0.2s ease, height 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.09), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    border-color: var(--card-color, var(--brand-primary));
}

.stat-card:hover::before {
    opacity: 1;
    height: 4px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.15;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-sub);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
}

/* ==========================================================
   PANELS & GRIDS (COLUNAS EXECUTIVAS DE ALTO CONTRASTE)
   ========================================================== */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        align-items: start;
    }
    #secao-chamados-ativos {
        display: block !important;
        min-width: 0;
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (min-width: 1600px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@keyframes panelPulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); border-color: var(--brand-primary); }
    50% { box-shadow: 0 0 24px 6px rgba(2, 132, 199, 0.45); border-color: #38bdf8; }
    100% { box-shadow: var(--shadow-md); border-color: var(--border-color); }
}
.panel-highlight-pulse {
    animation: panelPulseGlow 1.4s ease-out;
}

.panel {
    background: var(--surface-card);
    border-radius: 16px;
    border: 1.5px solid var(--border-color);
    padding: 22px;
    box-shadow: var(--shadow-md);
    height: fit-content;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
    border-color: var(--border-hover);
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--border-color);
}

@media (min-width: 480px) {
    .panel-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

/* ==========================================================
   FORMS & INPUT CONTROLS (CAMPOS COM DEFINIÇÃO NÍTIDA)
   ========================================================== */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input, select, textarea {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--input-border, #94a3b8);
    background-color: var(--input-bg);
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    font-family: inherit;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 95px;
    line-height: 1.5;
}

input:hover, select:hover, textarea:hover {
    border-color: var(--input-border-hover, #475569);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3.5px var(--border-glow);
    background-color: var(--surface-card);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    border-color: var(--input-border, #334155);
    background-color: var(--input-bg, #0b1120);
    color: var(--text-main);
}

body.dark-mode input:hover,
body.dark-mode select:hover,
body.dark-mode textarea:hover {
    border-color: var(--input-border-hover, #64748b);
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3.5px var(--border-glow);
    background-color: var(--surface-card);
}

.input-icon-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-box .input-icon {
    position: absolute;
    left: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
}

.input-icon-box input, 
.input-icon-box select {
    padding-left: 38px !important;
}

/* ==========================================================
   FORM SECTION CARDS & ORGANIZATIONAL ARCHITECTURE
   ========================================================== */
.form-section-block {
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

body.dark-mode .form-section-block {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.16);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid var(--border-color);
}

body.dark-mode .form-section-header {
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

.form-section-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .form-grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}

.upload-dropzone-box {
    border: 2px dashed var(--input-border, #94a3b8);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    background: var(--surface-card);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-dropzone-box:hover {
    border-color: var(--brand-primary);
    background: var(--surface-hover);
}

body.dark-mode .upload-dropzone-box {
    background: #0b1120;
    border-color: #475569;
}

body.dark-mode .upload-dropzone-box:hover {
    border-color: var(--brand-primary);
    background: #1e293b;
}

.form-actions-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
}

@media (min-width: 480px) {
    .form-actions-bar {
        grid-template-columns: 1fr 1fr;
    }
}

.form-actions-bar .btn-submit,
.form-actions-bar .btn-whatsapp {
    min-height: 46px;
    padding: 12px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    width: 100%;
}

/* Action Buttons */
.btn-submit {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-whatsapp {
    background-color: var(--whatsapp-color);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    transform: translateY(-1px);
}

/* ==========================================================
   TICKETS & QUEUE (CHAMADOS & FILA)
   ========================================================== */
.ticket-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    background: var(--ticket-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 4.5px solid var(--brand-primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.07), 0 1px 3px 0 rgba(15, 23, 42, 0.05);
    position: relative;
}

.ticket-item:hover {
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.ticket-item.alta {
    border-left-color: var(--danger) !important;
}

.ticket-item.media {
    border-left-color: var(--warning) !important;
}

.ticket-item.baixa {
    border-left-color: var(--success) !important;
}

.ticket-item.aguardando-resposta {
    border-left-color: var(--warning) !important;
}

.ticket-item.tem-notificacao {
    border: 1.5px solid var(--danger);
    background: var(--danger-bg);
}

.ticket-item.card-selecionado-lote {
    border: 1.5px solid var(--danger) !important;
    background: var(--danger-bg) !important;
}

.ticket-header-compact {
    cursor: pointer;
    user-select: none;
}

.ticket-id-tag {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.badge-priority {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.badge-priority.alta {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-priority.media {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-priority.baixa {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

body.dark-mode .badge-priority.alta {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

body.dark-mode .badge-priority.media {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

body.dark-mode .badge-priority.baixa {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.ticket-body {
    font-size: 0.9rem;
    color: var(--text-main);
    background: var(--surface-sub);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    border-left: 3.5px solid var(--brand-primary);
    line-height: 1.55;
}

.ticket-solution {
    font-size: 0.88rem;
    color: var(--text-main);
    background: var(--success-bg);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-left: 3.5px solid var(--success);
    line-height: 1.55;
}

.ticket-replies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.reply-item {
    font-size: 0.84rem;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
}

.reply-item.cliente {
    border-left: 3px solid var(--warning);
}

.reply-item.tecnico {
    border-left: 3px solid var(--brand-primary);
}

.btn-small {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-small:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--surface-sub);
    transform: translateY(-1px);
}

.btn-small.btn-chat-popup {
    background: rgba(99, 102, 241, 0.08);
    color: var(--brand-indigo);
    border-color: rgba(99, 102, 241, 0.25);
}

.btn-small.btn-chat-popup:hover {
    background: var(--brand-indigo);
    color: #ffffff;
}

.btn-small.btn-pdf-action {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    border-color: rgba(37, 99, 235, 0.25);
}

.btn-small.btn-pdf-action:hover {
    background: var(--brand-primary);
    color: #ffffff;
}

.btn-finish {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
}

.btn-finish:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.25);
    background: var(--danger-bg);
}

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

/* ==========================================================
   CALENDAR (CALENDÁRIO EXECUTIVO & AGENDAMENTOS)
   ========================================================== */
.calendar-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.calendar-nav-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-nav-btn {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.cal-nav-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.cal-nav-btn.btn-cal-hoje {
    background: var(--brand-primary-light);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 800;
}

.cal-mes-ano-badge {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--brand-primary);
    min-width: 140px;
    text-align: center;
    letter-spacing: -0.01em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 14px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-sub);
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-cell {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-height: 85px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    cursor: pointer;
    position: relative;
}

.calendar-cell:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.calendar-cell.today {
    border-color: var(--brand-primary);
    background: var(--brand-primary-light);
    box-shadow: 0 0 0 1.5px var(--brand-primary);
}

.calendar-cell.today .calendar-cell-num {
    background: var(--brand-primary);
    color: #ffffff !important;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
}

.calendar-cell.selected {
    border-color: var(--brand-primary) !important;
    background: rgba(37, 99, 235, 0.16) !important;
    box-shadow: 0 0 0 2px var(--brand-primary);
}

body.dark-mode .calendar-cell.selected {
    background: rgba(37, 99, 235, 0.28) !important;
    box-shadow: 0 0 0 2px #3b82f6;
}

.calendar-cell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.calendar-cell-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-sub);
    font-family: 'JetBrains Mono', monospace;
}

.calendar-cell.today .calendar-cell-num {
    color: var(--brand-primary);
    font-weight: 800;
}

.calendar-cell.selected .calendar-cell-num {
    color: var(--brand-primary);
    font-weight: 800;
}

/* Dots de Eventos do Calendário */
.calendar-dots-bar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 2px;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.cal-dot.dot-reuniao { background-color: #6366f1; }
.cal-dot.dot-visita { background-color: #2563eb; }
.cal-dot.dot-chamado { background-color: #f59e0b; }
.cal-dot.dot-feriado { background-color: #059669; }

.cal-dot-more {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-sub);
    line-height: 1;
}

/* Pills de Eventos (Desktop) */
.calendar-pills-bar {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

.calendar-event-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-event-pill:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.event-reuniao { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }
.event-visita { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.event-chamado { background: linear-gradient(135deg, #f59e0b, #d97706); color: #000; }
.event-feriado {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: #ffffff !important;
    border-left: 3px solid #facc15 !important;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* Barra de Filtro Ativo */
.agenda-filtro-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
    padding: 9px 14px;
    margin-bottom: 12px;
    font-size: 0.84rem;
    color: var(--text-main);
    animation: fadeIn 0.2s ease;
}

.btn-limpar-filtro-agenda {
    background: transparent;
    border: 1px solid rgba(37, 99, 235, 0.35);
    color: var(--brand-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-limpar-filtro-agenda:hover {
    background: var(--brand-primary);
    color: #ffffff;
}

/* Cabeçalho dos Compromissos */
.agenda-compromissos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.agenda-compromissos-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agenda-subtitulo {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-contagem-agenda {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}

.btn-toggle-expandir-todos {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-toggle-expandir-todos:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ==========================================================
   CARDS DE AGENDAMENTO EXPANSÍVEIS (ACCORDION)
   ========================================================== */
.events-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card-accordion {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.event-card-accordion:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

body.dark-mode .event-card-accordion {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .event-card-accordion:hover {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.event-card-accordion.is-expanded {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.14);
}

body.dark-mode .event-card-accordion.is-expanded {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.28);
}

/* Cabeçalho do Card (Gatilho Touch/Click) */
.event-card-header {
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background-color 0.15s ease;
    outline: none;
}

.event-card-header:hover {
    background: rgba(241, 245, 249, 0.6);
}

body.dark-mode .event-card-header:hover {
    background: rgba(30, 41, 59, 0.45);
}

.event-card-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.event-badge-tipo {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.event-badge-tipo.badge-reuniao { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.event-badge-tipo.badge-visita { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.event-badge-tipo.badge-chamado { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.event-badge-tipo.badge-feriado { background: rgba(5, 150, 105, 0.15); color: #059669; }

body.dark-mode .event-badge-tipo.badge-reuniao { background: rgba(99, 102, 241, 0.22); color: #a5b4fc; }
body.dark-mode .event-badge-tipo.badge-visita { background: rgba(37, 99, 235, 0.22); color: #60a5fa; }
body.dark-mode .event-badge-tipo.badge-chamado { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
body.dark-mode .event-badge-tipo.badge-feriado { background: rgba(5, 150, 105, 0.22); color: #34d399; }

.event-hora-pill {
    font-size: 0.76rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
    background: var(--surface-sub);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.event-badge-feriado {
    font-size: 0.65rem;
    font-weight: 800;
    background: #059669;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.event-card-header-middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.event-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    flex: 1;
}

.event-chevron-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
    flex-shrink: 0;
}

.event-card-accordion.is-expanded .event-chevron-icon {
    transform: rotate(180deg);
    color: var(--brand-primary);
}

.event-card-header-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-sub);
    flex-wrap: wrap;
}

/* Corpo Expansível do Card */
.event-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
    border-top: 1px solid transparent;
}

.event-card-accordion.is-expanded .event-card-body {
    max-height: 600px;
    opacity: 1;
    border-top-color: var(--border-color);
}

.event-card-body-inner {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(248, 250, 252, 0.4);
}

body.dark-mode .event-card-body-inner {
    background: rgba(15, 23, 42, 0.5);
}

.event-pauta-box {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
}

.event-pauta-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 4px;
}

.event-pauta-content {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
    white-space: pre-wrap;
}

.event-no-desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.event-chamado-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px dashed rgba(37, 99, 235, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--brand-primary);
    font-weight: 600;
    flex-wrap: wrap;
}

.btn-chamado-link {
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-chamado-link:hover {
    background: var(--brand-primary-hover);
}

.event-card-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 6px;
}

.btn-evt-action {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-main);
    transition: all 0.15s ease;
}

.btn-evt-action:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-evt-action.btn-evt-delete {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-evt-action.btn-evt-delete:hover {
    background: #ef4444;
    color: #ffffff;
}

/* ==========================================================
   CLIENT CARDS (BASE DE CLIENTES EXECUTIVA)
   ========================================================== */
.client-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.client-card .btn-action-tel {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35) !important;
    transition: all 0.15s ease !important;
}

.client-card .btn-action-tel:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.45) !important;
}

.client-card .btn-action-wa {
    background: linear-gradient(135deg, #25d366, #128c7e) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35) !important;
    transition: all 0.15s ease !important;
}

.client-card .btn-action-wa:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.45) !important;
}

/* ==========================================================
   MODALS & DIALOGS (DIÁLOGOS CORPORATIVOS)
   ========================================================== */
dialog {
    border: none;
    border-radius: 20px;
    padding: 0;
    margin: auto;
    width: calc(100% - 24px);
    max-width: 560px;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.45);
    background: transparent;
    animation: dialogPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialogPopIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.dark-mode dialog::backdrop {
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dialog-card {
    background: var(--surface-card);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

/* ==========================================================
   WHATSAPP FLOAT, FOOTER & UTILITIES
   ========================================================== */
.whatsapp-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--whatsapp-color);
    color: #ffffff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 999;
    text-decoration: none;
    font-size: 1.8rem;
    transition: all 0.2s ease;
}

.whatsapp-float-btn:hover {
    transform: scale(1.08);
    background-color: var(--whatsapp-hover);
}

.footer-site {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-sub);
    border-top: 1px solid var(--border-color);
    background: var(--surface-card);
    margin-top: auto;
}

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-sub);
    font-size: 0.92rem;
}

/* Strict Visual Security Rules */
#btn-perfil-admin.is-hidden,
#btn-perfil-admin[style*="display: none"],
#btn-perfil-admin[style*="display:none"],
#btn-notificacoes-tec.is-hidden,
#btn-notificacoes-tec[style*="display: none"],
#btn-notificacoes-tec[style*="display:none"] {
    display: none !important;
}

/* ==========================================================
   AUTH SCREEN (TELA DE AUTENTICAÇÃO CORPORATIVA)
   ========================================================== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.90), rgba(7, 11, 20, 0.97));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100005;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.16);
    position: relative;
    box-sizing: border-box;
}

body.dark-mode .auth-card {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.auth-theme-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
    outline: none;
}

.auth-theme-btn:hover {
    background: #e2e8f0;
    transform: scale(1.06);
}

body.dark-mode .auth-theme-btn {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.25);
    color: #f8fafc;
}

body.dark-mode .auth-theme-btn:hover {
    background: rgba(51, 65, 85, 0.95);
    transform: scale(1.06);
}

.auth-brand-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    margin-bottom: 12px;
    position: relative;
}

.auth-logo-letter {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin: 0;
}

.auth-subtitle {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
    animation: authPulse 2.2s infinite ease-in-out;
}

@keyframes authPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    }
    50% {
        transform: scale(1.25);
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.95);
    }
}

.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: authSpin 0.7s linear infinite;
}

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

/* Segmented Control Switcher */
.auth-segmented-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

body.dark-mode .auth-segmented-container {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.16);
}

.auth-segment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.auth-segment-btn:hover {
    color: #0f172a;
}

body.dark-mode .auth-segment-btn:hover {
    color: #f8fafc;
}

.auth-segment-btn.active {
    background: #ffffff;
    color: var(--brand-primary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.dark-mode .auth-segment-btn.active {
    background: #0f172a;
    color: #38bdf8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.auth-form-animated {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: authFadeIn 0.2s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.auth-modern-input {
    width: 100%;
    padding: 11px 14px 11px 38px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--input-border, #94a3b8) !important;
    background: var(--input-bg) !important;
    color: var(--text-main) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05) !important;
}

.auth-modern-input:hover {
    border-color: var(--input-border-hover, #475569) !important;
}

.auth-modern-input:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3.5px var(--border-glow) !important;
    outline: none !important;
}

body.dark-mode .auth-modern-input {
    border-color: #334155 !important;
    background: #0b1120 !important;
    color: #f8fafc !important;
}

body.dark-mode .auth-modern-input:hover {
    border-color: #64748b !important;
}

body.dark-mode .auth-modern-input:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3.5px var(--border-glow) !important;
}

.auth-modern-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 38px !important;
}

.auth-input-wrapper.has-toggle .auth-modern-input {
    padding-right: 42px !important;
}

.auth-pwd-toggle-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s ease;
    z-index: 2;
}

.auth-pwd-toggle-btn:hover {
    color: var(--text-main);
}

.auth-field-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.auth-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28);
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-btn-primary.auth-btn-tech {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.25);
}

.auth-btn-primary.auth-btn-tech:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .auth-btn-primary.auth-btn-tech {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35);
}

.auth-footer-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 500;
    text-align: center;
    padding-top: 4px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================
   MELHORIAS DE ALTO CONTRASTE - MODO ESCURO CORPORATIVO
   ========================================================== */
body.dark-mode {
    color-scheme: dark;
}

body.dark-mode .panel {
    background: #111827;
    border: 1.5px solid #283652;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .ticket-item {
    background: #131d31 !important;
    border: 1.5px solid #273756 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

body.dark-mode .ticket-item:hover {
    border-color: #38bdf8 !important;
    background: #17233c !important;
}

body.dark-mode .ticket-id-tag {
    color: #f8fafc;
}

body.dark-mode .ticket-header-compact strong {
    color: #f8fafc;
}

body.dark-mode .ticket-body {
    color: #e2e8f0;
}

body.dark-mode .ticket-meta span {
    color: #cbd5e1 !important;
}

body.dark-mode .client-card,
body.dark-mode .tech-card {
    background: #131d31 !important;
    border: 1.5px solid #273756 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

body.dark-mode .client-card:hover,
body.dark-mode .tech-card:hover {
    border-color: #38bdf8 !important;
    background: #17233c !important;
}

body.dark-mode .dialog-card {
    background: #111a2e !important;
    border: 1.5px solid #2e4166 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

body.dark-mode dialog::backdrop {
    background: rgba(3, 7, 18, 0.85);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #0d1527 !important;
    color: #f8fafc !important;
    border: 1.5px solid #2e4166 !important;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
    background: #111a2e !important;
}

body.dark-mode select option {
    background: #111a2e;
    color: #f8fafc;
}

body.dark-mode .reply-item {
    background: #18233a !important;
    border: 1px solid #283754 !important;
    color: #f1f5f9 !important;
}

body.dark-mode .reply-item strong {
    color: #38bdf8 !important;
}

body.dark-mode .reply-item.cliente {
    background: rgba(2, 132, 199, 0.14) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
}

body.dark-mode .reply-item.tecnico {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

body.dark-mode .btn-small {
    background: #1a253c;
    color: #f8fafc;
    border: 1px solid #2e4166;
}

body.dark-mode .btn-small:hover {
    background: #243250;
    border-color: #38bdf8;
}

body.dark-mode .metrics-grid > div {
    background: #131c2e !important;
    border: 1.5px solid #273756 !important;
}

body.dark-mode #banner-permissao-clientes {
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
}

/* ==========================================================
   CENTRAL DE MODELOS DE MENSAGENS (E-MAIL & WHATSAPP)
   ========================================================== */
.msg-perm-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.switch-toggle-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch-toggle-custom input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    background-color: var(--input-border);
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.switch-toggle-custom input:checked + .toggle-slider {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 10px var(--border-glow);
}

.switch-toggle-custom input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.msg-canal-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.tab-canal-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-sub);
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xs);
}

.tab-canal-msg-btn:hover {
    background: var(--surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.tab-canal-msg-btn.active {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 14px var(--border-glow);
}

.sub-tabs-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.sub-tab-pill {
    padding: 8px 16px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-sub);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}

.sub-tab-pill:hover {
    background: var(--surface-hover);
    color: var(--text-main);
    border-color: var(--border-hover);
}

.sub-tab-pill.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 3px 10px var(--border-glow);
}

/* BARRA DE TAGS DINÂMICAS */
.tags-bar-wrapper {
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}

.tags-bar-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tags-pills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill-btn {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    color: var(--brand-cyber);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xs);
}

.tag-pill-btn:hover {
    background: var(--brand-cyber);
    color: #ffffff;
    border-color: var(--brand-cyber);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.msg-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

@media (max-width: 1024px) {
    .msg-editor-grid {
        grid-template-columns: 1fr;
    }
}

.msg-form-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow-md);
}

.msg-form-group {
    margin-bottom: 16px;
}

.msg-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.msg-form-group input,
.msg-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-main);
    line-height: 1.6;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xs);
}

.msg-form-group input:hover,
.msg-form-group textarea:hover {
    border-color: var(--input-border-hover);
}

.msg-form-group input:focus,
.msg-form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3.5px var(--border-glow);
    background-color: var(--surface-card);
}

.msg-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

#msg-whatsapp-texto {
    min-height: 340px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace !important;
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
}

.msg-form-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

/* LIVE PREVIEW - E-MAIL */
.email-mockup-wrapper {
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.email-mockup-topbar {
    background: var(--surface-hover);
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-sub);
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #f59e0b; }
.mockup-dot.green { background: #10b981; }

.email-mockup-subject {
    margin-left: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.email-card-preview {
    background: var(--surface-card);
    margin: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.email-card-header {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-badge-os {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
}

.email-card-body {
    padding: 22px;
}

.email-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 14px;
    background: rgba(56, 189, 248, 0.1);
}

.email-greeting {
    font-size: 1.15rem;
    color: var(--text-main);
    margin: 0 0 8px 0;
    font-weight: 800;
}

.email-text-main {
    color: var(--text-sub);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 18px;
    white-space: pre-line;
}

.email-data-table {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.84rem;
}

.email-data-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}
.email-data-row:last-child {
    border-bottom: none;
}
.email-data-row span:first-child {
    color: var(--text-muted);
}

.email-section-box {
    margin-bottom: 18px;
}

.email-box-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.email-box-content {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-cyber);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.6;
}

.email-alert-orientacoes {
    background: var(--info-bg);
    border: 1px solid rgba(2, 132, 199, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--info);
    line-height: 1.5;
    margin-bottom: 18px;
    white-space: pre-line;
}

.email-card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

/* LIVE PREVIEW - WHATSAPP */
.whatsapp-mockup-wrapper {
    background: #0b141a;
    border: 1px solid #222d34;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
}

.whatsapp-phone-header {
    background: #202c33;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #2a3942;
}

.wa-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
}

.wa-user-info strong {
    display: block;
    color: #e9edef;
    font-size: 0.9rem;
}

.wa-user-info small {
    color: #00a884;
    font-size: 0.74rem;
    font-weight: 600;
}

.whatsapp-chat-area {
    padding: 20px 16px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.whatsapp-chat-bubble.outgoing {
    background: #005c4b;
    color: #e9edef;
    padding: 12px 15px;
    border-radius: 10px 0 10px 10px;
    max-width: 90%;
    margin-left: auto;
    font-size: 0.88rem;
    line-height: 1.55;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    position: relative;
}

.whatsapp-bubble-content {
    white-space: pre-wrap;
    word-break: break-word;
    color: #e9edef;
}

.whatsapp-bubble-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.wa-ticks {
    color: #53bdeb;
    font-weight: 700;
}

/* ==========================================================
   ASSINATURA DE E-MAIL PROFISSIONAL DO ADMIN
   ========================================================== */
.signature-preview-box {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    transition: all 0.25s ease;
}

.signature-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.signature-preview-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.signature-badge-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--brand-cyber);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.signature-email-render-area {
    background: #0f172a;
    border: 1.5px solid #334155;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 18px;
    overflow-x: auto;
}

body.light-mode .signature-email-render-area {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

.signature-instructions-card {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-primary);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: var(--text-sub);
    line-height: 1.55;
}

.signature-instructions-card strong {
    color: var(--text-main);
}

.signature-instructions-card ol {
    margin: 8px 0 0 0;
    padding-left: 18px;
}

.signature-instructions-card li {
    margin-bottom: 4px;
}

/* SELETOR DE SIMULAÇÃO DA ASSINATURA */
.signature-sim-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--surface-sub);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.signature-sim-label {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.signature-sim-btn {
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.15s ease;
}

.signature-sim-btn:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.signature-sim-btn.active {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px var(--border-glow);
}

/* BARRA DE RESPOSTAS RÁPIDAS (MACROS) NO MODAL DE RESPOSTA */
.macro-quick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 9px;
}

.macro-chip-btn {
    padding: 4px 10px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.macro-chip-btn:hover {
    background: var(--surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

/* ==========================================================
   SELETORES DE VISUALIZAÇÃO (CALENDÁRIO & KANBAN)
   ========================================================== */
.cal-view-selector {
    display: inline-flex;
    align-items: center;
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 9px;
    padding: 3px;
    gap: 3px;
    box-shadow: var(--shadow-xs);
}

.cal-view-btn {
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.cal-view-btn:hover {
    color: var(--text-main);
    background: var(--surface-hover);
}

.cal-view-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px var(--border-glow);
}

/* ==========================================================
   CALENDÁRIO MULTI-VISÃO: SEMANAL & DIÁRIO
   ========================================================== */
.calendar-semana-wrapper {
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.calendar-semana-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(135px, 1fr));
    gap: 8px;
    min-width: 820px;
}

.calendar-semana-col {
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    transition: border-color 0.2s ease;
}

.calendar-semana-col.today {
    border-color: var(--brand-primary);
    background: var(--brand-primary-light);
}

.calendar-semana-header {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1.5px solid var(--border-color);
    background: var(--surface-card);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.calendar-semana-header .sem-dia-nome {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-sub);
    letter-spacing: 0.05em;
}

.calendar-semana-header .sem-dia-num {
    display: inline-block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 2px;
}

.calendar-semana-col.today .sem-dia-num {
    color: var(--brand-primary);
}

.calendar-semana-events {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.calendar-event-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-left: 3.5px solid var(--brand-cyber);
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 0.76rem;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-event-card:hover {
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-hover);
}

.calendar-event-card .ev-hora {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.calendar-event-card .ev-titulo {
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    word-break: break-word;
}

.calendar-event-card .ev-tecnico {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    display: block;
}

/* Visão Diária */
.calendar-dia-wrapper {
    margin-top: 14px;
}

.calendar-dia-timeline {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.calendar-dia-banner {
    padding: 14px 18px;
    background: var(--surface-sub);
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-dia-banner h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
}

.calendar-dia-slot {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    min-height: 52px;
    align-items: stretch;
    transition: background-color 0.15s ease;
}

.calendar-dia-slot:last-child {
    border-bottom: none;
}

.calendar-dia-slot:hover {
    background-color: var(--surface-hover);
}

.calendar-dia-hora {
    width: 70px;
    min-width: 70px;
    padding: 10px;
    border-right: 1.5px solid var(--border-color);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-sub);
    font-family: 'JetBrains Mono', monospace;
    background: var(--surface-sub);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.calendar-dia-slot-content {
    flex: 1;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

/* ==========================================================
   QUADRO KANBAN DE CHAMADOS (DRAG & DROP)
   ========================================================== */
.kanban-board-wrapper {
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.kanban-board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
    width: 100%;
    min-width: 900px;
    align-items: start;
}

/* Barra de Abas Rápidas do Kanban Mobile (Oculta na Versão Web Desktop) */
.kanban-mobile-tabs {
    display: none !important;
}

@media (min-width: 768px) {
    #kanban-mobile-tabs,
    .kanban-mobile-tabs {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .kanban-mobile-tabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 6px 2px 10px 2px;
        margin-bottom: 10px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        position: sticky;
        top: 0;
        z-index: 35;
        background: var(--surface-bg);
    }
    .kanban-mobile-tabs::-webkit-scrollbar {
        display: none;
    }
    .kanban-tab-btn {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 12px;
        border-radius: 20px;
        background: var(--surface-card);
        border: 1.5px solid var(--border-color);
        color: var(--text-sub);
        font-size: 0.78rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        white-space: nowrap;
        outline: none;
    }
    .kanban-tab-btn:active {
        transform: scale(0.96);
    }
    .kanban-tab-btn.active {
        background: var(--surface-sub);
        border-color: var(--brand-primary);
        color: var(--text-main);
        box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
    }
    .kanban-tab-badge {
        background: rgba(255, 255, 255, 0.1);
        padding: 1px 7px;
        border-radius: 12px;
        font-size: 0.72rem;
        font-weight: 800;
        color: var(--text-sub);
    }
    .kanban-tab-btn.active .kanban-tab-badge {
        background: var(--brand-primary);
        color: #ffffff;
    }
    body.theme-light .kanban-tab-badge {
        background: rgba(15, 23, 42, 0.08);
    }

    /* Container do Kanban com Scroll Suave e Peek da Próxima Coluna */
    .kanban-board-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px;
        margin-left: -8px;
        margin-right: -8px;
        padding-left: 8px;
        padding-right: 28px; /* Permite espiar claramente a próxima coluna */
        width: calc(100% + 16px);
    }
    .kanban-board-grid {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: max-content;
        min-width: 100%;
    }
    /* Colunas Compactas: visual peek de 22vw da próxima coluna */
    .kanban-column {
        min-width: min(78vw, 310px) !important;
        max-width: min(78vw, 310px) !important;
        scroll-snap-align: start;
        flex-shrink: 0;
        min-height: auto;
        border-radius: 12px;
    }
    .kanban-col-header {
        padding: 10px 12px !important;
    }
    .kanban-col-title {
        font-size: 0.88rem !important;
    }
    .kanban-col-body {
        padding: 8px !important;
        gap: 8px !important;
        max-height: 68vh;
        overflow-y: auto;
    }
    /* Cards Compactos e Ergonômicos */
    .kanban-card {
        padding: 10px 12px !important;
        border-radius: 10px !important;
    }
    .kanban-card-top {
        margin-bottom: 4px !important;
    }
    .kanban-card-solicitante {
        font-size: 0.86rem !important;
        margin-bottom: 2px !important;
    }
    .kanban-card-desc {
        font-size: 0.76rem !important;
        margin-bottom: 6px !important;
        line-height: 1.35 !important;
    }
    .kanban-card-footer {
        padding-top: 6px !important;
        font-size: 0.70rem !important;
    }
    .kanban-move-select {
        display: none !important;
    }
}

.kanban-column {
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 480px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kanban-column.drag-over {
    border-color: var(--brand-primary);
    background: var(--brand-primary-light);
    box-shadow: 0 0 0 3px var(--border-glow);
}

.kanban-col-header {
    padding: 14px 16px;
    background: var(--surface-card);
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

.kanban-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.kanban-status-dot.dot-aberto { background: #0284c7; box-shadow: 0 0 8px rgba(2, 132, 199, 0.4); }
.kanban-status-dot.dot-progresso { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.kanban-status-dot.dot-aguardando { background: #8b5cf6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.4); }
.kanban-status-dot.dot-resolvido { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }

.kanban-col-count {
    background: var(--surface-sub);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.kanban-col-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.kanban-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow-xs);
    cursor: grab;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    will-change: transform;
}

.kanban-card.swiping {
    transition: none !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
    z-index: 20;
}

.kanban-card.swipe-animating {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease !important;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.kanban-card:active,
.kanban-card.dragging {
    cursor: grabbing;
    opacity: 0.6;
    transform: scale(0.98);
}

.kanban-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kanban-id-badge {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--brand-primary);
}

.kanban-card-solicitante {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-card-desc {
    font-size: 0.82rem;
    color: var(--text-sub);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 0.74rem;
    color: var(--text-muted);
}

.kanban-move-select {
    display: none !important;
}

/* ==========================================================
   PWA INSTALL BANNER (DESKTOP & MOBILE RESPONSIVO)
   ========================================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid #38bdf8;
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    z-index: 9999;
    max-width: 420px;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.pwa-banner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pwa-banner-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-banner-texts {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-subtitle {
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-pwa-instalar {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    white-space: nowrap;
}

.btn-pwa-instalar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

.btn-pwa-fechar {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-pwa-fechar:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

@media (max-width: 768px) {
    .pwa-install-banner {
        left: 16px;
        right: 16px;
        bottom: 84px;
        max-width: calc(100vw - 32px);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   ORDEM DE SERVIÇO (OS) TIMBRADA PARA IMPRESSÃO & PDF
   ========================================================== */
@media print {
    body * {
        visibility: hidden !important;
    }
    #area-impressao-os,
    #area-impressao-os * {
        visibility: visible !important;
    }
    #area-impressao-os {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        background: #ffffff !important;
        color: #000000 !important;
        display: block !important;
    }
}

.os-print-sheet {
    background: #ffffff;
    color: #0f172a;
    padding: 36px 40px;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    max-width: 800px;
    margin: 0 auto;
}

.os-header-timbrado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2.5px solid #0284c7;
    padding-bottom: 16px;
    margin-bottom: 22px;
}

.os-brand-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0284c7;
    margin: 0;
}

.os-brand-sub {
    font-size: 0.8rem;
    color: #475569;
    margin-top: 3px;
}

.os-number-badge {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    color: #0284c7;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: right;
}

.os-grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
}

.os-info-item strong {
    display: block;
    font-size: 0.74rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.os-info-item span {
    font-size: 0.92rem;
    color: #0f172a;
    font-weight: 600;
}

.os-section-box {
    margin-bottom: 20px;
}

.os-section-title {
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #0284c7;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.os-section-body {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #1e293b;
}

.os-financial-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 22px;
}

.os-financial-table th,
.os-financial-table td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    font-size: 0.86rem;
}

.os-financial-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
    text-align: left;
}

.os-financial-table tr.total-row td {
    background: #f0fdf4;
    color: #15803d;
    font-weight: 800;
    font-size: 1rem;
}

.os-signatures-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    padding-top: 20px;
}

.os-signature-block {
    text-align: center;
}

.os-signature-line {
    border-top: 1.5px solid #334155;
    margin-top: 50px;
    padding-top: 8px;
    font-size: 0.82rem;
    color: #334155;
    font-weight: 700;
}

.os-signature-img {
    max-height: 60px;
    margin-bottom: -15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================
   BOTÃO FLUTUANTE (FAB) DE NOVO CHAMADO & MODAL POPUP (PC & MOBILE)
   ========================================================== */
.fab-novo-chamado {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
    outline: none;
}

.fab-novo-chamado:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.6);
}

.fab-novo-chamado:active {
    transform: scale(0.96);
}

.fab-tooltip {
    position: absolute;
    right: 70px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: var(--shadow-md);
}

.fab-novo-chamado:hover .fab-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Modal Popup de Novo Chamado */
#dialog-novo-chamado {
    border: none;
    border-radius: 20px;
    padding: 0;
    margin: auto;
    width: calc(100% - 32px);
    max-width: 680px;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.45);
    background: transparent;
    animation: dialogPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#dialog-novo-chamado .dialog-card {
    background: var(--surface-card);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

/* Estilização Dinâmica de Cores para Prioridade do Chamado */
.prioridade-baixa {
    background-color: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
    font-weight: 800 !important;
}
body.dark-mode .prioridade-baixa {
    background-color: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
}

.prioridade-media {
    background-color: #fffbeb !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
    font-weight: 800 !important;
}
body.dark-mode .prioridade-media {
    background-color: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #fbbf24 !important;
}

.prioridade-alta {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
    font-weight: 800 !important;
}
body.dark-mode .prioridade-alta {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

/* ==========================================================
   ALTO CONTRASTE E CORREÇÃO VISUAL: MODAIS DE CLIENTES
   ========================================================== */
#dialog-novo-cliente-manual,
#dialog-editar-cliente {
    background: var(--surface-card) !important;
    color: var(--text-main) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-xl) !important;
}

#dialog-novo-cliente-manual label,
#dialog-editar-cliente label {
    color: var(--text-main) !important;
    font-weight: 700 !important;
    font-size: 0.84rem !important;
}

#dialog-novo-cliente-manual input,
#dialog-editar-cliente input {
    background: var(--input-bg) !important;
    color: var(--text-main) !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-size: 0.9rem !important;
}

#dialog-novo-cliente-manual input:focus,
#dialog-editar-cliente input:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px var(--brand-primary-light) !important;
}

.info-banner-cliente {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.35) !important;
    color: #065f46 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
}

body.dark-mode .info-banner-cliente {
    background: rgba(16, 185, 129, 0.16) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.5) !important;
    color: #6ee7b7 !important;
}

/* ==========================================================
   FOTOS E AVATARES DOS TÉCNICOS E ADMINISTRADOR
   ========================================================== */
.avatar-tec-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.avatar-tec-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--brand-primary);
    box-shadow: var(--shadow-sm);
    background: var(--surface-sub);
}

.avatar-tec-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), #1e40af);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.btn-alterar-foto-tec {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.btn-alterar-foto-tec:hover {
    transform: scale(1.15);
    background: var(--brand-primary);
}

.avatar-mini-inline {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--brand-primary);
    vertical-align: middle;
    display: inline-block;
}

/* ==========================================================
   ABA DE ORÇAMENTOS & PROPOSTAS COMERCIAIS
   ========================================================== */
.orcamentos-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.orcamentos-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
}

.orcamentos-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.orcamentos-table th {
    background: var(--surface-sub);
    padding: 12px 14px;
    font-weight: 800;
    color: var(--text-main);
    border-bottom: 1.5px solid var(--border-color);
    white-space: nowrap;
}

.orcamentos-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.orcamentos-table tr:hover {
    background: var(--surface-hover);
}

.badge-orcamento {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-orcamento.em_analise {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
body.dark-mode .badge-orcamento.em_analise {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.badge-orcamento.aprovado {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
body.dark-mode .badge-orcamento.aprovado {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.badge-orcamento.recusado {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
body.dark-mode .badge-orcamento.recusado {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.badge-orcamento.faturado {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
body.dark-mode .badge-orcamento.faturado {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-pdf-timbrado {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-pdf-timbrado:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5);
}

/* Botão de Atualizar e Limpeza de Cache de Orçamentos */
.btn-orc-atualizar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 9px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xs);
    user-select: none;
}

.btn-orc-atualizar:hover {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.btn-orc-atualizar:active {
    transform: translateY(0);
}

.btn-orc-atualizar:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

body.dark-mode .btn-orc-atualizar {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.25);
    color: #f1f5f9;
}

body.dark-mode .btn-orc-atualizar:hover {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

.icone-atualizar {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.95rem;
    line-height: 1;
}

.icone-atualizar.girando {
    animation: rotacionarIconeSync 0.65s linear infinite;
}

@keyframes rotacionarIconeSync {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.indicador-sync-orcamentos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-sub);
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

body.dark-mode .indicador-sync-orcamentos {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.sync-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    animation: pulsoSyncDot 2s ease-in-out infinite;
}

@keyframes pulsoSyncDot {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* Grids do Modal de Orçamento */
.orc-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.orc-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.orc-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.orc-itens-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}
.dialog-actions-orcamento {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
    width: 100%;
}
.dialog-actions-orcamento .btn-cancelar-orc {
    padding: 10px 18px;
    font-weight: 700;
}
.dialog-actions-orcamento .btn-salvar-orc {
    padding: 10px 22px;
    font-weight: 800;
}

/* Ações do Modal Novo Chamado */
.modal-ticket-actions-bar {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-top: 14px;
    flex-wrap: wrap;
}
.modal-ticket-actions-bar .btn-cancelar-ticket-modal {
    padding: 10px 18px;
    font-weight: 700;
}
.modal-ticket-actions-bar .btn-submit,
.modal-ticket-actions-bar .btn-whatsapp {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 700;
}

/* ==========================================================
   MODAL POPUP CORPORATIVO: NOVO AGENDAMENTO
   ========================================================== */
.dialog-agendamento {
    max-width: 540px;
    width: 95vw;
}

.dialog-agendamento .dialog-card {
    padding: 22px 24px;
}

.dialog-actions-agendamento {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    border-top: 1.5px solid var(--border-color);
    padding-top: 16px;
}

/* Botão de Novo Agendamento no cabeçalho do Calendário */
.cal-title-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-header-novo-agendamento {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-header-novo-agendamento:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-header-novo-agendamento:active {
    transform: scale(0.96);
}

/* Destaque pulsante no formulário ao clicar em agendar */
@keyframes pulseHighlightForm {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); transform: scale(1); }
    50% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); transform: scale(1.006); border-color: #2563eb; }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); transform: scale(1); }
}

.panel-highlight-pulse {
    animation: pulseHighlightForm 1.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-color: #2563eb !important;
}

/* ========================================================
   Garantia de Isolamento Desktop (PC): Elementos Mobile Ocultos
   ======================================================== */
.mobile-bottom-nav,
.mobile-fab-btn,
.fab-novo-chamado,
.mobile-central-view-switcher,
.mobile-sheet-backdrop,
.mobile-sheet-container,
.mobile-quick-filter-bar,
.sidebar-backdrop,
.mobile-only {
    display: none !important;
}

@media (min-width: 768px) {
    .mobile-bottom-nav,
    .mobile-fab-btn,
    .fab-novo-chamado,
    .mobile-central-view-switcher,
    .mobile-sheet-backdrop,
    .mobile-sheet-container,
    .mobile-quick-filter-bar,
    .sidebar-backdrop,
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: inline-flex !important;
    }

    #secao-novo-chamado,
    #secao-chamados-ativos {
        display: block !important;
    }
}



/* ==========================================================
   ENTERPRISE REVAMP: TOPBAR, BUSCA GLOBAL & LIVE STATUS
   ========================================================== */

.btn-topbar-search {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

@media (min-width: 900px) {
    .btn-topbar-search {
        display: inline-flex;
    }
}

.btn-topbar-search:hover {
    background: var(--surface-hover);
    border-color: var(--brand-primary);
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

body.dark-mode .btn-topbar-search {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

body.dark-mode .btn-topbar-search:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand-primary);
    color: #ffffff;
}

.search-kbd {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-family: monospace;
    font-weight: 700;
    color: var(--text-sub);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

body.dark-mode .search-kbd {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

/* Status Pill ao Vivo */
.sys-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 0.72rem;
    font-weight: 700;
    color: #059669;
    letter-spacing: 0.02em;
}

body.dark-mode .sys-live-pill {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.sys-live-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: live-pulse-anim 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes live-pulse-anim {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================
   SISTEMA DE NOTIFICAÇÕES TOAST (MODERNO & NÃO BLOQUEANTE)
   ========================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    max-width: 440px;
    width: min(440px, calc(100vw - 32px));
    box-sizing: border-box;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--surface-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .toast-item {
    background: #131c2e;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 36px -4px rgba(0, 0, 0, 0.55);
}

.toast-item.toast-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-item.toast-hide {
    opacity: 0;
    transform: translateY(-12px) scale(0.94);
}

.toast-item.toast-sucesso,
.toast-item.toast-success {
    border-left: 4px solid #10b981;
}

.toast-item.toast-erro,
.toast-item.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-item.toast-aviso,
.toast-item.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-item.toast-info {
    border-left: 4px solid #38bdf8;
}

.toast-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-main);
}

/* ==========================================================
   COMMAND PALETTE (BUSCA GLOBAL - CTRL + K)
   ========================================================== */
.command-palette-dialog {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 640px;
    width: 92vw;
    margin: 60px auto auto auto;
    border-radius: 16px;
    overflow: visible;
}

.command-palette-dialog::backdrop {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
}

.command-palette-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.dark-mode .command-palette-card {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.7);
}

.command-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--brand-primary);
}

.command-palette-header input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

body.dark-mode .command-palette-header input {
    color: #f8fafc;
}

.command-palette-close {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.command-palette-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
}

.command-palette-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.command-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.command-result-item:hover,
.command-result-item.selected {
    background: var(--brand-primary-light);
    border-color: rgba(37, 99, 235, 0.25);
}

body.dark-mode .command-result-item:hover,
body.dark-mode .command-result-item.selected {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

.command-palette-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--surface-sub);
}

/* ==========================================================
   PAINEL DO ADMINISTRADOR: HUB EXECUTIVO & ABAS DE GESTÃO
   ========================================================== */
.admin-modal-root {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    max-width: 960px;
    width: 94vw;
    margin: auto;
    border-radius: 20px;
    box-shadow: none;
}

.admin-modal-root::backdrop {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.admin-hub-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.45), 0 0 30px rgba(37, 99, 235, 0.08);
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow: hidden;
    padding: 0 !important;
    gap: 0 !important;
    width: 100%;
}

body.dark-mode .admin-hub-card {
    background: #0d1527;
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.12);
}

.admin-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 28px 16px 28px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    position: relative;
}

body.dark-mode .admin-hub-header {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.06) 0%, transparent 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.admin-hub-header-left {
    padding-right: 52px;
}

.admin-hub-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--brand-primary);
    background: var(--brand-primary-light);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

body.dark-mode .admin-hub-pill {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.35);
}

.admin-hub-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
}

body.dark-mode .admin-hub-title {
    color: #f8fafc;
}

.admin-hub-subtitle {
    font-size: 0.84rem;
    color: var(--text-sub);
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.admin-hub-close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 20;
    background: var(--surface-sub);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.admin-hub-close-btn:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
    transform: scale(1.05);
}

/* Barra de Abas do Hub Admin */
.admin-hub-tabs-nav {
    display: flex;
    gap: 8px;
    padding: 10px 24px;
    background: var(--surface-sub);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
}

body.dark-mode .admin-hub-tabs-nav {
    background: #090e1c;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.admin-hub-tab-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-sub);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-hub-tab-btn:hover {
    background: var(--surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

body.dark-mode .admin-hub-tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

body.dark-mode .admin-hub-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border-color: rgba(56, 189, 248, 0.4);
}

.admin-hub-tab-btn.active {
    background: linear-gradient(135deg, var(--brand-primary), #1d4ed8) !important;
    color: #ffffff !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

body.dark-mode .admin-hub-tab-btn.active {
    background: linear-gradient(135deg, #0284c7, #2563eb) !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35) !important;
}

.admin-hub-content {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

/* ==========================================================
   MATRIZ DE PERMISSÕES & CONTROLE DE ACESSO (ABA PRINCIPAL)
   ========================================================== */
.perm-selector-panel {
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}

body.dark-mode .perm-selector-panel {
    background: #111a2f;
    border-color: rgba(255, 255, 255, 0.1);
}

.perm-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.perm-tec-preview-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    min-width: 220px;
}

body.dark-mode .perm-tec-preview-card {
    background: #0b1222;
    border-color: rgba(255, 255, 255, 0.12);
}

.perm-quick-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}

.perm-quick-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.perm-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-perm-chip {
    -webkit-appearance: none;
    appearance: none;
    padding: 7px 13px;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.18s ease;
}

.chip-all-general {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.chip-all-general:hover {
    background: #10b981;
    color: #ffffff;
}

.chip-all-view {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.chip-all-view:hover {
    background: #f59e0b;
    color: #ffffff;
}

.chip-all-standard {
    background: rgba(56, 189, 248, 0.1);
    color: #0284c7;
    border-color: rgba(56, 189, 248, 0.3);
}

.chip-all-standard:hover {
    background: #0284c7;
    color: #ffffff;
}

.chip-save-perm {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
    padding: 7px 16px;
}

.chip-save-perm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.perm-master-banner {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 9px;
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.4;
}

.perm-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.78rem;
}

body.dark-mode .perm-matrix-legend {
    background: #0e1628;
    border-color: rgba(255, 255, 255, 0.08);
}

.legend-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.72rem;
    margin-right: 4px;
}

.badge-geral { background: rgba(16, 185, 129, 0.18); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-view { background: rgba(245, 158, 11, 0.18); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-none { background: rgba(239, 68, 68, 0.18); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.35); }

/* Grid de Cards dos Módulos */
.perm-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 14px;
}

.perm-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.perm-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

body.dark-mode .perm-card {
    background: #111a2f;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .perm-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.perm-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.perm-module-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

body.dark-mode .perm-module-icon {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
}

.perm-module-info {
    flex: 1;
    min-width: 0;
}

.perm-module-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.perm-module-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

body.dark-mode .perm-module-title {
    color: #f8fafc;
}

.perm-module-category {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
}

.perm-module-desc {
    font-size: 0.78rem;
    color: var(--text-sub);
    line-height: 1.35;
}

/* Segmented Control 3-States */
.perm-segmented-control {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}

body.dark-mode .perm-segmented-control {
    background: #090e1c;
    border-color: rgba(255, 255, 255, 0.08);
}

.perm-seg-btn {
    border: none;
    background: transparent;
    padding: 7px 4px;
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.perm-seg-btn:hover {
    color: var(--text-main);
}

.perm-seg-btn.active.seg-geral {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.perm-seg-btn.active.seg-visualizacao {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.perm-seg-btn.active.seg-nenhum {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.perm-seg-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* ==========================================================
   BOTÃO FLUTUANTE (FAB) DE NOVO CHAMADO - VERSÃO WEB
   ========================================================== */
.btn-fab-desktop {
    display: none;
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 990;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    padding: 12px 22px;
    font-size: 0.92rem;
    font-weight: 800;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.42), 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.btn-fab-desktop:hover {
    transform: translateY(-3px) scale(1.03);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.52), 0 6px 14px rgba(0, 0, 0, 0.2);
}

.btn-fab-desktop:active {
    transform: translateY(0) scale(0.98);
}

@media (min-width: 768px) {
    body.user-logado .btn-fab-desktop {
        display: inline-flex !important;
    }
}

/* ==========================================================
   BARRA DE PAGINAÇÃO DE ALTA RESOLUÇÃO - VERSÃO WEB
   ========================================================== */
.chamados-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    margin-top: 14px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

body.dark-mode .chamados-pagination-bar {
    background: #0d1527;
    border-color: rgba(255, 255, 255, 0.08);
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-sub);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-page-nav {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-sub);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-page-nav:hover:not(:disabled) {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    transform: translateY(-1px);
}

.btn-page-nav.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-page-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-size-select {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-sub);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================
   PAINEL DE CADASTRO DE TÉCNICOS NO ADMIN HUB
   ========================================================== */
.admin-new-tec-panel {
    background: var(--surface-sub);
    border: 1.5px dashed var(--brand-primary);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

body.dark-mode .admin-new-tec-panel {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(56, 189, 248, 0.4);
}

.admin-new-tec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

/* ==========================================================
   TRILHA DE AUDITORIA & VERSÕES DE ORÇAMENTOS
   ========================================================== */
.auditoria-panel-wrapper {
    padding: 6px 0;
}

.badge-auditoria {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

#dialog-orcamento-versoes table tr:hover,
#dialog-preview-relatorio-executivo table tr:hover,
#admin-subpane-auditoria table tr:hover {
    background: rgba(56, 189, 248, 0.04);
}

.btn-pdf-timbrado {
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand-primary);
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-pdf-timbrado:hover {
    background: var(--brand-primary);
    color: #ffffff;
}

/* ==========================================================
   ESTILOS DE ALTO CONTRASTE: TRILHA DE AUDITORIA & GESTÃO
   Compatível com Modo Claro e Modo Escuro
   ========================================================== */
.auditoria-panel-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auditoria-filters-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.auditoria-filter-busca-box {
    flex: 1;
    min-width: 220px;
}

.auditoria-filter-select-box {
    width: 200px;
}

.auditoria-input-clean,
.auditoria-select-clean {
    width: 100%;
    padding: 9px 14px;
    font-size: 0.86rem;
    border-radius: 9px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-main);
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auditoria-input-clean:focus,
.auditoria-select-clean:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Light mode specific para inputs de auditoria garantindo contraste impecável */
body:not(.dark-mode) .auditoria-input-clean,
body:not(.dark-mode) .auditoria-select-clean {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body:not(.dark-mode) .auditoria-input-clean::placeholder {
    color: #94a3b8 !important;
}

/* Tabela e Container de Auditoria */
.auditoria-table-container {
    max-height: 420px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    -webkit-overflow-scrolling: touch;
}

body:not(.dark-mode) .auditoria-table-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.auditoria-table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.auditoria-table-custom thead tr {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface-sub);
    border-bottom: 2px solid var(--border-color);
}

body:not(.dark-mode) .auditoria-table-custom thead tr {
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.auditoria-table-custom th {
    padding: 11px 14px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-sub);
    white-space: nowrap;
}

body:not(.dark-mode) .auditoria-table-custom th {
    color: #475569 !important;
}

.auditoria-row {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

body:not(.dark-mode) .auditoria-row {
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff;
}

body:not(.dark-mode) .auditoria-row:nth-child(even) {
    background: #fbfcfe;
}

body:not(.dark-mode) .auditoria-row:hover {
    background: #f0f9ff !important;
}

body.dark-mode .auditoria-row:hover {
    background: rgba(56, 189, 248, 0.08) !important;
}

.auditoria-td-data {
    padding: 11px 14px;
    font-size: 0.76rem;
    color: var(--text-sub);
    white-space: nowrap;
}

body:not(.dark-mode) .auditoria-td-data {
    color: #64748b !important;
}

.auditoria-td-autor {
    padding: 11px 14px;
}

.auditoria-autor-nome {
    color: var(--text-main);
    display: block;
    font-size: 0.84rem;
}

body:not(.dark-mode) .auditoria-autor-nome {
    color: #0f172a !important;
}

.auditoria-autor-tipo {
    font-size: 0.7rem;
    color: var(--text-sub);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

body:not(.dark-mode) .auditoria-autor-tipo {
    color: #94a3b8 !important;
}

.auditoria-td-modulo {
    padding: 11px 14px;
}

.auditoria-modulo-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.auditoria-td-acao {
    padding: 11px 14px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.83rem;
}

body:not(.dark-mode) .auditoria-td-acao {
    color: #1e293b !important;
}

.auditoria-td-detalhes {
    padding: 11px 14px;
    font-size: 0.78rem;
    color: var(--text-sub);
    max-width: 320px;
}

body:not(.dark-mode) .auditoria-td-detalhes {
    color: #475569 !important;
}

.auditoria-detalhes-txt {
    word-break: break-word;
    line-height: 1.35;
}

.auditoria-ip-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface-sub);
    color: var(--text-sub);
    border: 1px solid var(--border-color);
}

body:not(.dark-mode) .auditoria-ip-badge {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

.auditoria-loading-cell,
.auditoria-empty-cell {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-sub);
    font-size: 0.86rem;
}

body:not(.dark-mode) .auditoria-loading-cell,
body:not(.dark-mode) .auditoria-empty-cell {
    color: #64748b !important;
}

/* Seletor Inline de Status do Orçamento */
.orc-status-select-inline {
    margin-top: 3px;
    padding: 2px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--surface-sub);
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.orc-status-select-inline:hover {
    border-color: var(--brand-primary);
}

body:not(.dark-mode) .orc-status-select-inline {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* ==========================================================
   BOTÕES DE AÇÃO RÁPIDA: LINK DE ASSINATURA & WHATSAPP
   ========================================================== */
.orc-action-buttons-group {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-orc-link-copiar {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
    border: 1.5px solid rgba(2, 132, 199, 0.35);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-orc-link-copiar:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}

.btn-orc-whatsapp-enviar {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-orc-whatsapp-enviar:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ============================================================
   BOTÕES CORPORATIVOS UNIVERSAIS GURUINFO
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 9px 18px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    font-family: inherit !important;
    outline: none !important;
}

.btn-secondary {
    background: var(--surface-sub, #f8fafc) !important;
    color: var(--text-main, #0f172a) !important;
    border: 1.5px solid var(--border-color, #cbd5e1) !important;
    border-radius: 10px !important;
    padding: 9px 18px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    font-family: inherit !important;
    outline: none !important;
}

body.dark-mode .btn-secondary {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* ============================================================
   TABELAS CYBER
   ============================================================ */
.table-cyber {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.84rem !important;
    text-align: left !important;
    margin-bottom: 0 !important;
}

.table-cyber thead tr {
    background: #e2e8f0 !important;
    border-bottom: 2px solid #94a3b8 !important;
}

body.dark-mode .table-cyber thead tr {
    background: #1e293b !important;
    border-bottom: 2px solid #334155 !important;
}

.table-cyber th {
    padding: 12px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    border-top: none !important;
    border-bottom: 2px solid #94a3b8 !important;
}

body.dark-mode .table-cyber th {
    color: #94a3b8 !important;
    border-bottom: 2px solid #334155 !important;
}

.table-cyber tbody td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #cbd5e1 !important;
    color: var(--text-main, #020617) !important;
    font-size: 0.86rem !important;
    vertical-align: middle !important;
}

body.dark-mode .table-cyber tbody td {
    border-bottom: 1px solid #334155 !important;
    color: #f1f5f9 !important;
}

.table-cyber tbody tr:hover {
    background: rgba(29, 78, 216, 0.06) !important;
}

body.dark-mode .table-cyber tbody tr:hover {
    background: rgba(56, 189, 248, 0.08) !important;
}

/* =========================================================================
   INDICADOR PULL-TO-REFRESH NATIVO MOBILE (SILENCIOSO, SEM TOASTS)
   ========================================================================= */
#mobile-pull-indicator,
.mobile-pull-indicator {
    display: none !important;
    position: fixed !important;
    top: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-90px) !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: var(--surface, #ffffff) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18) !important;
    border: 1.5px solid var(--border-color, #e2e8f0) !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.15s ease !important;
    will-change: transform, opacity !important;
}

@media (max-width: 767px) {
    #mobile-pull-indicator.is-visible,
    .mobile-pull-indicator.is-visible {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    #mobile-pull-indicator,
    .mobile-pull-indicator {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        top: -9999px !important;
    }
}

body.dark-mode #mobile-pull-indicator,
body.dark-mode .mobile-pull-indicator {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45) !important;
}

#mobile-pull-indicator svg,
.mobile-pull-indicator svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    color: #0284c7 !important;
    transition: transform 0.08s linear !important;
    display: block !important;
}

body.dark-mode #mobile-pull-indicator svg,
body.dark-mode .mobile-pull-indicator svg {
    color: #38bdf8 !important;
}

#mobile-pull-indicator.is-syncing svg,
.mobile-pull-indicator.is-syncing svg {
    animation: spinPullIndicator 0.7s linear infinite !important;
}

@keyframes spinPullIndicator {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================================================================
   ★ CYBER COMMAND CENTER — KPI Cards Futuristas
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&display=swap');

/* Override stat-card para variante futurista */
.cyber-kpi-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--bg-c, rgba(99,102,241,0.06));
    border: 1.5px solid var(--border-c, rgba(99,102,241,0.3));
    border-radius: 16px;
    padding: 18px 20px 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cyber-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-c, rgba(99,102,241,0.5)), transparent);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cyber-kpi-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 0 0 1px var(--border-c, rgba(99,102,241,0.4)),
                0 8px 32px -4px var(--glow, rgba(99,102,241,0.3)),
                0 0 20px -8px var(--glow, rgba(99,102,241,0.2));
    border-color: var(--border-c, rgba(99,102,241,0.6));
}

.cyber-kpi-card:hover::before {
    opacity: 1;
}

.cyber-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
}

.cyber-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cyber-kpi-card:hover .cyber-kpi-icon {
    transform: scale(1.1) rotate(-4deg);
}

.cyber-kpi-badge {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.cyber-kpi-card .stat-value {
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Outfit', 'JetBrains Mono', monospace;
    line-height: 1;
    letter-spacing: -0.04em;
}

.cyber-kpi-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    margin-top: 2px;
}

.cyber-kpi-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bar-color, #818cf8) 0%, transparent 100%);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.cyber-kpi-card:hover .cyber-kpi-bar {
    opacity: 1;
}

.cyber-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    animation: pulse-cyber 2s infinite;
    flex-shrink: 0;
}

/* Animações */
@keyframes pulse-cyber {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.7); }
}

@keyframes pulse-cyan {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #00f5ff, 0 0 16px rgba(0,245,255,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 4px #00f5ff, 0 0 8px rgba(0,245,255,0.2); }
}

@keyframes pulse-warn {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.6); }
}

/* Relógio cyber & Ponto Eletrônico - Estabilidade visual anti-flicker e dígitos tabulares */
#cyber-clock,
#ponto-relogio-hora {
    font-variant-numeric: tabular-nums lining-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: contents;
    text-rendering: geometricPrecision;
    white-space: nowrap;
    contain: layout paint;
}


/* Grid de stats - responsivo futurista */
#dashboard-stats-grid.stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* Dashboard header oculto em modo solicitante (não-técnico) */
.solicitante-view #cyber-dashboard-header { display: none !important; }

/* ==========================================================================
   ★ THEME SUITE: CYBER COMMAND CENTER - PAINEL ULTRA FUTURISTA
   ========================================================================== */

/* Atmosfera de Fundo da Aplicação */
body.dark-mode .app-main-content {
    background: #0f1117 !important;
    background-attachment: fixed;
}

/* Navbar Executiva Futurista */
body.dark-mode .navbar {
    background: rgba(18, 20, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1.5px solid #232732 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    position: relative;
}

body.dark-mode .navbar::after {
    display: none;
}

/* Botão Hamburger Futurista */
body.dark-mode .btn-hamburger {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #00f5ff !important;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 245, 255, 0.1);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .btn-hamburger:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: #00f5ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.4);
    transform: scale(1.05);
}

/* Brand Logo Neon */
body.dark-mode .brand-logo {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .brand-title {
    background: linear-gradient(90deg, #ffffff, #c7d2fe, #67e8f9) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 900 !important;
}

/* Painéis de Conteúdo (Cards e Gráficos Glassmorphism) */
body.dark-mode:not(.theme-light):not([data-theme="clean-executive"]) .panel {
    background: rgba(13, 20, 37, 0.75) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    position: relative;
}

body.dark-mode .panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(0, 245, 255, 0.4), transparent);
    pointer-events: none;
}

body.dark-mode .panel:hover {
    border-color: rgba(0, 245, 255, 0.35) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.15) !important;
}

body.dark-mode .panel-header {
    border-bottom: 1px solid rgba(99, 102, 241, 0.18) !important;
}

body.dark-mode .panel-title {
    color: #f1f5f9 !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

/* Painel de Gráficos Analíticos */
body.dark-mode .painel-analitico-moderno {
    background: rgba(11, 17, 33, 0.85) !important;
    border: 1px solid rgba(0, 245, 255, 0.25) !important;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 245, 255, 0.08) !important;
}

body.dark-mode .chart-badge-pill {
    background: rgba(0, 245, 255, 0.12) !important;
    color: #00f5ff !important;
    border-color: rgba(0, 245, 255, 0.3) !important;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.2) !important;
}

body.dark-mode .chart-pill-btn {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    color: #94a3b8 !important;
    border-radius: 9999px !important;
    transition: all 0.2s ease !important;
}

body.dark-mode .chart-pill-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(0, 245, 255, 0.25)) !important;
    border-color: #00f5ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(0, 245, 255, 0.35) !important;
}

body.dark-mode .chart-nav-arrow {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #00f5ff !important;
    border-radius: 8px !important;
}

body.dark-mode .chart-nav-arrow:hover {
    background: rgba(0, 245, 255, 0.15) !important;
    border-color: #00f5ff !important;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.3) !important;
}

/* Barra de Busca e Filtros Rápidos */
body.dark-mode .search-input-box {
    background: rgba(10, 16, 30, 0.9) !important;
    border: 1.5px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.25s ease !important;
}

body.dark-mode .search-input-box:focus-within {
    border-color: #00f5ff !important;
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.2), 0 0 18px rgba(0, 245, 255, 0.25) !important;
}

body.dark-mode .search-input-box input {
    color: #f8fafc !important;
}

body.dark-mode .search-input-box input::placeholder {
    color: #64748b !important;
}

/* Chips de Filtros Estilo Display Holográfico */
body.dark-mode .chip-filter,
body.dark-mode .mobile-quick-chip {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    color: #94a3b8 !important;
    border-radius: 10px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.dark-mode .chip-filter:hover,
body.dark-mode .mobile-quick-chip:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    color: #e2e8f0 !important;
    transform: translateY(-1px);
}

body.dark-mode .chip-filter.active,
body.dark-mode .mobile-quick-chip.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(0, 245, 255, 0.18) 100%) !important;
    border: 1.5px solid #00f5ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Alternador Lista / Kanban Futurista */
body.dark-mode .cal-view-selector {
    background: rgba(10, 15, 29, 0.8) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 10px !important;
    padding: 3px !important;
}

body.dark-mode .cal-view-btn {
    color: #94a3b8 !important;
    border-radius: 7px !important;
    transition: all 0.2s ease !important;
}

body.dark-mode .cal-view-btn.active {
    background: linear-gradient(135deg, #4f46e5, #06b6d4) !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4) !important;
}

/* Chamados / Ticket Cards Executivos */
body.dark-mode .ticket-item {
    background: #181b22 !important;
    border: 1.5px solid #2d3340 !important;
    border-left: 4px solid var(--brand-primary, #10b981) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.dark-mode .ticket-item:hover {
    border-color: #4b5568 !important;
    background: #1e222b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .ticket-item.alta {
    border-left-color: #ef4444 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 4px 0 12px -4px rgba(239, 68, 68, 0.3) !important;
}

body.dark-mode .ticket-item.alta:hover {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(239, 68, 68, 0.25) !important;
}

/* Botões do Painel Futuristas */
body.dark-mode .btn-live-refresh {
    background: rgba(99, 102, 241, 0.12) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #a5b4fc !important;
    border-radius: 8px !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15) !important;
    transition: all 0.2s ease !important;
}

body.dark-mode .btn-live-refresh:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: #00f5ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.35) !important;
}

/* Kanban Futurista */
body.dark-mode .kanban-column {
    background: rgba(11, 17, 33, 0.75) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(10px) !important;
}

body.dark-mode .col-aberto {
    border-top: 3px solid #00f5ff !important;
}

body.dark-mode .col-progresso {
    border-top: 3px solid #a855f7 !important;
}

body.dark-mode .col-aguardando {
    border-top: 3px solid #fbbf24 !important;
}

body.dark-mode .col-resolvido {
    border-top: 3px solid #10b981 !important;
}

/* Barra Lateral Overlay & Transição no Mobile */
@media (max-width: 767px) {
    body.dark-mode.sidebar-mobile-open .app-sidebar {
        box-shadow: 12px 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 245, 255, 0.15) !important;
    }
    
    .sidebar-backdrop {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================================================
   ★ LIGHT MODE OVERRIDES — Cyber Dashboard, KPI, Painéis & Conteúdo
   Adapta todos os elementos hardcoded dark para os temas claros
   ========================================================================== */

/* Helper: detecta qualquer tema claro ativo */
body.theme-light,
body[data-theme="clean-executive"],
body[data-theme="nordic-frost"],
body[data-theme="warm-sand"] {
    /* Garante que o background do body use a variável correta */
    background-image: none !important;
}

/* --- Atmosfera do conteúdo principal --- */
body.theme-light .app-main-content,
body[data-theme="clean-executive"] .app-main-content,
body[data-theme="nordic-frost"] .app-main-content,
body[data-theme="warm-sand"] .app-main-content {
    background: var(--surface-bg) !important;
}

/* --- Cyber Dashboard Header (Banner "Sistema Online") --- */
body.theme-light #cyber-dashboard-header,
body[data-theme="clean-executive"] #cyber-dashboard-header,
body[data-theme="nordic-frost"] #cyber-dashboard-header,
body[data-theme="warm-sand"] #cyber-dashboard-header {
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 40%, #ede9fe 100%) !important;
    border: 1.5px solid var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
}

body.theme-light #cyber-dashboard-header > div[style*="opacity:0.04"],
body[data-theme="clean-executive"] #cyber-dashboard-header > div[style*="opacity:0.04"],
body[data-theme="nordic-frost"] #cyber-dashboard-header > div[style*="opacity:0.04"],
body[data-theme="warm-sand"] #cyber-dashboard-header > div[style*="opacity:0.04"] {
    opacity: 0.06 !important;
}

body.theme-light #cyber-dashboard-header h2,
body[data-theme="clean-executive"] #cyber-dashboard-header h2,
body[data-theme="nordic-frost"] #cyber-dashboard-header h2,
body[data-theme="warm-sand"] #cyber-dashboard-header h2 {
    background: linear-gradient(90deg, #0f172a 0%, #1e40af 60%, #2563eb 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body.theme-light #cyber-dashboard-header p,
body[data-theme="clean-executive"] #cyber-dashboard-header p,
body[data-theme="nordic-frost"] #cyber-dashboard-header p,
body[data-theme="warm-sand"] #cyber-dashboard-header p {
    color: var(--text-sub) !important;
}

body.theme-light #cyber-dashboard-header span[style*="color:#94a3b8"],
body[data-theme="clean-executive"] #cyber-dashboard-header span[style*="color:#94a3b8"],
body[data-theme="nordic-frost"] #cyber-dashboard-header span[style*="color:#94a3b8"],
body[data-theme="warm-sand"] #cyber-dashboard-header span[style*="color:#94a3b8"] {
    color: var(--text-muted) !important;
}

body.theme-light #cyber-clock,
body[data-theme="clean-executive"] #cyber-clock,
body[data-theme="nordic-frost"] #cyber-clock,
body[data-theme="warm-sand"] #cyber-clock {
    color: var(--brand-primary) !important;
    text-shadow: none !important;
}

body.theme-light #cyber-date,
body[data-theme="clean-executive"] #cyber-date,
body[data-theme="nordic-frost"] #cyber-date,
body[data-theme="warm-sand"] #cyber-date {
    color: var(--text-muted) !important;
}

/* --- KPI Cards Light Mode --- */
body.theme-light .cyber-kpi-card,
body[data-theme="clean-executive"] .cyber-kpi-card,
body[data-theme="nordic-frost"] .cyber-kpi-card,
body[data-theme="warm-sand"] .cyber-kpi-card {
    background: var(--surface-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.theme-light .cyber-kpi-card:hover,
body[data-theme="clean-executive"] .cyber-kpi-card:hover,
body[data-theme="nordic-frost"] .cyber-kpi-card:hover,
body[data-theme="warm-sand"] .cyber-kpi-card:hover {
    border-color: var(--brand-primary) !important;
    box-shadow: var(--shadow-md), 0 0 0 1px var(--brand-primary-light) !important;
}

body.theme-light .cyber-kpi-card .stat-value,
body[data-theme="clean-executive"] .cyber-kpi-card .stat-value,
body[data-theme="nordic-frost"] .cyber-kpi-card .stat-value,
body[data-theme="warm-sand"] .cyber-kpi-card .stat-value {
    color: var(--text-main) !important;
}

body.theme-light .cyber-kpi-label,
body[data-theme="clean-executive"] .cyber-kpi-label,
body[data-theme="nordic-frost"] .cyber-kpi-label,
body[data-theme="warm-sand"] .cyber-kpi-label {
    color: var(--text-sub) !important;
}

/* --- Navbar Light Mode --- */
body.theme-light .navbar,
body[data-theme="clean-executive"] .navbar,
body[data-theme="nordic-frost"] .navbar,
body[data-theme="warm-sand"] .navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1.5px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

body.theme-light .navbar::after,
body[data-theme="clean-executive"] .navbar::after,
body[data-theme="nordic-frost"] .navbar::after,
body[data-theme="warm-sand"] .navbar::after {
    display: none !important;
}

/* --- Painéis Light Mode --- */
body.theme-light .panel,
body[data-theme="clean-executive"] .panel,
body[data-theme="nordic-frost"] .panel,
body[data-theme="warm-sand"] .panel {
    background: var(--surface-card) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-sm) !important;
}

body.theme-light .panel::before,
body[data-theme="clean-executive"] .panel::before,
body[data-theme="nordic-frost"] .panel::before,
body[data-theme="warm-sand"] .panel::before {
    display: none !important;
}

body.theme-light .panel:hover,
body[data-theme="clean-executive"] .panel:hover,
body[data-theme="nordic-frost"] .panel:hover,
body[data-theme="warm-sand"] .panel:hover {
    border-color: var(--brand-primary) !important;
    box-shadow: var(--shadow-md) !important;
}

body.theme-light .panel-header,
body[data-theme="clean-executive"] .panel-header,
body[data-theme="nordic-frost"] .panel-header,
body[data-theme="warm-sand"] .panel-header {
    border-bottom-color: var(--border-color) !important;
}

body.theme-light .panel-title,
body[data-theme="clean-executive"] .panel-title,
body[data-theme="nordic-frost"] .panel-title,
body[data-theme="warm-sand"] .panel-title {
    color: var(--text-main) !important;
}

/* --- Painel Analítico Light Mode --- */
body.theme-light .painel-analitico-moderno,
body[data-theme="clean-executive"] .painel-analitico-moderno,
body[data-theme="nordic-frost"] .painel-analitico-moderno,
body[data-theme="warm-sand"] .painel-analitico-moderno {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* --- Botão Hamburger Light Mode --- */
body.theme-light .btn-hamburger,
body[data-theme="clean-executive"] .btn-hamburger,
body[data-theme="nordic-frost"] .btn-hamburger,
body[data-theme="warm-sand"] .btn-hamburger {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-xs) !important;
}

body.theme-light .btn-hamburger:hover,
body[data-theme="clean-executive"] .btn-hamburger:hover,
body[data-theme="nordic-frost"] .btn-hamburger:hover,
body[data-theme="warm-sand"] .btn-hamburger:hover {
    background: var(--brand-primary-light) !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
}

/* --- Brand Logo & Title Light Mode --- */
body.theme-light .brand-logo,
body[data-theme="clean-executive"] .brand-logo,
body[data-theme="nordic-frost"] .brand-logo,
body[data-theme="warm-sand"] .brand-logo {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

body.theme-light .brand-title,
body[data-theme="clean-executive"] .brand-title,
body[data-theme="nordic-frost"] .brand-title,
body[data-theme="warm-sand"] .brand-title {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    color: var(--text-main) !important;
    font-weight: 900 !important;
}

/* --- Chips de Filtros Light Mode --- */
body.theme-light .chip-filter,
body.theme-light .mobile-quick-chip,
body[data-theme="clean-executive"] .chip-filter,
body[data-theme="clean-executive"] .mobile-quick-chip,
body[data-theme="nordic-frost"] .chip-filter,
body[data-theme="nordic-frost"] .mobile-quick-chip,
body[data-theme="warm-sand"] .chip-filter,
body[data-theme="warm-sand"] .mobile-quick-chip {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-sub) !important;
}

body.theme-light .chip-filter:hover,
body.theme-light .mobile-quick-chip:hover,
body[data-theme="clean-executive"] .chip-filter:hover,
body[data-theme="clean-executive"] .mobile-quick-chip:hover,
body[data-theme="nordic-frost"] .chip-filter:hover,
body[data-theme="nordic-frost"] .mobile-quick-chip:hover,
body[data-theme="warm-sand"] .chip-filter:hover,
body[data-theme="warm-sand"] .mobile-quick-chip:hover {
    background: var(--brand-primary-light) !important;
    border-color: var(--brand-primary) !important;
    color: var(--text-main) !important;
}

body.theme-light .chip-filter.active,
body.theme-light .mobile-quick-chip.active,
body[data-theme="clean-executive"] .chip-filter.active,
body[data-theme="clean-executive"] .mobile-quick-chip.active,
body[data-theme="nordic-frost"] .chip-filter.active,
body[data-theme="nordic-frost"] .mobile-quick-chip.active,
body[data-theme="warm-sand"] .chip-filter.active,
body[data-theme="warm-sand"] .mobile-quick-chip.active {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-sm) !important;
}

/* --- Search Input Light Mode --- */
body.theme-light .search-input-box,
body[data-theme="clean-executive"] .search-input-box,
body[data-theme="nordic-frost"] .search-input-box,
body[data-theme="warm-sand"] .search-input-box {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    box-shadow: var(--shadow-xs) !important;
}

body.theme-light .search-input-box:focus-within,
body[data-theme="clean-executive"] .search-input-box:focus-within,
body[data-theme="nordic-frost"] .search-input-box:focus-within,
body[data-theme="warm-sand"] .search-input-box:focus-within {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px var(--brand-primary-light) !important;
}

body.theme-light .search-input-box input,
body[data-theme="clean-executive"] .search-input-box input,
body[data-theme="nordic-frost"] .search-input-box input,
body[data-theme="warm-sand"] .search-input-box input {
    color: var(--text-main) !important;
}

body.theme-light .search-input-box input::placeholder,
body[data-theme="clean-executive"] .search-input-box input::placeholder,
body[data-theme="nordic-frost"] .search-input-box input::placeholder,
body[data-theme="warm-sand"] .search-input-box input::placeholder {
    color: var(--text-muted) !important;
}

/* --- Ticket Cards Light Mode --- */
body.theme-light .ticket-item,
body[data-theme="clean-executive"] .ticket-item,
body[data-theme="nordic-frost"] .ticket-item,
body[data-theme="warm-sand"] .ticket-item {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    border-left: 4px solid var(--brand-primary) !important;
    box-shadow: var(--shadow-xs) !important;
    backdrop-filter: none !important;
}

body.theme-light .ticket-item:hover,
body[data-theme="clean-executive"] .ticket-item:hover,
body[data-theme="nordic-frost"] .ticket-item:hover,
body[data-theme="warm-sand"] .ticket-item:hover {
    border-color: var(--brand-primary) !important;
    background: var(--surface-hover) !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px) !important;
}

/* --- Chart Controls Light Mode --- */
body.theme-light .chart-pill-btn,
body[data-theme="clean-executive"] .chart-pill-btn,
body[data-theme="nordic-frost"] .chart-pill-btn,
body[data-theme="warm-sand"] .chart-pill-btn {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-sub) !important;
}

body.theme-light .chart-pill-btn.active,
body[data-theme="clean-executive"] .chart-pill-btn.active,
body[data-theme="nordic-frost"] .chart-pill-btn.active,
body[data-theme="warm-sand"] .chart-pill-btn.active {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-sm) !important;
}

body.theme-light .chart-nav-arrow,
body[data-theme="clean-executive"] .chart-nav-arrow,
body[data-theme="nordic-frost"] .chart-nav-arrow,
body[data-theme="warm-sand"] .chart-nav-arrow {
    background: var(--surface-card) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

body.theme-light .chart-nav-arrow:hover,
body[data-theme="clean-executive"] .chart-nav-arrow:hover,
body[data-theme="nordic-frost"] .chart-nav-arrow:hover,
body[data-theme="warm-sand"] .chart-nav-arrow:hover {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

/* --- Kanban Light Mode --- */
body.theme-light .kanban-column,
body[data-theme="clean-executive"] .kanban-column,
body[data-theme="nordic-frost"] .kanban-column,
body[data-theme="warm-sand"] .kanban-column {
    background: var(--surface-sub) !important;
    border: 1.5px solid var(--border-color) !important;
    backdrop-filter: none !important;
}

/* --- Alternador Lista/Kanban Light Mode --- */
body.theme-light .cal-view-selector,
body[data-theme="clean-executive"] .cal-view-selector,
body[data-theme="nordic-frost"] .cal-view-selector,
body[data-theme="warm-sand"] .cal-view-selector {
    background: var(--surface-sub) !important;
    border: 1.5px solid var(--border-color) !important;
}

body.theme-light .cal-view-btn,
body[data-theme="clean-executive"] .cal-view-btn,
body[data-theme="nordic-frost"] .cal-view-btn,
body[data-theme="warm-sand"] .cal-view-btn {
    color: var(--text-sub) !important;
}

body.theme-light .cal-view-btn.active,
body[data-theme="clean-executive"] .cal-view-btn.active,
body[data-theme="nordic-frost"] .cal-view-btn.active,
body[data-theme="warm-sand"] .cal-view-btn.active {
    background: var(--brand-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-sm) !important;
}

/* --- Botões do Painel Light Mode --- */
body.theme-light .btn-live-refresh,
body[data-theme="clean-executive"] .btn-live-refresh,
body[data-theme="nordic-frost"] .btn-live-refresh,
body[data-theme="warm-sand"] .btn-live-refresh {
    background: var(--brand-primary-light) !important;
    border: 1.5px solid var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    box-shadow: none !important;
}

body.theme-light .btn-live-refresh:hover,
body[data-theme="clean-executive"] .btn-live-refresh:hover,
body[data-theme="nordic-frost"] .btn-live-refresh:hover,
body[data-theme="warm-sand"] .btn-live-refresh:hover {
    background: var(--brand-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-sm) !important;
}

/* --- Badge Pill Light Mode --- */
body.theme-light .chart-badge-pill,
body[data-theme="clean-executive"] .chart-badge-pill,
body[data-theme="nordic-frost"] .chart-badge-pill,
body[data-theme="warm-sand"] .chart-badge-pill {
    background: var(--brand-primary-light) !important;
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: none !important;
}

/* --- Mobile Bottom Nav Light Mode --- */
@media (max-width: 767px) {
    body.theme-light .mobile-bottom-nav,
    body[data-theme="clean-executive"] .mobile-bottom-nav,
    body[data-theme="nordic-frost"] .mobile-bottom-nav,
    body[data-theme="warm-sand"] .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.96) !important;
        border-top: 1.5px solid var(--border-color) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
    }
}

/* ==========================================================================
   ★ BANNER "SISTEMA ONLINE" — Centralização de Conteúdo
   ========================================================================== */
#cyber-dashboard-header {
    text-align: center !important;
    justify-content: center !important;
}

#cyber-dashboard-header > div[style*="z-index:2"] {
    text-align: center !important;
    align-items: center !important;
    display: flex !important;
    flex-direction: column !important;
}

#cyber-dashboard-header > div[style*="z-index:2"] > div[style*="display:flex"] {
    justify-content: center !important;
}

#cyber-dashboard-header > div[style*="flex-direction:column"] {
    align-items: center !important;
}

/* ==========================================================================
   ★ PERFORMANCE & FLUIDEZ ENGINE (ACELERAÇÃO POR HARDWARE / GPU)
   Garante 60 FPS estáveis, suavidade ao toque e eliminação de engasgos
   ========================================================================== */
html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modais, drawers e cards renderizados na GPU via composição de hardware 3D */
.modal-backdrop,
.modal-rh-backdrop,
.modal-backdrop-estoque,
.modal-card,
.modal-card-estoque,
.modal-camera-card,
.ticket-card,
.card,
.sidebar,
.notification-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Transições ultra fluidas com cubic-bezier nativo */
.ticket-card,
.card,
.btn-primary,
.btn-secondary,
.sidebar-link,
.tab-btn {
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.18s ease, 
                background-color 0.18s ease;
}

/* Rolagem móvel nativa com amortecimento cinético */
.container,
.main-content,
.tab-pane,
.modal-card,
.modal-card-estoque,
.table-responsive,
.kanban-board {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* Previne recálculo de layout ao focar inputs */
input, select, textarea, button {
    touch-action: manipulation;
}

/* ==========================================================
   DEPARTAMENTO FINANCEIRO & FATURAMENTO
   ========================================================== */
.view-financeiro-container {
    padding: 0 4px 40px 4px;
    animation: fadeInTab 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fin-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(2, 132, 199, 0.08) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 22px;
}

.fin-title-group h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px 0;
}

.fin-title-group p {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin: 0;
}

.fin-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn-fin-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
    transition: all 0.15s ease;
}

.btn-fin-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.35);
}

.btn-fin-outline {
    background: var(--surface-card);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    padding: 8.5px 15px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-fin-outline:hover {
    background: var(--surface-sub);
    border-color: var(--brand-primary);
    transform: translateY(-1.5px);
}

.fin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-fin-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.kpi-fin-card:hover {
    transform: translateY(-2px);
    border-color: #10b981;
    box-shadow: var(--shadow-md);
}

.kpi-fin-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kpi-fin-card-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-sub);
}

.kpi-fin-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(16, 185, 129, 0.12);
}

.kpi-fin-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.kpi-fin-footer {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.fin-subtabs-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.fin-subtabs-bar::-webkit-scrollbar {
    display: none;
}

.fin-subtab-btn {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-sub);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.fin-subtab-btn.active {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.fin-table-container {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}

.fin-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
}

.fin-table th {
    background: var(--surface-sub);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid var(--border-color);
}

.fin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.86rem;
    color: var(--text-main);
    vertical-align: middle;
}

.fin-table tr:hover td {
    background: var(--surface-hover);
}

.badge-fin-receita {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
}

.badge-fin-despesa {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
}

.badge-fin-categoria {
    background: var(--surface-sub);
    color: var(--text-sub);
    border: 1px solid var(--border-color);
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-fin-pago {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-fin-pendente {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-fin-positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.82rem;
}

.badge-fin-negative {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.82rem;
}

.dre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dre-box {
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.dre-box-title {
    font-size: 0.96rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 10px;
}

.dre-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.86rem;
    color: var(--text-sub);
}

.dre-line strong {
    color: var(--text-main);
    font-size: 0.92rem;
}

.dre-line.total-line {
    border-top: 1.5px solid var(--border-color);
    border-bottom: none;
    padding-top: 14px;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-main);
}

/* ==========================================================
   RESTRIÇÕES DE INTERFACE PARA PERFIL CLIENTE / SOLICITANTE
   ========================================================== */
body.user-solicitante #sidebar-item-ajuda-search,
body.user-solicitante #sidebar-item-manual,
body.user-solicitante #modal-acesso-remoto,
body.user-solicitante .remoto-timer-card,
body.user-solicitante #remoto-bloco-cronometro {
    display: none !important;
}

/* ==========================================================
   OMNISEARCH (BUSCA GLOBAL UNIFICADA CTRL + K)
   ========================================================== */
.btn-omnisearch-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 9px;
    color: var(--text-sub);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 240px;
}

.btn-omnisearch-trigger:hover {
    background: var(--surface-card);
    border-color: var(--brand-primary);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.omnisearch-icon {
    font-size: 0.9rem;
}

.omnisearch-text {
    font-weight: 600;
    white-space: nowrap;
}

.omnisearch-kbd {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: 800;
    font-family: inherit;
    color: var(--text-sub);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

body.dark-mode .omnisearch-kbd {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

@media (max-width: 767px) {
    .omnisearch-text,
    .omnisearch-kbd {
        display: none;
    }
    .btn-omnisearch-trigger {
        padding: 7px 10px;
    }
}

/* Modal Omnisearch */
.omnisearch-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 16px 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.omnisearch-backdrop.active {
    display: flex;
    opacity: 1;
}

.omnisearch-box {
    width: 100%;
    max-width: 640px;
    background: var(--surface-card);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: omniIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh;
}

@keyframes omniIn {
    from { transform: scale(0.96) translateY(-10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

body.dark-mode .omnisearch-box {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.2);
}

.omnisearch-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1.5px solid var(--border-color);
    background: var(--surface-card);
}

body.dark-mode .omnisearch-header {
    background: #0f172a;
}

.omnisearch-header-icon {
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.omnisearch-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: inherit;
}

.omnisearch-close-btn {
    background: transparent;
    border: none;
    color: var(--text-sub);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 8px;
    transition: background 0.15s ease;
}

.omnisearch-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.omnisearch-results {
    overflow-y: auto;
    padding: 10px;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.omnisearch-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-sub);
    padding: 8px 12px 4px;
}

.omnisearch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.omnisearch-item:hover,
.omnisearch-item.selected {
    background: var(--surface-sub);
    border-color: var(--brand-primary);
    transform: translateX(2px);
}

body.dark-mode .omnisearch-item:hover,
body.dark-mode .omnisearch-item.selected {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.5);
}

.omnisearch-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-primary);
}

.omnisearch-item-info {
    flex: 1;
    min-width: 0;
}

.omnisearch-item-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.omnisearch-item-sub {
    font-size: 0.74rem;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.omnisearch-item-badge {
    font-size: 0.70rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-sub);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    flex-shrink: 0;
}

.omnisearch-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface-sub);
    border-top: 1px solid var(--border-color);
    font-size: 0.74rem;
    color: var(--text-sub);
}

/* ==========================================================
   BOTÃO DE SONS DE NOTIFICAÇÃO
   ========================================================== */
.btn-sound-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-sub);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-sound-toggle:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-sound-toggle.is-muted {
    opacity: 0.6;
    filter: grayscale(1);
}

/* ==========================================================
   FILTROS TEMPORAIS DO DASHBOARD
   ========================================================== */
.dash-period-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.dash-period-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.dash-period-btn.active {
    background: linear-gradient(135deg, #2563eb, #0284c7);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}



