/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   THEME SYSTEM: LIGHT & DARK MODE OVERRIDES
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

/* ═══════════════════════════════════════════════════════════
   MÓDULOS DESABILITADOS GLOBALMENTE (Como Usar / Tutoriais e Isabel I.A)
   ═══════════════════════════════════════════════════════════ */
#nav-treinamento,
#nav-ai,
#btn-floating-treinamento,
#isabel-hub-card,
#view-treinamento,
#view-ai,
.floating-treinamento-btn,
.isabel-hub-card,
.assistente-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* --- ESCURO (DARK MODE - DEFAULT) --- */
:root, html[data-theme="dark"], body.theme-dark {
    --bg: #0f172a !important;
    --bg-color: #0f172a !important;
    --card: #1e293b !important;
    --card-bg: #1e293b !important;
    --card-glass: rgba(30, 41, 59, 0.7) !important;
    --text: #f8fafc !important;
    --text-color: #f8fafc !important;
    --text-muted: #94a3b8 !important;
    --muted: #94a3b8 !important;
    --blue: #3b82f6 !important;
    --accent: #10b981 !important;
    --border: rgba(255, 255, 255, 0.1) !important;
    --border-color: rgba(255, 255, 255, 0.15) !important;
    --input-bg: #0f172a !important;
    --hover-bg: rgba(255, 255, 255, 0.08) !important;
    --btn-act-bg: #1e293b !important;
    --btn-act-text: #f8fafc !important;
    --table-header-bg: #1e293b !important;
    --table-row-border: rgba(255, 255, 255, 0.08) !important;
    color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .main-content,
body.theme-dark,
body.theme-dark .main-content {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] #sidebar,
body.theme-dark #sidebar {
    background-color: #0f172a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .security-bar,
body.theme-dark .security-bar {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .card-glass,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .portal-card,
html[data-theme="dark"] .app-card,
body.theme-dark .card-glass,
body.theme-dark .dashboard-card,
body.theme-dark .portal-card,
body.theme-dark .app-card {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .input-dark,
html[data-theme="dark"] input:not([type="button"]):not([type="submit"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
body.theme-dark .input-dark,
body.theme-dark input:not([type="button"]):not([type="submit"]),
body.theme-dark select,
body.theme-dark textarea {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .btn-act,
body.theme-dark .btn-act {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .btn-act:hover,
body.theme-dark .btn-act:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #3b82f6 !important;
}

html[data-theme="dark"] .audit-table th,
body.theme-dark .audit-table th {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .audit-table td,
body.theme-dark .audit-table td {
    color: #cbd5e1 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- CLARO (LIGHT MODE) --- */
/* --- CLARO (LIGHT MODE) --- */
html[data-theme="light"], body.theme-light {
    --bg: #f8fafc !important;
    --bg-color: #f8fafc !important;
    --card: #ffffff !important;
    --card-bg: #ffffff !important;
    --card-glass: #ffffff !important;
    --text: #0f172a !important;
    --text-color: #0f172a !important;
    --text-muted: #475569 !important;
    --muted: #475569 !important;
    --blue: #2563eb !important;
    --primary: #2563eb !important;
    --accent: #10b981 !important;
    --border: #e2e8f0 !important;
    --border-color: #e2e8f0 !important;
    --input-bg: #ffffff !important;
    --hover-bg: #f1f5f9 !important;
    --btn-act-bg: #ffffff !important;
    --btn-act-text: #0f172a !important;
    --table-header-bg: #f1f5f9 !important;
    --table-row-border: #f1f5f9 !important;
    color-scheme: light;
}

html[data-theme="light"] body,
html[data-theme="light"] .main-content,
body.theme-light,
body.theme-light .main-content {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

html[data-theme="light"] #sidebar,
body.theme-light #sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .security-bar,
body.theme-light .security-bar {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
}

html[data-theme="light"] .card-glass,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .portal-card,
html[data-theme="light"] .app-card,
html[data-theme="light"] .audit-table-wrapper,
body.theme-light .card-glass,
body.theme-light .dashboard-card,
body.theme-light .portal-card,
body.theme-light .app-card,
body.theme-light .audit-table-wrapper {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
}

html[data-theme="light"] .page-title,
html[data-theme="light"] .nav-text,
html[data-theme="light"] .nav-category,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
body.theme-light .page-title,
body.theme-light .nav-text,
body.theme-light .nav-category,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4 {
    color: #0f172a !important;
}

html[data-theme="light"] .input-dark,
html[data-theme="light"] input:not([type="button"]):not([type="submit"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea,
body.theme-light .input-dark,
body.theme-light input:not([type="button"]):not([type="submit"]),
body.theme-light select,
body.theme-light textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .input-dark:focus,
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus,
body.theme-light .input-dark:focus,
body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

html[data-theme="light"] .btn-act,
body.theme-light .btn-act {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .btn-act:hover,
body.theme-light .btn-act:hover {
    background: #f1f5f9 !important;
    color: #2563eb !important;
    border-color: #94a3b8 !important;
}

html[data-theme="light"] .audit-table th,
body.theme-light .audit-table th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-bottom-color: #e2e8f0 !important;
}

html[data-theme="light"] .audit-table td,
body.theme-light .audit-table td {
    color: #334155 !important;
    border-bottom-color: #f1f5f9 !important;
}

html[data-theme="light"] .dropdown-menu,
body.theme-light .dropdown-menu {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
}

/* ?????? Abas & Navega????o Interna no Modo Claro ?????? */
html[data-theme="light"] .tabs-container,
body.theme-light .tabs-container {
    border-bottom: 2px solid #e2e8f0 !important;
    background: transparent !important;
}

html[data-theme="light"] .tab-btn,
body.theme-light .tab-btn {
    color: #64748b !important;
    background: transparent !important;
    border-bottom: 3px solid transparent !important;
}

html[data-theme="light"] .tab-btn:hover,
body.theme-light .tab-btn:hover {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.05) !important;
}

html[data-theme="light"] .tab-btn.active,
body.theme-light .tab-btn.active {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    background: rgba(37, 99, 235, 0.08) !important;
    border-radius: 6px 6px 0 0;
}

/* Prospec????es CRM Tabs */
html[data-theme="light"] .prosp-tabs,
body.theme-light .prosp-tabs {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .prosp-tab,
body.theme-light .prosp-tab {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

html[data-theme="light"] .prosp-tab:hover,
body.theme-light .prosp-tab:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .prosp-tab.active,
body.theme-light .prosp-tab.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* ?????? Executive Bento Grid no Modo Claro ?????? */
html[data-theme="light"] .bento-hero-header,
body.theme-light .bento-hero-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .bento-hero-title,
body.theme-light .bento-hero-title {
    color: #0f172a !important;
}

html[data-theme="light"] .bento-hero-sub,
body.theme-light .bento-hero-sub {
    color: #64748b !important;
}

html[data-theme="light"] .bento-meta-pill,
body.theme-light .bento-meta-pill {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .bento-card,
body.theme-light .bento-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .bento-card-title,
body.theme-light .bento-card-title {
    color: #0f172a !important;
}

html[data-theme="light"] .bento-card-header,
body.theme-light .bento-card-header {
    border-bottom-color: #e2e8f0 !important;
}

/* Mural de Comunicados */
html[data-theme="light"] .comunicado-card,
body.theme-light .comunicado-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .comunicado-card:hover,
body.theme-light .comunicado-card:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .comunicado-title,
body.theme-light .comunicado-title {
    color: #0f172a !important;
}

html[data-theme="light"] .comunicado-snippet,
body.theme-light .comunicado-snippet {
    color: #64748b !important;
}

/* Personal Hub */
html[data-theme="light"] .hub-ponto-box,
body.theme-light .hub-ponto-box {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .hub-punch-slot,
body.theme-light .hub-punch-slot {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .hub-punch-slot .slot-time,
body.theme-light .hub-punch-slot .slot-time {
    color: #0f172a !important;
}

html[data-theme="light"] .hub-punch-slot.filled,
body.theme-light .hub-punch-slot.filled {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
}

html[data-theme="light"] .hub-punch-slot.filled .slot-time,
body.theme-light .hub-punch-slot.filled .slot-time {
    color: #059669 !important;
}

html[data-theme="light"] .hub-mini-card,
body.theme-light .hub-mini-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* ?????? Isabel AI Executive Command Center no Modo Claro ?????? */
html[data-theme="light"] .isabel-hub-card,
body.theme-light .isabel-hub-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .isabel-greet-title,
body.theme-light .isabel-greet-title {
    color: #0f172a !important;
}

html[data-theme="light"] .isabel-meta-sub,
body.theme-light .isabel-meta-sub {
    color: #64748b !important;
}

html[data-theme="light"] .isabel-unit-pill,
body.theme-light .isabel-unit-pill {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .btn-isabel-tool,
body.theme-light .btn-isabel-tool {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .btn-isabel-tool:hover,
body.theme-light .btn-isabel-tool:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .btn-isabel-tool.expand,
body.theme-light .btn-isabel-tool.expand {
    background: #f3e8ff !important;
    border-color: #d8b4fe !important;
    color: #7e22ce !important;
}

html[data-theme="light"] .isabel-briefing-bubble,
body.theme-light .isabel-briefing-bubble {
    background: #faf5ff !important;
    border-color: #e9d5ff !important;
    border-left-color: #a855f7 !important;
    box-shadow: 0 4px 15px -3px rgba(168, 85, 247, 0.08) !important;
}

html[data-theme="light"] .isabel-bubble-text,
body.theme-light .isabel-bubble-text {
    color: #1e1b4b !important;
}

html[data-theme="light"] .isabel-kpi-card,
body.theme-light .isabel-kpi-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="light"] .isabel-kpi-card:hover,
body.theme-light .isabel-kpi-card:hover {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .isabel-kpi-title,
body.theme-light .isabel-kpi-title {
    color: #0f172a !important;
}

html[data-theme="light"] .isabel-quick-prompt-bar,
body.theme-light .isabel-quick-prompt-bar {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] #isabel-quick-input,
body.theme-light #isabel-quick-input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] #isabel-quick-input:focus,
body.theme-light #isabel-quick-input:focus {
    border-color: #a855f7 !important;
    background: #ffffff !important;
}

html[data-theme="light"] .quick-chip,
body.theme-light .quick-chip {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .quick-chip:hover,
body.theme-light .quick-chip:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Aniversariantes do M??s (Modo Claro) */
html[data-theme="light"] .hero-aniv-widget,
body.theme-light .hero-aniv-widget {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .hero-aniv-item:hover,
body.theme-light .hero-aniv-item:hover {
    background: #f1f5f9 !important;
}

html[data-theme="light"] .hero-aniv-item.is-hoje,
body.theme-light .hero-aniv-item.is-hoje {
    background: #fdf2f8 !important;
    border-color: #fbcfe8 !important;
}

html[data-theme="light"] .hero-aniv-nome,
body.theme-light .hero-aniv-nome {
    color: #0f172a !important;
}

html[data-theme="light"] .hero-aniv-sub,
body.theme-light .hero-aniv-sub {
    color: #64748b !important;
}

html[data-theme="light"] .hero-aniv-badge,
body.theme-light .hero-aniv-badge {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .aniv-item,
body.theme-light .aniv-item {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .aniv-item:hover,
body.theme-light .aniv-item:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .aniv-item.is-hoje,
body.theme-light .aniv-item.is-hoje {
    background: #fdf2f8 !important;
    border-color: #fbcfe8 !important;
    border-left-color: #ec4899 !important;
}

html[data-theme="light"] .aniv-nome,
body.theme-light .aniv-nome {
    color: #0f172a !important;
}

html[data-theme="light"] .aniv-cargo,
body.theme-light .aniv-cargo {
    color: #64748b !important;
}

html[data-theme="light"] .aniv-day-badge,
body.theme-light .aniv-day-badge {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

/* Bento Search & Pills */
html[data-theme="light"] .bento-search-box input,
body.theme-light .bento-search-box input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .bento-pill,
body.theme-light .bento-pill {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

html[data-theme="light"] .bento-pill:hover,
body.theme-light .bento-pill:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .bento-pill.active,
body.theme-light .bento-pill.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

html[data-theme="light"] .bento-app-card,
body.theme-light .bento-app-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .bento-app-card:hover,
body.theme-light .bento-app-card:hover {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12) !important;
}

html[data-theme="light"] .bento-app-name,
body.theme-light .bento-app-name {
    color: #0f172a !important;
}

html[data-theme="light"] .bento-app-desc,
body.theme-light .bento-app-desc {
    color: #64748b !important;
}

html[data-theme="light"] .bento-app-icon-wrap,
body.theme-light .bento-app-icon-wrap {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.2) !important;
}

/* ?????? Isabel Assistente no Modo Claro ?????? */
html[data-theme="light"] .assistente-container,
body.theme-light .assistente-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .assistente-greeting h3,
body.theme-light .assistente-greeting h3 {
    color: #0f172a !important;
}

html[data-theme="light"] .assistente-bubble,
body.theme-light .assistente-bubble {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .ai-chat-container,
body.theme-light .ai-chat-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .ai-msg-assistant,
body.theme-light .ai-msg-assistant {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .ai-chip,
body.theme-light .ai-chip {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html[data-theme="light"] .ai-chip:hover,
body.theme-light .ai-chip:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .ai-chat-input,
body.theme-light .ai-chat-input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* ?????? Ponto & M??dulos no Modo Claro ?????? */
html[data-theme="light"] .ponto-semana-card,
body.theme-light .ponto-semana-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .ponto-semana-header,
body.theme-light .ponto-semana-header {
    background: #f8fafc !important;
    border-bottom-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .ponto-dia-item,
body.theme-light .ponto-dia-item {
    background: #ffffff !important;
    border-bottom-color: #f1f5f9 !important;
}

html[data-theme="light"] .ponto-dia-item:hover,
body.theme-light .ponto-dia-item:hover {
    background: #f8fafc !important;
}

html[data-theme="light"] .ponto-dia-badge,
body.theme-light .ponto-dia-badge {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .ponto-punch-pill,
body.theme-light .ponto-punch-pill {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .ponto-kpi-card,
body.theme-light .ponto-kpi-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .ponto-kpi-val,
body.theme-light .ponto-kpi-val {
    color: #0f172a !important;
}

/* ?????? Modais & Dialogs no Modo Claro ?????? */
html[data-theme="light"] dialog[open],
body.theme-light dialog[open] {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] dialog::backdrop,
body.theme-light dialog::backdrop {
    background: rgba(15, 23, 42, 0.4) !important;
}

html[data-theme="light"] .modal-actions,
body.theme-light .modal-actions {
    border-top-color: #e2e8f0 !important;
}

html[data-theme="light"] .cfg-card,
body.theme-light .cfg-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
}

/* ====== Seletor de Ambientes de Trabalho (Workspace Selector Photo Cards & Frosted Glass) ====== */
#workspace-selector-overlay {
    background: rgba(10, 15, 30, 0.45) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#workspace-selector-overlay.hidden {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

#workspace-selector-overlay:not(.hidden) {
    display: flex !important;
    pointer-events: auto !important;
}

html[data-theme="light"] #workspace-selector-overlay,
body.theme-light #workspace-selector-overlay {
    background: rgba(241, 245, 249, 0.60) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
}

.workspace-photo-card,
html[data-theme="light"] .workspace-photo-card,
body.theme-light .workspace-photo-card {
    min-height: 240px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    position: relative !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    padding: 26px 20px 22px !important;
    cursor: pointer !important;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease !important;
    border: 2px solid rgba(255, 255, 255, 0.30) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45) !important;
    text-align: center !important;
    background: #0f172a !important;
}

.workspace-photo-card:hover,
html[data-theme="light"] .workspace-photo-card:hover,
body.theme-light .workspace-photo-card:hover {
    transform: translateY(-8px) scale(1.015) !important;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.70) !important;
    opacity: 1 !important;
}

.workspace-photo-card.is-active,
html[data-theme="light"] .workspace-photo-card.is-active,
body.theme-light .workspace-photo-card.is-active {
    transform: translateY(-4px) scale(1.01) !important;
    opacity: 1 !important;
}

.workspace-card-bg-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 0 !important;
    pointer-events: none !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.workspace-photo-card:hover .workspace-card-bg-img {
    transform: scale(1.08) !important;
}

.workspace-card-scrim {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.58) 45%, rgba(15, 23, 42, 0.94) 100%) !important;
    z-index: 1 !important;
    pointer-events: none !important;
    transition: background 0.3s ease !important;
}

.workspace-photo-card:hover .workspace-card-scrim {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(15, 23, 42, 0.88) 100%) !important;
}

/* Protege os badges de não serem forçados ao fluxo relativo flex */
.workspace-photo-card > *:not(.workspace-card-bg-img):not(.workspace-card-scrim):not(.workspace-card-badge):not([id^="badge-unit-"]) {
    position: relative !important;
    z-index: 2 !important;
}

/* Badge Oficial com Radar Pulse Ancorado no Canto */
.workspace-card-badge {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 10 !important;
    display: none;
    align-items: center !important;
    gap: 7px !important;
    padding: 6px 14px !important;
    border-radius: 9999px !important;
    font-size: 0.70rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    pointer-events: none !important;
    color: #ffffff !important;
}

.workspace-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
    animation: workspaceLivePulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
    display: inline-block;
}

@keyframes workspaceLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}

.workspace-logo-box {
    height: 70px !important;
    max-width: 195px !important;
    margin: 0 auto 14px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.40), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
    padding: 8px 18px !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
}

.workspace-photo-card:hover .workspace-logo-box {
    transform: scale(1.05) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55) !important;
}

.workspace-card-title,
.workspace-photo-card h3,
#workspace-selector-overlay h3,
html[data-theme="light"] #workspace-selector-overlay h3,
body.theme-light #workspace-selector-overlay h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1.42rem !important;
    font-weight: 800 !important;
    margin-bottom: 6px !important;
    letter-spacing: 0.3px !important;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

.workspace-card-sub,
.workspace-photo-card p,
#workspace-selector-overlay p,
html[data-theme="light"] #workspace-selector-overlay p,
body.theme-light #workspace-selector-overlay p {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

/* Botão Fechar Seletor */
#btn-close-workspace-selector {
    position: absolute;
    top: -20px;
    right: 0;
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

#btn-close-workspace-selector:hover {
    background: rgba(239, 68, 68, 0.85) !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(1.08);
}

html[data-theme="light"] #btn-close-workspace-selector,
body.theme-light #btn-close-workspace-selector {
    background: rgba(15, 23, 42, 0.08) !important;
    border: 1px solid rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
}

html[data-theme="light"] #btn-close-workspace-selector:hover,
body.theme-light #btn-close-workspace-selector:hover {
    background: rgba(239, 68, 68, 0.9) !important;
    color: #ffffff !important;
}

/* Branded Switching Pod / Transição de Ambientes */
#unit-transition-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: rgba(10, 15, 30, 0.70) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#unit-transition-overlay.hidden {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

#unit-transition-overlay:not(.hidden) {
    display: flex !important;
    pointer-events: auto !important;
}

html[data-theme="light"] #unit-transition-overlay,
body.theme-light #unit-transition-overlay {
    background: rgba(248, 250, 252, 0.75) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
}

.unit-transition-card {
    max-width: 440px;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 36px 32px 30px;
    text-align: center;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(37, 99, 235, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    animation: podPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="light"] .unit-transition-card,
body.theme-light .unit-transition-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1.5px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15), 0 0 35px rgba(37, 99, 235, 0.10);
}

@keyframes podPopIn {
    0% { opacity: 0; transform: scale(0.92) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.unit-transition-glow-halo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    transition: all 0.3s ease;
}

.unit-transition-shimmer-track {
    width: 100%;
    max-width: 260px;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    overflow: hidden;
    margin: 22px auto 0;
    position: relative;
}

html[data-theme="light"] .unit-transition-shimmer-track,
body.theme-light .unit-transition-shimmer-track {
    background: rgba(15, 23, 42, 0.08);
}

.unit-transition-shimmer-bar {
    width: 0%;
    height: 100%;
    border-radius: 9999px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif; height: 100vh; overflow: hidden; transition: background-color 0.3s, color 0.3s; }
.hidden { display: none !important; }
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--card); border-left: 4px solid var(--accent); padding: 15px 20px; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border: 1px solid var(--border); animation: slideIn 0.3s ease-out; }
.toast.error { border-left-color: #ef4444; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
dialog:not([open]) { display: none !important; }
dialog[open] { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 2rem; width: 90%; max-width: 600px; max-height: 90vh !important; overflow-y: auto !important; background: var(--card, #1e293b) !important; color: var(--text, #f8fafc) !important; border: 1px solid var(--border, rgba(255,255,255,0.15)) !important; border-radius: 14px; box-shadow: 0 25px 50px rgba(0,0,0,0.7); z-index: 99999 !important; }
dialog::backdrop { background: rgba(0,0,0,0.75); backdrop-filter: blur(3px); }
#modal-crud-frota[open],
#modal-confirm-excluir-frota[open],
#modal-substituir-peca[open],
#modal-tr-parametros[open],
#modal-tr-manut[open],
#modal-tr-abast[open],
#modal-instalar-peca[open],
#modal-foto-grande-veiculo[open],
#modal-foto-veiculo-zoom[open],
#modal-estoque-movimentacoes[open],
#modal-instalar-direto-estoque[open] {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    transform: none !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999999 !important;
    background: var(--card-bg, #1e293b) !important;
    color: var(--text-color, #f8fafc) !important;
    border: 1px solid var(--border-color, rgba(255,255,255,0.15)) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.85) !important;
}
#modal-feedback-central-agro[open],
#modal-confirmar-precos-dia[open],
#modal-detalhes-orcamento-agro[open],
#modal-gerar-proposta-agro[open],
#modal-visualizar-proposta-a4[open],
#modal-visualizar-orcamento-a4[open],
#modal-zap-orcamento-preview[open],
#modal-historico-mudancas-proposta[open],
#modal-historico-precos[open],
#modal-proposta-agro-vendas[open],
#modal-produto-agro[open],
#modal-veiculo-agro[open],
#modal-condicao-agro[open] {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    transform: none !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: fit-content !important;
    z-index: 9999999 !important;
}
body.fa-modal-open-lock { overflow: hidden !important; }
#modal-crud-frota[open] { max-width: 860px !important; width: 95% !important; padding: 0 !important; max-height: 90vh !important; display: flex !important; flex-direction: column !important; overflow: hidden !important; }
#modal-confirm-excluir-frota[open] { max-width: 520px !important; width: 92% !important; padding: 24px !important; }
#modal-estoque-movimentacoes[open] { max-width: 780px !important; width: 95% !important; }
#modal-instalar-peca[open] { max-width: 680px !important; width: 95% !important; }
#modal-instalar-direto-estoque[open] { max-width: 640px !important; width: 95% !important; }
#modal-substituir-peca[open] { max-width: 580px !important; width: 95% !important; }
#modal-tr-parametros[open] { max-width: 600px !important; width: 95% !important; }
#modal-tr-manut[open] { max-width: 600px !important; width: 95% !important; }
#modal-tr-abast[open] { max-width: 540px !important; width: 95% !important; }
#modal-foto-veiculo-zoom[open] { max-width: 92vw !important; width: auto !important; padding: 20px !important; max-height: 92vh !important; }
#veiculo-novo-modal[open], #veiculo-editar-modal[open] { max-width: 440px !important; width: 95% !important; }
#reminder-alert-modal[open] { display: flex; align-items: center; justify-content: center; top: 0; left: 0; transform: none; padding: 0; }
.checklist-box { max-height: 150px; overflow-y: auto; border: 1px solid var(--border); padding: 10px; background: #f8fafc; border-radius: 5px; }
.grid-portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; padding-bottom: 40px; }
.grid-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; padding-bottom: 40px; }
.app-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 30px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 15px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.02); height: 100%; }
.app-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--blue); }
.app-card i { font-size: 3rem; color: var(--blue); margin-bottom: 10px; }
.section-title { font-size: 1rem; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px; margin-bottom: 15px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.portal-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 15px; transition: all 0.2s ease; position: relative; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); border-color: #cbd5e1; }
.portal-card.invalid-card { border: 1px solid #fecaca; background: #fff1f2; }
.pc-header { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.pc-icon { width: 40px; height: 40px; background: #f1f5f9; color: var(--blue); border-radius: 8px; display: grid; place-items: center; font-size: 1.2rem; overflow: hidden; }
.pc-icon img { width: 100%; height: 100%; object-fit: contain; }
.pc-title { font-size: 1.1rem; font-weight: 700; color: var(--blue); width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-badge { font-size: 0.7rem; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; color: var(--muted); font-weight:bold; }
.pc-badge.valid { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pc-badge.invalid { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.pc-badge.informado { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.pc-body { display: flex; flex-direction: column; gap: 12px; }
.data-field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 0.7rem; font-weight: bold; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.data-box { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 12px; font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; color: #334155; transition: 0.2s; }
.data-box:hover { border-color: #cbd5e1; background: #fff; }
.data-box i { color: #94a3b8; margin-right: 8px; width: 16px; text-align: center; }
.data-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Courier New', monospace; font-weight: 600; }
.action-icon { cursor: pointer; color: #64748b; padding: 4px; border-radius: 4px; transition: 0.2s; }
.action-icon:hover { background: #e2e8f0; color: var(--accent); }
.btn-access { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; background: var(--blue); color: #fff; border: none; border-radius: 6px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: 0.2s; text-decoration: none; }
.btn-access:hover { background: #1e293b; transform: scale(1.01); }
.pc-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; font-size: 0.8rem; color: #94a3b8; }
.pc-tools { display: flex; gap: 5px; }
.tool-btn { width: 28px; height: 28px; border-radius: 4px; border: 1px solid transparent; display: grid; place-items: center; color: #94a3b8; cursor: pointer; transition: 0.2s; }
.tool-btn:hover { background: #f1f5f9; color: var(--blue); }
.tool-btn.del:hover { background: #fef2f2; color: #ef4444; }
.tool-btn.warn { color: #f59e0b; } .tool-btn.warn:hover { background: #fffbeb; }
.btn-report-text { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 5px; transition: 0.2s; }
.btn-report-text:hover { background: #fef3c7; }
.invalid-box { background: rgba(255,255,255,0.7); border: 1px solid #fecaca; color: #b91c1c; padding: 10px; border-radius: 6px; font-size: 0.75rem; display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.invalid-box i { font-size: 1.2rem; }
.security-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 25px; 
    padding: 10px 18px; 
    background: #fff; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    color: var(--text); 
    box-shadow: 0 4px 15px -3px rgba(0,0,0,0.05); 
    font-family: 'Segoe UI', sans-serif; 
    position: relative;
    z-index: 50;
    max-height: 120px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                padding 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                margin-bottom 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}
.security-bar.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: translateY(-16px) !important;
    pointer-events: none !important;
    overflow: hidden !important;
}
.security-bar-revealer {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 4px 16px;
    color: var(--muted);
    font-size: 0.72rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    align-items: center;
    gap: 6px;
}
.security-bar-revealer:hover {
    color: var(--blue);
    background: #fff;
    padding-top: 7px;
    padding-bottom: 7px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}
html[data-theme="dark"] .security-bar-revealer,
body.theme-dark .security-bar-revealer {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    color: #94a3b8;
}
html[data-theme="dark"] .security-bar-revealer:hover,
body.theme-dark .security-bar-revealer:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #38bdf8;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
}
.sec-left, .sec-center, .sec-right { display: flex; align-items: center; }
.sec-left { gap: 8px; flex-shrink: 0; }
.sec-center { gap: 8px; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
.sec-right { gap: 8px; flex-shrink: 0; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--border); position: relative; z-index: 10; }
@media (max-width: 1400px) {
    .weather-city-hideable { display: none !important; }
}
@media (max-width: 1280px) {
    #bar-date { display: none !important; }
}
.sec-icon-btn { display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 10px; border-radius: 8px; background: transparent; cursor: pointer; transition: all 0.2s; position: relative; flex-shrink: 0; }
.sec-icon-btn:hover { background: #f1f5f9; }
.sec-icon-btn i { font-size: 1.15rem; color: var(--muted); }
.sec-icon-btn:hover i { color: var(--blue); }
.sec-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.badge-dot { position: absolute; top: -2px; right: -2px; background: #ef4444; color: #fff; font-size: 0.6rem; padding: 2px 6px; border-radius: 10px; font-weight: bold; border: 2px solid #fff; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), #8b5cf6); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; font-weight: 700; box-shadow: 0 4px 10px rgba(59,130,246,0.3); transition: transform 0.2s; overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.user-avatar:hover { transform: scale(1.05); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-large { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), #8b5cf6); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; margin: 0 auto; box-shadow: 0 4px 15px rgba(59,130,246,0.3); overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.dropdown-menu { position: absolute; top: calc(100% + 14px); background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 15px 35px -5px rgba(0,0,0,0.15); z-index: 9999; cursor: default; text-align: left; display: flex; flex-direction: column; overflow: hidden; animation: dropFade 0.2s ease-out forwards; }
.dropdown-menu::before { content: ''; position: absolute; top: -6px; right: 20px; width: 12px; height: 12px; background: var(--card); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
#bar-apps-menu::before { left: 20px; right: auto; }
.dropdown-header { padding: 15px; border-bottom: 1px solid var(--border); font-size: 0.85rem; font-weight: 700; color: var(--text); background: rgba(0,0,0,0.015); text-transform: uppercase; letter-spacing: 0.5px; }
.status-line { display: flex; align-items: center; gap: 12px; padding: 10px 5px; font-size: 0.85rem; color: var(--text); border-bottom: 1px solid rgba(0,0,0,0.03); }
.status-line:last-child { border-bottom: none; }
.status-line i { width: 16px; text-align: center; color: var(--muted); }
.btn-logout { width: 100%; padding: 12px; background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; border-radius: 8px; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: 0.2s; }
.btn-logout:hover { background: #fee2e2; }
@keyframes dropFade { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseWifi { 0% { opacity: 0.5; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.5; transform: scale(0.9); } }
.wifi-pulse { color: #22c55e !important; animation: pulseWifi 2s infinite; }
.lgpd-ok { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); border: 1px solid; }

/* ============================================================ */
/* BOTÃO DE ACESSO RÁPIDO & STATUS AO VIVO DO PONTO ELETRÔNICO */
/* ============================================================ */
.bar-ponto-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 12px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    user-select: none;
    margin: 0;
    height: 38px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.bar-ponto-widget:hover {
    transform: translateY(-1px);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.18);
    background: #fff;
}
html[data-theme="dark"] .bar-ponto-widget,
body.theme-dark .bar-ponto-widget {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .bar-ponto-widget:hover,
body.theme-dark .bar-ponto-widget:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #3b82f6 !important;
}
.bar-ponto-icon-box {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.bar-ponto-pulse-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    border: 1.5px solid var(--card, #fff);
    animation: pulseDot 2s infinite;
}
.bar-ponto-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    line-height: 1.15;
}
.bar-ponto-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
}
.bar-ponto-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.bar-ponto-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    white-space: nowrap;
}
.bar-ponto-sub-row {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* ============================================================ */
/* ABA RETRÁTIL FLUTUANTE: CENTRAL DE TREINAMENTO & COMO USAR   */
/* FIXADO NO CANTO INFERIOR DIREITO (MEIO RETRÁTIL)             */
/* ============================================================ */
.floating-treinamento-btn {
    position: fixed;
    bottom: 28px;
    right: 0;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px 8px 12px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #2563eb 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-right: none;
    border-radius: 30px 0 0 30px;
    cursor: pointer;
    box-shadow: -4px 8px 24px rgba(14, 165, 233, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
    user-select: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Meio retrátil no estado normal: deixa apenas a aba de 52px visível na borda direita */
    transform: translateX(calc(100% - 52px));
    transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease;
}

/* Ao passar o mouse ou focar, expande totalmente para a esquerda */
.floating-treinamento-btn:hover,
.floating-treinamento-btn:focus-visible,
.floating-treinamento-btn.expanded {
    transform: translateX(0);
    box-shadow: -6px 12px 32px rgba(14, 165, 233, 0.6), 0 4px 12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #1d4ed8 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Seta indicativa que anima no hover */
.floating-treina-retract-arrow {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    margin-right: -2px;
}

.floating-treinamento-btn:hover .floating-treina-retract-arrow {
    transform: translateX(-3px);
    color: #ffffff;
}

/* Quando expandido/ativo, vira seta para a direita */
.floating-treinamento-btn.active .floating-treina-retract-arrow i::before {
    content: "\f101"; /* fa-angles-right */
}

/* Ícone com brilho e efeito pulso */
.floating-treina-icon-box {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    flex-shrink: 0;
}

.floating-treina-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    animation: floatingTreinaPulse 2.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
    pointer-events: none;
}

@keyframes floatingTreinaPulse {
    0% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.38); opacity: 0; }
    100% { transform: scale(1.38); opacity: 0; }
}

.floating-treina-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    text-align: left;
    white-space: nowrap;
    pointer-events: none;
}

.floating-treina-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.floating-treina-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 4px;
}

.floating-treina-badge i {
    font-size: 0.60rem;
}

/* Estado ativo (quando visualizando a Central de Treinamento) */
.floating-treinamento-btn.active {
    transform: translateX(0) !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: -6px 8px 26px rgba(16, 185, 129, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Dark mode */
html[data-theme="dark"] .floating-treinamento-btn,
body.theme-dark .floating-treinamento-btn {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #1e40af 100%);
    border-color: rgba(56, 189, 248, 0.4);
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .floating-treinamento-btn {
        bottom: 18px;
        padding: 6px 14px 6px 10px;
        transform: translateX(calc(100% - 46px));
    }
    .floating-treina-icon-box {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .floating-treina-label {
        font-size: 0.70rem;
    }
    .floating-treina-badge {
        font-size: 0.62rem;
    }
}

@media (max-width: 1200px) {
    #bar-date { display: none; }
}
@media (max-width: 992px) {
    .bar-ponto-sub-row { display: none; }
    .bar-ponto-widget { padding: 3px 8px; height: 34px; }
    #bar-weather-item span { display: none; }
}
@media (max-width: 768px) {
    .security-bar { padding: 8px 12px; gap: 6px; }
    .sec-left { gap: 6px; }
    .sec-center { gap: 6px; }
    .sec-right { gap: 6px; }
    .bar-ponto-label { display: none; }
}
/* Motor Celestial Premium ??? background controlado pelo antigravity.js via JS */
.login-container { display: flex; height: 100vh; align-items: center; justify-content: center; position: relative; }
.login-box { padding: 3rem; border-radius: 12px; width: 100%; max-width: 400px; z-index: 10; }
.brand-logo-img { max-width: 180px; display: block; margin: 0 auto 15px auto; }
.brand-subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 30px; text-align: center; }
.input-group { margin-bottom: 15px; width: 100%; }
.input-group label { display: block; color: var(--muted); font-size: 0.8rem; margin-bottom: 5px; }
.input-group input, .input-dark, select { width: 100%; padding: 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 5px; outline: none; transition: 0.3s; }
.input-group input:focus { border-color: var(--blue); background: #fff; }
.btn-login { width: 100%; padding: 12px; background: var(--blue); color: #fff; border: none; border-radius: 5px; font-weight: 600; cursor: pointer; transition: 0.3s; margin-top: 10px; }
.btn-login:hover { filter: brightness(1.1); }
.login-footer { margin-top: 20px; font-size: 0.75rem; color: #64748b; text-align: center; }
#boot-overlay, #welcome-overlay { position: fixed; inset: 0; z-index: 10000; background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%); display: flex; align-items: center; justify-content: center; color: #0f172a; transition: opacity 0.5s ease; }
.boot-content, .welcome-content { text-align: center; width: 320px; }
.boot-icon { font-size: 3rem; color: #10b981; margin-bottom: 15px; animation: pulse 2s infinite; }
.boot-title { font-weight: bold; letter-spacing: 2px; margin-bottom: 20px; font-family: 'Segoe UI', sans-serif; color: #0f172a; }
.boot-bar-container { width: 100%; height: 3px; background: rgba(0,0,0,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.boot-bar-fill { height: 100%; background: #10b981; width: 0%; transition: width 0.3s ease; box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
.boot-log { font-family: 'Courier New', monospace; font-size: 0.85rem; color: #64748b; min-height: 1.2em; text-align: center; }
.welcome-icon { font-size: 4rem; color: #10b981; margin-bottom: 15px; }
.welcome-label { font-size: 0.8rem; letter-spacing: 2px; color: #64748b; margin-bottom: 10px; }
.welcome-name { font-size: 2rem; font-weight: bold; margin-bottom: 5px; color: #0f172a; }
.welcome-sub { color: #64748b; font-size: 1rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
.app-layout { display: flex; height: 100vh; }
.sidebar { width: 250px; background: var(--card); padding: 2rem 1.5rem; display: flex; flex-direction: column; border-right: 1px solid var(--border); transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1), padding 0.55s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.55s ease, opacity 0.4s ease; z-index: 100; overflow-y: auto; overflow-x: hidden; position: relative; }
.sidebar.collapsed { width: 0; padding: 0; border-color: transparent; }
.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed nav,
.sidebar.collapsed .nav-label { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease, visibility 0.2s ease; }

/* ?????? Bot??o Toggler (dentro da sidebar aberta) ?????? */
.sidebar-toggler {
    position: absolute; right: -14px; top: 35px;
    width: 28px; height: 28px;
    background: var(--card); color: var(--muted);
    border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--border); cursor: pointer; z-index: 200;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-size: 0.7rem;
}
.sidebar:hover .sidebar-toggler { color: var(--text-color); }
.sidebar-toggler:hover { 
    transform: scale(1.15); 
    background: linear-gradient(135deg, var(--blue), #6366f1); 
    color: #fff !important; 
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); 
}

/* ?????? Bot??o quando sidebar est?? oculta (pill flutuante fixo na borda) ?????? */
.sidebar.collapsed .sidebar-toggler {
    position: fixed; /* Essencial para n??o ser cortado pelo overflow:hidden */
    left: -10px; /* Esconde um pouco da borda para ficar elegante */
    right: auto;
    top: 35px;
    transform: none;
    width: 32px; height: 56px; 
    border-radius: 0 16px 16px 0;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.7); /* Transparente conforme pedido */
    backdrop-filter: blur(5px);
    color: var(--text-color); 
    box-shadow: 4px 4px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: 6px;
}
.sidebar.collapsed .sidebar-toggler:hover {
    left: 0; width: 40px; /* Pula para fora revelando tudo */
    background: linear-gradient(135deg, var(--blue), #6366f1); 
    color: #fff;
    border-color: transparent;
}

/* ?????? Altern??ncia de ??cones do toggler ?????? */
.sidebar-toggler .toggler-close { transition: opacity 0.3s ease, transform 0.3s ease; opacity: 1; transform: translateX(0); }
.sidebar-toggler .toggler-open  { position: absolute; transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0; transform: translateX(-5px); }
.sidebar.collapsed .sidebar-toggler .toggler-close { opacity: 0; position: absolute; transform: translateX(5px); }
.sidebar.collapsed .sidebar-toggler .toggler-open  { opacity: 1; position: static; transform: translateX(0); }
html[data-theme="dark"] .sidebar.collapsed .sidebar-toggler,
body.theme-dark .sidebar.collapsed .sidebar-toggler {
    background: rgba(30, 41, 59, 0.85);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── Categorias com Cores Claras, Suaves & Harmoniosas (Pastel Tech) ── */
.nav-category {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: transparent;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 14px;
    margin-bottom: 3px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: left;
    transition: all 0.2s ease;
}

html[data-theme="light"] .nav-category,
body.theme-light .nav-category {
    color: #475569;
}
html[data-theme="light"] .nav-category:hover,
body.theme-light .nav-category:hover {
    background: rgba(0, 0, 0, 0.02);
    color: #0f172a;
}

html[data-theme="dark"] .nav-category,
body.theme-dark .nav-category {
    color: #94a3b8;
}
html[data-theme="dark"] .nav-category:hover,
body.theme-dark .nav-category:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #f8fafc;
}

.nav-category.collapsed {
    color: #94a3b8;
    opacity: 0.75;
}
.nav-category.collapsed .cat-icon-left {
    opacity: 0.6;
}

.cat-icon-left {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.cat-items {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, margin 0.35s ease;
    opacity: 1;
    margin-left: 20px;
    padding-left: 10px;
    border-left: 2px solid var(--cat-color, #94a3b8);
    margin-top: 3px;
    margin-bottom: 10px;
}
.cat-items.cat-hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    margin-bottom: 0;
}

.cat-items > .nav-item::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 50%;
    width: 8px;
    height: 2px;
    background-color: var(--cat-color, #cbd5e1);
    opacity: 0.6;
    transition: all 0.2s ease;
}

.cat-items > .nav-item:hover::before,
.cat-items > .nav-item.active::before {
    opacity: 1;
    width: 11px;
}

.main-content { flex: 1; padding: 2rem; overflow-y: auto; background: var(--bg); position: relative; transition: padding 0.3s ease; }

.nav-item { 
    padding: 8px 12px; 
    color: #475569; 
    cursor: pointer; 
    border-radius: 8px; 
    margin-bottom: 2px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: all 0.18s ease; 
    white-space: nowrap; 
    position: relative; 
    overflow: hidden; 
    border: 1px solid transparent; 
    font-size: 0.86rem;
    font-weight: 500;
}

/* Ícones dos sub-menus recebem cores individuais suaves e vivas */
.cat-items > .nav-item i { 
    width: 18px; 
    text-align: center; 
    flex-shrink: 0; 
    font-size: 0.88rem;
    opacity: 0.92;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item span.nav-text { 
    transition: opacity 0.2s, color 0.15s ease; 
    opacity: 1; 
    white-space: normal; 
    line-height: 1.2; 
    color: inherit;
    font-weight: inherit;
}
.sidebar.collapsed .nav-item span.nav-text { opacity: 0; }

html[data-theme="light"] .nav-item:hover,
body.theme-light .nav-item:hover { 
    background: #f1f5f9; 
    color: #0f172a; 
    border-color: #e2e8f0; 
}
html[data-theme="light"] .cat-items > .nav-item:hover i,
body.theme-light .cat-items > .nav-item:hover i {
    opacity: 1;
    transform: scale(1.15);
}

html[data-theme="light"] .nav-item.active,
body.theme-light .nav-item.active { 
    background: #f1f5f9; 
    color: #0f172a; 
    font-weight: 600; 
    border-color: #e2e8f0;
    box-shadow: inset 3px 0 0 var(--cat-color, #2563eb); 
}
html[data-theme="light"] .cat-items > .nav-item.active i,
body.theme-light .cat-items > .nav-item.active i {
    opacity: 1;
}

html[data-theme="dark"] .nav-item,
body.theme-dark .nav-item {
    color: #94a3b8;
}
html[data-theme="dark"] .nav-item:hover,
body.theme-dark .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.05);
}
html[data-theme="dark"] .cat-items > .nav-item:hover i,
body.theme-dark .cat-items > .nav-item:hover i {
    opacity: 1;
    transform: scale(1.15);
}
html[data-theme="dark"] .nav-item.active,
body.theme-dark .nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 3px 0 0 var(--cat-color, #38bdf8);
}
html[data-theme="dark"] .cat-items > .nav-item.active i,
body.theme-dark .cat-items > .nav-item.active i {
    opacity: 1;
}

.nav-item.has-submenu { justify-content: space-between; }
.nav-item.has-submenu .nav-left { display: flex; align-items: center; gap: 10px; }
.nav-item.has-submenu .submenu-icon { font-size: 0.75rem; color: #94a3b8; transition: transform 0.25s ease; }
.nav-item.has-submenu.open .submenu-icon { transform: rotate(180deg); color: #475569; }

.nav-submenu { 
    overflow: hidden; 
    max-height: 0; 
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    margin-left: 20px; 
    border-left: 1.5px solid var(--cat-color, #e2e8f0); 
    padding-left: 10px; 
    margin-top: 2px; 
}
.nav-submenu.open { max-height: 800px; margin-bottom: 4px; }
.nav-submenu .nav-item { font-size: 0.84rem; padding: 7px 10px; margin-bottom: 2px; }
.nav-submenu .nav-item::before { 
    content: ''; 
    position: absolute; 
    left: -11px; 
    top: 50%; 
    width: 8px; 
    height: 1.5px; 
    background-color: var(--cat-color, #cbd5e1); 
    transition: all 0.2s ease; 
}
.nav-submenu .nav-item:hover::before { 
    width: 10px; 
}
.nav-submenu .nav-item.active::before { 
    width: 10px; 
}

.nav-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; transition: opacity 0.2s; white-space: normal; line-height: 1.2; margin-top: 5px; }

/* Admin Home Cards */
.app-card.admin-card { border: 2px solid #1e293b; background: linear-gradient(145deg, #f8fafc, #f1f5f9); position: relative; overflow: hidden; }
.app-card.admin-card::before { content: 'ADMIN'; position: absolute; top: 10px; right: -25px; background: #e11d48; color: #fff; font-size: 0.6rem; font-weight: bold; padding: 2px 30px; transform: rotate(45deg); letter-spacing: 1px; }
.app-card.admin-card i { color: #1e293b; }
.app-card.admin-card:hover { border-color: #e11d48; box-shadow: 0 10px 20px rgba(225, 29, 72, 0.15); }
.page-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 1.2rem; margin: 0; color: var(--text); font-weight: 700; }
.search-bar { width: 250px !important; padding: 8px !important; }
.btn-new { background: var(--blue); color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: 600; }
.audit-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.audit-table th { text-align: left; padding: 12px; border-bottom: 2px solid #e5e7eb; color: var(--text); }
.audit-table td { padding: 12px; border-bottom: 1px solid #e5e7eb; color: var(--muted); }
.pass-wrapper { position: relative; } .pass-toggle { position: absolute; right: 10px; top: 12px; cursor: pointer; color: var(--muted); }
.mobile-toggle { display: none; position: absolute; top: 15px; left: 15px; z-index: 200; background: var(--card); border: 1px solid var(--border); padding: 10px; }
.badge-active { background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; border: 1px solid #bbf7d0; }
.badge-inactive { background: #fee2e2; color: #ef4444; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; border: 1px solid #fecaca; }
.btn-act { padding:8px 15px; border-radius:5px; border:1px solid #e2e8f0; background:#fff; color:#475569; font-weight:600; cursor:pointer; transition:0.2s }
.btn-act:hover { background:#f1f5f9; border-color:#cbd5e1; color:#0f172a }
.btn-act.active { background:#f1f5f9; border-color:#94a3b8; color:#0f172a; box-shadow: 0 0 0 2px var(--blue); }
.btn-del { color:#ef4444; border-color:#fecaca } .btn-del:hover { background:#fef2f2; border-color:#f87171; color:#b91c1c }
.warn-btn { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; } .warn-btn:hover { background: #fee2e2; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 10px; max-height: 200px; overflow-y: auto; padding: 5px; border: 1px solid var(--border); border-radius: 5px; background: #f8fafc; }
.icon-option { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: 5px; border: 1px solid transparent; color: var(--muted); transition: 0.2s; }
.icon-option:hover { background: #e2e8f0; color: var(--blue); }
.icon-option.selected { background: var(--blue); color: #fff; }
.kpi-box { flex-direction:column; align-items:flex-start; background:#fff; }
.kpi-box span { font-size:1.5rem; font-weight:bold; }
.kpi-box small { color:var(--muted); }
@media (max-width: 768px) { .sidebar { position: absolute; height: 100%; transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .mobile-toggle { display: block; } .main-content { padding: 4rem 1rem 1rem 1rem; } .search-bar { width: 100% !important; order: 3; } .responsive-treat { flex-direction:column !important; } }
.app-layout { position: relative; }
.iframe-container {
    position: absolute;
    top: 0;
    left: 250px;
    right: 0;
    bottom: 0;
    width: calc(100% - 250px);
    height: 100%;
    background: var(--bg);
    z-index: 50;
    transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1), width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.collapsed ~ .iframe-container {
    left: 0;
    width: 100%;
}
.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
@media (max-width: 768px) {
    .iframe-container {
        left: 0 !important;
        width: 100% !important;
    }
}
.sidebar-logo { width: 120px; display: block; margin: 0 auto 20px auto; }

/* --- PATCH: STARTUP INTRO --- */
#startup-intro { position: fixed; inset: 0; z-index: 999999; background: #0f172a; display: flex; align-items: center; justify-content: center; flex-direction: column; transition: opacity 0.8s ease, visibility 0.8s; }
.startup-content { text-align: center; }
.startup-logo { width: 180px; margin-bottom: 25px; animation: startupPulse 2s infinite; filter: drop-shadow(0 0 10px rgba(16,185,129,0.2)); }
.startup-spinner { width: 40px; height: 40px; border: 3px solid rgba(16,185,129,0.2); border-top-color: #10b981; border-radius: 50%; animation: startupSpin 1s linear infinite; margin: 0 auto 20px auto; }
.startup-text { color: #10b981; font-family: 'Courier New', monospace; font-size: 0.9rem; letter-spacing: 1px; }

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   ASSISTENTE PESSOAL ??? PAINEL DE NOTIFICA????ES (HOME)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.assistente-container {
    background: var(--card);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .assistente-container,
body.theme-dark .assistente-container {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 25px rgba(0,0,0,0.35) !important;
}

html[data-theme="light"] .assistente-container,
body.theme-light .assistente-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

.assistente-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #10b981);
    background-size: 300% 100%;
    animation: assistGradient 4s linear infinite;
    z-index: 10;
}
@keyframes assistGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
.assistente-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 24px 15px 24px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .assistente-header,
body.theme-dark .assistente-header {
    background: rgba(15, 23, 42, 0.5) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="light"] .assistente-header,
body.theme-light .assistente-header {
    background: #f8fafc !important;
    border-bottom-color: #e2e8f0 !important;
}

/* ????????? ISABEL MINIMAL IDENTITY ????????? */
.isabel-nametag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 4px;
}
.assistente-greeting { flex: 1; }
.assistente-greeting h3 {
    color: var(--text-color);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    line-height: 1.3;
}
html[data-theme="dark"] .assistente-greeting h3 {
    color: #f8fafc !important;
}
html[data-theme="light"] .assistente-greeting h3 {
    color: #0f172a !important;
}

.assistente-greeting p {
    color: var(--muted);
    font-size: 0.82rem;
    margin: 0;
}
html[data-theme="dark"] .assistente-greeting p {
    color: #94a3b8 !important;
}
html[data-theme="light"] .assistente-greeting p {
    color: #64748b !important;
}

.assistente-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
    animation: badgeBounce 2s ease infinite;
    flex-shrink: 0;
}
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.assistente-body {
    padding: 12px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 350px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.assistente-body::-webkit-scrollbar { width: 4px; }
.assistente-body::-webkit-scrollbar-track { background: transparent; }
.assistente-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* Bolha de mensagem da Isabel */
.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 92%;
    animation: chatSlideIn 0.35s ease-out both;
}
.chat-row.isabel { align-self: flex-start; }
.chat-row.user { align-self: flex-end; flex-direction: row-reverse; }

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

/* Mini avatar tech ao lado da bolha ??? hidden, replaced by floating orb */
.chat-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: transparent;
    display: none;
    flex-shrink: 0;
}

/* ????????? FLOATING ORB ??? Entidade que vive no chat ????????? */
#isabel-chat-orb {
    position: absolute;
    left: 4px;
    top: 20px;
    width: 28px;
    height: 28px;
    z-index: 20;
    pointer-events: none;
    transition: top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.4s ease;
    filter: drop-shadow(0 0 6px rgba(59,130,246,0.4));
}
.orb-core {
    position: absolute;
    left: 50%; top: 50%;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #93c5fd 0%, #3b82f6 60%, #1d4ed8 100%);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(59,130,246,0.7), 0 0 25px rgba(59,130,246,0.3);
    animation: orbPulse 2s ease-in-out infinite;
}
@keyframes orbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 12px rgba(59,130,246,0.7), 0 0 25px rgba(59,130,246,0.3); }
    50% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 18px rgba(59,130,246,0.9), 0 0 35px rgba(59,130,246,0.4); }
}
.orb-ring {
    position: absolute;
    left: 50%; top: 50%;
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.orb-ring-1 {
    width: 20px; height: 20px;
    animation: orbRingSpin 3s linear infinite;
    border-color: rgba(59,130,246,0.25) transparent rgba(59,130,246,0.25) transparent;
}
.orb-ring-2 {
    width: 26px; height: 26px;
    animation: orbRingSpin 5s linear infinite reverse;
    border-color: transparent rgba(96,165,250,0.2) transparent rgba(96,165,250,0.2);
}
@keyframes orbRingSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.orb-trail {
    position: absolute;
    left: 50%; top: 50%;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(59,130,246,0.3);
    transform: translate(-50%, -50%);
    animation: orbTrailFade 1.5s ease-out infinite;
}
@keyframes orbTrailFade {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3); }
}

/* Orb speaking boost */
#isabel-chat-orb.speaking .orb-core {
    animation: orbSpeakPulse 0.4s ease-in-out infinite;
}
@keyframes orbSpeakPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1.1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

/* Bolha da Isabel */
.chat-bubble {
    padding: 10px 14px;
    border-radius: 12px 12px 12px 4px;
    font-size: 0.85rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chat-sender {
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 3px;
    display: block;
}
.chat-sender.isabel-name { color: #3b82f6; }
.chat-sender.user-name { color: #10b981; }

html[data-theme="dark"] .chat-bubble.isabel-msg {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2) !important;
}
html[data-theme="dark"] .chat-bubble.isabel-msg .chat-emphasis {
    color: #60a5fa !important;
    font-weight: 700;
}

html[data-theme="light"] .chat-bubble.isabel-msg {
    background: #f0f7ff !important;
    border: 1px solid #dbeafe !important;
    color: #334155 !important;
}
html[data-theme="light"] .chat-bubble.isabel-msg .chat-emphasis {
    color: #2563eb !important;
    font-weight: 700;
}

/* Bolha do usu??rio */
html[data-theme="dark"] .chat-bubble.user-msg {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
    border-radius: 12px 12px 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
html[data-theme="light"] .chat-bubble.user-msg {
    background: #ecfdf5 !important;
    border: 1px solid #d1fae5 !important;
    color: #065f46 !important;
    border-radius: 12px 12px 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Quick-reply buttons */
.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    animation: chatSlideIn 0.4s ease-out both;
    align-self: flex-start;
    padding-left: 32px;
}
.chat-quick-btn {
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

html[data-theme="dark"] .chat-quick-btn {
    background: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    color: #93c5fd !important;
}
html[data-theme="dark"] .chat-quick-btn:hover {
    background: rgba(59, 130, 246, 0.3) !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

html[data-theme="dark"] .chat-quick-btn.primary {
    background: rgba(16, 185, 129, 0.2) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
}
html[data-theme="dark"] .chat-quick-btn.primary:hover {
    background: rgba(16, 185, 129, 0.35) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

html[data-theme="light"] .chat-quick-btn {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #2563eb !important;
}
html[data-theme="light"] .chat-quick-btn:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59,130,246,0.15);
}

html[data-theme="light"] .chat-quick-btn.primary {
    background: #ecfdf5 !important;
    border: 1px solid #6ee7b7 !important;
    color: #059669 !important;
}
html[data-theme="light"] .chat-quick-btn.primary:hover {
    background: #d1fae5 !important;
    border-color: #34d399 !important;
    box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}

/* Typing indicator */
.chat-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 32px;
    animation: chatSlideIn 0.3s ease-out both;
}
.chat-typing-dots {
    display: flex;
    gap: 3px;
    padding: 10px 14px;
    border-radius: 12px 12px 12px 4px;
}
html[data-theme="dark"] .chat-typing-dots {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}
html[data-theme="light"] .chat-typing-dots {
    background: #f0f7ff !important;
    border: 1px solid #dbeafe !important;
}

.chat-typing-dots span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #3b82f6;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* Divider no chat */
.chat-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px 0;
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.chat-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Estado vazio (tudo ok) */
.assist-empty {
    text-align: center;
    padding: 15px 0;
}
.assist-empty-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: block;
}
.assist-empty-text {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Loading */
.assistente-loading {
    text-align: center;
    padding: 15px 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.assistente-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}
.assistente-loading-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: dotPulse 1.4s ease-in-out infinite;
}
.assistente-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.assistente-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Quick Prompt Bar no Card da Home */
.assistente-quick-bar {
    padding: 12px 20px 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#isabel-quick-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-color);
    outline: none;
    transition: all 0.2s ease;
}
#isabel-quick-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.btn-quick-send {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-quick-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.assistente-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.quick-chip {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.quick-chip:hover {
    background: var(--hover-bg);
    border-color: #3b82f6;
    color: var(--text-color);
    transform: translateY(-1px);
}

/* Header Buttons da Isabel */
.btn-isabel-voice, .btn-isabel-expand {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}
.btn-isabel-voice:hover, .btn-isabel-expand:hover {
    background: #dbeafe;
    border-color: #bfdbfe;
}
/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   ISABEL I.A ??? THEME ADAPTIVE SYSTEM (LIGHT & DARK)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

/* Bot??es de A????o Topbar */
.btn-isabel-voice-ai {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-isabel-voice-ai:hover {
    background: rgba(59,130,246,0.2);
    border-color: #3b82f6;
}

html[data-theme="light"] .btn-isabel-voice-ai {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
html[data-theme="light"] .btn-isabel-voice-ai:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.ai-pendencias-pill {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.ai-pendencias-pill:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
}

html[data-theme="light"] .ai-pendencias-pill {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
html[data-theme="light"] .ai-pendencias-pill:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Hist??rico de Conversas */
.ai-hist-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
html[data-theme="dark"] .ai-hist-item {
    background: rgba(255,255,255,0.04);
}
html[data-theme="dark"] .ai-hist-item:hover {
    background: rgba(168,85,247,0.15);
    border-color: rgba(168,85,247,0.3);
}
html[data-theme="dark"] .ai-hist-item.active {
    background: rgba(168,85,247,0.2);
    border-color: #a855f7;
}

html[data-theme="light"] .ai-hist-item {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}
html[data-theme="light"] .ai-hist-item:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}
html[data-theme="light"] .ai-hist-item.active {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #4c1d95;
    font-weight: 600;
}

.ai-hist-del {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.2s;
}
.ai-hist-item:hover .ai-hist-del { opacity: 1; }
.ai-hist-del:hover { color: #ef4444; }

/* Sugest??es de Chips */
.ai-suggestion {
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s;
}
html[data-theme="dark"] .ai-suggestion {
    background: rgba(168,85,247,0.12);
    border: 1px solid rgba(168,85,247,0.3);
    color: #d8b4fe;
}
html[data-theme="dark"] .ai-suggestion:hover {
    background: rgba(168,85,247,0.25);
    border-color: #a855f7;
    color: #ffffff;
}

html[data-theme="light"] .ai-suggestion {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
    font-weight: 500;
}
html[data-theme="light"] .ai-suggestion:hover {
    background: #ede9fe;
    border-color: #8b5cf6;
    color: #4c1d95;
    box-shadow: 0 2px 8px rgba(124,58,237,0.15);
    transform: translateY(-1px);
}

/* Op????es dos Dropdowns (Modelos & Especialistas) */
.ai-model-option, .ai-specialist-option {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    transition: all 0.15s;
    font-size: 0.85rem;
    color: var(--text-color);
}
html[data-theme="dark"] .ai-model-option:hover, html[data-theme="dark"] .ai-specialist-option:hover {
    background: rgba(168,85,247,0.15);
}
html[data-theme="dark"] .ai-model-option.active, html[data-theme="dark"] .ai-specialist-option.active {
    background: rgba(168,85,247,0.25);
    border-left: 3px solid #a855f7;
}

html[data-theme="light"] .ai-model-option:hover, html[data-theme="light"] .ai-specialist-option:hover {
    background: #f5f3ff;
    color: #4c1d95;
}
html[data-theme="light"] .ai-model-option.active, html[data-theme="light"] .ai-specialist-option.active {
    background: #ede9fe;
    border-left: 3px solid #7c3aed;
    color: #4c1d95;
    font-weight: 600;
}

/* Chips de Arquivos Anexados */
.ai-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    transition: all 0.2s;
}
html[data-theme="dark"] .ai-file-chip {
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3);
    color: #d8b4fe;
}
html[data-theme="dark"] .ai-file-chip:hover {
    background: rgba(168,85,247,0.25);
}
html[data-theme="light"] .ai-file-chip {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
}
html[data-theme="light"] .ai-file-chip:hover {
    background: #ede9fe;
    border-color: #8b5cf6;
}

.ai-file-chip-icon { font-size: 0.9rem; }
.ai-file-chip-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-file-chip-size { color: var(--muted); font-size: 0.7rem; }
.ai-file-chip-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0 2px; line-height: 1; transition: color 0.2s; }
.ai-file-chip-remove:hover { color: #ef4444; }

/* Bolhas de Chat */
.ai-bubble {
    max-width: 75%;
    line-height: 1.6;
    font-size: 0.9rem;
}
.ai-bubble-user {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 16px 16px 0 16px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.ai-bubble-assistant {
    background: var(--card);
    color: var(--text-color);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 16px 16px 16px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
html[data-theme="light"] .ai-bubble-assistant {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
    box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}
html[data-theme="dark"] .ai-bubble-assistant {
    background: #1e293b;
    color: #f8fafc;
    border-color: rgba(255,255,255,0.1);
}

/* Bot??es de A????o na Resposta da IA */
.ai-msg-action-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ai-msg-action-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--hover-bg);
}

/* Markdown Rendering */
.ai-code-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 8px 0;
    color: #e6edf3;
}
html[data-theme="light"] .ai-code-block {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.ai-code-inline {
    background: rgba(110,118,129,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}
html[data-theme="light"] .ai-code-inline {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.ai-markdown-table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.ai-markdown-table th {
    padding: 8px 12px;
    background: rgba(59,130,246,0.15);
    border: 1px solid var(--border);
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-color);
}
html[data-theme="light"] .ai-markdown-table th {
    background: #eff6ff;
    color: #1e293b;
}
.ai-markdown-table td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-color);
}
html[data-theme="light"] .ai-markdown-table td {
    color: #334155;
}

.ai-msg-h1, .ai-msg-h2 {
    color: #3b82f6;
    margin: 14px 0 6px;
    font-weight: 700;
}
html[data-theme="light"] .ai-msg-h1, html[data-theme="light"] .ai-msg-h2 {
    color: #1d4ed8;
}

.ai-msg-h3, .ai-msg-h4 {
    color: #93c5fd;
    margin: 10px 0 4px;
    font-weight: 600;
}
html[data-theme="light"] .ai-msg-h3, html[data-theme="light"] .ai-msg-h4 {
    color: #2563eb;
}

.ai-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

/* Separador de notifica????es */
.assist-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 2px 0;
}
.assist-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
}
.assist-divider-label {
    color: #475569;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   CALEND??RIO DE AGENDAMENTO DE VE??CULOS
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.v-periodo-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.v-periodo-btn:hover { border-color: var(--blue); color: var(--blue); }
.v-periodo-btn.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.v-calendar-container {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    user-select: none;
}
.v-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.v-cal-header button {
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    width: 30px; height: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--blue);
    transition: 0.2s;
}
.v-cal-header button:hover { background: var(--blue); color: #fff; }
.v-cal-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    text-transform: capitalize;
}
.v-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.v-cal-dow {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
    padding: 4px 0;
    text-transform: uppercase;
}
.v-cal-day {
    text-align: center;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    border: 1px solid transparent;
}
.v-cal-day:hover:not(.disabled):not(.empty) {
    background: #e0f2fe;
    border-color: #3b82f6;
}
.v-cal-day.empty { cursor: default; }
.v-cal-day.today {
    border: 2px solid var(--blue);
    font-weight: 800;
}
.v-cal-day.selected {
    background: var(--blue) !important;
    color: #fff !important;
    border-color: var(--blue);
}
.v-cal-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
}
.v-cal-day.occupied {
    background: #fee2e2;
    color: #b91c1c;
}
.v-cal-day.partial {
    background: #fef3c7;
    color: #92400e;
}
.v-cal-day.free {
    background: #f0fdf4;
    color: #166534;
}
.v-cal-day.weekend-free:not(.selected):not(.occupied):not(.partial) {
    background: #f1f5f9;
    color: #64748b;
}
.v-cal-day .v-cal-dot {
    position: absolute;
    bottom: 2px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
}
.v-cal-day.occupied .v-cal-dot { background: #ef4444; }
.v-cal-day.partial .v-cal-dot { background: #f59e0b; }
.v-cal-day.free .v-cal-dot { background: #10b981; }

/* =========================================
   M??DULO PROSPEC????ES
   ========================================= */
.prosp-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    text-transform: uppercase;
}

.prosp-EM_PROSPECCAO { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.prosp-PROPOSTA_ENVIADA { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.prosp-EM_ANALISE { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }
.prosp-APROVADA { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.prosp-RECUSADA { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.prosp-CANCELADA { background: rgba(100, 116, 139, 0.15); color: #64748b; border: 1px solid rgba(100, 116, 139, 0.3); }

.prosp-stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.prosp-stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}
.prosp-stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
}

.prosp-pulse-new {
    animation: prospPulse 2s infinite;
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: top;
}

@keyframes prospPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* =========================================
   M??DULO PROSPEC????ES - TABS
   ========================================= */
.prosp-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    overflow-x: auto;
}
.prosp-tab {
    padding: 8px 16px;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.prosp-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}
.prosp-tab.active {
    background: var(--primary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.prosp-tab-content {
    display: none;
}
.prosp-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.prosp-dias-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}
.prosp-dias-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.prosp-dias-expired {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}
.prosp-aviso-inline {
    display: block;
    font-size: 0.7rem;
    margin-top: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    animation: prospPulse 2s infinite;
}
.prosp-cor-preview {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    vertical-align: middle;
}

/* Coment??rios - Chat Style */
.prosp-chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.prosp-chat-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}
.prosp-chat-row.sent {
    flex-direction: row-reverse;
}
.prosp-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid #fff;
}
.prosp-chat-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.prosp-chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.prosp-chat-sent {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}
.prosp-chat-received {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}
.prosp-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.75rem;
    gap: 15px;
}
.prosp-chat-sent .prosp-chat-header {
    color: rgba(255,255,255,0.85);
}
.prosp-chat-received .prosp-chat-header {
    color: #94a3b8;
}
.prosp-chat-author {
    font-weight: 600;
}
.prosp-chat-received .prosp-chat-author {
    color: #2563eb;
}
.prosp-chat-status {
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.prosp-chat-sent .prosp-chat-status {
    color: rgba(255,255,255,0.6);
}
.prosp-chat-sent .prosp-chat-status.lido {
    color: #4ade80; /* verde claro para check duplo lido no bal??o enviado */
}
.prosp-badge-comments {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 5px;
    animation: prospPulse 2s infinite;
}

/* --- User Profile Premium UI --- */
.user-profile-header { display: flex; align-items: center; gap: 15px; }
.avatar-circle { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--accent)); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.profile-card { background: var(--card); padding: 30px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.3s ease; }
.profile-section-title { color: var(--blue); font-size: 1rem; margin: 0 0 15px 0; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.profile-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
.profile-readonly input, .profile-readonly select { background-color: #f8fafc; border: 1px dashed #cbd5e1; color: #64748b; pointer-events: none; }
.profile-readonly .pass-toggle { display: none; }
.profile-form-actions { justify-content: flex-end; gap: 15px; align-items: center; }

@media (max-width: 768px) { 
    .profile-form-grid { grid-template-columns: 1fr; } 
    .page-head { flex-direction: column; align-items: flex-start; } 
    .user-profile-header { margin-top: 10px; } 
    .profile-form-actions { justify-content: center; }
}


/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   HIST??RICO DE PONTO MODERNO (SEMANAS E MESES)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.ponto-hist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}
.btn-mes-nav {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-mes-nav:hover {
    background: var(--bg-color);
    color: var(--blue);
}
.ponto-mes-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.ponto-kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ponto-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.ponto-kpi-label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ponto-kpi-val {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-top: 2px;
}
.ponto-semana-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    margin-bottom: 20px;
}
.ponto-semana-header {
    background: var(--bg-color);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.ponto-semana-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.ponto-semana-badge {
    background: rgba(37,99,235,0.1);
    color: var(--blue);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ponto-semana-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--muted);
    flex-wrap: wrap;
}
.ponto-semana-stats .stat-pill {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Item de cada dia */
.ponto-dia-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.15s;
}
.ponto-dia-item:last-child {
    border-bottom: none;
}
.ponto-dia-item:hover {
    background: rgba(0,0,0,0.015);
}
.ponto-dia-item.is-hoje {
    background: rgba(59,130,246,0.04);
    border-left: 4px solid var(--blue);
}

/* Linha principal com 4 colunas perfeitamente alinhadas */
.ponto-dia-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

/* Coluna 1: Data e Dia da Semana */
.ponto-dia-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 180px;
    flex-shrink: 0;
}
.ponto-dia-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.ponto-dia-badge .dia-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
}
.ponto-dia-badge .dia-sem {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-top: 1px;
}
.ponto-dia-item.is-hoje .ponto-dia-badge {
    background: var(--blue);
    border-color: var(--blue);
}
.ponto-dia-item.is-hoje .ponto-dia-badge .dia-num,
.ponto-dia-item.is-hoje .ponto-dia-badge .dia-sem {
    color: #fff !important;
}

/* Coluna 2: Timeline de Batidas */
.ponto-timeline-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
}
.ponto-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    min-width: 70px;
    transition: all 0.15s;
}
.ponto-timeline-step.has-punch {
    border-color: rgba(37,99,235,0.35);
    background: rgba(37,99,235,0.04);
}
.ponto-timeline-step.empty-punch {
    border-style: dashed;
    opacity: 0.55;
}
.ponto-timeline-step .step-lbl {
    font-size: 0.62rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1px;
}
.ponto-timeline-step .step-time {
    font-size: 0.82rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.ponto-timeline-arrow {
    color: var(--muted);
    font-size: 0.68rem;
    opacity: 0.4;
    margin: 0 1px;
}

/* Coluna 3: Status, Duração e Saldo */
.ponto-dia-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    width: 130px;
    flex-shrink: 0;
    text-align: right;
}

/* Coluna 4: Ações */
.ponto-dia-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: 110px;
    flex-shrink: 0;
}

/* Bloco de Justificativa com largura total */
.ponto-dia-justificativa {
    width: 100%;
    font-size: 0.78rem;
    color: var(--text-color);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 4px solid #f59e0b;
    padding: 7px 12px;
    border-radius: 6px;
    margin-top: 2px;
    line-height: 1.45;
    word-break: break-word;
    box-sizing: border-box;
}

/* Responsividade Mobile */
@media (max-width: 880px) {
    .ponto-dia-row-main {
        flex-wrap: wrap;
    }
    .ponto-timeline-flow {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        margin: 6px 0;
    }
    .ponto-dia-info {
        width: auto;
        flex: 1;
    }
    .ponto-dia-stats {
        width: auto;
    }
    .ponto-dia-actions {
        order: 4;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   EXECUTIVE BENTO GRID ??? HOME & MODERN HUB (F&A ECOSSISTEMA)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

.bento-home-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
    animation: fadeInBento 0.3s ease-in-out;
}

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

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   ISABEL I.A ??? WORKSPACE CONVERSACIONAL INTEGRADO (HOME)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

.isabel-hub-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

html[data-theme="dark"] .isabel-hub-card,
body.theme-dark .isabel-hub-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 32px -4px rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .isabel-hub-card,
body.theme-light .isabel-hub-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.05);
}

.isabel-hub-card::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

/* 1. Header Minimalista: Identidade + A????es Discretas */
.isabel-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.isabel-mini-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.isabel-mini-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.isabel-mini-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.isabel-mini-sub {
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 500;
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: anivPulse 2s infinite;
    display: inline-block;
}

.isabel-mini-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.isabel-discrete-btn {
    background: var(--hover-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 11px;
    color: var(--muted);
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.isabel-discrete-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
    border-color: var(--blue);
    transform: translateY(-1px);
}

/* 2. Stream de Conversa Fluida (Chat Feed da Isabel) */
.isabel-home-stream {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    min-height: 160px;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(8px);
}

html[data-theme="light"] .isabel-home-stream,
body.theme-light .isabel-home-stream {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.isabel-msg-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: isabelMsgFade 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

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

.isabel-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(168, 85, 247, 0.3);
    margin-top: 2px;
}

.isabel-msg-bubble {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-left: 3px solid #a855f7;
    border-radius: 14px;
    border-top-left-radius: 3px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.5;
    font-weight: 500;
    max-width: 92%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .isabel-msg-bubble,
body.theme-light .isabel-msg-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #7c3aed;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.isabel-msg-author {
    font-size: 0.74rem;
    font-weight: 700;
    color: #a855f7;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

html[data-theme="light"] .isabel-msg-author,
body.theme-light .isabel-msg-author {
    color: #7c3aed;
}

/* Indicador de Digita????o da Isabel */
.isabel-typing-row {
    display: flex;
    gap: 10px;
    align-items: center;
    animation: isabelMsgFade 0.2s ease-in;
}

.isabel-typing-bubble {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

html[data-theme="light"] .isabel-typing-bubble,
body.theme-light .isabel-typing-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* Atalhos de A????o nos Bal??es da Isabel */
.isabel-bubble-action-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.isabel-chat-shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    padding: 7px 13px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.isabel-chat-shortcut-btn:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

html[data-theme="light"] .isabel-chat-shortcut-btn,
body.theme-light .isabel-chat-shortcut-btn {
    background: linear-gradient(135deg, #eff6ff, #f3e8ff);
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

html[data-theme="light"] .isabel-chat-shortcut-btn:hover,
body.theme-light .isabel-chat-shortcut-btn:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Mensagens do Usu??rio na Home */
.isabel-user-msg-row {
    display: flex;
    justify-content: flex-end;
    margin: 2px 0;
    animation: isabelMsgFade 0.25s ease-out;
}

.isabel-user-msg-bubble {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 14px;
    border-top-right-radius: 3px;
    padding: 9px 15px;
    font-size: 0.86rem;
    color: #ffffff;
    max-width: 85%;
    line-height: 1.45;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

/* 3. Input Minimalista da Isabel */
.isabel-quick-prompt-bar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 10px;
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease;
}

html[data-theme="dark"] .isabel-quick-prompt-bar,
body.theme-dark .isabel-quick-prompt-bar {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .isabel-quick-prompt-bar,
body.theme-light .isabel-quick-prompt-bar {
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

.isabel-prompt-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.isabel-input-icon {
    position: absolute;
    left: 12px;
    color: #a855f7;
    font-size: 0.88rem;
    pointer-events: none;
}

html[data-theme="light"] .isabel-input-icon,
body.theme-light .isabel-input-icon {
    color: #7c3aed;
}

#isabel-quick-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

#isabel-quick-input::placeholder {
    color: var(--muted);
    font-size: 0.85rem;
}

#isabel-quick-input:focus {
    border-color: #a855f7;
    background: var(--hover-bg);
}

.btn-quick-send {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

.btn-quick-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.45);
}

/* Bento Card Base */
.bento-card {
    background: var(--card-glass, rgba(30, 41, 59, 0.7));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.bento-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .bento-card {
        padding: 14px;
        border-radius: 12px;
    }
}

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

.bento-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ???? Mural de Comunicados */
.comunicados-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.comunicado-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.comunicado-card:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(3px);
}

.comunicado-card.fixado {
    border-left: 4px solid #f59e0b;
}

.comunicado-card.urgente {
    border-left: 4px solid #ef4444;
}

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

.comunicado-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-urgente { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.tag-geral { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.tag-conquista { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.tag-evento { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.tag-recesso { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }

.comunicado-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.comunicado-snippet {
    font-size: 0.84rem;
    color: var(--muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comunicado-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ??? Personal Hub & Minha Rotina */
.hub-ponto-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.hub-ponto-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.hub-ponto-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    text-align: center;
}

.hub-punch-slot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 4px;
}

.hub-punch-slot .slot-label {
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.hub-punch-slot .slot-time {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--text);
}

.hub-punch-slot.filled {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.hub-punch-slot.filled .slot-time {
    color: #34d399;
}

/* Aniversariantes & Pend??ncias Widget */
.hub-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hub-mini-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-mini-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ???? Lan??ador de M??dulos (Smart Bento Launcher) */
.bento-launcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    margin-bottom: 16px;
}

.bento-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 480px;
}

.bento-search-box input {
    width: 100%;
    background: var(--card-glass, rgba(30, 41, 59, 0.7));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px 10px 38px;
    font-size: 0.92rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bento-search-box input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.bento-search-box i.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.95rem;
}

.bento-filter-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bento-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.bento-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.bento-pill.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

/* Bento App Grid */
.bento-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.bento-app-card {
    background: var(--card-glass, rgba(30, 41, 59, 0.7));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.bento-app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.bento-app-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bento-app-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--blue);
    transition: transform 0.2s;
}

.bento-app-card:hover .bento-app-icon-wrap {
    transform: scale(1.08);
}

.btn-fav-star {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s, transform 0.2s;
}

.btn-fav-star:hover {
    color: #f59e0b;
    transform: scale(1.15);
}

.btn-fav-star.active {
    color: #f59e0b;
}

.bento-app-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px 0;
}

.bento-app-desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.35;
}

.bento-app-badge {
    margin-top: 12px;
    align-self: flex-start;
}

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   BOTAO DE REVELA????O SEGURA DE SENHA DO COFRE VIA ISABEL IA
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.ai-pass-reveal-box {
    margin: 8px 0;
    display: inline-flex;
    vertical-align: middle;
}

.ai-btn-reveal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(249, 115, 22, 0.15));
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #facc15;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ai-btn-reveal:hover {
    background: linear-gradient(135deg, #eab308, #f97316);
    border-color: #eab308;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35);
}

.ai-revealed-pass-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 8px;
    padding: 4px 8px;
    animation: fadeInPass 0.3s ease;
}

.ai-revealed-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #facc15;
}

.ai-revealed-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    width: auto;
    max-width: 180px;
    outline: none;
}

.ai-btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #e2e8f0;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.ai-btn-copy:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

@keyframes fadeInPass {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

html[data-theme="light"] .ai-btn-reveal,
body.theme-light .ai-btn-reveal {
    background: linear-gradient(135deg, #fef9c3, #ffedd5);
    border: 1px solid #fde047;
    color: #854d0e;
    box-shadow: 0 2px 6px rgba(202, 138, 4, 0.1);
}

html[data-theme="light"] .ai-btn-reveal:hover,
body.theme-light .ai-btn-reveal:hover {
    background: linear-gradient(135deg, #eab308, #f97316);
    color: #fff;
}

html[data-theme="light"] .ai-revealed-pass-wrap,
body.theme-light .ai-revealed-pass-wrap {
    background: #ffffff;
    border: 1px solid #fde047;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .ai-revealed-input,
body.theme-light .ai-revealed-input {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0284c7;
}

/* ????????? CONTROLE GLOBAL DO FUNDO CELESTIAL (PAINEL ADMIN) ????????? */
.sky-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.sky-theme-card {
    background: var(--card, rgba(30, 41, 59, 0.7));
    border: 2px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sky-theme-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.sky-theme-card.active {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25) !important;
}

.sky-theme-card.active .sky-card-badge {
    display: inline-flex;
}

.sky-card-badge {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
}

.sky-card-preview {
    height: 48px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.sky-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sky-card-icon {
    font-size: 1.6rem;
}

.sky-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text, #fff);
    margin: 0;
}

.sky-card-desc {
    font-size: 0.75rem;
    color: var(--muted, #94a3b8);
    line-height: 1.4;
    margin: 0;
}

html[data-theme="light"] .sky-theme-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .sky-theme-card:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}

html[data-theme="light"] .sky-theme-card.active {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.05) !important;
}

html[data-theme="light"] .sky-card-title {
    color: #0f172a !important;
}

html[data-theme="light"] .sky-card-desc {
    color: #64748b !important;
}

/* ==========================================================================
   SMART SELECT GLOBAL COMPONENT (Autocomplete / Campo Inteligente)
   ========================================================================== */
.smart-select-wrapper {
    position: relative;
    display: block;
    width: 100%;
}
.smart-select-input {
    width: 100%;
    padding-right: 32px !important;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.smart-select-input:focus {
    cursor: text;
}
.smart-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted, #94a3b8);
    font-size: 11px;
    transition: transform 0.2s ease, color 0.2s ease;
}
.smart-select-wrapper.open .smart-select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #3b82f6;
}
.smart-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    z-index: 99999;
    background: rgba(18, 22, 34, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    display: none;
    padding: 4px 0;
}
html[data-theme="light"] .smart-select-dropdown,
body.theme-light .smart-select-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.smart-select-wrapper.open .smart-select-dropdown {
    display: block;
}
.smart-select-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color, #e2e8f0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
html[data-theme="light"] .smart-select-item,
body.theme-light .smart-select-item {
    color: #1e293b;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.smart-select-item:hover, .smart-select-item.highlighted {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
}
html[data-theme="light"] .smart-select-item:hover,
html[data-theme="light"] .smart-select-item.highlighted {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}
.smart-select-item.selected {
    background: rgba(59, 130, 246, 0.3);
    font-weight: 700;
    color: #60a5fa;
}
.smart-select-empty {
    padding: 10px 12px;
    color: var(--muted, #94a3b8);
    font-size: 12px;
    text-align: center;
    font-style: italic;
}

/* --- Justificativas Accordion Compact --- */
.just-card-item {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.just-card-item:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
}
.just-chevron-icon {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════
   BANCO DE HORAS — WIDGET DE ALERTA EXECUTIVO & COMPACTO
   ═══════════════════════════════════════════════════════════ */
.banco-alert-card {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08), rgba(245, 158, 11, 0.04));
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

html[data-theme="light"] .banco-alert-card,
body.theme-light .banco-alert-card {
    background: linear-gradient(135deg, #fefce8, #fffbeb);
    border: 1px solid #fde047;
    box-shadow: 0 2px 10px rgba(234, 179, 8, 0.08);
}

.banco-alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.banco-alert-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 260px;
}

.banco-alert-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(234, 179, 8, 0.18);
    color: #eab308;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

html[data-theme="light"] .banco-alert-icon-wrap,
body.theme-light .banco-alert-icon-wrap {
    background: #fef08a;
    color: #a16207;
}

.banco-alert-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #eab308;
    letter-spacing: 0.2px;
}

html[data-theme="light"] .banco-alert-title,
body.theme-light .banco-alert-title {
    color: #854d0e;
}

.banco-alert-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
}

.banco-alert-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.banco-alert-close-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.banco-alert-close-btn:hover {
    background: var(--hover-bg);
    color: var(--text-color);
    border-color: var(--border);
}

.banco-alert-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.banco-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.banco-chip-item:hover {
    transform: translateY(-1px);
    border-color: var(--blue);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.banco-chip-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banco-chip-name {
    font-weight: 600;
    color: var(--text-color);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banco-chip-badge {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    font-family: monospace;
}

.banco-chip-badge.negativo {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.banco-chip-badge.positivo {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.banco-chip-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(234, 179, 8, 0.15);
    border: 1px dashed rgba(234, 179, 8, 0.5);
    color: #eab308;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

html[data-theme="light"] .banco-chip-more,
body.theme-light .banco-chip-more {
    color: #a16207;
    background: #fef9c3;
    border-color: #eab308;
}

.banco-chip-more:hover {
    background: #eab308;
    color: #ffffff;
    border-style: solid;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   👥 MÓDULO REDESENHADO: USUÁRIOS & PERMISSÕES (IAM PREMIUM)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. CARDS DE MÉTRICAS / KPIS RESUMO ── */
.users-mgmt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.users-stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.users-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

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

.users-stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-color);
}

.users-stat-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   CONSOLE DE GESTÃO & FILTROS SIMÉTRICO E COMPACTO (v5.0.50)
   Arquitetura em 3 Níveis: Command Bar + Filter Grid + Quick Rail
   ═══════════════════════════════════════════════════════════════════ */

.users-console {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow: visible;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── NÍVEL 1: COMMAND & ACTION BAR ── */
.uconsole-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
    flex-wrap: wrap;
}

.uconsole-search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 260px;
    max-width: 440px;
}

.uconsole-search-box i.search-icon {
    position: absolute;
    left: 12px;
    color: var(--muted);
    font-size: 0.88rem;
    pointer-events: none;
}

.uconsole-search-box input {
    width: 100%;
    height: 38px;
    padding: 0 34px 0 36px;
    border-radius: 9px;
    font-size: 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    outline: none;
    transition: all 0.2s ease;
}

.uconsole-search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    background: var(--card);
}

.uconsole-search-box .btn-clear-search {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.82rem;
    display: none;
    padding: 4px;
    border-radius: 4px;
}

.uconsole-search-box .btn-clear-search:hover {
    color: var(--text-color);
}

.uconsole-search-box input:not(:placeholder-shown) + .btn-clear-search {
    display: block;
}

.uconsole-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Segmented Control de Status (Ativos / Inativos / Demitidos) */
.uconsole-status-segmented {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}

.uconsole-status-segmented .users-tab-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.uconsole-status-segmented .users-tab-pill-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
}

.uconsole-status-segmented .users-tab-pill-btn.active {
    background: var(--card);
    color: var(--text-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.uconsole-status-segmented .status-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator-dot.dot-active {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.status-indicator-dot.dot-inactive {
    background: #ef4444;
}

.status-indicator-dot.dot-dismissed {
    background: #94a3b8;
}

.uconsole-status-segmented .tab-count-badge {
    background: rgba(100, 116, 139, 0.15);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
}

.uconsole-status-segmented .users-tab-pill-btn.active .tab-count-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.uconsole-btn-new {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0 16px;
    border-radius: 9px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
    white-space: nowrap;
}

/* ── NÍVEL 2: PRECISION FILTER GRID / FLEX RESPONSIVO & ESPAÇOSO ── */
.uconsole-filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.015);
    align-items: flex-end;
}

.uconsole-filter-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 180px;
    min-width: 170px;
}

/* Setor e Cargo ganham mais peso e largura para comportar nomes extensos sem corte */
.uconsole-filter-cell.cell-wide {
    flex: 1.6 1 240px;
    min-width: 220px;
}

.uconsole-cell-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
    white-space: nowrap;
}

.uconsole-cell-label i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.uconsole-select {
    width: 100%;
    min-width: 0;
    height: 38px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    border-radius: 8px;
    padding: 0 30px 0 11px;
    font-size: 0.82rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.18s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.uconsole-select option {
    background: var(--card, #1e293b);
    color: var(--text-color, #f8fafc);
    padding: 8px 12px;
    font-size: 0.84rem;
}

.uconsole-select:hover {
    border-color: #3b82f6;
    background-color: var(--card);
}

.uconsole-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: var(--card);
}

.uconsole-filter-action {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

.uconsole-btn-reset {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.uconsole-btn-reset:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

/* ── NÍVEL 3: CHIPS DE ATALHO RÁPIDO & RESUMO DINÂMICO ── */
.uconsole-quickbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--border);
}

.uconsole-quick-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 3px;
    user-select: none;
}

.uconsole-quick-sep {
    color: var(--border);
    font-size: 0.85rem;
    user-select: none;
    margin: 0 2px;
}

.users-quick-pills-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.users-quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.users-quick-pill:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.06);
}

.users-quick-pill .pill-counter {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 0 5px;
    border-radius: 8px;
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--muted);
}

.users-quick-pill.active {
    background: rgba(59, 130, 246, 0.14) !important;
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.users-quick-pill.active .pill-counter {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* 2.2 RESUMO DE RESULTADOS & FILTROS ATIVOS */
.users-filter-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 0 4px;
}

.users-summary-count {
    font-size: 0.82rem;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.users-summary-count b {
    color: var(--text-color);
    font-weight: 700;
}

.users-active-tags-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.users-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 600;
    animation: fadeIn 0.15s ease;
}

.users-active-tag button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.users-active-tag button:hover {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   SISTEMA DE CLASSIFICAÇÃO E ENQUADRAMENTO — USUÁRIOS & PERMISSÕES
   Hierarquia: Empresa → Perfil → Setor → Contrato → Status → Local
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. BADGES DE EMPRESA DE REGISTRO (badge-empresa-*) ── */
.badge-empresa {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge-empresa-seguros {
    background: rgba(59, 130, 246, 0.13);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}
.badge-empresa-agro {
    background: rgba(34, 197, 94, 0.13);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.3);
}
.badge-empresa-transportes {
    background: rgba(249, 115, 22, 0.13);
    color: #ea580c;
    border-color: rgba(249, 115, 22, 0.3);
}
.badge-empresa-financeiro {
    background: rgba(217, 119, 6, 0.13);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.3);
}
.user-units-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* ── 2. BADGES DE PERFIL DE ACESSO / ROLE (urole-*) ── */
/* Hierarquia decrescente: Admin > Diretoria > Gestor > Corretor > (Colaborador = sem badge) */
.urole {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    white-space: nowrap;
    flex-shrink: 0;
}
.urole-admin {
    background: rgba(168, 85, 247, 0.18);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.4);
}
.urole-diretoria {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.urole-gestor {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.35);
}
.urole-corretor {
    background: rgba(20, 184, 166, 0.13);
    color: #0d9488;
    border: 1px solid rgba(20, 184, 166, 0.32);
}

/* ── 3. BADGES DE SETOR / DEPARTAMENTO (usetor-*) — Cromáticos por área ── */
.usetor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Alerta: sem setor (triagem RH) */
.usetor-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px dashed rgba(245, 158, 11, 0.5);
    font-style: italic;
}
/* Diretoria & Presidência — Roxo */
.usetor-diretoria {
    background: rgba(168, 85, 247, 0.09);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.22);
}
/* Comercial & Vendas — Verde esmeralda */
.usetor-comercial {
    background: rgba(16, 185, 129, 0.09);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.22);
}
/* Financeiro & Controladoria — Âmbar */
.usetor-financeiro {
    background: rgba(217, 119, 6, 0.09);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.22);
}
/* Sinistros, Operações & Emissão — Azul */
.usetor-operacional {
    background: rgba(59, 130, 246, 0.09);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.22);
}
/* RH & Departamento Pessoal — Rosa */
.usetor-rh {
    background: rgba(236, 72, 153, 0.09);
    color: #db2777;
    border: 1px solid rgba(236, 72, 153, 0.22);
}
/* TI & Tecnologia — Ciano */
.usetor-ti {
    background: rgba(6, 182, 212, 0.09);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.22);
}
/* Frotas & Logística — Laranja */
.usetor-frotas {
    background: rgba(249, 115, 22, 0.09);
    color: #c2410c;
    border: 1px solid rgba(249, 115, 22, 0.22);
}
/* Agro, Pecuária & Nutrição — Verde lima */
.usetor-agro {
    background: rgba(132, 204, 22, 0.09);
    color: #4d7c0f;
    border: 1px solid rgba(132, 204, 22, 0.22);
}
/* Default genérico */
.usetor-default {
    background: rgba(100, 116, 139, 0.08);
    color: var(--muted);
    border: 1px solid rgba(100, 116, 139, 0.18);
}

/* ── 4. BADGES DE TIPO DE CONTRATO (ubadge-*) ── */
.ubadge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.69rem;
    font-weight: 600;
    white-space: nowrap;
}
/* Experiência (45 dias) — Âmbar de alerta */
.ubadge-exp {
    background: rgba(245, 158, 11, 0.13);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
/* Prazo Determinado — Azul informativo */
.ubadge-det {
    background: rgba(59, 130, 246, 0.11);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
/* Indeterminado / CLT — Verde estável */
.ubadge-ind {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.28);
}
/* Estágio — Roxo */
.ubadge-est {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.28);
}
/* Terceirizado / PJ — Cinza neutro */
.ubadge-ter {
    background: rgba(100, 116, 139, 0.1);
    color: var(--muted);
    border: 1px solid rgba(100, 116, 139, 0.25);
}

/* ── 5. STATUS DE SITUAÇÃO DO COLABORADOR (ustatus-*) ── */
.ustatus {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}
.ustatus-ativo {
    background: rgba(16, 185, 129, 0.13);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.ustatus-inativo {
    background: rgba(239, 68, 68, 0.11);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.28);
}
.ustatus-demitido {
    background: rgba(100, 116, 139, 0.11);
    color: var(--muted);
    border: 1px solid rgba(100, 116, 139, 0.22);
    text-decoration: line-through;
    text-decoration-color: rgba(100,116,139,0.5);
}

/* ── 6. BADGE DE LOCALIDADE FÍSICA (ulocal) ── */
.ulocal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    color: var(--muted);
    white-space: nowrap;
}

/* Separador no modo compacto */
.compact-sep {
    color: var(--border);
    font-weight: 300;
    opacity: 0.6;
    user-select: none;
}


.users-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── 3. SELETOR SEGMENTADO DE MODOS DE VISUALIZAÇÃO ── */
.users-view-switcher {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.users-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.users-view-btn:hover {
    color: var(--text-color);
    background: var(--border);
}

.users-view-btn.active {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* ── 4. TABS EM PÍLULA (ATIVOS / INATIVOS / DEMITIDOS) ── */
.users-tabs-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.users-tab-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 7px 15px;
    border-radius: 24px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.users-tab-pill-btn:hover {
    color: var(--text-color);
    border-color: rgba(59, 130, 246, 0.4);
}

.users-tab-pill-btn.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    color: #3b82f6;
    font-weight: 700;
}

.users-tab-pill-btn .tab-count-badge {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 1px 7px;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
}

.users-tab-pill-btn.active .tab-count-badge {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* ── 5. MODO 1: TABELA EXECUTIVA MODERNA (DATAGRID) ── */
.users-table-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.users-table-modern {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.86rem;
}

.users-table-modern thead th {
    background: var(--bg);
    color: var(--muted);
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.users-table-modern tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.users-table-modern tbody tr:last-child {
    border-bottom: none;
}

.users-table-modern tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.users-table-modern td {
    padding: 12px 16px;
    vertical-align: middle;
}

/* Avatar de Colaborador */
.user-avatar-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.user-avatar-circle .status-indicator-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--card);
}

.status-indicator-dot.online { background: #10b981; }
.status-indicator-dot.offline { background: #94a3b8; }
.status-indicator-dot.demitido { background: #dc2626; }

.user-meta-name {
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-meta-role {
    font-size: 0.77rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ── 6. BOTÕES DE AÇÃO PROPORCIONAIS (32PX) ── */
.user-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.btn-user-primary {
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.35);
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-user-primary:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-user-more {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.btn-user-more:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
}

/* ── 7. MODO 2: GRADE DE CARDS (CARDS GRID GLASSMORPHISM) ── */
.users-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.user-profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.22s ease;
}

.user-profile-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.user-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.user-card-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    position: relative;
}

.user-card-avatar .status-indicator-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card);
}

.user-card-title h4 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-color);
}

.user-card-title p {
    margin: 3px 0 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.user-card-body {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
}

.user-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.user-card-row i {
    width: 16px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.user-card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-card-foot .btn-user-primary {
    flex: 1;
    justify-content: center;
}

/* ── 8. MODO 3: COMPACTO (DIRETÓRIO / DENSIDADE MÁXIMA) ── */
.users-compact-list {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.user-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
    gap: 12px;
}

.user-compact-row:last-child {
    border-bottom: none;
}

.user-compact-row:hover {
    background: rgba(59, 130, 246, 0.04);
}

.user-compact-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.user-compact-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-compact-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
}

.user-compact-mid {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── 9. MENU SUSPENSO CONTEXTUAL FLUTUANTE (••• DROPDOWN) ── */
#user-context-menu {
    position: fixed;
    z-index: 99999;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: 6px;
    min-width: 220px;
    max-width: 280px;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: userMenuPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(16px);
}

@keyframes userMenuPop {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.user-menu-header {
    padding: 6px 10px 8px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.user-menu-header-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-header-sub {
    font-size: 0.72rem;
    color: var(--muted);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.15s ease;
}

.user-menu-item i {
    width: 16px;
    font-size: 0.85rem;
    text-align: center;
}

.user-menu-item:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.user-menu-item.danger {
    color: #ef4444;
}

.user-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.user-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ── 10. RESPONSIVO ── */
@media (max-width: 840px) {
    .users-mgmt-toolbar, .uconsole-command-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .users-toolbar-left, .users-toolbar-right, .uconsole-controls-right {
        width: 100%;
        justify-content: space-between;
    }
    .users-search-box, .uconsole-search-box {
        max-width: 100%;
        width: 100%;
    }
    .user-compact-mid {
        display: none;
    }
}



/* ════════════════════════════════════════════════════════════════
   QUICK VIEW DRAWER — Painel de Visão Rápida de Colaborador
   ════════════════════════════════════════════════════════════════ */

/* Overlay escurecedor */
#user-quick-view-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(2px);
    z-index: 9997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#user-quick-view-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Drawer principal */
#user-quick-view {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

#user-quick-view.open {
    transform: translateX(0);
}

/* Cabeçalho do drawer */
.uqv-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 18px 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
}

.uqv-avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
    position: relative;
}

.uqv-avatar-circle .uqv-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid var(--card);
}

.uqv-avatar-circle .uqv-status-dot.online  { background: #10b981; }
.uqv-avatar-circle .uqv-status-dot.offline { background: #64748b; }
.uqv-avatar-circle .uqv-status-dot.demitido { background: #ef4444; }
.uqv-avatar-circle .uqv-status-dot.locked  { background: #f59e0b; }

.uqv-header-info {
    flex: 1;
    min-width: 0;
}

.uqv-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.uqv-role-chip {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.uqv-role-admin    { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.uqv-role-gestor   { background: rgba(59, 130, 246, 0.14); color: #3b82f6; }
.uqv-role-diretoria{ background: rgba(217, 119, 6, 0.14);  color: #d97706; }
.uqv-role-default  { background: rgba(100, 116, 139, 0.14); color: #64748b; }

.uqv-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.uqv-close-btn:hover {
    color: var(--text-color);
    background: var(--border);
}

/* Corpo com scroll */
.uqv-scroll-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 8px;
}

/* Alerta de conta bloqueada */
.uqv-lock-alert {
    margin: 14px 16px 0 16px;
    background: rgba(239, 68, 68, 0.09);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.uqv-lock-alert > i {
    color: #ef4444;
    font-size: 1rem;
    animation: uqvPulse 1.6s ease-in-out infinite;
}

.uqv-lock-alert > span {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    color: #ef4444;
}

@keyframes uqvPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* Seções de dados */
.uqv-section {
    padding: 14px 18px 6px 18px;
    border-top: 1px solid var(--border);
}

.uqv-section:first-child {
    border-top: none;
    padding-top: 16px;
}

.uqv-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 10px;
}

.uqv-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
    font-size: 0.83rem;
}

.uqv-row > i {
    width: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.uqv-label {
    color: var(--muted);
    font-weight: 500;
    width: 76px;
    flex-shrink: 0;
    line-height: 1.4;
}

.uqv-val {
    color: var(--text-color);
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}

/* Botões de ação rápida */
.uqv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-color);
    font-size: 0.81rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

.uqv-action-btn:hover {
    background: var(--border);
    color: var(--text-color);
}

.uqv-action-btn.unlock {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
    flex: none;
    width: auto;
    margin-top: 0;
    padding: 5px 11px;
    font-size: 0.78rem;
}

.uqv-action-btn.unlock:hover {
    background: rgba(239, 68, 68, 0.2);
}

.uqv-action-btn.confirm {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #10b981;
    flex: 1;
    margin-top: 0;
}

.uqv-action-btn.confirm:hover {
    background: rgba(16, 185, 129, 0.22);
}

.uqv-action-btn.cancel {
    background: transparent;
    border-color: var(--border);
    color: var(--muted);
    flex: none;
    width: auto;
    margin-top: 0;
    padding: 7px 12px;
}

.uqv-action-btn.cancel:hover {
    color: var(--text-color);
    background: var(--border);
}

/* Formulário inline de senha */
.uqv-pass-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uqv-pass-form input[type="password"] {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-color);
    font-size: 0.83rem;
    outline: none;
    transition: border-color 0.18s ease;
    box-sizing: border-box;
}

.uqv-pass-form input[type="password"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.uqv-pass-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Rodapé fixo */
.uqv-footer {
    padding: 14px 18px 18px 18px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--card);
}

.uqv-units-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.uqv-edit-full-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
}

.uqv-edit-full-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}

/* ═════════════════════════════════════════════════════════════════════════════
   ESTÚDIO DE VÍDEO NATIVO INTERATIVO F&A (SIMULADOR DE TELAS E VOZ GUIADA)
   ═════════════════════════════════════════════════════════════════════════════ */
@keyframes pulseRed {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

@keyframes clickRippleEffect {
    0% { transform: scale(0.2); opacity: 1; }
    100% { transform: scale(2.8); opacity: 0; }
}

.cursor-ripple {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.45);
    border: 2px solid #38bdf8;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    animation: clickRippleEffect 0.6s cubic-bezier(0, 0.2, 0.8, 1) forwards;
    pointer-events: none;
}

.treina-cena-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.treina-cena-item:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.treina-cena-item.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.treina-cena-item.active .treina-cena-time {
    background: #0284c7;
    color: #ffffff;
}

.treina-cena-time {
    font-family: monospace;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.treina-speed-btn.active {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.15) !important;
}

/* Telas de simulação interativa em HTML puro */
.treina-sim-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    background: radial-gradient(circle at 10% 20%, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    color: #f8fafc;
    position: relative;
}

.treina-sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.treina-sim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    overflow: hidden;
}

.treina-sim-table th {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    text-align: left;
    padding: 8px 12px;
    font-weight: 700;
}

.treina-sim-table td {
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.treina-sim-table tr.highlight {
    background: rgba(56, 189, 248, 0.15);
    border-left: 3px solid #38bdf8;
}

/* ==========================================================================
   AGRO VENDAS: STATUS DIÁRIO, ALERTAS E MODAL DE CONFIRMAÇÃO (DARK DEFAULT)
   ========================================================================== */
.agro-warning-alert,
#mconf-alerta-bloqueio {
    background: rgba(234, 179, 8, 0.14);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #fef08a;
}
.agro-warning-alert i,
#mconf-alerta-bloqueio i {
    color: #eab308;
    margin-right: 6px;
}
.agro-warning-alert b,
.agro-warning-alert strong,
#mconf-alerta-bloqueio b,
#mconf-alerta-bloqueio strong {
    color: #ffffff;
    font-weight: 800;
}

#bar-status-confirmacao-dia.status-dia-confirmado {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
#bar-status-confirmacao-dia.status-dia-confirmado #lbl-status-confirmado-texto {
    color: #4ade80;
}
#bar-status-confirmacao-dia.status-dia-confirmado #lbl-status-confirmado-texto b {
    color: #ffffff;
}
#bar-status-confirmacao-dia.status-dia-confirmado #badge-status-confirmado-pill {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

#bar-status-confirmacao-dia.status-dia-bloqueado {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.45);
}
#bar-status-confirmacao-dia.status-dia-bloqueado #lbl-status-confirmado-texto {
    color: #fca5a5;
}
#bar-status-confirmacao-dia.status-dia-bloqueado #lbl-status-confirmado-texto b {
    color: #ffffff;
}
#bar-status-confirmacao-dia.status-dia-bloqueado #badge-status-confirmado-pill {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.mconf-dialog-card {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(234, 179, 8, 0.4);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85);
}
.mconf-header-sub {
    color: #eab308;
}
.mconf-header-title {
    color: #f8fafc;
}
.mconf-btn-close {
    color: #94a3b8;
}
.mconf-diesel-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mconf-diesel-label {
    color: #38bdf8;
}
.mconf-diesel-help,
.mconf-diesel-prefix {
    color: #94a3b8;
}
.mconf-diesel-input {
    color: #38bdf8;
}
.mconf-prods-label {
    color: #4ade80;
}
.mconf-prods-help {
    color: #94a3b8;
}
.mconf-prod-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mconf-prod-nome {
    color: #f8fafc;
}
.mconf-prod-unit,
.mconf-prod-moeda,
.mconf-prod-sufixo {
    color: #94a3b8;
}
.mconf-prod-preco {
    color: #4ade80 !important;
}
.mconf-btn-manter {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.mconf-btn-salvar {
    background: #eab308;
    border: none;
    color: #000000;
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

.hist-preco-tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hist-preco-data {
    color: #fbbf24;
}
.hist-preco-criado,
.hist-preco-user-cpf,
.hist-preco-resumo-texto,
.hist-preco-resumo-detalhe {
    color: #94a3b8;
}
.hist-preco-user-nome {
    color: #f8fafc;
}
.hist-preco-diesel {
    color: #38bdf8;
}
.hist-preco-prod-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}
.hist-preco-prod-val {
    color: #4ade80;
}



