/* ===== Font (self-hosted). Satu keluarga font, sesuai DESIGN.md prinsip
   "one-font system" - MarkForMC diganti Sofia Sans (rekomendasi resmi
   dokumen itu sendiri: sudah ada di fallback stack Mastercard, open
   source, variable font jadi weight 450 bisa dipakai langsung). ===== */

@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url("../fonts/sofia-sans-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Sofia Sans";
  font-style: italic;
  font-weight: 1 1000;
  font-display: swap;
  src: url("../fonts/sofia-sans-italic.woff2") format("woff2");
}

/* ===== Design tokens (dari DESIGN.md §2, §5, §6) ===== */

:root {
  /* ink & cream - bukan Mastercard red/yellow (itu logo-only, gak dipakai) */
  --ink: #141413;
  --charcoal: #262627;
  --slate: #696969;
  --dust: #d1cdc7;

  --canvas: #f3f0ee;
  --lifted: #fcfbfa;
  --surface: #ffffff;
  --bone: #f4f4f4;
  --border: rgba(20, 20, 19, 0.14);
  --border-strong: rgba(20, 20, 19, 0.28);

  /* signal orange - DESIGN.md: reserved buat konfirmasi/aksi penting,
     bukan CTA marketing umum. Di LUCU dipakai buat indikator aktif &
     aksi yang butuh perhatian (approve/reject), bukan tombol biasa. */
  --signal: #cf4500;
  --signal-light: #f37338;
  --clay: #9a3a0a;
  --link-blue: #3860be;

  /* status semantik - fungsional, bukan bagian identitas brand,
     ditonalkan biar harmonis sama palet cream/ink/orange */
  --success: #3f6b3b;
  --success-bg: #e9f0e5;
  --warning: #8a5a12;
  --warning-bg: #f7ecd8;
  --danger: #a83a2a;
  --danger-bg: #f7e8e4;

  /* pastel - permukaan gede (canvas/card) tetap netral cream/putih, tapi
     elemen kecil (stat tile, chip, badge) pakai warna yg lebih jenuh -
     "menyala" secukupnya, bukan pucat kayak versi awal. Bukan warna
     brand/semantik, murni variasi visual biar gak kosong/monoton. */
  --pastel-blue-bg: #dfebfc; --pastel-blue: #2f5fb8;
  --pastel-purple-bg: #e9defb; --pastel-purple: #7c3fd1;
  --pastel-teal-bg: #d2f2e8; --pastel-teal: #0e9678;
  --pastel-rose-bg: #fbdce8; --pastel-rose: #c4275e;

  --font-body: "Sofia Sans", "SofiaSans", Arial, sans-serif;

  /* radius: DESIGN.md §5 - cuma 3 kelompok, gak ada 8-12px di tengah */
  --radius-tiny: 6px;
  --radius: 28px;
  --radius-lg: 40px;
  --radius-pill: 999px;

  /* shadow: atmospheric, spread besar, opacity rendah (DESIGN.md §6) */
  --shadow-1: 0 4px 24px rgba(20, 20, 19, 0.05);
  --shadow-2: 0 24px 48px rgba(20, 20, 19, 0.09);

  font-size: 16px;
}

