/* ============================================================
   WORKLOAD MAZTA GROUP — PREMIUM DESIGN SYSTEM v2.0
   Fonts: Sora (headings) + DM Sans (body) — Google Fonts
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ── Brand Palette ─────────────────────────────── */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #1e1b4b;

  /* ── Semantic Colors ───────────────────────────── */
  --clr-success:     #059669;
  --clr-success-lt:  #d1fae5;
  --clr-warning:     #d97706;
  --clr-warning-lt:  #fef3c7;
  --clr-danger:      #dc2626;
  --clr-danger-lt:   #fee2e2;
  --clr-info:        #0284c7;
  --clr-info-lt:     #e0f2fe;
  --clr-purple:      #7c3aed;
  --clr-purple-lt:   #ede9fe;

  /* ── Neutral Scale ─────────────────────────────── */
  --n-0:   #ffffff;
  --n-50:  #f8fafc;
  --n-100: #f1f5f9;
  --n-200: #e2e8f0;
  --n-300: #cbd5e1;
  --n-400: #94a3b8;
  --n-500: #64748b;
  --n-600: #475569;
  --n-700: #334155;
  --n-800: #1e293b;
  --n-900: #0f172a;
  --n-950: #020617;

  /* ── Glass (sidebar / topbar) ──────────────────── */
  --glass-sm:     rgba(255,255,255,0.08);
  --glass-md:     rgba(255,255,255,0.14);
  --glass-lg:     rgba(255,255,255,0.22);
  --glass-border: rgba(255,255,255,0.18);

  /* ── Shadows ───────────────────────────────────── */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm:  0 2px 6px rgba(0,0,0,0.1);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.16);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.2);
  --shadow-brand: 0 8px 32px rgba(99,102,241,0.35);

  /* ── Transitions ───────────────────────────────── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    0.15s;
  --dur-base:    0.25s;
  --dur-slow:    0.4s;

  /* ── Layout ────────────────────────────────────── */
  --topbar-h:  72px;
  --sidebar-w: 268px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl:28px;
  --radius-full: 9999px;

  /* ── Typography ────────────────────────────────── */
  --font-heading: 'Sora', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;
}

/* ============================================================
   BASE
   ============================================================ */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: #0f0c29;
  background: linear-gradient(160deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  min-height: 100vh;
  color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Animated mesh background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(124,58,237,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 60% 40%, rgba(16,185,129,0.08) 0%, transparent 50%);
  animation: meshDrift 30s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes meshDrift {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1.06) rotate(2deg); }
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-2xl);
  padding: clamp(36px, 6vw, 52px);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: loginReveal 0.7s var(--ease-spring) both;
}

@keyframes loginReveal {
  from { opacity: 0; transform: translateY(40px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  border-radius: var(--radius-xl);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: var(--shadow-brand);
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(4deg); }
}

.login-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.97);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--n-900);         /* ← dark text on white bg */
  font-family: var(--font-body);
  transition: all var(--dur-base) var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--n-400); font-weight: 400; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2), var(--shadow-sm);
  transform: translateY(-1px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur-base) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--dur-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #ffffff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(99,102,241,0.45); }

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border: 1.5px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(5,150,105,0.35);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(5,150,105,0.45); }

.btn-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(217,119,6,0.35);
}
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(217,119,6,0.45); }

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(220,38,38,0.35);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(220,38,38,0.45); }

.btn-info {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(2,132,199,0.35);
}
.btn-info:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(2,132,199,0.45); }

.btn-action {
  padding: 8px 16px;
  background: rgba(99,102,241,0.12);
  color: var(--brand-300);
  border: 1.5px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--dur-base) var(--ease-out);
}
.btn-action:hover {
  background: var(--brand-600);
  color: #ffffff;
  border-color: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

/* ============================================================
   TOPBAR  — sticky glass nav
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--topbar-h);
  padding: 0 clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,12,41,0.7);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 24px rgba(0,0,0,0.3);
  animation: topbarDrop 0.5s var(--ease-out) both;
}

@keyframes topbarDrop {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transition: transform var(--dur-base) var(--ease-spring);
  flex-shrink: 0;
}
.topbar-logo:hover { transform: rotate(8deg) scale(1.08); }

.topbar h1 {
  font-family: var(--font-heading);
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* User chip */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  transition: all var(--dur-base) var(--ease-out);
}
.user-info:hover { background: rgba(255,255,255,0.14); }

