:root {
      --q-primary: #5c079e !important;
      --q-secondary: #7c1ec9 !important;
      --q-accent: #9b51e0 !important;
      --q-dark: #09090e !important;
      --q-positive: #8cc63f !important;
      --q-negative: #d60066 !important;
      --q-info: #00adea !important;
      --q-warning: #f47a21 !important;
      
      /* Mini Guia UFC Inova Oficial */
      --color-brand-primary: #5c079e;
      --color-brand-primary-hover: #4a0580;
      --color-support-black: #000000;
      --color-support-white: #ffffff;
      --color-support-pink: #be47d6;
      --color-support-red: #d60066;
      --color-support-orange: #f47a21;
      --color-support-green: #8cc63f;
      --color-support-blue: #00adea;
      
      --color-brand-cta: #8cc63f;
      --color-brand-cta-hover: #7ab332;
      --color-brand-dark: #09090e;
      --color-brand-textDark: #0f172a;
      --color-brand-textLight: #f8fafc;
      --color-brand-mutedLight: #64748b;
      --color-brand-mutedDark: #94a3b8;
      --color-brand-light: #f8fafc;
      --primary: #5c079e;
      --radius-sm: 12px;
      --radius-md: 20px;
      --radius-lg: 28px;
    }

    body, input, button, select, textarea, .q-btn, .q-field, .q-table, .q-card, .q-tab, .q-chip {
        font-family: "Metropolis", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }

    h1, h2, h3, h4, h5, h6, .font-heading {
        font-family: "UFC Inova Bold", "Metropolis", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        letter-spacing: -0.025em;
    }

    .font-subheading {
        font-family: "Metropolis", "Plus Jakarta Sans", sans-serif !important;
    }

    .font-serif {
        font-family: "Source Serif 4", Georgia, Cambria, serif !important;
    }

    /* Restaura a fonte correta para elementos de ícones do Quasar/Material Icons */
    .q-icon, .material-icons, [class^="ti-"], [class*=" ti-"] {
        font-family: 'Material Icons', 'Material Icons Outlined', 'tabler-icons' !important;
    }

    body {
        background-color: #f8fafc;
        background-image: 
            radial-gradient(circle at 85% 15%, rgba(92, 7, 158, 0.08), transparent 45%),
            radial-gradient(circle at 10% 85%, rgba(49, 186, 78, 0.05), transparent 40%);
        color: #0f172a;
        min-height: 100vh;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Scrollbar personalizada Flow & Brand */
    ::-webkit-scrollbar {
        width: 7px;
        height: 7px;
    }
    ::-webkit-scrollbar-track {
        background: #f1eff4;
    }
    ::-webkit-scrollbar-thumb {
        background: #d3cfe0;
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #5c079e;
    }

    /* Card Glassmorphic Oficial UFC Inova */
    .ufc-glass-card {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(226, 232, 240, 0.85);
        border-radius: 20px;
        box-shadow: 0 20px 40px -15px rgba(92, 7, 158, 0.05);
    }

    /* Estilização das Abas em Segmented Control / Pill */
    .flow-tabs .q-tab {
        border-radius: 12px;
        transition: all 200ms ease;
        margin: 2px 4px;
        min-height: 42px;
    }
    .flow-tabs .q-tab--active {
        background: rgba(92, 7, 158, 0.09);
        color: #5c079e !important;
    }
    .flow-tabs .q-tab--active .q-tab__label {
        font-weight: 800 !important;
        color: #5c079e !important;
    }

    /* Correção de contraste e tema para elementos Quasar (Roxo Monocromático UFC) */
    .text-primary {
        color: #5c079e !important;
    }
    .bg-primary {
        background-color: #5c079e !important;
    }
    .text-secondary {
        color: #7c1ec9 !important;
    }
    .bg-secondary {
        background-color: #7c1ec9 !important;
    }
    .q-btn--outline {
        background: #ffffff !important;
    }
    .q-btn--outline .q-btn__content {
        color: #5c079e !important;
    }
    .q-btn--unelevated.bg-primary, .q-btn--unelevated[class*="bg-[#5c079e]"] {
        background: #5c079e !important;
        color: #ffffff !important;
    }
    .q-checkbox__inner--truthy, .q-toggle__inner--truthy, .q-radio__inner--truthy {
        color: #5c079e !important;
    }
    .q-spinner {
        color: #5c079e !important;
    }
    .q-linear-progress .q-linear-progress__model {
        background-color: #5c079e !important;
    }
    .q-field--focused .q-field__control {
        border-color: #5c079e !important;
    }

    /* =========================================================================
       TEMA ESCURO (DEEP MIDNIGHT & AMETHYST) - UI/UX PRO MAX DESIGN SYSTEM
       ========================================================================= */

    /* Transição suave de 250ms respeitando acessibilidade */
    @media (prefers-reduced-motion: no-preference) {
        body, .q-header, .q-card, .card-wow-container, .q-table, .q-table__container, .q-input, .q-field, .doc-paper-surface, header {
            transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, box-shadow 250ms ease !important;
        }
    }

    /* Superfície base profunda do Body */
    body.body--dark {
        background-color: #09090e !important;
        background-image: 
            radial-gradient(circle at 85% 15%, rgba(155, 81, 224, 0.12), transparent 50%),
            radial-gradient(circle at 10% 85%, rgba(140, 198, 63, 0.08), transparent 45%) !important;
        color: #f1f5f9 !important;
    }

    /* Cabeçalho Executivo Top-Level */
    body.body--dark header,
    body.body--dark .q-header {
        background-color: rgba(14, 15, 23, 0.90) !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
        color: #f1f5f9 !important;
    }

    /* Cartões e Superfícies Elevadas (#161622) */
    body.body--dark .bg-white,
    body.body--dark .q-card,
    body.body--dark [class*="bg-white"] {
        background-color: #161622 !important;
        color: #f1f5f9 !important;
    }
    body.body--dark [class*="bg-white/90"],
    body.body--dark [class*="bg-white/80"],
    body.body--dark [class*="bg-white/70"] {
        background-color: rgba(22, 22, 34, 0.92) !important;
    }

    /* Superfícies Secundárias / Neutros Escuros */
    body.body--dark .bg-slate-50,
    body.body--dark [class*="bg-slate-50"],
    body.body--dark [class*="bg-[#fbfafc]"] {
        background-color: #0f111a !important;
    }
    body.body--dark .bg-slate-100,
    body.body--dark [class*="bg-slate-100"] {
        background-color: #1c1c2e !important;
    }
    body.body--dark .bg-slate-200,
    body.body--dark [class*="bg-slate-200"] {
        background-color: #252538 !important;
    }

    /* Classes de Superfície Adaptativa (UI/UX Pro Max) */
    .header-pill-card,
    .home-chat-card,
    .login-card,
    .office-panel-card,
    .office-mini-header,
    .office-btn-inactive,
    .office-diff-inactive {
        background-color: #ffffff;
        background: #ffffff;
        transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease;
    }

    body.body--dark .header-pill-card,
    body.body--dark .home-chat-card,
    body.body--dark .login-card,
    body.body--dark .office-panel-card,
    body.body--dark .office-mini-header,
    body.body--dark .office-btn-inactive,
    body.body--dark .office-diff-inactive {
        background-color: #161622 !important;
        background: #161622 !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #f1f5f9 !important;
    }

    body.body--dark .office-btn-inactive:hover,
    body.body--dark .office-diff-inactive:hover {
        background-color: #1c1c2e !important;
        border-color: rgba(168, 85, 247, 0.45) !important;
        color: #c084fc !important;
    }

    body.body--dark .header-user-name,
    body.body--dark .home-chat-title,
    body.body--dark .office-panel-title {
        color: #f8fafc !important;
    }

    body.body--dark .header-user-role,
    body.body--dark .home-chat-subtitle {
        color: #94a3b8 !important;
    }

    body.body--dark .q-btn--outline {
        background: transparent !important;
        border-color: rgba(168, 85, 247, 0.4) !important;
        color: #c084fc !important;
    }
    body.body--dark .q-btn--outline .q-btn__content {
        color: #c084fc !important;
    }

    /* Bordas com Contraste Suave */
    body.body--dark .border-slate-100,
    body.body--dark .border-slate-200,
    body.body--dark [class*="border-slate-100"],
    body.body--dark [class*="border-slate-200"],
    body.body--dark [class*="border-slate-300"],
    body.body--dark [class*="border-[#e9e7ed]"],
    body.body--dark [class*="border-[#f0eef5]"] {
        border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Rim Lighting & Sombras Amethyst Glow */
    body.body--dark .q-card,
    body.body--dark .ufc-glass-card {
        background: rgba(22, 22, 34, 0.90) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 4px 20px -2px rgba(155, 81, 224, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    }

    /* Grid de Cards Wow (Home Tab) */
    body.body--dark .card-wow-container {
        background-color: #161622 !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 4px 20px -2px rgba(155, 81, 224, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    }
    body.body--dark .card-wow-container:hover {
        background-color: #1c1c2e !important;
        border-color: rgba(168, 85, 247, 0.45) !important;
        box-shadow: 0 12px 30px -4px rgba(168, 85, 247, 0.25), 0 0 0 1px rgba(168, 85, 247, 0.3) !important;
    }
    body.body--dark .card-wow-title {
        color: #f1f5f9 !important;
    }

    /* Tipografia de Alta Legibilidade (WCAG AAA) */
    body.body--dark .text-slate-900,
    body.body--dark .text-slate-800,
    body.body--dark .text-\[\#0F172A\],
    body.body--dark .text-\[\#202024\],
    body.body--dark .text-\[\#09090e\] {
        color: #f8fafc !important;
    }
    body.body--dark .text-slate-700,
    body.body--dark .text-slate-600,
    body.body--dark .text-\[\#6d6972\] {
        color: #cbd5e1 !important;
    }
    body.body--dark .text-slate-500,
    body.body--dark .text-\[\#8e8a94\] {
        color: #94a3b8 !important;
    }
    body.body--dark .text-slate-400 {
        color: #64748b !important;
    }

    /* Form Fields, Inputs e Selects */
    body.body--dark .q-field__control {
        background-color: #11111a !important;
        color: #f8fafc !important;
    }
    body.body--dark .q-field__native,
    body.body--dark .q-field__input {
        color: #f8fafc !important;
    }
    body.body--dark .q-field--outlined .q-field__control:before {
        border-color: rgba(255, 255, 255, 0.12) !important;
    }
    body.body--dark .q-field--outlined:hover .q-field__control:before {
        border-color: #a855f7 !important;
    }

    /* Menus Dropdown e Popups */
    body.body--dark .q-menu {
        background-color: #161622 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #f1f5f9 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    }
    body.body--dark .q-item {
        color: #e2e8f0 !important;
    }
    body.body--dark .q-item:hover {
        background-color: rgba(168, 85, 247, 0.15) !important;
        color: #c084fc !important;
    }

    /* Tabelas Quasar */
    body.body--dark .q-table__container {
        background-color: #161622 !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #f1f5f9 !important;
    }
    body.body--dark .q-table thead tr th {
        background-color: #11111a !important;
        color: #cbd5e1 !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }
    body.body--dark .q-table tbody td {
        border-bottom-color: rgba(255, 255, 255, 0.05) !important;
        color: #f1f5f9 !important;
    }
    body.body--dark .q-table tbody tr:hover {
        background-color: rgba(168, 85, 247, 0.08) !important;
    }

    /* Scrollbars no Dark Mode */
    body.body--dark ::-webkit-scrollbar-track {
        background: #09090e !important;
    }
    body.body--dark ::-webkit-scrollbar-thumb {
        background: #2b2b3d !important;
    }
    body.body--dark ::-webkit-scrollbar-thumb:hover {
        background: #a855f7 !important;
    }

    /* Leitor E-Reader Escuro de Documentos (Office Bi-Doc & Dossiê) */
    body.body--dark .doc-paper-dark {
        background-color: #12121c !important;
        color: #e2e8f0 !important;
    }
    body.body--dark .doc-paper-dark [id^="office-par-"] {
        border-bottom-color: rgba(255, 255, 255, 0.05) !important;
    }
    body.body--dark .doc-paper-dark [id^="office-par-"]:hover {
        background-color: rgba(168, 85, 247, 0.1) !important;
    }
    /* Suporte a Folha Clara individual */
    body.body--dark .doc-paper-light {
        background-color: #ffffff !important;
        color: #0f172a !important;
    }
    body.body--dark .doc-paper-light div {
        color: #0f172a !important;
    }

    /* Grifador de Entidades e Valores */
    .tag-moeda-highlight {
        background-color: rgba(253, 230, 138, 0.85);
        color: #451a03;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 4px;
        border: 1px solid #fcd34d;
        font-family: monospace;
    }
    body.body--dark .tag-moeda-highlight {
        background-color: rgba(120, 53, 15, 0.5) !important;
        color: #fde68a !important;
        border-color: rgba(245, 158, 11, 0.5) !important;
    }

    .tag-pct-highlight {
        background-color: #f3e8ff;
        color: #3b0764;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 4px;
        border: 1px solid #e9d5ff;
        font-family: monospace;
    }
    body.body--dark .tag-pct-highlight {
        background-color: rgba(88, 28, 135, 0.5) !important;
        color: #e9d5ff !important;
        border-color: rgba(168, 85, 247, 0.5) !important;
    }

    /* Diff Redline no Dark Mode */
    body.body--dark del {
        background-color: rgba(136, 19, 55, 0.45) !important;
        color: #fda4af !important;
        text-decoration-color: #f43f5e !important;
    }
    body.body--dark ins {
        background-color: rgba(6, 78, 59, 0.45) !important;
        color: #6ee7b7 !important;
        text-decoration-color: #10b981 !important;
    }
