/* ============================================================
   ORION UI FRAMEWORK — camada modular (portada do projeto irmão
   Orion em 2026-07-26, ver assets/css/ORION-FRAMEWORK-MANUAL.md).
   Puramente aditiva: nada abaixo desta linha foi alterado. Os
   módulos abaixo trazem tokens --orion-*, utilitários orion-*,
   grid de 12 colunas e componentes novos (modal, dropdown, tabs,
   accordion, offcanvas, tooltip, badges, alerts, skeleton,
   empty-state...). Como são importados ANTES do corpo original
   deste arquivo, qualquer seletor que já existia abaixo continua
   ganhando em empate de especificidade — nenhuma classe hoje em
   uso muda de aparência. Módulos ERP-only do Orion (kanban,
   calendário, odontograma) não foram trazidos por não terem uso
   no Pandora. Cada @import é versionado individualmente porque o
   navegador cacheia cada URL de @import de forma independente —
   bump o ?v= do módulo ao editá-lo.
   ============================================================ */
@import "orion/01-settings/tokens.css?v=20260726-framework";
@import "orion/01-settings/breakpoints.css?v=20260726-framework";
@import "orion/02-foundation/reset.css?v=20260726-framework";
@import "orion/02-foundation/base.css?v=20260726-framework";
@import "orion/02-foundation/typography.css?v=20260726-framework";
@import "orion/02-foundation/focus.css?v=20260726-framework";
@import "orion/03-layout/containers.css?v=20260726-framework";
@import "orion/03-layout/grid.css?v=20260726-framework";
@import "orion/03-layout/stack.css?v=20260726-framework";
@import "orion/04-utilities/display.css?v=20260726-framework";
@import "orion/04-utilities/flex.css?v=20260726-framework";
@import "orion/04-utilities/spacing.css?v=20260726-framework";
@import "orion/04-utilities/sizing.css?v=20260726-framework";
@import "orion/04-utilities/text.css?v=20260726-framework";
@import "orion/04-utilities/colors.css?v=20260726-framework";
@import "orion/04-utilities/borders.css?v=20260726-framework";
@import "orion/04-utilities/accessibility.css?v=20260726-framework";
@import "orion/05-components/buttons.css?v=20260726-framework";
@import "orion/05-components/forms.css?v=20260726-framework";
@import "orion/05-components/cards.css?v=20260726-framework";
@import "orion/05-components/badges.css?v=20260726-framework";
@import "orion/05-components/alerts.css?v=20260726-framework";
@import "orion/05-components/spinner.css?v=20260726-framework";
@import "orion/05-components/progress.css?v=20260726-framework";
@import "orion/05-components/skeleton.css?v=20260726-framework";
@import "orion/05-components/empty-state.css?v=20260726-framework";
@import "orion/05-components/modal.css?v=20260726-framework";
@import "orion/05-components/dropdown.css?v=20260726-framework";
@import "orion/05-components/combobox.css?v=20260726-framework";
@import "orion/05-components/tabs.css?v=20260726-framework";
@import "orion/05-components/accordion.css?v=20260726-framework";
@import "orion/05-components/toast.css?v=20260726-framework";
@import "orion/05-components/offcanvas.css?v=20260726-framework";
@import "orion/05-components/tooltip.css?v=20260726-framework";
@import "orion/05-components/confirm.css?v=20260726-framework";
@import "orion/05-components/date-range.css?v=20260726-framework";
@import "orion/05-components/pagination.css?v=20260726-framework";
@import "orion/05-components/navigation.css?v=20260726-framework";
@import "orion/06-modules/table.css?v=20260726-framework";
@import "orion/06-modules/ai.css?v=20260726-framework";

/* ===================== TOKENS ORION (Pandora, pré-framework) =====================
   Tudo a partir daqui é o orion.css do Pandora como já existia antes desta
   mudança — nenhuma linha foi removida, movida ou reordenada. */
:root{
  --bg:#06060c;
  --panel-bg:rgba(13,13,25,.45);
  --text-main:#f4f4f7;
  --text-muted:#94a3b8;

  --cyan:#06b6d4; --cyan-glow:rgba(6,182,212,.4);
  --emerald:#10b981; --emerald-glow:rgba(16,185,129,.4);
  --rose:#f43f5e; --rose-glow:rgba(244,63,94,.4);

  --sp-1:4px;--sp-2:8px;--sp-3:12px;--sp-4:16px;--sp-5:20px;--sp-6:24px;--sp-7:28px;--sp-8:32px;
  --r-sm:12px;--r-md:16px;--r-lg:22px;--r-pill:20px;--r-circle:50%;

  --fs-xs:9px;--fs-sm:11px;--fs-base:13px;--fs-md:15px;--fs-lg:18px;--fs-xl:23px;--fs-hero:36px;
}
[data-theme="forja"]{
  --primary:#f97316;
  --primary-glow:rgba(249,115,22,.4);
  --panel-border:rgba(249,115,22,.15);
}
[data-theme="orion"]{
  --primary:#a855f7;
  --primary-glow:rgba(168,85,247,.4);
  --panel-border:rgba(147,51,234,.15);
}
[data-theme="cyber"]{
  --primary:#06b6d4;
  --primary-glow:rgba(6,182,212,.4);
  --panel-border:rgba(6,182,212,.15);
}
[data-theme="matrix"]{
  --primary:#10b981;
  --primary-glow:rgba(16,185,129,.4);
  --panel-border:rgba(16,185,129,.15);
}
[data-theme="blood"]{
  --primary:#f43f5e;
  --primary-glow:rgba(244,63,94,.4);
  --panel-border:rgba(244,63,94,.15);
}
[data-theme="sung"]{
  --bg:#03020a;
  --panel-bg:rgba(13,8,31,.62);
  --text-main:#f8f5ff;
  --text-muted:#a99bc7;
  --primary:#8b5cf6;
  --primary-glow:rgba(139,92,246,.42);
  --panel-border:rgba(168,85,247,.2);
  --cyan:#38bdf8;
  --cyan-glow:rgba(56,189,248,.28);
  --rose:#fb2f68;
  --rose-glow:rgba(251,47,104,.3);
  --emerald:#22d3ee;
  --emerald-glow:rgba(34,211,238,.22);
}
[data-theme="ember"]{
  --bg:#05080d;
  --panel-bg:rgba(9,15,24,.66);
  --text-main:#fff8ef;
  --text-muted:#a8b2bd;
  --primary:#ff9f0a;
  --primary-glow:rgba(255,159,10,.36);
  --panel-border:rgba(255,159,10,.18);
  --cyan:#38bdf8;
  --cyan-glow:rgba(56,189,248,.18);
  --rose:#fb4d00;
  --rose-glow:rgba(251,77,0,.32);
  --emerald:#ffd166;
  --emerald-glow:rgba(255,209,102,.2);
}
[data-theme="arounda"]{
  --bg:#161316;
  --panel-bg:rgba(40,40,40,.58);
  --text-main:#fff;
  --text-muted:#d1c7b8;
  --primary:#ffd556;
  --primary-glow:rgba(255,213,86,.34);
  --panel-border:rgba(255,213,86,.2);
  --cyan:#eaff00;
  --cyan-glow:rgba(234,255,0,.2);
  --rose:#ff4b00;
  --rose-glow:rgba(255,75,0,.35);
  --emerald:#f59e0b;
  --emerald-glow:rgba(245,158,11,.22);
}
[data-theme="crimson"]{
  --bg:#050505;
  --panel-bg:rgba(11,11,11,.72);
  --text-main:#f5f2ed;
  --text-muted:#b9aaa4;
  --primary:#8b0d1a;
  --primary-glow:rgba(139,13,26,.36);
  --panel-border:rgba(139,13,26,.24);
  --cyan:#f5f2ed;
  --cyan-glow:rgba(245,242,237,.1);
  --rose:#b11226;
  --rose-glow:rgba(177,18,38,.3);
  --emerald:#d6c7bf;
  --emerald-glow:rgba(214,199,191,.12);
}
[data-theme="nova"]{
  --bg:#070b0f;
  --panel-bg:rgba(10,15,20,.68);
  --text-main:#f8f4e8;
  --text-muted:#a99f8e;
  --primary:#d6a84a;
  --primary-glow:rgba(214,168,74,.32);
  --panel-border:rgba(214,168,74,.18);
  --cyan:#93a4af;
  --cyan-glow:rgba(147,164,175,.16);
  --rose:#b9842d;
  --rose-glow:rgba(185,132,45,.22);
  --emerald:#ffe6a3;
  --emerald-glow:rgba(255,230,163,.16);
}
[data-theme="marple"]{
  --bg:#1f1f1f;
  --panel-bg:rgba(38,36,35,.62);
  --text-main:#fff4ef;
  --text-muted:#d7b9ad;
  --primary:#ca2851;
  --primary-glow:rgba(202,40,81,.36);
  --panel-border:rgba(255,103,102,.2);
  --cyan:#ffe3b3;
  --cyan-glow:rgba(255,227,179,.18);
  --rose:#ff6766;
  --rose-glow:rgba(255,103,102,.32);
  --emerald:#ffb173;
  --emerald-glow:rgba(255,177,115,.22);
}
[data-theme="aureum"]{
  --bg:#0d0c0f;
  --panel-bg:rgba(25,23,27,.66);
  --text-main:#fff4d7;
  --text-muted:#a89d8e;
  --primary:#d29f22;
  --primary-glow:rgba(210,159,34,.34);
  --panel-border:rgba(210,159,34,.2);
  --cyan:#252628;
  --cyan-glow:rgba(80,84,88,.18);
  --rose:#5d0018;
  --rose-glow:rgba(93,0,24,.28);
  --emerald:#f4c95d;
  --emerald-glow:rgba(244,201,93,.18);
}
[data-theme="infected"]{
  --bg:#060a12;
  --panel-bg:rgba(10,14,22,.68);
  --text-main:#f6ead7;
  --text-muted:#a99f91;
  --primary:#caa66a;
  --primary-glow:rgba(202,166,106,.32);
  --panel-border:rgba(202,166,106,.18);
  --cyan:#4b5666;
  --cyan-glow:rgba(75,86,102,.18);
  --rose:#e5b66a;
  --rose-glow:rgba(229,182,106,.22);
  --emerald:#f1d39b;
  --emerald-glow:rgba(241,211,155,.14);
}
[data-theme="sigma"]{
  --bg:#030704;
  --panel-bg:rgba(5,14,8,.66);
  --text-main:#efffe5;
  --text-muted:#9dbb8d;
  --primary:#8bdc3c;
  --primary-glow:rgba(139,220,60,.34);
  --panel-border:rgba(139,220,60,.2);
  --cyan:#b7ff55;
  --cyan-glow:rgba(183,255,85,.2);
  --rose:#5fa51f;
  --rose-glow:rgba(95,165,31,.22);
  --emerald:#6ee83a;
  --emerald-glow:rgba(110,232,58,.22);
}
[data-theme="eclipse"]{
  --bg:#060814;
  --panel-bg:rgba(9,13,28,.66);
  --text-main:#f7f0ef;
  --text-muted:#9ca6b8;
  --primary:#ff4a3d;
  --primary-glow:rgba(255,74,61,.34);
  --panel-border:rgba(255,74,61,.18);
  --cyan:#677386;
  --cyan-glow:rgba(103,115,134,.18);
  --rose:#c92734;
  --rose-glow:rgba(201,39,52,.28);
  --emerald:#ff7a45;
  --emerald-glow:rgba(255,122,69,.22);
}
[data-theme="sunset"]{
  --bg:#1f1511;
  --panel-bg:rgba(48,33,24,.62);
  --text-main:#fff6e7;
  --text-muted:#d0ad8a;
  --primary:#f88f22;
  --primary-glow:rgba(248,143,34,.34);
  --panel-border:rgba(248,143,34,.18);
  --cyan:#ffe3b3;
  --cyan-glow:rgba(255,227,179,.18);
  --rose:#ea6113;
  --rose-glow:rgba(234,97,19,.3);
  --emerald:#fbb931;
  --emerald-glow:rgba(251,185,49,.22);
}
[data-theme="claro"]{
  --bg:#eef2f7;
  --panel-bg:rgba(255,255,255,.50);
  --text-main:#111827;
  --text-muted:#64748b;
  --primary:#f97316;
  --primary-glow:rgba(249,115,22,.22);
  --panel-border:rgba(255,255,255,.62);
  --cyan:#0891b2;
  --cyan-glow:rgba(8,145,178,.18);
  --rose:#e11d48;
  --rose-glow:rgba(225,29,72,.14);
  --emerald:#059669;
  --emerald-glow:rgba(5,150,105,.16);
}
[data-theme="polar"]{
  --bg:#f7fafc;
  --panel-bg:rgba(255,255,255,.52);
  --text-main:#0f172a;
  --text-muted:#64748b;
  --primary:#2563eb;
  --primary-glow:rgba(37,99,235,.2);
  --panel-border:rgba(255,255,255,.66);
  --cyan:#0284c7;
  --cyan-glow:rgba(2,132,199,.16);
  --rose:#dc2626;
  --rose-glow:rgba(220,38,38,.13);
  --emerald:#059669;
  --emerald-glow:rgba(5,150,105,.16);
}
[data-theme="solar"]{
  --bg:#fff8ed;
  --panel-bg:rgba(255,255,255,.50);
  --text-main:#1f2937;
  --text-muted:#6b7280;
  --primary:#d97706;
  --primary-glow:rgba(217,119,6,.2);
  --panel-border:rgba(255,255,255,.64);
  --cyan:#0f766e;
  --cyan-glow:rgba(15,118,110,.16);
  --rose:#be123c;
  --rose-glow:rgba(190,18,60,.13);
  --emerald:#16a34a;
  --emerald-glow:rgba(22,163,74,.16);
}
[data-theme="grafite"]{
  --bg:#07090d;
  --panel-bg:rgba(20,24,33,.58);
  --text-main:#f8fafc;
  --text-muted:#9ca3af;
  --primary:#f59e0b;
  --primary-glow:rgba(245,158,11,.32);
  --panel-border:rgba(245,158,11,.14);
  --cyan:#38bdf8;
  --cyan-glow:rgba(56,189,248,.22);
  --rose:#fb7185;
  --rose-glow:rgba(251,113,133,.18);
}
[data-theme="oceano"]{
  --bg:#031018;
  --panel-bg:rgba(5,25,38,.62);
  --text-main:#ecfeff;
  --text-muted:#8fb6c7;
  --primary:#14b8a6;
  --primary-glow:rgba(20,184,166,.3);
  --panel-border:rgba(20,184,166,.16);
  --cyan:#22d3ee;
  --cyan-glow:rgba(34,211,238,.24);
  --rose:#f43f5e;
  --rose-glow:rgba(244,63,94,.18);
}
[data-theme="noir"]{
  --bg:#08050a;
  --panel-bg:rgba(18,9,15,.55);
  --text-main:#f7eef2;
  --text-muted:#a68a9a;
  --primary:#ec4899;
  --primary-glow:rgba(236,72,153,.4);
  --panel-border:rgba(236,72,153,.18);
  --cyan:#60a5fa;
  --cyan-glow:rgba(96,165,250,.22);
  --rose:#f43f5e;
  --rose-glow:rgba(244,63,94,.3);
  --emerald:#d946ef;
  --emerald-glow:rgba(217,70,239,.22);
}
[data-theme="aurora"]{
  --bg:#05030d;
  --panel-bg:rgba(16,11,32,.55);
  --text-main:#f5f0ff;
  --text-muted:#a79bc9;
  --primary:#8b5cf6;
  --primary-glow:rgba(139,92,246,.42);
  --panel-border:rgba(139,92,246,.22);
  --cyan:#22d3ee;
  --cyan-glow:rgba(34,211,238,.3);
  --rose:#ec4899;
  --rose-glow:rgba(236,72,153,.32);
  --emerald:#a78bfa;
  --emerald-glow:rgba(167,139,250,.24);
}
[data-theme="gold"]{
  --bg:#0a0704;
  --panel-bg:rgba(22,17,8,.58);
  --text-main:#fdf6e3;
  --text-muted:#b3a486;
  --primary:#f2b544;
  --primary-glow:rgba(242,181,68,.36);
  --panel-border:rgba(242,181,68,.2);
  --cyan:#f4d58d;
  --cyan-glow:rgba(244,213,141,.2);
  --rose:#c2410c;
  --rose-glow:rgba(194,65,12,.28);
  --emerald:#facc15;
  --emerald-glow:rgba(250,204,21,.22);
}
[data-theme="midnight"]{
  --bg:#050810;
  --panel-bg:rgba(11,17,30,.58);
  --text-main:#eef4fb;
  --text-muted:#8fa0bd;
  --primary:#6366f1;
  --primary-glow:rgba(99,102,241,.36);
  --panel-border:rgba(99,102,241,.2);
  --cyan:#38bdf8;
  --cyan-glow:rgba(56,189,248,.22);
  --rose:#f43f5e;
  --rose-glow:rgba(244,63,94,.26);
  --emerald:#a5b4fc;
  --emerald-glow:rgba(165,180,252,.2);
}
[data-theme="neonglass"]{
  --bg:#050b16;
  --panel-bg:rgba(8,18,32,.32);
  --text-main:#eaf7ff;
  --text-muted:#7fa0c4;
  --primary:#ff2f92;
  --primary-glow:rgba(255,47,146,.4);
  --panel-border:rgba(255,47,146,.3);
  --cyan:#1de9ff;
  --cyan-glow:rgba(29,233,255,.3);
  --rose:#ff5fa8;
  --rose-glow:rgba(255,95,168,.3);
  --emerald:#2dfcd4;
  --emerald-glow:rgba(45,252,212,.22);
}
/* ===================== TEMAS SOLIDOS (PRETO / BRANCO) =====================
   Sem vidro/blur/gradiente — paineis opacos usando so a escala neutra
   abaixo, ao contrario dos demais temas (glass + gradiente colorido). */