/* ===== Dark mode =====
   3 opsi (tombol toggle di topbar, lihat assets/js/app.js): Auto (ikut
   prefers-color-scheme sistem), Terang (paksa), Gelap (paksa). Pilihan
   manual disimpan localStorage sbg atribut data-theme di <html> - dicek
   PALING AWAL lewat inline <script> di <head> (lihat includes/layout.php
   & index.php) SEBELUM stylesheet ke-apply, biar gak ada kedipan tema
   salah (FOUC) pas halaman pertama kali dimuat.

   Cuma token warna netral/semantik yg dibalik - --signal/--signal-light/
   --clay/--font-body/--radius-* TETAP SAMA di kedua tema (identitas brand
   oranye harus konsisten, bukan bagian dari sistem terang/gelap). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f0eee7;
    --charcoal: #c9c5bd;
    --slate: #9b968d;
    --dust: #3d3a35;

    --canvas: #161513;
    --lifted: #1e1c19;
    --surface: #211f1c;
    --bone: #2a2723;
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.24);

    --link-blue: #7ea6f5;

    --success: #7cc274;
    --success-bg: #1c2b1a;
    --warning: #e3ac52;
    --warning-bg: #302509;
    --danger: #e8776a;
    --danger-bg: #301511;

    --pastel-blue-bg: #1b2a40; --pastel-blue: #7aa8ea;
    --pastel-purple-bg: #29203e; --pastel-purple: #b48eec;
    --pastel-teal-bg: #12302a; --pastel-teal: #4fd1ae;
    --pastel-rose-bg: #391b26; --pastel-rose: #ec6f9a;

    --shadow-1: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 24px 48px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --ink: #f0eee7;
  --charcoal: #c9c5bd;
  --slate: #9b968d;
  --dust: #3d3a35;

  --canvas: #161513;
  --lifted: #1e1c19;
  --surface: #211f1c;
  --bone: #2a2723;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);

  --link-blue: #7ea6f5;

  --success: #7cc274;
  --success-bg: #1c2b1a;
  --warning: #e3ac52;
  --warning-bg: #302509;
  --danger: #e8776a;
  --danger-bg: #301511;

  --pastel-blue-bg: #1b2a40; --pastel-blue: #7aa8ea;
  --pastel-purple-bg: #29203e; --pastel-purple: #b48eec;
  --pastel-teal-bg: #12302a; --pastel-teal: #4fd1ae;
  --pastel-rose-bg: #391b26; --pastel-rose: #ec6f9a;

  --shadow-1: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 24px 48px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 450;
  /* ambient glow tipis biar halaman dalam gak kerasa kosong/flat -
     gema dari radial glow yg sama di login-shell, jauh lebih halus
     karena di sini kontennya udah padat (card/tabel), bukan hero kosong */
  background:
    radial-gradient(1100px 480px at 15% -8%, rgba(207, 69, 0, 0.06), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

::selection { background: var(--signal-light); color: #fff; }

a { color: var(--link-blue); }

/* ===== Brand mark ===== */

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark svg, .brand-mark img { flex: none; }

.brand-mark .wordmark {
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ===== Login ===== */

/* Full-bleed dark hero: seluruh viewport jadi panel ink, kartu login
   mengambang di tengah. Brand mark pojok kiri-atas, kotak info cuti
   pojok kiri-bawah - bukan lagi panel terpisah kayak versi split. */

.login-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden; /* tahan blob background biar gak bikin scrollbar */
  /* Hero-nya SENGAJA selalu gelap (bukan ikut tema light/dark) - #141413
     literal, bukan var(--ink), soalnya --ink dibalik jadi terang di dark
     mode (dipakai jg sbg teks body) sementara panel hero ini mesti tetap
     gelap di kedua tema. */
  background: #141413;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 32px 7vw;
}

/* Background dinamis: 3 blob blur yang melayang pelan-pelan, warna dari
   palet brand (signal orange/clay) - bukan gradient generik ungu-biru
   trend glassmorphism. login-card di atasnya jadi "kaca" lewat
   backdrop-filter yang nangkep blur blob ini. */
.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.login-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform; /* paksa layer GPU dari awal, gak nunggu heuristik browser */
}

.login-bg span:nth-child(1) {
  width: 640px;
  height: 640px;
  top: -180px;
  left: 6%;
  background: var(--signal-light);
  animation: login-blob-a 20s ease-in-out infinite alternate;
}

.login-bg span:nth-child(2) {
  width: 480px;
  height: 480px;
  bottom: -160px;
  right: 8%;
  background: var(--clay);
  animation: login-blob-b 24s ease-in-out infinite alternate;
}

.login-bg span:nth-child(3) {
  width: 360px;
  height: 360px;
  top: 38%;
  left: 42%;
  background: var(--signal);
  opacity: 0.28;
  animation: login-blob-c 26s ease-in-out infinite alternate;
}

@keyframes login-blob-a {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 50px) scale(1.15); }
}
@keyframes login-blob-b {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, -40px) scale(1.1); }
}
@keyframes login-blob-c {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 60px) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg span { animation: none; will-change: auto; }
}

.login-topleft {
  position: absolute;
  top: 50%;
  left: 6vw;
  transform: translateY(-50%);
  max-width: 400px;
  z-index: 1;
}

