/* ============================================
   PostPro Nexus — HR Module: Deep Obsidian Dark Theme
   Overlay loaded after inline styles + hr-dashboard.css
   Matches Finance module's dark design language
   ============================================ */

/* ── Design Tokens ── */
:root {
  /* Surface hierarchy (Deep Obsidian) */
  --bg-color: #080C14;
  --card-bg: #111827;
  --text-main: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Sidebar */
  --sidebar-bg: #0B1120;
  --sidebar-text: #64748B;
  --sidebar-text-bright: #F1F5F9;
  --sidebar-hover: rgba(255, 255, 255, 0.04);
  --sidebar-active: rgba(79, 195, 202, 0.12);

  /* Accent */
  --amt-turquoise: #4FC3CA;

  /* Tech colors — vivid on dark */
  --tech-blue: #60A5FA;
  --tech-green: #34D399;
  --tech-red: #F87171;
  --tech-yellow: #FBBF24;
  --tech-cyan: #22D3EE;
  --tech-purple: #A78BFA;
  --tech-orange: #FB923C;

  /* Surface variants */
  --surface-muted: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(79, 195, 202, 0.04);
  --surface-secondary: rgba(255, 255, 255, 0.02);

  /* Alert / status backgrounds */
  --alert-warning-bg: rgba(251, 191, 36, 0.08);
  --alert-warning-border: rgba(251, 191, 36, 0.2);
  --alert-warning-text: #FBBF24;
  --alert-warning-subtext: rgba(251, 191, 36, 0.7);
  --alert-danger-bg: rgba(248, 113, 113, 0.06);
  --alert-danger-border: rgba(248, 113, 113, 0.15);
  --alert-danger-text: #F87171;
  --alert-info-bg: rgba(14, 165, 233, 0.06);
  --alert-info-border: rgba(14, 165, 233, 0.15);
  --alert-info-text: #38BDF8;
  --alert-success-bg: rgba(52, 211, 153, 0.08);
  --alert-success-border: rgba(52, 211, 153, 0.2);
  --alert-success-text: #34D399;
  --alert-blue-bg: rgba(96, 165, 250, 0.08);
  --alert-blue-border: rgba(96, 165, 250, 0.15);
  --alert-blue-text: #60A5FA;
  --alert-purple-bg: rgba(167, 139, 250, 0.08);
  --alert-purple-text: #A78BFA;

  /* Semantic color tokens */
  --bg-primary: #111827;
  --border-primary: rgba(255, 255, 255, 0.06);
  --color-success: #34D399;
  --color-warning: #FBBF24;
  --color-danger: #F87171;
  --color-purple: #A78BFA;

  /* Calendar-specific */
  --holiday-match-bg: rgba(96, 165, 250, 0.08);
  --holiday-match-text: #60A5FA;

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.06);

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(79, 195, 202, 0.04);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ── Global Font Override ── */
* {
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-main);
}

/* ── Sidebar — Refined Dark ── */
.hr-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
}

.sidebar-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: var(--amt-turquoise);
  letter-spacing: 0.08em;
}

.sidebar-nav {
  padding: 8px 0;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #475569;
  padding: 14px 20px 8px;
}

.nav-item {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  padding: 10px 20px;
  border-left: 3px solid transparent;
  border-radius: 0;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-bright);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--amt-turquoise);
  border-left-color: var(--amt-turquoise);
}

.nav-badge {
  background: rgba(248, 113, 113, 0.2);
  color: #F87171;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.nav-subitems {
  background: rgba(0, 0, 0, 0.3);
}

.nav-subitem {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--sidebar-text);
}

.nav-subitem:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-bright);
}

.nav-subitem.active {
  color: var(--amt-turquoise);
  background: var(--sidebar-active);
}

.nav-item-expand {
  color: #475569;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 20px;
}

.sidebar-user-avatar {
  background: linear-gradient(135deg, rgba(79, 195, 202, 0.2), rgba(59, 168, 174, 0.3));
  border: 1.5px solid rgba(79, 195, 202, 0.15);
}

.sidebar-user-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--sidebar-text-bright);
}