[data-theme="preto"]{
  --bg:#000000;
  --panel-bg:#171717;
  --text-main:#fafafa;
  --text-muted:#a3a3a3;
  --primary:#fafafa;
  --primary-glow:rgba(250,250,250,.2);
  --panel-border:#262626;
  --cyan:#d4d4d4;
  --cyan-glow:rgba(212,212,212,.16);
  --rose:#525252;
  --rose-glow:rgba(82,82,82,.28);
  --emerald:#e5e5e5;
  --emerald-glow:rgba(229,229,229,.18);
}
[data-theme="branco"]{
  --bg:#ffffff;
  --panel-bg:#f5f5f5;
  --text-main:#171717;
  --text-muted:#737373;
  --primary:#171717;
  --primary-glow:rgba(23,23,23,.16);
  --panel-border:#e5e5e5;
  --cyan:#404040;
  --cyan-glow:rgba(64,64,64,.14);
  --rose:#737373;
  --rose-glow:rgba(115,115,115,.2);
  --emerald:#171717;
  --emerald-glow:rgba(23,23,23,.14);
}
[data-theme="preto"] .orion-brand-mark,
[data-theme="preto"] .sidebar-avatar,
[data-theme="preto"] .orion-btn-primary,
[data-theme="preto"] .view-tab.active,
[data-theme="preto"] .page-btn.active,
[data-theme="branco"] .orion-brand-mark,
[data-theme="branco"] .sidebar-avatar,
[data-theme="branco"] .orion-btn-primary,
[data-theme="branco"] .view-tab.active,
[data-theme="branco"] .page-btn.active{
  background:var(--primary);
  box-shadow:0 4px 14px var(--primary-glow);
}
[data-theme="preto"] .orion-brand-mark,
[data-theme="preto"] .sidebar-avatar,
[data-theme="preto"] .orion-btn-primary,
[data-theme="preto"] .view-tab.active,
[data-theme="preto"] .page-btn.active{color:#000;}
[data-theme="branco"] .orion-brand-mark,
[data-theme="branco"] .sidebar-avatar,
[data-theme="branco"] .orion-btn-primary,
[data-theme="branco"] .view-tab.active,
[data-theme="branco"] .page-btn.active{color:#fff;}

[data-theme="branco"]::before{
  background:
    linear-gradient(rgba(15,23,42,.032) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(15,23,42,.032) 1px, transparent 1px) 0 0/40px 40px;
}
[data-theme="branco"] .theme-toggle-row{color:#404040;}
[data-theme="branco"] .theme-toggle-row:hover{background:rgba(0,0,0,.045);}
[data-theme="branco"] .theme-mini-select{
  background:#fff;
  border-color:#d4d4d4;
  color:#171717;
}
[data-theme="branco"] .theme-mini-select option{background:#fff;color:#111827;}
[data-theme="branco"] .theme-option{color:#404040;}
[data-theme="branco"] .theme-option:hover{background:rgba(0,0,0,.045);}
[data-theme="branco"] .theme-option.active{background:rgba(0,0,0,.07);}
@supports (appearance: base-select) {
  [data-theme="branco"] select.orion-input::picker(select),
  [data-theme="branco"] select.filter-select::picker(select),
  [data-theme="branco"] select.theme-mini-select::picker(select){
    background:#fff;
    border-color:rgba(15,23,42,.14);
    box-shadow:0 18px 48px rgba(15,23,42,.18);
  }
  [data-theme="branco"] select.orion-input option,
  [data-theme="branco"] select.filter-select option,
  [data-theme="branco"] select.theme-mini-select option{
    color:#101018;
  }
}
[data-theme="branco"] select.orion-input option,
[data-theme="branco"] .filter-select option{background:#fff;color:#101018;}
[data-theme="branco"] .orion-card{box-shadow:0 8px 24px rgba(0,0,0,.06);}
[data-theme="branco"] .orion-input{
  background:#fff;
  border-color:#d4d4d4;
  color:var(--text-main);
  box-shadow:none;
}
[data-theme="branco"] .orion-btn-ghost,
[data-theme="branco"] .orion-icon-btn{
  background:#f5f5f5;
  border-color:#d4d4d4;
  color:var(--text-muted);
}
[data-theme="branco"] .orion-btn-ghost:hover,
[data-theme="branco"] .orion-icon-btn:hover{
  background:#e5e5e5;
  border-color:#a3a3a3;
  color:var(--text-main);
}
[data-theme="branco"] .orion-header-title h1{
  background:linear-gradient(90deg, #171717, #737373);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}
[data-theme="branco"] .orion-table thead th{
  background:#ededed;
}
[data-theme="branco"] .orion-table-wrap{
  background:#f5f5f5;
  border-color:#e5e5e5;
  box-shadow:0 8px 24px rgba(0,0,0,.05);
}
[data-theme="branco"] .orion-table tbody td{border-bottom-color:#e5e5e5;}
[data-theme="branco"] .orion-table tbody tr:hover{background:#f0f0f0;}
[data-theme="branco"] .modal-box{
  background:#ffffff;
  border-color:#e5e5e5;
  box-shadow:0 20px 60px rgba(0,0,0,.12);
}
[data-theme="branco"] .diag-edit-table th{
  background:#e5e5e5;
  color:#171717;
}
[data-theme="branco"] .diag-edit-table th,
[data-theme="branco"] .diag-edit-table td{border-color:#d4d4d4;}
[data-theme="branco"] .diag-edit-table tfoot td{
  background:#f5f5f5;
  color:var(--text-main);
}
[data-theme="branco"] .diag-cell-input{
  background:#ffffff;
  border-color:#d4d4d4;
  color:var(--text-main);
}
[data-theme="branco"] .dash-chart-baseline{stroke:rgba(0,0,0,.15);}
[data-theme="branco"] .dash-chart-grid-line{stroke:rgba(0,0,0,.07);}
[data-theme="branco"] .dash-hover-guide{stroke:rgba(0,0,0,.35);}
[data-theme="branco"] .dash-chart-tooltip{
  background:#ffffff;
  border-color:rgba(0,0,0,.12);
  box-shadow:0 10px 28px rgba(0,0,0,.15);
}
[data-theme="branco"] .dashboard-donut::before{background:#f5f5f5;}
[data-theme="branco"] .dashboard-chart-panel{
  background:#ededed;
  border-color:#e5e5e5;
}
[data-theme="branco"] .comparador-table tbody td{border-bottom:1px solid #e5e5e5;}
[data-theme="branco"] .ai-chat-panel{
  background:#ffffff;
  border-color:#e5e5e5;
  box-shadow:0 20px 60px rgba(0,0,0,.12);
}
[data-theme="branco"] .orion-topbar{
  background:#ffffff;
  border-bottom-color:#e5e5e5;
  box-shadow:0 4px 16px rgba(0,0,0,.04);
}
[data-theme="branco"] .orion-sidebar{
  background:#fafafa;
  border-right-color:#e5e5e5;
  box-shadow:none;
}
[data-theme="branco"] .sidebar-link{color:#404040;}
[data-theme="branco"] .sidebar-link:hover{background:rgba(0,0,0,.045);}
[data-theme="branco"] .sidebar-link.active{
  background:#f0f0f0;
  border-color:#d4d4d4;
  color:var(--text-main);
  box-shadow:none;
}
[data-theme="branco"] .orion-pagination{
  border-color:#e5e5e5;
  background:#fafafa;
  box-shadow:none;
}
[data-theme="branco"] .pagination-summary{border-top-color:#e5e5e5;}
[data-theme="branco"] .page-btn,
[data-theme="branco"] .summary-mode-btn{
  background:#f5f5f5;
  border-color:#d4d4d4;
  color:var(--text-muted);
}
[data-theme="branco"] .page-btn:hover:not(.disabled):not(.active),
[data-theme="branco"] .summary-mode-btn:hover{
  background:#e5e5e5;
  border-color:#a3a3a3;
  color:var(--text-main);
}
[data-theme="branco"] .footer-summary-label{color:#525252;}

[data-theme="claro"] .orion-table thead th,
[data-theme="polar"] .orion-table thead th,
[data-theme="solar"] .orion-table thead th{
  background:linear-gradient(180deg, rgba(255,255,255,.72), rgba(226,232,240,.42));
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
}
[data-theme="claro"] .orion-input::placeholder,
[data-theme="polar"] .orion-input::placeholder,
[data-theme="solar"] .orion-input::placeholder{color:var(--text-muted);opacity:.78;}
[data-theme="claro"] select.orion-input option,
[data-theme="claro"] .filter-select option,
[data-theme="polar"] select.orion-input option,
[data-theme="polar"] .filter-select option,
[data-theme="solar"] select.orion-input option,
[data-theme="solar"] .filter-select option{background:#fff;color:#101018;}

/* ===================== THEME SWITCHER ===================== */
.theme-switcher{position:relative;}
/* Visibilidade agora e do OrionUI.Dropdown (.orion-dropdown/.is-open, ver
   assets/js/orion-ui/dropdown.js) - .orion-dropdown__menu ja parte de
   display:none. Aqui so restauramos o display:grid quando aberto, porque o
   grid de 4 colunas dos temas e diferente do flex-column generico do
   dropdown padrao. */
.theme-popover{position:absolute;top:44px;right:0;left:auto;z-index:60;grid-template-columns:repeat(4,1fr);gap:6px;padding:10px;width:300px;max-height:min(70vh,620px);overflow-y:auto;}
.orion-dropdown.is-open > .theme-popover{display:grid;}
.theme-option{display:flex;flex-direction:column;align-items:center;gap:6px;padding:7px 5px;border-radius:var(--r-sm);cursor:pointer;font-size:10px;line-height:1.2;color:#fff;text-align:center;transition:.15s;}
.theme-option:hover{background:rgba(255,255,255,.06);}
.theme-option.active{background:rgba(255,255,255,.09);font-weight:600;}
.theme-option.active .theme-swatch{border-color:rgba(255,255,255,.75);box-shadow:0 0 0 2px rgba(255,255,255,.18);}
.theme-swatch{display:block;width:100%;height:34px;border-radius:9px;flex-shrink:0;border:1px solid rgba(255,255,255,.2);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}
.theme-popover-divider{grid-column:1 / -1;height:1px;background:rgba(255,255,255,.08);margin:4px 2px;}
.theme-toggle-row{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:var(--r-sm);cursor:pointer;font-size:var(--fs-sm);color:#fff;transition:.15s;}
.theme-toggle-row:hover{background:rgba(255,255,255,.06);}
.theme-toggle-row span:first-child{display:flex;align-items:center;gap:8px;}
.orion-switch{position:relative;width:34px;height:20px;flex-shrink:0;}
.orion-switch input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer;z-index:1;}
.orion-switch-track{position:absolute;inset:0;background:rgba(255,255,255,.14);border-radius:999px;transition:.2s;}
.orion-switch-track::before{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.4);}
.orion-switch input:checked + .orion-switch-track{background:var(--primary);}
.orion-switch input:checked + .orion-switch-track::before{transform:translateX(14px);}
[data-theme="claro"] .theme-toggle-row,
[data-theme="polar"] .theme-toggle-row,
[data-theme="solar"] .theme-toggle-row{color:#334155;}
[data-theme="claro"] .theme-toggle-row:hover,
[data-theme="polar"] .theme-toggle-row:hover,
[data-theme="solar"] .theme-toggle-row:hover{background:rgba(15,23,42,.045);}
.theme-mini-select{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:var(--r-sm);
  color:#fff;
  font-size:var(--fs-xs);
  padding:4px 6px;
  cursor:pointer;
  outline:none;
}
[data-theme="claro"] .theme-mini-select,
[data-theme="polar"] .theme-mini-select,
[data-theme="solar"] .theme-mini-select{
  background:rgba(15,23,42,.05);
  border-color:rgba(15,23,42,.14);
  color:#334155;
}
[data-theme="claro"] .theme-mini-select option,
[data-theme="polar"] .theme-mini-select option,
[data-theme="solar"] .theme-mini-select option{background:#fff;color:#111827;}
.theme-mini-range{width:96px;accent-color:#fff;cursor:pointer;}
[data-theme="claro"] .theme-mini-range,
[data-theme="polar"] .theme-mini-range,
[data-theme="solar"] .theme-mini-range{accent-color:#334155;}

/* ===================== FUNDO ANIMADO (CANVAS) ===================== */
#orionBgEffect{position:fixed;inset:0;z-index:0;pointer-events:none;display:none;}

/* ===================== ESFERAS DE FUNDO ===================== */
.orion-bg-orbs{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;}
.bg-orb{position:absolute;border-radius:50%;will-change:transform;}
@keyframes bgOrbFloatA{0%,100%{transform:translate(0,0);}25%{transform:translate(60px,-90px);}50%{transform:translate(140px,10px);}75%{transform:translate(40px,90px);}}
@keyframes bgOrbFloatB{0%,100%{transform:translate(0,0);}25%{transform:translate(-110px,60px);}50%{transform:translate(-40px,150px);}75%{transform:translate(-130px,20px);}}
@keyframes bgOrbFloatC{0%,100%{transform:translate(0,0);}25%{transform:translate(90px,100px);}50%{transform:translate(-70px,140px);}75%{transform:translate(-100px,-30px);}}
@keyframes bgOrbFloatD{0%,100%{transform:translate(0,0);}25%{transform:translate(-80px,-110px);}50%{transform:translate(90px,-140px);}75%{transform:translate(120px,-20px);}}
[data-theme="claro"] .theme-option,
[data-theme="polar"] .theme-option,
[data-theme="solar"] .theme-option{
  color:#111827;
}
[data-theme="claro"] .theme-option:hover,
[data-theme="polar"] .theme-option:hover,
[data-theme="solar"] .theme-option:hover{
  background:rgba(15,23,42,.06);
}
[data-theme="claro"] .theme-option.active,
[data-theme="polar"] .theme-option.active,
[data-theme="solar"] .theme-option.active{
  background:rgba(15,23,42,.08);
}

/* ===================== FILTER MANAGER ===================== */
.filter-manager{position:relative;}
.filter-add-popover{position:absolute;top:44px;left:0;z-index:60;display:flex;flex-direction:column;gap:4px;padding:8px;min-width:170px;}
.filter-opt{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:var(--r-sm);cursor:pointer;font-size:var(--fs-sm);color:var(--text-main);}
.filter-opt:hover{background:rgba(255,255,255,.06);}
.filter-opt.disabled{opacity:.35;cursor:not-allowed;}
.filter-remove{margin-left:4px;cursor:pointer;color:var(--text-muted);}
.filter-remove:hover{color:var(--rose);}
.filter-chip{display:flex;align-items:center;gap:0;}

*{margin:0;padding:0;box-sizing:border-box;-webkit-font-smoothing:antialiased;}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}

/* Campos-isca: absorvem o autofill de login do navegador (Safari ignora
   autocomplete="off" em formularios com email+senha) para que ele nao
   preencha os campos reais do formulario. Fora da tela, mas nao display:none
   (alguns navegadores ignoram autofill em campos com display:none). */
.pandora-autofill-decoy{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
}
body{background:var(--bg);color:var(--text-main);font-family:'Plus Jakarta Sans',sans-serif;}

body::before{
  content:'';position:fixed;inset:0;
  background:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px) 0 0/40px 40px;
  pointer-events:none; z-index:0;
}
[data-theme="claro"]::before,
[data-theme="polar"]::before,
[data-theme="solar"]::before{
  background:
    linear-gradient(rgba(15,23,42,.032) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(15,23,42,.032) 1px, transparent 1px) 0 0/40px 40px;
}
[data-theme="sung"]::before{
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0/40px 40px;
}
[data-theme="sung"] .orion-brand-mark,
[data-theme="sung"] .orion-btn-primary,
[data-theme="sung"] .view-tab.active,
[data-theme="sung"] .page-btn.active{
  background:linear-gradient(135deg,#fb2f68 0%, #8b5cf6 48%, #38bdf8 100%);
  box-shadow:0 10px 28px rgba(139,92,246,.34);
}
[data-theme="sung"] .sidebar-avatar{
  background:linear-gradient(135deg,#38bdf8 0%, #8b5cf6 48%, #fb2f68 100%);
}
[data-theme="ember"]::before,
[data-theme="arounda"]::before,
[data-theme="crimson"]::before,
[data-theme="nova"]::before,
[data-theme="marple"]::before,
[data-theme="aureum"]::before,
[data-theme="infected"]::before,
[data-theme="sigma"]::before,
[data-theme="eclipse"]::before,
[data-theme="sunset"]::before,
[data-theme="noir"]::before,
[data-theme="aurora"]::before,
[data-theme="gold"]::before,
[data-theme="midnight"]::before{
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0/40px 40px;
}
[data-theme="ember"] .orion-brand-mark,
[data-theme="ember"] .orion-btn-primary,
[data-theme="ember"] .view-tab.active,
[data-theme="ember"] .page-btn.active,
[data-theme="arounda"] .orion-brand-mark,
[data-theme="arounda"] .orion-btn-primary,
[data-theme="arounda"] .view-tab.active,
[data-theme="arounda"] .page-btn.active,
[data-theme="crimson"] .orion-brand-mark,
[data-theme="crimson"] .orion-btn-primary,
[data-theme="crimson"] .view-tab.active,
[data-theme="crimson"] .page-btn.active,
[data-theme="nova"] .orion-brand-mark,
[data-theme="nova"] .orion-btn-primary,
[data-theme="nova"] .view-tab.active,
[data-theme="nova"] .page-btn.active,
[data-theme="marple"] .orion-brand-mark,
[data-theme="marple"] .orion-btn-primary,
[data-theme="marple"] .view-tab.active,
[data-theme="marple"] .page-btn.active,
[data-theme="aureum"] .orion-brand-mark,
[data-theme="aureum"] .orion-btn-primary,
[data-theme="aureum"] .view-tab.active,
[data-theme="aureum"] .page-btn.active,
[data-theme="infected"] .orion-brand-mark,
[data-theme="infected"] .orion-btn-primary,
[data-theme="infected"] .view-tab.active,
[data-theme="infected"] .page-btn.active,
[data-theme="sigma"] .orion-brand-mark,
[data-theme="sigma"] .orion-btn-primary,
[data-theme="sigma"] .view-tab.active,
[data-theme="sigma"] .page-btn.active,
[data-theme="eclipse"] .orion-brand-mark,
[data-theme="eclipse"] .orion-btn-primary,
[data-theme="eclipse"] .view-tab.active,
[data-theme="eclipse"] .page-btn.active,
[data-theme="sunset"] .orion-brand-mark,
[data-theme="sunset"] .orion-btn-primary,
[data-theme="sunset"] .view-tab.active,
[data-theme="sunset"] .page-btn.active,
[data-theme="noir"] .orion-brand-mark,
[data-theme="noir"] .orion-btn-primary,
[data-theme="noir"] .view-tab.active,
[data-theme="noir"] .page-btn.active,
[data-theme="aurora"] .orion-brand-mark,
[data-theme="aurora"] .orion-btn-primary,
[data-theme="aurora"] .view-tab.active,
[data-theme="aurora"] .page-btn.active,
[data-theme="gold"] .orion-brand-mark,
[data-theme="gold"] .orion-btn-primary,
[data-theme="gold"] .view-tab.active,
[data-theme="gold"] .page-btn.active,
[data-theme="midnight"] .orion-brand-mark,
[data-theme="midnight"] .orion-btn-primary,
[data-theme="midnight"] .view-tab.active,
[data-theme="midnight"] .page-btn.active{
  background:linear-gradient(135deg,var(--rose) 0%, var(--primary) 50%, var(--cyan) 100%);
  box-shadow:0 10px 28px var(--primary-glow);
}
[data-theme="ember"] .sidebar-avatar,
[data-theme="arounda"] .sidebar-avatar,
[data-theme="crimson"] .sidebar-avatar,
[data-theme="nova"] .sidebar-avatar,
[data-theme="marple"] .sidebar-avatar,
[data-theme="aureum"] .sidebar-avatar,
[data-theme="infected"] .sidebar-avatar,
[data-theme="sigma"] .sidebar-avatar,
[data-theme="eclipse"] .sidebar-avatar,
[data-theme="sunset"] .sidebar-avatar,
[data-theme="noir"] .sidebar-avatar,
[data-theme="aurora"] .sidebar-avatar,
[data-theme="gold"] .sidebar-avatar,
[data-theme="midnight"] .sidebar-avatar{
  background:linear-gradient(135deg,var(--cyan) 0%, var(--primary) 48%, var(--rose) 100%);
}

/* shell modo A (dashboard fixo) */
html,body{height:100%;overflow-x:hidden;}
body{
  display:flex;
  gap:0;
  align-items:stretch;
  min-height:100vh;
  min-height:100dvh;
  overflow-y:auto;
  padding-top:0;
  font-size:var(--fs-base);
}
.orion-topbar{
  position:fixed;
  top:0;
  left:224px;
  right:0;
  z-index:90;
  height:56px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:var(--sp-4);
  align-items:center;
  padding:6px var(--sp-4);
  background:linear-gradient(180deg, rgba(7,7,12,.94), rgba(7,7,12,.82));
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 12px 28px rgba(0,0,0,.2);
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  transition:left .22s ease;
}
.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap:var(--sp-3);
  min-width:0;
}
.topbar-left{
  justify-self:start;
}
.topbar-brand{min-width:0;}
.topbar-company{
  min-width:0;
  max-width:360px;
  color:var(--text-muted);
  font-size:var(--fs-sm);
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar-greeting{display:none;}
.topbar-right{
  justify-self:end;
  justify-content:flex-end;
  margin-left:auto;
}
.topbar-center{
  min-width:0;
  display:none;
}
.topbar-user{
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 9px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  color:var(--text-main);
  cursor:pointer;
  font-family:'Plus Jakarta Sans',sans-serif;
  text-align:left;
  transition:.2s;
}
.topbar-user:hover{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.06);}
.topbar-user .sidebar-avatar{
  width:28px;
  height:28px;
}
.topbar-user span{display:block;font-size:var(--fs-sm);}
.topbar-user small{display:block;color:var(--text-muted);font-size:9px;margin-top:1px;}
.profile-chevron{font-size:9px;color:var(--text-muted);margin-left:2px;}
.profile-modal-box{max-width:680px;}
.orion-sidebar{
  position:sticky;
  top:0;
  z-index:95;
  width:224px;
  height:100vh;
  max-height:100vh;
  min-height:0;
  padding:var(--sp-4);
  flex:0 0 224px;
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  border-right:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(8,8,14,.96), rgba(8,8,14,.82));
  backdrop-filter:blur(22px) saturate(150%);
  -webkit-backdrop-filter:blur(22px) saturate(150%);
  transition:width .22s ease, flex-basis .22s ease, padding .22s ease;
}
.orion-sidebar{
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.orion-sidebar::-webkit-scrollbar{
  width:0;
  height:0;
}
.sidebar-toggle{
  width:32px;height:32px;
  margin-left:auto;
  display:grid;place-items:center;
  border-radius:10px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  color:var(--text-main);
  cursor:pointer;
  transition:.2s;
}
.sidebar-toggle:hover{border-color:var(--primary);color:var(--primary);}
.orion-sidebar-brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:var(--sp-5);
}
.orion-brand-mark{
  width:38px;height:38px;
  border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--primary),#c2410c);
  color:#fff;
  box-shadow:0 12px 30px var(--primary-glow);
  font-size:20px;
}
.orion-brand-text h2{
  font-family:'Space Grotesk',sans-serif;
  font-size:var(--fs-base);
  letter-spacing:1px;
}
.orion-brand-text p{
  margin-top:2px;
  font-size:11px;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:1.2px;
}
.sidebar-section{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-bottom:var(--sp-4);
}
.sidebar-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:1.2px;
  color:var(--text-muted);
  margin-bottom:2px;
}
.sidebar-section-toggle{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--text-muted);
  cursor:pointer;
  font-size:10px;
  transition:.16s;
}
.sidebar-section-toggle:hover{
  color:var(--primary);
  background:rgba(255,255,255,.05);
}
.sidebar-section.is-collapsed > :not(.sidebar-label){
  display:none !important;
}
.sidebar-section.is-collapsed .sidebar-section-toggle i{
  transform:rotate(-90deg);
}
.sidebar-section-toggle i{
  transition:transform .16s ease;
}
.sidebar-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:11px;
  color:var(--text-main);
  text-decoration:none;
  border:1px solid transparent;
  transition:.2s;
}
.sidebar-link i{width:20px;text-align:center;color:var(--text-muted);flex:0 0 20px;}
.sidebar-link span{display:block;min-width:0;}
.sidebar-link:hover{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
}
.sidebar-link.active{
  background:linear-gradient(135deg, rgba(168,85,247,.16), rgba(6,182,212,.08));
  border-color:rgba(168,85,247,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.sidebar-link.active i{color:var(--primary);}
.sidebar-link strong{display:block;font-size:var(--fs-sm);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sidebar-link small{
  display:none;
  color:var(--text-muted);
  font-size:11px;
  line-height:1.25;
}
.sidebar-quick{
  display:grid;
  gap:10px;
}
.sidebar-quick .orion-btn{
  width:100%;
  justify-content:center;
}
.sidebar-footer{
  margin-top:auto;
  padding-top:var(--sp-5);
}
.sidebar-status{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  color:var(--text-muted);
  font-size:var(--fs-sm);
  margin-bottom:var(--sp-3);
}
.sidebar-status strong{color:var(--text-main);}
.sidebar-user{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}
.sidebar-avatar{
  width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--primary),#0ea5e9);
  color:#fff;font-weight:700;
}
.sidebar-user span{display:block;font-size:var(--fs-sm);}
.sidebar-user small{display:block;color:var(--text-muted);font-size:10px;margin-top:2px;}

.orion-main{
  position:relative;
  z-index:1;
  flex:1;
  min-width:0;
  max-width:calc(100% - 224px);
  padding-top:56px;
  height:100dvh;
  overflow-x:hidden;
  overflow-y:auto;
  transition:max-width .22s ease;
}
.orion-app{position:relative;z-index:1;max-width:1200px;margin:0 auto;min-height:0;padding:0 var(--sp-5) var(--sp-5);}
.page-shell{width:100%;}

body.sidebar-collapsed .orion-sidebar{
  width:70px;
  flex-basis:70px;
  padding:var(--sp-4) 10px;
}
body.sidebar-collapsed .orion-topbar{
  left:70px;
}
body.sidebar-collapsed .orion-main{
  max-width:calc(100% - 70px);
}
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-status span,
body.sidebar-collapsed .sidebar-user div,
body.sidebar-collapsed .sidebar-quick{
  display:none;
}
body.sidebar-collapsed .orion-sidebar-brand{
  justify-content:center;
}
body.sidebar-collapsed .orion-brand-text{
  display:none;
}
body.sidebar-collapsed .sidebar-section{
  align-items:center;
}
body.sidebar-collapsed .sidebar-link{
  width:44px;
  justify-content:center;
  padding:9px;
}
body.sidebar-collapsed .sidebar-link i{
  margin:0;
}
body.sidebar-collapsed .sidebar-footer{
  display:grid;
  gap:10px;
}
body.sidebar-collapsed .sidebar-status{
  justify-content:center;
}
body.sidebar-collapsed .sidebar-user{
  justify-content:center;
  padding:10px;
}
body.sidebar-collapsed .sidebar-avatar{
  width:34px;height:34px;
}

.sidebar-backdrop{
  display:none;
}

/* Usuario comum nao tem destino nenhum na sidebar (Financeiro/Habitos
   viraram cards no dashboard, e a secao de Administracao e so pra admin),
   entao ela some inteira e a topbar/conteudo ocupam a largura toda. */
body.no-sidebar .orion-sidebar{display:none;}
body.no-sidebar .orion-topbar{left:0;}
body.no-sidebar .orion-main{max-width:100%;}
body.no-sidebar .sidebar-toggle{display:none;}
body.no-sidebar .sidebar-backdrop{display:none;}

/* ===================== SCROLLBARS ===================== */
*{
  scrollbar-width:thin;
  scrollbar-color:rgba(168,85,247,.55) rgba(255,255,255,.06);
}
*::-webkit-scrollbar{width:10px;height:10px;}
*::-webkit-scrollbar-track{
  background:rgba(255,255,255,.04);
  border-radius:999px;
}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(168,85,247,.9),rgba(6,182,212,.85));
  border-radius:999px;
  border:2px solid rgba(255,255,255,.06);
}
*::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,rgba(168,85,247,1),rgba(6,182,212,1));
}
*::-webkit-scrollbar-corner{background:rgba(255,255,255,.04);}

/* ===================== COMPONENTES BASE ===================== */
.orion-card{
  background:var(--panel-bg);
  border:1px solid var(--panel-border);
  backdrop-filter:blur(25px) saturate(160%);
  -webkit-backdrop-filter:blur(25px) saturate(160%);
  border-radius:var(--r-lg);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.05), 0 8px 32px rgba(0,0,0,.5);
  transition:all .3s cubic-bezier(.25,.8,.25,1);
}
.orion-btn{height:40px;padding:0 18px;border-radius:var(--r-sm);font-weight:600;font-size:var(--fs-base);cursor:pointer;border:none;transition:.25s;font-family:'Plus Jakarta Sans',sans-serif;display:inline-flex;align-items:center;gap:8px;}
.orion-btn-mini{height:32px;padding:0 10px;font-size:var(--fs-xs);gap:6px;}
.orion-btn:active{transform:scale(.97);}
.orion-btn-primary{background:linear-gradient(135deg,var(--primary),#c2410c);color:#fff;box-shadow:0 4px 16px var(--primary-glow);}
.orion-btn-ghost{background:rgba(255,255,255,.05);color:var(--text-main);}
.orion-btn-ghost.active{border:1px solid var(--primary);color:var(--primary);background:rgba(249,115,22,.08);}

.orion-icon-btn{position:relative;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:var(--r-sm);background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.05);color:var(--text-muted);font-size:12px;cursor:pointer;flex-shrink:0;transition:.2s;}
.orion-icon-btn:active{transform:scale(.92);}
.orion-icon-btn.logout-btn:hover{border-color:rgba(244,63,94,.45);color:var(--rose);}

.orion-icon-badge{
  position:absolute;
  top:-2px;
  right:-2px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--rose);
  border:2px solid var(--bg);
  box-shadow:0 0 0 1px rgba(244,63,94,.4);
}
.orion-icon-badge.hidden{display:none;}

.orion-input{background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.1);border-radius:var(--r-sm);padding:9px 12px;color:#fff;font-size:var(--fs-base);outline:none;transition:.2s;}
.orion-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow);}
.orion-input:-webkit-autofill,
.orion-input:-webkit-autofill:hover,
.orion-input:-webkit-autofill:focus,
.orion-input:-webkit-autofill:active{
  -webkit-box-shadow:0 0 0 1000px rgba(255,255,255,.02) inset !important;
  -webkit-text-fill-color:#fff !important;
  caret-color:#fff;
  transition:background-color 9999s ease-in-out 0s;
}
.orion-input::placeholder{color:var(--text-muted);opacity:.5;}
select.orion-input option, .filter-select option{background:#12121f;color:#f4f4f7;}

/* Fonte menor que 16px em input/select/textarea faz o Safari/Chrome mobile
   dar zoom automatico ao focar o campo. Forcamos 16px so no toque para evitar
   isso sem mudar o visual compacto no desktop. Repete os seletores especificos
   (.orion-input etc.) porque uma classe tem mais especificidade que a tag sozinha. */
@media (max-width:640px){
  input, select, textarea,
  .orion-input, .filter-select, .filter-date-input{
    font-size:16px !important;
  }
}

/* ---------- SELECT CUSTOMIZÁVEL (Chrome 135+; demais navegadores caem no popup nativo) ---------- */
@supports (appearance: base-select) {
  select.orion-input,
  select.filter-select,
  select.theme-mini-select{
    appearance:base-select;
    text-align:left;
    justify-content:flex-start;
  }
  select.orion-input::picker(select),
  select.filter-select::picker(select),
  select.theme-mini-select::picker(select){
    appearance:base-select;
    text-align:left;
    background:rgba(12,12,20,.98);
    border:1px solid rgba(255,255,255,.12);
    border-radius:var(--r-sm);
    box-shadow:0 18px 48px rgba(0,0,0,.55);
    padding:6px;
    margin-top:6px;
    max-height:320px;
    overflow:auto;
    /* Visível por padrão — a animação de entrada fica só no @starting-style,
       assim o popup nunca fica preso em opacity:0 em versões sem :open. */
    opacity:1;
    transition:opacity .12s ease, transform .12s ease;
  }
  @starting-style{
    select.orion-input::picker(select),
    select.filter-select::picker(select),
    select.theme-mini-select::picker(select){
      opacity:0;
      transform:translateY(-4px);
    }
  }
  select.orion-input::picker-icon,
  select.filter-select::picker-icon,
  select.theme-mini-select::picker-icon{
    color:var(--text-muted);
    font-size:11px;
    margin-left:auto;
  }
  select.orion-input option,
  select.filter-select option,
  select.theme-mini-select option{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    text-align:left;
    gap:8px;
    padding:7px 10px;
    border-radius:calc(var(--r-sm) - 6px);
    background:transparent;
    color:var(--text-main);
    font-size:var(--fs-sm);
    cursor:pointer;
    transition:background .12s;
  }
  select.orion-input option:hover,
  select.orion-input option:focus,
  select.filter-select option:hover,
  select.filter-select option:focus,
  select.theme-mini-select option:hover,
  select.theme-mini-select option:focus{
    background:color-mix(in srgb, var(--primary) 15%, transparent);
  }
  select.orion-input option:checked,
  select.filter-select option:checked,
  select.theme-mini-select option:checked{
    color:var(--primary);
    font-weight:600;
  }
  select.orion-input option::checkmark,
  select.filter-select option::checkmark,
  select.theme-mini-select option::checkmark{
    /* Sem margin-left:auto — o ::checkmark existe (reservado) em TODAS as opções
       como primeiro item flex; empurrá-lo para a direita arrasta o texto junto. */
    color:var(--primary);
  }
  [data-theme="claro"] select.orion-input::picker(select),
  [data-theme="claro"] select.filter-select::picker(select),
  [data-theme="claro"] select.theme-mini-select::picker(select),
  [data-theme="polar"] select.orion-input::picker(select),
  [data-theme="polar"] select.filter-select::picker(select),
  [data-theme="polar"] select.theme-mini-select::picker(select),
  [data-theme="solar"] select.orion-input::picker(select),
  [data-theme="solar"] select.filter-select::picker(select),
  [data-theme="solar"] select.theme-mini-select::picker(select){
    background:#fff;
    border-color:rgba(15,23,42,.14);
    box-shadow:0 18px 48px rgba(15,23,42,.18);
  }
  [data-theme="claro"] select.orion-input option,
  [data-theme="claro"] select.filter-select option,
  [data-theme="claro"] select.theme-mini-select option,
  [data-theme="polar"] select.orion-input option,
  [data-theme="polar"] select.filter-select option,
  [data-theme="polar"] select.theme-mini-select option,
  [data-theme="solar"] select.orion-input option,
  [data-theme="solar"] select.filter-select option,
  [data-theme="solar"] select.theme-mini-select option{
    color:#101018;
  }
}

[data-theme="claro"] .orion-card,
[data-theme="polar"] .orion-card,
[data-theme="solar"] .orion-card{
  background:linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.34));
  border-color:rgba(255,255,255,.66);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78), inset 0 -1px 0 rgba(15,23,42,.04), 0 22px 58px rgba(15,23,42,.13);
  backdrop-filter:blur(28px) saturate(190%);
  -webkit-backdrop-filter:blur(28px) saturate(190%);
}
[data-theme="claro"] .orion-input,
[data-theme="polar"] .orion-input,
[data-theme="solar"] .orion-input{
  background:rgba(255,255,255,.38);
  border-color:rgba(255,255,255,.62);
  color:var(--text-main);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 8px 20px rgba(15,23,42,.05);
  backdrop-filter:blur(18px) saturate(170%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);
}
[data-theme="claro"] .orion-btn-ghost,
[data-theme="polar"] .orion-btn-ghost,
[data-theme="solar"] .orion-btn-ghost,
[data-theme="claro"] .orion-icon-btn,
[data-theme="polar"] .orion-icon-btn,
[data-theme="solar"] .orion-icon-btn{
  background:rgba(255,255,255,.36);
  border-color:rgba(255,255,255,.58);
  color:var(--text-muted);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 10px 24px rgba(15,23,42,.07);
  backdrop-filter:blur(18px) saturate(170%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);
}
[data-theme="claro"] .orion-btn-ghost:hover,
[data-theme="polar"] .orion-btn-ghost:hover,
[data-theme="solar"] .orion-btn-ghost:hover,
[data-theme="claro"] .orion-icon-btn:hover,
[data-theme="polar"] .orion-icon-btn:hover,
[data-theme="solar"] .orion-icon-btn:hover{
  background:rgba(255,255,255,.58);
  border-color:rgba(255,255,255,.76);
  color:var(--text-main);
}
[data-theme="claro"] .orion-header-title h1,
[data-theme="polar"] .orion-header-title h1,
[data-theme="solar"] .orion-header-title h1{
  background:linear-gradient(90deg, #0f172a, #64748b);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}
[data-theme="claro"] .orion-table-wrap,
[data-theme="polar"] .orion-table-wrap,
[data-theme="solar"] .orion-table-wrap{
  background:linear-gradient(135deg, rgba(255,255,255,.54), rgba(255,255,255,.24));
  border-color:rgba(255,255,255,.68);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 24px 64px rgba(15,23,42,.14);
  backdrop-filter:blur(30px) saturate(190%);
  -webkit-backdrop-filter:blur(30px) saturate(190%);
}
[data-theme="claro"] .orion-table tbody td,
[data-theme="polar"] .orion-table tbody td,
[data-theme="solar"] .orion-table tbody td{
  border-bottom-color:rgba(15,23,42,.07);
}
[data-theme="claro"] .orion-table tbody tr:hover,
[data-theme="polar"] .orion-table tbody tr:hover,
[data-theme="solar"] .orion-table tbody tr:hover{background:rgba(15,23,42,.035);}
[data-theme="claro"] .modal-box,
[data-theme="polar"] .modal-box,
[data-theme="solar"] .modal-box{
  background:linear-gradient(135deg, rgba(255,255,255,.64), rgba(255,255,255,.38));
  border-color:rgba(255,255,255,.7);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78), 0 30px 80px rgba(15,23,42,.18);
}
[data-theme="claro"] .diag-edit-table th,
[data-theme="polar"] .diag-edit-table th,
[data-theme="solar"] .diag-edit-table th{
  background:linear-gradient(180deg, rgba(255,255,255,.72), rgba(226,232,240,.46));
  color:#0f172a;
}
[data-theme="claro"] .diag-edit-table th,
[data-theme="claro"] .diag-edit-table td,
[data-theme="polar"] .diag-edit-table th,
[data-theme="polar"] .diag-edit-table td,
[data-theme="solar"] .diag-edit-table th,
[data-theme="solar"] .diag-edit-table td{border-color:rgba(15,23,42,.12);}
[data-theme="claro"] .diag-edit-table tfoot td,
[data-theme="polar"] .diag-edit-table tfoot td,
[data-theme="solar"] .diag-edit-table tfoot td{
  background:rgba(255,255,255,.44);
  color:var(--text-main);
  backdrop-filter:blur(18px) saturate(170%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);
}
[data-theme="claro"] .diag-cell-input,
[data-theme="polar"] .diag-cell-input,
[data-theme="solar"] .diag-cell-input{
  background:rgba(255,255,255,.36);
  border-color:rgba(255,255,255,.58);
  color:var(--text-main);
}

.orion-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:var(--r-pill);font-size:var(--fs-xs);font-weight:600;letter-spacing:.5px;text-transform:uppercase;}

/* ===================== TOASTS ===================== */
.orion-toast-stack{
  position:fixed;
  right:22px;
  top:86px;
  z-index:9999;
  display:grid;
  gap:12px;
  width:min(380px,calc(100vw - 32px));
  pointer-events:none;
}
.orion-toast{
  pointer-events:auto;
  display:grid;
  grid-template-columns:34px 1fr 28px;
  gap:12px;
  align-items:start;
  padding:14px;
  border-radius:var(--r-sm);
  background:rgba(14,14,24,.68);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 18px 45px rgba(0,0,0,.45);
  backdrop-filter:blur(22px) saturate(150%);
  -webkit-backdrop-filter:blur(22px) saturate(150%);
  transform:translateX(18px);
  opacity:0;
  transition:opacity .2s ease,transform .2s ease;
}
.orion-toast.show{opacity:1;transform:translateX(0);}
.orion-toast.hide{opacity:0;transform:translateX(18px);}
.orion-toast-icon{
  width:34px;
  height:34px;
  border-radius:var(--r-sm);
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.06);
}
.orion-toast-title{
  font-weight:700;
  font-size:var(--fs-sm);
  line-height:1.25;
}
.orion-toast-message{
  color:var(--text-muted);
  font-size:var(--fs-sm);
  line-height:1.35;
  margin-top:3px;
}
.orion-toast-close{
  width:28px;
  height:28px;
  border:0;
  border-radius:var(--r-sm);
  background:transparent;
  color:var(--text-muted);
  cursor:pointer;
}
.orion-toast-close:hover{background:rgba(255,255,255,.06);color:var(--text-main);}
.orion-toast.success{border-color:rgba(16,185,129,.28);}
.orion-toast.success .orion-toast-icon{color:var(--emerald);background:rgba(16,185,129,.12);}
.orion-toast.error{border-color:rgba(244,63,94,.28);}
.orion-toast.error .orion-toast-icon{color:var(--rose);background:rgba(244,63,94,.12);}
.orion-toast.info{border-color:rgba(6,182,212,.28);}
.orion-toast.info .orion-toast-icon{color:var(--cyan);background:rgba(6,182,212,.12);}

/* ===================== CONFIRMAÇÃO VISUAL ===================== */
.orion-confirm-overlay{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(0,0,0,.34);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.orion-confirm-overlay.hidden{display:none;}
.orion-confirm-box{
  width:min(440px,100%);
  display:grid;
  grid-template-columns:46px 1fr;
  gap:14px;
  padding:18px;
  border-radius:var(--r-lg);
  background:rgba(14,14,24,.70);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 24px 70px rgba(0,0,0,.58);
}
.orion-confirm-icon{
  width:46px;
  height:46px;
  border-radius:var(--r-sm);
  display:grid;
  place-items:center;
  color:var(--primary);
  background:rgba(249,115,22,.13);
  font-size:20px;
}
.orion-confirm-content h3{
  font-size:var(--fs-base);
  line-height:1.25;
  margin-bottom:5px;
}
.orion-confirm-content p{
  color:var(--text-muted);
  font-size:var(--fs-sm);
  line-height:1.45;
}
.orion-confirm-actions{
  grid-column:1/-1;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding-top:8px;
}

/* ===================== HEADER ===================== */
.orion-header{padding:var(--sp-5) 0 var(--sp-3);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--sp-3);}
.orion-header-title h1{font-family:'Space Grotesk',sans-serif;font-size:var(--fs-lg);font-weight:700;letter-spacing:1px;background:linear-gradient(90deg,#fff,var(--text-muted));-webkit-background-clip:text;-webkit-text-fill-color:transparent;}
.orion-header-title p{font-size:11px;color:var(--cyan);text-transform:uppercase;letter-spacing:1.5px;margin-top:2px;font-weight:500;}

/* ===================== TOOLBAR / VIEW SWITCHER ===================== */
.orion-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--sp-3);margin-bottom:var(--sp-3);}
.view-tabs{display:flex;gap:var(--sp-2);background:rgba(255,255,255,.03);padding:4px;border-radius:var(--r-sm);border:1px solid rgba(255,255,255,.05);}
.view-tab{padding:8px 16px;border-radius:calc(var(--r-sm) - 4px);font-size:var(--fs-sm);font-weight:600;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;gap:8px;transition:.2s;}
.view-tab.active{background:linear-gradient(135deg,var(--primary),#c2410c);color:#fff;box-shadow:0 4px 14px var(--primary-glow);}
.view-tab:not(.active):hover{color:var(--text-main);}
.add-view-btn{padding:8px 12px;border-radius:calc(var(--r-sm) - 4px);color:var(--text-muted);cursor:pointer;font-size:var(--fs-sm);display:flex;align-items:center;gap:6px;border:1px dashed rgba(255,255,255,.15);}
.add-view-btn:hover{color:var(--primary);border-color:var(--primary);}
.kanban-group-select{display:flex;align-items:center;gap:8px;font-size:var(--fs-sm);color:var(--text-muted);}
.kanban-group-select select.orion-input{padding:6px 10px;height:32px;}

.toolbar-actions{display:flex;gap:var(--sp-3);align-items:center;}
.mobile-filter-toggle{display:none;}
.mobile-only-btn{display:none;}
.mobile-action-stack{display:none;}

/* ===================== GRID VIEW (tabela) ===================== */
.orion-table-wrap{
  position:relative;
  overflow-x:hidden;
  border-radius:var(--r-lg) var(--r-lg) 0 0;
  border-bottom:none;
}
.orion-table-wrap.table-scroll-x{overflow-x:auto;}
.orion-table-scroll-y{
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
  max-height:calc(100dvh - 344px);
}
.orion-table-head{position:relative;z-index:5;}
.orion-table{width:100%;border-collapse:separate;border-spacing:0;min-width:900px;}
.orion-table thead,
.orion-table thead tr{
  background:rgba(6,6,12,.96);
}
.orion-table thead th{
  position:relative;
  text-align:left;font-size:var(--fs-xs);text-transform:uppercase;letter-spacing:1px;
  color:var(--text-muted);font-weight:600;padding:var(--sp-3) var(--sp-4);
  border-bottom:1px solid rgba(255,255,255,.08);background:rgba(6,6,12,.96);
  background-clip:padding-box;
}
.orion-table thead th:first-child{border-top-left-radius:var(--r-lg);}
.orion-table thead th:last-child{border-top-right-radius:var(--r-lg);}
.orion-table thead th i{color:var(--primary);opacity:.8;flex:0 0 auto;}
.orion-table thead th{cursor:pointer;user-select:none;white-space:normal;}
.orion-table thead th .th-inner{display:flex;align-items:center;gap:6px;min-width:0;line-height:1.15;}
.orion-table thead th.align-center .th-inner{justify-content:center;}
.orion-table thead th.align-right .th-inner{justify-content:flex-end;}
.orion-table thead th .th-label{white-space:normal;overflow-wrap:normal;word-break:keep-all;}
.orion-table thead th:hover{color:var(--text-main);}
.orion-table .align-left{text-align:left;}
.orion-table .align-center{text-align:center;}
.orion-table .align-right{text-align:right;}
.orion-table td.align-center .cell-value,
.orion-table td.align-center .cell-link{margin-left:auto;margin-right:auto;}
.orion-table td.align-right .cell-value,
.orion-table td.align-right .cell-link{margin-left:auto;}
.orion-table td.align-center .badge{justify-content:center;}
.orion-table.resizable{table-layout:fixed;}
.col-resizer{position:absolute;top:0;right:-4px;width:8px;height:100%;cursor:col-resize;z-index:7;touch-action:none;}
.col-resizer::after{content:'';position:absolute;top:20%;bottom:20%;left:3px;width:1px;background:rgba(255,255,255,.12);}
.col-resizer:hover::after{background:var(--primary);box-shadow:0 0 8px var(--primary-glow);}
body.is-resizing-column{cursor:col-resize;user-select:none;}
.sort-rank{display:inline-flex;align-items:center;justify-content:center;min-width:14px;height:14px;border-radius:999px;background:rgba(255,255,255,.08);color:var(--primary);font-size:9px;font-weight:700;vertical-align:middle;}
.sort-icon{width:10px;font-size:9px;opacity:0 !important;}
.orion-table thead th.sort-asc .sort-icon{opacity:.9 !important;}
.orion-table thead th.sort-asc .sort-icon::before{content:'\f0de';}
.orion-table thead th.sort-desc .sort-icon{opacity:.9 !important;}
.orion-table thead th.sort-desc .sort-icon::before{content:'\f0dd';}
.orion-table tbody tr{transition:.2s;}
.orion-table tbody tr:hover{background:rgba(255,255,255,.02);}
.orion-table tbody td{padding:9px var(--sp-4);font-size:12px;border-bottom:1px solid rgba(255,255,255,.04);vertical-align:middle;max-width:0;overflow:hidden;}
.orion-table tbody td.cell-editing{padding:3px 6px;overflow:visible;}
.orion-table tbody td.cell-editing .orion-input{
  width:100%;
  height:30px;
  padding:4px 8px;
  font-size:12px;
  border-color:var(--primary);
  box-shadow:0 0 0 2px var(--primary-glow);
}
.orion-table tbody tr:last-child td{border-bottom:none;}

/* ---------- MENU DE COLUNA (estilo Notion) ---------- */
.th-menu-btn{
  position:absolute;
  top:50%;
  right:10px;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:5px;
  background:rgba(255,255,255,.06);
  color:var(--text-muted);
  font-size:9px;
  cursor:pointer;
  opacity:0;
  transition:.15s;
  z-index:6;
}
.orion-table thead th:hover .th-menu-btn{opacity:1;}
.th-menu-btn:hover{background:rgba(249,115,22,.18);color:var(--primary);}
.column-menu-popover{
  position:fixed;
  z-index:70;
  min-width:220px;
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:2px;
  box-shadow:0 18px 48px rgba(0,0,0,.55);
}
.column-menu-popover button{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  padding:7px 10px;
  border:none;
  border-radius:calc(var(--r-sm) - 6px);
  background:transparent;
  color:var(--text-main);
  font-size:var(--fs-sm);
  text-align:left;
  cursor:pointer;
}
.column-menu-popover button:hover:not(:disabled){background:rgba(255,255,255,.06);}
.column-menu-popover button.active{color:var(--primary);}
.column-menu-popover button:disabled{opacity:.35;cursor:default;}
.column-menu-popover button i{width:14px;color:var(--text-muted);font-size:11px;}
.column-menu-popover button:hover:not(:disabled) i,
.column-menu-popover button.active i{color:var(--primary);}
.column-menu-rename{padding:2px 2px 8px;border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:4px;}
.column-menu-rename .orion-input{padding:7px 10px;font-size:var(--fs-sm);height:auto;}
.column-menu-row{display:flex;gap:4px;}
.column-menu-row button{justify-content:center;}

/* ---------- DRAG DE COLUNAS ---------- */
.orion-table thead th.is-dragging{opacity:.4;}
.orion-table thead th.drag-before{box-shadow:inset 3px 0 0 var(--primary);}
.orion-table thead th.drag-after{box-shadow:inset -3px 0 0 var(--primary);}

/* ---------- AGRUPAMENTO NO GRID ---------- */
.grid-group-row{cursor:pointer;}
.grid-group-row td{
  background:rgba(255,255,255,.03);
  border-bottom:1px solid rgba(255,255,255,.07);
  padding:7px var(--sp-4);
}
.grid-group-row:hover td{background:rgba(255,255,255,.05);}
.grid-group-head{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.grid-group-head > i{
  color:var(--text-muted);
  font-size:10px;
  width:12px;
  flex:0 0 auto;
  transition:.15s;
}
.grid-group-row:hover .grid-group-head > i{color:var(--primary);}
.grid-group-label{
  font-weight:700;
  font-size:var(--fs-sm);
  color:var(--text-main);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.grid-group-count{
  flex:0 0 auto;
  padding:1px 8px;
  border-radius:var(--r-pill);
  background:rgba(249,115,22,.12);
  color:var(--primary);
  font-size:10px;
  font-weight:700;
}
.grid-group-agg{
  font-size:11px;
  font-weight:600;
  color:var(--text-muted);
}

/* ---------- LINHA "+ NOVO" ---------- */
.grid-add-row td{
  padding:0;
  border-bottom:1px solid rgba(255,255,255,.04);
}
.grid-add-inner{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px var(--sp-4);
  color:var(--text-muted);
  font-size:var(--fs-sm);
  cursor:pointer;
  transition:.15s;
}
.grid-add-row:hover .grid-add-inner{color:var(--primary);}
.grid-add-inner i{font-size:10px;}

/* ---------- COLUNA CONGELADA ---------- */
.orion-table-wrap.col-frozen-active .orion-table-head thead th:first-child,
.orion-table-wrap.col-frozen-active .orion-table-body tbody tr:not(.grid-add-row) td:first-child{
  position:relative;
  z-index:3;
  background:rgba(10,10,18,.97);
  box-shadow:6px 0 12px -6px rgba(0,0,0,.5);
}
.orion-table-wrap.col-frozen-active .orion-table-head thead th:first-child{z-index:7;}
.summary-cell{
  position:relative;
  min-height:20px;
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
}
.footer-summary-cell{
  min-height:20px;
  padding:0 var(--sp-4);
  border-radius:0;
  background:transparent;
  border:0;
  overflow:visible;
}
.footer-summary-cell.align-center{justify-content:center;}
.footer-summary-cell.align-right{justify-content:flex-end;}
.footer-summary-cell.is-empty{min-height:20px;}
.pagination-summary-grid{
  display:grid;
  align-items:center;
  min-height:22px;
}
.footer-summary-label{
  flex:0 0 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text-muted);
  font-size:8px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.6px;
}
.summary-mode-btn{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 16px;
  border-radius:5px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text-muted);
  font-size:8px;
  font-weight:800;
  cursor:pointer;
}
.summary-mode-btn:hover,
.summary-mode-btn.active{
  color:var(--primary);
  border-color:rgba(249,115,22,.22);
  background:rgba(249,115,22,.08);
}
.summary-mode-btn:not(.active){opacity:.55;}
.summary-mode-btn:not(.active):hover{opacity:1;}
.summary-value{
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text-main);
  font-size:8px;
  font-weight:500;
}
.summary-menu{
  position:absolute;
  left:0;
  bottom:calc(100% + 6px);
  z-index:30;
  min-width:126px;
  padding:6px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(12,12,20,.96);
  box-shadow:0 18px 44px rgba(0,0,0,.42);
}
.summary-menu button{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:8px;
  padding:8px 9px;
  background:transparent;
  color:var(--text-main);
  font-size:var(--fs-xs);
  cursor:pointer;
  text-align:left;
}
.summary-menu button:hover{
  background:rgba(255,255,255,.06);
  color:var(--primary);
}
.orion-table .actions-col{text-align:center;width:120px;}
.row-actions{display:flex;align-items:center;justify-content:center;gap:6px;}
.row-action-btn{width:26px;height:26px;font-size:10px;border-radius:9px;}
.row-actions button,
.row-actions .orion-icon-btn{
  width:26px;
  height:26px;
  min-width:26px;
  min-height:26px;
  padding:0;
  font-size:10px;
  border-radius:9px;
}
.row-actions i{
  font-size:10px;
}
.row-action-danger{color:var(--rose);}
.row-action-danger:hover{border-color:rgba(244,63,94,.45);color:var(--rose);}

.cell-value{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cell-name{font-weight:600;color:var(--text-main);}
.cell-muted{color:var(--text-muted);font-size:10px;font-family:'Fira Code',monospace;}
.cell-link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--cyan);text-decoration:none;}
.cell-link:hover{color:var(--primary);}

.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:var(--r-pill);font-size:var(--fs-xs);font-weight:600;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap;}
.badge-dot{width:6px;height:6px;border-radius:50%;}

.st-pendente{background:rgba(244,63,94,.12);color:var(--rose);}
.st-pendente .badge-dot{background:var(--rose);box-shadow:0 0 6px var(--rose-glow);}
.st-revisar{background:rgba(249,115,22,.12);color:var(--primary);}
.st-revisar .badge-dot{background:var(--primary);box-shadow:0 0 6px var(--primary-glow);}
.st-migrado{background:rgba(16,185,129,.12);color:var(--emerald);}
.st-migrado .badge-dot{background:var(--emerald);box-shadow:0 0 6px var(--emerald-glow);}

.prio-alta{color:var(--rose);}
.prio-media{color:var(--primary);}
.prio-baixa{color:var(--text-muted);}

/* ===================== CONTROLADOR GERAL ===================== */
.controller-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--sp-4);
  margin-bottom:var(--sp-5);
  flex-wrap:wrap;
}
.controller-search{
  position:relative;
  flex:1 1 320px;
  max-width:520px;
}
.controller-search i{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:var(--text-muted);
  font-size:13px;
}
.controller-search .orion-input{
  width:100%;
  padding-left:38px;
}
.controller-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:var(--sp-4);
}
.controller-card{
  border-radius:var(--r-sm);
  padding:var(--sp-4);
  min-height:172px;
  text-align:left;
  color:var(--text-main);
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:var(--sp-3);
}
.controller-card:hover{
  transform:translateY(-2px);
  border-color:rgba(249,115,22,.45);
  box-shadow:0 12px 30px rgba(0,0,0,.45);
}
.controller-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--sp-3);
}
.controller-company-id{
  font-family:'Fira Code',monospace;
  color:var(--text-muted);
  font-size:var(--fs-xs);
}
.controller-status{
  border-radius:var(--r-pill);
  padding:4px 9px;
  font-size:var(--fs-xs);
  font-weight:700;
  text-transform:uppercase;
  color:var(--rose);
  background:rgba(244,63,94,.12);
}
.controller-status.active{
  color:var(--emerald);
  background:rgba(16,185,129,.12);
}
.controller-company-name{
  display:block;
  font-size:var(--fs-base);
  line-height:1.35;
}
.controller-company-doc{
  font-family:'Fira Code',monospace;
  color:var(--text-muted);
  font-size:var(--fs-sm);
}
.controller-card-meta{
  margin-top:auto;
  display:grid;
  gap:var(--sp-2);
  color:var(--text-muted);
  font-size:var(--fs-sm);
}
.controller-card-meta span{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.controller-card-meta i{
  width:15px;
  color:var(--primary);
}
.controller-loading,
.controller-empty{
  grid-column:1/-1;
  padding:var(--sp-6);
  text-align:center;
  color:var(--text-muted);
}

/* ===================== DASHBOARD ===================== */
.dashboard-page{
  max-width:1480px;
}
.dashboard-header{
  align-items:center;
  margin-bottom:var(--sp-4);
}
.dashboard-actions{
  display:flex;
  justify-content:flex-end;
}
.dashboard-overview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--sp-3);
  margin-bottom:var(--sp-4);
}
.dashboard-stat-card{
  display:flex;
  align-items:center;
  gap:var(--sp-3);
  border-radius:var(--r-sm);
  padding:var(--sp-4);
}
.dashboard-stat-icon,
.dashboard-module-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(249,115,22,.22), rgba(6,182,212,.12));
  color:var(--primary);
  font-size:17px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.dashboard-stat-content{
  min-width:0;
  display:grid;
  gap:3px;
}
.dashboard-stat-label{
  color:var(--text-muted);
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.7px;
  font-weight:800;
}
.dashboard-stat-content strong{
  font-size:24px;
  line-height:1;
  letter-spacing:0;
}
.dashboard-stat-content small{
  color:var(--cyan);
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.8px;
}
.dashboard-modules-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(280px,1fr));
  gap:var(--sp-3);
}
.dashboard-loading-card{
  grid-column:1 / -1;
  padding:var(--sp-5);
  color:var(--text-muted);
}