.user-info > div:last-child > div:first-child {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;            /* ← always white on dark bg */
  line-height: 1.2;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand-500), #a78bfa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
  transition: transform var(--dur-base) var(--ease-spring);
  flex-shrink: 0;
}
.user-avatar:hover { transform: scale(1.1) rotate(6deg); }

/* Clock */
.topbar-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  transition: all var(--dur-base) var(--ease-out);
}
.topbar-clock:hover { background: rgba(255,255,255,0.12); }

.clock-icon { font-size: 18px; animation: clockTick 1s ease-in-out infinite alternate; }
@keyframes clockTick {
  from { transform: rotate(-5deg); }
  to   { transform: rotate(5deg); }
}

.clock-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }

.clock-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.clock-date {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #ffffff;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-base) var(--ease-out);
}
.menu-toggle:hover { background: rgba(255,255,255,0.18); }

/* ============================================================
   LAYOUT — sidebar + main
   ============================================================ */
.container {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  position: relative;
  z-index: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  left: 0;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  background: rgba(15,12,41,0.65);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-right: 1px solid rgba(255,255,255,0.08);
  overflow-y: auto;
  padding: 20px 0 40px;
  z-index: 100;
  transition: transform var(--dur-base) var(--ease-out);
}

.sidebar-menu { list-style: none; }

.menu-section {
  padding: 6px 20px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 20px;
}
.menu-section:first-child { margin-top: 0; }

.menu-item { margin: 2px 10px; }

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
}

.menu-link:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  padding-left: 18px;
}

.menu-link.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(124,58,237,0.25));
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.menu-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-spring);
}
.menu-link:hover .menu-icon { transform: scale(1.15) rotate(5deg); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: clamp(20px, 4vw, 36px);
  overflow-y: auto;
  height: calc(100vh - var(--topbar-h));
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  animation: fadeSlideDown 0.5s var(--ease-out) both;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.page-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  font-weight: 400;
}

/* ============================================================
   TOOLBAR
   ============================================================ */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.5s var(--ease-out) 0.1s both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.search-box { flex: 1; min-width: min(280px, 100%); position: relative; }

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  background: rgba(255,255,255,0.97);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--n-900);           /* ← dark text */
  font-family: var(--font-body);
  transition: all var(--dur-base) var(--ease-out);
}
.search-box input::placeholder { color: var(--n-400); }
.search-box input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2), var(--shadow-sm);
}

.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-group select {
  padding: 11px 16px;
  background: rgba(255,255,255,0.97);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--n-900);           /* ← dark text */
  font-family: var(--font-body);
  cursor: pointer;
  min-width: 130px;
  transition: all var(--dur-base) var(--ease-out);
}
.filter-group select option { color: var(--n-900); background: #ffffff; }
.filter-group select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px,100%), 1fr));
  gap: 16px;
  margin-bottom: 24px;
  animation: fadeSlideUp 0.5s var(--ease-out) 0.15s both;
}

.stat-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 28px);
  transition: all var(--dur-slow) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-base);
}
.stat-card:hover { transform: translateY(-6px) scale(1.01); border-color: rgba(255,255,255,0.2); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  transition: transform var(--dur-base) var(--ease-spring);
}
.stat-card:hover .stat-icon { transform: scale(1.12) rotate(6deg); }

