:root {
  --brand: #0b7a68;
  --brand-strong: #075e52;
  --brand-soft: #e5f3ef;
  --navy: #15242d;
  --navy-2: #1d323e;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  --text: #15242d;
  --muted: #687985;
  --line: #dfe7eb;
  --success: #0b7a68;
  --warning: #c99a2e;
  --danger: #cc4b4b;
  --purple: #2e5bce;
  --shadow: 0 10px 28px rgba(21, 36, 45, 0.07);
  --sidebar-width: 236px;
  --radius: 6px;
}

body { background: var(--canvas); color: var(--text); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(46, 91, 206, .18);
}

.sidebar {
  width: var(--sidebar-width);
  padding: 18px 12px 14px;
  background: var(--navy);
  border-right: 1px solid rgba(255,255,255,.04);
}
.brand-lockup { min-height: 56px; padding: 2px 8px 18px; gap: 11px; }
.brand-lockup .logo { width: 40px; height: 40px; padding: 0; border-radius: 9px; background: transparent; }
.brand-lockup h1 { font-size: 19px; font-weight: 800; text-transform: lowercase; }
.brand-lockup p { color: #8fa2ad; font-size: 9px; }
.nav-label { margin: 20px 11px 7px; color: #607681; letter-spacing: .11em; }
.sidebar nav { gap: 4px; }
.sidebar nav button {
  min-height: 41px;
  padding-left: 42px;
  border-radius: 6px;
  color: #a9b8c0;
  font-weight: 650;
}
.sidebar nav button::before { color: #8398a3; }
.sidebar nav button:hover { background: rgba(255,255,255,.06); }
.sidebar nav button.active {
  background: #0b7a68;
  box-shadow: inset 3px 0 #c99a2e, 0 7px 18px rgba(0,0,0,.16);
}
.sidebar nav button.active::before { color: #fff; }
.sidebar-meta.sidebar-user { border-color: rgba(255,255,255,.12); background: #1b303b; }
.sidebar-avatar, .profile-avatar { background: #e1f2ed; color: var(--brand); }
.page { margin-left: var(--sidebar-width); }

.topbar {
  min-height: 68px;
  padding: 10px clamp(20px,2.5vw,38px);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.page-heading .eyebrow b, .page-heading .eyebrow span { color: var(--brand); }
.topbar h2 { font-size: 20px; }
.scope-pill { background: #f6f8f9; }
.icon-button { border-radius: 6px; }
.notification-button { color: var(--warning); }

.dashboard-intro { margin-top: 24px; }
.dashboard-intro h2 { font-size: 25px; }
.date-pill { border-radius: 6px; }
.panel, .metric-card, .settings-grid article, .module-banner { border-radius: 6px; box-shadow: var(--shadow); }
.metric-card {
  min-height: 108px;
  border-top: 0;
  border-left: 3px solid var(--brand);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.metric-card:nth-child(2) { border-left-color: var(--success); }
.metric-card:nth-child(3) { border-left-color: var(--warning); }
.metric-card:nth-child(4) { border-left-color: var(--danger); }
.metric-card:nth-child(5) { border-left-color: var(--purple); }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(21,36,45,.1); }
.metric-card[data-action="focus-dashboard-list"]::after { border-radius: 6px; }
.metric-card[data-action="focus-dashboard-list"].active { border-color: var(--brand); background: #f5fbf9; }
.metrics strong { font-size: 29px; }

.status-chart-panel, .department-attendance-panel { min-height: 320px; }
.status-ring, .status-chart-ring { filter: saturate(.92); }
.department-attendance-fill, .progress-fill, .attendance-bar-fill { background: var(--brand) !important; }
.recent-activity-panel { border-top: 3px solid #eef2f4; }

.screen-head { margin-top: 25px; }
.screen-head h2 { color: var(--text); }
.primary {
  border-radius: 6px !important;
  background: var(--brand) !important;
  box-shadow: 0 6px 14px rgba(11,122,104,.18) !important;
}
.primary:hover { background: var(--brand-strong) !important; }
.secondary { border-radius: 6px !important; }
input, select, textarea { border-radius: 6px !important; }
.personnel-toolbar, .payroll-toolbar, .filters { background: #f8fafb; }
table thead { background: #f5f7f8; }
table th { color: #60727e; letter-spacing: .04em; }
table tbody tr:hover { background: #f2f8f6; }
.status-chip, .badge, .role-badge { border-radius: 5px !important; }

.payroll-screen .payroll-kpis article { border-top: 0; border-left: 3px solid var(--brand); }
.calendar-day.is-today, .calendar-cell.today { box-shadow: inset 0 0 0 2px var(--brand); }
.calendar-day.has-entry, .calendar-cell.has-entry { background: #e6f3ef; }
.calendar-day.is-weekend, .calendar-cell.weekend { background: #f8f2e5; }
.contractor-workspace .module-banner { background: #162a35; color: #fff; }
.leaves-screen .module-banner { background: #eef4ff; }

.drawer, .modal-card, .dialog-card { border-radius: 8px !important; }
.drawer-header, .modal-header { border-bottom-color: var(--line); }
.tab-button.active, .segmented button.active { background: var(--brand) !important; color: #fff !important; }
.compliance-section { border-left: 3px solid var(--brand); }
.compliance-retention { background: #edf6f3; border-color: #cce7df; }

.login-panel {
  width: min(430px, calc(100vw - 32px));
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 65px rgba(21,36,45,.14);
}
.login-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #eef5f3 0 50%, #e9eef8 50% 100%);
}
.login-logo { width: 72px; height: 72px; padding: 0; border-radius: 15px; }
.login-panel h2 { text-transform: lowercase; font-size: 28px; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: min(290px,86vw); }
  .page { margin-left: 0; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar-profile, .scope-pill { display: none; }
}