.dashboard-charts-section{
  margin-bottom:var(--sp-4);
}
.dashboard-charts-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:var(--sp-3);
  margin-bottom:var(--sp-3);
  flex-wrap:wrap;
}
.dashboard-charts-head h2{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:var(--fs-lg);
}
.dashboard-charts-head h2 i{
  color:var(--primary);
}
.dashboard-charts-ano{
  min-width:110px;
}
.dashboard-charts-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:var(--sp-3);
}
.dash-chart-card{
  --dash-color-1:var(--primary);
  --dash-color-2:var(--cyan);
  --dash-color-3:var(--emerald);
  --dash-color-4:var(--rose);
  --dash-color-5:#a855f7;
  padding:var(--sp-4);
  border-radius:var(--r-sm);
}
.dash-chart-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--sp-3);
  margin-bottom:var(--sp-2);
  flex-wrap:wrap;
}
.dash-chart-head h3{
  font-size:var(--fs-sm);
  margin:0;
}
.dash-chart-head span{
  display:block;
  margin-top:2px;
  color:var(--text-muted);
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.5px;
}
.dash-chart-legend{
  display:flex;
  gap:var(--sp-3);
  flex-wrap:wrap;
}
.dash-chart-legend-item{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:var(--fs-xs);
  color:var(--text-muted);
}
.dash-chart-legend-item i{
  width:8px;
  height:8px;
  border-radius:50%;
  display:inline-block;
}
.dash-chart-svg{
  width:100%;
  height:auto;
  display:block;
}
.dash-chart-svg *{pointer-events:none;}
.dash-chart-wrap{position:relative;}
.dash-chart-tooltip{
  position:absolute;
  z-index:5;
  min-width:150px;
  padding:8px 10px;
  border-radius:var(--r-sm);
  background:rgba(10,10,18,.96);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 10px 28px rgba(0,0,0,.5);
  pointer-events:none;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.dash-chart-tooltip strong{
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--text-muted);
}
.dash-tip-row{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:var(--fs-xs);
  color:var(--text-main);
}
.dash-tip-row i{
  width:8px;
  height:8px;
  border-radius:50%;
  flex:0 0 auto;
}
.dash-tip-row b{margin-left:auto;font-weight:700;}
.dash-hover-guide{
  stroke:rgba(255,255,255,.35);
  stroke-width:1;
  stroke-dasharray:4 3;
}
.dash-chart-grid-line{
  stroke:rgba(255,255,255,.05);
  stroke-width:1;
}
.dash-chart-ytick{
  fill:var(--text-muted);
  font-size:8.5px;
}
.dash-chart-stats{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:var(--sp-2);
}
.dash-stat-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 9px;
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  font-size:var(--fs-xs);
  color:var(--text-muted);
}
.dash-stat-chip b{color:var(--text-main);font-weight:700;}
.dash-stat-chip i{width:8px;height:8px;border-radius:50%;display:inline-block;}
.dash-stat-chip.is-up{color:var(--emerald);border-color:rgba(16,185,129,.3);}
.dash-stat-chip.is-down{color:var(--rose);border-color:rgba(244,63,94,.3);}
.dash-chart-baseline{
  stroke:rgba(255,255,255,.12);
  stroke-width:1;
}
.dash-chart-axis-label{
  fill:var(--text-muted);
  font-size:9px;
  text-transform:uppercase;
}
.dash-chart-line{
  vector-effect:non-scaling-stroke;
  fill:none !important;
}
.dash-chart-area{
  fill-opacity:.16;
  stroke:none;
}
.dash-series-1{fill:var(--dash-color-1);stroke:var(--dash-color-1);}
.dash-series-2{fill:var(--dash-color-2);stroke:var(--dash-color-2);}
.dash-series-3{fill:var(--dash-color-3);stroke:var(--dash-color-3);}
.dash-series-4{fill:var(--dash-color-4);stroke:var(--dash-color-4);}
.dash-series-5{fill:var(--dash-color-5);stroke:var(--dash-color-5);}
[data-theme="claro"] .dash-chart-baseline,
[data-theme="polar"] .dash-chart-baseline,
[data-theme="solar"] .dash-chart-baseline{
  stroke:rgba(15,23,42,.15);
}
[data-theme="claro"] .dash-chart-grid-line,
[data-theme="polar"] .dash-chart-grid-line,
[data-theme="solar"] .dash-chart-grid-line{
  stroke:rgba(15,23,42,.07);
}
[data-theme="claro"] .dash-hover-guide,
[data-theme="polar"] .dash-hover-guide,
[data-theme="solar"] .dash-hover-guide{
  stroke:rgba(15,23,42,.35);
}
[data-theme="claro"] .dash-chart-tooltip,
[data-theme="polar"] .dash-chart-tooltip,
[data-theme="solar"] .dash-chart-tooltip{
  background:rgba(255,255,255,.98);
  border-color:rgba(15,23,42,.12);
  box-shadow:0 10px 28px rgba(15,23,42,.18);
}