/* Logo instansi (kalau admin sudah upload, lihat logo_instansi_html()) - block
   biar pasti nge-stack di atas brand-mark, bukan sejajar (img default-nya
   inline). Ukurannya (width/height) diset langsung dari PHP, disamain
   dgn brand_mark_svg() app di bawahnya. */
.login-topleft > img { display: block; margin-bottom: 4px; }

.login-topleft .brand-mark { margin-top: 18px; }
.login-topleft .brand-mark .wordmark { color: #fff; font-size: 1.2rem; }
.login-topleft .brand-mark svg { color: var(--signal-light); }
.login-topleft .brand-mark img { object-fit: contain; }

.login-topleft .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dust);
}

.login-topleft .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-light);
  display: inline-block;
}

.login-title {
  color: #fff;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 20px 0 0;
  text-wrap: balance;
}

.login-title em {
  font-style: normal;
  color: var(--signal-light);
}

.login-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 22px;
  width: fit-content;
  box-shadow: var(--shadow-2);
}

.login-stat-floating {
  position: absolute;
  left: 40px;
  bottom: 36px;
  z-index: 1;
}

.login-stat-num {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.login-stat-danger .login-stat-num { color: var(--danger); }
.login-stat-success .login-stat-num { color: var(--success); }

.login-stat-label {
  font-size: 0.78rem;
  font-weight: 450;
  color: var(--slate);
  line-height: 1.4;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 388px;
  /* glass: putih tembus + blur nangkep blob di belakangnya. Fallback kalau
     backdrop-filter gak didukung: tetep kebaca, cuma gak nge-blur. */
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 960px) {
  .login-shell { display: block; padding: 40px 20px; }

  .login-topleft { position: static; transform: none; max-width: none; text-align: center; margin: 0 0 28px; }
  .login-topleft .badge { display: flex; justify-content: center; margin-bottom: 12px; }
  .login-topleft .brand-mark { justify-content: center; }
  .login-title { max-width: 36ch; margin: 20px auto 0; font-size: clamp(1.9rem, 6vw, 2.6rem); }

  .login-card { margin: 0 auto; max-width: 340px; padding: 32px 24px; }
  .login-stat-floating { position: static; margin: 24px auto 0; max-width: 340px; }

  /* blob lebih kecil + blur lebih ringan - hemat GPU di HP */
  .login-bg span { filter: blur(60px); }
  .login-bg span:nth-child(1) { width: 380px; height: 380px; }
  .login-bg span:nth-child(2) { width: 320px; height: 320px; }
  .login-bg span:nth-child(3) { display: none; }
}

.login-card h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 500;
}

.login-card .sub {
  color: var(--slate);
  margin: 0 0 26px;
  font-size: 0.92rem;
  font-weight: 450;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  font-size: 0.96rem;
  font-weight: 450;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--ink);
}

.btn-primary {
  width: 100%;
  background: var(--ink);
  color: var(--canvas);
  border: 1.5px solid var(--ink);
  padding: 13px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.06s ease, opacity 0.15s ease;
}

.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.99); }

.alert {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 450;
  margin-bottom: 18px;
}

.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }

.login-footer {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 450;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 960px) {
  .login-footer { position: static; margin-top: 28px; }
}

/* ===== App shell ===== */

.topbar {
  background: var(--surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-1);
  padding: 12px 28px;
  margin: 20px auto 0;
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

.topbar .brand-mark svg { color: var(--ink); }
.topbar .brand-mark .wordmark { font-size: 1.05rem; color: var(--ink); }
.topbar .brand-mark .instansi {
  font-size: 0.7rem;
  font-weight: 450;
  color: var(--slate);
  display: block;
  margin-top: -2px;
}

.topbar nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.topbar nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background 0.15s ease;
}

.topbar nav a:hover { color: var(--ink); background: var(--bone); }

.topbar nav a.active {
  color: #fff;
  background: var(--ink);
}

.topbar .who {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  padding: 7px 14px;
  background: var(--bone);
  border-radius: var(--radius-pill);
}

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bone);
  color: var(--ink);
  transition: background 0.15s ease, transform 0.1s ease;
}