.stat-icon.primary  { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.stat-icon.success  { background: linear-gradient(135deg, #047857, #10b981); box-shadow: 0 6px 20px rgba(5,150,105,0.4); }
.stat-icon.warning  { background: linear-gradient(135deg, #b45309, #f59e0b); box-shadow: 0 6px 20px rgba(217,119,6,0.4); }
.stat-icon.danger   { background: linear-gradient(135deg, #b91c1c, #ef4444); box-shadow: 0 6px 20px rgba(220,38,38,0.4); }
.stat-icon.info     { background: linear-gradient(135deg, #0369a1, #38bdf8); box-shadow: 0 6px 20px rgba(2,132,199,0.4); }

.stat-card h3 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-card p {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.01em;
}

/* ============================================================
   TABLE CARD
   ============================================================ */
.table-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 20px;
  overflow: hidden;
  animation: fadeSlideUp 0.5s var(--ease-out) 0.2s both;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.table-header h3 {
  font-family: var(--font-heading);
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* ── THE ACTUAL TABLE ───────────────────────────────────── */
.styled-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

/* HEAD row */
.styled-table thead tr {
  background: rgba(255,255,255,0.06);
}

.styled-table th {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);   /* ← readable on dark bg */
  border: none;
  white-space: nowrap;
}

/* BODY rows — WHITE background so dark text is legible */
.styled-table tbody tr td {
  padding: 14px 16px;
  background: rgba(255,255,255,0.95);
  color: var(--n-800) !important;          /* ← DARK on white */
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  vertical-align: middle;
  transition: background var(--dur-fast);
}

.styled-table tbody tr:hover td { background: #ffffff; }

.styled-table tbody tr td strong,
.styled-table tbody tr td b {
  color: var(--n-900) !important;
  font-weight: 700;
}

.styled-table tbody tr td small {
  color: var(--n-500) !important;
  font-size: 12px;
}

/* rounded corners on row */
.styled-table tbody tr td:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.styled-table tbody tr td:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.styled-table tbody tr {
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
}
.styled-table tbody tr:hover { transform: scale(1.005); box-shadow: var(--shadow-md); }

/* ── overflow wrapper ──────────────────────────────────── */
#taskTableContainer { overflow-x: auto; border-radius: var(--radius-md); }

/* ============================================================
   BADGES  — always colored bg + white text
   ============================================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
  text-transform: capitalize;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.badge.success {
  background: rgba(5,150,105,0.18);
  color: #10b981;
  border-color: rgba(16,185,129,0.4);
}
/* on WHITE table cell override */
.styled-table td .badge.success { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }

.badge.warning {
  background: rgba(217,119,6,0.18);
  color: #fbbf24;
  border-color: rgba(251,191,36,0.4);
}
.styled-table td .badge.warning { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

.badge.danger {
  background: rgba(220,38,38,0.2);
  color: #f87171;
  border-color: rgba(248,113,113,0.4);
}
.styled-table td .badge.danger  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.badge.primary {
  background: rgba(99,102,241,0.18);
  color: var(--brand-300);
  border-color: rgba(99,102,241,0.4);
}
.styled-table td .badge.primary { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }

.badge.info {
  background: rgba(2,132,199,0.18);
  color: #38bdf8;
  border-color: rgba(56,189,248,0.4);
}
.styled-table td .badge.info    { background: #e0f2fe; color: #0c4a6e; border-color: #7dd3fc; }

/* ============================================================
   CHART CARDS
   ============================================================ */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px,100%), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 26px);
  transition: all var(--dur-base) var(--ease-out);
}
.chart-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.18); }

.chart-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.chart-container { position: relative; height: 320px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(16px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.show { display: flex; animation: fadeOverlay 0.25s ease both; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: rgba(20,18,50,0.92);
  backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-2xl);
  padding: clamp(24px, 4vw, 36px);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: modalPop 0.4s var(--ease-spring) both;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.88) translateY(40px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all var(--dur-base) var(--ease-out);
}
.modal-close:hover { background: rgba(220,38,38,0.4); color: #ffffff; transform: rotate(90deg); }

.modal-body { margin-bottom: 20px; }

/* modal inner forms — white inputs */
.modal-body input,
.modal-body select,
.modal-body textarea {
  background: rgba(255,255,255,0.97) !important;
  color: var(--n-900) !important;
  border: 2px solid rgba(255,255,255,0.2) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
}
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  border-color: var(--brand-400) !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2) !important;
  background: #ffffff !important;
}

.detail-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.detail-row:last-child { border-bottom: none; }

.detail-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-value {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: clamp(40px, 8vw, 64px) 20px;
}

.empty-state-icon {
  font-size: clamp(48px, 8vw, 64px);
  margin-bottom: 16px;
  opacity: 0.5;
  animation: logoFloat 4s ease-in-out infinite;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 4px; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.32); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }

/* ============================================================
   NOTIFICATION BELL
   ============================================================ */
.notif-bell {
  position: relative;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  transition: background var(--dur-fast);
  user-select: none;
}
.notif-bell:hover { background: rgba(255,255,255,0.12); }

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--clr-danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid rgba(15,12,41,0.9);
}

.notif-badge.pulse { animation: notifPulse 0.4s ease-out; }
@keyframes notifPulse { 0% { transform: scale(1); } 50% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* Notification Panel */
.notif-panel {
  position: absolute;
  top: 64px;
  right: 12px;
  width: 340px;
  max-height: 460px;
  z-index: 9999;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.4));
}
.notif-panel-inner {
  background: #1e1b4b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand-700), var(--clr-purple));
  color: white;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-heading);
}
.notif-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
}
.notif-btn-text {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  padding: 0;
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-empty { padding: 32px; text-align: center; color: rgba(255,255,255,0.4); font-size: 14px; }

.notif-item {
  position: relative;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.notif-item:hover { background: rgba(255,255,255,0.06); }
.notif-item.notif-unread { background: rgba(99,102,241,0.12); }
.notif-item.notif-high.notif-unread { border-left: 3px solid var(--clr-danger); }
.notif-item.notif-normal.notif-unread { border-left: 3px solid var(--clr-success); }

.notif-title { font-weight: 700; font-size: 13px; color: rgba(255,255,255,0.9); margin-bottom: 2px; }
.notif-message { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.4; }
.notif-time { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 4px; }
.notif-dot {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 7px;
  height: 7px;
  background: var(--brand-400);
  border-radius: 50%;
}

/* ============================================================
   EXPORT SECTION
   ============================================================ */
.export-section { padding: 14px 0; }
.export-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.export-filters input,
.export-filters select {
  padding: 8px 12px;
  background: rgba(255,255,255,0.97) !important;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--n-800) !important;
  font-family: var(--font-body);
}

.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-export-excel,
.btn-export-csv,
.btn-export-audit {
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--dur-base) var(--ease-out);
}
.btn-export-excel { background: #10b981; color: #ffffff; }
.btn-export-excel:hover { background: #059669; transform: translateY(-1px); }
.btn-export-csv   { background: #3b82f6; color: #ffffff; }
.btn-export-csv:hover   { background: #2563eb; transform: translateY(-1px); }
.btn-export-audit { background: #8b5cf6; color: #ffffff; }
.btn-export-audit:hover { background: #7c3aed; transform: translateY(-1px); }

/* ============================================================
   WORKLOAD TAB STYLES
   ============================================================ */
.wl-tab {
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base);
  font-family: var(--font-heading) !important;
}
.wl-tab:hover { color: var(--brand-300) !important; }

/* ============================================================
   INLINE FORM ELEMENTS (inside sections, not modal)
   Always white bg → dark text
   ============================================================ */
section input[type="text"],
section input[type="date"],
section input[type="number"],
section input[type="email"],
section input[type="password"],
section select,
section textarea {
  background: rgba(255,255,255,0.97) !important;
  color: var(--n-900) !important;
  border: 1.5px solid rgba(255,255,255,0.25) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
}
section select option { color: var(--n-900) !important; background: #ffffff !important; }
section input::placeholder,
section textarea::placeholder { color: var(--n-400) !important; }
section input:focus,
section select:focus,
section textarea:focus {
  outline: none !important;
  border-color: var(--brand-400) !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.18) !important;
  background: #ffffff !important;
}

/* ============================================================
   INFO / ALERT BOXES (used in create-task, workload etc.)
   ============================================================ */
section [style*="background:#fef3c7"],
section [style*="background: #fef3c7"] {
  color: #78350f !important;
}
section [style*="background:#dbeafe"],
section [style*="background: #dbeafe"] {
  color: #1e3a5f !important;
}
section [style*="background:#f0f9ff"],
section [style*="background: #f0f9ff"] {
  color: #0c4a6e !important;
}

/* Stats summary cards (white bg in workload-recap) */
section [style*="background:#fff"],
section [style*="background: #fff"],
section [style*="background:white"],
section [style*="background: white"] {
  color: var(--n-800) !important;
}
section [style*="background:#fff"] *,
section [style*="background: #fff"] *,
section [style*="background:white"] *,
section [style*="background: white"] * {
  color: inherit;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 250px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .sidebar {
    position: fixed;
    left: -100%;
    z-index: 999;
    width: 280px;
    transition: left var(--dur-base) var(--ease-out);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
  }
  .sidebar.show { left: 0; }

  .main-content { margin-left: 0; width: 100%; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .chart-grid   { grid-template-columns: 1fr; }

  .user-info > div:last-child { display: none; }
  .styled-table { min-width: 680px; }

  .detail-row { flex-direction: column; gap: 4px; }
  .detail-label { width: 100%; }

  .clock-date { display: none; }
  .clock-time { font-size: 13px; }
  .topbar-clock { padding: 7px 10px; }
}

@media (max-width: 480px) {
  .stats-grid   { grid-template-columns: 1fr; }
  .styled-table { min-width: 600px; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; }
  .topbar-clock { display: none; }
  .topbar h1    { font-size: 14px; }
  .page-header  { flex-direction: column; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
*:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 3px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.hidden      { display: none !important; }
.w-full      { width: 100%; }

/* ============================================================
   WORKLOAD RECAP — FIX: INLINE TABLE ROWS & URAIAN TUGAS
   The JS renders rows without .styled-table class, using
   inline padding styles. We must force dark text on white bg.
   ============================================================ */

/* ── All rows in workload tbody (no .styled-table class) ─── */
#workloadRecapBody tr td,
#workloadTableBody tr td {
  color: #1e293b !important;
  background-color: #ffffff !important;
}
#workloadRecapBody tr:nth-child(even) td,
#workloadTableBody tr:nth-child(even) td {
  background-color: #f8fafc !important;
}
#workloadRecapBody tr:hover td,
#workloadTableBody tr:hover td {
  background-color: #eff6ff !important;
}

/* Overload highlight override */
#workloadRecapBody tr[style*="background:#fff5f5"] td {
  background-color: #fff5f5 !important;
}

/* ── Uraian Tugas expand panel ───────────────────────────── */
#uraianTugasPanel {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
}

#uraianTugasPanelTitle {
  color: #0f172a !important;
}

/* Every element inside the uraian content area */
#uraianTugasContent,
#uraianTugasContent p,
#uraianTugasContent span,
#uraianTugasContent div,
#uraianTugasContent strong,
#uraianTugasContent td,
#uraianTugasContent th,
#uraianTugasContent tr {
  color: #1e293b !important;
}

#uraianTugasContent table {
  background: #ffffff !important;
}

#uraianTugasContent thead th {
  color: #475569 !important;
  background: #f1f5f9 !important;
}

#uraianTugasContent tbody td {
  color: #1e293b !important;
  background: #ffffff !important;
}

