/**
 * PRESENSIABSEN — Stylesheet Utama
 * ---------------------------------
 * Berisi seluruh gaya visual aplikasi: tema warna, komponen (tombol, kartu,
 * badge, modal, toast), navigasi, tabel rekap, grid jadwal, dan animasi.
 */

/* === Variabel warna & tema (light/dark) === */
:root {
  --ink: #060d1f;
  --navy: #0a1628;
  --navy-card: #0f1e38;
  --navy-mid: #162542;
  --indigo: #2563eb;
  --indigo-hover: #1d4ed8;
  --indigo-dim: rgba(37, 99, 235, 0.18);
  --indigo-soft: #dbeafe;
  --emerald: #00c97a;
  --emerald-soft: #e5fff4;
  --amber: #f59e0b;
  --amber-soft: #fff7e0;
  --rose: #f43f5e;
  --rose-soft: #fff0f3;
  --surface-0: #ffffff;
  --surface-1: #f7f8fc;
  --surface-2: #edf0f9;
  --surface-dark: #0f1e38;
  --border: #e2e7f5;
  --border-mid: #c8d0e9;
  --border-dark: rgba(255, 255, 255, 0.08);
  --text-primary: #060d1f;
  --text-secondary: #4a5572;
  --text-muted: #8b95b4;
  --text-on-dark: #ffffff;
  --text-on-dark-2: rgba(255, 255, 255, 0.6);
  --success-50: #e5fff4;
  --success-500: #00c97a;
  --success-600: #00a360;
  --warning-50: #fff7e0;
  --warning-500: #f59e0b;
  --warning-600: #d18007;
  --danger-50: #fff0f3;
  --danger-500: #f43f5e;
  --danger-600: #d42b4e;
  --role-chief: #a16207;
  --role-chief-bg: #fef3c7;
  --role-sekwan: #6d28d9;
  --role-sekwan-bg: #ede9fe;
  --role-danru: #1d4ed8;
  --role-danru-bg: #dbeafe;
  --role-security: #065f46;
  --role-security-bg: #d1fae5;
  --role-driver: #9a3412;
  --role-driver-bg: #ffedd5;
  --role-resepsionist: #9d174d;
  --role-resepsionist-bg: #fce7f3;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 40px;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 24px;
  --r-full: 9999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --shadow-xs: 0 1px 2px rgba(6, 13, 31, 0.05);
  --shadow-sm: 0 2px 8px rgba(6, 13, 31, 0.07);
  --shadow-md: 0 4px 16px rgba(6, 13, 31, 0.09);
  --shadow-xl: 0 20px 60px rgba(6, 13, 31, 0.18);
  --shadow-indigo: 0 4px 24px rgba(59, 91, 255, 0.3);
  --shadow-emerald: 0 4px 20px rgba(0, 201, 122, 0.3);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav: 20;
  --z-modal: 60;
  --z-toast: 100;
}

[data-theme='dark'] {
  --surface-0: #0f1e38;
  --surface-1: #162542;
  --surface-2: #1e2f4d;
  --border: rgba(255, 255, 255, 0.09);
  --border-mid: rgba(255, 255, 255, 0.15);
  --text-primary: #f0f4ff;
  --text-secondary: #a8b4d0;
  --text-muted: #6a7a99;
  --indigo-soft: rgba(59, 91, 255, 0.18);
  --emerald-soft: rgba(0, 201, 122, 0.12);
  --amber-soft: rgba(245, 158, 11, 0.12);
  --rose-soft: rgba(244, 63, 94, 0.12);
  --success-50: rgba(0, 201, 122, 0.1);
  --warning-50: rgba(245, 158, 11, 0.1);
  --danger-50: rgba(244, 63, 94, 0.1);
  --role-chief-bg: rgba(161, 98, 7, 0.18);
  --role-sekwan-bg: rgba(109, 40, 217, 0.18);
  --role-danru-bg: rgba(29, 78, 216, 0.18);
  --role-security-bg: rgba(6, 95, 70, 0.18);
  --role-driver-bg: rgba(154, 52, 18, 0.18);
  --role-resepsionist-bg: rgba(157, 23, 77, 0.18);
}

[data-theme='dark'] body {
  background: #060d1f;
}

[data-theme='dark'] .skeleton {
  background: linear-gradient(90deg, #162542 25%, #1e2f4d 37%, #162542 63%);
  background-size: 400% 100%;
}

.dark-toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.dark-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

#pwa-install-banner {
  position: fixed;
  top: 14px;
  bottom: auto;
  left: 12px;
  right: 12px;
  transform: none;
  width: auto;
  max-width: none;
  background: var(--surface-0);
  border: 1px solid var(--line, rgba(128, 128, 128, 0.25));
  border-top: 1px solid var(--line, rgba(128, 128, 128, 0.25));
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: calc(var(--z-toast) + 10);
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#pwa-install-banner.show {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* === PWA install banner === */
.pwa-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
}

.pwa-banner-text strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.pwa-banner-text span {
  color: var(--text-on-dark-2);
  font-size: 11.5px;
}

.pwa-install-btn {
  background: var(--indigo);
  color: #fff;
  border-radius: var(--r-md);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.pwa-dismiss-btn {
  color: var(--text-on-dark-2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

#liveness-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 140px;
  gap: 14px;
  pointer-events: none;
}

.liveness-ring {
  width: 240px;
  height: 320px;
  border-radius: 18px;
  border: 1px solid rgba(201, 169, 126, 0.28);
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  box-sizing: border-box;
  box-shadow:
    0 0 24px rgba(201, 169, 126, 0.08),
    inset 0 0 24px rgba(201, 169, 126, 0.04);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: rgba(13, 9, 6, 0.2);
}

.liveness-ring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(212, 176, 138, 0.9), transparent);
  box-shadow: 0 0 8px rgba(212, 176, 138, 0.55);
  animation: liveness-scan 2s ease-in-out infinite;
  transition: background 0.3s, box-shadow 0.3s;
}

.liveness-ring.detecting {
  border-color: var(--amber) !important;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.3) !important;
}

.liveness-ring.detecting::before {
  background: linear-gradient(90deg, transparent, var(--amber), transparent) !important;
  box-shadow: 0 0 12px var(--amber) !important;
}

.liveness-ring.success {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 40px rgba(0, 201, 122, 0.3) !important;
}

.liveness-ring.success::before {
  background: linear-gradient(90deg, transparent, var(--emerald), transparent) !important;
  box-shadow: 0 0 12px var(--emerald) !important;
}

.liveness-ring-inner {
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  border: 2px dashed rgba(255, 255, 255, 0.18);
}

@keyframes liveness-scan {

  0%,
  100% {
    top: 5%;
  }

  50% {
    top: 95%;
  }
}

.liveness-face-icon {
  display: none;
}

/* === Animated Scanner for Liveness === */
.liveness-scanner-wrap {
  width: 140px;
  height: 140px;
  position: relative;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.liveness-scanner-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(to right, #0ea5e9 2px, transparent 2px) 0 0,
    linear-gradient(to right, #0ea5e9 2px, transparent 2px) 0 100%,
    linear-gradient(to left, #0ea5e9 2px, transparent 2px) 100% 0,
    linear-gradient(to left, #0ea5e9 2px, transparent 2px) 100% 100%,
    linear-gradient(to bottom, #0ea5e9 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, #0ea5e9 2px, transparent 2px) 100% 0,
    linear-gradient(to top, #0ea5e9 2px, transparent 2px) 0 100%,
    linear-gradient(to top, #0ea5e9 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  z-index: 2;
}

.liveness-scanner-beam {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 10%;
  background: linear-gradient(to bottom, rgba(14, 165, 233, 0) 0%, rgba(14, 165, 233, 0.8) 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.6);
  z-index: 1;
  animation: scan-beam 2s infinite ease-in-out alternate;
}

@keyframes scan-beam {
  0% {
    top: -10%;
  }

  100% {
    top: 100%;
  }
}

.scanner-left-anim {
  animation: scan-left 1.5s infinite;
}

.scanner-right-anim {
  animation: scan-right 1.5s infinite;
}

.scanner-smile-anim {
  animation: scan-smile 1.5s infinite;
}

.scanner-up-anim {
  animation: scan-up 1.5s infinite;
}

.scanner-down-anim {
  animation: scan-down 1.5s infinite;
}

@keyframes scan-left {
  50% {
    transform: perspective(200px) rotateY(-15deg);
  }
}

@keyframes scan-right {
  50% {
    transform: perspective(200px) rotateY(15deg);
  }
}

@keyframes scan-smile {
  50% {
    transform: scale(1.05);
    border-color: #10b981;
  }
}

@keyframes scan-up {
  50% {
    transform: perspective(200px) rotateX(15deg);
  }
}

@keyframes scan-down {
  50% {
    transform: perspective(200px) rotateX(-15deg);
  }
}

.liveness-title {
  font-size: 14px;
  font-weight: 500;
  color: #ede0d0;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.liveness-desc {
  font-size: 12.5px;
  color: #b39a7c;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
}

.liveness-progress {
  width: 220px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.25);
}

.liveness-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
  border-radius: var(--r-full);
  transition: width 0.1s linear;
}

#device-bind-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 20);
  background: rgba(6, 13, 31, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* === Anti-titip absen overlay === */
.device-bind-card {
  background: var(--danger-50);
  border: 2px solid var(--rose);
  border-radius: var(--r-2xl);
  padding: 28px 24px;
  max-width: 340px;
  text-align: center;
}

.device-bind-icon {
  font-size: 52px;
  margin-bottom: 12px;
}

.device-bind-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--danger-600);
  margin-bottom: 8px;
}

.device-bind-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

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

/* === Reset & base styles === */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-size: 16px;
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 100vh;
  height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}

body {
  background: #f1f5f9;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.shell {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  background: var(--surface-0);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 500px) {
  body {
    padding: 24px;
    align-items: center;
  }

  .shell {
    border-radius: 28px;
    height: min(900px, calc(100vh - 48px));
    height: min(900px, calc(100dvh - 48px));
    max-height: 920px;
    overflow: hidden;
  }
}

.auth-hero {
  padding: var(--s8) var(--s6) var(--s7);
  background: var(--navy);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 220px at 10% 110%, rgba(59, 91, 255, 0.28) 0%, transparent 70%),
    radial-gradient(circle 160px at 95% -10%, rgba(0, 201, 122, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.auth-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  position: relative;
  z-index: 1;
}

.auth-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--indigo);
  color: var(--text-on-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
}

.auth-brand span {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
}

.auth-headline {
  margin-top: var(--s7);
  position: relative;
  z-index: 1;
}

.auth-headline h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.auth-headline h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #7e9fff, #5df7c4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-headline p {
  color: var(--text-on-dark-2);
  font-size: 13.5px;
  margin-top: var(--s2);
  font-weight: 400;
}

.auth-hero-divider {
  height: 2px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--indigo) 0%, var(--emerald) 60%, transparent 100%);
}