.notif-bell:hover { background: var(--pastel-blue-bg); color: var(--pastel-blue); transform: scale(1.06); }

.notif-count {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
}

.notif-bell.has-unread svg { animation: bell-ring 2.4s ease-in-out infinite; transform-origin: top center; }

/* Toggle tema: 1 tombol, klik gonta-ganti Auto -> Terang -> Gelap -> Auto
   (lihat assets/js/app.js). Ikon & label brebeda per state, dikontrol JS
   lewat data-mode di elemen ini (bukan 3 tombol terpisah). */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bone);
  color: var(--ink);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.theme-toggle:hover { background: var(--pastel-purple-bg); color: var(--pastel-purple); transform: scale(1.06); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-auto, .theme-toggle .icon-light, .theme-toggle .icon-dark { display: none; }
.theme-toggle[data-mode="auto"] .icon-auto,
.theme-toggle[data-mode="light"] .icon-light,
.theme-toggle[data-mode="dark"] .icon-dark { display: block; }

@keyframes bell-ring {
  0%, 88%, 100% { transform: rotate(0deg); }
  90% { transform: rotate(-10deg); }
  92% { transform: rotate(9deg); }
  94% { transform: rotate(-7deg); }
  96% { transform: rotate(5deg); }
  98% { transform: rotate(-2deg); }
}

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

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  border-radius: var(--radius-tiny);
  transition: background 0.15s ease;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--lifted); }

.notif-item.unread { background: var(--pastel-blue-bg); }
.notif-item.unread:hover { background: var(--pastel-blue-bg); filter: brightness(0.98); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pastel-blue);
  margin-top: 6px;
  flex: none;
  opacity: 0;
}

.notif-item.unread .notif-dot { opacity: 1; }

.notif-pesan { font-size: 0.9rem; font-weight: 450; }
.notif-item.unread .notif-pesan { font-weight: 600; }
.notif-waktu { font-size: 0.76rem; color: var(--slate); margin-top: 2px; }

/* ===== Gerak halus - hormat prefers-reduced-motion ===== */

@media (prefers-reduced-motion: no-preference) {
  .card, .stat-tile, .login-card, .login-stat {
    animation: rise-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .stat-row .stat-tile:nth-child(1) { animation-delay: 0.02s; }
  .stat-row .stat-tile:nth-child(2) { animation-delay: 0.06s; }
  .stat-row .stat-tile:nth-child(3) { animation-delay: 0.10s; }
  .stat-row .stat-tile:nth-child(4) { animation-delay: 0.14s; }
  .stat-row .stat-tile:nth-child(5) { animation-delay: 0.18s; }
  .stat-row .stat-tile:nth-child(6) { animation-delay: 0.22s; }
  .card:nth-of-type(2) { animation-delay: 0.08s; }
  .card:nth-of-type(3) { animation-delay: 0.14s; }

  .stat-tile { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .stat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

  .calendar-cell.today {
    animation: today-pulse 2.2s ease-in-out infinite;
  }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes today-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 20, 19, 0.14); }
  50% { box-shadow: 0 0 0 5px rgba(20, 20, 19, 0); }
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.page h1 {
  font-size: 1.9rem;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.page .lead {
  color: var(--slate);
  margin: 0 0 28px;
  font-size: 0.96rem;
  font-weight: 450;
  max-width: 62ch;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-1);
}

.card + .card { margin-top: 22px; }

.card h2 {
  font-weight: 500;
  font-size: 1.05rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 220px));
  gap: 14px;
  margin-bottom: 26px;
}

.stat-tile {
  background: var(--lifted);
  border-radius: var(--radius);
  padding: 20px 22px;
}

/* Sebagian stat-tile jadi <a> (angka rekap yang bisa diklik buat liat detail
   datanya) - reset gaya link bawaan browser, transform:none krn <a> default
   inline gak kena block-layout tanpa ini. */
a.stat-tile { display: block; text-decoration: none; color: inherit; cursor: pointer; }