#uraianTugasContent tfoot td {
  color: #0f172a !important;
  background: #f8fafc !important;
  font-weight: 700;
}

/* Blue total value in uraian tfoot */
#uraianTugasContent tfoot td[style*="color:#3b82f6"] {
  color: #1d4ed8 !important;
}

/* ── White summary/stat cards in workload-recap section ──── */
#workload-recapSection > div[style*="display:grid"] > div[style*="background:#fff"],
#workload-recapSection > div[style*="display:grid"] > div[style*="background: #fff"] {
  color: #1e293b !important;
}

/* The big stat numbers */
#totalMembers    { color: #1e293b !important; }
#overloadMembers { color: #dc2626 !important; }
#withinMembers   { color: #059669 !important; }
#underloadMembers{ color: #d97706 !important; }
#avgEfficiency   { color: #2563eb !important; }

/* The label below stat numbers */
#workload-recapSection > div > div > div[style*="font-size:12px;color:#64748b"] {
  color: #64748b !important;
}

/* ── WLA Info/Formula box ────────────────────────────────── */
#workload-recapSection > div[style*="background:linear-gradient"] {
  color: #1e3a5f !important;
}
#workload-recapSection > div[style*="background:linear-gradient"] h4 {
  color: #1d4ed8 !important;
}
#workload-recapSection > div[style*="background:linear-gradient"] strong {
  color: #1d4ed8 !important;
}
#workload-recapSection > div[style*="background:linear-gradient"] p {
  color: #475569 !important;
}
/* Formula bar (white card inside info box) */
#workload-recapSection > div[style*="background:linear-gradient"] > div[style*="margin-top:12px"] {
  color: #374151 !important;
}
#workload-recapSection > div[style*="background:linear-gradient"] > div[style*="margin-top:12px"] span {
  color: #374151 !important;
}
#workload-recapSection [style*="color:#dc2626"] { color: #dc2626 !important; }
#workload-recapSection [style*="color:#059669"] { color: #059669 !important; }
#workload-recapSection [style*="color:#d97706"] { color: #d97706 !important; }