.auth-form-wrap {
  flex: 1;
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--surface-0);
}

.auth-form-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s5);
}

.field {
  margin-bottom: var(--s4);
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-0);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3.5px var(--indigo-dim);
}

/* === Tombol (buttons) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--indigo);
  color: var(--text-on-dark);
}

.btn-primary:hover {
  background: var(--indigo-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-danger {
  background: var(--danger-50);
  color: var(--danger-600);
  border: 1.5px solid #fecdd3;
}

.btn-emerald {
  background: var(--emerald);
  color: #fff;
  box-shadow: var(--shadow-emerald);
}

.form-error {
  color: var(--danger-600);
  font-size: 12.5px;
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-switch button {
  color: var(--indigo);
  font-weight: 700;
  padding: 6px;
}

.app-header {
  padding: var(--s5) var(--s5) var(--s4);
  background: #ffffff;
  color: var(--text-primary);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.app-header::before {
  display: none;
}

/* === Header dashboard === */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.header-greeting .greet {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.header-greeting .name {
  font-size: 19px;
  font-weight: 800;
  margin-top: 1px;
  color: var(--text-primary);
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--indigo);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.header-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-on-dark-2);
}

.header-meta-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.header-meta-item.active .dot {
  background: var(--emerald);
  box-shadow: 0 0 0 2px rgba(0, 201, 122, 0.3);
}

.header-meta-item.active {
  color: var(--emerald);
}

.header-divider {
  height: 2px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--indigo) 0%, rgba(59, 91, 255, 0.1) 100%);
}

.main {
  flex: 1;
  overflow-y: auto;
  background: var(--surface-1);
  /* Ruang untuk fixed tab-nav di mobile */
  padding-bottom: 70px;
}

.page {
  display: none;
  padding: var(--s4);
}

.page.active {
  display: block;
  animation: fadeIn 260ms var(--ease-out);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Style baru: Dashboard Admin & Beranda Karyawan === */
#app-container.shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), var(--surface-1));
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-xl);
}

#app-container.shell .app-header {
  background:
    radial-gradient(circle at 80% 0%, rgba(59, 91, 255, 0.42) 0%, transparent 35%),
    radial-gradient(circle at 20% 95%, rgba(0, 201, 122, 0.16) 0%, transparent 30%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-card) 100%);
}

#app-container.shell .app-header .header-title,
#app-container.shell .app-header .header-greeting .name {
  color: var(--text-on-dark);
}

#app-container.shell .main {
  background:
    radial-gradient(circle at 82% 2%, var(--indigo-dim), transparent 16%),
    radial-gradient(circle at 65% 85%, var(--emerald-soft), transparent 14%),
    var(--surface-1);
}

#app-container.shell .tab-nav {
  background: rgba(10, 22, 40, 0.7);
  border-radius: var(--r-2xl);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px;
}

#app-container.shell .tab-btn {
  border-radius: var(--r-lg);
  color: rgba(255,255,255,0.78);
}

#app-container.shell .tab-btn.active {
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  color: var(--text-on-dark);
}

#app-container.shell .tab-btn:not(.active):hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-on-dark);
}

#app-container.shell .table {
  border-radius: var(--r-lg);
  overflow: hidden;
  border-collapse: collapse;
  background: var(--surface-0);
}

#app-container.shell .table thead th {
  background: var(--navy);
  color: var(--text-on-dark);
  border-color: var(--navy-mid);
}

#app-container.shell .table tbody td {
  border-color: var(--border);
  background: var(--surface-0);
}

#app-container.shell .table tbody tr:hover td {
  background: var(--indigo-soft);
}

#page-beranda {
  background: transparent;
}

#page-beranda .beranda-header-block {
  background: linear-gradient(135deg, var(--surface-0), var(--surface-1));
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
}

#page-beranda .beranda-attendance-card {
  background:
    radial-gradient(circle at 95% 0%, rgba(0, 201, 122, 0.14), transparent 25%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-card) 100%);
  color: var(--text-on-dark);
  border-radius: var(--r-2xl);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-md);
}

#page-beranda .beranda-stat-card,
#page-beranda .beranda-chart-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}

#page-beranda .beranda-btn-checkin {
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  color: var(--text-on-dark);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-indigo);
}

#page-beranda .beranda-content-area {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: var(--s4);
}

#page-beranda .beranda-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#page-dashboard-admin {
  background: transparent;
}

#page-dashboard-admin .admin-dash-header {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--s4);
  box-shadow: var(--shadow-sm);
}

#page-dashboard-admin .admin-dash-title {
  color: var(--navy);
}

#page-dashboard-admin .admin-dash-subtitle {
  color: var(--text-secondary);
}

#page-dashboard-admin .admin-dash-pill {
  background: var(--indigo-soft);
  color: var(--indigo);
  border-color: var(--indigo-dim);
}

#page-dashboard-admin .admin-stat-grid {
  gap: var(--s3);
}

#page-dashboard-admin .admin-stat-card {
  background:
    linear-gradient(180deg, var(--surface-0), var(--surface-1));
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#page-dashboard-admin .admin-stat-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-md);
}

#page-dashboard-admin .admin-stat-icon {
  background: var(--indigo-soft);
  color: var(--indigo);
  border-radius: var(--r-full);
}

#page-dashboard-admin .admin-stat-value {
  color: var(--navy);
}

#page-dashboard-admin .admin-stat-delta {
  color: var(--success-600);
}

/* === Shared dashboard visual layer: style baru menyeluruh === */
#app-container.shell .page {
  background: transparent;
}

#app-container.shell .card,
#page-dashboard-admin .admin-stat-card,
#page-beranda .beranda-stat-card,
#page-beranda .beranda-chart-card,
.approval,
.modal-box,
.profile-hero,
.summary-stat {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}

#app-container.shell .input,
#app-container.shell .select,
#app-container.shell .textarea {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: none;
}

#app-container.shell .input:focus,
#app-container.shell .select:focus,
#app-container.shell .textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px var(--indigo-dim);
}

#app-container.shell .btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  color: var(--text-on-dark);
  border: none;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-indigo);
}

#app-container.shell .btn-primary:hover {
  background: linear-gradient(135deg, var(--indigo-hover), var(--emerald));
}

#app-container.shell .btn-secondary {
  background: var(--surface-0);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
}

#app-container.shell .btn-danger {
  background: var(--danger-50);
  color: var(--danger-600);
  border: 1.5px solid #fecdd3;
}

#app-container.shell .table-responsive {
  background: var(--surface-0);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

#app-container.shell .modal-box {
  background: var(--surface-0);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

#app-container.shell .approval {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
}

#app-container.shell .profile-hero {
  background:
    radial-gradient(circle at 75% 10%, var(--indigo-dim), transparent 22%),
    linear-gradient(135deg, var(--surface-0), var(--surface-1));
}

#app-container.shell .summary-stat {
  background: var(--indigo-soft);
  color: var(--indigo);
}

#app-container.shell .form-grid,
#app-container.shell .profile-grid,
#app-container.shell .rekap-grid-layout {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: var(--s4);
}

#app-container.shell .status-chip,
#app-container.shell .badge,
#app-container.shell .tag {
  background: var(--indigo-soft);
  color: var(--indigo);
  border-radius: var(--r-full);
  border: 1px solid var(--indigo-dim);
  font-weight: 700;
}

#app-container.shell .soft-panel {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

#app-container.shell .panel,
#app-container.shell .section-panel,
#app-container.shell .filter-panel,
#app-container.shell .content-panel,
#app-container.shell .report-panel {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s4);
}

#app-container.shell .empty-state,
#app-container.shell .notice-panel {
  background: var(--surface-0);
  border: 1px dashed var(--border-mid);
  border-radius: var(--r-xl);
  color: var(--text-secondary);
  padding: var(--s4);
}

#app-container.shell .section-title,
#app-container.shell .subsection-title {
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.04em;
}

#app-container.shell .muted-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#app-container.shell .field-label,
#app-container.shell .card-title,
#app-container.shell .section-title,
#app-container.shell .subsection-title {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#app-container.shell .btn-sm,
#app-container.shell .btn-xs {
  border-radius: var(--r-md);
  font-weight: 700;
  min-height: 36px;
}

#app-container.shell .btn-xs {
  font-size: 10px;
  padding: 7px 11px;
}

#app-container.shell .btn-sm {
  font-size: 11.5px;
  padding: 8px 12px;
}

#app-container.shell .field {
  margin-bottom: var(--s4);
}

#app-container.shell .field-label {
  display: block;
  margin-bottom: 8px;
}

#app-container.shell .table-responsive {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

#app-container.shell .table thead th,
#app-container.shell .table tbody td {
  padding: 11px 12px;
  font-size: 12px;
}

#app-container.shell .table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
}

#app-container.shell .btn-edit,
#app-container.shell .btn-view,
#app-container.shell .btn-save,
#app-container.shell .btn-submit,
#app-container.shell .btn-action {
  background: var(--navy);
  color: var(--text-on-dark);
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,0.08);
}

#app-container.shell .btn-cancel,
#app-container.shell .btn-close {
  background: var(--surface-0);
  color: var(--text-secondary);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
}

#app-container.shell .btn-approve,
#app-container.shell .btn-approve-all {
  background: var(--emerald);
  color: var(--text-on-dark);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-emerald);
}

#app-container.shell .btn-reject {
  background: var(--danger-50);
  color: var(--danger-600);
  border-radius: var(--r-lg);
  border: 1px solid #fecdd3;
}

#app-container.shell .btn-export-pdf,
#app-container.shell .btn-export-excel,
#app-container.shell .btn-export-csv,
#app-container.shell .btn-apply-filter {
  background: var(--navy);
  color: var(--text-on-dark);
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-sm);
}

#app-container.shell .btn-checkin {
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  color: var(--text-on-dark);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-indigo);
}

#app-container.shell .page {
  background: transparent;
  max-width: 100%;
}

#app-container.shell .page.active {
  background-image: none;
}

#app-container.shell .summary-stat,
#app-container.shell .stat-card,
#app-container.shell .info-card {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
}

#app-container.shell .status-chip,
#app-container.shell .badge,
#app-container.shell .tag {
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--surface-1);
  font-size: 11px;
  font-weight: 800;
}

#app-container.shell .approval,
#app-container.shell .approval-card,
#app-container.shell .profile-hero,
#app-container.shell .modal-box {
  background: var(--surface-0);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#app-container.shell .main {
  background:
    radial-gradient(circle at 86% 0%, var(--indigo-dim), transparent 12%),
    radial-gradient(circle at 70% 100%, var(--emerald-soft), transparent 15%),
    var(--surface-1);
}

#app-container.shell .sidebar,
#app-container.shell .left-sidebar,
#app-container.shell .nav-sidebar,
#app-container.shell .side-panel {
  background: var(--surface-0);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#app-container.shell .sidebar .menu-item,
