/* ================================================================
   PORTAL ADMIN SIPALARUS - SISTEM PASPOR HILANG DAN RUSAK
   Seksi Intelijen dan Penindakan Keimigrasian (INTELDAKIM)
   Kantor Imigrasi Kelas I TPI Tanjungpinang
   ================================================================ */

/* ── 1. TOKENS & SYSTEM VARIABLES ──────────────────────────────── */
:root {
  /* Indonesian Immigration Deep Navy Palette */
  --navy-950: #050a14;
  --navy-900: #070d18;
  --navy-850: #0b1424;
  --navy-800: #0f1c32;
  --navy-750: #14243f;
  --navy-700: #192d4f;
  --navy-650: #203964;
  --navy-600: #27477c;
  --navy-500: #335998;

  /* Government Sky & Steel Accent */
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;

  /* Official Insignia Gold & Amber */
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  /* Semantic Status Colors */
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;

  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;

  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;

  /* Active Theme Semantic Tokens (Default: Dark Mode) */
  --bg: #070d18;
  --bg-alt: #0b1424;
  --surface: #0f1c32;
  --surface-raised: #14243f;
  --surface-overlay: #192d4f;
  --surface-accent: #203964;

  --border: rgba(56, 189, 248, 0.12);
  --border-muted: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(56, 189, 248, 0.32);
  --border-focus: #0284c7;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #070d18;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.65);
  --shadow-inner-border: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Dimensions & Scales */
  --sidebar-w: 264px;
  --sidebar-collapsed-w: 76px;
  --topbar-h: 64px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.38s cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* Light Mode Variables */
body.light-mode {
  --bg: #f3f6fa;
  --bg-alt: #e7edf5;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-overlay: #edf2f7;
  --surface-accent: #e2e8f0;

  --border: rgba(15, 35, 60, 0.10);
  --border-muted: rgba(15, 35, 60, 0.06);
  --border-strong: rgba(2, 132, 199, 0.28);
  --border-focus: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.12);
  --shadow-inner-border: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ── 2. BASE RESET & ACCESSIBILITY ─────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 13.5px;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--navy-650);
  border-radius: var(--radius-full);
}
body.light-mode ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* ── 3. SPLASH SCREEN ──────────────────────────────────────────── */
#splashScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--navy-950);
  padding: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#splashScreen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
}

.splash-emblem-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.splash-logo {
  width: 76px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.splash-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--sky-400);
  animation: spin 2.2s linear infinite;
}

.splash-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.splash-acronym-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.splash-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sky-400);
  margin-bottom: 4px;
}

.splash-badge {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.splash-spinner-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 28, 50, 0.7);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius-full);
}

.splash-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--sky-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.splash-loading-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── 4. LOGIN PAGE ─────────────────────────────────────────────── */
#loginPage {
  display: none;
  min-height: 100dvh;
  position: relative;
  background: var(--navy-950);
  color: #ffffff;
  overflow: hidden;
}

#loginPage.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-mesh {
  position: absolute;
  width: 700px;
  height: 700px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.14) 0%, rgba(7, 13, 24, 0) 70%);
  filter: blur(40px);
}

.login-glow-center {
  position: absolute;
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, rgba(7, 13, 24, 0) 70%);
  filter: blur(50px);
}

.login-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--navy-850);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), var(--shadow-inner-border);
  overflow: hidden;
}

.login-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(7, 13, 24, 0.6);
  border-bottom: 1px solid var(--border);
}

.gov-pill {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.secure-badge {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.imigrasi-emblem {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-750) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(14, 165, 233, 0.12);
}

.imigrasi-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.login-brand {
  display: flex;
  flex-direction: column;
}

.login-brand h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.2;
}

.login-system-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.agency-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sky-400);
  line-height: 1.3;
}

.division-title {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.login-body {
  padding: 24px;
}

.login-lead h2 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.login-lead p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 18px;
}

.attempt-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 7px 12px;
  background: rgba(7, 13, 24, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.attempt-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.attempt-bar {
  display: flex;
  gap: 5px;
}

.attempt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky-500);
  transition: background 0.2s ease;
}

.attempt-dot.used {
  background: #334155;
}

.lfield {
  margin-bottom: 16px;
}

.lfield label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: var(--navy-800);
  border: 1px solid var(--border);
  color: #ffffff;
  padding: 10px 14px 10px 42px;
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  background: var(--navy-750);
}

.pw-toggle {
  position: absolute;
  right: 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.pw-toggle:hover {
  color: #ffffff;
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--sky-600) 0%, var(--sky-700) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  margin-top: 6px;
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--sky-500) 0%, var(--sky-600) 100%);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

.login-btn:active {
  transform: scale(0.98);
}

.login-err {
  display: none;
  font-size: 11.5px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  text-align: center;
}

.login-err.show {
  display: block;
}

.lockout-bar {
  display: none;
  margin-top: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.lockout-bar.show {
  display: block;
}

.lockout-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lockout-fill {
  height: 100%;
  background: var(--red-500);
  transition: width 1s linear;
}

.lockout-text {
  font-size: 11.5px;
  color: var(--red-400);
  text-align: center;
  font-weight: 600;
}

.login-footer {
  padding: 14px 20px;
  background: rgba(7, 13, 24, 0.4);
  border-top: 1px solid var(--border);
  text-align: center;
}

.login-footer p {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── 5. ADMIN SHELL & CORE LAYOUT ──────────────────────────────── */
#adminShell {
  display: none;
  min-height: 100vh;
  position: relative;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.65);
  backdrop-filter: blur(4px);
  z-index: 80;
}

.sidebar-overlay.show {
  display: block;
}