/* ── Tab navigation (sits on dark bg) ───────────────────── */
#workload-recapSection [style*="border-bottom:2px solid #e2e8f0"],
#workload-recapSection [style*="border-bottom: 2px solid #e2e8f0"] {
  border-bottom-color: rgba(255,255,255,0.12) !important;
}

/* Active wl-tab label color */
.wl-tab[data-tab] { font-family: 'DM Sans', sans-serif !important; }

/* ── Compare tab white tables ────────────────────────────── */
#compareTableBody td {
  color: #1e293b !important;
  background: #ffffff !important;
}
#compareTableBody tr:hover td { background: #f0f4ff !important; }
#compareTableBody [style*="color:#ef4444"] { color: #ef4444 !important; }
#compareTableBody [style*="color:#10b981"] { color: #10b981 !important; }
#compareTableBody [style*="color:#f59e0b"] { color: #f59e0b !important; }
#compareTableBody [style*="color:#94a3b8"] { color: #94a3b8 !important; }
#compareTableBody [style*="color:#64748b"] { color: #64748b !important; }
#compareSummaryCards > div { color: #1e293b !important; }
#compareSummaryCards [style*="color:#ef4444"] { color: #ef4444 !important; }
#compareSummaryCards [style*="color:#10b981"] { color: #10b981 !important; }
#compareSummaryCards [style*="color:#64748b"] { color: #64748b !important; }

