/* =========================================================
   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; }

/* v2.3.2 - PERTAHANAN TAMBAHAN: beberapa kondisi browser Android (WebView
   versi lama, mode "desktop site" yang tersimpan per-origin dari sesi
   sebelumnya, custom ROM/launcher tertentu) bisa MENGABAIKAN meta viewport
   tag di <head> meski sudah benar, sehingga halaman dirender pada kanvas
   lebar "desktop" (umumnya 980px) lalu di-scale-down browser agar muat di
   layar fisik HP - membuat seluruh konten (teks, tombol) terlihat sangat
   kecil/ter-zoom-out, persis seperti versi desktop yang diperkecil paksa.
   Aturan @viewport ini adalah mekanisme CSS native (independen dari meta
   tag HTML) yang memberi instruksi setara langsung dari stylesheet -
   didukung browser Android berbasis Chromium/WebView sebagai jaring
   pengaman kedua jika meta tag gagal diterapkan karena sebab apapun. */
@viewport { width: device-width; zoom: 1.0; }
@-ms-viewport { width: device-width; }

@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;
  border-radius: 0 0 26px 26px;
}
.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;
}

/* v2.3.9 - badge pill status (mis. "PWA Presensi Online") pada topbar,
   sesuai referensi Stitch */
.topbar-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); border-radius: 999px;
  padding: 5px 12px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.85);
  margin-bottom: 14px;
}
.topbar-status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

/* v2.3.9 - tombol lonceng notifikasi dengan badge merah jumlah belum
   dibaca, dipakai di topbar semua halaman dosen (gabungan notifikasi
   pengajuan + presensi ditolak, lihat App\Models\Notifikasi) */
.btn-lonceng { position: relative; }
.btn-lonceng .badge-lonceng {
  position: absolute; top: -3px; right: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
}