/* ── 6. SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: width var(--transition-normal), transform var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sl-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(15, 28, 50, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.18);
}

.sl-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sl-text h2 {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1.15;
}

body.light-mode .sl-text h2 {
  color: var(--navy-900);
}

.sl-tag {
  font-size: 8.5px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Sidebar collapse support */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
}
.sidebar.collapsed .sl-text,
.sidebar.collapsed .auto-refresh-widget,
.sidebar.collapsed .command-trigger-btn,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-sub-kbd,
.sidebar.collapsed .officer-info,
.sidebar.collapsed .logout-btn {
  display: none !important;
}
.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}
.sidebar.collapsed .officer-card {
  padding: 8px 0;
  justify-content: center;
}

/* Sidebar collapse button — stays visible in collapsed mode */
.sidebar.collapsed .sidebar-pin-btn {
  display: flex !important;
  width: 34px;
  height: 34px;
  margin: 12px auto 0;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}
.sidebar.collapsed .sidebar-pin-btn .collapse-icon {
  transform: rotate(180deg);
}

/* ── Topbar & Main Content follow sidebar collapse ── */
.sidebar.collapsed ~ .topbar {
  left: var(--sidebar-collapsed-w);
}
.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed-w);
}


/* ── Navigation History Arrows ── */
.nav-history-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
}
.nav-history-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}
.nav-history-btn:hover:not(:disabled) {
  background: var(--surface-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.nav-history-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.nav-history-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-pin-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-secondary);
  border: 1px solid var(--border-muted);
}
.sidebar-pin-btn:hover {
  background: var(--surface-raised);
  color: var(--text-primary);
}

.auto-refresh-widget {
  padding: 10px 14px;
  margin: 12px 14px 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ar-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ar-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.ar-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
}

.ar-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.ar-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--sky-500);
  transition: width 1s linear;
}

.command-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 14px 12px;
  padding: 8px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 11.5px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.command-trigger-btn:hover {
  background: var(--surface-overlay);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.ct-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.nav {
  flex: 1;
  padding: 0 10px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all var(--transition-fast);
  margin-bottom: 3px;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface-raised);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.16) 0%, rgba(2, 132, 199, 0.05) 100%);
  color: var(--sky-400);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-item.active .nav-icon {
  background: var(--sky-600);
  color: #ffffff;
  border-color: var(--sky-400);
}

.nav-label {
  flex: 1;
}

.nav-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(2, 132, 199, 0.15);
  color: var(--sky-400);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.nav-badge.orange {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange-400);
  border-color: rgba(249, 115, 22, 0.25);
}

.nav-sub-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.officer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.officer-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy-650);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.officer-initial {
  font-size: 13px;
  font-weight: 800;
  color: var(--sky-400);
}

.officer-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  border: 1.5px solid var(--surface);
}

.officer-info {
  flex: 1;
  min-width: 0;
}

.officer-info h4 {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.officer-role {
  font-size: 9.5px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.officer-session {
  font-size: 9px;
  color: var(--text-muted);
}

.logout-btn {
  font-size: 10px;
  font-weight: 700;
  color: var(--red-400);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background: var(--red-600);
  color: #ffffff;
}

/* ── 7. TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-w);
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 70;
  transition: left var(--transition-normal);
  box-shadow: var(--shadow-sm);
  will-change: left;
}

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

.menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
}

.hamburger-bar {
  width: 16px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

.topbar-title-block {
  display: flex;
  flex-direction: column;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.bc-brand {
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.bc-sep {
  color: var(--border-strong);
}

.bc-current {
  color: var(--sky-400);
}

.topbar h1 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.topbar-center {
  display: flex;
  align-items: center;
}

.quick-stats-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.strip-dot.green { background: var(--green-500); }

.strip-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: var(--sky-400);
}

.strip-sep {
  color: var(--border);
}

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

.online-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
}

.osc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-500);
}

.online-status-chip.offline .osc-dot {
  background: var(--red-500);
}

.live-clock-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0 4px;
}

.clock-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.topbar-btn:hover {
  background: var(--surface-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.refresh-action-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--sky-600);
  border: 1px solid var(--sky-400);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast);
}

.refresh-action-btn:hover {
  background: var(--sky-500);
}

.refresh-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: none;
}

.refresh-action-btn.spinning .refresh-spinner {
  display: block;
  animation: spin 0.7s linear infinite;
}

/* ── 8. MAIN CONTENT WRAPPER ───────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  padding: calc(var(--topbar-h) + 20px) 24px 40px;
  min-height: 100vh;
  transition: margin-left var(--transition-normal);
  will-change: margin-left;
}

.page-view {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.page-view.active {
  display: block;
}

/* ── 9. DASHBOARD VIEW STYLING ─────────────────────────────────── */
.dashboard-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-raised) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--shadow-inner-border);
  margin-bottom: 20px;
}

.dhb-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.dhb-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.dhb-badge-outline {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sky-400);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.dhb-badge-gold {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.dhb-content h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dhb-content p {
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 650px;
}

.dhb-meta-card {
  flex-shrink: 0;
  text-align: right;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.dhb-meta-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dhb-meta-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-400);
  margin: 3px 0 8px;
}

.dhb-quick-btn {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--sky-600);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.dhb-quick-btn:hover { background: var(--sky-500); }

/* Stat Overview Grid */
.stat-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.stat-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tile-icon-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--sky-400);
}

.tile-icon-badge.yellow {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-400);
}

.tile-icon-badge.blue {
  background: rgba(2, 132, 199, 0.12);
  color: var(--sky-400);
}

.tile-icon-badge.green {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-400);
}

.tile-icon-badge.orange {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange-400);
}

.tile-ratio {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-tile-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-tile-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Dashboard Split Grid (Agenda + Recent Table) */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.cph-title-group h2,
.cph-title-group h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.cph-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.cph-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agenda-date-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky-400);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.dash-filter-chips {
  display: flex;
  gap: 4px;
}

.filter-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--sky-600);
  color: #ffffff;
  border-color: var(--sky-400);
}

.panel-link-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-400);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.panel-link-btn:hover {
  text-decoration: underline;
}