/* ── Sub-dept tab white tables ───────────────────────────── */
#subDeptTableBody td {
  color: #1e293b !important;
  background: #ffffff !important;
}
#subDeptTableBody tr:hover td { background: #f0f4ff !important; }
#subDeptTableBody [style*="color:#ef4444"] { color: #ef4444 !important; }
#subDeptTableBody [style*="color:#10b981"] { color: #10b981 !important; }
#subDeptTableBody [style*="color:#f59e0b"] { color: #f59e0b !important; }

/* ── Chart cards inside tab-wl-charts ───────────────────── */
#tab-wl-charts > div > div[style*="background:#fff"] h4 {
  color: #1e293b !important;
}

/* ── Rebalancing cards (all white/light bg) ──────────────── */
#rebalanceCards > div { color: #1e293b !important; }
#rebalanceCards strong { color: inherit !important; }

/* Keep explicit inline colors intact inside rebalance */
#rebalanceCards [style*="color:#ef4444"]  { color: #ef4444  !important; }
#rebalanceCards [style*="color:#10b981"]  { color: #10b981  !important; }
#rebalanceCards [style*="color:#f59e0b"]  { color: #f59e0b  !important; }
#rebalanceCards [style*="color:#1e293b"]  { color: #1e293b  !important; }
#rebalanceCards [style*="color:#64748b"]  { color: #64748b  !important; }
#rebalanceCards [style*="color:#475569"]  { color: #475569  !important; }
#rebalanceCards [style*="color:#92400e"]  { color: #92400e  !important; }
#rebalanceCards [style*="color:#94a3b8"]  { color: #94a3b8  !important; }

/* ── Badges on white rows — legible dark variants ──────── */
#workloadRecapBody td .badge.primary { background:#e0e7ff; color:#3730a3 !important; border-color:#a5b4fc; }
#workloadRecapBody td .badge.info    { background:#e0f2fe; color:#0c4a6e !important; border-color:#7dd3fc; }
#workloadRecapBody td .badge.warning { background:#fef3c7; color:#92400e !important; border-color:#fcd34d; }
#workloadRecapBody td .badge.danger  { background:#fee2e2; color:#991b1b !important; border-color:#fca5a5; }
#workloadRecapBody td .badge.success { background:#d1fae5; color:#065f46 !important; border-color:#6ee7b7; }

/* Keep explicit bar / percentage colors in rows */
#workloadRecapBody [style*="color:#ef4444"] { color: #ef4444 !important; }
#workloadRecapBody [style*="color:#10b981"] { color: #10b981 !important; }
#workloadRecapBody [style*="color:#f59e0b"] { color: #f59e0b !important; }
#workloadRecapBody [style*="color:#94a3b8"] { color: #94a3b8 !important; }
#workloadRecapBody [style*="color:#374151"] { color: #374151 !important; }
#workloadRecapBody [style*="color:#3b82f6"] { color: #2563eb !important; }