.dashboard-module-card{
  --dash-color-1:var(--primary);
  --dash-color-2:var(--cyan);
  --dash-color-3:var(--emerald);
  --dash-color-4:var(--rose);
  --dash-color-5:#a855f7;
  display:grid;
  gap:var(--sp-3);
  padding:var(--sp-4);
  border-radius:var(--r-sm);
}
.dashboard-module-head{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:var(--sp-3);
  align-items:center;
}
.dashboard-module-head h2{
  font-size:var(--fs-base);
  line-height:1.15;
  margin:0;
}
.dashboard-module-head span{
  display:block;
  margin-top:2px;
  color:var(--text-muted);
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.7px;
  font-weight:800;
}
.dashboard-module-head strong{
  justify-self:end;
  font-size:var(--fs-md);
  white-space:nowrap;
}
.dashboard-module-charts{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--sp-3);
}
.dashboard-chart-panel{
  min-width:0;
  padding:var(--sp-3);
  border-radius:12px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.07);
}
.dashboard-chart-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--sp-2);
  margin-bottom:var(--sp-2);
  color:var(--text-muted);
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.6px;
  font-weight:800;
}
.dashboard-chart-title small{
  color:var(--primary);
  font-size:var(--fs-xs);
  text-transform:none;
  letter-spacing:0;
  font-family:'Fira Code',monospace;
}
.dashboard-donut{
  width:24px;
  height:24px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 24px;
  box-shadow:0 0 16px rgba(0,0,0,.12);
}
.dashboard-donut::before{
  content:'';
  width:13px;
  height:13px;
  border-radius:50%;
  background:rgba(7,7,12,.78);
}
[data-theme="claro"] .dashboard-donut::before,
[data-theme="polar"] .dashboard-donut::before,
[data-theme="solar"] .dashboard-donut::before{
  background:rgba(255,255,255,.76);
}
.dashboard-donut span{display:none;}
.dashboard-donut.is-empty{
  background:rgba(255,255,255,.06);
}
.dashboard-mini-row{
  display:grid;
  gap:5px;
}
.dashboard-mini-row + .dashboard-mini-row{
  margin-top:8px;
}
.dashboard-mini-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:var(--text-muted);
  font-size:var(--fs-xs);
}
.dashboard-mini-label span{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.dashboard-mini-label strong{
  color:var(--text-main);
  font-family:'Fira Code',monospace;
  font-size:var(--fs-xs);
}
.dashboard-mini-track{
  height:7px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.06);
}
.dashboard-mini-track span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--primary),var(--cyan));
  box-shadow:0 0 14px var(--primary-glow);
}
.dashboard-empty{
  color:var(--text-muted);
  font-size:var(--fs-xs);
  padding:var(--sp-2) 0;
}
[data-theme="claro"] .dashboard-chart-panel,
[data-theme="polar"] .dashboard-chart-panel,
[data-theme="solar"] .dashboard-chart-panel{
  background:rgba(255,255,255,.24);
  border-color:rgba(255,255,255,.52);
  backdrop-filter:blur(18px) saturate(170%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);
}