.sidebar-user-role {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: var(--sidebar-text);
}

/* ── Topbar — Dark Glass ── */
.hr-topbar {
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
}

/* ── Buttons — Dark Style ── */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  background: var(--amt-turquoise);
  color: #0B1120;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn:hover {
  background: #3BA8AE;
  box-shadow: 0 4px 16px rgba(79, 195, 202, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-small {
  font-family: 'Outfit', sans-serif;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.btn-small:hover {
  background: rgba(79, 195, 202, 0.1);
  border-color: rgba(79, 195, 202, 0.3);
  color: var(--amt-turquoise);
}

/* ── Inputs — Dark ── */
.input,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="color"]),
select,
textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-main) !important;
  font-family: 'Outfit', sans-serif;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.input:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--amt-turquoise) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 195, 202, 0.1);
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #475569 !important;
}

select.input,
select {
  color: var(--text-main) !important;
}

select.input option,
select option {
  background: #1A2236;
  color: var(--text-main);
}

textarea.input,
textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-main) !important;
}

/* ── Cards & Components ── */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ── Welcome Card — Hero Gradient ── */
.welcome-card {
  background: linear-gradient(135deg, #111827 0%, #1A2236 50%, #0F172A 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 195, 202, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: 15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-name {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #F1F5F9;
  position: relative;
  z-index: 1;
}

.welcome-avatar {
  background: linear-gradient(135deg, rgba(79, 195, 202, 0.2), rgba(59, 168, 174, 0.3));
  border: 2px solid rgba(79, 195, 202, 0.2);
  position: relative;
  z-index: 1;
}

.status-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}

.status-badge.in-office {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.2);
  color: #34D399;
}

.status-badge.wfh {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.2);
  color: #60A5FA;
}

.status-badge.on-leave {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.2);
  color: #FBBF24;
}

.status-badge.sick {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.2);
  color: #F87171;
}

.status-badge.travel {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.2);
  color: #A78BFA;
}

/* ── Dashboard Grid ── */
.dashboard-grid {
  gap: 20px;
}

/* ── Balance Card ── */
.balance-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.balance-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.balance-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text-main);
}

.balance-label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.balance-row {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.balance-row.total {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.balance-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
}

.balance-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

/* ── Info Cards (Leave Schedule, Who's Off, Birthdays, etc.) ── */
.info-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.info-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.info-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.info-item-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

.info-item-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.info-item-subtitle {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.info-item-badge {
  font-family: 'Outfit', sans-serif;
}

/* ── Badges — Glass on Dark ── */
.badge {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
}

.badge-green {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
}

.badge-yellow {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}

.badge-red {
  background: rgba(248, 113, 113, 0.12);
  color: #F87171;
}

.badge-blue {
  background: rgba(96, 165, 250, 0.12);
  color: #60A5FA;
}

.badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* ── Calendar Section ── */
.calendar-header {
  margin-bottom: 20px;
}

.calendar-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.calendar-nav button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.calendar-nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.calendar-grid {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  gap: 1px;
}

.calendar-day-header {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.calendar-day {
  background: var(--card-bg);
  min-height: 100px;
  transition: background 0.15s ease;
}

.calendar-day-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-day.today {
  background: rgba(79, 195, 202, 0.06);
}

.calendar-day.today .calendar-day-number {
  color: var(--amt-turquoise);
}

.calendar-day.other-month {
  background: rgba(255, 255, 255, 0.01);
}

.calendar-day.other-month .calendar-day-number {
  color: #334155;
}

.calendar-day.weekend {
  background: rgba(255, 255, 255, 0.02);
}

.calendar-day.weekend-working {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.06) 0%, rgba(96, 165, 250, 0.1) 100%);
  border-left: 3px solid rgba(96, 165, 250, 0.4);
}

.calendar-day.replaced-day {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, rgba(251, 191, 36, 0.1) 100%);
  border-left: 3px solid rgba(251, 191, 36, 0.4);
}

.calendar-day.capacity-low {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.06) 0%, rgba(248, 113, 113, 0.1) 100%);
}