/* Today's Queue Agenda Widget */
.agenda-queue-list {
  padding: 12px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agenda-item-card {
  padding: 10px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

.agenda-item-card:hover {
  border-color: var(--border-strong);
  transform: translateX(2px);
}

.agenda-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.agenda-sesi-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(2, 132, 199, 0.15);
  color: var(--sky-400);
}

.agenda-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.agenda-item-type {
  font-size: 11px;
  color: var(--text-muted);
}

.agenda-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── 10. DATA TABLES ───────────────────────────────────────────── */
.table-responsive-wrapper {
  overflow-x: auto;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--surface-raised);
  padding: 10px 14px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-muted);
  vertical-align: middle;
  font-size: 12.5px;
  color: var(--text-primary);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: var(--surface-raised);
}

.data-table tbody tr.row-selected {
  background: rgba(2, 132, 199, 0.08);
}

.t-reg-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.08);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.15);
}

.t-name-cell {
  font-weight: 700;
  color: var(--text-primary);
}

.t-sub-info {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.t-phone-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.status-pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.status-pill.wait {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-400);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.status-pill.wait .status-pill-dot { background: var(--amber-400); }

.status-pill.conf {
  background: rgba(2, 132, 199, 0.12);
  color: var(--sky-400);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.status-pill.conf .status-pill-dot { background: var(--sky-400); }

.status-pill.done {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-400);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.status-pill.done .status-pill-dot { background: var(--green-400); }

.status-pill.rs {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange-400);
  border: 1px solid rgba(249, 115, 22, 0.25);
}
.status-pill.rs .status-pill-dot { background: var(--orange-400); }

.status-pill.reject {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red-400);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.status-pill.reject .status-pill-dot { background: var(--red-400); }

/* Table Action Buttons */
.table-btn-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.tbl-action-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.tbl-action-btn:hover {
  background: var(--surface-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.tbl-action-btn.wa {
  color: var(--green-400);
  border-color: rgba(34, 197, 94, 0.25);
}
.tbl-action-btn.wa:hover {
  background: var(--green-600);
  color: #ffffff;
}

.tbl-action-btn.danger {
  color: var(--red-400);
  border-color: rgba(239, 68, 68, 0.25);
}
.tbl-action-btn.danger:hover {
  background: var(--red-600);
  color: #ffffff;
}

.tbl-action-btn.approve {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-400);
  border-color: rgba(34, 197, 94, 0.35);
}
.tbl-action-btn.approve:hover {
  background: var(--green-600);
  color: #ffffff;
}

.tbl-action-btn.reject {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red-400);
  border-color: rgba(239, 68, 68, 0.3);
}
.tbl-action-btn.reject:hover {
  background: var(--red-600);
  color: #ffffff;
}

/* Loading & Empty States in Tables */
.table-loader-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 38px 16px;
  color: var(--sky-400);
  font-size: 12.5px;
  font-weight: 600;
}

.spinner-circle {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--sky-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.table-empty-state {
  text-align: center;
  padding: 44px 16px;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── 11. PENDAFTAR PAGE CONTROLS ───────────────────────────────── */
.database-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-ico-label {
  position: absolute;
  left: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.search-input-box input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 7px 12px 7px 46px;
  border-radius: var(--radius);
  font-size: 12px;
  width: 250px;
  transition: all var(--transition-fast);
}

.search-input-box input:focus {
  width: 290px;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-shortcut-tag {
  position: absolute;
  right: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  pointer-events: none;
}

.control-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.control-select.compact {
  padding: 4px 8px;
  font-size: 11px;
}

.primary-btn {
  background: var(--sky-600);
  border: 1px solid var(--sky-400);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all var(--transition-fast);
}

.primary-btn:hover {
  background: var(--sky-500);
}

.primary-btn.compact {
  padding: 5px 10px;
  font-size: 11px;
}

.neutral-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.neutral-btn:hover {
  background: var(--surface-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.neutral-btn.compact {
  padding: 5px 10px;
  font-size: 11px;
}

/* Timeline Filter Strip */
.timeline-filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.tfs-left, .tfs-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tfs-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.filter-month-chips-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.month-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.month-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.month-chip.active {
  background: var(--sky-600);
  color: #ffffff;
  border-color: var(--sky-400);
}

.active-filter-indicator {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--sky-400);
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.reset-filter-btn {
  font-size: 10px;
  font-weight: 700;
  color: var(--red-400);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Bulk Selection Action Bar */
.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.15) 0%, rgba(2, 132, 199, 0.06) 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
}

.bab-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.bab-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  color: var(--sky-400);
  background: rgba(2, 132, 199, 0.2);
  padding: 2px 7px;
  border-radius: 4px;
}

.bab-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bab-btn {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--sky-600);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sky-400);
}
.bab-btn:hover { background: var(--sky-500); }

.bab-btn-clear {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 4px 8px;
}
.bab-btn-clear:hover { color: var(--text-primary); }

/* Pagination Footer Bar */
.pagination-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
}