/* ===================== DOCUMENTAÇÃO ===================== */
@media (max-width:768px){
  .dashboard-overview,
  .dashboard-modules-grid,
  .dashboard-module-charts{
    grid-template-columns:1fr;
  }
  .dashboard-actions{
    justify-content:flex-start;
  }
}

@media (min-width:769px) and (max-width:1180px){
  .dashboard-overview,
  .dashboard-modules-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .dashboard-overview .dashboard-stat-card:last-child{
    grid-column:1 / -1;
  }
}

.docs-layout{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:var(--sp-5);
  align-items:start;
}
.docs-index{
  position:sticky;
  top:96px;
  display:grid;
  gap:6px;
  padding:var(--sp-3);
}
.docs-index a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:var(--r-sm);
  color:var(--text-muted);
  text-decoration:none;
  font-size:var(--fs-sm);
  font-weight:700;
}
.docs-index a:hover{
  color:var(--text-main);
  background:rgba(255,255,255,.05);
}
.docs-index i{
  width:16px;
  color:var(--primary);
}
.docs-content{
  display:grid;
  gap:var(--sp-4);
}
.docs-section{
  padding:var(--sp-5);
  border-radius:var(--r-sm);
  scroll-margin-top:96px;
}
.docs-section h2{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:var(--sp-3);
  font-size:var(--fs-lg);
}
.docs-section h2 i{
  color:var(--primary);
  font-size:16px;
}
.docs-section p{
  color:var(--text-muted);
  line-height:1.65;
  margin-bottom:var(--sp-3);
}
.docs-section ul{
  display:grid;
  gap:8px;
  padding-left:18px;
  color:var(--text-muted);
  line-height:1.55;
}
.docs-section strong{
  color:var(--text-main);
}

