/* Falcon - modelos visuais selecionaveis em Admin > Configuracoes
   Camada CSS global. Nao altera rotas, permissoes ou regras de negocio. */
body.theme-saas{--theme-primary:#2563eb;--theme-primary-2:#1d4ed8;--theme-accent:#38bdf8;--theme-sidebar-1:#071426;--theme-sidebar-2:#0f1e35;--theme-bg:#f4f8fd;--theme-panel:#ffffff;--theme-text:#0f172a;--theme-muted:#64748b;--theme-border:#e2e8f0;--theme-shadow:0 14px 40px rgba(15,23,42,.08)}
body.theme-corporativo{--theme-primary:#16a34a;--theme-primary-2:#15803d;--theme-accent:#22c55e;--theme-sidebar-1:#0c1f18;--theme-sidebar-2:#123524;--theme-bg:#f6fbf7;--theme-panel:#ffffff;--theme-text:#102018;--theme-muted:#60736a;--theme-border:#dcefe2;--theme-shadow:0 12px 34px rgba(20,83,45,.08)}
body.theme-seguranca{--theme-primary:#0ea5e9;--theme-primary-2:#0369a1;--theme-accent:#22c55e;--theme-sidebar-1:#020617;--theme-sidebar-2:#0b2033;--theme-bg:#07111f;--theme-panel:#0f1b2d;--theme-text:#e5eef9;--theme-muted:#9fb2c7;--theme-border:#213247;--theme-shadow:0 16px 44px rgba(0,0,0,.24)}
body.theme-minimalista{--theme-primary:#8b5cf6;--theme-primary-2:#7c3aed;--theme-accent:#c084fc;--theme-sidebar-1:#ffffff;--theme-sidebar-2:#f8fafc;--theme-bg:#fbfbff;--theme-panel:#ffffff;--theme-text:#1e1b4b;--theme-muted:#7c7a90;--theme-border:#ebe7ff;--theme-shadow:0 10px 30px rgba(76,29,149,.07)}
body.theme-escuro{--theme-primary:#f97316;--theme-primary-2:#ea580c;--theme-accent:#fb923c;--theme-sidebar-1:#050505;--theme-sidebar-2:#111827;--theme-bg:#090b10;--theme-panel:#111827;--theme-text:#f8fafc;--theme-muted:#a6b0bf;--theme-border:#263244;--theme-shadow:0 16px 44px rgba(0,0,0,.34)}

body[class*="theme-"]{background:var(--theme-bg)!important;color:var(--theme-text)!important;}
body[class*="theme-"] .sidebar{background:linear-gradient(180deg,var(--theme-sidebar-1),var(--theme-sidebar-2))!important;}
body[class*="theme-"] .sidebar a.active,
body[class*="theme-"] .btn.primary,
body[class*="theme-"] .primary,
body[class*="theme-"] button.primary,
body[class*="theme-"] .quicknav a.active{background:var(--theme-primary)!important;border-color:var(--theme-primary)!important;color:#fff!important;box-shadow:0 10px 24px color-mix(in srgb,var(--theme-primary) 28%,transparent)!important;}
body[class*="theme-"] .btn.primary:hover,
body[class*="theme-"] .primary:hover,
body[class*="theme-"] button.primary:hover{background:var(--theme-primary-2)!important;}
body[class*="theme-"] .panel,
body[class*="theme-"] .quick,
body[class*="theme-"] .invoice-paper,
body[class*="theme-"] .client-hero,
body[class*="theme-"] .hero-saas,
body[class*="theme-"] .premium-hero,
body[class*="theme-"] .pay-hero,
body[class*="theme-"] .stat,
body[class*="theme-"] .userpill{background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;box-shadow:var(--theme-shadow)!important;}
body[class*="theme-"] .topbar h1,
body[class*="theme-"] .panel h2,
body[class*="theme-"] .quick h2,
body[class*="theme-"] .stat b{color:var(--theme-text)!important;}
body[class*="theme-"] .topbar p,
body[class*="theme-"] .panel p,
body[class*="theme-"] .quick p,
body[class*="theme-"] .stat p,
body[class*="theme-"] .muted,
body[class*="theme-"] small{color:var(--theme-muted)!important;}
body[class*="theme-"] .field input,
body[class*="theme-"] .field select,
body[class*="theme-"] .field textarea,
body[class*="theme-"] .tablewrap,
body[class*="theme-"] table,
body[class*="theme-"] td,
body[class*="theme-"] th{border-color:var(--theme-border)!important;}
body[class*="theme-"] .field input:focus,
body[class*="theme-"] .field select:focus,
body[class*="theme-"] .field textarea:focus{border-color:var(--theme-primary)!important;outline:2px solid color-mix(in srgb,var(--theme-primary) 18%,transparent)!important;}

body.theme-corporativo .stat i,body.theme-corporativo .badge.success{color:#15803d!important;background:#dcfce7!important;}
body.theme-corporativo .sidebar a.active{background:#22c55e!important;}
body.theme-corporativo .topbar{border-bottom:1px solid var(--theme-border);padding-bottom:12px;}

body.theme-seguranca .main,body.theme-escuro .main{background:transparent!important;}
body.theme-seguranca .tablewrap,body.theme-seguranca table,body.theme-seguranca th,body.theme-seguranca td,
body.theme-escuro .tablewrap,body.theme-escuro table,body.theme-escuro th,body.theme-escuro td{background:var(--theme-panel)!important;color:var(--theme-text)!important;}
body.theme-seguranca th,body.theme-escuro th{background:#0b1220!important;color:#cbd5e1!important;}
body.theme-seguranca .btn:not(.primary):not(.danger):not(.success),body.theme-seguranca button:not(.primary):not(.danger):not(.success),
body.theme-escuro .btn:not(.primary):not(.danger):not(.success),body.theme-escuro button:not(.primary):not(.danger):not(.success){background:#172033!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;}
body.theme-seguranca .field input,body.theme-seguranca .field select,body.theme-seguranca .field textarea,
body.theme-escuro .field input,body.theme-escuro .field select,body.theme-escuro .field textarea{background:#0b1220!important;color:var(--theme-text)!important;}

body.theme-minimalista .sidebar{box-shadow:14px 0 32px rgba(76,29,149,.08)!important;border-right:1px solid var(--theme-border)!important;}
body.theme-minimalista .sidebar a{color:#4c1d95!important;text-shadow:none!important;}
body.theme-minimalista .sidebar a.active{background:#ede9fe!important;color:#6d28d9!important;border-color:#ddd6fe!important;box-shadow:none!important;}
body.theme-minimalista .brand b{color:#312e81!important;} body.theme-minimalista .brand span{color:#7c7a90!important;}

body.theme-escuro .sidebar a.active{background:#f97316!important;color:#111827!important;}
body.theme-escuro .badge,body.theme-seguranca .badge{border:1px solid var(--theme-border)!important;}

/* Login tambem segue o tema escolhido */
.auth-body[class*="theme-"] .auth-page{background:radial-gradient(circle at 72% 18%, color-mix(in srgb,var(--theme-primary) 12%,transparent), transparent 34%), linear-gradient(135deg,var(--theme-bg),#eef4fb)!important;}
.auth-body[class*="theme-"] .auth-form,
.auth-body[class*="theme-"] .auth-hero-card{background:color-mix(in srgb,var(--theme-panel) 94%,white)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;}
.auth-body[class*="theme-"] .auth-submit{background:var(--theme-primary)!important;border-color:var(--theme-primary)!important;}
.auth-body.theme-seguranca .auth-page,.auth-body.theme-escuro .auth-page{background:radial-gradient(circle at 74% 22%, color-mix(in srgb,var(--theme-primary) 18%,transparent), transparent 32%),linear-gradient(135deg,#050811,var(--theme-bg))!important;}
.auth-body.theme-seguranca .auth-form,.auth-body.theme-seguranca .auth-hero-card,
.auth-body.theme-escuro .auth-form,.auth-body.theme-escuro .auth-hero-card{background:rgba(17,24,39,.92)!important;}

@media(max-width:980px){
  body[class*="theme-"] .mobilebar{background:color-mix(in srgb,var(--theme-panel) 92%,white)!important;border-color:var(--theme-border)!important;}
  body[class*="theme-"] .mobilebar b{color:var(--theme-text)!important;}
  body[class*="theme-"] .mobilebar button{background:var(--theme-primary)!important;color:#fff!important;}
  body.theme-seguranca .mobilebar,body.theme-escuro .mobilebar{background:#0b1220!important;}
  body.theme-minimalista .sidebar{background:#fff!important;}
  body.theme-seguranca .main,body.theme-escuro .main{background:var(--theme-bg)!important;}
}

/* Correcoes de contraste - temas claros e escuros
   Mantem a versao original intacta, pois so atua quando um tema e escolhido. */
body.theme-saas .main,
body.theme-corporativo .main,
body.theme-minimalista .main{color:var(--theme-text)!important;}
body.theme-saas .panel *,
body.theme-saas .quick *,
body.theme-saas .stat *,
body.theme-saas .tablewrap *,
body.theme-saas .client-hero *,
body.theme-saas .invoice-paper *,
body.theme-corporativo .panel *,
body.theme-corporativo .quick *,
body.theme-corporativo .stat *,
body.theme-corporativo .tablewrap *,
body.theme-corporativo .client-hero *,
body.theme-corporativo .invoice-paper *,
body.theme-minimalista .panel *,
body.theme-minimalista .quick *,
body.theme-minimalista .stat *,
body.theme-minimalista .tablewrap *,
body.theme-minimalista .client-hero *,
body.theme-minimalista .invoice-paper *{color:inherit;}
body.theme-saas label,
body.theme-saas table,
body.theme-saas th,
body.theme-saas td,
body.theme-saas .field,
body.theme-saas .field input,
body.theme-saas .field select,
body.theme-saas .field textarea,
body.theme-corporativo label,
body.theme-corporativo table,
body.theme-corporativo th,
body.theme-corporativo td,
body.theme-corporativo .field,
body.theme-corporativo .field input,
body.theme-corporativo .field select,
body.theme-corporativo .field textarea,
body.theme-minimalista label,
body.theme-minimalista table,
body.theme-minimalista th,
body.theme-minimalista td,
body.theme-minimalista .field,
body.theme-minimalista .field input,
body.theme-minimalista .field select,
body.theme-minimalista .field textarea{color:var(--theme-text)!important;}
body.theme-saas th,
body.theme-corporativo th,
body.theme-minimalista th{background:color-mix(in srgb,var(--theme-primary) 7%,#fff)!important;color:var(--theme-text)!important;}
body.theme-saas td,
body.theme-corporativo td,
body.theme-minimalista td{background:var(--theme-panel)!important;color:var(--theme-text)!important;}
body.theme-saas .btn:not(.primary):not(.danger):not(.success),
body.theme-saas button:not(.primary):not(.danger):not(.success),
body.theme-corporativo .btn:not(.primary):not(.danger):not(.success),
body.theme-corporativo button:not(.primary):not(.danger):not(.success),
body.theme-minimalista .btn:not(.primary):not(.danger):not(.success),
body.theme-minimalista button:not(.primary):not(.danger):not(.success){background:#fff!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;}
body.theme-saas .sidebar a,
body.theme-corporativo .sidebar a{color:#e5eef9!important;}
body.theme-saas .brand b,
body.theme-corporativo .brand b{color:#fff!important;}
body.theme-saas .brand span,
body.theme-corporativo .brand span{color:#b8c6d9!important;}
body.theme-minimalista .mobilebar button{color:#fff!important;}
.auth-body.theme-saas label,
.auth-body.theme-saas .auth-form p,
.auth-body.theme-saas .auth-form h1,
.auth-body.theme-corporativo label,
.auth-body.theme-corporativo .auth-form p,
.auth-body.theme-corporativo .auth-form h1,
.auth-body.theme-minimalista label,
.auth-body.theme-minimalista .auth-form p,
.auth-body.theme-minimalista .auth-form h1{color:var(--theme-text)!important;}
.auth-body.theme-saas input,
.auth-body.theme-corporativo input,
.auth-body.theme-minimalista input{background:#fff!important;color:var(--theme-text)!important;}