.pg-status-info {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.pg-controls-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pg-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.pg-btn:hover:not(:disabled) {
  background: var(--surface-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.pg-btn.active {
  background: var(--sky-600);
  color: #ffffff;
  border-color: var(--sky-400);
}

.pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── 12. RESCHEDULE VIEW STYLING ───────────────────────────────── */
.tab-pill-group {
  display: flex;
  gap: 5px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tab-pill-btn {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tab-pill-btn:hover {
  color: var(--text-primary);
}

.tab-pill-btn.active {
  background: var(--sky-600);
  color: #ffffff;
}

.rs-jadwal-stack {
  display: flex;
  flex-direction: column;
}

.rs-date-text {
  font-weight: 600;
}

.rs-time-text {
  font-size: 10.5px;
  color: var(--text-muted);
}

.rs-new-target {
  color: var(--orange-400);
  font-weight: 700;
}

/* ── 13. REKAP & LAPORAN STYLING ───────────────────────────────── */
.rekap-top-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.rtc-content h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.rtc-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.recap-analytical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.analytics-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.analytics-card.full-width-card {
  grid-column: 1 / -1;
}

.analytics-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.analytics-card-header h3 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.ach-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-bars-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recap-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.rmr-label {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rmr-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.rmr-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--sky-400);
}

.recap-progress-track {
  height: 7px;
  background: var(--surface-raised);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  overflow: hidden;
}

.recap-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s var(--transition-normal);
}

/* ── 14. DETAIL APPLICANT MODAL ────────────────────────────────── */
#modalOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#modalOverlay.show {
  display: flex;
}

.modal-dialog-box {
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-inner-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter 0.25s var(--transition-normal);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mhb-emblem img {
  width: 38px;
  height: auto;
}

.mhb-title-wrap {
  flex: 1;
  min-width: 0;
}

.mhb-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.mhb-reg-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-400);
}

.mhb-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.mhb-title-wrap h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mhb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-tool-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.modal-tool-btn:hover {
  background: var(--surface-overlay);
  color: var(--text-primary);
}

.modal-close-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Modal Tab Nav */
.modal-tab-nav {
  display: flex;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
  flex-shrink: 0;
  overflow-x: auto;
}

.modal-nav-tab {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.modal-nav-tab:hover {
  color: var(--text-primary);
}

.modal-nav-tab.active {
  color: var(--sky-400);
  border-bottom-color: var(--sky-400);
}

.tab-count-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: var(--surface-overlay);
}

/* Modal Scroll Body */
.modal-scroll-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-tab-panel {
  display: none;
}

.modal-tab-panel.active {
  display: block;
}

/* Details Grid Tab */
.profile-details-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.data-group-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.dgc-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-400);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-muted);
  padding-bottom: 6px;
}

.field-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.field-item {
  display: flex;
  flex-direction: column;
}

.field-item.full-span {
  grid-column: 1 / -1;
}

.fi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.fi-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.fi-value.mono {
  font-family: 'JetBrains Mono', monospace;
}

.fi-value.highlight {
  color: var(--sky-400);
  font-weight: 700;
}

.fi-value.strong-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.fi-phone-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-wa-btn {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-400);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.inline-wa-btn:hover {
  background: var(--green-600);
  color: #ffffff;
}

.category-tag {
  color: var(--sky-400);
  font-weight: 700;
}

.schedule-tag {
  color: var(--amber-400);
  font-weight: 700;
}

.text-block {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.schedule-success-card {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.05);
}

.ss-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--green-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ss-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--green-400);
  margin-top: 2px;
}

.ss-content p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.ss-date-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 800;
  color: var(--green-400);
  margin-top: 6px;
}

/* ── 15. DOCUMENT STUDIO TAB ───────────────────────────────────── */
.doc-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.doc-studio-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.doc-studio-header p {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.doc-studio-legend {
  display: flex;
  gap: 10px;
}

.legend-item {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.legend-item.available {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-400);
}

.legend-item.missing {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.doc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.doc-item-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.doc-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.dih-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-stage-area {
  position: relative;
  height: 180px;
  background: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.doc-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.doc-action-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
}

.doc-tool-pill {
  font-size: 10px;
  font-weight: 700;
  background: rgba(5, 10, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}
.doc-tool-pill:hover { background: var(--sky-600); }

.doc-missing-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 11.5px;
}

/* ── 16. STATUS DECISION TAB ───────────────────────────────────── */
.status-decision-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sdp-title-block h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.sdp-title-block p {
  font-size: 12px;
  color: var(--text-secondary);
}

.status-selection-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.status-card-opt {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  transition: all var(--transition-fast);
}

.status-card-opt:hover {
  border-color: var(--border-strong);
}

.sco-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  margin-top: 2px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.sco-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.sco-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.status-card-opt.selected-wait {
  border-color: var(--amber-500);
  background: rgba(245, 158, 11, 0.08);
}
.status-card-opt.selected-wait .sco-radio {
  border-color: var(--amber-400);
  background: var(--amber-400);
}

.status-card-opt.selected-conf {
  border-color: var(--sky-400);
  background: rgba(2, 132, 199, 0.1);
}
.status-card-opt.selected-conf .sco-radio {
  border-color: var(--sky-400);
  background: var(--sky-400);
}

.status-card-opt.selected-done {
  border-color: var(--green-500);
  background: rgba(34, 197, 94, 0.08);
}
.status-card-opt.selected-done .sco-radio {
  border-color: var(--green-400);
  background: var(--green-400);
}

.status-completed-notice {
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--green-400);
  font-weight: 600;
}

.foto-ulang-card {
  padding: 16px;
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
}

.fuc-header h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--green-400);
  margin-bottom: 2px;
}

.fuc-header p {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.fuc-form-row {
  display: flex;
  gap: 12px;
}

.date-select-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-select-cell label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.officer-notes-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.on-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.on-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.on-textarea {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
}

.on-textarea:focus {
  border-color: var(--border-focus);
}

/* ── 17. WHATSAPP TEMPLATE TAB ─────────────────────────────────── */
.wa-generator-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}

.wa-template-selector h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.wa-preset-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-preset-btn {
  padding: 10px 12px;
  text-align: left;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.wa-preset-btn:hover {
  background: var(--surface-overlay);
  color: var(--text-primary);
}

.wa-preset-btn.active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: var(--green-400);
  font-weight: 700;
}

.wa-preview-box {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wpb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wpb-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--sky-400);
}