#app-container.shell .sidebar .nav-link,
#app-container.shell .nav-sidebar .nav-link {
  border-radius: var(--r-lg);
  color: var(--text-secondary);
}

#app-container.shell .sidebar .menu-item.active,
#app-container.shell .sidebar .nav-link.active,
#app-container.shell .nav-sidebar .nav-link.active {
  background: var(--navy);
  color: var(--text-on-dark);
}

#app-container.shell .search-panel,
#app-container.shell .filter-panel,
#app-container.shell .section-panel,
#app-container.shell .content-panel,
#app-container.shell .report-panel,
#app-container.shell .soft-panel,
#app-container.shell .accordion-panel {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#app-container.shell .btn {
  border-radius: var(--r-md);
  font-weight: 800;
}

#app-container.shell .btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  color: var(--text-on-dark);
}

#app-container.shell .btn-secondary {
  background: var(--surface-0);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

#app-container.shell .btn-danger {
  background: var(--danger-50);
  color: var(--danger-600);
  border: 1px solid #fecdd3;
}

#app-container.shell .btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

#app-container.shell .textarea,
#app-container.shell .input,
#app-container.shell .select {
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface-0);
}

#app-container.shell .textarea:focus,
#app-container.shell .input:focus,
#app-container.shell .select:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px var(--indigo-dim);
}

#app-container.shell .field-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#app-container.shell .form-grid {
  gap: var(--s4);
}

#app-container.shell .table-responsive {
  background: var(--surface-0);
  border-radius: var(--r-lg);
}

#app-container.shell .search-box,
#app-container.shell .search-input,
#app-container.shell .filter-input {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
}

#app-container.shell .search-box:focus,
#app-container.shell .search-input:focus,
#app-container.shell .filter-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px var(--indigo-dim);
}

#app-container.shell .layout-grid,
#app-container.shell .dashboard-grid,
#app-container.shell .content-grid,
#app-container.shell .records-grid {
  gap: var(--s4);
}

#app-container.shell .section-title,
#app-container.shell .subsection-title,
#app-container.shell .section-heading {
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#app-container.shell .caption,
#app-container.shell .helper-text,
#app-container.shell .small-text {
  color: var(--text-muted);
  font-size: 11px;
}

#app-container.shell .toolbar,
#app-container.shell .page-actions,
#app-container.shell .action-row,
#app-container.shell .command-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}

#app-container.shell .toolbar .btn,
#app-container.shell .page-actions .btn,
#app-container.shell .action-row .btn,
#app-container.shell .command-row .btn {
  border-radius: var(--r-md);
}

#app-container.shell .form-row,
#app-container.shell .field-row,
#app-container.shell .input-row,
#app-container.shell .inline-form {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}

#app-container.shell .form-row .field-label,
#app-container.shell .field-row .field-label,
#app-container.shell .input-row .field-label {
  color: var(--text-secondary);
  font-weight: 800;
}

#app-container.shell .form-help,
#app-container.shell .field-help,
#app-container.shell .input-help {
  color: var(--text-muted);
  font-size: 11px;
}

#app-container.shell .data-block,
#app-container.shell .content-block,
#app-container.shell .record-block,
#app-container.shell .kpi-block,
#app-container.shell .report-block {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: var(--s4);
}

#app-container.shell .data-block .title,
#app-container.shell .content-block .title,
#app-container.shell .record-block .title,
#app-container.shell .kpi-block .title,
#app-container.shell .report-block .title {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#app-container.shell .meta-row,
#app-container.shell .detail-row,
#app-container.shell .info-row,
#app-container.shell .list-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  color: var(--text-secondary);
}

#app-container.shell .meta-row .label,
#app-container.shell .detail-row .label,
#app-container.shell .info-row .label,
#app-container.shell .list-row .label {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#app-container.shell .page-header,
#app-container.shell .content-header,
#app-container.shell .dashboard-header,
#app-container.shell .section-header {
  background: var(--surface-0);
  border-radius: var(--r-2xl);
  border: 1.5px solid var(--border);
  padding: var(--s4);
  box-shadow: var(--shadow-xs);
}

#app-container.shell .page-title,
#app-container.shell .content-title,
#app-container.shell .dashboard-title,
#app-container.shell .section-title-main {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#app-container.shell .page-subtitle,
#app-container.shell .content-subtitle,
#app-container.shell .dashboard-subtitle,
#app-container.shell .section-subtitle {
  color: var(--text-secondary);
  font-size: 11px;
}

#app-container.shell .workspace,
#app-container.shell .content-wrap,
#app-container.shell .main-content,
#app-container.shell .app-content {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: var(--s4);
}

#app-container.shell .breadcrumb,
#app-container.shell .breadcrumbs,
#app-container.shell .menu-list,
#app-container.shell .nav-list,
#app-container.shell .utility-list {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}

#app-container.shell .breadcrumb a,
#app-container.shell .breadcrumbs a,
#app-container.shell .menu-list a,
#app-container.shell .nav-list a,
#app-container.shell .utility-list a {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

#app-container.shell .breadcrumb a:hover,
#app-container.shell .breadcrumbs a:hover,
#app-container.shell .menu-list a:hover,
#app-container.shell .nav-list a:hover,
#app-container.shell .utility-list a:hover {
  color: var(--indigo);
}

#app-container.shell .user-profile,
#app-container.shell .profile-card,
#app-container.shell .account-card {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

#app-container.shell .alert,
#app-container.shell .notice,
#app-container.shell .notice-panel,
#app-container.shell .empty-state,
#app-container.shell .toast {
  background: var(--surface-0);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

#app-container.shell .alert-success {
  background: var(--success-50);
  color: var(--success-600);
  border-color: var(--success-500);
}

#app-container.shell .alert-warning {
  background: var(--warning-50);
  color: var(--warning-600);
  border-color: var(--warning-500);
}

#app-container.shell .alert-danger {
  background: var(--danger-50);
  color: var(--danger-600);
  border-color: var(--danger-500);
}

/* === Kartu (card) generik === */
.card {
  background: var(--surface-0);
  border-radius: var(--r-xl);
  padding: var(--s5);
  margin-bottom: var(--s4);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
}

.card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.card-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--indigo);
}

.attendance-card {
  background: var(--navy);
  color: var(--text-on-dark);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s6) var(--s5);
  margin-bottom: var(--s4);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.attendance-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 70% at 0% 0%, rgba(59, 91, 255, 0.28) 0%, transparent 60%),
    radial-gradient(circle 120px at 100% 100%, rgba(0, 201, 122, 0.15) 0%, transparent 65%);
  pointer-events: none;
}

.attendance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.attendance-card>* {
  position: relative;
  z-index: 1;
}

.attn-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-on-dark-2);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.attendance-card .clock {
  font-size: 50px;
  font-weight: 500;
  font-family: var(--font-mono);
  line-height: 1;
  margin: 2px 0 4px;
  letter-spacing: -0.02em;
}

.attendance-card .date-text {
  font-size: 13px;
  color: var(--text-on-dark-2);
  font-weight: 400;
  margin-bottom: var(--s5);
}

.status-rail {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s5);
}

.status-rail-item {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.status-rail-item+.status-rail-item {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.srl-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-on-dark-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.srl-value {
  font-size: 19px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: -0.01em;
}

.srl-value.positive {
  color: var(--emerald);
}

.srl-value.warning {
  color: var(--amber);
}

.btn-checkin {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--indigo) 0%, #5b7fff 100%);
  color: #fff;
  border-radius: var(--r-lg);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: var(--shadow-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.btn-checkin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(59, 91, 255, 0.4);
}

.btn-checkin:active {
  transform: translateY(0);
}

.btn-checkin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(0, 201, 122, 0.6);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 201, 122, 0.6);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(0, 201, 122, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 201, 122, 0);
  }
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-btn {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 15px 6px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.quick-btn:hover {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.quick-btn .icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.quick-btn .icon-wrap.indigo {
  background: var(--indigo-soft);
}

.quick-btn .icon-wrap.emerald {
  background: var(--emerald-soft);
}

.quick-btn .icon-wrap.amber {
  background: var(--amber-soft);
}

.quick-btn .icon-wrap.rose {
  background: var(--rose-soft);
}

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

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.chip {
  padding: 7px 13px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-0);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.chip.active {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
  box-shadow: 0 2px 10px rgba(59, 91, 255, 0.28);
}

.chip:not(.active):hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

/* === Badge role/kategori === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.badge-chief {
  background: var(--role-chief-bg);
  color: var(--role-chief);
}

.badge-sekwan {
  background: var(--role-sekwan-bg);
  color: var(--role-sekwan);
}

.badge-danru {
  background: var(--role-danru-bg);
  color: var(--role-danru);
}

.badge-security {
  background: var(--role-security-bg);
  color: var(--role-security);
}

.badge-driver {
  background: var(--role-driver-bg);
  color: var(--role-driver);
}

.badge-resepsionist {
  background: var(--role-resepsionist-bg);
  color: var(--role-resepsionist);
}

.badge-mp-support,
.badge-mp-cuci-loyang,
.badge-mp-ckd,
.badge-mp-teknisi {
  background: #e0e7ff;
  color: #3730a3;
}

[data-theme='dark'] .badge-mp-support,
[data-theme='dark'] .badge-mp-cuci-loyang,
[data-theme='dark'] .badge-mp-ckd,
[data-theme='dark'] .badge-mp-teknisi {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

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

.status-dot.hadir {
  background: var(--emerald);
}

.status-dot.izin {
  background: var(--amber);
}

.status-dot.alpha {
  background: var(--rose);
}

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

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.15s;
}

.list-item:hover {
  border-color: var(--border-mid);
}

.list-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--indigo-soft);
  color: var(--indigo);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.list-item-body {
  flex: 1;
  min-width: 0;
}

.list-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.list-item-time {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* === Navigasi tab === */
.tab-nav {
  display: flex;
  background: var(--surface-0);
  border-top: 1.5px solid var(--border);
  padding: 8px 4px;
  /* Mobile: fixed bottom bar */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  width: 100%;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.tab-btn .tab-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s var(--ease-out);
}

.tab-btn.active {
  color: var(--indigo);
}

.tab-btn.active .tab-icon {
  transform: scale(1.12);
}

.tab-btn:not(.active):hover {
  color: var(--text-secondary);
}

/* === Notification badge on nav tab (mis. jumlah pendaftar/approval pending) === */
.tab-btn {
  position: relative;
}

.tab-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface-0);
  display: none;
}

.tab-badge.show {
  display: block;
}

/* === Dashboard notification banners (Belum Absen, Pendaftar Baru, dll) === */
/* Desain kalem: kartu putih + border kiri aksen warna, bukan blok warna solid. */
.dash-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgba(6, 13, 31, 0.04);
}

.dash-banner.show {
  display: flex;
}

.dash-banner-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-banner-body {
  flex: 1;
  min-width: 0;
}

