:root {
  --th-bg:         #f0f2f5;
  --th-bg2:        #ffffff;
  --th-bg3:        #f5f7fa;
  --th-card:       #ffffff;
  --th-surface:    #ffffff;
  --th-border:     rgba(0,0,0,.09);
  --th-border2:    rgba(0,0,0,.15);
  --th-text:       #1a1d23;
  --th-muted:      rgba(26,29,35,.50);
  --th-topbar:     rgba(255,255,255,.97);
  --th-input:      #f5f7fa;
  --th-hover:      rgba(0,0,0,.03);
  --th-shadow:     rgba(0,0,0,.10);
  --th-overlay:    rgba(0,0,0,.50);
  --th-accent:     #00a882;
  --th-thead:      #f0f2f5;
  --th-thead-text: #1a1d23;
  --th-row-hover:  rgba(0,0,0,.02);
  --th-modal:      #ffffff;
  --th-scrollbar:  rgba(0,0,0,.12);
}

body { background: var(--th-bg) !important; color: var(--th-text) !important; }

.topbar, .app-header, nav.topbar, header {
  background: var(--th-topbar) !important;
  border-color: var(--th-border) !important;
  color: var(--th-text) !important;
}

.card, .section-card, .stat-card, .kpi-card, .metric-card, .score-card,
.month-card, .employee-card, .emp-chip, .month-pill, .stat-box,
.section-block, .meta-card, .deviations-card, .audit-table,
.summary-bar, .toolbar, .tabs {
  background: var(--th-card) !important;
  border-color: var(--th-border) !important;
  color: var(--th-text) !important;
}

table { background: var(--th-card) !important; color: var(--th-text) !important; }
thead:not(.planning-table thead), thead tr:not(.planning-table thead tr) { background: var(--th-thead) !important; }
thead th { background: var(--th-thead) !important; color: var(--th-thead-text) !important; border-color: var(--th-border) !important; }
tbody td:not(.shift-cell) { border-color: var(--th-border) !important; color: var(--th-text) !important; }
tbody tr:hover td:not(.shift-cell), tbody tr:hover { background: var(--th-row-hover) !important; }

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(.shift-input),
select:not(.shift-input),
textarea:not(.shift-input) {
  background: var(--th-input) !important;
  color: var(--th-text) !important;
  border-color: var(--th-border2) !important;
}
input::placeholder, textarea::placeholder { color: var(--th-muted) !important; }

.modal, .modal-content, .reset-modal {
  background: var(--th-modal) !important;
  color: var(--th-text) !important;
  border-color: var(--th-border2) !important;
}
.modal-overlay, .modal-bg { background: var(--th-overlay) !important; }

label { color: var(--th-muted) !important; }
h1, h2, h3, h4 { color: var(--th-text) !important; }

.btn-home {
  background: rgba(0,0,0,.05) !important;
  color: var(--th-text) !important;
  border-color: var(--th-border2) !important;
}

::-webkit-scrollbar-track { background: #e8eaed; }
::-webkit-scrollbar-thumb { background: #bbbec5; border-radius: 4px; }