.wpb-target {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.wa-text-editor {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.wpb-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.wa-tool-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
.wa-tool-btn:hover {
  background: var(--surface-overlay);
}

.wa-primary-send-btn {
  font-size: 12px;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: var(--radius);
  background: var(--green-600);
  border: 1px solid var(--green-400);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
  transition: all var(--transition-fast);
}
.wa-primary-send-btn:hover {
  background: var(--green-500);
}

/* Modal Footer Bar */
.modal-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.danger-btn-ghost {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--red-400);
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
}
.danger-btn-ghost:hover {
  background: var(--red-600);
  color: #ffffff;
}

.primary-save-btn {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  background: var(--sky-600);
  border: 1px solid var(--sky-400);
  padding: 8px 18px;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(2, 132, 199, 0.35);
  transition: all var(--transition-fast);
}
.primary-save-btn:hover {
  background: var(--sky-500);
}

/* ── 18. COMMAND PALETTE (Ctrl+K) ──────────────────────────────── */
#commandPaletteModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}

#commandPaletteModal.show {
  display: flex;
}

.cp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.65);
  backdrop-filter: blur(6px);
}

.cp-dialog {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), var(--shadow-inner-border);
  overflow: hidden;
  animation: cpEnter 0.2s var(--transition-normal);
}

@keyframes cpEnter {
  from { opacity: 0; transform: scale(0.97) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cp-input-wrap {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.cp-search-icon {
  font-size: 9px;
  font-weight: 800;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
}

.cp-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.cp-esc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}

.cp-results-container {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.cp-group-title {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.cp-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cp-item-row:hover,
.cp-item-row.selected {
  background: var(--surface-raised);
  color: var(--sky-400);
}

.cp-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cp-item-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--sky-400);
}

.cp-footer-bar {
  padding: 9px 16px;
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ── 19. AUDIT LOG & SHORTCUTS MODALS ──────────────────────────── */
.audit-dialog-box, .shortcuts-dialog-box {
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#auditLogModal, #shortcutsModal, #deleteOverlay, #confirmOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#auditLogModal.show, #shortcutsModal.show, #deleteOverlay.show, #confirmOverlay.show {
  display: flex;
}

.audit-header, .shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
}

.audit-header h3, .shortcuts-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.audit-header p {
  font-size: 11px;
  color: var(--text-muted);
}

.audit-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 14px 18px;
}

.audit-item {
  padding: 8px 12px;
  border-left: 2px solid var(--sky-400);
  background: var(--surface-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 8px;
}

.audit-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.audit-action-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.audit-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

.audit-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.audit-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 12px;
}

.audit-footer, .shortcuts-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
}

.shortcuts-grid {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-primary);
}

.shortcut-row kbd {
  min-width: 80px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--sky-400);
  text-align: center;
}

/* ── 20. DELETE & CONFIRM DIALOGS ──────────────────────────────── */
.delete-modal-card, .confirm-dialog-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.delete-icon-wrap, .confirm-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.delete-icon-wrap {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red-400);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.confirm-icon-wrap {
  background: rgba(2, 132, 199, 0.12);
  color: var(--sky-400);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.delete-modal-card h3, .confirm-dialog-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.delete-subtext {
  font-size: 12px;
  color: var(--text-secondary);
}

.delete-target-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 6px 0 14px;
}

.delete-warning-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 11.5px;
  color: var(--red-400);
  text-align: left;
  line-height: 1.45;
  margin-bottom: 18px;
}

.delete-actions-group, .confirm-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.danger-confirm-btn {
  background: var(--red-600);
  border: 1px solid var(--red-500);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
}
.danger-confirm-btn:hover { background: #b91c1c; }

/* ── 21. LIGHTBOX ──────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.92);
  backdrop-filter: blur(8px);
  z-index: 3000;
  flex-direction: column;
}

#lightbox.show {
  display: flex;
}

.lightbox-toolbar {
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 28, 50, 0.6);
  border-bottom: 1px solid var(--border);
}

.lightbox-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-tool-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: all var(--transition-fast);
}
.lb-tool-btn:hover { background: var(--sky-600); }

.lb-tool-btn.link {
  text-decoration: none;
}

.lb-close-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  background: var(--red-600);
  color: #ffffff;
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

#lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transition: transform 0.25s ease;
}

/* ── 22. TOAST NOTIFICATIONS ───────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 5000;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: toastEnter 0.24s var(--transition-normal);
}

#toast.show {
  display: block;
}

#toast.success {
  border-left: 4px solid var(--green-500);
}

#toast.error {
  border-left: 4px solid var(--red-500);
}

#toast.info {
  border-left: 4px solid var(--sky-400);
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── 23. RESPONSIVE MEDIA QUERIES ──────────────────────────────── */
@media (max-width: 1200px) {
  .stat-overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar.collapsed ~ .topbar {
    left: 0;
  }
  .sidebar.collapsed ~ .main-content {
    margin-left: 0;
  }
  .topbar {
    left: 0;
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle {
    display: flex;
  }
  .quick-stats-strip {
    display: none;
  }
  .stat-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wa-generator-layout {
    grid-template-columns: 1fr;
  }
  .recap-analytical-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stat-overview-grid {
    grid-template-columns: 1fr;
  }
  .field-grid-three {
    grid-template-columns: 1fr;
  }
  .status-selection-cards {
    grid-template-columns: 1fr;
  }
  .doc-gallery-grid {
    grid-template-columns: 1fr;
  }
  .topbar-right .live-clock-card {
    display: none;
  }
  .dashboard-hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .dhb-meta-card {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 12px;
    width: 100%;
    text-align: left;
  }
}

/* ── 24. REDUCED MOTION PREFERENCE ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   MANAJEMEN AKUN PEMOHON (halaman admin)
   ══════════════════════════════════════════════════════════════ */
.users-hero-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px 28px;
  margin-bottom: 20px;
  background:
    radial-gradient(circle at 92% -20%, rgba(56, 189, 248, 0.28), transparent 55%),
    radial-gradient(circle at 0% 120%, rgba(245, 158, 11, 0.16), transparent 50%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-raised) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--shadow-inner-border);
}
.uhb-content { flex: 1 1 380px; min-width: 0; }
.uhb-content h2 { font-size: 21px; font-weight: 800; color: var(--text-primary); margin: 4px 0 6px; letter-spacing: -0.01em; }
.uhb-content p  { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); max-width: 640px; }
.uhb-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.uhb-actions .primary-btn, .uhb-actions .tbl-action-btn { height: 38px; }
.primary-btn.excel-btn { background: linear-gradient(135deg, var(--green-600), var(--green-700)); }
.refresh-user-btn { padding: 0 14px; font-size: 12px; }
.refresh-user-btn.spinning { opacity: 0.6; pointer-events: none; }