/* v2.3.9 - modal dropdown daftar notifikasi, dibuka dari tombol lonceng */
.modal-notifikasi-box { max-width: 420px; max-height: 78vh; overflow-y: auto; text-align: left; color: var(--ink); }
/* v2.5.8 - modal berada di dalam topbar (teks putih); warna judul/isi ditegaskan agar terbaca */
.modal-notifikasi-box h3 { color: var(--ink); }
.modal-notifikasi-item .judul-notif { color: var(--ink); }
.modal-notifikasi-item {
  display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-md);
  background: var(--bg); margin-bottom: 8px; align-items: flex-start;
}
.modal-notifikasi-item.belum-dibaca { background: var(--primary-soft); border: 1px solid var(--primary); }
.modal-notifikasi-item .ikon-notif {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.modal-notifikasi-item .ikon-notif.tipe-disetujui { background: var(--success-soft); color: var(--success); }
.modal-notifikasi-item .ikon-notif.tipe-ditolak { background: var(--danger-soft); color: var(--danger); }
.modal-notifikasi-item .ikon-notif.tipe-info { background: var(--primary-soft); color: var(--primary); }
.modal-notifikasi-item .konten-notif { flex: 1; min-width: 0; }
.modal-notifikasi-item .judul-notif { font-size: 13px; font-weight: 700; margin-bottom: 2px; color: var(--ink); }
.modal-notifikasi-item .pesan-notif { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
.modal-notifikasi-item .waktu-notif { font-size: 10.5px; color: var(--ink-soft); margin-top: 4px; }
.modal-notifikasi-empty { text-align: center; padding: 30px 10px; color: var(--ink-soft); font-size: 13px; }

/* v2.3.4 - icon-btn generik (di luar konteks topbar), dipakai mis. untuk
   tombol switch kamera depan/belakang pada fitur Dokumentasi Kerja */
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ===== 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 calc(90px + var(--safe-bottom)); }

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}
.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;
}
/* v2.5.7 - papan informasi privasi lokasi di halaman login */
.privacy-board {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-lg, 16px);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #e2e8f0;
  font-size: 12px; line-height: 1.55;
}
.privacy-board-title { display:flex; align-items:center; gap:6px; font-weight:700; font-size:13px; color:#fff; margin-bottom:6px; }
.privacy-board ul { margin: 0; padding-left: 18px; }
.privacy-board li { margin: 3px 0; }
.privacy-board strong { color: #fff; }
.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; }
/* v2.5.13 - bingkai kamera selfie dibatasi tinggi layar agar tombol kirim tetap
   terlihat; isi kamera ditampilkan UTUH (contain) — hasil foto tetap resolusi asli. */
#stepFotoCard .camera-box { aspect-ratio: auto; height: min(46vh, 125vw); }
#stepFotoCard .camera-box video { object-fit: contain; }
#stepFotoCard .camera-overlay-face { height: 92%; width: auto; }
.pratinjau-foto { display: block; width: 100%; max-height: 46vh; object-fit: contain; background: #000; border-radius: 16px; margin-bottom: 12px; }
.kirim-melekat { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 60;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px)); padding: 10px 16px 12px; background: var(--surface, #fff);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, .12); border-radius: 16px 16px 0 0; }
.kirim-melekat .btn { width: 100%; font-size: 15px; padding: 14px; }
.kirim-melekat-ket { font-size: 12px; font-weight: 600; color: #b45309; text-align: center; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
body.ada-kirim-melekat .content { padding-bottom: 150px; }
.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 { background: #fef3c7 !important; 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 pemilih hari (Assign Massal) v2.3.2 - checkbox disembunyikan,
   label ditata sebagai kotak yang bisa diklik, berubah warna saat aktif
   agar admin dengan cepat melihat kombinasi hari yang sedang dipilih. */
.admin-hari-chip {
  padding: 8px 12px; border-radius: 8px; background: var(--bg);
  font-size: 12.5px; font-weight: 600; border: 1.5px solid var(--line);
  cursor: pointer; user-select: none; transition: all .15s ease;
}
.admin-hari-chip:has(.hariAktifCheckbox:checked),
.admin-hari-chip.active {
  background: var(--primary-soft); border-color: var(--primary); color: var(--primary);
}
.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); }

/* v2.4.2 - Fallback visual untuk foto dokumentasi kerja yang sudah dihapus
   admin lewat Manajemen Penyimpanan (kolom foto diisi string kosong,
   bukan dihapus barisnya - lihat DokumentasiKerja::hapusFotoByRentang()).
   Tanpa ini, <img src=""> menampilkan ikon broken-image bawaan browser
   yang terlihat seperti error, padahal ini kondisi normal/disengaja. */
img[src=""] {
  background: var(--bg, #f1f5f9);
  border: 1.5px dashed var(--line, #cbd5e1) !important;
  position: relative;
}
img[src=""]::after {
  content: "Foto dihapus";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: var(--ink-soft, #64748b); text-align: center; padding: 2px;
}
.kirim-melekat .alert { margin: 0 0 8px; font-size: 12.5px; padding: 8px 10px; }

/* v2.5.13 - informasi wajib dibaca (layar penuh) */
.wajib-baca-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.88); display: flex; align-items: center; justify-content: center; padding: 18px; }
.wajib-baca-box { background: #fff; color: var(--ink); border-radius: 18px; width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; padding: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.wajib-baca-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 5px 10px; width: fit-content; margin-bottom: 10px; }
.wajib-baca-box h2 { font-size: 17px; margin: 0 0 4px; color: var(--ink); }
.wajib-baca-waktu { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 12px; }
.wajib-baca-isi { font-size: 14px; line-height: 1.55; white-space: pre-line; margin-bottom: 14px; }
.wajib-baca-cek { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; margin-bottom: 12px; color: var(--ink); }
/* v2.5.13 - tab notifikasi */
.notif-tab { display: flex; gap: 6px; margin-bottom: 10px; }
.notif-tab button { flex: 1; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 8px 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.notif-tab button.aktif { background: var(--primary); border-color: var(--primary); color: #fff; }
.notif-tab .notif-tab-angka { background: var(--danger); color: #fff; border-radius: 999px; font-size: 10.5px; padding: 1px 7px; }

/* v2.5.16 - isi informasi tidak keluar box; tautan dokumen ringkas */
.modal-notifikasi-item .konten-notif { min-width: 0; }
.modal-notifikasi-item .pesan-notif, .wajib-baca-isi { overflow-wrap: anywhere; word-break: break-word; }
.tautan-dok { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 6px 12px; border-radius: 8px; background: #eef2ff; color: #4338ca; font-weight: 600; font-size: 12.5px; text-decoration: none; border: 1px solid #c7d2fe; white-space: nowrap; }
.wajib-baca-isi .tautan-dok { font-size: 13.5px; }

/* v2.5.17 - WFH edaran terjadwal (belum dikonfirmasi) */
.cal-rencana { background: #f8fbff; color: #2563eb; border: 1.5px dashed #93c5fd !important; }
.edaran-konf { border-radius: 16px; padding: 14px; margin-bottom: 12px; background: #eff6ff; border: 1.5px solid #93c5fd; }
.edaran-konf.sudah { background: #ecfdf5; border-color: #6ee7b7; }
.edaran-konf h3 { margin: 0 0 4px; font-size: 15px; display: flex; gap: 6px; align-items: center; }
.edaran-konf p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; }
.edaran-konf .btn { margin: 0; }

/* v2.5.21 - ajakan & status notifikasi push */
.push-ajak { display: flex; align-items: center; gap: 8px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; }
.push-ajak span { flex: 1; }
.push-ajak .btn { width: auto; margin: 0; }
.push-x { border: none; background: none; font-size: 18px; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }
.push-baris { display: flex; align-items: center; gap: 10px; }
.push-baris > div { flex: 1; font-size: 13.5px; }
.push-baris small { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.push-baris .btn { width: auto; margin: 0; }
.push-ket { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