.stat-tile .num {
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-tile.tone-blue { background: var(--pastel-blue-bg); }
.stat-tile.tone-blue .num { color: var(--pastel-blue); }
.stat-tile.tone-purple { background: var(--pastel-purple-bg); }
.stat-tile.tone-purple .num { color: var(--pastel-purple); }
.stat-tile.tone-teal { background: var(--pastel-teal-bg); }
.stat-tile.tone-teal .num { color: var(--pastel-teal); }
.stat-tile.tone-rose { background: var(--pastel-rose-bg); }
.stat-tile.tone-rose .num { color: var(--pastel-rose); }
.stat-tile.tone-amber { background: var(--warning-bg); }
.stat-tile.tone-amber .num { color: var(--warning); }
.stat-tile.tone-green { background: var(--success-bg); }
.stat-tile.tone-green .num { color: var(--success); }
.stat-tile.tone-red { background: var(--danger-bg); }
.stat-tile.tone-red .num { color: var(--danger); }

@media (prefers-reduced-motion: no-preference) {
  .stat-tile.tone-blue:hover { box-shadow: 0 10px 28px -8px rgba(47, 95, 184, 0.45); }
  .stat-tile.tone-purple:hover { box-shadow: 0 10px 28px -8px rgba(124, 63, 209, 0.4); }
  .stat-tile.tone-teal:hover { box-shadow: 0 10px 28px -8px rgba(14, 150, 120, 0.4); }
  .stat-tile.tone-rose:hover { box-shadow: 0 10px 28px -8px rgba(196, 39, 94, 0.4); }
  .stat-tile.tone-amber:hover { box-shadow: 0 10px 28px -8px rgba(138, 90, 18, 0.4); }
  .stat-tile.tone-green:hover { box-shadow: 0 10px 28px -8px rgba(63, 107, 59, 0.4); }
  .stat-tile.tone-red:hover { box-shadow: 0 10px 28px -8px rgba(168, 58, 42, 0.45); }
}

.stat-tile .label {
  font-size: 0.78rem;
  font-weight: 450;
  color: var(--slate);
  margin-top: 4px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
}

.field select,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 450;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.field .hint {
  font-size: 0.78rem;
  font-weight: 450;
  color: var(--slate);
  margin-top: 6px;
  line-height: 1.5;
}

.btn-secondary {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--ink);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover { background: var(--bone); border-color: var(--ink); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 450;
}

table.data-table th {
  color: var(--slate);
  font-weight: 700;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--border-strong);
}

table.data-table tbody tr {
  transition: background 0.1s ease;
}

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

table.data-table td.num {
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--pastel-blue-bg); color: var(--pastel-blue); }

/* ===== Kalender cuti (dashboard) ===== */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-nav h2 {
  margin: 0;
  font-size: 1.1rem;
}

.calendar-nav-links { display: flex; gap: 8px; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate);
  padding-bottom: 6px;
}

.calendar-cell {
  min-height: 92px;
  border-radius: var(--radius-tiny);
  background: var(--lifted);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-cell.empty { background: transparent; }

.calendar-cell.has-leave { background: var(--warning-bg); }

.calendar-cell.on-leave { background: var(--success-bg); }

.calendar-cell.is-holiday { box-shadow: inset 0 0 0 1.5px rgba(207, 69, 0, 0.35); }

.calendar-cell.is-holiday .calendar-day-num { color: var(--signal); font-weight: 700; }
.calendar-cell.is-holiday.today .calendar-day-num { background: var(--signal); color: #fff; }

.calendar-holiday {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--signal);
  line-height: 1.25;
}

.calendar-day-num {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.calendar-cell.today .calendar-day-num {
  background: var(--ink);
  color: #fff;
}

.calendar-chip {
  font-size: 0.66rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-more {
  font-size: 0.66rem;
  font-weight: 450;
  color: var(--slate);
  padding-left: 4px;
}

.calendar-on-leave-mark {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--success);
}

@media (max-width: 720px) {
  .calendar-cell { min-height: 56px; font-size: 0.8rem; }
  .calendar-chip, .calendar-more { display: none; }
}

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

.quota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.quota-row:last-child { border-bottom: none; }

.quota-row .nama { font-weight: 500; }
.quota-row .jabatan { color: var(--slate); font-size: 0.78rem; }

.quota-row .sisa {
  display: flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  text-align: center;
  color: var(--slate);
  font-weight: 450;
  padding: 48px 0;
  font-size: 0.92rem;
}