.users-stat-grid { grid-template-columns: repeat(4, 1fr); }
.users-stat-grid .stat-tile { position: relative; overflow: hidden; }
.users-stat-grid .stat-tile::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sky-500);
}
.users-stat-grid .tile-conf::before { background: var(--sky-400); }
.users-stat-grid .tile-done::before { background: var(--green-500); }
.users-stat-grid .tile-rs::before   { background: var(--amber-500); }

.users-table-card .card-panel-header { flex-wrap: wrap; gap: 12px; }
.database-toolbar-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.user-search-box { min-width: 260px; flex: 1 1 260px; }

.table-loader-state.error { color: var(--red-400); }

.user-row { cursor: pointer; }
.user-nik-chip {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; letter-spacing: 0.02em; color: var(--sky-400);
  background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 7px; border-radius: var(--radius-sm);
}
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-name { font-weight: 700; color: var(--text-primary); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--sky-600), var(--navy-600));
}
.user-avatar.f { background: linear-gradient(135deg, var(--amber-500), var(--orange-600)); }
.user-row-actions { display: inline-flex; gap: 5px; flex-wrap: nowrap; }

.status-pill.neutral { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); }
.status-pill.neutral .status-pill-dot { background: var(--text-muted); }

/* ── Overlay modal akun ── */
#userDetailOverlay, #userFormOverlay, #userResetPassOverlay, #userDeleteOverlay {
  display: none; position: fixed; inset: 0; z-index: 1600;
  background: rgba(5, 10, 20, 0.75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
#userDetailOverlay.show, #userFormOverlay.show, #userResetPassOverlay.show, #userDeleteOverlay.show {
  display: flex; animation: userFadeIn 0.18s ease-out;
}
@keyframes userFadeIn { from { opacity: 0; } to { opacity: 1; } }

.user-modal-box { max-width: 720px; }
.field-grid-three { grid-template-columns: repeat(2, 1fr); }
.fi-nik-row, .fi-pw-row { display: flex; align-items: center; gap: 8px; }
.password-mask { letter-spacing: 0.08em; }
.inline-copy-btn, .inline-pw-btn {
  height: 24px; padding: 0 9px; font-size: 10.5px; font-weight: 700; cursor: pointer;
  color: var(--sky-400); background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28); border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.inline-copy-btn:hover, .inline-pw-btn:hover { background: rgba(56, 189, 248, 0.2); }
.dgc-header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.dgc-header-row .dgc-title { margin-bottom: 0; flex: 1; }
.dgc-count-badge {
  font-size: 10.5px; font-weight: 700; color: var(--amber-400);
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 9px; border-radius: var(--radius-full); white-space: nowrap;
}
.user-bap-history-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.user-bap-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.user-bap-item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.ubi-reg  { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; color: var(--sky-400); }
.ubi-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.user-modal-actions-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-muted);
}
.uma-left { display: flex; gap: 8px; flex-wrap: wrap; }
.user-modal-actions-bar .tbl-action-btn { height: 34px; padding: 0 14px; font-size: 12px; }

/* ── Form tambah / edit / reset ── */
.user-form-dialog {
  width: 100%; max-width: 520px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-inner-border); overflow: hidden;
}
.user-form-dialog.compact { max-width: 440px; }
.uf-header { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.uf-header h3 { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.uf-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.uf-emblem {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; background: var(--sky-700);
}
.uf-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.uf-field { display: flex; flex-direction: column; gap: 6px; }
.uf-field label { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.uf-field input, .uf-field select {
  height: 40px; padding: 0 12px; font-size: 13.5px; font-family: inherit;
  color: var(--text-primary); background: var(--bg-alt);
  border: 1px solid var(--border-muted); border-radius: var(--radius);
  outline: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.uf-field input:focus, .uf-field select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22); }
.uf-field input:disabled { opacity: 0.6; cursor: not-allowed; }
.uf-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uf-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--surface-raised); border-top: 1px solid var(--border); }
.uf-actions button:disabled { opacity: 0.6; cursor: wait; }

.user-delete-meta { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }

@media (max-width: 1100px) { .users-stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .users-hero-banner { padding: 18px; }
  .users-stat-grid { grid-template-columns: 1fr 1fr; }
  .field-grid-three, .uf-field-grid { grid-template-columns: 1fr; }
  .user-row-actions { flex-wrap: wrap; justify-content: flex-end; }
  .user-search-box { min-width: 100%; }
}

/* perapihan tabel akun: tidak membungkus baris & aksi tidak terpotong */
#usersTable .user-name, #usersTable td { white-space: nowrap; }
#usersTable th, #usersTable td { padding-left: 10px; padding-right: 10px; }
#usersTable .tbl-action-btn { padding: 0 7px; }
#usersTable .user-row-actions { justify-content: flex-end; }
#usersTable th:last-child, #usersTable td:last-child { padding-right: 18px; }
.users-table-card .table-responsive-wrapper { overflow-x: auto; }

/* ================================================================
   MANAJEMEN JADWAL & HARI LIBUR STYLES
   ================================================================ */
.jadwal-hero-card {
  background: linear-gradient(135deg, rgba(15, 28, 50, 0.95), rgba(7, 13, 24, 0.98));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.jadwal-hero-card::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.jhc-content { max-width: 680px; }
.jhc-badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.jhc-pill {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.jhc-pill.green { background: rgba(34, 197, 94, 0.15); color: var(--green-400); border: 1px solid rgba(34, 197, 94, 0.3); }
.jhc-pill.gold { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); border: 1px solid rgba(245, 158, 11, 0.3); }
.jhc-pill.blue { background: rgba(56, 189, 248, 0.15); color: var(--sky-400); border: 1px solid rgba(56, 189, 248, 0.3); }

.jadwal-hero-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.jadwal-hero-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.jhc-actions { display: flex; align-items: center; gap: 12px; }
.gold-glow { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25); }

