/* =============================================================================
   Nyasha - temas da marca, como camada sobre o Elite (os arquivos do Elite nao
   sao editados: sao compartilhados com o AD Lidera). Carregar DEPOIS do tema.

   Paleta extraida da logo:
     petroleo #052F47   azul #003050   creme #FCF4E9   dourado #DE9429
     laranja  #C4570E   verde #3A7B61  verde-escuro #0C472E

   Dois temas apenas: "dark" (petroleo) e "elite-sacro" (creme). O light saiu.
   ============================================================================= */

/* ------------------------------ ESCURO (petroleo) ------------------------------ */
body[data-theme="dark"] {
  --ny-petroleo: #052F47; --ny-petroleo-fundo: #032336; --ny-petroleo-alto: #0A4868;
  --ny-dourado: #DE9429;  --ny-dourado-claro: #EAAA4C; --ny-creme: #FCF4E9;

  --color-primary: #DE9429; --color-primary-light: #EAAA4C; --color-primary-dark: #032336;
  --color-secondary: #DE9429; --color-secondary-light: #EAAA4C;

  --bg-primary: #052F47; --bg-secondary: #073B58; --bg-tertiary: rgba(252,244,233,.04);
  --bg-card: rgba(252,244,233,.045); --bg-hover: rgba(252,244,233,.07); --bg-elevated: #0A4868;

  --border-subtle: rgba(252,244,233,.08); --border-default: rgba(252,244,233,.13);
  --border-hover: rgba(252,244,233,.19); --border-strong: rgba(252,244,233,.22);

  --text-primary: #FCF4E9; --text-secondary: #BCCBD5; --text-tertiary: #9DB0BD; --text-muted: #8AA1B0;

  --accent-primary: #DE9429; --accent-primary-soft: rgba(222,148,41,.16);
  --color-green: #4FA07E; --color-green-soft: rgba(79,160,126,.14);
  --color-orange: #E07A33; --color-orange-soft: rgba(224,122,51,.14);
  --color-yellow: #E6A02D; --color-yellow-soft: rgba(230,160,45,.14);

  --gradient-card: linear-gradient(180deg, rgba(252,244,233,.05) 0, rgba(252,244,233,.02) 100%);
  --gradient-featured: linear-gradient(135deg, rgba(222,148,41,.12) 0, rgba(58,123,97,.10) 100%);
  --shadow-glow-blue: 0 0 40px rgba(222,148,41,.22);

  background: linear-gradient(180deg, #052F47 0, #042A40 50%, #032336 100%) fixed;
  color: var(--text-primary);
}
body[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #03283C 0, #021D2C 100%); border-right-color: rgba(252,244,233,.05); }
body[data-theme="dark"] .sidebar-footer { background: rgba(0,0,0,.18); }
body[data-theme="dark"] .header { background: rgba(5,47,71,.9); border-bottom-color: rgba(252,244,233,.06); }
body[data-theme="dark"] .toast,
body[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .select2-dropdown,
body[data-theme="dark"] .modal-container,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .tooltip { background: #0A4868; }
body[data-theme="dark"] select.form-input option,
body[data-theme="dark"] select.form-select option,
body[data-theme="dark"] .form-select option { background: #0A4868; color: #FCF4E9; }

/* Botao principal dourado com texto petroleo (contraste AA; branco sobre dourado reprova) */
body[data-theme="dark"] .btn-primary { background: #DE9429; border-color: #DE9429; color: #032336; }
body[data-theme="dark"] .btn-primary:hover { background: #EAAA4C; border-color: #EAAA4C; color: #032336; }
body[data-theme="dark"] .btn-primary.loading::after { border-color: rgba(3,35,54,.25); border-top-color: #032336; }

body[data-theme="dark"] .form-input:focus,
body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-textarea:focus,
body[data-theme="dark"] .form-select:focus { border-color: #DE9429; box-shadow: 0 0 0 4px rgba(222,148,41,.16); }
body[data-theme="dark"] .tab.active,
body[data-theme="dark"] .tab-item.active { background: rgba(222,148,41,.15); color: #EAAA4C; box-shadow: 0 0 0 1px rgba(222,148,41,.32); }
body[data-theme="dark"] .table tbody tr:hover td:first-child,
body[data-theme="dark"] .data-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #DE9429; }
body[data-theme="dark"] .select2-results__option--highlighted[aria-selected] { background: rgba(222,148,41,.18) !important; color: #EAAA4C !important; }
body[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }



/* ---- Gerado a partir do Elite: superficies fixas do dark levadas ao petroleo ---- */
/* Regenerar se o Elite mudar: as cores do dark sao trocadas pelas equivalentes da marca. */
body[data-theme="dark"],body[data-theme="dark"]{background:linear-gradient(180deg,#052F47 0,#063650 40%,#042A40 100%)}
body[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#03283C 0,#021D2C 100%)}
body[data-theme="dark"] .sidebar.collapsed .nav-link::after{background:#0A4868}
body[data-theme="dark"] .header{background:rgba(5,47,71,0.85)}
body[data-theme="dark"] .modal-container{background:#073B58}
body[data-theme="dark"] .toast{background:#0A4868}
body[data-theme="dark"] .dropdown-menu{background:#0A4868}
body[data-theme="dark"] .select2-dropdown{background:#0A4868}
body[data-theme="dark"] .topbar-dropdown{background:#0A4868}
body[data-theme="dark"] .topbar-dd-header{background:linear-gradient(135deg,color-mix(in srgb,var(--area-color) 12%,#0A4868),color-mix(in srgb,var(--area-color) 5%,#073B58))}
body[data-theme="dark"] .topbar-dropdown-inner{background:linear-gradient(180deg,#0A4868 0,#073B58 100%)}
body[data-theme="dark"] .topbar-col-dot{box-shadow:0 0 0 2px color-mix(in srgb,var(--area-color) 20%,#0A4868)}
body[data-theme="dark"] .topbar-link.active{background:color-mix(in srgb,var(--area-color) 12%,#073B58)}
body[data-theme="dark"] .topbar-user-dropdown{background:#0A4868}
body[data-theme="dark"] .topbar-search-panel{background:#073B58}
body[data-theme="dark"] .topbar-menu{background:#073B58}
body[data-theme="dark"] .filter-bar,body[data-theme="dark"] .filters-row{background:rgba(7,59,88,0.8)}
body[data-theme="dark"] .kanban-card{background:rgba(7,59,88,0.95)}
body[data-theme="dark"] .auth-container{background:linear-gradient(135deg,#052F47 0,#073B58 100%)}
body[data-theme="dark"] .auth-card{background:rgba(7,59,88,0.95)}
body[data-theme="dark"] .tooltip{background:#0A4868}
body[data-theme="dark"] select.form-input option,body[data-theme="dark"] select.form-select option{background:#0A4868}
body[data-theme="dark"] .notification-panel,body[data-theme="dark"] .notif-panel{background:#073B58}
body[data-theme="dark"] .status-card{background:rgba(7,59,88,0.9)}
body[data-theme="dark"] .form-select option{background:#0A4868}
body[data-theme="dark"] .filter-select option{background:#0A4868}
body[data-theme="dark"] .pipeline-card{background:rgba(7,59,88,0.95)}
body[data-theme="dark"] .dash-card-op{background:rgba(7,59,88,0.9) !important}
body[data-theme="dark"] .dash-module{background:rgba(7,59,88,0.9) !important}
body[data-theme="dark"] [style*="background:#fff"],body[data-theme="dark"] [style*="background: #fff"],body[data-theme="dark"] [style*="background: white"],body[data-theme="dark"] [style*="background:#ffffff"]{background:rgba(7,59,88,0.9) !important}
body[data-theme="dark"] .dropdown-menu,body[data-theme="dark"] .popover{background:rgba(6,54,80,0.95)}
body[data-theme="dark"] .modal-content{background:#063650}
body[data-theme="dark"] .select2-dropdown{background:#0C4E70}
body[data-theme="dark"],body[data-theme="dark"]{background:#052F47}
body[data-theme="dark"] .card,body[data-theme="dark"] .stat-card,body[data-theme="dark"] .kpi-card,body[data-theme="dark"] .kpi-compact,body[data-theme="dark"] .table-card,body[data-theme="dark"] .summary-card,body[data-theme="dark"] .profile-card,body[data-theme="dark"] .status-card,body[data-theme="dark"] .quick-action{background:#073B58}
body[data-theme="dark"] .card-header{background:#06344D}
body[data-theme="dark"] .card-footer{background:#06344D}
body[data-theme="dark"] .table th,body[data-theme="dark"] .data-table thead th{background:#06344D}
body[data-theme="dark"] .data-table tbody tr{background:#073B58}
body[data-theme="dark"] .stat-card.featured,body[data-theme="dark"] .stat-card.active{background:#073B58}

/* ------------------------------ SACRO (creme) ------------------------------ */
body[data-theme="elite-sacro"] {
  --noite: #003050; --noite-2: #0B4470; --noite-3: #155A8A;
  --creme: #FCF4E9; --creme-2: #F3E6D2;
  --ouro: #DE9429; --ouro-dark: #A86A12; --ouro-soft: rgba(222,148,41,.14);

  --color-primary: #003050; --color-primary-light: #0B4470; --color-primary-dark: #00233B;
  --color-secondary: #DE9429; --color-secondary-light: #EAAA4C; --color-secondary-dark: #A86A12;

  --bg-primary: #FCF4E9; --bg-secondary: #FFFFFF; --bg-tertiary: #F6ECDD;
  --bg-card: #FFFBF4; --bg-hover: rgba(222,148,41,.08); --bg-elevated: #FFFFFF;
  --border-subtle: rgba(168,106,18,.22); --border-default: rgba(0,48,80,.13);
  --border-hover: rgba(0,48,80,.2); --border-strong: rgba(0,48,80,.24);

  --text-primary: #0F2A40; --text-secondary: #33506A; --text-tertiary: #536C82; --text-muted: #6E8295;

  /* Texto de acao em azul: o dourado reprova AA como texto sobre creme */
  --accent-primary: #003050; --accent-primary-soft: rgba(0,48,80,.10);
  --color-green: #2F6E55; --color-green-soft: rgba(58,123,97,.13);
  --color-orange: #B04E0C; --color-orange-soft: rgba(196,87,14,.12);
  --color-yellow: #A86A12; --color-yellow-soft: rgba(222,148,41,.16);
  --color-blue: #0B4470; --color-blue-soft: rgba(0,48,80,.10);

  background: linear-gradient(180deg, #FDF7EE 0%, #FCF4E9 55%, #F6EBDA 100%) fixed !important;
}
body[data-theme="elite-sacro"] .header,
body[data-theme="elite-sacro"] .ny-topbar { border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, #C4570E, #DE9429 50%, #3A7B61) 1; }
body[data-theme="elite-sacro"] .stat-card.featured::after,
body[data-theme="elite-sacro"] .stat-card.active::after { background: linear-gradient(90deg, #C4570E, #DE9429 50%, #3A7B61); }
body[data-theme="elite-sacro"] .btn-primary { background: #003050; border-color: #003050; color: #FCF4E9; box-shadow: inset 0 -2px 0 rgba(222,148,41,.6); }
body[data-theme="elite-sacro"] .btn-primary:hover { background: #0B4470; border-color: #0B4470; color: #FCF4E9; }
body[data-theme="elite-sacro"] .btn-outline { color: #0B4470; border-color: rgba(0,48,80,.25); }
body[data-theme="elite-sacro"] .btn-outline:hover { background: rgba(0,48,80,.05); color: #003050; }
body[data-theme="elite-sacro"] .tab.active,
body[data-theme="elite-sacro"] .tab-item.active { color: #003050; box-shadow: 0 1px 3px rgba(0,48,80,.10), 0 0 0 1px rgba(222,148,41,.5); }
body[data-theme="elite-sacro"] .table tbody tr:hover td:first-child,
body[data-theme="elite-sacro"] .data-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #DE9429; }
body[data-theme="elite-sacro"] .form-input:focus,
body[data-theme="elite-sacro"] .form-control:focus,
body[data-theme="elite-sacro"] .form-textarea:focus,
body[data-theme="elite-sacro"] .form-select:focus { border-color: #0B4470; box-shadow: 0 0 0 3px rgba(0,48,80,.14), 0 0 0 1px #DE9429; }

/* ------------------------------ Seletor de tema ------------------------------ */
.ny-tema-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1px solid var(--border-default); background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 1.05rem;
  transition: background var(--transition-fast), color var(--transition-fast); }
.ny-tema-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
body[data-theme="dark"] .ny-tema-btn .ti-moon,
body[data-theme="elite-sacro"] .ny-tema-btn .ti-sun { display: none; }