.dash-banner-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 1px;
}

.dash-banner-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-banner-action {
  flex-shrink: 0;
  border: none;
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dash-banner-action:hover {
  background: var(--surface-2);
}

.dash-banner-danger {
  border-left-color: var(--danger-500);
  background: #fff5f5;
  border-color: #ffe3e3;
}

.dash-banner-danger .dash-banner-icon {
  background: #ffd8d8;
  color: var(--danger-500);
}

.dash-banner-danger .dash-banner-title {
  color: var(--danger-600);
}

.dash-banner-danger .dash-banner-action {
  background: #ffd8d8;
  color: var(--danger-600);
  border: 1px solid #ffb2b2;
}

.dash-banner-danger .dash-banner-action:hover {
  background: var(--danger-500);
  color: #fff;
}

.dash-banner-info {
  border-left-color: var(--indigo);
  background: #f5f6ff;
  border-color: #e0e4ff;
}

.dash-banner-info .dash-banner-icon {
  background: #e0e3ff;
  color: var(--indigo);
}

.dash-banner-info .dash-banner-title {
  color: var(--indigo);
}

.dash-banner-info .dash-banner-action {
  background: #e0e3ff;
  color: var(--indigo);
  border: 1px solid #b3bcff;
}

.dash-banner-info .dash-banner-action:hover {
  background: var(--indigo);
  color: #fff;
}

@media (max-width: 520px) {
  .dash-banner-title {
    display: none;
  }

  .dash-banner-text {
    white-space: normal;
  }
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(6, 13, 31, 0.6);
  backdrop-filter: blur(12px) saturate(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface-0);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 380px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 24px 72px rgba(6, 13, 31, 0.28);
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--s5);
}

/* === Toast notifikasi === */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--navy-card);
  color: #fff;
  padding: 11px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast::before {
  font-size: 14px;
}

.toast.success {
  background: var(--success-600);
}

.toast.success::before {
  content: '✓';
}

.toast.danger {
  background: var(--danger-600);
}

.toast.danger::before {
  content: '!';
}

.toast.warning {
  background: var(--warning-600);
}

.toast.warning::before {
  content: '⚠';
}

.profile-hero {
  text-align: center;
  padding: 36px 20px 24px;
  background: var(--navy);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at 50% 110%, rgba(59, 91, 255, 0.3), transparent 70%);
}

.profile-hero>* {
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--indigo) 0%, #5b7fff 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 34px;
  margin: 0 auto 14px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: visible;
  cursor: pointer;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar .edit-icon {
  position: absolute;
  bottom: 0;
  right: -2px;
  background: var(--indigo);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 11px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.profile-name {
  font-size: 20px;
  font-weight: 800;
}

.profile-email {
  font-size: 13px;
  color: var(--text-on-dark-2);
  margin-top: 3px;
}

.profile-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--indigo), transparent);
  flex-shrink: 0;
}

#page-absen-kamera {
  display: none;
  position: absolute;
  inset: 0;
  z-index: var(--z-modal);
  background: linear-gradient(180deg, #1a120c 0%, #221711 100%);
}

#page-absen-kamera.show {
  display: block;
}

#camera-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 0.5s;
  background: #000;
  filter: sepia(0.12) contrast(1.03) brightness(0.95) saturate(1.05);
}

.camera-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background-color: rgba(34, 23, 17, 0.95);
  border-bottom: 1px solid rgba(201, 169, 126, 0.08);
  z-index: 15;
}

.camera-close {
  color: #c9a97e;
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
}

.camera-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #ede0d0;
  font-size: 15.5px;
  font-weight: 500;
}

#camera-bottom-phase2 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  background: linear-gradient(180deg, rgba(26, 18, 12, 0.85) 0%, #1a120c 40%);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px 22px;
  display: none;
  flex-direction: column;
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(201, 169, 126, 0.06);
}

.camera-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}

.camera-step-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.camera-step-badge.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
}

.camera-step-badge.done {
  background: #059669;
  color: #fff;
}

.gps-verify-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 14;
  background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
  padding: 20px;
}

.gps-radar-pulse {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  border: 2px solid #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 8px;
}

.gps-radar-pulse::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(59, 130, 246, 0.45);
  animation: radar-spin 4s linear infinite;
}

@keyframes radar-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.gps-info-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 18px;
  max-width: 330px;
  width: 92%;
  text-align: center;
  margin-top: 8px;
  backdrop-filter: blur(10px);
}

.gps-verify-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.gps-verify-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  text-align: center;
  max-width: 300px;
}

/* === Tabel rekap (responsive) === */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.table-responsive::-webkit-scrollbar {
  height: 4px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 2px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 2px;
}

.my-jadwal-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: var(--s3);
  min-width: 340px;
}

.my-jadwal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 3px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1.5px solid transparent;
  transition: all 0.15s;
}

.my-jadwal-cell.today {
  background: var(--indigo-soft);
  border-color: var(--indigo);
}

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

.my-jadwal-date {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* === Grid jadwal shift === */
.jadwal-grid-header,
.jg-row {
  display: grid;
  grid-template-columns: 50px repeat(7, 1fr);
  gap: 4px;
  margin-top: 4px;
  min-width: 460px;
}

.jg-cell {
  padding: 8px 3px;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  text-align: center;
}

.jg-regu-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  background: transparent;
}

.jg-header-day {
  background: transparent;
  padding-bottom: 2px;
}

.jg-day-num {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.shift-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  display: inline-block;
  letter-spacing: 0.02em;
}

.shift-badge.s1 {
  background: #dbeafe;
  color: #1d4ed8;
}

.shift-badge.s2 {
  background: var(--emerald-soft);
  color: #065f46;
}

.shift-badge.s3 {
  background: #f3e8ff;
  color: #6d28d9;
}

.shift-badge.ns {
  background: var(--amber-soft);
  color: #b45309;
}

.shift-badge.off {
  background: var(--surface-2);
  color: var(--text-muted);
}

.shift-badge.flx {
  background: #dbeafe;
  color: var(--indigo);
}

.shift-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: var(--s2);
}

.shift-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
  cursor: pointer;
  transition: all 0.18s;
}

