/* =========================================================
   E-PRESENSI DOSEN — v1.9 DESIGN SYSTEM (Mobile / Dosen)
   Pendekatan baru: flat-minimal, aksen tunggal, tipografi lega
   ========================================================= */

/* Icon SVG monokrom v2.2.6 - lihat app/Core/icons.php */
.icon-svg { color: #64748b; display: inline-block; }
.btn .icon-svg, .badge .icon-svg { color: currentColor; }
svg { flex-shrink: 0; }
.btn svg, .badge svg { min-width: 12px; min-height: 12px; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700;800&display=swap');

:root {
  /* Palet v2.1.1: indigo-teal modern, lebih segar & profesional dari ungu solid
     sebelumnya - tetap satu warna aksen dominan (bukan gradient berlebihan)
     agar konsisten dengan filosofi desain "flat-minimal, aksen tunggal". */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #0ea5e9;
  --accent-soft: #e0f2fe;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #0891b2;
  --info-soft: #ecfeff;
  --secondary: #64748b;

  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-soft: #64748b;
  --line: #e2e8f0;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* alias lama dipertahankan agar kompatibel dengan markup yang belum sempat diubah */
  --card-bg: var(--surface);
  --text: var(--ink);
  --text-muted: var(--ink-soft);
  --border: var(--line);
  --radius: var(--radius-lg);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(84px + var(--safe-bottom));
}

/* ===== TOP BAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: #fff;
  padding: calc(18px + var(--safe-top)) 20px 24px;
}
.topbar .greeting { font-size: 12.5px; opacity: .6; font-weight: 500; }
.topbar .username { font-size: 21px; font-weight: 700; margin-top: 3px; letter-spacing: normal; }
.topbar .topbar-row { display:flex; align-items:center; justify-content:space-between; }
.topbar .icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.1); display:flex; align-items:center; justify-content:center;
  color:#fff; text-decoration:none; font-size:17px;
}

/* ===== CLOCK CARD ===== */
.clock-card {
  margin: -14px 18px 18px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.clock-card .time {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Courier New', monospace;
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 800;
  letter-spacing: normal;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.clock-card .date { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; font-weight: 500; }
.clock-card .server-tag { display:inline-block; margin-top:10px; font-size:10.5px; background:var(--primary-soft); color:var(--primary); padding:4px 12px; border-radius:20px; font-weight:700; }

/* ===== TODAY CARD ===== */
.today-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  text-align: center;
}
.today-card-shift {
  font-size: 13px; color: var(--ink-soft); font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.today-status-row { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 18px; }
.today-status-item { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: .38; }
.today-status-item.done { opacity: 1; }
.today-status-label { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.today-status-time { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: normal; }
.today-status-item.done .today-status-time { color: var(--success); }
.today-status-divider { width: 1px; height: 36px; background: var(--line); }
.today-done-msg {
  margin-top: 18px; font-size: 13.5px; font-weight: 700; color: var(--success);
  background: var(--success-soft); padding: 12px; border-radius: var(--radius-md);
}

/* ===== HOME SUMMARY CARD ===== */
.home-summary-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 18px; border: 1px solid var(--line);
}
.home-summary-header { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.home-summary-link { font-size: 11.5px; color: var(--primary); font-weight: 700; }
.home-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.home-summary-item { text-align: center; }
.home-summary-num { font-size: 21px; font-weight: 800; letter-spacing: normal; }
.home-summary-lbl { font-size: 10px; color: var(--ink-soft); margin-top: 3px; font-weight: 600; }

/* ===== CONTENT ===== */
.content { padding: 0 18px 18px; }

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.card-title { font-size: 14.5px; font-weight: 700; margin-bottom: 12px; display:flex; align-items:center; gap:8px; }

/* ===== STATUS GRID ===== */
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-box {
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--line);
}
.status-box .label { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing:.06em; font-weight: 700; }
.status-box .value { font-size: 19px; font-weight: 800; margin-top: 5px; letter-spacing: normal; }
.status-box.done { background: var(--success-soft); border-color: #a7f3d0; }
.status-box.pending { background: var(--warning-soft); border-color: #fde68a; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items:center; justify-content:center; gap:8px;
  width: 100%; padding: 15px 18px;
  border-radius: var(--radius-md);
  border: none; font-size: 14.5px; font-weight: 700;
  cursor: pointer; text-decoration:none;
  transition: transform .1s ease, opacity .2s;
  font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity:.45; cursor:not-allowed; }
.btn-sm { padding: 9px 15px; font-size: 13px; width:auto; }
.btn-icon {
  width: 30px; height: 30px; padding: 0; font-size: 14px; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0; line-height: 1;
}
.btn-block-group { display:flex; gap:10px; }

/* ===== BADGE ===== */
.badge {
  display: inline-block; padding: 4px 11px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; text-transform: capitalize;
}
.badge-success { background:var(--success-soft); color:#047857; }
.badge-warning { background:var(--warning-soft); color:#b45309; }
.badge-danger { background:var(--danger-soft); color:#b91c1c; }
.badge-info { background:var(--info-soft); color:#0e7490; }
.badge-secondary { background:#f4f4f5; color:#52525b; }
.badge-primary { background:var(--primary-soft); color:var(--primary); }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 10px 8px calc(10px + var(--safe-bottom));
  z-index: 50;
}
.bottom-nav a {
  flex: 1; text-align: center; text-decoration: none; color: var(--ink-soft);
  font-size: 10.5px; font-weight: 600; padding: 7px 0; display:flex; flex-direction:column; align-items:center; gap:5px;
  border-radius: 14px;
}
.bottom-nav a.active { color: var(--primary); font-weight:700; background: var(--primary-soft); }
.bottom-nav .nav-icon { font-size: 21px; }

/* ===== FORM ===== */
.form-group { margin-bottom: 15px; }
.form-label { font-size: 12.5px; font-weight: 700; margin-bottom: 7px; display:block; color: var(--ink); }
.form-control {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-md);
  border: 1.5px solid var(--line); font-size: 14.5px; background: var(--surface); color: var(--ink);
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); }
select.form-control { appearance: none; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== ALERT ===== */
.alert { padding: 13px 15px; border-radius: var(--radius-md); font-size: 13.5px; margin-bottom: 15px; font-weight: 500; }
.alert-success { background:var(--success-soft); color:#047857; }
.alert-error { background:var(--danger-soft); color:#b91c1c; }
.alert-info { background:var(--info-soft); color:#0e7490; }
.alert-warning { background:var(--warning-soft); color:#b45309; }

/* ================= MODAL GENERIK (jkal-modal-*) =================
   Dipakai luas di admin & dosen untuk modal detail/konfirmasi/aksi.
   PENTING: sebelumnya class ini dipakai di banyak halaman tapi TIDAK
   PERNAH didefinisikan di CSS manapun, sehingga <div> modal (default
   display block) selalu tampil menumpuk sejak halaman dimuat, bukannya
   tersembunyi sampai di-trigger JS. Ini akar penyebab "modal tidak
   berfungsi normal". */
.jkal-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,15,20,.55);
  z-index: 300; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.jkal-modal-box {
  background: #fff; border-radius: 18px; padding: 22px 24px; max-width: 440px;
  width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.jkal-modal-box h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }

/* ================= COMBO BOX (searchable single-select) ================= */
.combobox-wrap { position: relative; }
.combobox-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line, #e4e4e7); border-radius: 10px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.combobox-item { padding: 9px 14px; font-size: 13px; cursor: pointer; }
.combobox-item:hover { background: #f5f3ff; }
.combobox-empty { padding: 12px 14px; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ================= MULTI-SELECT COMBO BOX (chip tags) ================= */
.multibox-wrap { position: relative; }
.multibox-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.multibox-chips:empty { display: none; }
.multibox-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft, #f5f3ff);
  color: var(--primary, #6d28d9); border-radius: 20px; padding: 5px 6px 5px 12px; font-size: 12.5px; font-weight: 600;
}
.multibox-chip-remove { cursor: pointer; font-weight: 800; opacity: .6; padding: 0 4px; }
.multibox-chip-remove:hover { opacity: 1; }

/* ===== LOGIN PAGE ===== */
.login-body { background: var(--ink); min-height: 100vh; }
.login-wrap {
  min-height: 100vh; display:flex; flex-direction:column; justify-content:center;
  padding: 32px 22px calc(32px + var(--safe-bottom)); max-width: 440px; margin: 0 auto;
}
.login-hero { text-align:center; margin-bottom: 26px; color: #fff; }
.login-hero-icon {
  font-size: 38px; width: 72px; height: 72px; margin: 0 auto 14px;
  background: rgba(255,255,255,.08); border-radius: var(--radius-lg);
  display:flex; align-items:center; justify-content:center;
}
.login-hero h1 { font-size: 20px; margin: 0; font-weight: 800; letter-spacing: normal; }

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.login-note {
  font-size: 11.5px; color: var(--ink-soft); text-align: center;
  margin: 16px 0 0; line-height: 1.5;
}
.login-footer { text-align:center; font-size:11px; color:rgba(255,255,255,.4); margin-top:22px; }

/* ===== CAMERA / SCAN ===== */
.camera-box {
  position: relative; width: 100%; aspect-ratio: 3/4;
  background: #000; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px;
}
.camera-box video, .camera-box img { width: 100%; height: 100%; object-fit: cover; }
.camera-overlay-face {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width: 92%; aspect-ratio: 3/4; border: 3px dashed rgba(255,255,255,.55); border-radius: 24px / 20px;
}
.liveness-instruction-overlay {
  position:absolute; inset:0; background: rgba(0,0,0,.55);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  text-align:center; padding:20px; z-index:5;
}
.liveness-instruction-text {
  color:#fff; font-size:18px; font-weight:700; text-shadow:0 1px 4px rgba(0,0,0,.6);
}
.liveness-countdown {
  color:#fff; font-size:52px; font-weight:800; line-height:1;
  width:80px; height:80px; border-radius:50%; border:3px solid rgba(255,255,255,.8);
  display:flex; align-items:center; justify-content:center;
}
#qr-reader { width: 100%; border-radius: var(--radius-lg); overflow:hidden; }
#qr-reader video { border-radius: var(--radius-lg); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { padding: 11px 13px; text-align:left; border-bottom:1px solid var(--line); white-space: nowrap; }
table.data-table th { background:var(--bg); font-weight:700; color: var(--ink-soft); font-size:10.5px; text-transform:uppercase; }

body.admin-desktop .app-container { max-width: 1100px; }
body.admin-desktop .bottom-nav { max-width: 1100px; }

.stat-cards { display:grid; grid-template-columns: repeat(2,1fr); gap:10px; }
@media (min-width: 700px) { .stat-cards { grid-template-columns: repeat(4,1fr); } }
.stat-card { background:var(--surface); border-radius: var(--radius-md); padding:16px; border: 1px solid var(--line); }
.stat-card .num { font-size:22px; font-weight:800; letter-spacing: normal; }
.stat-card .lbl { font-size:11px; color:var(--ink-soft); margin-top:3px; font-weight: 600; }

.fab-scan {
  position: fixed; bottom: calc(76px + var(--safe-bottom)); left:50%; transform:translateX(-50%);
  background: var(--primary); color:#fff; width:60px; height:60px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:26px;
  z-index:51; text-decoration:none;
}

.empty-state { text-align:center; padding: 36px 10px; color: var(--ink-soft); }
.empty-state .emoji { font-size: 42px; margin-bottom: 10px; }

.version-float {
  position: absolute; top: calc(8px + var(--safe-top)); right: 12px;
  font-size: 9.5px; color: rgba(255,255,255,.5); z-index: 41; pointer-events: none;
}

.install-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-soft); border-radius: var(--radius-lg); padding: 15px 16px; margin-bottom: 18px;
}
.install-banner-icon { font-size: 26px; flex-shrink: 0; }
.install-banner-text { flex: 1; min-width: 0; }
.install-banner-title { font-weight: 700; font-size: 13px; color: var(--primary-dark); }
.install-banner-desc { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.install-banner-ios { background: var(--warning-soft); display: block; }
.install-banner-ios .install-banner-title { color: #92400e; }
.install-banner-ios .install-banner-desc { color: #78350f; }

.install-gate-footer { font-size: 11px; color: #a1a1aa; margin-top: 26px; }
.install-gate {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  padding: 44px 24px calc(44px + var(--safe-bottom)); text-align: center; max-width: 480px; margin: 0 auto;
}
.install-gate-icon { font-size: 60px; margin-bottom: 10px; }
.install-gate h1 { font-size: 21px; margin: 0 0 10px; font-weight: 800; letter-spacing: normal; }
.install-gate-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; max-width: 380px; }
.install-gate-steps {
  text-align: left; background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 22px; margin-top: 22px; max-width: 380px; width: 100%; border: 1px solid var(--line);
}
.install-gate-step-title { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.install-gate-steps ol { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--ink); line-height: 1.8; }

.device-check-card {
  text-align: left; background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 22px; margin-top: 22px; max-width: 380px; width: 100%; border: 1px solid var(--line);
}
.device-check-title { font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.device-check-desc { font-size: 12px; color: var(--ink-soft); margin: 0 0 14px; }
.device-check-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.device-check-row:last-of-type { border-bottom: none; }
.device-check-label { font-weight: 600; }
.device-check-status { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.device-check-status.status-pending { color: var(--warning); }
.device-check-status.status-ok { color: var(--success); }
.device-check-status.status-fail { color: var(--danger); }

#swUpdateBtn { background: var(--primary); color: #fff; border: none; padding: 7px 15px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; flex-shrink: 0; }

/* ===== TAB SWITCHER ===== */
.tab-switcher { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 5px; margin-bottom: 18px; }
.tab-btn { flex: 1; border: none; background: none; padding: 10px 8px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; font-family: inherit; }
.tab-btn.active { background: var(--surface); color: var(--primary); border: 1px solid var(--line); }

/* ===== JENIS PICKER ===== */
.jenis-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jenis-picker-5 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 380px) { .jenis-picker-5 { grid-template-columns: repeat(5, 1fr); } }
.jenis-option {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 14px 4px; border-radius: var(--radius-md); border: 1.5px solid var(--line);
  cursor: pointer; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center;
}
.jenis-option input { display: none; }
.jenis-option:has(input:checked), .jenis-option.jenis-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.jenis-icon { font-size: 21px; }

/* ===== PROFILE PAGE ===== */
.profile-hero { text-align: center; background: var(--surface); border-radius: var(--radius-lg); padding: 28px 16px; margin-bottom: 16px; border: 1px solid var(--line); }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; background: var(--ink); color: #fff; font-size: 27px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.profile-name { font-weight: 700; font-size: 16.5px; letter-spacing: normal; }
.profile-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }

.menu-list-card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); }
.menu-list-item { display: flex; align-items: center; gap: 13px; padding: 15px 18px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.menu-list-item:last-child { border-bottom: none; }
.menu-list-icon { font-size: 18px; width: 22px; text-align: center; }
.menu-list-label { flex: 1; font-size: 13.5px; font-weight: 600; }
.menu-list-arrow { color: var(--ink-soft); font-size: 18px; }

/* ===== JADWAL TIMELINE ===== */
.jadwal-timeline { position: relative; padding-left: 24px; }
.jadwal-timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.jadwal-timeline-item { position: relative; margin-bottom: 13px; }
.jadwal-timeline-dot { position: absolute; left: -24px; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.jadwal-dot-today { border-color: var(--primary); background: var(--primary); }
.jadwal-timeline-content { background: var(--surface); border-radius: var(--radius-md); padding: 13px 15px; border: 1px solid var(--line); }
.jadwal-timeline-date { font-weight: 700; font-size: 13px; }
.jadwal-timeline-detail { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.jadwal-today-tag { display: inline-block; background: var(--primary-soft); color: var(--primary); font-size: 9.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 5px; vertical-align: middle; }

/* ===== PROGRESS STEPPER ===== */
.progress-stepper { display: flex; align-items: flex-start; margin-bottom: 20px; padding: 0 4px; }
.stepper-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.stepper-num { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.stepper-item.active .stepper-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper-label { font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.stepper-item.active .stepper-label { color: var(--primary); }
.stepper-line { flex: 1; height: 2px; background: var(--line); margin: 14px 4px 0; }

/* ===== CALENDAR ===== */
.cal-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.cal-summary-item { border-radius: var(--radius-md); padding: 14px 6px; text-align: center; }
.cal-summary-num { font-size: 21px; font-weight: 800; letter-spacing: normal; }
.cal-summary-lbl { font-size: 10px; color: var(--ink-soft); margin-top: 3px; font-weight: 700; }
.cal-hadir-bg { background: var(--success-soft); }
.cal-hadir-bg .cal-summary-num { color: #047857; }
.cal-terlambat-bg { background: var(--warning-soft); }
.cal-terlambat-bg .cal-summary-num { color: #b45309; }
.cal-izin-bg { background: var(--info-soft); }
.cal-izin-bg .cal-summary-num { color: #0e7490; }
.cal-alpha-bg { background: var(--danger-soft); }
.cal-alpha-bg .cal-summary-num { color: #b91c1c; }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 0 4px; }
.cal-nav-btn { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); font-weight: 700; }
.cal-nav-title { font-size: 15.5px; font-weight: 800; letter-spacing: normal; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid-header { margin-bottom: 8px; }
.cal-grid-header div { text-align: center; font-size: 10px; font-weight: 700; color: var(--ink-soft); }
.cal-cell { aspect-ratio: 1; border-radius: 11px; background: var(--bg); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; font-size: 12.5px; font-weight: 700; border: 1.5px solid transparent; }
.cal-cell-empty { background: none; cursor: default; }
.cal-today { border-color: var(--primary); }
.cal-libur-cell { box-shadow: inset 0 0 0 2px #f59e0b; }
.cal-weekend-libur { background: #fee2e2; }
.cal-weekend-libur.cal-today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-libur-icon { position: absolute; top: 2px; right: 3px; font-size: 8px; }
.cal-daynum { position: relative; z-index: 1; }
.cal-dot-warn { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.cal-hadir { background: var(--success-soft); color: #047857; }
.cal-izin { background: var(--info-soft); color: #0e7490; }
.cal-sakit { background: #f4f4f5; color: #52525b; }
.cal-cuti { background: #f3e8ff; color: #7e22ce; }
.cal-dinas { background: #cffafe; color: #0e7490; }
.cal-alpha { background: var(--danger-soft); color: #b91c1c; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 16px; font-size: 11.5px; color: var(--ink-soft); }
.cal-legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

.cal-detail-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: flex-end; justify-content: center; }
.cal-detail-box { background: var(--surface); border-radius: 24px 24px 0 0; padding: 24px 22px calc(24px + var(--safe-bottom)); max-width: 480px; width: 100%; }
.cal-detail-title { font-size: 15.5px; font-weight: 800; margin-bottom: 12px; }
.cal-detail-status { display: inline-block; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 20px; margin-bottom: 12px; }
.cal-detail-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cal-detail-warn { color: var(--warning); font-size: 12.5px; margin-top: 10px; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.cal-detail-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; text-align: center; }
.cal-foto-ditolak-grid { display: flex; gap: 10px; margin-top: 10px; }
.cal-foto-ditolak-item { flex: 1; }
.cal-foto-ditolak-label { font-size: 10.5px; color: var(--text-muted); margin-bottom: 4px; text-align: center; }
.cal-foto-ditolak-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 2px solid #fecaca; }
.cal-detail-empty { color: var(--ink-soft); font-size: 13px; padding: 12px 0 18px; }
.cal-detail-box .btn { margin-top: 18px; }

.chip-group { display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:9px 15px; border-radius:12px; background:var(--bg); font-size:12.5px; font-weight: 600; border:1.5px solid var(--line); cursor:pointer; }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight:700; }

.section-title { font-size:16px; font-weight:800; margin: 20px 0 12px; letter-spacing: normal; }

a { color: var(--primary); }