/* ===================== PERMISSÕES ===================== */
.permissions-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--sp-4);
  margin:var(--sp-4) 0;
}
.permission-module{
  padding:var(--sp-4);
  border-radius:var(--r-sm);
}
.permission-module h3{
  font-size:var(--fs-sm);
  margin-bottom:var(--sp-3);
  text-transform:uppercase;
  letter-spacing:1px;
}
.permission-options{
  display:grid;
  gap:8px;
}
.permission-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:var(--text-muted);
  font-size:var(--fs-sm);
  line-height:1.45;
}
.permission-option input{
  margin-top:2px;
  accent-color:var(--primary);
}

/* ===================== KANBAN VIEW ===================== */
.kanban-board{display:flex;gap:var(--sp-5);overflow-x:auto;padding-bottom:var(--sp-4);align-items:flex-start;touch-action:pan-x;}
.kanban-col{flex:0 0 300px;display:flex;flex-direction:column;gap:var(--sp-3);}
.kanban-col-head{display:flex;align-items:center;justify-content:space-between;padding:0 var(--sp-2);}
.kanban-col-head h3{font-size:var(--fs-sm);text-transform:uppercase;letter-spacing:1px;font-weight:700;display:flex;align-items:center;gap:8px;}
.kanban-count{background:rgba(255,255,255,.06);color:var(--text-muted);font-size:var(--fs-xs);padding:2px 8px;border-radius:var(--r-pill);}

.kanban-card{padding:var(--sp-4);cursor:grab;transition:transform .15s ease,box-shadow .15s ease;}
.kanban-card.armed{transform:scale(1.04);box-shadow:0 8px 24px rgba(0,0,0,.5);}
.kanban-card:active{cursor:grabbing;}
.kanban-card .k-name{font-weight:600;font-size:var(--fs-base);margin-bottom:var(--sp-2);}
.kanban-card .k-meta{display:flex;gap:var(--sp-2);flex-wrap:wrap;align-items:center;margin-top:var(--sp-2);}
.kanban-card .k-cat{font-size:var(--fs-xs);color:var(--text-muted);font-family:'Fira Code',monospace;}
.kanban-add{padding:var(--sp-3);border:1px dashed rgba(255,255,255,.12);border-radius:var(--r-md);text-align:center;color:var(--text-muted);font-size:var(--fs-sm);cursor:pointer;}
.kanban-add:hover{border-color:var(--primary);color:var(--primary);}

.dot-alta{background:var(--rose);} .dot-media{background:var(--primary);} .dot-baixa{background:var(--text-muted);}

/* ===================== FILTROS ===================== */
.filter-bar{display:flex;gap:var(--sp-2);flex-wrap:wrap;}
.filter-select{background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.1);border-radius:var(--r-sm);padding:8px 10px;color:var(--text-main);font-size:var(--fs-sm);outline:none;font-family:'Plus Jakarta Sans',sans-serif;}
.filter-select:focus{border-color:var(--primary);}
.filter-select option{background:#12121f;color:#f4f4f7;}
.filter-chip-date{gap:6px;flex-wrap:wrap;padding:0;}
.filter-chip-date-label{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid rgba(255,255,255,.1);border-radius:var(--r-sm);background:rgba(255,255,255,.02);color:var(--text-main);font-size:var(--fs-sm);}
.filter-chip-date-label i{color:var(--primary);}
.filter-operator-select{min-width:112px;}
.filter-date-input{height:36px;min-width:138px;background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.1);border-radius:var(--r-sm);padding:7px 9px;color:var(--text-main);font-size:var(--fs-sm);outline:none;font-family:'Plus Jakarta Sans',sans-serif;color-scheme:dark;}
.filter-date-input:focus{border-color:var(--primary);}
.filter-date-separator{color:var(--text-muted);font-size:var(--fs-xs);}
.filter-chip-date .filter-remove{height:36px;display:inline-flex;align-items:center;}
.clear-filters{color:var(--text-muted);font-size:var(--fs-sm);cursor:pointer;display:flex;align-items:center;padding:0 4px;}
.clear-filters:hover{color:var(--primary);}
.toolbar-settings{position:relative;display:flex;}
.toolbar-settings-popover{
  position:absolute;
  top:42px;
  right:0;
  z-index:30;
  width:260px;
  max-height:min(520px,calc(100vh - 150px));
  overflow:auto;
  padding:var(--sp-3);
  display:grid;
  gap:8px;
}
.toolbar-settings-section{
  padding:4px 8px 0;
  color:var(--text-muted);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:1px;
}
.toolbar-setting-option{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text-main);
  font-size:var(--fs-sm);
  cursor:pointer;
  padding:7px 8px;
  border-radius:var(--r-sm);
}
.toolbar-setting-option > span:not(.column-order-controls){flex:1;min-width:0;}
.toolbar-column-option{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;}
.toolbar-column-toggle{display:flex;align-items:center;gap:10px;min-width:0;cursor:pointer;}
.toolbar-column-toggle span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.toolbar-setting-option:hover{background:rgba(255,255,255,.05);}
.toolbar-setting-option input{accent-color:var(--primary);}
.toolbar-setting-option.is-disabled{opacity:.5;cursor:not-allowed;}
.toolbar-setting-option.is-disabled:hover{background:transparent;}
.column-order-controls{display:inline-flex;align-items:center;gap:4px;margin-left:auto;}
.column-align-controls{grid-column:1 / -1;display:grid;grid-template-columns:68px 1fr;align-items:center;gap:6px 8px;margin-top:8px;padding-left:24px;}
.column-align-label{color:var(--text-muted);font-size:10px;text-transform:uppercase;letter-spacing:.6px;}
.column-align-buttons{display:inline-flex;align-items:center;gap:4px;}
.toolbar-order-btn,
.toolbar-align-btn{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.1);
  border-radius:7px;
  background:rgba(255,255,255,.04);
  color:var(--text-muted);
  cursor:pointer;
}
.toolbar-order-btn:hover:not(:disabled),
.toolbar-align-btn:hover{border-color:rgba(255,255,255,.2);color:var(--text-main);background:rgba(255,255,255,.08);}
.toolbar-align-btn.active{border-color:rgba(249,115,22,.45);color:var(--primary);background:rgba(249,115,22,.12);}
.toolbar-order-btn:disabled{opacity:.35;cursor:not-allowed;}
.toolbar-settings-reset{height:32px;justify-content:center;font-size:var(--fs-xs);padding:0 10px;}

/* ===================== COMPARADOR T0xTF ===================== */
.comparador-tray{
  position:fixed;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  z-index:60;
  display:flex;
  align-items:center;
  gap:var(--sp-3);
  padding:12px 16px;
  background:var(--panel-bg);
  border:1px solid var(--panel-border);
  backdrop-filter:blur(25px) saturate(160%);
  -webkit-backdrop-filter:blur(25px) saturate(160%);
  border-radius:var(--r-lg);
  box-shadow:0 12px 40px rgba(0,0,0,.5);
  max-width:calc(100vw - 48px);
}
.comparador-tray.hidden{display:none;}
.comparador-tray-chips{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  max-width:min(60vw,640px);
}
.comparador-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 8px 6px 12px;
  background:rgba(249,115,22,.1);
  border:1px solid rgba(249,115,22,.3);
  border-radius:999px;
  font-size:var(--fs-xs);
  color:var(--text-main);
  white-space:nowrap;
}
.comparador-chip button{
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:var(--text-muted);
  cursor:pointer;
  font-size:10px;
  flex-shrink:0;
}
.comparador-chip button:hover{color:var(--rose);}

.comparador-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.7);
  backdrop-filter:blur(4px);
  z-index:96;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:var(--sp-5);
}
.comparador-modal-overlay.hidden{display:none;}
.comparador-modal-box{
  width:min(1180px,100%);
  height:calc(100dvh - 48px);
  max-height:calc(100dvh - 48px);
  background:var(--panel-bg);
  border:1px solid var(--panel-border);
  border-radius:var(--r-lg);
  box-shadow:0 8px 32px rgba(0,0,0,.5);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.comparador-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:var(--sp-5) var(--sp-6);
  border-bottom:1px solid var(--panel-border);
  flex:0 0 auto;
}
.comparador-modal-head h2{
  font-family:'Space Grotesk',sans-serif;
  font-size:var(--fs-lg);
  font-weight:700;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}
.comparador-modal-head h2 i{color:var(--primary);}
.comparador-modal-body{
  flex:1 1 auto;
  overflow:auto;
  padding:var(--sp-6);
}
.comparador-loading{
  text-align:center;
  color:var(--text-muted);
  padding:var(--sp-6);
}
.comparador-table-wrap{overflow-x:auto;}
.comparador-table{width:100%;border-collapse:collapse;font-size:var(--fs-sm);}
.comparador-table thead th{
  text-align:left;
  padding:10px 14px;
  color:var(--text-muted);
  font-size:var(--fs-xs);
  text-transform:uppercase;
  letter-spacing:.5px;
  border-bottom:1px solid var(--panel-border);
  white-space:nowrap;
}
.comparador-table tbody td{
  padding:10px 14px;
  border-bottom:1px solid rgba(255,255,255,.05);
  white-space:nowrap;
}
.comparador-row-label{color:var(--text-main);font-weight:600;}
.comparador-col-value{color:var(--text-main);}
.comparador-col-variacao{font-weight:700;text-align:right;}
.comparador-col-variacao.is-positive{color:var(--emerald);}
.comparador-col-variacao.is-negative{color:var(--rose);}
.comparador-section-row td{
  padding-top:20px;
  font-weight:700;
  color:var(--primary);
  text-transform:uppercase;
  font-size:var(--fs-xs);
  letter-spacing:.5px;
  border-bottom:1px solid var(--panel-border);
}
[data-theme="claro"] .comparador-table tbody td,
[data-theme="polar"] .comparador-table tbody td,
[data-theme="solar"] .comparador-table tbody td{
  border-bottom:1px solid rgba(15,23,42,.08);
}

/* ===================== EDITABLE CELLS ===================== */
.editable{cursor:pointer;transition:.15s;border-radius:6px;}
.editable:hover{background:rgba(255,255,255,.04);outline:0px  rgba(255,255,255,.15);}
.kanban-card{cursor:pointer;}

/* ===================== MODAL ===================== */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);z-index:50;display:flex;align-items:center;justify-content:center;padding:var(--sp-5);}
.modal-box{width:100%;max-height:calc(100dvh - 48px);overflow:auto;padding:var(--sp-6);display:flex;flex-direction:column;gap:var(--sp-4);}
.modal-box-fullscreen{height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);}

/* ---------- SIDE PEEK (modal padrão do OrionTable, estilo Notion) ---------- */
.modal-overlay.orion-side-peek{
  justify-content:flex-end;
  align-items:stretch;
  padding:0;
}
.modal-overlay.orion-side-peek .modal-box{
  height:100dvh;
  max-height:100dvh;
  max-width:min(620px, 94vw) !important;
  margin:0;
  border-radius:var(--r-lg) 0 0 var(--r-lg);
  animation:orionSidePeekIn .22s ease;
  overflow-y:auto;
}
@keyframes orionSidePeekIn{
  from{transform:translateX(48px);opacity:.35;}
  to{transform:translateX(0);opacity:1;}
}
@media (max-width: 768px){
  .modal-overlay.orion-side-peek .modal-box{max-width:100vw !important;border-radius:0;}
}
.modal-title{font-family:'Space Grotesk',sans-serif;font-size:var(--fs-lg);font-weight:700;display:flex;justify-content:space-between;align-items:center;}
.modal-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-4);}
.field-group{display:flex;flex-direction:column;gap:6px;}
.field-group label{font-size:var(--fs-xs);text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);font-weight:600;}
.modal-actions{display:flex;justify-content:space-between;align-items:center;margin-top:var(--sp-2);}
.orion-btn-danger{background:rgba(244,63,94,.12);color:var(--rose);}
.colaborador-modal-box{
  width:min(860px,100%);
  max-width:860px;
  height:auto;
  max-height:calc(100dvh - 152px);
  padding:var(--sp-5);
  overflow:auto;
}
.colaborador-modal-box .modal-title{flex:0 0 auto;}
.colaborador-modal-fields{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px 16px;
  overflow:visible;
  padding:0;
  align-content:start;
}
.colaborador-modal-box .orion-input{
  min-height:42px;
}
.colaborador-modal-fields .field-group[style*="span 2"]{grid-column:span 2 !important;}
.colaborador-modal-fields .field-group[style*="span 4"]{grid-column:span 3 !important;}
.colaborador-modal-section{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:4px;
  padding-top:10px;
  color:var(--primary);
  font-size:var(--fs-xs);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:1px;
  border-top:1px solid rgba(255,255,255,.07);
}
.colaborador-modal-section:first-of-type{margin-top:0;padding-top:0;border-top:0;}
.colaborador-modal-section::after{content:'';height:1px;flex:1;background:rgba(255,255,255,.07);}
.colaborador-modal-box .modal-actions{
  flex:0 0 auto;
  position:static;
  margin:var(--sp-3) 0 0;
  padding-top:var(--sp-4);
  background:transparent;
  border-top:1px solid rgba(255,255,255,.08);
}