.shift-opt.selected {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.shift-opt-badge {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.shift-opt-time {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

.skeleton {
  background: linear-gradient(90deg, #edf0f9 25%, #dde3f0 37%, #edf0f9 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}

.skeleton-circle {
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-line {
  height: 13px;
  margin-bottom: 6px;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.section-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 2px var(--s2);
}

#rekap-period-panel {
  margin-top: 12px;
  padding: 14px;
  background: var(--surface-1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
}

.approval-item {
  padding: 13px 14px;
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 7px;
}

.approval-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.approval-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* === Tombol approval === */
.btn-approve {
  flex: 1;
  padding: 9px;
  background: var(--emerald-soft);
  color: var(--success-600);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-approve:hover {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
}

.btn-reject {
  flex: 1;
  padding: 9px;
  background: var(--rose-soft);
  color: var(--danger-600);
  border: 1.5px solid #fecdd3;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-reject:hover {
  background: var(--rose);
  color: #fff;
  border-color: var(--rose);
}

.hidden,
.shell.hidden,
#app-container.shell.hidden,
#auth-page.shell.hidden,
[hidden] {
  display: none !important;
}

/* === SVG Icons Utility === */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.icon-lg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* === Form Error Per-Field === */
.input-error {
  border-color: var(--rose) !important;
  background-color: var(--rose-soft) !important;
}

.field-error {
  font-size: 12px;
  color: #f43f5e;
  margin-top: 4px;
  display: none;
  font-weight: 500;
}

.field-error.show {
  display: block;
}

/* === Password Input Wrap & Show/Hide Toggle === */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .input {
  padding-right: 42px;
  width: 100%;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  transition: color 0.15s;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

/* === Password Strength Meter === */
.password-meter {
  margin-top: 6px;
  display: none;
}

.password-meter.show {
  display: block;
}

.password-meter-bar {
  height: 4px;
  width: 100%;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.password-meter-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-meter-text {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.password-meter-fill.weak {
  width: 33%;
  background-color: #f43f5e;
}

.password-meter-fill.medium {
  width: 66%;
  background-color: #f59e0b;
}

.password-meter-fill.strong {
  width: 100%;
  background-color: #10b981;
}

/* === Custom Upload Dropzone === */
.upload-dropzone {
  border: 2px dashed var(--border-mid);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
  background: var(--surface-1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--indigo-500);
  background: var(--indigo-soft);
}

.upload-dropzone-icon {
  margin-bottom: 8px;
  color: var(--indigo-500);
}

.upload-dropzone-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-dropzone-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.upload-preview-wrap {
  margin-top: 10px;
  display: none;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  max-height: 160px;
  border: 1px solid var(--border);
}

.upload-preview-wrap.show {
  display: block;
}

.upload-preview-wrap img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.upload-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* === Helper Cleanups === */
.flex-row-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.margin-top-zero {
  margin-top: 0 !important;
}

/* === Extended Dark Mode Coverage === */
[data-theme='dark'] .card,
[data-theme='dark'] .modal,
[data-theme='dark'] .auth-form-wrap,
[data-theme='dark'] .attendance-card,
[data-theme='dark'] .table-wrap,
[data-theme='dark'] .status-rail,
[data-theme='dark'] .quick-btn {
  background: var(--surface-1);
  border-color: var(--border);
  color: var(--text-primary);
}

[data-theme='dark'] table th {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-bottom-color: var(--border);
}

[data-theme='dark'] table td {
  border-bottom-color: var(--border);
  color: var(--text-primary);
}

[data-theme='dark'] .input,
[data-theme='dark'] .select,
[data-theme='dark'] .textarea {
  background: var(--surface-0);
  border-color: var(--border-mid);
  color: var(--text-primary);
}

[data-theme='dark'] .input:focus,
[data-theme='dark'] .select:focus,
[data-theme='dark'] .textarea:focus {
  border-color: var(--indigo-500);
}

[data-theme='dark'] .chip {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-color: var(--border);
}

[data-theme='dark'] .chip.active {
  background: var(--indigo-500);
  color: #fff;
}

[data-theme='dark'] .tab-nav {
  background: var(--surface-0);
  border-top-color: var(--border);
}

[data-theme='dark'] .modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

/* === Responsive: Tablet (768px+) === */
@media (min-width: 768px) {
  body {
    padding: 0;
    align-items: stretch;
    justify-content: center;
    background: #0a1628;
  }

  .shell {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .main {
    padding-bottom: 70px;
  }

  .tab-nav {
    border-radius: 0;
  }

  .tab-btn.active {
    position: relative;
  }

  .tab-btn.active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -6px;
    height: 2px;
    background: var(--indigo);
    border-radius: 2px;
  }

  .quick-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .tab-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    max-width: 100%;
    border-top: 1.5px solid var(--border);
    padding: 6px 12px;
    display: flex;
    gap: 4px;
    z-index: 1000;
    background: var(--surface-0);
  }

  .tab-btn {
    flex-direction: row;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    padding: 9px 14px;
    border-radius: var(--r-md);
  }

  .tab-btn .tab-icon {
    font-size: 16px;
  }
}

/* === Responsive: Desktop (1024px+) — sidebar layout === */
@media (min-width: 1024px) {
  body {
    padding: 0;
    background: #0a1628;
    background-image:
      radial-gradient(ellipse 80% 60% at 10% 0%, rgba(59, 91, 255, 0.22) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 90% 100%, rgba(0, 201, 122, 0.12) 0%, transparent 55%);
    align-items: stretch;
    justify-content: center;
  }

  /* Shell jadi container penuh dengan sidebar + konten */
  .shell {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: 1fr;
    grid-template-areas: "sidebar content";
    box-shadow: none;
    position: relative;
    overflow: hidden;
  }

  /* Header jadi sidebar kiri */
  .app-header {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 20px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--navy);
  }

  .app-header::before {
    display: none;
  }

  .header-divider {
    display: none !important;
  }

  /* Susun ulang header jadi kartu profil ringkas di puncak sidebar */
  .header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-row>div:first-child.header-greeting,
  .header-row .header-greeting {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .header-row>div:last-child {
    order: 1;
    justify-content: space-between !important;
    flex-direction: row-reverse;
  }

  .header-greeting .greet {
    font-size: 10px;
  }

  .header-greeting .name {
    font-size: 16px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .header-meta {
    margin-top: 0;
  }

  .dark-toggle {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* Tab nav jadi sidebar nav (vertical) */
  .tab-nav {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    transform: none;
    max-width: 100%;
    border-top: none;
    margin-top: 18px;
    padding: 0;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    flex: 1;
    z-index: 10;
    pointer-events: auto;
  }

  .tab-btn {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 14px;
    border-radius: var(--r-lg);
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.01em;
    width: 100%;
    text-align: left;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    transition: all 0.18s ease-in-out;
  }

  .tab-btn .tab-icon {
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .tab-btn.active {
    background: linear-gradient(135deg, var(--indigo) 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(59, 91, 255, 0.35);
  }

  .tab-btn.active::after {
    content: none;
  }

  .tab-btn.active .tab-icon {
    transform: scale(1.1);
    opacity: 1;
  }

  .tab-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
  }

  /* Footer kecil di dasar sidebar */
  .app-header::after {
    content: 'PRESENSIABSEN';
    margin-top: auto;
    padding-top: 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Main konten area = kanan */
  .main {
    grid-area: content;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background: var(--surface-1);
    padding-bottom: 0;
  }

  /* Decorative overlay removed — was conflicting with display:none above */

  /* Cards di desktop lebih lebar, grid 2 kolom untuk beranda */
  .page {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
  }

  .attendance-card {
    padding: 28px 28px 20px;
  }

  .quick-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }

  /* Download buttons di rekap: 3 kolom */
  #btn-download-rekap>div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr 1fr 1fr !important;
  }

  /* Approval list di desktop: card lebih lega */
  .approval {
    padding: 14px 18px;
  }

  /* Profile jadi 2-kolom */
  #page-profile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  .profile-divider {
    display: none;
  }
}

/* === Desktop XL (1280px+) === */
@media (min-width: 1280px) {
  .shell {
    grid-template-columns: 240px minmax(0, 1fr);
    max-width: 100%;
  }

  .app-header {
    padding: 32px 22px 24px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 11px 14px;
  }
}

/* === Custom 404 View === */
.error-404-wrap {
  padding: 60px 20px;
  text-align: center;
}

.error-404-code {
  font-size: 72px;
  font-weight: 800;
  color: var(--indigo-500);
  line-height: 1;
  font-family: var(--font-mono);
}

.error-404-title {
  font-size: 20px;
  font-weight: 700;
  margin: 12px 0 8px;
  color: var(--text-primary);
}

.error-404-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* === Dashboard Admin (gaya kartu modern: ikon lingkaran + indikator delta) === */
#page-dashboard-admin {
  background: var(--admin-wash, transparent);
}

.admin-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: var(--s5);
  gap: var(--s3);
}

.admin-dash-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.admin-dash-subtitle {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.admin-dash-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-xs);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.admin-dash-refresh-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--indigo-soft);
  color: var(--indigo);
  cursor: pointer;
  transition: transform 0.2s, background 0.15s;
  flex-shrink: 0;
}

.admin-dash-refresh-btn:hover {
  background: var(--indigo);
  color: #fff;
}

.admin-dash-refresh-btn:active {
  transform: rotate(180deg);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  flex-shrink: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.admin-stat-grid .admin-stat-card:nth-child(5):last-child {
  grid-column: 1 / -1;
}

@media (min-width: 560px) {
  .admin-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-stat-grid .admin-stat-card:nth-child(5):last-child {
    grid-column: auto;
  }
}

@media (min-width: 900px) {
  .admin-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}

.admin-stat-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 13px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md, var(--shadow-sm));
  border-color: var(--border-mid);
}

.admin-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px currentColor;
}

.admin-stat-icon .icon {
  width: 20px;
  height: 20px;
}

.admin-stat-body {
  min-width: 0;
  padding-top: 1px;
}

.admin-stat-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-bottom: 3px;
}

.admin-stat-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

.admin-stat-delta {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}

.admin-stat-delta .arrow {
  font-size: 10px;
  line-height: 1;
}

.admin-log-card {
  margin-bottom: 0;
}

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

.admin-log-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.admin-log-row:hover {
  border-color: var(--indigo);
  background: var(--surface-1);
}

.admin-log-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.admin-log-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.admin-log-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-log-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* === Approval & Registration Cards === */
.approval-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approval {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.approval:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-mid);
}

.approval-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.approval-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--indigo) 0%, #6366f1 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 91, 255, 0.25);
  font-family: var(--font-mono);
}

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

.approval-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.approval-detail {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.45;
  font-weight: 500;
}

.approval-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.approval-actions .btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--r-md);
}

.btn-approve-all {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 14px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-radius: var(--r-lg);
  font-size: 13.5px;
  font-weight: 800;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
  transition: all 0.2s var(--ease-out);
}

.btn-approve-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.38);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-approve-all:active {
  transform: translateY(0);
}

/* === Filter Chips & Rekap Styling === */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--surface-1);
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-soft);
}

.chip.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
  box-shadow: var(--shadow-indigo);
}

.rekap-period-panel {
  background: var(--surface-1);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 16px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.rekap-period-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.rekap-period-label {
  font-size: 11px;
  font-weight: 800;
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-apply-filter {
  width: 100%;
  padding: 11px 16px;
  background: var(--indigo);
  color: #ffffff;
  border: none;
  border-radius: var(--r-lg);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-indigo);
  transition: all 0.2s ease;
}

.btn-apply-filter:hover {
  background: var(--indigo-hover);
  transform: translateY(-1px);
}

.rekap-download-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1.5px dashed var(--border);
}

.rekap-download-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rekap-download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-export-pdf {
  padding: 11px 12px;
  background: var(--danger-50);
  color: var(--danger-600);
  border: 1.5px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--r-lg);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-export-pdf:hover {
  background: var(--rose);
  color: #ffffff;
  border-color: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.btn-export-excel {
  padding: 11px 12px;
  background: var(--emerald-soft);
  color: var(--success-600);
  border: 1.5px solid rgba(0, 201, 122, 0.3);
  border-radius: var(--r-lg);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-export-excel:hover {
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-emerald);
}

.btn-export-csv {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface-1);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-export-csv:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-mid);
}

/* === Jadwal Admin Styling === */
.admin-jadwal-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-top: 20px;
}

.shift-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.shift-badge.s1 {
  background: #dbeafe;
  color: #1e40af;
}

.shift-badge.s2 {
  background: #fef3c7;
  color: #92400e;
}

.shift-badge.s3 {
  background: #ede9fe;
  color: #5b21b6;
}

.shift-badge.ns {
  background: #ccfbf1;
  color: #0f766e;
}

.shift-badge.flx {
  background: #e0e7ff;
  color: #3730a3;
}

.shift-badge.off {
  background: #ffe4e6;
  color: #9f1239;
}

.bulk-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 11px 14px;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.bulk-day-row:hover {
  border-color: var(--border-mid);
}

.bulk-day-row.is-holiday {
  background: rgba(244, 63, 94, 0.05);
  border-color: rgba(244, 63, 94, 0.25);
}

.bulk-day-label {
  display: flex;
  flex-direction: column;
}

.bulk-day-date {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.bulk-day-date.red {
  color: var(--rose);
}

.bulk-day-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

.bulk-shift-sel {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface-0);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 130px;
}

.bulk-shift-sel.is-holiday-sel {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.08);
  color: var(--rose);
}

/* === Dark Mode Adjustments for Admin Components === */
[data-theme='dark'] .approval {
  background: var(--surface-dark);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .approval:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme='dark'] .chip {
  background: var(--surface-1);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

[data-theme='dark'] .chip:hover {
  background: rgba(59, 91, 255, 0.25);
  border-color: var(--indigo);
  color: #ffffff;
}

[data-theme='dark'] .rekap-period-panel {
  background: var(--surface-1);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .bulk-day-row {
  background: var(--surface-1);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .bulk-shift-sel {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* === Rekap Grid Layout (Filter Sidebar + Content) === */
.rekap-grid-layout .field,
.rekap-grid-layout .field input,
.rekap-grid-layout .field select,
#filter-date-range-wrap input[type="date"],
#filter-date-single-wrap input[type="date"] {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  font-size: 13.5px !important;
  padding: 9px 11px !important;
}

.rekap-grid-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .rekap-grid-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
}

/* Premium Corporate Export Action Buttons */
.btn-export-pdf {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2) !important;
  border-radius: var(--r-md) !important;
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-export-pdf:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3) !important;
}

.btn-export-excel {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.2) !important;
  border-radius: var(--r-md) !important;
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-export-excel:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3) !important;
}

/* Corporate Executive KPI UI Cards */
.kpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.kpi-card-exec {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card-exec .kpi-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-card-exec .kpi-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
}

.kpi-card-exec .kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  width: fit-content;
  margin-top: 2px;
}