.calendar-day.capacity-medium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, rgba(251, 191, 36, 0.1) 100%);
}

.calendar-day.clickable:hover {
  background: rgba(79, 195, 202, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.calendar-event {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  border-radius: 4px;
}

.calendar-event-summary {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
}

.calendar-more-indicator {
  color: #475569;
  font-family: 'Outfit', sans-serif;
}

/* Calendar Avatar Stack */
.cal-avatar-stack .cal-avatar {
  border: 1.5px solid #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cal-avatar-stack .cal-avatar-overflow {
  color: var(--text-muted);
}

/* Calendar Pills */
.cal-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
}

.cal-pill--off {
  background: rgba(99, 102, 241, 0.8);
}

.cal-pill--remote {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
}

.calendar-day.capacity-low .cal-pill--off {
  background: rgba(220, 38, 38, 0.8);
}

.calendar-day.capacity-medium .cal-pill--off {
  background: rgba(217, 119, 6, 0.8);
}

/* Capacity Badge in Modal */
.capacity-badge {
  font-family: 'Outfit', sans-serif;
}

.capacity-badge.capacity-good {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
}

.capacity-badge.capacity-medium {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}

.capacity-badge.capacity-low {
  background: rgba(248, 113, 113, 0.12);
  color: #F87171;
}

/* Day Detail Modal */
.day-detail-section-header {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.day-detail-type-header {
  font-family: 'Outfit', sans-serif;
  color: var(--text-secondary);
}

.day-detail-person,
.day-detail-person-row {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
}

.day-detail-person-row--wfh {
  background: rgba(96, 165, 250, 0.04);
}

.day-detail-person .person-name,
.day-detail-person-body .person-name {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.day-detail-person .duration-info,
.day-detail-person-body .duration-info {
  color: var(--text-muted);
}

.day-detail-person .person-notes,
.day-detail-person-body .person-notes {
  color: var(--text-muted);
  border-top-color: rgba(255, 255, 255, 0.06);
}

.day-detail-person .status-badge.pending {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}

.day-detail-person .half-day-badge {
  background: rgba(96, 165, 250, 0.12);
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.2);
}

.day-detail-person-avatar {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(129, 140, 248, 0.3) 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ── Org Chart ── */
.org-chart-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

.org-person {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.org-person:hover {
  border-color: rgba(79, 195, 202, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  background: #1A2236;
}

.org-avatar {
  background: linear-gradient(135deg, rgba(79, 195, 202, 0.2), rgba(59, 168, 174, 0.3));
}

.org-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.org-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.org-children {
  border-left-color: rgba(255, 255, 255, 0.06);
}

/* ── Requests Section ── */
.request-item {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.request-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.request-type-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.request-dates {
  font-family: 'Outfit', sans-serif;
  color: var(--text-secondary);
}

.request-days {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-main);
}

.request-status {
  font-family: 'Outfit', sans-serif;
  border-radius: 20px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.request-status.pending {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
  border-color: rgba(251, 191, 36, 0.3);
}

.request-status.approved {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.3);
}

.request-status.rejected {
  background: rgba(248, 113, 113, 0.12);
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.request-status.cancelled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Profile Section ── */
.profile-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.profile-avatar-large {
  background: linear-gradient(135deg, rgba(79, 195, 202, 0.2), rgba(59, 168, 174, 0.3));
  border: 2px solid rgba(79, 195, 202, 0.15);
}

.profile-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.profile-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.profile-tag {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'Outfit', sans-serif;
}

.profile-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

.profile-section.restricted {
  background: rgba(248, 113, 113, 0.04);
  border-color: rgba(248, 113, 113, 0.15);
}

.profile-section-header h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.profile-field label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.profile-field span {
  color: var(--text-main);
}

.profile-leave-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.profile-leave-type {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.profile-leave-numbers {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.profile-leave-numbers .remaining {
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Employee Profile (Full Page) ── */
.employee-profile-header {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.profile-header-avatar {
  background: linear-gradient(135deg, rgba(79, 195, 202, 0.2), rgba(99, 102, 241, 0.2));
}

.profile-header-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.profile-header-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.profile-meta-item {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

/* Profile Tabs */
.profile-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.profile-tab {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

.profile-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.profile-tab.active {
  color: var(--amt-turquoise);
  border-bottom-color: var(--amt-turquoise);
}

/* ── Approval Cards ── */
.approval-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.approval-avatar {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.approval-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.approval-subtitle {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.approval-dates {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
}

.approval-date-label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.approval-date-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.approval-notes {
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.approval-details {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
}

.approval-detail-label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.approval-detail-value {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

/* ── Team Table ── */
.team-table {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.team-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.team-table td {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.team-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ── History Table ── */
.history-table {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

.history-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.history-table td {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ── Documents Section ── */
.document-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.document-card:hover {
  border-color: rgba(79, 195, 202, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.document-card-icon {
  border-radius: var(--radius-md);
}

.document-card-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  color: var(--text-main);
}

.document-card-meta {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.document-icon {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.document-icon svg {
  color: var(--amt-turquoise);
}

.document-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.document-meta {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

/* Document compact rows */
.document-row-compact {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.document-row-compact:hover {
  background: rgba(255, 255, 255, 0.03);
}

.document-row-compact .doc-name {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.document-row-compact .doc-meta {
  color: var(--text-muted);
}

/* Signature styles */
.signature-tab {
  font-family: 'Outfit', sans-serif;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.signature-tab.active {
  background: var(--amt-turquoise);
  color: #0B1120;
  border-color: var(--amt-turquoise);
}

.signature-canvas {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.signature-preview {
  background: rgba(255, 255, 255, 0.04);
}

.signed-info-box {
  background: rgba(52, 211, 153, 0.06);
  border-color: rgba(52, 211, 153, 0.2);
}

.signed-info-header {
  color: #34D399;
}

.signed-info-details {
  color: #34D399;
}

.signed-info-method {
  color: rgba(52, 211, 153, 0.6);
}

.signature-display {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(52, 211, 153, 0.15);
}

.document-sign-section {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.2);
  color: var(--text-secondary);
}

/* ── Training Cards ── */
.training-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.training-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.training-card-provider {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.training-card-status {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  border-radius: 20px;
}

.training-card-status.approved {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.3);
}

.training-card-status.rejected {
  background: rgba(248, 113, 113, 0.12);
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.training-card-status.pending {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
  border-color: rgba(251, 191, 36, 0.3);
}

.training-card-details {
  border-top-color: rgba(255, 255, 255, 0.06);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.training-detail-label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.training-detail-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.training-card-reason {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
}

.training-card-reason-label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.training-card-reason-text {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.training-comment {
  background: rgba(255, 255, 255, 0.03);
  border-left-color: var(--amt-turquoise);
  border-radius: var(--radius-md);
}

.training-comment-role {
  font-family: 'Outfit', sans-serif;
  color: var(--amt-turquoise);
}

.training-comment-text {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.training-comment-icon {
  background: rgba(79, 195, 202, 0.2);
  color: var(--amt-turquoise);
}

/* Mandatory Training Cards */
.mandatory-training-card.pending { border-left-color: #FBBF24; }
.mandatory-training-card.completed { border-left-color: #34D399; }
.mandatory-training-card.overdue { border-left-color: #F87171; }

/* ── People Directory ── */
.people-grid {
  gap: 16px;
}

.people-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-card);
}

.people-card:hover {
  border-color: rgba(79, 195, 202, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px rgba(79, 195, 202, 0.04);
  transform: translateY(-2px);
}

.people-card-avatar {
  background: linear-gradient(135deg, rgba(79, 195, 202, 0.2), rgba(59, 168, 174, 0.3));
  border: 1.5px solid rgba(79, 195, 202, 0.15);
}

.people-card-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}

.people-card-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.people-card-meta {
  font-family: 'Outfit', sans-serif;
  color: #475569;
}

.birthday-badge {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ── Modals / Dialogs — Dark ── */
dialog {
  background: #1A2236;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  color: var(--text-main);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.1);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 24px;
}

.modal-header h2,
.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.form-group label {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Performance Section ── */
.performance-filter-btn {
  font-family: 'Outfit', sans-serif;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.performance-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.performance-filter-btn.active {
  background: rgba(79, 195, 202, 0.12);
  color: var(--amt-turquoise);
  border-color: rgba(79, 195, 202, 0.3);
}

.performance-item {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.performance-item:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.1);
}

.performance-item-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.performance-item-date {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.performance-item-meta {
  color: var(--text-secondary);
}

.performance-item-details {
  color: var(--text-secondary);
}

/* Dropdown */
.dropdown-item {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ── Audit Logs ── */
.audit-item {
  border-bottom-color: rgba(255, 255, 255, 0.04);
  font-family: 'Outfit', sans-serif;
}

.audit-item-action {
  color: var(--text-main);
}

.audit-item-values {
  color: var(--text-muted);
}

.audit-item-meta {
  color: var(--text-muted);
}

/* ── Log Entries (Bradford / RTW) ── */
.log-entry {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

.log-entry-type.meeting_transcript {
  background: rgba(96, 165, 250, 0.12);
  color: #60A5FA;
}

.log-entry-type.meeting_summary {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
}

.log-entry-type.rtw_completed {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}

.log-entry-type.bradford_review {
  background: rgba(248, 113, 113, 0.12);
  color: #F87171;
}

.log-entry-type.note {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.log-entry-content {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.log-entry-transcript {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  border-radius: var(--radius-md);
}

/* ── Settings Tabs ── */
.settings-subtab-btn {
  font-family: 'Outfit', sans-serif;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.settings-subtab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.settings-subtab-btn.active {
  background: rgba(79, 195, 202, 0.08);
  color: var(--amt-turquoise);
  font-weight: 600;
  border-bottom-color: var(--amt-turquoise);
}

/* ── Toggle Switch — Dark ── */
.toggle-slider {
  background-color: #334155;
}

.toggle-slider:before {
  background-color: #94A3B8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--amt-turquoise);
}

.toggle-switch input:checked + .toggle-slider:before {
  background-color: white;
}

/* ── Checkbox & Form Elements ── */
.checkbox-label {
  font-family: 'Outfit', sans-serif;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ── Icon Picker — Dark ── */
.icon-picker {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.icon-picker-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.icon-picker-item:hover {
  border-color: rgba(79, 195, 202, 0.3);
  background: rgba(79, 195, 202, 0.08);
}

.icon-picker-item.selected {
  background: var(--amt-turquoise);
  border-color: var(--amt-turquoise);
  color: white;
}

/* ── Empty State ── */
.empty-state {
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

.empty-state svg {
  color: #334155;
  opacity: 0.6;
}

/* ── Loading Spinner — Dark ── */
.loading-spinner {
  border-color: rgba(255, 255, 255, 0.06);
  border-top-color: var(--amt-turquoise);
}

.loading-spinner-small {
  border-color: rgba(255, 255, 255, 0.06);
  border-top-color: var(--amt-turquoise);
}

/* ── Toast — Dark ── */
#toast {
  background: #1A2236;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #34D399;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  font-family: 'Outfit', sans-serif;
}

#toast.error {
  border-left-color: #F87171;
}

/* ── Letter Editor — Dark ── */
#letterEditor {
  background: #0F172A;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

#letterEditor:focus {
  border-color: var(--amt-turquoise);
}

#letterEditor.drag-over {
  background: rgba(79, 195, 202, 0.04);
  outline-color: var(--amt-turquoise);
}

/* ── Recruitment Request Cards — reuse training card dark styles ── */

/* ── Week Calendar Grid (HR Meeting) ── */
.week-calendar-grid {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.week-calendar-header {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

.week-calendar-header.today {
  background: rgba(79, 195, 202, 0.1);
  color: var(--amt-turquoise);
}

.week-calendar-time {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.week-calendar-cell {
  background: var(--card-bg);
  transition: background 0.15s ease;
}

.week-calendar-cell:hover:not(.past):not(.busy) {
  background: rgba(79, 195, 202, 0.06);
}

.week-calendar-cell.past {
  background: rgba(255, 255, 255, 0.01);
}

.week-calendar-cell.tentative {
  background: rgba(251, 191, 36, 0.06);
}

.week-calendar-cell.selected {
  background: rgba(52, 211, 153, 0.1);
}

.week-calendar-event {
  background: rgba(248, 113, 113, 0.12);
  color: #F87171;
  font-family: 'Outfit', sans-serif;
}

.week-calendar-event.tentative-event {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}

.week-calendar-event.selected-event {
  background: rgba(52, 211, 153, 0.3);
  color: #34D399;
}

/* ── Mobile Sidebar Backdrop ── */
.hr-sidebar-backdrop.open {
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(8px);
}

/* ── Mobile Menu Button ── */
.hr-mobile-menu-btn {
  color: var(--text-secondary);
}

.hr-mobile-menu-btn:hover {
  color: var(--text-main);
}

/* ── Scrollbar — Dark ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Entrance Animations ── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-card {
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s backwards;
}

.dashboard-grid {
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s backwards;
}

.hr-section.active {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* ── HR Dashboard (hrd-root) — Dark Overrides ── */
.hrd-root {
  --hrd-surface: #111827;
  --hrd-surface-muted: rgba(255, 255, 255, 0.03);
  --hrd-surface-1: #111827;
  --hrd-surface-2: #1A2236;
  --hrd-border: rgba(255, 255, 255, 0.06);
  --hrd-text-primary: #F1F5F9;
  --hrd-text-secondary: #94A3B8;
  --hrd-text-muted: #64748B;
  --hrd-text-inverse: #0B1120;

  /* Alert colors on dark */
  --hrd-alert-danger-bg: rgba(248, 113, 113, 0.06);
  --hrd-alert-danger-border: rgba(248, 113, 113, 0.2);
  --hrd-alert-danger-text: #F87171;
  --hrd-alert-danger-icon: #F87171;
  --hrd-alert-warning-border: rgba(251, 191, 36, 0.3);
  --hrd-alert-warning-text: #FBBF24;
  --hrd-alert-warning-subtext: rgba(251, 191, 36, 0.7);
}

/* Loading backdrop dark */
.hrd-root .hrd-loading-backdrop {
  background: rgba(8, 12, 20, 0.85);
}

.hrd-root .hrd-loading-text {
  color: var(--text-muted);
}

/* Welcome card dark buttons */
.hrd-root .hrd-btn-welcome-default {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.hrd-root .hrd-btn-welcome-default:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hrd-root .hrd-btn-wfh {
  background: rgba(34, 211, 238, 0.15);
  color: #22D3EE;
  border-color: rgba(34, 211, 238, 0.2);
}

.hrd-root .hrd-btn-wfh:hover {
  background: rgba(34, 211, 238, 0.25);
}

.hrd-root .hrd-btn-blocked {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.2);
  color: #F87171;
}

.hrd-root .hrd-btn-blocked:hover {
  background: rgba(248, 113, 113, 0.12);
}

.hrd-root .hrd-btn-success {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.3);
  color: #34D399;
}

.hrd-root .hrd-btn-success:hover {
  background: rgba(52, 211, 153, 0.3);
}

/* Card hover on dark */
.hrd-root .info-card:hover,
.hrd-root .balance-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(79, 195, 202, 0.03);
}

/* Info items dark hover */
.hrd-root .info-item {
  background: rgba(255, 255, 255, 0.03);
}

.hrd-root .info-item:hover {
  background: rgba(79, 195, 202, 0.04);
}

.hrd-root .info-item-icon {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

/* Balance card dark */
.hrd-root .balance-number {
  color: var(--amt-turquoise);
}

/* Person items dark hover */
.hrd-root .hrd-person-item:hover {
  background: rgba(79, 195, 202, 0.04);
}

.hrd-root .hrd-avatar {
  border-color: #111827;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hrd-root .hrd-leave-dot {
  border-color: #111827;
}

/* Person item text */
.hrd-root .hrd-person-item .info-item-subtitle {
  color: var(--text-muted);
}

.hrd-root .hrd-date-label {
  color: var(--text-muted);
}

/* Doc items dark */
.hrd-root .hrd-doc-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(248, 113, 113, 0.1);
}

.hrd-root .hrd-doc-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hrd-root .hrd-doc-item-title {
  color: var(--text-main);
}

.hrd-root .hrd-doc-item-dates {
  color: var(--text-muted);
}

/* Banner cards dark */
.hrd-root .hrd-banner-warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.04) 100%);
  border-color: rgba(251, 191, 36, 0.2);
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.06);
}

.hrd-root .hrd-banner-danger {
  background: rgba(248, 113, 113, 0.04);
  border-color: rgba(248, 113, 113, 0.15);
  box-shadow: 0 2px 12px rgba(248, 113, 113, 0.04);
}

/* Current leave highlight dark */
.hrd-root .hrd-leave-current {
  background: rgba(251, 191, 36, 0.06);
  border-left-color: rgba(251, 191, 36, 0.5);
  box-shadow: none;
}

/* Skeleton dark */
.hrd-root .hrd-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200px 100%;
}

/* Card heading border-bottom dark */
.hrd-root .info-card h3,
.hrd-root .balance-card h3 {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Scrollbar dark */
.hrd-root .info-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
}

.hrd-root .info-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================
   INLINE STYLE OVERRIDES (!important)
   Battles hardcoded inline styles in HTML & JS
   ============================================ */

/* ── Global: Override ALL white/light inline backgrounds ── */

/* Native date picker */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: dark !important;
}

/* Select dropdowns with inline white bg */
#calendarSiteFilter,
#orgDeptFilter,
select.input {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── OOO Section — Request Leave Modal ── */
#oooPreviewSection > div {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
}

#oooPreviewSection label {
  color: #38BDF8 !important;
}

#oooPreviewSection span,
#oooPreviewSection div {
  color: #38BDF8;
}

#oooInternalPreview,
#oooExternalPreview {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
  border-color: rgba(14, 165, 233, 0.15) !important;
}

#oooInternalEditable,
#oooExternalEditable {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.ooo-toolbar {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.ooo-toolbar button,
#oooPreviewSection button {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary) !important;
}

/* ── Holiday Info in Request Modal ── */
#holidayInfo {
  background: rgba(251, 191, 36, 0.08) !important;
  border-color: rgba(251, 191, 36, 0.2) !important;
}

#holidayInfo div {
  color: #FBBF24;
}

#holidayList {
  color: var(--text-secondary) !important;
}

/* ── Calendar Day Detail Modal ── */
#dayDetailModal {
  background: #1A2236 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#dayDetailModal .modal-header {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ── Calendar Legend ── */
#calendarLegend {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

#calendarLegend span {
  color: var(--text-main);
}

/* ── Training Section Tabs ── */
#trainingSubTabs {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

#trainingSubTabs .tab-btn,
.tab-btn {
  background: transparent !important;
  color: var(--text-muted) !important;
  font-family: 'Outfit', sans-serif !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  padding: 10px 20px !important;
  cursor: pointer !important;
}

#trainingSubTabs .tab-btn.active,
.tab-btn.active {
  color: var(--amt-turquoise) !important;
  border-bottom-color: var(--amt-turquoise) !important;
  font-weight: 600 !important;
}

#trainingSubTabs .tab-btn:hover,
.tab-btn:hover {
  color: var(--text-secondary) !important;
}

/* ── Training CFO / Manager Pending Sections ── */
#cfoPendingSection > div {
  background: rgba(251, 191, 36, 0.06) !important;
  border-color: rgba(251, 191, 36, 0.15) !important;
}

#cfoPendingSection div {
  color: #FBBF24;
}

#managerTrainingPendingSection > div {
  background: rgba(96, 165, 250, 0.06) !important;
  border-color: rgba(96, 165, 250, 0.15) !important;
}

#managerTrainingPendingSection div {
  color: #60A5FA;
}

/* ── Mandatory Training Cards (JS-rendered) ── */
.mandatory-training-card {
  background: var(--card-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--text-main) !important;
}

/* ── Org Chart — Stats + Container ── */
#orgChartContainer {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Org chart view mode buttons */
.view-mode-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
}

.view-mode-btn.active {
  background: var(--amt-turquoise) !important;
  color: #0B1120 !important;
}

/* ── Profile Section ── */
.profile-section {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Emergency contact restricted section */
.profile-section.restricted {
  background: rgba(248, 113, 113, 0.04) !important;
  border-color: rgba(248, 113, 113, 0.12) !important;
}

/* (Profile emergency contact attribute selectors removed — now using CSS variables) */

/* ── People Directory — JS-rendered cards ── */
.people-card {
  background: var(--card-bg) !important;
}

/* ── Employee Profile Page (JS-rendered) ── */
.employee-profile-header {
  background: var(--card-bg) !important;
}

/* ── All Dialogs — Force dark modal headers/footers ── */
dialog .modal-header {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-main) !important;
}

dialog .modal-footer {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* ── Settings Section — sub-tabs rendered by JS ── */
#section-settings .settings-subtab-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-muted) !important;
}

#section-settings .settings-subtab-btn.active {
  background: rgba(79, 195, 202, 0.08) !important;
  color: var(--amt-turquoise) !important;
  border-bottom-color: var(--amt-turquoise) !important;
}

/* ── Employee Profile Tab ── */
#section-employee-profile .profile-tab {
  background: transparent !important;
}

/* ── Attendee Search Results ── */
#hrAttendeeSearchResults {
  background: #1A2236 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── Letter Template Editor ── */
#letterEditor {
  background: #0F172A !important;
  color: var(--text-main) !important;
}

/* (Template builder attribute selector removed — now using CSS variables) */

/* ── Dropdown Menus (Performance, etc.) ── */
#performanceDropdown,
.dropdown-menu {
  background: #1A2236 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
}

/* (Legacy attribute-selector overrides removed — inline styles now use CSS variables) */

/* ── Disabled inputs ── */
input[disabled],
input:disabled,
textarea[disabled],
textarea:disabled,
select[disabled],
select:disabled {
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--text-muted) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
  opacity: 0.7;
}

/* ── Contenteditable areas ── */
[contenteditable="true"] {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── Form group help text ── */
.form-group small,
.form-group .help-text {
  color: var(--text-muted) !important;
}

/* (Progress bar attribute selectors removed — now using CSS variables) */

/* ── Hover state overrides for JS-set inline styles ── */

/* Ensure hover states don't flash white on JS elements */
.people-card:hover,
.document-card:hover,
.approval-card:hover,
.training-card:hover,
.log-entry:hover {
  background: #1A2236 !important;
}

/* ── Responsive — Mobile ── */
@media (max-width: 768px) {
  .hr-sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    background: #080C14;
  }

  .hr-sidebar.open {
    transform: translateX(0);
  }

  .hr-main {
    margin-left: 0;
  }

  .hr-topbar {
    padding: 10px 16px;
  }

  .hr-content {
    padding: 16px;
  }

  .welcome-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .welcome-left {
    flex-direction: column;
    align-items: center;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .request-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .people-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .training-card-details {
    grid-template-columns: repeat(2, 1fr);
  }

  .approval-details {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-grid {
    gap: 1px;
  }

  .calendar-day {
    min-height: 60px;
    padding: 4px;
  }

  .calendar-day-number {
    font-size: 11px;
  }

  .profile-header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-header-meta {
    justify-content: center;
  }

  .profile-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .profile-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    padding: 10px 16px;
  }

  dialog {
    max-width: 95vw;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .hr-content {
    padding: 12px;
  }

  .welcome-name {
    font-size: 20px;
  }

  .welcome-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .training-card {
    padding: 16px;
  }

  .training-card-details {
    grid-template-columns: 1fr;
  }

  .approval-details {
    grid-template-columns: 1fr;
  }
}

/* ── Prefers Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .welcome-card,
  .dashboard-grid,
  .hr-section.active {
    animation: none;
  }

  .module-card:hover,
  .people-card:hover,
  .org-person:hover {
    transform: none;
  }
}