.cliente-modal-box, .fornecedor-modal-box{
  width:min(980px,100%);
  max-width:980px;
  max-height:calc(100dvh - 122px);
  gap:16px;
}
.cliente-modal-fields, .fornecedor-modal-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px;}
.cliente-section-title, .fornecedor-section-title{display:flex;align-items:center;gap:12px;color:var(--primary);font-size:var(--fs-xs);font-weight:800;text-transform:uppercase;letter-spacing:1.4px;}
.cliente-section-title::after, .fornecedor-section-title::after{content:"";height:1px;background:rgba(255,255,255,.08);flex:1;}
.cliente-span-2, .fornecedor-span-2{grid-column:span 2;}
.cliente-modal-box .orion-input, .fornecedor-modal-box .orion-input{min-height:42px;}
.fornecedor-input-action{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;}
.fornecedor-search-btn{width:44px;height:42px;padding:0;justify-content:center;}
@media (max-width: 980px){
  .cliente-modal-box, .fornecedor-modal-box{max-height:calc(100dvh - 96px);}
  .cliente-modal-fields, .fornecedor-modal-fields{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 640px){
  .cliente-modal-fields, .fornecedor-modal-fields{grid-template-columns:1fr;}
  .cliente-span-2, .fornecedor-span-2{grid-column:span 1;}
}

/* ===================== PAGINAÇÃO ===================== */
.orion-pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:var(--sp-3);
  padding:var(--sp-2) var(--sp-4);
  border:1px solid var(--panel-border);
  border-top:1px solid rgba(255,255,255,.08);
  border-radius:0 0 var(--r-lg) var(--r-lg);
  background:linear-gradient(180deg, rgba(7,7,12,.96), rgba(7,7,12,.99));
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.pagination-summary{
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  overflow:visible;
  scrollbar-width:none;
  padding:5px 0;
  border-top:1px solid rgba(255,255,255,.08);
}
.orion-sidebar::-webkit-scrollbar{width:0;height:0;}

[data-theme="claro"] .orion-topbar,
[data-theme="polar"] .orion-topbar,
[data-theme="solar"] .orion-topbar{
  background:linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.34));
  border-bottom-color:rgba(255,255,255,.62);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78), 0 18px 44px rgba(15,23,42,.10);
  backdrop-filter:blur(26px) saturate(185%);
  -webkit-backdrop-filter:blur(26px) saturate(185%);
}
[data-theme="claro"] .orion-sidebar,
[data-theme="polar"] .orion-sidebar,
[data-theme="solar"] .orion-sidebar{
  background:linear-gradient(180deg, rgba(255,255,255,.54), rgba(241,245,249,.30));
  border-right-color:rgba(255,255,255,.62);
  box-shadow:inset -1px 0 0 rgba(255,255,255,.52), 18px 0 54px rgba(15,23,42,.08);
  backdrop-filter:blur(28px) saturate(190%);
  -webkit-backdrop-filter:blur(28px) saturate(190%);
}
[data-theme="claro"] .sidebar-link,
[data-theme="polar"] .sidebar-link,
[data-theme="solar"] .sidebar-link{color:#334155;}
[data-theme="claro"] .sidebar-link:hover,
[data-theme="polar"] .sidebar-link:hover,
[data-theme="solar"] .sidebar-link:hover{background:rgba(15,23,42,.045);}
[data-theme="claro"] .sidebar-link.active,
[data-theme="polar"] .sidebar-link.active,
[data-theme="solar"] .sidebar-link.active{
  background:linear-gradient(135deg, rgba(255,255,255,.58), rgba(226,232,240,.30));
  border-color:rgba(255,255,255,.68);
  color:var(--text-main);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 14px 34px rgba(15,23,42,.10);
  backdrop-filter:blur(18px) saturate(170%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);
}
.pagination-summary::-webkit-scrollbar{width:0;height:0;}
.pagination-info{font-size:var(--fs-sm);color:var(--text-muted);}
.pagination-pages{display:flex;align-items:center;gap:4px;}
.page-btn{min-width:32px;height:32px;padding:0 8px;border-radius:var(--r-sm);background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);color:var(--text-muted);font-size:var(--fs-sm);font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s;}
.page-btn:hover:not(.disabled):not(.active){color:var(--text-main);border-color:rgba(255,255,255,.2);}
.page-btn.active{background:linear-gradient(135deg,var(--primary),#c2410c);color:#fff;border-color:transparent;box-shadow:0 4px 14px var(--primary-glow);}
.page-btn.disabled{opacity:.35;cursor:not-allowed;}
.page-ellipsis{color:var(--text-muted);font-size:var(--fs-sm);padding:0 2px;}
.pagination-size{display:flex;align-items:center;gap:8px;font-size:var(--fs-sm);color:var(--text-muted);}
.pagination-size select.orion-input{padding:6px 10px;height:32px;}

[data-theme="claro"] .orion-pagination,
[data-theme="polar"] .orion-pagination,
[data-theme="solar"] .orion-pagination{
  border-color:rgba(255,255,255,.58);
  background:linear-gradient(180deg, rgba(255,255,255,.44), rgba(255,255,255,.24));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.62), 0 -14px 34px rgba(15,23,42,.08);
  backdrop-filter:blur(26px) saturate(185%);
  -webkit-backdrop-filter:blur(26px) saturate(185%);
}
[data-theme="claro"] .pagination-summary,
[data-theme="polar"] .pagination-summary,
[data-theme="solar"] .pagination-summary{
  border-top-color:rgba(15,23,42,.08);
}
[data-theme="claro"] .page-btn,
[data-theme="polar"] .page-btn,
[data-theme="solar"] .page-btn,
[data-theme="claro"] .summary-mode-btn,
[data-theme="polar"] .summary-mode-btn,
[data-theme="solar"] .summary-mode-btn{
  background:rgba(255,255,255,.34);
  border-color:rgba(255,255,255,.55);
  color:var(--text-muted);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68);
}
[data-theme="claro"] .page-btn:hover:not(.disabled):not(.active),
[data-theme="polar"] .page-btn:hover:not(.disabled):not(.active),
[data-theme="solar"] .page-btn:hover:not(.disabled):not(.active),
[data-theme="claro"] .summary-mode-btn:hover,
[data-theme="polar"] .summary-mode-btn:hover,
[data-theme="solar"] .summary-mode-btn:hover{
  background:rgba(255,255,255,.54);
  border-color:rgba(255,255,255,.78);
  color:var(--text-main);
}
[data-theme="claro"] .footer-summary-label,
[data-theme="polar"] .footer-summary-label,
[data-theme="solar"] .footer-summary-label{
  color:rgba(51,65,85,.72);
}

/* hidden helper */
.hidden{display:none !important;}

@media (max-width:768px){
  body{
    display:block;
    min-height:100vh;
    overflow-y:auto;
    padding-top:60px;
  }
  .orion-topbar{
    left:0;
    height:60px;
    padding:7px 10px;
    gap:8px;
  }
  body.sidebar-collapsed .orion-topbar{
    left:0;
  }
  .topbar-center,
  .topbar-tabs{
    justify-content:flex-start;
  }
  .topbar-company{
    max-width:40vw;
    font-size:9px;
    letter-spacing:.4px;
    margin-top:-3px;
  }
  .topbar-greeting{
    display:block;
    max-width:40vw;
    margin-top:2px;
    font-size:12px;
    font-weight:600;
    color:var(--text-main);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .topbar-user{
    padding:6px 8px;
  }
  .topbar-user small{
    display:none;
  }
  .orion-sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:280px;
    flex:0 0 280px;
    top:60px;
    height:calc(100dvh - 60px);
    max-height:calc(100dvh - 60px);
    padding:var(--sp-5);
    z-index:60;
    border-right:1px solid rgba(255,255,255,.08);
    border-bottom:none;
    transform:translateX(-100%);
    transition:transform .22s ease, width .22s ease, padding .22s ease;
  }
  body.sidebar-collapsed .orion-sidebar{
    transform:translateX(-100%);
    width:280px;
    flex-basis:280px;
    padding:var(--sp-5);
  }
  body.sidebar-open .orion-sidebar{
    width:280px;
    padding:var(--sp-5);
    transform:translateX(0);
  }
  body.sidebar-open .orion-sidebar-brand{
    justify-content:flex-start;
  }
  body.sidebar-open .sidebar-label,
  body.sidebar-open .sidebar-link span,
  body.sidebar-open .sidebar-status span,
  body.sidebar-open .sidebar-user div,
  body.sidebar-open .sidebar-quick{
    display:block;
  }
  body.sidebar-open .sidebar-label{
    display:flex;
  }
  body.sidebar-open .orion-brand-text{
    display:block;
  }
  body.sidebar-open .sidebar-section{
    align-items:stretch;
  }
  body.sidebar-open .sidebar-link{
    width:auto;
    justify-content:flex-start;
  }
  body.sidebar-open .sidebar-footer{
    display:block;
  }
  body.sidebar-open .sidebar-user{
    justify-content:flex-start;
  }
  body.sidebar-open .sidebar-status{
    justify-content:space-between;
  }
  .orion-main{
    max-width:none;
    margin-left:0;
    padding-top:0;
    height:auto;
    overflow:visible;
  }
  body.sidebar-collapsed .orion-main{
    max-width:none;
  }
  .mobile-menu-fab{
    display:none;
  }
  .sidebar-toggle{
    width:34px;
    height:34px;
  }
  .sidebar-backdrop{
    position:fixed;
    top:60px;
    left:0;
    right:0;
    bottom:0;
    z-index:55;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(2px);
  }
  body.sidebar-collapsed .sidebar-backdrop{
    display:none !important;
  }
  body.sidebar-open .sidebar-backdrop{
    display:block;
  }
  .orion-app{padding:0 var(--sp-4) var(--sp-6);}

  .orion-header{padding:var(--sp-5) 0 var(--sp-4);}
  .orion-header-title h1{font-size:var(--fs-md);}

  .orion-toolbar{flex-direction:column;align-items:stretch;margin-bottom:var(--sp-4);}
  .view-tabs{width:100%;overflow-x:auto;}
  .add-view-btn span, .add-view-btn{white-space:nowrap;}

  .toolbar-actions{flex-direction:column;align-items:stretch;width:100%;gap:var(--sp-3);}
  .toolbar-actions .orion-input, .toolbar-actions .orion-btn{width:100%;}

  .mobile-filter-toggle{display:flex;justify-content:space-between;order:-1;margin-bottom:0;}
  .desktop-only-btn{display:none;}
  .mobile-only-btn{display:flex;width:100%;justify-content:center;}
  .mobile-action-stack{
    display:grid;
    grid-template-columns:1fr;
    gap:var(--sp-3);
    margin-top:var(--sp-2);
    margin-bottom:var(--sp-5);
  }
  .mobile-action-stack .hidden{display:none !important;}
  .toolbar-settings{width:100%;justify-content:center;}
  .toolbar-settings .orion-icon-btn{width:100%;}
  .toolbar-settings-popover{left:0;right:0;width:100%;top:46px;}
  .toggle-chevron{margin-left:auto;transition:transform .25s ease;}
  body.filters-open .toggle-chevron{transform:rotate(180deg);}

  .collapsible-item{
    max-height:0;opacity:0;overflow:hidden;pointer-events:none;
    margin-top:0 !important;margin-bottom:0 !important;
    transition:max-height .3s ease, opacity .2s ease;
  }
  body.filters-open .collapsible-item{
    max-height:600px;opacity:1;pointer-events:auto;
  }
  body.filters-open #filterBar.collapsible-item{overflow:visible;}
  body.filters-open .pagination-size.collapsible-item{margin-bottom:0 !important;}
  body.filters-open #searchInput.collapsible-item{margin-bottom:0 !important;}
  body.filters-open #filterBar.collapsible-item{margin-bottom:var(--sp-6) !important;}
  .pagination-size{width:100%;justify-content:space-between;}
  .pagination-size select.orion-input{flex:1;}

  .filter-bar{flex-direction:column;align-items:stretch;}
  .filter-chip{width:100%;}
  .filter-select{flex:1;width:100%;}
  .filter-chip-date{display:grid;grid-template-columns:1fr;gap:6px;}
  .filter-chip-date-label,.filter-date-input,.filter-operator-select{width:100%;}
  .filter-date-separator{display:none;}
  .filter-chip-date .filter-remove{justify-content:center;width:100%;}
  .filter-manager{width:100%;}
  .filter-manager .add-view-btn{width:100%;justify-content:center;}
  .filter-add-popover{left:0;right:0;width:100%;min-width:0;}
  .clear-filters{justify-content:center;padding:8px 0;}

  .orion-table{min-width:640px;}
  .orion-table-wrap{overflow-x:auto;}

  .orion-pagination{flex-direction:column;align-items:stretch;gap:var(--sp-2);}
  .pagination-info{text-align:center;order:2;}
  .pagination-pages{order:3;justify-content:center;flex-wrap:wrap;}

  .modal-box{max-width:100%;padding:var(--sp-5);}
  .modal-fields{grid-template-columns:1fr !important;}
  .field-group{grid-column:span 1 !important;}
  #colaboradorModal,
  body.sidebar-collapsed #colaboradorModal{
    align-items:flex-start;
    padding:84px 8px 12px;
  }
  .colaborador-modal-box{
    width:100%;
    height:auto;
    max-height:calc(100dvh - 96px);
    padding:var(--sp-4);
  }
  .colaborador-modal-fields{
    grid-template-columns:1fr !important;
    gap:12px;
  }
  .colaborador-modal-fields .field-group,
  .colaborador-modal-fields .field-group[style*="span"]{
    grid-column:1 / -1 !important;
  }
  .colaborador-modal-box .modal-actions{
    margin:var(--sp-3) 0 0;
    padding:var(--sp-3) 0 0;
  }

  .kanban-col{flex:0 0 82vw;}

  .theme-popover{
    position:fixed;
    top:64px;
    left:12px;
    right:12px;
    width:auto;
  }
}

@media (max-width:420px){
  .orion-header{flex-direction:column;align-items:flex-start;}
  .orion-header > div:last-child{width:100%;justify-content:space-between;}
  .page-btn{min-width:28px;height:28px;font-size:var(--fs-xs);}
}

@media (max-width:900px){
  .docs-layout{grid-template-columns:1fr;}
  .docs-index{position:relative;top:auto;}
}