.kpi-badge.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.kpi-badge.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* === RESPONSIVE LAYOUT OVERHAUL (PC/Laptop, Tablet, Mobile) === */
.page {
  padding: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Tablet (768px+) adjustments */
@media (min-width: 768px) {
  .page {
    padding: 24px 28px;
  }

  .admin-stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  #bulk-day-rows {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 480px !important;
  }

  .rekap-period-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* PC / Laptop / Desktop (1024px+) adjustments */
@media (min-width: 1024px) {
  .shell {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .main {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden !important;
    background: var(--surface-1);
    height: 100vh;
    height: 100dvh;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .page {
    padding: 24px 28px !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Dashboard Admin on Desktop */
  .admin-stat-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px;
  }

  /* Approval page on PC: 2-column side-by-side layout when pending list exists */
  #page-approval {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    gap: 24px;
    align-items: start;
  }

  /* Rekap page on PC: Clean spacious container without squeezing */
  #page-rekap {
    display: block !important;
    width: 100%;
  }

  /* Override rekap grid at desktop: sidebar 260px + content */
  .rekap-grid-layout {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 20px !important;
    align-items: start !important;
  }

  .rekap-period-panel {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 16px;
  }

  .rekap-period-grid {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0;
  }

  .btn-apply-filter {
    width: auto;
    padding: 11px 24px;
    height: 42px;
  }

  .rekap-download-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* Jadwal page on PC */
  #page-jadwal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  #jadwal-admin-panel form#form-jadwal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
  }

  #bulk-day-rows {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
    max-height: 520px !important;
  }
}

/* XL Desktop (1400px+) */
@media (min-width: 1400px) {
  .shell {
    grid-template-columns: 240px minmax(0, 1fr) !important;
  }

  .page {
    max-width: 100% !important;
    padding: 28px 36px !important;
  }
}

/* === Reset and Redesign Auth Page (Login/Register) for Tablet & Desktop === */
#auth-page.shell {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  grid-template-rows: none;
  grid-template-areas: none;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  height: min(900px, calc(100vh - 48px));
  height: min(900px, calc(100dvh - 48px));
}

/* Template design yang lebih terasa seperti dashboard/kiosk JIU Library */
#auth-page.shell {
  background:
    linear-gradient(130deg, rgba(12, 22, 46, 0.98), rgba(21, 34, 68, 0.95));
  border: 1px solid rgba(255,255,255,0.14);
}

#auth-page .auth-hero {
  background:
    radial-gradient(circle at 70% 8%, rgba(0, 201, 122, 0.15), transparent 25%),
    radial-gradient(circle at 12% 86%, rgba(59, 91, 255, 0.26), transparent 40%),
    linear-gradient(135deg, var(--navy), var(--navy-card));
  box-shadow: inset 0 0 30px rgba(255,255,255,0.05);
}

#auth-page .auth-brand-mark {
  width: 40px;
  height: 40px;
  color: var(--text-on-dark);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--indigo));
}

#auth-page .auth-headline h1 {
  font-size: clamp(28px, 3vw, 34px);
}

#auth-page .auth-headline p {
  color: var(--text-on-dark-2);
}

#auth-page .auth-hero-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--indigo));
}

#auth-page .auth-form-wrap {
  background:
    linear-gradient(180deg, var(--surface-0), var(--surface-1));
  border-left: 1px solid rgba(255,255,255,0.08);
}

#auth-page .auth-form-title {
  font-size: 17px;
  color: var(--navy);
}

#auth-page .field-label {
  color: var(--text-secondary);
}

#auth-page .input,
#auth-page .select,
#auth-page .textarea {
  background: rgba(255,255,255,0.86);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
}

#auth-page .input:focus,
#auth-page .select:focus,
#auth-page .textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px var(--indigo-dim);
}

#auth-page .btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  box-shadow: var(--shadow-indigo);
}

#auth-page .btn-primary:hover {
  background: linear-gradient(135deg, var(--indigo-hover), var(--emerald));
}

#auth-page .auth-switch {
  color: var(--text-secondary);
}

#auth-page .auth-switch button {
  color: var(--indigo);
  font-weight: 800;
}

@media (min-width: 768px) {
  #auth-page.shell {
    max-width: 780px;
    height: auto;
    min-height: 520px;
    flex-direction: row;
  }

  #auth-page .auth-hero {
    width: 42%;
    padding: var(--s8) var(--s5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
  }

  #auth-page .auth-hero-divider {
    width: 2px;
    height: auto;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--indigo) 0%, var(--emerald) 100%);
  }

  #auth-page .auth-form-wrap {
    width: 58%;
    padding: var(--s8) var(--s5);
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  #auth-page.shell {
    max-width: 880px;
    min-height: 560px;
  }

  #auth-page .auth-hero {
    width: 46%;
    padding: var(--s8) var(--s7);
  }

  #auth-page .auth-form-wrap {
    width: 54%;
    padding: var(--s8) var(--s7);
  }
}

/* ============================================================
   MOBILE RESPONSIVE FIXES — Admin Panel (< 1024px)
   Mengatasi konten "mentok" dan terpotong di layar HP
   ============================================================ */

/* --- Dasar: semua konten aman dari overflow horizontal --- */
@media (max-width: 1023px) {

  /* Shell mobile: full-width tanpa sidebar (hanya saat tidak tersembunyi) */
  #app-container.shell:not(.hidden) {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  /* Main content area — beri ruang bawah untuk tab nav */
  .main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 80px !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Page padding mobile compact */
  .page {
    padding: 12px !important;
    max-width: 100% !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Card header: wrap ke bawah saat sempit */
  .card-header {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .card-title {
    font-size: 14px !important;
  }

  /* Semua tabel: scroll horizontal jika overflow */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--r-md);
    max-width: 100%;
  }

  .table {
    min-width: max-content;
  }

  /* Filter chips: wrap ke bawah */
  .chips {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .chip {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  /* --- Laporan / Rekap Halaman --- */
  /* Filter panel: stack vertikal */
  #page-rekap .rekap-period-panel,
  .rekap-period-panel {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .rekap-period-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .rekap-download-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* --- Jadwal Admin --- */
  /* Filter form: stack ke bawah */
  #jadwal-admin-panel form#form-jadwal,
  #form-jadwal {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Jadwal rows: list vertikal (bukan grid multi-kolom) */
  #bulk-day-rows {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    max-height: 55vh !important;
    overflow-y: auto;
    padding-right: 4px;
  }

  .bulk-day-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .bulk-shift-sel {
    min-width: 100% !important;
  }

  /* --- Filter Karyawan --- */
  .admin-emp-filters {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* --- Statistik Dashboard: 2 kolom di mobile --- */
  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .admin-stat-card {
    padding: 12px 10px !important;
  }

  .admin-stat-value {
    font-size: 18px !important;
  }

  /* --- Approval page: 1 kolom di mobile --- */
  #page-approval {
    display: block !important;
  }

  .approval {
    padding: 12px !important;
  }

  /* --- Form modal: padding lebih kecil --- */
  .modal-overlay {
    padding: 12px !important;
    align-items: flex-end !important;
    /* slide up dari bawah */
  }

  .modal-box {
    max-height: 90vh !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
    border-radius: var(--r-2xl) var(--r-2xl) 0 0 !important;
    margin-bottom: 0 !important;
  }

  /* --- Tombol aksi di karyawan: lebih kecil --- */
  .btn-xs {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }

  /* --- Konfigurasi Hak Akses (Settings): scroll horizontal --- */
  .table-responsive table {
    min-width: 700px !important;
  }


  /* --- Rekap Statistik Ringkasan (stat badges di laporan) --- */
  div[style*="display:flex"][style*="gap"] .stat-val,
  .summary-stat {
    font-size: 18px !important;
  }

  /* --- Input dan select lebih touch-friendly --- */
  .input,
  .select,
  select {
    min-height: 40px !important;
    font-size: 14px !important;
  }

  /* --- Tab nav bawah: pastikan tidak terpotong --- */
  .tab-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    padding: 6px 4px !important;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    background: var(--surface-0) !important;
    border-top: 1.5px solid var(--border) !important;
    z-index: var(--z-nav) !important;
    gap: 2px !important;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab-btn {
    flex: 1 !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px !important;
    font-size: 9px !important;
    padding: 6px 2px !important;
    white-space: nowrap !important;
    min-width: 48px !important;
  }

  .tab-btn .tab-icon {
    font-size: 16px !important;
  }

  /* --- Badge di tab --- */
  .tab-badge {
    top: -2px !important;
    right: -2px !important;
    font-size: 8px !important;
    min-width: 14px !important;
    height: 14px !important;
  }

  /* --- App header: sembunyikan konten header di mobile, tapi tab-nav tetap tampil --- */
  .app-header {
    display: contents !important;
  }

  /* Sembunyikan elemen header yang tidak perlu di mobile */
  .app-header .header-row,
  .app-header .header-meta {
    display: none !important;
  }

  /* Sembunyikan divider header di mobile */
  .header-divider {
    display: none !important;
  }

  /* --- Sticky header jika ada --- */
  .sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface-0);
    padding: 12px 12px 8px;
    border-bottom: 1px solid var(--border);
  }
}

/* ============================================================
   DESKTOP RESTORE — Pastikan sidebar & nav tetap benar di PC
   Ini override balik semua aturan mobile untuk >= 1024px
   ============================================================ */
@media (min-width: 1024px) {

  /* Tampilkan kembali sidebar di desktop */
  #app-container.shell .app-header,
  .app-header {
    display: flex !important;
  }

  /* Kembalikan tab-nav ke sidebar vertikal, bukan bottom bar */
  .tab-nav {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    flex-direction: column !important;
    padding: 0 !important;
    background: transparent !important;
    border-top: none !important;
    z-index: 10 !important;
    gap: 6px !important;
    overflow-x: visible !important;
    flex-wrap: nowrap !important;
  }

  /* Tombol tab di sidebar: kembali ke gaya horizontal kiri */
  .tab-btn {
    flex: none !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13.5px !important;
    padding: 12px 14px !important;
    white-space: normal !important;
    min-width: 0 !important;
    width: 100% !important;
    text-align: left !important;
  }

  .tab-btn .tab-icon {
    font-size: 18px !important;
  }

  /* Main: tanpa padding-bottom berlebih */
  .main {
    padding-bottom: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    height: 100dvh;
  }

  /* Page: kembalikan max-width untuk desktop */
  .page {
    padding: 32px 40px !important;
    max-width: 1360px !important;
    overflow-x: visible !important;
  }

  /* Tabel: tidak perlu min-width: max-content di desktop, biarkan flex */
  .table {
    min-width: unset;
  }

  /* Input/Select: kembalikan ukuran normal */
  .input,
  .select,
  select {
    min-height: unset !important;
    font-size: inherit !important;
  }

  /* Modal: kembalikan ke tengah layar */
  .modal-overlay {
    padding: 24px !important;
    align-items: center !important;
  }

  .modal-box {
    max-height: 85vh !important;
    max-height: 85dvh !important;
    border-radius: var(--r-2xl) !important;
    margin-bottom: auto !important;
  }
}