/* thead stays on dark glass bg */
#workload-recapSection table thead th {
  color: rgba(255,255,255,0.55) !important;
  background: rgba(255,255,255,0.06) !important;
}

/* ── Section inline inputs/selects (filter bar) ──────────── */
#filterWorkloadMonth,
#filterWorkloadDept,
#filterWorkloadStatus,
#filterWorkloadName,
#compareMonth1,
#compareMonth2,
#compareDept {
  background: rgba(255,255,255,0.97) !important;
  color: #1e293b !important;
}

/* ============================================================
   FINAL FIX: WORKLOAD RECAP & URAIAN TUGAS — THEAD HEADERS
   Force dark text on light background for ALL table headers
   inside workload-recapSection and uraianTugasPanel
   ============================================================ */

/* ── Workload Recap main table thead ──────────────────────── */
#tab-wl-table table thead tr,
#tab-wl-table table thead th {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

/* The inline-styled table inside workload recap (no class) */
#workload-recapSection table thead tr {
  background: #f1f5f9 !important;
}
#workload-recapSection table thead th {
  color: #334155 !important;
  background: #f1f5f9 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Override the earlier rule that set thead white/transparent */
#workload-recapSection .table-card table thead th,
#workload-recapSection div table thead th {
  color: #334155 !important;
  background: #f1f5f9 !important;
}

/* ── Uraian Tugas panel thead ─────────────────────────────── */
#uraianTugasPanel table thead tr {
  background: #e2e8f0 !important;
}
#uraianTugasPanel table thead th,
#uraianTugasContent table thead th,
#uraianTugasContent thead th {
  color: #334155 !important;
  background: #e2e8f0 !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 12px !important;
}

/* ── Compare tab table thead ─────────────────────────────── */
#tab-wl-compare table thead th {
  color: #334155 !important;
  background: #f1f5f9 !important;
}

/* ── Sub-dept tab table thead ────────────────────────────── */
#tab-wl-subdept table thead th {
  color: #334155 !important;
  background: #f1f5f9 !important;
}

/* ── Workload Analysis section thead ─────────────────────── */
#workloadSection table thead th {
  color: #334155 !important;
  background: #f1f5f9 !important;
}

/* ── Strength bar ── */
.cp-bar-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.cp-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width .3s ease, background .3s ease;
}
.cp-strength-label {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* ── Eye toggle ── */
.cp-input-wrap {
  position: relative;
}
.cp-input-wrap .form-input {
  padding-right: 40px;
}
.cp-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  font-size: 14px;
  line-height: 1;
}
.cp-eye:hover { color: #374151; }

/* ── Alert ── */
.cp-alert {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.cp-alert.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.cp-alert.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ── Info box ── */
.cp-info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #1e40af;
  margin-top: 4px;
  line-height: 1.6;
}

/* ── Ganti Password button di profile ── */
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ============================================================
   MODAL GANTI PASSWORD — HAPUS BLOK #changePasswordModal LAMA
   Ganti dengan ini:
   ============================================================ */

/* State: tersembunyi (default) */
#changePasswordModal.cp-modal-hidden {
  display: none !important;
}

/* State: tampil */
#changePasswordModal.cp-modal-show {
  display: flex !important;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Container modal */
#changePasswordModal .modal-container {
  position: relative;
  margin: 0 auto;
  width: 90%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(20, 18, 50, 0.96);
  backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: modalPop 0.4s var(--ease-spring) both;
}

/* Input fields */
#changePasswordModal .form-input {
  width: 100%;
  padding: 13px 40px 13px 16px;
  background: rgba(255, 255, 255, 0.97) !important;
  color: var(--n-900) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: var(--radius-md) !important;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all var(--dur-base) var(--ease-out);
}
#changePasswordModal .form-input:focus {
  outline: none !important;
  background: #ffffff !important;
  border-color: var(--brand-400) !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2) !important;
}

/* Label */
#changePasswordModal .form-label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#changePasswordModal .form-group { margin-bottom: 20px; }

/* Header */
#changePasswordModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
#changePasswordModal .modal-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}
#changePasswordModal .modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--dur-base) var(--ease-out);
}
#changePasswordModal .modal-close:hover {
  background: rgba(220, 38, 38, 0.4);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Body & Footer */
#changePasswordModal .modal-body   { padding: 24px 28px; }
#changePasswordModal .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}