@media (min-width:769px) and (max-width:1180px){
  .colaborador-modal-box{
    width:100%;
    min-width:0;
    height:auto;
    max-height:calc(100dvh - 128px);
  }
  .colaborador-modal-fields{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .colaborador-modal-fields .field-group[style*="span 2"]{grid-column:span 2 !important;}
  .colaborador-modal-fields .field-group[style*="span 4"]{grid-column:span 2 !important;}
}

#page-content.page-loading{opacity:.4;transition:opacity .15s;}

/* ===================== DIAGNOSTICO FINANCEIRO ===================== */
.diag-page{
  max-width:1500px;
  padding-bottom:var(--sp-5);
  overflow:auto;
  font-size:12px;
}
.diag-header{
  align-items:flex-end;
  padding-top:var(--sp-4);
  padding-bottom:var(--sp-2);
}
.diag-header .orion-header-title h1{
  font-size:20px;
}
.diag-header .orion-header-title p{
  font-size:10px;
}
.diag-actions{
  display:flex;
  align-items:center;
  gap:var(--sp-2);
  flex-wrap:wrap;
}
.diag-actions .orion-btn,
.diag-section .orion-btn-mini{
  min-height:30px;
  height:30px;
  padding:0 12px;
  font-size:11px;
  border-radius:10px;
}
.diag-grid{
  display:grid;
  gap:var(--sp-3);
}
.diag-metrics{
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:var(--sp-3);
}
.diag-metric-card{
  padding:var(--sp-3);
  display:grid;
  gap:4px;
  border-radius:var(--r-sm);
}
.diag-metric-card span,
.diag-metric-card small,
.diag-section p{
  color:var(--text-muted);
}
.diag-metric-card span{
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.8px;
  font-weight:800;
}
.diag-metric-card strong{
  font-size:18px;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.diag-metric-card small{
  font-size:10px;
}
.diag-section{
  padding:var(--sp-3);
  border-radius:var(--r-sm);
  margin-bottom:var(--sp-3);
}
.diag-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--sp-2);
  margin-bottom:var(--sp-2);
}
.diag-section h2{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  margin-bottom:2px;
}
.diag-section h2 i{
  color:var(--primary);
}
.diag-section p{
  font-size:10px;
}
.diag-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:var(--sp-3);
}
.diag-form-grid .field-group span{
  font-size:var(--fs-xs);
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.5px;
  font-weight:700;
}
.diag-warning{
  margin-top:var(--sp-3);
  padding:var(--sp-3);
  border-radius:var(--r-sm);
  background:rgba(244,63,94,.1);
  border:1px solid rgba(244,63,94,.3);
  color:var(--rose);
  font-size:var(--fs-sm);
  display:flex;
  align-items:center;
  gap:8px;
}
.diag-two-col{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--sp-3);
}
.diag-two-col-wide{
  grid-template-columns:1fr;
}
.diag-side-stack{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--sp-3);
  align-content:start;
}
.diag-table-wrap{
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--r-sm);
}
.diag-edit-table{
  width:100%;
  min-width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  border-spacing:0;
}
.diag-edit-table th,
.diag-edit-table td{
  padding:4px 6px;
  border:1px solid rgba(255,255,255,.075);
  text-align:left;
  vertical-align:middle;
  height:32px;
}
.diag-edit-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:rgba(6,20,34,.98);
  color:var(--text-main);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.25px;
  text-align:center;
  font-weight:800;
  line-height:1.15;
}
.diag-edit-table td{
  font-size:12px;
  overflow:hidden;
  line-height:1.2;
}
.diag-edit-table tfoot td{
  position:sticky;
  bottom:0;
  z-index:1;
  background:rgba(7,7,12,.94);
  color:var(--text-main);
  font-weight:800;
}
.diag-cell-input{
  width:100%;
  max-width:100%;
  min-width:0;
  height:24px;
  padding:2px 6px;
  font-size:11px;
  border-radius:4px;
  box-sizing:border-box;
  background:rgba(255,255,255,.025);
  box-shadow:none;
}
.diag-cell-input:focus{
  box-shadow:inset 0 0 0 1px var(--primary);
}
.diag-cell-input[type="number"]{
  appearance:textfield;
  -moz-appearance:textfield;
  text-align:right;
  font-family:'Fira Code',monospace;
}
.diag-cell-input[type="number"]::-webkit-outer-spin-button,
.diag-cell-input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.diag-money{
  text-align:right !important;
  font-family:'Fira Code',monospace;
  white-space:nowrap;
  font-size:12px;
}
.diag-edit-table select.diag-cell-input{
  text-align:left;
  font-family:inherit;
}
.diag-edit-table td:has(.orion-icon-btn){
  text-align:center;
}
.diag-fin-table th{text-align:center;}
.diag-fin-table th:nth-child(1),
.diag-fin-table td:nth-child(1){width:30%;text-align:left;}
.diag-fin-table th:nth-child(2),
.diag-fin-table td:nth-child(2){width:16%;}
.diag-fin-table th:nth-child(4),
.diag-fin-table td:nth-child(4),
.diag-fin-table th:nth-child(5),
.diag-fin-table td:nth-child(5),
.diag-fin-table th:nth-child(6),
.diag-fin-table td:nth-child(6){width:14%;}
.diag-fin-table td:nth-child(2),
.diag-fin-table td:nth-child(4),
.diag-fin-table td:nth-child(5),
.diag-fin-table td:nth-child(6){text-align:right;}
.diag-fin-table th:nth-child(3),
.diag-fin-table td:nth-child(3){width:10%;text-align:center;}
.diag-fin-table th:nth-child(7),
.diag-fin-table td:nth-child(7){width:36px;text-align:center;}
.diag-juros-table th{text-align:center;}
.diag-juros-table th:nth-child(1),
.diag-juros-table td:nth-child(1){width:34%;text-align:left;}
.diag-juros-table th:nth-child(2),
.diag-juros-table td:nth-child(2){width:10%;text-align:right;}
.diag-juros-table th:nth-child(3),
.diag-juros-table td:nth-child(3){width:14%;text-align:right;}
.diag-juros-table th:nth-child(4),
.diag-juros-table td:nth-child(4){width:14%;text-align:right;}
.diag-juros-table th:nth-child(5),
.diag-juros-table td:nth-child(5){width:13%;text-align:right;}
.diag-juros-table th:nth-child(6),
.diag-juros-table td:nth-child(6){width:13%;text-align:right;}
.diag-juros-table th:nth-child(7),
.diag-juros-table td:nth-child(7){width:32px;text-align:center;}
.diag-colab-table th{text-align:center;}
.diag-colab-table th:nth-child(1),
.diag-colab-table td:nth-child(1){width:46%;text-align:left;}
.diag-colab-table th:nth-child(2),
.diag-colab-table td:nth-child(2){width:18%;text-align:center;}
.diag-colab-table th:nth-child(3),
.diag-colab-table td:nth-child(3){width:36%;text-align:right;}
.diag-compras-table th{text-align:center;}
.diag-compras-table th:nth-child(1),
.diag-compras-table td:nth-child(1){width:34%;text-align:left;}
.diag-compras-table th:nth-child(2),
.diag-compras-table th:nth-child(3),
.diag-compras-table th:nth-child(4){width:22%;}
.diag-compras-table td:nth-child(2),
.diag-compras-table td:nth-child(3),
.diag-compras-table td:nth-child(4){width:22%;text-align:right;}
.diag-markup-table th{text-align:center;}
.diag-markup-table th:nth-child(1),
.diag-markup-table td:nth-child(1){width:36%;text-align:left;}
.diag-markup-table th:nth-child(2),
.diag-markup-table th:nth-child(3),
.diag-markup-table th:nth-child(4){width:21.33%;}
.diag-markup-table td:nth-child(2),
.diag-markup-table td:nth-child(3),
.diag-markup-table td:nth-child(4){width:21.33%;text-align:right;}
.diag-custos-table th{text-align:center;}
.diag-custos-table th:nth-child(1),
.diag-custos-table td:nth-child(1){width:64px;text-align:center;font-weight:800;color:var(--primary);}
.diag-custos-table th:nth-child(2),
.diag-custos-table td:nth-child(2){width:auto;text-align:left;}
.diag-custos-table th:nth-child(3),
.diag-custos-table td:nth-child(3){width:92px;text-align:center;}
.diag-custos-table th:nth-child(4),
.diag-custos-table td:nth-child(4),
.diag-custos-table th:nth-child(5),
.diag-custos-table td:nth-child(5){width:118px;text-align:right;}
.diag-custos-table .diag-cost-group td,
.diag-custos-table .diag-cost-result td{
  background:rgba(255,255,255,.035);
  font-weight:900;
  color:var(--text-main);
}
.diag-custos-table .diag-cost-result td{
  background:rgba(0,229,255,.055);
}
.diag-read-table td:nth-child(1){
  color:var(--primary);
  font-weight:800;
  font-size:13px;
}
.diag-kv{
  display:flex;
  justify-content:space-between;
  gap:var(--sp-2);
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.07);
}
.diag-kv:last-child{
  border-bottom:0;
}
.diag-kv span{
  color:var(--text-muted);
  font-size:11px;
}
.diag-kv strong{
  text-align:right;
  font-size:13px;
}
.diag-page.is-loading{
  opacity:.55;
  pointer-events:none;
}

.dre-filters{
  display:flex;
  align-items:flex-end;
  gap:var(--sp-3);
  flex-wrap:wrap;
}
.dre-filters .field-group{
  min-width:120px;
}
.dre-table-wrap{
  overflow:auto;
  max-height:70vh;
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--r-sm);
}
.dre-table{
  border-collapse:collapse;
  border-spacing:0;
  width:100%;
  font-size:12px;
}
.dre-table th,
.dre-table td{
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.06);
  white-space:nowrap;
}
.dre-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:rgba(6,20,34,.98);
  color:var(--text-main);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.3px;
  font-weight:800;
}
.dre-table tbody td:first-child{
  color:var(--primary);
  font-weight:700;
}
.dre-col-money{
  text-align:right;
  font-family:'Fira Code',monospace;
}
.dre-col-pct{
  text-align:right;
  color:var(--text-muted);
  font-size:11px;
}
.dre-table tr.dre-group td{
  background:rgba(255,255,255,.04);
  font-weight:900;
  color:var(--text-main);
  text-transform:uppercase;
  font-size:10.5px;
  letter-spacing:.3px;
}
.dre-table tr.dre-subtotal td{
  background:rgba(255,255,255,.025);
  font-weight:800;
  border-top:1px solid rgba(255,255,255,.15);
}
.dre-table tr.dre-result td{
  background:rgba(0,229,255,.06);
  font-weight:900;
  color:var(--text-main);
}
.dre-table tr.dre-result-final td{
  background:rgba(16,185,129,.1);
}
.dre-table tr.dre-pct-row td{
  background:rgba(255,255,255,.015);
  color:var(--text-muted);
  font-size:10.5px;
  font-style:italic;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.dre-table tr.dre-warning td{
  background:rgba(249,115,22,.12);
  color:#fdba74;
}
.dre-table tr.dre-warning-row td{
  background:rgba(249,115,22,.05);
  color:#fdba74;
}
.dre-aviso{
  margin-top:6px;
  color:#fdba74;
  font-size:var(--fs-xs);
  display:flex;
  align-items:center;
  gap:6px;
}
.dre-aviso i{font-size:11px;}
.dre-table.is-loading{
  opacity:.5;
  pointer-events:none;
}

@media (max-width:1100px){
  .dre-filters{
    width:100%;
  }
}

@media (max-width:1100px){
  .diag-metrics,
  .diag-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .diag-two-col,
  .diag-two-col-wide{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .diag-metrics,
  .diag-form-grid{
    grid-template-columns:1fr;
  }
  .diag-actions{
    width:100%;
  }
  .diag-actions .orion-btn{
    flex:1;
    justify-content:center;
  }
}

.ai-float-btn{
  position:fixed;
  right:22px;
  bottom:22px;
  width:52px;
  height:52px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:18px;
  z-index:80;
  display:grid;
  place-items:center;
  color:#fff;
  background:var(--primary);
  box-shadow:0 18px 45px rgba(0,0,0,.34),0 0 28px color-mix(in srgb,var(--primary) 45%,transparent);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.ai-float-btn:hover,
.ai-float-btn.is-open{
  transform:translateY(-2px);
  box-shadow:0 22px 55px rgba(0,0,0,.42),0 0 34px color-mix(in srgb,var(--primary) 52%,transparent);
}
.ai-chat-panel{
  position:fixed;
  right:22px;
  bottom:86px;
  width:min(390px,calc(100vw - 28px));
  height:min(470px,calc(100vh - 150px));
  z-index:79;
  display:grid;
  grid-template-rows:auto 1fr auto;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(145deg,rgba(8,14,24,.9),rgba(22,8,25,.82));
  backdrop-filter:blur(22px);
  box-shadow:0 26px 80px rgba(0,0,0,.42);
}
[data-theme="claro"] .ai-chat-panel,
[data-theme="polar"] .ai-chat-panel,
[data-theme="solar"] .ai-chat-panel{
  background:linear-gradient(145deg,rgba(255,255,255,.84),rgba(246,250,255,.72));
  border-color:rgba(15,23,42,.12);
}
.ai-chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.035);
  min-height:42px;
}
.ai-chat-head strong{
  display:block;
  font-size:12px;
  letter-spacing:.2px;
  line-height:1.1;
}
.ai-chat-head span{
  display:block;
  margin-top:1px;
  color:var(--text-muted);
  font-size:10px;
  line-height:1.1;
}
.ai-chat-head .orion-icon-btn{
  width:30px;
  height:30px;
  min-width:30px;
}
.ai-chat-body{
  min-height:0;
  overflow:auto;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ai-msg{
  max-width:88%;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.045);
}
.ai-msg-user{
  align-self:flex-end;
  background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 42%,transparent),color-mix(in srgb,var(--accent) 22%,transparent));
}
.ai-msg-assistant{
  align-self:flex-start;
}
.ai-msg-meta{
  color:var(--text-muted);
  font-size:10px;
  margin-bottom:4px;
}
.ai-msg-text{
  font-size:12px;
  line-height:1.45;
  color:var(--text-main);
  white-space:pre-wrap;
}
.ai-chat-form{
  display:grid;
  grid-template-columns:1fr 44px;
  gap:8px;
  padding:10px;
  border-top:1px solid rgba(255,255,255,.1);
  background:rgba(0,0,0,.16);
}
.ai-chat-form .orion-input{
  height:38px;
}
.ai-chat-form .orion-btn{
  min-width:0;
  height:38px;
  padding:0;
  justify-content:center;
  background:var(--primary);
  box-shadow:0 10px 28px color-mix(in srgb,var(--primary) 24%,transparent);
}

@media (max-width:640px){
  .ai-float-btn{
    right:14px;
    bottom:14px;
  }
  .ai-chat-panel{
    right:14px;
    bottom:76px;
    height:min(460px,calc(100vh - 112px));
  }
}

/* ===================== VIDRO LIQUIDO (LIQUID GLASS) =====================
   --glass-opacity-mult (setado via slider em app.js, 1 = padrao) multiplica
   cada porcentagem de opacidade de fundo abaixo, permitindo o usuario deixar
   o vidro mais ou menos opaco sem precisar de uma regra por elemento. */
body.glass-liquid .orion-topbar{
  background:color-mix(in srgb, var(--bg) calc(30% * var(--glass-opacity-mult, 1)), transparent);
  border-bottom-color:color-mix(in srgb, var(--text-main) 14%, transparent);
  box-shadow:inset 0 1px 0 color-mix(in srgb, var(--text-main) 10%, transparent), 0 18px 44px rgba(0,0,0,.22);
  backdrop-filter:blur(46px) saturate(200%);
  -webkit-backdrop-filter:blur(46px) saturate(200%);
}
body.glass-liquid .orion-sidebar{
  background:color-mix(in srgb, var(--bg) calc(26% * var(--glass-opacity-mult, 1)), transparent);
  border-right-color:color-mix(in srgb, var(--text-main) 14%, transparent);
  box-shadow:inset -1px 0 0 color-mix(in srgb, var(--text-main) 8%, transparent), 18px 0 54px rgba(0,0,0,.18);
  backdrop-filter:blur(50px) saturate(200%);
  -webkit-backdrop-filter:blur(50px) saturate(200%);
}
body.glass-liquid .orion-table thead,
body.glass-liquid .orion-table thead tr,
body.glass-liquid .orion-table thead th{
  background:color-mix(in srgb, var(--bg) calc(21% * var(--glass-opacity-mult, 1)), transparent);
  border-bottom-color:color-mix(in srgb, var(--text-main) 12%, transparent);
  backdrop-filter:blur(28px) saturate(220%);
  -webkit-backdrop-filter:blur(28px) saturate(220%);
}
body.glass-liquid .orion-pagination{
  background:color-mix(in srgb, var(--bg) calc(16% * var(--glass-opacity-mult, 1)), transparent);
  border-color:color-mix(in srgb, var(--text-main) 12%, transparent);
  backdrop-filter:blur(28px) saturate(220%);
  -webkit-backdrop-filter:blur(28px) saturate(220%);
}
body.glass-liquid .pagination-summary{
  border-top-color:color-mix(in srgb, var(--text-main) 12%, transparent);
}

/* ===================== AJUSTES PANDORA (MOBILE) ===================== */
/* No iOS o backdrop-filter falha dentro de camadas fixas aninhadas e o
   conteudo atras do modal "vaza" pela transparencia do painel. Em telas
   estreitas o modal usa fundo solido do tema (tingido pela cor do painel)
   em vez do efeito vidro. */
@media (max-width:768px){
  .modal-overlay .modal-box{
    background-color:var(--bg);
    background-image:linear-gradient(var(--panel-bg), var(--panel-bg));
  }
}