/* --- Extra small screens (< 380px) --- */
@media (max-width: 379px) {
  .page {
    padding: 8px !important;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .chip {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }

  .tab-btn {
    font-size: 8px !important;
    min-width: 40px !important;
  }
}

/* ============================================================
   AUTH PAGE — HP kecil (≤ 480px)
   Menyesuaikan padding, font, dan dimensi agar form login/
   registrasi nyaman di layar HP sempit.
   ============================================================ */
@media (max-width: 480px) {
  #auth-page.shell:not(.hidden) {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .auth-hero {
    padding: 24px 16px 20px;
  }

  .auth-headline h1 {
    font-size: 22px;
  }

  .auth-headline p {
    font-size: 12.5px;
  }

  .auth-form-wrap {
    padding: 16px;
  }

  .auth-form-title {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .field {
    margin-bottom: 12px;
  }

  .input,
  .select,
  .textarea {
    font-size: 14px;
    padding: 10px 12px;
  }

  .btn {
    font-size: 13px;
    padding: 11px 16px;
  }

  .auth-switch {
    font-size: 12px;
    margin-top: 12px;
  }

  .password-toggle-btn {
    right: 6px;
  }

  /**
 * PRESENSIABSEN — Admin CSS Fixes & Enhancements
 * ================================================
 * File ini DITAMBAHKAN setelah main.css (link terpisah atau append ke main.css).
 * Berisi: perbaikan bug, peningkatan responsif, dan polish visual admin panel.
 *
 * Cara pakai: tambahkan di admin.html setelah baris main.css:
 *   <link rel="stylesheet" href="css/admin-fixes.css" />
 */


  /* ============================================================
   BUG FIX 1: Broken Dark-Mode Skeleton Selector
   Di main.css baris ~114, selector [data-theme='dark'] tidak
   punya closing brace sebelum komentar .skeleton — CSS-nya
   "jatuh" ke selektor berikutnya sehingga dark-mode skeleton
   tidak pernah aktif.
   ============================================================ */
  [data-theme='dark'] .skeleton {
    background: linear-gradient(90deg, #162542 25%, #1e2f4d 37%, #162542 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
  }


  /* ============================================================
   BUG FIX 2: --indigo-500 tidak didefinisikan di :root
   Dipakai di dark mode focus state & error teks, tapi variabel
   ini tidak ada di :root — fallback ke --indigo.
   ============================================================ */
  :root {
    --indigo-500: #3b5bff;
    /* alias --indigo */
    --blue: #3b82f6;
    --blue-soft: #eff6ff;
    --navy-mid-alt: #1e2f4d;
    /* dipakai di beberapa tempat */
  }


  /* ============================================================
   BUG FIX 3: Tab-nav mobile – overflow & text terpotong
   Teks label tab terpotong di HP < 390px karena min-width
   dan font-size terlalu besar untuk jumlah tab yang banyak.
   ============================================================ */
  @media (max-width: 1023px) {
    .tab-nav {
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }

    .tab-nav::-webkit-scrollbar {
      display: none;
    }

    .tab-btn {
      min-width: 52px !important;
      flex-shrink: 0 !important;
    }
  }

  /* HP sangat kecil: sembunyikan label, hanya ikon */
  @media (max-width: 360px) {
    .tab-btn span:not(.tab-icon) {
      display: none !important;
    }

    .tab-btn {
      min-width: 40px !important;
      padding: 6px 4px !important;
    }
  }


  /* ============================================================
   BUG FIX 4: Modal bottom-sheet di mobile – safe area
   Pada iPhone dengan notch/Dynamic Island, konten modal terpotong
   karena tidak memperhitungkan safe-area-inset-bottom.
   ============================================================ */
  @media (max-width: 1023px) {
    .modal-overlay {
      padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }

    .modal-box {
      padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .tab-nav {
      padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    }
  }


  /* ============================================================
   BUG FIX 5: Rekap grid di tablet (768–1023px) terlalu sempit
   Filter sidebar + konten tidak muat di satu baris,
   gunakan kolom penuh dan stack vertikal.
   ============================================================ */
  @media (min-width: 768px) and (max-width: 1023px) {
    .rekap-grid-layout {
      display: flex !important;
      flex-direction: column !important;
      gap: 16px !important;
    }

    #reports-grid-layout>.card:first-child {
      width: 100% !important;
    }
  }


  /* ============================================================
   BUG FIX 6: .btn width: 100% menimpa inline-flex tombol aksi
   di header laporan (export PDF/Excel/CSV tampil terlalu lebar).
   ============================================================ */
  .btn-export-pdf,
  .btn-export-excel,
  .btn-export-csv {
    width: auto !important;
  }

  /* Khusus rekap-download-grid: tombol export tetap full di grid */
  .rekap-download-grid .btn-export-pdf,
  .rekap-download-grid .btn-export-excel {
    width: 100% !important;
  }


  /* ============================================================
   BUG FIX 7: Table min-width memaksa horizontal scroll
   di desktop (> 1024px) — tidak perlu di layar lebar.
   ============================================================ */
  @media (min-width: 1024px) {

    .table-responsive .table,
    table.table {
      min-width: unset;
      width: 100%;
    }
  }


  /* ============================================================
   BUG FIX 8: .admin-stat-card icon box-shadow "inset" error
   `box-shadow: inset 0 0 0 1px currentColor` pada ikon lingkaran
   memunculkan border putih yang tidak diinginkan di light mode.
   ============================================================ */
  .admin-stat-icon {
    box-shadow: none !important;
  }


  /* ============================================================
   ENHANCEMENT: Dashboard Admin — Sticky header di atas
   Menambahkan sticky header dengan judul & tombol refresh
   agar selalu terlihat saat scroll.
   ============================================================ */
  .admin-dash-header {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--surface-1);
    margin: -24px -40px 20px;
    padding: 16px 40px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(6, 13, 31, 0.05);
    backdrop-filter: blur(8px);
  }

  @media (max-width: 1023px) {
    .admin-dash-header {
      margin: -12px -12px 16px;
      padding: 12px 16px;
    }
  }

  @media (min-width: 1024px) and (max-width: 1279px) {
    .admin-dash-header {
      margin: -32px -40px 24px;
      padding: 16px 40px;
    }
  }


  /* ============================================================
   ENHANCEMENT: Pill tanggal di dashboard — lebih rapi
   ============================================================ */
  .admin-dash-pill {
    align-items: center;
  }

  .admin-dash-pill>div {
    white-space: nowrap;
  }

  #admin-dash-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
  }


  /* ============================================================
   ENHANCEMENT: Admin Stat Cards — gradient accent top border
   Setiap kartu dapat warna aksen kiri sebagai penanda kategori.
   ============================================================ */
  .admin-stat-card {
    border-top: 3px solid transparent;
    transition: transform 0.18s var(--ease-out),
      box-shadow 0.18s var(--ease-out),
      border-color 0.18s;
  }

  .admin-stat-card:nth-child(1) {
    border-top-color: var(--indigo);
  }

  .admin-stat-card:nth-child(2) {
    border-top-color: var(--emerald);
  }

  .admin-stat-card:nth-child(3) {
    border-top-color: var(--amber);
  }

  .admin-stat-card:nth-child(4) {
    border-top-color: var(--rose);
  }

  .admin-stat-card:nth-child(5) {
    border-top-color: #8b5cf6;
  }

  /* purple */

  .admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  /* Ikon lingkaran – warna konsisten dengan aksen */
  .admin-stat-card:nth-child(1) .admin-stat-icon {
    background: var(--indigo-soft);
    color: var(--indigo);
  }

  .admin-stat-card:nth-child(2) .admin-stat-icon {
    background: var(--emerald-soft);
    color: var(--emerald);
  }

  .admin-stat-card:nth-child(3) .admin-stat-icon {
    background: var(--amber-soft);
    color: var(--amber);
  }

  .admin-stat-card:nth-child(4) .admin-stat-icon {
    background: var(--rose-soft);
    color: var(--rose);
  }

  .admin-stat-card:nth-child(5) .admin-stat-icon {
    background: #f3e8ff;
    color: #8b5cf6;
  }


  /* ============================================================
   ENHANCEMENT: Sidebar nav desktop — hover + active state
   lebih halus dengan transisi warna & indikator strip kiri.
   ============================================================ */
  @media (min-width: 1024px) {
    .tab-btn {
      position: relative;
      overflow: hidden;
      transition: all 0.2s var(--ease-out) !important;
    }

    .tab-btn::before {
      content: '';
      position: absolute;
      left: 0;
      top: 6px;
      bottom: 6px;
      width: 3px;
      background: transparent;
      border-radius: 0 2px 2px 0;
      transition: background 0.2s;
    }

    .tab-btn.active::before {
      background: #fff;
    }

    /* Badge di sidebar nav */
    .tab-badge {
      right: 10px !important;
      top: 50% !important;
      transform: translateY(-50%) !important;
      position: absolute;
    }
  }


  /* ============================================================
   ENHANCEMENT: Rekap filter sidebar — lebih kompak & rapi
   ============================================================ */
  @media (min-width: 900px) {
    #reports-grid-layout>.card:first-child {
      position: sticky;
      top: 72px;
      /* Tinggi sticky header admin-dash */
      max-height: calc(100vh - 100px);
      max-height: calc(100dvh - 100px);
      overflow-y: auto;
    }
  }

  /* Label filter lebih kecil & subtle */
  .rekap-grid-layout .field-label {
    font-size: 10px;
    letter-spacing: 0.07em;
  }

  .rekap-grid-layout .input,
  .rekap-grid-layout .select {
    font-size: 13.5px;
    padding: 9px 11px;
  }


  /* ============================================================
   ENHANCEMENT: KPI Cards — lebih distinktif
   ============================================================ */
  .kpi-card-exec {
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s;
  }

  .kpi-card-exec:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }

  .kpi-card-exec .kpi-value {
    font-size: 22px;
    font-family: var(--font-mono);
  }


  /* ============================================================
   ENHANCEMENT: Report table — header sticky
   Saat tabel laporan panjang, header kolom tetap terlihat.
   ============================================================ */
  #report-display-container table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-1);
    z-index: 5;
    box-shadow: 0 2px 0 var(--border);
  }

  /* Table row hover effect */
  #report-display-container table tbody tr {
    transition: background 0.12s;
  }

  #report-display-container table tbody tr:hover {
    background: var(--indigo-soft) !important;
  }


  /* ============================================================
   ENHANCEMENT: Tombol export — ukuran & ikon konsisten
   ============================================================ */
  .btn-export-pdf,
  .btn-export-excel {
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    border-radius: var(--r-md) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap;
  }


  /* ============================================================
   ENHANCEMENT: Approval cards — lebih profesional
   ============================================================ */
  .approval {
    transition: transform 0.18s var(--ease-out),
      box-shadow 0.18s var(--ease-out),
      border-color 0.18s;
    border-left: 3px solid transparent;
  }

  .approval:hover {
    border-left-color: var(--indigo);
  }

  .approval-head {
    align-items: center;
  }

  /* Badge status pada approval */
  .approval .badge {
    font-size: 10px;
    padding: 2px 8px;
  }


  /* ============================================================
   ENHANCEMENT: Scroll indicator di tabel mobile
   ============================================================ */
  .table-responsive {
    position: relative;
  }

  @media (max-width: 768px) {
    .table-responsive::after {
      content: '← scroll →';
      display: block;
      text-align: center;
      font-size: 10px;
      color: var(--text-muted);
      font-weight: 600;
      padding: 4px 0 2px;
      letter-spacing: 0.06em;
    }
  }


  /* ============================================================
   ENHANCEMENT: Dark mode – perbaikan warna yang kurang kontras
   ============================================================ */
  [data-theme='dark'] .admin-stat-card {
    background: var(--surface-1);
    border-color: rgba(255, 255, 255, 0.08);
  }

  [data-theme='dark'] .admin-stat-value {
    color: #f0f4ff;
  }

  [data-theme='dark'] .admin-stat-label {
    color: var(--text-secondary);
  }

  [data-theme='dark'] .admin-stat-delta {
    color: var(--text-muted);
  }

  [data-theme='dark'] .kpi-card-exec {
    background: var(--surface-1);
    border-color: rgba(255, 255, 255, 0.08);
  }

  [data-theme='dark'] .kpi-card-exec .kpi-value {
    color: #f0f4ff;
  }

  [data-theme='dark'] .admin-log-row {
    background: var(--surface-1);
    border-color: rgba(255, 255, 255, 0.08);
  }

  [data-theme='dark'] .admin-log-row:hover {
    background: var(--surface-2);
    border-color: var(--indigo);
  }

  [data-theme='dark'] .admin-dash-header {
    background: rgba(6, 13, 31, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.07);
  }

  [data-theme='dark'] .bulk-day-date {
    color: var(--text-primary);
  }

  [data-theme='dark'] #report-display-container table thead th {
    background: var(--surface-2);
    color: var(--text-secondary);
  }

  [data-theme='dark'] #report-display-container table tbody tr:hover {
    background: rgba(59, 91, 255, 0.12) !important;
  }


  /* ============================================================
   ENHANCEMENT: Tablet layout (768–1023px) — header app tampil
   Di tablet, tampilkan header mini horizontal (bukan sidebar).
   ============================================================ */
  @media (min-width: 768px) and (max-width: 1023px) {

    .app-header .header-row,
    .app-header .header-meta {
      display: flex !important;
    }

    .app-header {
      display: block !important;
      padding: 10px 20px !important;
      background: var(--navy) !important;
    }

    .header-row {
      flex-direction: row !important;
      align-items: center !important;
    }

    .header-greeting .name {
      font-size: 15px !important;
    }

    .header-meta {
      margin-top: 6px !important;
      font-size: 10px !important;
    }
  }


  /* ============================================================
   ENHANCEMENT: Jadwal bulk input — grid lebih rapi di tablet
   ============================================================ */
  @media (min-width: 600px) and (max-width: 1023px) {
    #bulk-day-rows {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 10px !important;
    }
  }

  .bulk-day-row {
    align-items: center;
  }

  .bulk-day-date {
    line-height: 1.2;
  }


  /* ============================================================
   ENHANCEMENT: Pengaturan / Settings — tabel akses hak
   Scroll horizontal lebih smooth dengan snapping
   ============================================================ */
  #page-pengaturan .table-responsive {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  #page-pengaturan .table-responsive table {
    min-width: 680px;
  }


  /* ============================================================
   ENHANCEMENT: Empty state — tampil lebih menarik
   ============================================================ */
  .empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
  }

  .empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
  }

  .empty-state-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
  }

  .empty-state-desc {
    font-size: 13px;
    line-height: 1.6;
  }


  /* ============================================================
   ENHANCEMENT: Toast — animasi masuk/keluar lebih smooth
   ============================================================ */
  .toast {
    animation: toastIn 0.3s var(--ease-out) both;
    pointer-events: auto;
  }

  @keyframes toastIn {
    from {
      opacity: 0;
      transform: translateY(-12px) scale(0.96);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .toast.removing {
    animation: toastOut 0.25s ease-in both;
  }

  @keyframes toastOut {
    from {
      opacity: 1;
      transform: scale(1);
    }

    to {
      opacity: 0;
      transform: scale(0.9);
    }
  }


  /* ============================================================
   ENHANCEMENT: Loading skeleton — animasi lebih smooth
   ============================================================ */
  .skeleton {
    animation: skeleton-shimmer 1.6s ease-in-out infinite !important;
  }


  /* ============================================================
   ENHANCEMENT: Fokus aksesibilitas — ring lebih jelas
   (penting untuk keyboard navigation & audit WCAG)
   ============================================================ */
  :focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
    border-radius: var(--r-sm);
  }

  button:focus-visible,
  .tab-btn:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
  }


  /* ============================================================
   ENHANCEMENT: Print styles — laporan cetak rapi
   ============================================================ */
  @media print {

    .app-header,
    .tab-nav,
    .admin-dash-header,
    .btn-export-pdf,
    .btn-export-excel,
    .btn-export-csv,
    .btn-secondary,
    .chips,
    .rekap-grid-layout>.card:first-child {
      display: none !important;
    }

    .main {
      padding-bottom: 0 !important;
      overflow: visible !important;
    }

    .page {
      padding: 0 !important;
    }

    table {
      page-break-inside: avoid;
    }

    thead {
      display: table-header-group;
    }

    tbody tr {
      page-break-inside: avoid;
    }
  }


  /* ============================================================
   ENHANCEMENT: Smooth scrollbar custom (desktop)
   ============================================================ */
  @media (min-width: 1024px) {

    .main::-webkit-scrollbar,
    #reports-grid-layout>*::-webkit-scrollbar {
      width: 5px;
    }

    .main::-webkit-scrollbar-track,
    #reports-grid-layout>*::-webkit-scrollbar-track {
      background: transparent;
    }

    .main::-webkit-scrollbar-thumb,
    #reports-grid-layout>*::-webkit-scrollbar-track:hover {
      background: var(--border-mid);
      border-radius: 3px;
    }

    .main::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }
  }


  /* ============================================================
   ENHANCEMENT: Transisi halaman (page switch)
   ============================================================ */
  .page.active {
    animation: fadeSlideIn 220ms var(--ease-out) both;
  }

  @keyframes fadeSlideIn {
    from {
      opacity: 0;
      transform: translateY(6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }


  /* ============================================================
   RESPONSIVE POLISH — Specific page tweaks
   ============================================================ */

  /* Dashboard: chart height adaptif */
  @media (max-width: 480px) {

    #trendChart,
    #reportChart {
      max-height: 180px;
    }

    .card [style*="height:250px"],
    .card [style*="height: 250px"] {
      height: 200px !important;
    }
  }

  /* Approval: action buttons full-width di mobile */
  @media (max-width: 520px) {
    .approval-actions {
      flex-direction: column !important;
    }

    .approval-actions .btn {
      width: 100% !important;
      justify-content: center;
    }
  }

  /* Karyawan filter: wrap & full-width input di mobile */
  @media (max-width: 600px) {

    #emp-search,
    #emp-filter-div,
    #emp-filter-regu {
      width: 100% !important;
      min-width: 0 !important;
    }
  }

  /* Admin dash pill: sembunyikan teks tanggal di HP kecil */
  @media (max-width: 480px) {
    .admin-dash-pill>div {
      display: none !important;
    }

    .admin-dash-pill {
      padding: 6px !important;
      gap: 6px !important;
    }
  }

  /* Report export buttons: wrap 2 per baris di mobile */
  @media (max-width: 600px) {
    #report-display-container+div [style*="display:flex"][style*="gap"] {
      flex-wrap: wrap !important;
    }
  }
}