/* Jadwal Stat Tiles */
.jadwal-stats-grid { margin-bottom: 24px; }
.tile-red-subtle { border-left: 3px solid var(--red-500); }
.tile-green-subtle { border-left: 3px solid var(--green-500); }
.tile-yellow-subtle { border-left: 3px solid var(--amber-500); }
.tile-blue-subtle { border-left: 3px solid var(--sky-500); }

.tile-icon-badge.red { background: rgba(239, 68, 68, 0.15); color: var(--red-400); }
.tile-icon-badge.green { background: rgba(34, 197, 94, 0.15); color: var(--green-400); }
.tile-icon-badge.yellow { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }
.tile-icon-badge.blue { background: rgba(56, 189, 248, 0.15); color: var(--sky-400); }

/* Workspace Layout 2-Col */
.jadwal-workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Calendar Card */
.calendar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.cal-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.cal-nav-btn:hover {
  background: var(--surface-overlay);
  border-color: var(--border-strong);
  color: var(--sky-400);
}

.cal-month-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 140px;
  text-align: center;
}

.cal-tools-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-today-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cal-today-btn:hover {
  color: var(--text-primary);
  border-color: var(--sky-500);
}

.cal-month-input {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  outline: none;
}

/* Legend Bar */
.cal-legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.green { background: #22c55e; }
.legend-dot.red { background: #ef4444; }
.legend-dot.yellow { background: #f59e0b; }
.legend-dot.blue { background: #38bdf8; }

/* Weekdays */
.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 0;
}

.cal-weekday.weekend { color: var(--red-400); opacity: 0.85; }

/* Days Grid */
.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  background: var(--surface-raised);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  min-height: 74px;
  padding: 6px 7px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  user-select: none;
}

.cal-day:hover {
  border-color: var(--sky-400);
  background: var(--surface-overlay);
  transform: translateY(-1px);
}

.cal-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

.cal-day.weekend-day {
  background: rgba(15, 28, 50, 0.4);
}

.cal-day.today {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.cal-day.selected {
  border-color: var(--sky-400) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  box-shadow: 0 0 0 2px var(--sky-500) !important;
}

/* Day State Types */
.cal-day.holiday {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.28);
}

.cal-day.holiday .cal-day-num {
  color: var(--red-400);
}

.cal-day.partial-closed {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}

.cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-day-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-indicator-dot {
  font-size: 10px;
  line-height: 1;
}

.cal-day-label {
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--red-400);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 4px;
}

.cal-day-bookings {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
  align-self: flex-start;
  margin-top: 4px;
}

/* Day Detail Card (Right Column) */
.day-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.ddc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.ddc-day-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ddc-date-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0;
}

.ddc-date-iso {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-secondary);
}

.day-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.day-status-pill.green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-400);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.day-status-pill.red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-400);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.dsp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.ddc-section {
  margin-bottom: 20px;
}

.ddc-section-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Status Toggle Row */
.status-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-day-status {
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-day-status:hover {
  background: var(--surface-overlay);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-day-status.active-work {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--green-400);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.btn-day-status.active-holiday {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--red-400);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
}

/* Holiday Name Input */
.holiday-name-group {
  background: var(--surface-raised);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius);
  padding: 14px;
}

.hn-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hn-optional {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.hn-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.hn-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.hn-input:focus {
  outline: none;
  border-color: var(--red-400);
}

.hn-save-btn {
  background: var(--red-500);
  color: white;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.hn-save-btn:hover { background: var(--red-600); }

.holiday-info-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Sessions Control List */
.scs-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.scs-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
}

.scs-holiday-alert {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--red-400);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-ctrl-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.session-ctrl-card.disabled-by-holiday {
  opacity: 0.55;
  border-style: dashed;
}

.scc-info { display: flex; align-items: center; gap: 12px; }

.scc-id-badge {
  font-size: 11px;
  font-weight: 800;
  background: var(--surface-overlay);
  color: var(--sky-400);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.scc-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.scc-quota-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.scc-action {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scc-state-text {
  font-size: 11.5px;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
  color: var(--green-400);
}

.scc-state-text.off { color: var(--text-muted); }
.scc-state-text.libur { color: var(--red-400); }

/* Switch Toggle UI */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch-toggle input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--navy-700);
  border: 1px solid var(--border-muted);
  transition: .2s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .2s;
  border-radius: 50%;
}

.switch-toggle input:checked + .slider {
  background-color: var(--green-600);
  border-color: var(--green-500);
}

.switch-toggle input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

.switch-toggle input:disabled + .slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Day Registrations Section */
.day-registrations-section {
  background: var(--surface-raised);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 14px;
}

.drs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.drs-count-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-400);
}

.drs-list-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.drs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12px;
}

.drs-item-name { font-weight: 700; color: var(--text-primary); }
.drs-item-meta { font-size: 11px; color: var(--text-muted); }
.drs-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  font-style: italic;
}

/* Modal Bulk Holidays */
.bulk-holiday-modal-box {
  max-width: 640px;
}

.bhm-body { padding: 18px 22px; }

.bhm-controls-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.bhm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.bhm-field.flex-2 { flex: 2; }
.bhm-field label { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); }

.bhm-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.bhm-pill-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.bhm-pill-btn:hover {
  background: var(--surface-overlay);
  color: var(--text-primary);
  border-color: var(--sky-400);
}

.bhm-dates-wrapper {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
}

.bhm-dates-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.bhm-dates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.bhm-date-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.bhm-date-checkbox:hover { border-color: var(--sky-400); }
.bhm-date-checkbox.is-weekend { color: var(--red-400); }
.bhm-date-checkbox.already-holiday { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }

.bulk-warning-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 11.5px;
  color: var(--amber-400);
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .jadwal-workspace-grid { grid-template-columns: 1fr; }
  .bhm-dates-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .jadwal-hero-card { flex-direction: column; align-items: flex-start; }
  .cal-top-toolbar { flex-direction: column; align-items: flex-start; }
  .bhm-controls-row { flex-direction: column; }
  .bhm-dates-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ══════════════════════════════════════════════════════════════
   PERBAIKAN MANAJEMEN JADWAL
   ══════════════════════════════════════════════════════════════ */
.jadwal-stats-grid { grid-template-columns: repeat(4, 1fr); }
.tile-red-subtle::before, .tile-green-subtle::before, .tile-yellow-subtle::before, .tile-blue-subtle::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.jadwal-stats-grid .stat-tile { position: relative; overflow: hidden; }
.tile-red-subtle::before    { background: var(--red-500); }
.tile-green-subtle::before  { background: var(--green-500); }
.tile-yellow-subtle::before { background: var(--amber-500); }
.tile-blue-subtle::before   { background: var(--sky-500); }

.legend-dot.gray { background: #94a3b8; }
.jhc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jhc-actions .refresh-spinner { display: none; width: 12px; height: 12px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: jadwalSpin 0.7s linear infinite; }
.jhc-actions .spinning .refresh-spinner { display: inline-block; }
@keyframes jadwalSpin { to { transform: rotate(360deg); } }

/* kalender */
.cal-day { outline: none; }
.cal-day:focus-visible { box-shadow: 0 0 0 2px var(--sky-400); }
.cal-day.weekend-day { background: rgba(148, 163, 184, 0.06); }
.cal-day.weekend-day .cal-day-num { color: var(--text-muted); }
.cal-day.weekend-day .cal-indicator-dot { opacity: 0.55; }
.cal-day-label.partial { color: var(--amber-400); }

/* panel detail */
.ddc-date-lead { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ddc-status-badge-wrap { flex-shrink: 0; }
.dsp-text { font-weight: 800; letter-spacing: 0.05em; }
.day-status-pill.gray {
  background: rgba(148, 163, 184, 0.12); color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.day-status-pill.gray .dsp-dot { background: var(--text-muted); }
.day-status-section, .sessions-control-section { display: block; }
.bds-icon { font-size: 13px; line-height: 1; }
.btn-day-status { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.btn-day-status:disabled, .hn-save-btn:disabled { opacity: 0.55; cursor: wait; }
.scs-holiday-alert { margin-top: 8px; }
.scc-quota-meta.full { color: var(--amber-400); font-weight: 700; }
.scc-state-text.full { color: var(--amber-400); }
.switch-toggle input:disabled ~ .slider { cursor: not-allowed; }
.session-ctrl-card.disabled-by-holiday .scc-time, .session-ctrl-card.disabled-by-holiday .scc-id-badge { opacity: 0.55; }

.drs-item { cursor: pointer; gap: 10px; transition: border-color var(--transition-fast), transform var(--transition-fast); }
.drs-item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.drs-reg { font-size: 10px; opacity: 0.7; font-weight: 600; }
.status-badge-modern {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full);
  white-space: nowrap; background: rgba(148, 163, 184, 0.14); color: var(--text-secondary);
}
.status-badge-modern.s-menunggu     { background: rgba(245, 158, 11, 0.14); color: var(--amber-400); }
.status-badge-modern.s-dikonfirmasi { background: rgba(56, 189, 248, 0.14); color: var(--sky-400); }
.status-badge-modern.s-selesai      { background: rgba(34, 197, 94, 0.14);  color: var(--green-400); }
.status-badge-modern.s-pending-reschedule { background: rgba(249, 115, 22, 0.14); color: var(--orange-400); }

/* ── Modal Atur Hari Libur Massal (sebelumnya tidak punya overlay) ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1700;
  background: rgba(5, 10, 20, 0.75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
}
.modal-overlay.show { display: flex; animation: userFadeIn 0.18s ease-out; }
.bulk-holiday-modal-box { max-width: 680px; width: 100%; }
.mhb-main-title { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.mhb-sub-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.mhb-close-btn {
  height: 30px; padding: 0 12px; font-size: 12px; font-weight: 700; cursor: pointer;
  color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.mhb-close-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.modal-dialog-body { overflow-y: auto; flex: 1; min-height: 0; }
.modal-dialog-footer {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
  padding: 14px 22px; background: var(--surface-raised); border-top: 1px solid var(--border); flex-shrink: 0;
}
.form-control {
  width: 100%; height: 40px; padding: 0 12px; font-size: 13.5px; font-family: inherit;
  color: var(--text-primary); background: var(--bg-alt);
  border: 1px solid var(--border-muted); border-radius: var(--radius); outline: none;
  color-scheme: dark; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
body.light-mode .form-control { color-scheme: light; }
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22); }
.form-control::placeholder { color: var(--text-muted); }
.bhm-dates-grid { max-height: 330px; overflow-y: auto; }
.bhm-dates-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.bulk-warning-note {
  display: flex; gap: 10px; margin-top: 14px; padding: 10px 14px; font-size: 12px; line-height: 1.55;
  color: var(--amber-400); background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.28); border-radius: var(--radius);
}
.cal-month-input { color-scheme: dark; }
body.light-mode .cal-month-input { color-scheme: light; }

@media (max-width: 1100px) { .jadwal-stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .jadwal-stats-grid { grid-template-columns: 1fr 1fr; }
  .modal-dialog-footer { justify-content: stretch; }
  .modal-dialog-footer > button { flex: 1 1 100%; }
  .cal-day { min-height: 58px; padding: 4px; }
  .cal-day-label, .cal-day-bookings { font-size: 8.5px; }
}

/* dialog konfirmasi harus selalu di atas semua modal lain (mis. modal hari libur massal) */
#confirmOverlay { z-index: 2000; }
