
.dark-toggle {
  position: fixed;
  bottom: 72px;
  right: 22px;
  z-index: 9999;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #444;
  border: 1px solid rgba(0,0,0,.13);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transition: background .2s, color .2s, box-shadow .2s, transform .18s;
}
.dark-toggle:hover { transform: scale(1.1); }
[data-theme="dark"] .dark-toggle {
  background: #21262d;
  color: #f5c842;
  border-color: #30363d;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
[data-theme="dark"] .dark-toggle:hover { background: #2d333b; }

/* ── Toggle Button — dentro da navbar ── */
.dark-toggle--nav {
  position: static;
  bottom: auto;
  right: auto;
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: rgba(255,255,255,.7);
  color: var(--text-2, #666);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: none;
  flex-shrink: 0;
}
.dark-toggle--nav:hover {
  transform: none;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}
[data-theme="dark"] .dark-toggle--nav {
  background: rgba(255,255,255,.07);
  color: #f5c842;
  border-color: #30363d;
  box-shadow: none;
}
[data-theme="dark"] .dark-toggle--nav:hover {
  background: rgba(255,255,255,.12);
}



[data-theme="dark"] {
  /* Override das variáveis globais */
  --black:          #e6edf3;
  --black-mid:      #c9d1d9;
  --yellow:         #f5c842;
  --yellow-dark:    #d4a800;
  --yellow-pale:    #271d00;
  --yellow-soft:    #21262d;
  --white:          #161b22;
  --cream:          #21262d;
  --cream-light:    #21262d;
  --cream-mid:      #2d333b;
  --cream-dark:     #161b22;
  --gray-200:       #30363d;
  --gray-400:       #484f58;
  --gray-light:     #21262d;
  --gray-mid:       #2d333b;
  --text-1:         #e6edf3;
  --text-2:         #8b949e;
  --text-3:         #484f58;
  --border:         #30363d;
  --border-cell:    #21262d;
  --sidebar-bg:     #161b22;
  --sidebar-border: #30363d;
  --dark:           #0d1117;
  --dark-card:      #161b22;

  --bg:      linear-gradient(135deg, #0d1117 0%, #0d1117 100%);
  --page-bg: linear-gradient(135deg, #0d1117 0%, #0d1117 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.6);
  --shadow-xl: 0 32px 80px rgba(0,0,0,.7), 0 8px 24px rgba(0,0,0,.5);

  color-scheme: dark;
}

/* Body base */
[data-theme="dark"] body {
  background: #0d1117;
  color: #e6edf3;
}

/* Calendário — fim de semana em dark mode */
[data-theme="dark"] .cal-cell.weekend {
  background: rgba(255, 255, 255, 0.025) !important;
}
[data-theme="dark"] .cal-cell.weekend:hover {
  background: rgba(255, 255, 255, 0.045) !important;
}


[data-theme="dark"] .card-right {
  background: #161b22;
}
[data-theme="dark"] .btn-microsoft {
  background: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}
[data-theme="dark"] .btn-microsoft:hover {
  background: #2d333b;
  border-color: #00a4ef;
}
[data-theme="dark"] .info-box {
  background: #1a1600;
  border-color: rgba(245,200,66,.2);
}
[data-theme="dark"] .info-box-icon { color: #f5c842; }
[data-theme="dark"] .info-box-text { color: #c8a800; }
[data-theme="dark"] .error-msg {
  background: #1a0a0a;
  border-color: #4a1a1a;
  color: #f87171;
}



/* Sidebar flutuante */
[data-theme="dark"] .icon-sidebar {
  background: rgba(22, 27, 34, 0.95);
  border-color: #30363d;
  box-shadow: 0 2px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03);
}
[data-theme="dark"] .icon-nav-btn {
  color: #8b949e;
}
[data-theme="dark"] .icon-nav-btn:hover {
  background: rgba(255,255,255,.05);
  color: #e6edf3;
}
[data-theme="dark"] .icon-nav-btn.active {
  background: #f5c842;
  color: #0d1117;
  box-shadow: 0 2px 10px rgba(245,200,66,.2);
}

/* Header topo */
[data-theme="dark"] .top-header {
  background: rgba(13,17,23,.95);
  border-color: #30363d;
}

/* Botões */
[data-theme="dark"] .btn-outline {
  background: #21262d;
  border-color: #30363d;
  color: #8b949e;
}
[data-theme="dark"] .btn-outline:hover { background: #2d333b; color: #e6edf3; }
[data-theme="dark"] .btn-icon {
  background: #21262d;
  border-color: #30363d;
  color: #8b949e;
}
[data-theme="dark"] .btn-icon:hover { background: #2d333b; }
[data-theme="dark"] .btn-list {
  background: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}
[data-theme="dark"] .btn-list:hover { background: #2d333b; }
[data-theme="dark"] .btn-delete:hover { background: #1a0a0a; border-color: #dc3545; }
[data-theme="dark"] .month-nav-btn {
  background: #21262d;
  border-color: #30363d;
  color: #8b949e;
}
[data-theme="dark"] .month-nav-btn:hover {
  background: #f5c842;
  color: #0d1117;
  border-color: #f5c842;
}

/* Status active */
[data-theme="dark"] .status-active {
  background: #122420;
  color: #3fb950;
}

[data-theme="dark"] .calendar-area {
  background: #161b22;
  border-color: #30363d;
}
[data-theme="dark"] .calendar-header-row {
  background: #0d1117;
  border-color: #30363d;
}
[data-theme="dark"] .cal-cell:hover         { background: #1c2128; }
[data-theme="dark"] .cal-cell.today         { background: #1a1600; }
[data-theme="dark"] .cal-cell.selected      { background: #1a1600; box-shadow: inset 0 0 0 2px #f5c842; }
[data-theme="dark"] .cal-cell--holiday      { background: #0e1520 !important; }
[data-theme="dark"] .cal-cell--holiday .cal-day-number { color: #58a6ff; }
[data-theme="dark"] .cal-feriado            { color: #79c0ff; background: #102030; border-left-color: #1f6feb; }

[data-theme="dark"] .cal-event.aprovado,
[data-theme="dark"] .cal-event.full-day     { background: #122420; color: #3fb950; border-left-color: #238636; }
[data-theme="dark"] .cal-event.pendente     { background: #1a1600; color: #f5c842; border-left-color: #f5c842; }
[data-theme="dark"] .cal-event.aniversario  { background: #180f00; color: #fbbf24; border-left-color: #f59e0b; }
[data-theme="dark"] .cal-colleagues         { background: #21262d; border-color: #30363d; color: #8b949e; }

/* Summary */
[data-theme="dark"] .summary-progress    { background: #21262d; }
[data-theme="dark"] .stat-item           { background: #161b22; border-color: #30363d; }

/* Quick panel */
[data-theme="dark"] .quick-panel         { background: #161b22; border-color: #30363d; }
[data-theme="dark"] .qp-stat-card        { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .qp-next-item        { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .qp-action-outline   { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .qp-action-outline:hover { background: #2d333b; }

/* Glass mobile menu */
[data-theme="dark"] .glass-overlay       { background: rgba(0,0,0,.65); }
[data-theme="dark"] .glass-menu          { background: rgba(13,17,23,.97); border-right-color: #30363d; }
[data-theme="dark"] .glass-close         { background: rgba(255,255,255,.05); color: #8b949e; }
[data-theme="dark"] .glass-close:hover   { background: rgba(255,255,255,.1); }
[data-theme="dark"] .glass-profile-section { background: rgba(255,255,255,.03); }
[data-theme="dark"] .glass-name,
[data-theme="dark"] .glass-dept,
[data-theme="dark"] .glass-profile-role  { color: #c9d1d9; }
[data-theme="dark"] .glass-saldo-row     { background: rgba(255,255,255,.04); }
[data-theme="dark"] .glass-saldo-num,
[data-theme="dark"] .glass-saldo-label,
[data-theme="dark"] .glass-saldo-detail-label,
[data-theme="dark"] .glass-saldo-detail-value { color: #c9d1d9; }
[data-theme="dark"] .glass-info-row      { border-bottom-color: #30363d; }
[data-theme="dark"] .glass-info-row-label,
[data-theme="dark"] .glass-info-row-value { color: #c9d1d9; }
[data-theme="dark"] .glass-nav-btn       { color: #8b949e; }
[data-theme="dark"] .glass-nav-btn:hover { background: rgba(255,255,255,.04); color: #e6edf3; }
[data-theme="dark"] .glass-nav-btn.active { background: #f5c842; color: #0d1117; }
[data-theme="dark"] .glass-next-item     { background: rgba(255,255,255,.03); border-color: #30363d; }
[data-theme="dark"] .glass-nav-logout    { color: #f85149; }
[data-theme="dark"] .glass-nav-logout:hover { background: rgba(248,81,73,.08); }
[data-theme="dark"] .glass-next          { border-top-color: #30363d; }

/* Mobile bottom nav */
[data-theme="dark"] .mobile-bottom-nav  { background: rgba(13,17,23,.97); border-top-color: #30363d; }
[data-theme="dark"] .mobile-nav-btn.active { background: rgba(255,255,255,.06); }

/* Modal (index) */
[data-theme="dark"] .modal             { background: #161b22; border-color: #30363d; }
[data-theme="dark"] .modal-close       { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .modal-close:hover { background: #f5c842; color: #0d1117; border-color: #f5c842; }
[data-theme="dark"] .form-select       { background: #0d1117; border-color: #30363d; color: #e6edf3; }
[data-theme="dark"] .form-select:focus { border-color: #f5c842; background: #0d1117; box-shadow: 0 0 0 3px rgba(245,200,66,.1); }
[data-theme="dark"] .selected-dates    { background: #21262d; border-color: #30363d; }

/* Status badges */
[data-theme="dark"] .status-badge.pending,
[data-theme="dark"] .status-badge.pendente   { background: #271d00; color: #f5c842; border-color: rgba(245,200,66,.25); }
[data-theme="dark"] .status-badge.approved,
[data-theme="dark"] .status-badge.aprovado   { background: #0d2f1a; color: #3fb950; border-color: rgba(63,185,80,.25); }
[data-theme="dark"] .status-badge.cancelled,
[data-theme="dark"] .status-badge.cancelado  { background: #21262d; color: #8b949e; border-color: #30363d; }
[data-theme="dark"] .status-badge.refused,
[data-theme="dark"] .status-badge.recusado   { background: #1a0a0a; color: #f85149; border-color: rgba(248,81,73,.25); }

/* List tabs */
[data-theme="dark"] .list-tab           { background: #21262d; border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .list-tab:hover     { background: #2d333b; color: #e6edf3; }

/* Vacation items */
[data-theme="dark"] .vacation-item      { background: #161b22; border-color: #30363d; }
[data-theme="dark"] .vacation-item:hover { background: #1c2128; border-color: #3d444d; }
[data-theme="dark"] .btn-cancel-vacation { background: #21262d; border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .btn-cancel-vacation:hover { background: #e6edf3; color: #0d1117; border-color: #e6edf3; }

/* Toast */
[data-theme="dark"] .toast              { background: #e6edf3; color: #0d1117; }
[data-theme="dark"] .toast.success      { background: #0d2f1a; color: #3fb950; }
[data-theme="dark"] .toast.error        { background: #1a0a0a; color: #f85149; }

/* ====================================================================
   ADMIN PAGE
   ==================================================================== */

/* Top nav */
[data-theme="dark"] .topnav {
  background: rgba(13,17,23,.97);
  border-bottom-color: #30363d;
}
[data-theme="dark"] .hamburger-btn {
  background: rgba(255,255,255,.05);
  border-color: #30363d;
  color: #8b949e;
}
[data-theme="dark"] .hamburger-btn:hover { background: rgba(255,255,255,.08); }
[data-theme="dark"] .brand-logo {
  background: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}
[data-theme="dark"] .nav-link           { color: #8b949e; }
[data-theme="dark"] .nav-link:hover     { color: #e6edf3; background: rgba(255,255,255,.05); }
[data-theme="dark"] .nav-link.active    { background: #f5c842; color: #0d1117; }

/* Mobile drawer */
[data-theme="dark"] .mobile-overlay.open { background: rgba(0,0,0,.65); }
[data-theme="dark"] .mobile-drawer {
  background: rgba(13,17,23,.98);
  border-right-color: #30363d;
}
[data-theme="dark"] .drawer-header      { border-bottom-color: #30363d; }
[data-theme="dark"] .drawer-logo        { color: #e6edf3; }
[data-theme="dark"] .drawer-close       { background: rgba(255,255,255,.05); border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .drawer-close:hover { background: rgba(255,255,255,.1); }
[data-theme="dark"] .drawer-nav-item    { color: #8b949e; }
[data-theme="dark"] .drawer-nav-item:hover  { background: rgba(255,255,255,.05); color: #e6edf3; }
[data-theme="dark"] .drawer-nav-item.active { background: #f5c842; color: #0d1117; }
[data-theme="dark"] .drawer-user        { border-top-color: #30363d; }

/* Icons / search / user */
[data-theme="dark"] .icon-btn           { background: rgba(255,255,255,.05); border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .icon-btn:hover     { background: rgba(255,255,255,.1); }
[data-theme="dark"] .notif-dot          { border-color: #0d1117; }
[data-theme="dark"] .search-wrap        { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .search-wrap:focus-within { background: #161b22; border-color: #f5c842; box-shadow: 0 0 0 2px rgba(245,200,66,.1); }
[data-theme="dark"] .search-input       { color: #e6edf3; }
[data-theme="dark"] .user-avatar        { background: #21262d; color: #e6edf3; border: 1px solid #30363d; }
[data-theme="dark"] .logout-btn         { background: rgba(255,255,255,.05); border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .logout-btn:hover   { background: #f5c842; color: #0d1117; border-color: #f5c842; }

/* Cards */
[data-theme="dark"] .card                { background: #161b22; border: 1px solid #30363d; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
[data-theme="dark"] .card:hover          { box-shadow: 0 4px 20px rgba(0,0,0,.4); }
[data-theme="dark"] .card-expand-btn     { background: #21262d; }
[data-theme="dark"] .card-expand-btn:hover { background: #f5c842; color: #0d1117; }

/* Time ring */
[data-theme="dark"] .time-ring-bg       { stroke: #21262d; }

/* Bar chart */
[data-theme="dark"] .bar-fill           { background: #21262d; }
[data-theme="dark"] .bar-fill--active   { background: #e6edf3; }

/* Info sections */
[data-theme="dark"] .info-section       { border-bottom-color: #30363d; }
[data-theme="dark"] .info-section-header:hover { background: rgba(255,255,255,.03); }

/* Filter tabs */
[data-theme="dark"] .filter-tab         { background: rgba(255,255,255,.05); border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .filter-tab:hover   { background: rgba(255,255,255,.08); color: #e6edf3; }
[data-theme="dark"] .filter-tab.active  { background: #f5c842; color: #0d1117; border-color: #f5c842; }

/* Requests list */
[data-theme="dark"] .requests-full-list { background: #161b22; border-color: #30363d; }
[data-theme="dark"] .req-card           { background: #161b22; border-bottom-color: #30363d; }
[data-theme="dark"] .req-card:hover     { background: #1c2128; }
[data-theme="dark"] .tag                { background: #21262d; color: #8b949e; }
[data-theme="dark"] .tag--type          { background: #30363d; color: #e6edf3; }
[data-theme="dark"] .btn-refuse,
[data-theme="dark"] .btn-detail         { background: #21262d; color: #8b949e; }
[data-theme="dark"] .btn-refuse:hover,
[data-theme="dark"] .btn-detail:hover   { background: #2d333b; color: #e6edf3; }

/* Status pills (admin) */
[data-theme="dark"] .status-pill--pending  { background: #271d00; color: #f5c842; }
[data-theme="dark"] .status-pill--approved { background: #f5c842; color: #0d1117; }
[data-theme="dark"] .status-pill--refused  { background: #21262d; color: #8b949e; }

/* Dashboard task rows (renderRecentListDark / dashRequestsList) */
[data-theme="dark"] .task-row          { border-bottom-color: rgba(255,255,255,.06) !important; }
[data-theme="dark"] .task-row:hover    { background: rgba(255,255,255,.03); }
[data-theme="dark"] .card .task-name   { color: rgba(255,255,255,.85); }
[data-theme="dark"] .card .task-time   { color: rgba(255,255,255,.4); }
/* Tipo badges inline (Férias, Baixa, Licença) — light bg override */
[data-theme="dark"] #dashRequestsList [style*="background:#f0f9ff"],
[data-theme="dark"] #dashRequestsList [style*="background:#fef2f2"],
[data-theme="dark"] #dashRequestsList [style*="background:#faf5ff"],
[data-theme="dark"] #dashRequestsList [style*="background:#f5f5f5"] {
  background: #21262d !important;
  color: #8b949e !important;
}
/* Accordion pending/today inline badges */
[data-theme="dark"] .info-section-body [style*="background:#fef9e7"],
[data-theme="dark"] .info-section-body [style*="background:#f5f0e0"],
[data-theme="dark"] .info-section-body [style*="background:#fef2f2"] {
  background: #21262d !important;
  color: #8b949e !important;
}
/* Accordion avatar icon-wrap (background:#fef9e7 for aniv) */
[data-theme="dark"] .info-section-body div[style*="background:#fef9e7"] {
  background: #21262d !important;
  color: #f5c842 !important;
}

/* Cal nav button */
[data-theme="dark"] .cal-nav-btn        { background: #21262d; border-color: #30363d; color: #8b949e; }
[data-theme="dark"] .cal-nav-btn:hover  { background: #f5c842; color: #0d1117; border-color: #f5c842; }

/* Admin calendar */
[data-theme="dark"] .calendar-wrap      { background: #161b22; }
[data-theme="dark"] .cal-header-row     { background: #0d1117; border-bottom-color: #30363d; }
[data-theme="dark"] .cal-cell           { border-right-color: #21262d; border-bottom-color: #21262d; }
[data-theme="dark"] .cal-cell:hover     { background: #1c2128; }
[data-theme="dark"] .cal-cell.today     { background: #1a1600; }
[data-theme="dark"] .cal-event--more    { background: rgba(255,255,255,.05); color: #484f58; }

/* Wmetric */
[data-theme="dark"] .wmetric-bar        { background: rgba(255,255,255,.07); }
[data-theme="dark"] .big-stat           { border-right-color: #30363d; }

/* Action modal */
[data-theme="dark"] .action-modal       { background: #161b22; border: 1px solid #30363d; }
[data-theme="dark"] .action-modal-header { border-bottom-color: #30363d; }
[data-theme="dark"] .action-modal-footer { border-top-color: #30363d; }
[data-theme="dark"] .modal-close-btn    { background: #21262d; color: #8b949e; }
[data-theme="dark"] .modal-close-btn:hover { background: #f5c842; color: #0d1117; }
[data-theme="dark"] .refuse-textarea    { background: #0d1117; border-color: #30363d; color: #e6edf3; }
[data-theme="dark"] .refuse-textarea:focus { border-color: #f5c842; background: #0d1117; }
[data-theme="dark"] .btn-modal-cancel   { background: #21262d; color: #8b949e; }
[data-theme="dark"] .btn-modal-cancel:hover { background: #2d333b; color: #e6edf3; }
[data-theme="dark"] .btn-modal-refuse   { background: #21262d; color: #8b949e; }
[data-theme="dark"] .btn-modal-refuse:hover { background: #f5c842; color: #0d1117; }

/* Toast (admin) */
[data-theme="dark"] .toast              { background: #e6edf3; color: #0d1117; }
[data-theme="dark"] .toast.success      { background: #0d2f1a; color: #3fb950; }
[data-theme="dark"] .toast.error        { background: #1a0a0a; color: #f85149; }

/* Inputs gerais */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #484f58; }

/* Scrollbars */
[data-theme="dark"] ::-webkit-scrollbar              { width: 6px; }
[data-theme="dark"] ::-webkit-scrollbar-track        { background: #0d1117; }
[data-theme="dark"] ::-webkit-scrollbar-thumb        { background: #30363d; border-radius: 3px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover  { background: #3d444d; }

/* Selection */
[data-theme="dark"] ::selection { background: rgba(245,200,66,.22); color: #e6edf3; }

/* ====================================================================
   CALENDAR FILTERS — selects com inline style background:#fff
   ==================================================================== */
[data-theme="dark"] #calFiltersBar select,
[data-theme="dark"] #calFiltersBar select:focus {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
[data-theme="dark"] #calFiltersBar button {
  background: #1a0a0a !important;
  border-color: #4a1a1a !important;
  color: #f87171 !important;
}

/* ====================================================================
   FERIADOS & TOLERÂNCIA — estilos injetados por admin.js
   ==================================================================== */
[data-theme="dark"] .feriado-col {
  background: #161b22 !important;
  border-color: #30363d !important;
}
[data-theme="dark"] .feriado-col-header {
  border-bottom-color: #30363d !important;
}
[data-theme="dark"] .feriado-col-title {
  color: #e6edf3 !important;
}
[data-theme="dark"] .feriado-item {
  background: #21262d !important;
  border-color: #30363d !important;
}
[data-theme="dark"] .feriado-item:hover {
  background: #2d333b !important;
  border-color: #3d444d !important;
}
[data-theme="dark"] .feriado-desc {
  color: #c9d1d9 !important;
}
[data-theme="dark"] .feriado-empty {
  color: #484f58 !important;
}
[data-theme="dark"] .feriado-empty-icon {
  background: #21262d !important;
  color: #484f58 !important;
}
[data-theme="dark"] .feriado-list::-webkit-scrollbar-thumb {
  background: #30363d !important;
}

/* ====================================================================
   CONFIGURAÇÕES — estilos injetados por admin.js
   ==================================================================== */
[data-theme="dark"] .cfg-tabs {
  border-bottom-color: #30363d !important;
}
[data-theme="dark"] .cfg-tab {
  color: #8b949e !important;
}
[data-theme="dark"] .cfg-tab:hover {
  color: #e6edf3 !important;
  background: rgba(255,255,255,.04) !important;
}
[data-theme="dark"] .cfg-tab.active {
  color: #e6edf3 !important;
  border-bottom-color: #e6edf3 !important;
}
[data-theme="dark"] .cfg-card {
  background: #161b22 !important;
  border-color: #30363d !important;
}
[data-theme="dark"] .cfg-card-head {
  border-bottom-color: #30363d !important;
}
[data-theme="dark"] .cfg-card-title {
  color: #e6edf3 !important;
}
[data-theme="dark"] .cfg-card-subtitle {
  color: #484f58 !important;
}
[data-theme="dark"] .cfg-stat-grid {
  background: #131b24 !important;
}
[data-theme="dark"] .cfg-stat-cell {
  background: #161b22 !important;
}
[data-theme="dark"] .cfg-stat-num {
  color: #e6edf3 !important;
}
[data-theme="dark"] .cfg-stat-lbl {
  color: #484f58 !important;
}
[data-theme="dark"] .cfg-row {
  border-bottom-color: rgba(255,255,255,.05) !important;
}
[data-theme="dark"] .cfg-row-val {
  color: #e6edf3 !important;
}
[data-theme="dark"] .cfg-row-key {
  color: #8b949e !important;
}
[data-theme="dark"] .cfg-param {
  border-bottom-color: rgba(255,255,255,.05) !important;
}
[data-theme="dark"] .cfg-param-lbl {
  color: #e6edf3 !important;
}
[data-theme="dark"] .cfg-param-sub {
  color: #484f58 !important;
}
[data-theme="dark"] .cfg-param-unit {
  color: #484f58 !important;
}
[data-theme="dark"] .cfg-param-inp {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
[data-theme="dark"] .cfg-param-inp:focus {
  border-color: #f5c842 !important;
  background: #0d1117 !important;
}
[data-theme="dark"] .cfg-progress-bar {
  background: #21262d !important;
}
[data-theme="dark"] .cfg-toggle-track {
  background: #30363d !important;
}
[data-theme="dark"] .cfg-alert--err {
  background: #1a0a0a !important;
  border-color: #4a1a1a !important;
  color: #f87171 !important;
}
[data-theme="dark"] .cfg-alert--ok {
  background: #0d2f1a !important;
  border-color: #1a4d2a !important;
  color: #3fb950 !important;
}
[data-theme="dark"] .cfg-danger {
  border-bottom-color: rgba(255,255,255,.05) !important;
}
[data-theme="dark"] .cfg-member {
  border-bottom-color: rgba(255,255,255,.04) !important;
}
[data-theme="dark"] .cfg-save {
  background: #e6edf3 !important;
  color: #0d1117 !important;
}
[data-theme="dark"] .cfg-save:hover {
  background: #c9d1d9 !important;
}

/* ====================================================================
   NOTIFICATIONS PANEL — estilos injetados por notifications.js
   ==================================================================== */
[data-theme="dark"] #nfInner {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 2px 10px rgba(0,0,0,.3) !important;
}
[data-theme="dark"] #nfHeader {
  border-bottom-color: #30363d !important;
}
[data-theme="dark"] #nfHeader span[style*="color:#111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] .nf-hbtn {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}
[data-theme="dark"] .nf-hbtn:hover {
  background: #2d333b !important;
  color: #e6edf3 !important;
}
[data-theme="dark"] #nfTabs {
  border-bottom-color: #30363d !important;
}
[data-theme="dark"] .nf-tab {
  color: #8b949e !important;
}
[data-theme="dark"] .nf-tab:hover {
  background: #21262d !important;
  color: #e6edf3 !important;
}
[data-theme="dark"] .nf-tab.active {
  background: #f5c842 !important;
  color: #0d1117 !important;
}
[data-theme="dark"] .nf-item {
  border-bottom-color: rgba(255,255,255,.04) !important;
}
[data-theme="dark"] .nf-item--click:hover {
  background: #1c2128 !important;
}
[data-theme="dark"] .nf-item-title {
  color: #e6edf3 !important;
}
[data-theme="dark"] .nf-item--read .nf-item-title {
  color: #484f58 !important;
}
[data-theme="dark"] .nf-item-desc {
  color: #8b949e !important;
}
[data-theme="dark"] .nf-item--read .nf-item-desc {
  color: #484f58 !important;
}
[data-theme="dark"] .nf-item-time {
  color: #484f58 !important;
}
[data-theme="dark"] .nf-empty-ico {
  background: #21262d !important;
  color: #484f58 !important;
}
[data-theme="dark"] .nf-loading {
  color: #484f58 !important;
}
[data-theme="dark"] #nfFooter {
  border-top-color: #30363d !important;
}
[data-theme="dark"] #nfGoPending {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #nfGoPending:hover {
  background: #f5c842 !important;
  color: #0d1117 !important;
  border-color: #f5c842 !important;
}

/* ====================================================================
   MODAL FÉRIAS (inline styles em admin.js) — override com !important
   ==================================================================== */
/* O modal usa divs com inline style="background:#fff" etc.
   Selecionamos pelo ID do overlay e descendentes diretos */
[data-theme="dark"] #mfrOverlay > div,
[data-theme="dark"] #minhasFeriasOverlay > div {
  background: #161b22 !important;
  border-color: #30363d !important;
}
[data-theme="dark"] #mfrOverlay [style*="background:#f8f8f6"],
[data-theme="dark"] #mfrOverlay [style*="background:#fff"],
[data-theme="dark"] #mfrOverlay [style*="background: #fff"],
[data-theme="dark"] #mfrOverlay [style*="background:#fafafa"],
[data-theme="dark"] #mfrOverlay [style*="background:#f9f9f9"] {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
[data-theme="dark"] #mfrOverlay [style*="border:1px solid #ebebeb"],
[data-theme="dark"] #mfrOverlay [style*="border-bottom:1px solid"] {
  border-color: #30363d !important;
}
/* Inputs dentro do modal */
[data-theme="dark"] #mfrTipo,
[data-theme="dark"] #mfrInicio,
[data-theme="dark"] #mfrFim,
[data-theme="dark"] #mfrPeriodo,
[data-theme="dark"] #mfrNota {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
/* Preview de dias */
[data-theme="dark"] #mfrDiasPreview {
  background: #0d2f1a !important;
  border-color: #1a4d2a !important;
  color: #3fb950 !important;
}

/* ── #minhasFeriasRequestModal — backgrounds em falta ── */
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#fff"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#fafafa"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#f0f0f0"] {
  background: #21262d !important;
  border-color: #30363d !important;
}
/* Status badges do histórico: Pendente/Aprovado/Recusado/Cancelado */
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#fffbeb"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#f0fdf4"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#fef2f2"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#f5f5f5"] {
  background: #21262d !important;
  color: #8b949e !important;
  border-color: #30363d !important;
}
[data-theme="dark"] #minhasFeriasRequestModal [style*="color:#555"] {
  color: #8b949e !important;
}
[data-theme="dark"] #minhasFeriasRequestModal [style*="color:#aaa"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="color:#bbb"] {
  color: #484f58 !important;
}
/* Inputs/selects */
[data-theme="dark"] #minhasFeriasRequestModal input,
[data-theme="dark"] #minhasFeriasRequestModal select,
[data-theme="dark"] #minhasFeriasRequestModal textarea {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
/* Preview de dias do mfr */
[data-theme="dark"] #minhasFeriasRequestModal #mfrDiasPreview {
  background: #0d2f1a !important;
  border-color: #1a4d2a !important;
  color: #3fb950 !important;
}

/* ── Tolerance banner (#toleranciaBanner) ── */
[data-theme="dark"] #toleranciaBanner [style*="background:#fff"] {
  background: #21262d !important;
  border-color: #30363d !important;
}
[data-theme="dark"] #toleranciaBanner [style*="color:#111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #toleranciaBanner [style*="color:#6b7280"],
[data-theme="dark"] #toleranciaBanner [style*="color:#92400e"] {
  color: #8b949e !important;
}
[data-theme="dark"] #toleranciaBanner [style*="background:#fef3c7"] {
  background: #271d00 !important;
  color: #f5c842 !important;
  border-color: #3d2a00 !important;
}
[data-theme="dark"] #toleranciaBanner button[style*="background:#111"] {
  background: #f5c842 !important;
  color: #0d1117 !important;
}

/* Modal foto de perfil — ID correto: adminPhotoModal */
[data-theme="dark"] #adminPhotoModal [style*="background:#f5f5f5"] {
  background: #21262d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #adminPhotoModal [style*="background:#f9f9f9"] {
  background: #21262d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #adminPhotoModal [style*="background:#fef2f2"] {
  background: #1a0a0a !important;
  border-color: #4a1a1a !important;
}
[data-theme="dark"] #adminPhotoModal [style*="color:#111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #adminPhotoModal [style*="color:#999"] {
  color: #484f58 !important;
}

/* ====================================================================
   MODAIS COM INLINE STYLES — override universal por ID
   Todos estes modais usam: container > div { background:#fff }
   ==================================================================== */

/* Helper: qualquer overlay gerado dinamicamente com background:#fff */
[data-theme="dark"] #transicaoModal > div,
[data-theme="dark"] #detalhesFaltasModal > div,
[data-theme="dark"] #addFaltaModal > div,
[data-theme="dark"] #addFeriadoModal > div,
[data-theme="dark"] #gerirDeptsModal > div,
[data-theme="dark"] #confirmModal > div,
[data-theme="dark"] #minhasFeriasRequestModal > div,
[data-theme="dark"] #adminPhotoModal > div,
[data-theme="dark"] #addFeriadoNacModal > div,
[data-theme="dark"] #addFeriadoMunModal > div {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.6) !important;
  color: #e6edf3 !important;
}

/* Override universal: botões dentro dos modais dinâmicos com onmouseout:#fff */
[data-theme="dark"] #addFaltaModal button[style*="background:#f5f5f5"],
[data-theme="dark"] #addFaltaModal button[style*="background:#f9f9f9"],
[data-theme="dark"] #adminPhotoModal button[style*="background:#f5f5f5"],
[data-theme="dark"] #adminPhotoModal button[style*="background:#f9f9f9"],
[data-theme="dark"] #addFeriadoModal button[style*="background:#f5f5f5"],
[data-theme="dark"] #addFeriadoModal button[style*="background:#f9f9f9"],
[data-theme="dark"] #gerirDeptsModal button[style*="background:#f5f5f5"],
[data-theme="dark"] #gerirDeptsModal button[style*="background:#f9f9f9"] {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}

/* Cabeçalhos com background:#f8f8f6 ou #f9f9f7 dentro dos modais */
[data-theme="dark"] #gerirDeptsModal [style*="background:#f8f8f6"],
[data-theme="dark"] #gerirDeptsModal [style*="background:#f8f8f"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#f8f8f6"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="background:#f8f8f"],
[data-theme="dark"] #detalhesFaltasModal [style*="background:#f8f8f6"] {
  background: #21262d !important;
  border-color: #30363d !important;
}

/* Bordas internas dos modais */
[data-theme="dark"] #gerirDeptsModal [style*="border-bottom:1px solid #ebebeb"],
[data-theme="dark"] #gerirDeptsModal [style*="border-bottom: 1px solid #ebebeb"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="border-bottom:1px solid #ebebeb"],
[data-theme="dark"] #detalhesFaltasModal [style*="border-bottom:1px solid"] {
  border-bottom-color: #30363d !important;
}

/* Bordas border:1px solid #f0f0f0 nos stat cells */
[data-theme="dark"] #minhasFeriasRequestModal [style*="border:1px solid #f0f0f0"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="border:1px solid #ebebeb"] {
  border-color: #30363d !important;
}

/* Textos escuros dentro dos modais dinâmicos */
[data-theme="dark"] #transicaoModal [style*="color:#111"],
[data-theme="dark"] #transicaoModal [style*="color: #111"],
[data-theme="dark"] #detalhesFaltasModal [style*="color:#111"],
[data-theme="dark"] #detalhesFaltasModal [style*="color:#333"],
[data-theme="dark"] #addFaltaModal [style*="color:#111"],
[data-theme="dark"] #addFeriadoModal [style*="color:#111"],
[data-theme="dark"] #gerirDeptsModal [style*="color:#111"],
[data-theme="dark"] #gerirDeptsModal [style*="color:#333"],
[data-theme="dark"] #confirmModal [style*="color:#111"],
[data-theme="dark"] #confirmModal [style*="color:#333"],
[data-theme="dark"] #minhasFeriasRequestModal [style*="color:#111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #transicaoModal [style*="color:#666"],
[data-theme="dark"] #transicaoModal [style*="color:#888"],
[data-theme="dark"] #transicaoModal [style*="color:#999"],
[data-theme="dark"] #detalhesFaltasModal [style*="color:#666"],
[data-theme="dark"] #detalhesFaltasModal [style*="color:#888"],
[data-theme="dark"] #addFaltaModal [style*="color:#666"],
[data-theme="dark"] #gerirDeptsModal [style*="color:#666"],
[data-theme="dark"] #gerirDeptsModal [style*="color:#888"],
[data-theme="dark"] #gerirDeptsModal [style*="color:#999"],
[data-theme="dark"] #confirmModal [style*="color:#666"] {
  color: #8b949e !important;
}

/* Inputs dentro dos modais dinâmicos */
[data-theme="dark"] #transicaoModal input,
[data-theme="dark"] #transicaoModal select,
[data-theme="dark"] #transicaoModal textarea,
[data-theme="dark"] #detalhesFaltasModal input,
[data-theme="dark"] #detalhesFaltasModal select,
[data-theme="dark"] #addFaltaModal input,
[data-theme="dark"] #addFaltaModal select,
[data-theme="dark"] #addFeriadoModal input,
[data-theme="dark"] #addFeriadoModal select,
[data-theme="dark"] #addFeriadoModal textarea,
[data-theme="dark"] #gerirDeptsModal input,
[data-theme="dark"] #gerirDeptsModal select,
[data-theme="dark"] #minhasFeriasRequestModal input,
[data-theme="dark"] #minhasFeriasRequestModal select,
[data-theme="dark"] #minhasFeriasRequestModal textarea {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}

/* Linhas separadoras dentro dos modais */
[data-theme="dark"] #detalhesFaltasModal [style*="border-bottom"],
[data-theme="dark"] #gerirDeptsModal [style*="border-bottom"],
[data-theme="dark"] #gerirDeptsModal [style*="border:1.5px solid rgba(0,0,0"] {
  border-color: #30363d !important;
}

/* Itens de lista dentro dos modais (ex: departamentos existentes) */
[data-theme="dark"] #gerirDeptsModal [style*="background:#f0f7ff"],
[data-theme="dark"] #gerirDeptsModal [style*="background:#f5f5f5"],
[data-theme="dark"] #gerirDeptsModal [style*="background:#fafafa"] {
  background: #21262d !important;
  border-color: #30363d !important;
}

/* ── Month Picker dropdown (calendário) ── */
[data-theme="dark"] #adminMonthPickerOverlay > div {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.5) !important;
  color: #e6edf3 !important;
}
/* Botões de mês dentro do picker */
[data-theme="dark"] #adminMonthPickerOverlay button {
  color: #8b949e !important;
}
[data-theme="dark"] #adminMonthPickerOverlay button:hover {
  background: #21262d !important;
  color: #e6edf3 !important;
}
/* Mês activo (black bg) */
[data-theme="dark"] #adminMonthPickerOverlay button[style*="background:#111"],
[data-theme="dark"] #adminMonthPickerOverlay button[style*="background: #111"] {
  background: #f5c842 !important;
  color: #0d1117 !important;
}
/* Ano */
[data-theme="dark"] #adminMonthPickerOverlay [style*="color:#111"] {
  color: #e6edf3 !important;
}

/* ── Bot Chat Window ── */
[data-theme="dark"] #botChatWindow {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 16px 60px rgba(0,0,0,.6) !important;
}
/* Área de mensagens */
[data-theme="dark"] #botChatWindow [style*="background:#f8f8f6"],
[data-theme="dark"] #botChatWindow [style*="background:#fafafa"],
[data-theme="dark"] #botChatWindow [style*="background:#fff"] {
  background: #21262d !important;
  border-color: #30363d !important;
}
/* Input do chat */
[data-theme="dark"] #botChatWindow input {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
/* Textos dentro do bot */
[data-theme="dark"] #botChatWindow [style*="color:#111"],
[data-theme="dark"] #botChatWindow [style*="color:#333"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #botChatWindow [style*="color:#666"],
[data-theme="dark"] #botChatWindow [style*="color:#888"],
[data-theme="dark"] #botChatWindow [style*="color:#999"] {
  color: #8b949e !important;
}
/* Quick action chips do bot */
[data-theme="dark"] #botChatWindow [style*="background:#f5f5f5"],
[data-theme="dark"] #botChatWindow [style*="border:1px solid rgba(0,0,0"] {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #c9d1d9 !important;
}
/* Separadores */
[data-theme="dark"] #botChatWindow [style*="border-top"],
[data-theme="dark"] #botChatWindow [style*="border-bottom"] {
  border-color: #30363d !important;
}

/* ── Search Dropdown ── */
[data-theme="dark"] #searchDropdown {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.5) !important;
}
[data-theme="dark"] #searchDropdown [style*="color:#111"],
[data-theme="dark"] #searchDropdown [style*="color:#333"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #searchDropdown [style*="color:#666"],
[data-theme="dark"] #searchDropdown [style*="color:#888"],
[data-theme="dark"] #searchDropdown [style*="color:#999"] {
  color: #8b949e !important;
}
[data-theme="dark"] #searchDropdown [style*="background:#fff"],
[data-theme="dark"] #searchDropdown [style*="background:#fafafa"] {
  background: #161b22 !important;
}
[data-theme="dark"] #searchDropdown [style*="background:#f5f5f5"] {
  background: #21262d !important;
}
[data-theme="dark"] #searchDropdown [style*="border-bottom"] {
  border-bottom-color: #30363d !important;
}
/* Hover nos items do search */
[data-theme="dark"] #searchDropdown > div:hover {
  background: #1c2128 !important;
}
/* Classes injetadas via <style> tag no dropdown */
[data-theme="dark"] .sr-item:hover { background: #1c2128 !important; }
[data-theme="dark"] .sr-name       { color: #e6edf3 !important; }
[data-theme="dark"] .sr-sub        { color: #484f58 !important; }
/* Labels de secção (HISTÓRICO, FUNCIONÁRIOS) */
[data-theme="dark"] #searchDropdown [style*="font-size:10px"],
[data-theme="dark"] #searchDropdown [style*="font-size:11px"] {
  color: #484f58 !important;
}
/* mark (highlight de pesquisa) */
[data-theme="dark"] .sr-item mark {
  background: rgba(245,200,66,.25) !important;
  color: #e6edf3 !important;
  border-radius: 2px;
}

/* ── Botões close/cancel nos modais dinâmicos ── */
[data-theme="dark"] #addFaltaModal [style*="background:#f5f5f5"],
[data-theme="dark"] #addFeriadoModal [style*="background:#f5f5f5"],
[data-theme="dark"] #gerirDeptsModal [style*="background:#f5f5f5"],
[data-theme="dark"] #confirmModal [style*="background:#f5f5f5"],
[data-theme="dark"] #transicaoModal [style*="background:#f5f5f5"],
[data-theme="dark"] #detalhesFaltasModal [style*="background:#f5f5f5"] {
  background: #21262d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #addFaltaModal [style*="background:#f9f9f9"],
[data-theme="dark"] #addFeriadoModal [style*="background:#f9f9f9"],
[data-theme="dark"] #gerirDeptsModal [style*="background:#f9f9f9"],
[data-theme="dark"] #confirmModal [style*="background:#f9f9f9"],
[data-theme="dark"] #transicaoModal [style*="background:#f9f9f9"],
[data-theme="dark"] #detalhesFaltasModal [style*="background:#f9f9f9"] {
  background: #21262d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #addFaltaModal [style*="color:#555"],
[data-theme="dark"] #addFeriadoModal [style*="color:#555"],
[data-theme="dark"] #gerirDeptsModal [style*="color:#555"],
[data-theme="dark"] #confirmModal [style*="color:#555"] {
  color: #8b949e !important;
}

/* ── Distribuição de Pedidos — stat strip ── */
[data-theme="dark"] [style*="background:#fff"][style*="border-radius"] {
  background: #161b22 !important;
  border-color: #30363d !important;
}
/* Mais genérico para stat cells dentro de cards escuros */
[data-theme="dark"] .card [style*="background:#fff"],
[data-theme="dark"] .card [style*="background: #fff"],
[data-theme="dark"] .card [style*="background:#fafafa"],
[data-theme="dark"] .card [style*="background:#f9f9f9"],
[data-theme="dark"] .card [style*="background:#f8f8f6"] {
  background: #1c2128 !important;
  border-color: #30363d !important;
}
[data-theme="dark"] .card [style*="border-right:1px solid rgba(0,0,0"],
[data-theme="dark"] .card [style*="border-right: 1px solid rgba(0,0,0"] {
  border-right-color: #30363d !important;
}
[data-theme="dark"] .card [style*="color:#111"],
[data-theme="dark"] .card [style*="color: #111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] .card [style*="color:#666"],
[data-theme="dark"] .card [style*="color:#888"],
[data-theme="dark"] .card [style*="color:#999"] {
  color: #8b949e !important;
}

/* ── cfg-card-body stat strip (Distribuição de Pedidos) ── */
[data-theme="dark"] .cfg-card-body [style*="background:#fafafa"] {
  background: #1c2128 !important;
}
[data-theme="dark"] .cfg-card-body [style*="background:#fff"] {
  background: #1c2128 !important;
}
[data-theme="dark"] .cfg-card-body [style*="color:#aaa"] {
  color: #484f58 !important;
}
[data-theme="dark"] .cfg-card-body [style*="background:rgba(0,0,0,.06)"] {
  background: #30363d !important;
}

/* ── Config toggles: OFF=dark, ON=white ── */
[data-theme="dark"] .cfg-toggle input:checked ~ .cfg-toggle-track {
  background: #ffffff !important;
}
[data-theme="dark"] .cfg-toggle input:checked ~ .cfg-toggle-thumb {
  background: #161b22 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.5) !important;
}

/* ── Search input — transparente para não duplicar fundo ── */
[data-theme="dark"] .search-wrap .search-input,
[data-theme="dark"] .search-wrap input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

/* ── Edit employee modal — inputs com inline background:#f9f9f9 / #f5f5f5 ── */
[data-theme="dark"] #editEmpOverlay [style*="background:#f9f9f9"],
[data-theme="dark"] #editEmpOverlay [style*="background:#f5f5f5"] {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
[data-theme="dark"] #editEmpOverlay [style*="color:#999"],
[data-theme="dark"] #editEmpOverlay [style*="color:#aaa"] {
  color: #484f58 !important;
}
[data-theme="dark"] #editEmpOverlay [style*="background:rgba(0,0,0,.07)"] {
  background: #30363d !important;
}

/* ── Membros lista (cfg-member) — nomes inline color:#111 ── */
[data-theme="dark"] .cfg-member [style*="color:#111"] {
  color: #e6edf3 !important;
}
/* Badge "Ativo" em fundo claro verde/vermelho */
[data-theme="dark"] .cfg-member [style*="background:#f0fdf4"] {
  background: #0d2f1a !important;
  border-color: #1a4d2a !important;
}
/* Rodapé "+X mais · Ver todos" */
[data-theme="dark"] .cfg-card-body [style*="color:#bbb"] {
  color: #484f58 !important;
}
[data-theme="dark"] .cfg-card-body [style*="color:#111"][style*="cursor:pointer"] {
  color: #c9d1d9 !important;
}

/* ====================================================================
   INDEX PAGE — forçar overrides com !important nos elementos #fcfcfc
   ==================================================================== */
[data-theme="dark"] .stat-item           { background: #161b22 !important; border-color: #30363d !important; }
[data-theme="dark"] .qp-stat-card        { background: #21262d !important; border-color: #30363d !important; }
[data-theme="dark"] .qp-action-outline   { background: #21262d !important; border-color: #30363d !important; }
[data-theme="dark"] .qp-next-item        { background: #21262d !important; border-color: #30363d !important; }
[data-theme="dark"] .btn-list            { background: #21262d !important; border-color: #30363d !important; color: #e6edf3 !important; }
[data-theme="dark"] .btn-list:hover      { background: #2d333b !important; }
[data-theme="dark"] .summary-progress    { background: #21262d !important; }
[data-theme="dark"] .month-nav-btn       { background: #21262d !important; border-color: #30363d !important; color: #8b949e !important; }

/* Números inline color:#111111 no quick panel e glass menu */
[data-theme="dark"] .quick-panel [style*="color:#111"],
[data-theme="dark"] .quick-panel [style*="color:#111111"] { color: #e6edf3 !important; }
[data-theme="dark"] .glass-menu [style*="color:#111"],
[data-theme="dark"] .glass-menu [style*="color:#111111"]  { color: #e6edf3 !important; }
[data-theme="dark"] .glass-saldo-num,
[data-theme="dark"] .glass-saldo-label,
[data-theme="dark"] .glass-saldo-detail-label,
[data-theme="dark"] .glass-saldo-detail-value { color: #c9d1d9 !important; }

/* ── Month Picker (index) — #monthPickerOverlay ── */
[data-theme="dark"] #monthPickerOverlay > div {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.5) !important;
}
[data-theme="dark"] #monthPickerOverlay [style*="background:#f9f9f9"],
[data-theme="dark"] #monthPickerOverlay [style*="background:#f5f5f5"] {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #monthPickerOverlay [style*="background:#111"] {
  background: #f5c842 !important;
  color: #0d1117 !important;
}
[data-theme="dark"] #monthPickerOverlay [style*="color:#333"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #monthPickerOverlay input[type="number"] {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}

/* ── "Escolha a sua opção" modal (tolerância) — #escolhaToleranciaModal ── */
[data-theme="dark"] #escolhaToleranciaModal > div {
  background: #161b22 !important;
  border-color: #30363d !important;
}
/* Botões e elementos com background fixo */
[data-theme="dark"] #escolhaToleranciaModal button,
[data-theme="dark"] #escolhaToleranciaModal [style*="background:#fff"],
[data-theme="dark"] #escolhaToleranciaModal [style*="background:#fafafa"] {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}
/* Botão "Confirmar" (background:#111) — manter escuro */
[data-theme="dark"] #escolhaToleranciaModal button[style*="background:#111"] {
  background: #e6edf3 !important;
  color: #0d1117 !important;
}
/* Radio option labels — override JS onmouseover/onmouseout inline styles */
[data-theme="dark"] #escolhaToleranciaModal label {
  background: #21262d !important;
  border-color: #30363d !important;
}
[data-theme="dark"] #escolhaToleranciaModal label:hover {
  background: #2d333b !important;
  border-color: #8b949e !important;
}
/* Texto das opções */
[data-theme="dark"] #escolhaToleranciaModal label span,
[data-theme="dark"] #escolhaToleranciaModal [style*="color:#111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #escolhaToleranciaModal [style*="color:#6b7280"],
[data-theme="dark"] #escolhaToleranciaModal [style*="color:#555"] {
  color: #8b949e !important;
}
[data-theme="dark"] #escolhaToleranciaModal [style*="border-bottom:1px solid #f0f0f0"],
[data-theme="dark"] #escolhaToleranciaModal [style*="border-top:1px solid #f0f0f0"] {
  border-color: #30363d !important;
}

/* ── Perfil modal (index) — #anivModalOverlay ── */
[data-theme="dark"] #anivModalOverlay > div {
  background: #161b22 !important;
  border-color: #30363d !important;
}
[data-theme="dark"] #anivModalOverlay [style*="background:#f8f8f6"],
[data-theme="dark"] #anivModalOverlay [style*="background:#F8F8F6"],
[data-theme="dark"] #anivModalOverlay [style*="background:#f8f8f8"],
[data-theme="dark"] #anivModalOverlay [style*="background:#fff"],
[data-theme="dark"] #anivModalOverlay [style*="background:#f9f9f9"],
[data-theme="dark"] #anivModalOverlay [style*="background:#f0f0f0"] {
  background: #21262d !important;
  border-color: #30363d !important;
}
/* Override JS onmouseout que restaura background:#fff nos botões */
[data-theme="dark"] #anivModalOverlay button {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #8b949e !important;
}
[data-theme="dark"] #anivModalOverlay button:hover {
  background: #2d333b !important;
  border-color: #8b949e !important;
  color: #e6edf3 !important;
}
/* Botão submit (background:#111) */
[data-theme="dark"] #anivModalOverlay button[style*="background:#111"] {
  background: #e6edf3 !important;
  color: #0d1117 !important;
}
[data-theme="dark"] #anivModalOverlay button[style*="background:#111"]:hover {
  background: #c9d1d9 !important;
}
[data-theme="dark"] #anivModalOverlay [style*="background:#fff0f0"] {
  background: #1a0a0a !important;
  border-color: #4a1a1a !important;
}
[data-theme="dark"] #anivModalOverlay [style*="color:#111"],
[data-theme="dark"] #anivModalOverlay [style*="color:#111111"] {
  color: #e6edf3 !important;
}
[data-theme="dark"] #anivModalOverlay [style*="color:#888"],
[data-theme="dark"] #anivModalOverlay [style*="color:#bbb"],
[data-theme="dark"] #anivModalOverlay [style*="color:#aaa"],
[data-theme="dark"] #anivModalOverlay [style*="color:#4D4D4D"],
[data-theme="dark"] #anivModalOverlay [style*="color:#6b7280"] {
  color: #8b949e !important;
}
[data-theme="dark"] #anivModalOverlay [style*="border-bottom:1px solid #f0f0f0"],
[data-theme="dark"] #anivModalOverlay [style*="border-bottom:1px solid #ebebeb"],
[data-theme="dark"] #anivModalOverlay [style*="border:1px solid #ebebeb"] {
  border-color: #30363d !important;
}
[data-theme="dark"] #anivModalOverlay input[type="date"],
[data-theme="dark"] #anivModalOverlay input[type="text"] {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
/* Secções de pedido dentro do modal de perfil */
[data-theme="dark"] #anivModalOverlay [style*="border:1px solid"] {
  border-color: #30363d !important;
}
/* border:1px solid #f0f0f0 nos stat cells do saldo */
[data-theme="dark"] #anivModalOverlay [style*="border:1px solid #f0f0f0"] {
  border-color: #30363d !important;
}

/* ── Seletores estruturais (fallback para normalização do browser) ── */
/* Stat cells do saldo (header > saldo div > grid > each cell) */
[data-theme="dark"] #anivModalOverlay > div > div:first-child > div:last-child > div:last-child > div {
  background: #21262d !important;
  border-color: #30363d !important;
}
/* Card "DIA ATRIBUÍDO" (body > aniversário section > 2nd child) */
[data-theme="dark"] #anivModalOverlay > div > div:last-child > div:first-child > div:nth-child(2) {
  background: #21262d !important;
  border-color: #30363d !important;
}
/* Form alterar aniversário — direto pelo ID */
[data-theme="dark"] #pmAnivForm {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
/* Stat cells de minhasFeriasRequestModal (fallback estrutural) */
[data-theme="dark"] #minhasFeriasRequestModal > div > div:first-child > div:last-child > div:last-child > div {
  background: #21262d !important;
  border-color: #30363d !important;
}

/* ── Bot chat window (index) — sobrepõe background:#fff inline ── */
[data-theme="dark"] #botChatWindow { background: #161b22 !important; border-color: #30363d !important; }
[data-theme="dark"] #botChatWindow [style*="background:#fff"] { background: #21262d !important; }

/* ── Dashboard: wmetric fills ── */
[data-theme="dark"] .wmetric-fill--dark    { background: #e6edf3 !important; color: #0d1117 !important; }
[data-theme="dark"] .wmetric-fill--gray    { background: rgba(255,255,255,.12) !important; color: #8b949e !important; }

/* ── Dashboard: onboarding bars (Aprovados / Pend. / Rec.) ── */
[data-theme="dark"] .ob-bar--dark  { background: #e6edf3 !important; color: #0d1117 !important; }
[data-theme="dark"] .ob-bar--gray  { background: #30363d !important; color: #8b949e !important; }

/* ── Configurações: header "Ferramentas de Sistema" ── */
[data-theme="dark"] .cfg-card-head[style*="background:#fef2f2"] { background: #21262d !important; border-bottom-color: #30363d !important; }
[data-theme="dark"] .cfg-alert--err                             { background: #21262d !important; border-color: #6e2c2c !important; }
[data-theme="dark"] .cfg-danger                                 { border-bottom-color: rgba(255,255,255,.06) !important; }

/* ── Calendário: eventos de pessoas (cal-event--person) ── */
[data-theme="dark"] .cal-event--person {
  filter: brightness(1.4) saturate(0.7) !important;
  opacity: 0.92 !important;
}
/* Evento "Eu" (próprio user) — hardcoded #111 fica invisível em dark */
[data-theme="dark"] .cal-event--person[style*="color:#111"] {
  color: #e6edf3 !important;
  background: rgba(255,255,255,.1) !important;
  border-left-color: #e6edf3 !important;
}

/* ── Calendário: feriados (inline eff6ff) ── */
[data-theme="dark"] .cal-event[style*="background:#eff6ff"] {
  background: #112240 !important;
  border-left-color: #3b82f6 !important;
  color: #93c5fd !important;
}

/* ── Toolbar de funcionários ── */
[data-theme="dark"] #empFilters > div:first-child { background: #21262d !important; }
[data-theme="dark"] .emp-status-tab               { color: #8b949e !important; }
[data-theme="dark"] .emp-status-tab.active        { background: #e6edf3 !important; color: #0d1117 !important; }
[data-theme="dark"] #empFilterNome                { color: #e6edf3 !important; }
[data-theme="dark"] #empFilters > div:nth-child(2),
[data-theme="dark"] #empFilterBday                { background: #21262d !important; border-color: #30363d !important; color: #8b949e !important; }
[data-theme="dark"] #empFilterDept                { background: #21262d !important; border-color: #30363d !important; color: #e6edf3 !important; }
[data-theme="dark"] #empFilterDept option         { background: #21262d; color: #e6edf3; }
[data-theme="dark"] #empFilterCount               { color: #8b949e !important; }
[data-theme="dark"] .tag--transicao               { background: #0c2340 !important; color: #7dd3fc !important; }