/* ============================================================
   MODERN ENTERPRISE UI / CLEAN ERP DESIGN SYSTEM (FRAPPE STYLE)
   ============================================================ */
.enterprise-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  overflow: hidden;
}

.enterprise-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  gap: 16px;
  flex-wrap: wrap;
}

.enterprise-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.enterprise-breadcrumbs .brand-badge {
  width: 24px;
  height: 24px;
  background: #0f172a;
  color: #fff;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.enterprise-breadcrumbs .crumb-sep {
  color: #cbd5e1;
  font-weight: 400;
}

.enterprise-breadcrumbs .crumb-active {
  color: #0f172a;
  font-weight: 700;
}

.enterprise-searchbar {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  gap: 8px;
  max-width: 380px;
  width: 100%;
  transition: all 0.2s ease;
}

.enterprise-searchbar:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.enterprise-searchbar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  width: 100%;
  color: #1e293b;
}

.enterprise-searchbar kbd {
  font-family: inherit;
  font-size: 10px;
  background: #e2e8f0;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.enterprise-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enterprise-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  gap: 16px;
  flex-wrap: wrap;
}

.enterprise-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enterprise-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.enterprise-badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.enterprise-badge-pill.success {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}

.enterprise-badge-pill.warning {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}

.enterprise-badge-pill.danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.enterprise-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.enterprise-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.enterprise-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.enterprise-btn-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.enterprise-btn-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

/* Tabs */
.enterprise-tabs-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}

.enterprise-tab-item {
  padding: 12px 4px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.enterprise-tab-item:hover {
  color: #0f172a;
}

.enterprise-tab-item.active {
  color: #0f172a;
  border-bottom-color: #0f172a;
  font-weight: 700;
}

/* 2-Column Layout */
.enterprise-2col-layout {
  display: flex;
  background: #ffffff;
  min-height: 520px;
}

.enterprise-left-sidebar {
  width: 240px;
  min-width: 240px;
  border-right: 1px solid #edf2f7;
  padding: 20px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.enterprise-profile-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.enterprise-meta-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #edf2f7;
  padding-top: 14px;
}

.enterprise-meta-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
}

.enterprise-meta-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
}

.enterprise-attachment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  color: #334155;
  margin-top: 4px;
  gap: 6px;
}

.enterprise-attachment-chip:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.enterprise-audit-footer {
  margin-top: auto;
  border-top: 1px solid #edf2f7;
  padding-top: 14px;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.enterprise-main-area {
  flex: 1;
  padding: 24px;
  background: #ffffff;
  overflow-x: auto;
}

/* Dual-Bar Chart Container */
.enterprise-chart-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.enterprise-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.enterprise-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 4px;
}

/* Tables */
.enterprise-kra-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  margin-top: 12px;
}

.enterprise-kra-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.enterprise-kra-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  color: #1e293b;
  vertical-align: middle;
}

.enterprise-kra-table tr:last-child td {
  border-bottom: none;
}

.enterprise-kra-table tr:hover td {
  background: #fafbfc;
}

/* Enterprise Modal Overlay & Dialog */
.enterprise-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.enterprise-modal-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.enterprise-modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 1040px;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modal-pop 0.2s ease-out;
}

/* Mobile Responsive */
@media (max-width: 860px) {
  .enterprise-2col-layout {
    flex-direction: column;
  }
  .enterprise-left-sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid #edf2f7;
  }
  .enterprise-profile-img {
    max-width: 160px;
    margin: 0 auto;
  }
}
