/* ============================================================
   SPPG JEUNGJING — PORTAL RELAWAN
   Stylesheet khusus Portal (index.html) & halaman placeholder.
   Sengaja dipisah dari style.css agar halaman Absensi & Admin
   yang sudah berjalan tidak tersentuh sama sekali.
   Memakai variabel warna/radius/shadow yang sama dari style.css
   (di-load lebih dulu) supaya identitas visual tetap konsisten.
============================================================ */

.portal-main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* --- Kartu sapaan --- */
.portal-greeting {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 18px;
}
.portal-greeting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.portal-greeting h2 {
  font-size: 17px;
  margin: 0;
  color: var(--color-navy);
}
.portal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-success-bg);
  color: var(--color-success);
  white-space: nowrap;
}
.portal-status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
}
.portal-greeting p {
  margin: 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* --- Identitas satuan --- */
.portal-identity {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin: -6px 0 20px;
  line-height: 1.5;
}
.portal-identity strong { color: var(--color-navy); }

/* --- Akses cepat: Absensi --- */
.portal-quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-sky-deep) 100%);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: #fff;
  transition: transform .15s ease;
}
.portal-quick-action:active { transform: scale(0.98); }
.portal-quick-action-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-quick-action-icon svg { width: 24px; height: 24px; }
.portal-quick-action-text h3 { margin: 0 0 2px; font-size: 15px; }
.portal-quick-action-text p { margin: 0; font-size: 12.5px; opacity: 0.88; }
.portal-quick-action-arrow { margin-left: auto; flex-shrink: 0; opacity: 0.8; }

/* --- Judul seksi --- */
.portal-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 10px 4px;
}

/* --- Grid menu --- */
.portal-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.portal-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  text-decoration: none;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.portal-menu-item:active { transform: scale(0.96); }
.portal-menu-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-sky-soft);
  color: var(--color-sky-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-menu-item-icon svg { width: 20px; height: 20px; }
.portal-menu-item span {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
}
.portal-menu-item--logout .portal-menu-item-icon {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* --- Info/pengumuman --- */
.portal-info-card {
  background: var(--color-gold-soft);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 22px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.portal-info-card svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-gold-deep); margin-top: 1px; }
.portal-info-card h4 { margin: 0 0 3px; font-size: 13.5px; color: var(--color-navy); }
.portal-info-card p { margin: 0; font-size: 12.5px; color: var(--color-text-muted); line-height: 1.5; }

@media (min-width: 640px) {
  .portal-main { max-width: 620px; padding-top: 28px; }
  .portal-menu-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
}

/* ============================================================
   HALAMAN PLACEHOLDER (Profil, Riwayat, Jadwal, dst.)
============================================================ */
.placeholder-main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}
.placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-sky-soft);
  color: var(--color-sky-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.placeholder-icon svg { width: 30px; height: 30px; }
.placeholder-main h2 { font-size: 18px; margin: 0 0 8px; color: var(--color-navy); }
.placeholder-main p { font-size: 13.5px; color: var(--color-text-muted); margin: 0 0 24px; line-height: 1.6; }
.placeholder-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-sky);
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
}

/* ============================================================
   LOGIN & PROFIL RELAWAN
============================================================ */
.auth-main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
}
.auth-card h2 { margin: 0 0 4px; font-size: 17px; color: var(--color-navy); }
.auth-card .auth-sub { margin: 0 0 18px; font-size: 13px; color: var(--color-text-muted); }

.password-field { position: relative; }
.password-toggle {
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 8px;
  color: var(--color-text-muted); font-size: 12px; font-weight: 700;
  cursor: pointer;
}

.profile-identity-list { margin-bottom: 18px; }
.profile-identity-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
  font-size: 13.5px;
}
.profile-identity-row:last-child { border-bottom: none; }
.profile-identity-row span:first-child { color: var(--color-text-muted); }
.profile-identity-row span:last-child { font-weight: 700; color: var(--color-navy); text-align: right; }
.profile-identity-row span:last-child.is-kosong { font-weight: 500; color: var(--color-text-muted); font-style: italic; }

.profile-section-title {
  font-size: 13px; font-weight: 700; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 22px 0 10px 2px;
}
.btn-outline {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.btn-danger-outline {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-danger);
  background: transparent;
  color: var(--color-danger);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
}
.must-change-banner {
  background: var(--color-gold-soft);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--color-navy);
  margin-bottom: 16px;
  line-height: 1.5;
}
.toast.toast-success { background: var(--color-success); }

/* ============================================================
   RIWAYAT ABSENSI (Modul Dashboard Relawan #2)
============================================================ */
.riwayat-list { display: flex; flex-direction: column; gap: 8px; }
.riwayat-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.riwayat-item-date { flex-shrink: 0; width: 56px; text-align: center; }
.riwayat-day-name { display: block; font-size: 10.5px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.riwayat-day-num { display: block; font-size: 15px; font-weight: 800; color: var(--color-navy); margin-top: 1px; }
.riwayat-item-detail { flex: 1; min-width: 0; }
.riwayat-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.riwayat-item-jam { font-size: 12px; color: var(--color-text-muted); }
.riwayat-item-ket { font-size: 11.5px; color: var(--color-text-muted); font-style: italic; margin-top: 2px; }

.riwayat-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.riwayat-badge.hadir { background: var(--color-success-bg); color: var(--color-success); }
.riwayat-badge.terlambat { background: var(--color-warning-bg); color: var(--color-warning); }
.riwayat-badge.izin { background: var(--color-info-bg); color: var(--color-info); }
.riwayat-badge.sakit { background: var(--color-danger-bg); color: var(--color-danger); }
.riwayat-badge.tidak-hadir { background: var(--color-muted-bg); color: var(--color-muted-text); }
.riwayat-badge.cuti { background: var(--color-info-bg); color: var(--color-info); }
.riwayat-badge.belum-absen { background: var(--color-muted-bg); color: var(--color-muted-text); }

/* ---- SIRAGA: tab bar horizontal-scroll + panel ---- */
.stok-tabbar {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 10px; margin-bottom: 16px; scrollbar-width: none;
}
.stok-tabbar::-webkit-scrollbar { display: none; }
.stok-subtab {
  flex: 0 0 auto; padding: 9px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text-muted); font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.stok-sub { display: block; }

/* ---- SIRAGA: searchable dropdown (Barang/Supplier) ---- */
.searchable-dropdown { position: relative; }
.searchable-dropdown-input {
  width: 100%; box-sizing: border-box; padding: 11px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background: var(--color-surface); font-family: inherit; font-size: 14px; color: var(--color-text);
}
.searchable-dropdown-input:focus { outline: none; border-color: var(--color-sky); }
.searchable-dropdown-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  max-height: 260px; overflow-y: auto;
}
.searchable-dropdown-panel.is-hidden { display: none; }
.searchable-dropdown-item {
  width: 100%; text-align: left; padding: 10px 14px; border: none; background: none;
  font-family: inherit; font-size: 13.5px; color: var(--color-text); cursor: pointer;
  display: block; border-bottom: 1px solid var(--color-border);
}
.searchable-dropdown-item:last-child { border-bottom: none; }
.searchable-dropdown-item:hover, .searchable-dropdown-item:focus { background: var(--color-muted-bg); }
.searchable-dropdown-item small { display: block; color: var(--color-text-muted); font-size: 11.5px; margin-top: 2px; }
.searchable-dropdown-empty { padding: 12px 14px; font-size: 13px; color: var(--color-text-muted); }
.searchable-dropdown-selected {
  margin-top: 6px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--color-muted-bg); font-size: 13px; display: flex; justify-content: space-between; align-items: center;
}
.searchable-dropdown-selected button { border: none; background: none; color: var(--color-danger); font-size: 16px; cursor: pointer; line-height: 1; }

/* ---- SIRAGA: baris item transaksi (Masuk/Keluar/Transfer/Pemusnahan) ---- */
.siraga-item-row { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; margin-bottom: 10px; position: relative; }
.siraga-item-row-remove { position: absolute; top: 8px; right: 8px; border: none; background: none; color: var(--color-danger); font-size: 18px; cursor: pointer; line-height: 1; }
.siraga-item-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.siraga-item-hint.warn { color: var(--color-warning); font-weight: 700; }

/* ---- Riwayat Presensi roster-first: kartu periode, grid statistik, item sbg tombol, detail sheet ---- */
/* Diperkecil 25 Okt 2026 (diminta Admin -- "kartu periode & stat di
   Riwayat Presensi kebesaran, samakan konsep dgn kartu lain" spt
   .divisi-card di admin.js/admin.css: kotak putih rapi, teks kecil,
   TANPA angka besar). HANYA dipakai riwayat.html. */
.periode-card {
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-navy);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.periode-card-label { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--color-text-muted); margin-bottom: 4px; }
.periode-card-range { font-size: 13.5px; font-weight: 800; margin-bottom: 8px; }
.periode-card-jadwal { display: flex; align-items: baseline; gap: 6px; }
.periode-card-jadwal-num { font-size: 15px; font-weight: 800; color: var(--color-navy); line-height: 1; }
.periode-card-jadwal-label { font-size: 11.5px; color: var(--color-text-muted); }

.stat-grid-2x3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.stat-tile {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: left;
  display: flex; align-items: center; justify-content: space-between;
}
.stat-tile-num { display: inline; font-size: 15px; font-weight: 800; color: var(--color-navy); line-height: 1.1; order: 2; }
.stat-tile-label { display: inline; font-size: 11.5px; color: var(--color-text-muted); order: 1; }
.stat-tile.is-hadir .stat-tile-num { color: var(--color-success); }
.stat-tile.is-terlambat .stat-tile-num { color: var(--color-warning); }
.stat-tile.is-izin .stat-tile-num { color: var(--color-info); }
.stat-tile.is-sakit .stat-tile-num { color: var(--color-danger); }
.stat-tile.is-cuti .stat-tile-num { color: var(--color-info); }
.stat-tile.is-tidak-hadir .stat-tile-num { color: var(--color-muted-text); }

.riwayat-section-title { font-size: 13px; font-weight: 700; color: var(--color-navy); margin: 4px 0 10px; }

/* riwayat-item sekarang <button> -- reset dulu, tampilan tetap sama seperti sebelumnya */
button.riwayat-item {
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
  background: var(--color-surface); border: 1px solid var(--color-border);
}
.riwayat-item-shift { font-size: 13px; color: var(--color-navy); }

.detail-sheet-overlay {
  position: fixed; inset: 0; background: rgba(8,20,36,.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 110;
}
.detail-sheet-overlay.is-hidden { display: none; }
.detail-sheet {
  background: var(--color-surface);
  border-radius: 22px 22px 0 0;
  width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-modal);
  position: relative;
  animation: modal-in .22s cubic-bezier(.2,.9,.3,1);
}
.detail-sheet-handle { width: 40px; height: 4px; background: var(--color-border); border-radius: var(--radius-pill); margin: 6px auto 14px; }
.detail-sheet-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--color-muted-bg); color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.detail-sheet-head { margin-bottom: 12px; }
.detail-sheet-head h2 { font-size: 16px; margin: 6px 0 0; color: var(--color-navy); }
.detail-section-title { font-size: 12px; font-weight: 700; color: var(--color-text-muted); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.detail-section { border-top: 1px solid var(--color-border); }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--color-border); font-size: 13.5px; }
.detail-row-label { color: var(--color-text-muted); }
.detail-row-value { color: var(--color-text); font-weight: 600; text-align: right; }
.detail-foto-link { display: inline-block; margin: 8px 0 4px; font-size: 13px; color: var(--color-sky-deep); font-weight: 700; text-decoration: none; }

/* ---- Form field (Pengajuan Ketidakhadiran) ---- */
.form-field { display: block; }
.form-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--color-navy); margin-bottom: 6px; }
.form-field-optional { font-weight: 400; color: var(--color-text-muted); }
.form-field-input {
  width: 100%; box-sizing: border-box;
  padding: 11px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-surface);
  font-family: inherit; font-size: 14px; color: var(--color-text);
}
.form-field-input:focus { outline: none; border-color: var(--color-sky); }
.form-field-file { display: block; font-size: 13px; margin-top: 2px; }
.form-field-hint { display: block; font-size: 11.5px; color: var(--color-text-muted); margin-top: 4px; }
@media (max-width: 420px) { .form-field-row { grid-template-columns: 1fr; } }

/* ---- Card pengajuan (riwayat pengajuan relawan) ---- */
.pengajuan-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pengajuan-item-jenis { font-size: 13px; color: var(--color-navy); font-weight: 700; }

/* ============================================================
   BANTUAN
============================================================ */
.bantuan-group-title { font-size: 13px; font-weight: 800; color: var(--color-navy); margin: 20px 4px 8px; }
.bantuan-group-title:first-child { margin-top: 0; }
.bantuan-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.bantuan-item summary {
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  list-style: none;
}
.bantuan-item summary::-webkit-details-marker { display: none; }
.bantuan-item summary::after { content: '+'; float: right; color: var(--color-text-muted); font-weight: 700; }
.bantuan-item[open] summary::after { content: '−'; }
.bantuan-item-body { padding: 0 14px 14px; font-size: 13px; color: var(--color-text-muted); line-height: 1.6; }
.bantuan-contact {
  background: var(--color-sky-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-top: 6px;
}
.bantuan-contact p { margin: 0 0 10px; font-size: 13px; color: var(--color-navy); }

/* ============================================================
   INFORMASI (Modul #4)
============================================================ */
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.info-card-date { font-size: 11px; color: var(--color-text-muted); margin-bottom: 4px; }
.info-card-title { font-size: 14px; font-weight: 700; color: var(--color-navy); margin: 0 0 6px; }
.info-card-body { font-size: 13px; color: var(--color-text); line-height: 1.6; white-space: pre-wrap; }

/* ============================================================
   JADWAL & PENUGASAN (Modul #5)
============================================================ */
.jadwal-card {
  display: flex; gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.jadwal-card-date { flex-shrink: 0; width: 58px; text-align: center; }
.jadwal-card-day { display: block; font-size: 10.5px; color: var(--color-text-muted); text-transform: uppercase; }
.jadwal-card-num { display: block; font-size: 15px; font-weight: 800; color: var(--color-navy); margin-top: 1px; }
.jadwal-card-time { display: block; font-size: 11px; color: var(--color-sky-deep); font-weight: 700; margin-top: 4px; }
.jadwal-card-body { flex: 1; min-width: 0; }
.jadwal-card-title { font-size: 13.5px; font-weight: 700; color: var(--color-navy); margin: 0 0 4px; }
.jadwal-card-ket { font-size: 12px; color: var(--color-text-muted); margin: 0 0 6px; }
.jadwal-card-status { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 700; }
.jadwal-card-status.Terjadwal { background: var(--color-info-bg); color: var(--color-info); }
.jadwal-card-status.Selesai { background: var(--color-success-bg); color: var(--color-success); }
.jadwal-card-status.Dibatalkan { background: var(--color-muted-bg); color: var(--color-muted-text); }

/* ============================================================
   MENU PENGATURAN (kartu pilihan, dipakai di Profil & Pengaturan Akun)
============================================================ */
.settings-section-title {
  font-size: 13px; font-weight: 700; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 18px 4px 10px;
}
.settings-menu-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.settings-menu-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: transform .12s ease;
}
.settings-menu-item:active { transform: scale(0.98); }
.settings-menu-item-icon {
  flex-shrink: 0; width: 42px; height: 42px;
  border-radius: var(--radius-pill);
  background: var(--color-sky-soft);
  color: var(--color-sky-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.settings-menu-item-text { flex: 1; min-width: 0; }
.settings-menu-item-title { font-size: 14px; font-weight: 700; color: var(--color-navy); margin: 0; }
.settings-menu-item-desc { font-size: 12px; color: var(--color-text-muted); margin: 2px 0 0; }
.settings-menu-item-arrow { flex-shrink: 0; color: var(--color-text-muted); font-size: 16px; }

/* ============================================================
   SUBHEADER NAVIGASI (untuk halaman turunan, mis. Pengaturan Akun, Ganti Password)
============================================================ */
.page-subheader {
  display: flex; align-items: center; gap: 12px;
  max-width: var(--max-width); margin: 0 auto;
  padding: 16px 16px 0;
  position: relative; z-index: 1;
}
.page-subheader-back {
  display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  color: var(--color-navy);
  font-size: 12.5px; font-weight: 700;
  text-decoration: none;
}
.page-subheader-title { font-size: 16px; font-weight: 800; color: var(--color-navy); margin: 0; }

/* ============================================================
   ABSENSI — SELFIE + GPS (Fase 5)
============================================================ */
.absensi-card { margin-bottom: 16px; }
.absensi-identity { display: flex; align-items: center; gap: 12px; }
.absensi-identity-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-sky), var(--color-sky-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.absensi-identity-text strong { display: block; color: var(--color-navy); font-size: 14.5px; }
.absensi-identity-text span { font-size: 12px; color: var(--color-text-muted); }

.absensi-jenis-label {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: var(--color-sky-soft); color: var(--color-sky-deep); margin-bottom: 8px;
}

.absensi-camera-box {
  position: relative; width: 100%; aspect-ratio: 3/4; max-height: 340px;
  border-radius: var(--radius-md); overflow: hidden; background: #0b1520;
  display: flex; align-items: center; justify-content: center;
}
.absensi-camera-box video, .absensi-camera-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.absensi-camera-placeholder { color: rgba(255,255,255,0.75); font-size: 13px; text-align: center; padding: 20px; line-height: 1.6; }
.absensi-camera-actions { display: flex; gap: 10px; margin-top: 10px; }
.absensi-camera-actions button { flex: 1; }

.absensi-gps-row {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--color-muted-bg); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; color: var(--color-text); line-height: 1.5;
}
.absensi-gps-row.ok { background: var(--color-success-bg); color: var(--color-success); }
.absensi-gps-row.bad { background: var(--color-danger-bg); color: var(--color-danger); }
.absensi-gps-retry { background: none; border: none; text-decoration: underline; font-weight: 700; cursor: pointer; color: inherit; font-size: 12.5px; padding: 0; margin-top: 4px; }

.absensi-zone-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; margin-top: 8px;
}
.absensi-zone-badge.ok { background: var(--color-success-bg); color: var(--color-success); }
.absensi-zone-badge.bad { background: var(--color-danger-bg); color: var(--color-danger); }

.absensi-empty { text-align: center; padding: 30px 16px; color: var(--color-text-muted); font-size: 13.5px; line-height: 1.6; }

.absensi-detail-photos { display: flex; gap: 12px; margin-top: 10px; }
.absensi-detail-photo { flex: 1; text-align: center; }
.absensi-detail-photo img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
}
.absensi-detail-photo span { display: block; font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }
.absensi-detail-photo-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--color-border); background: var(--color-bg-soft, #f6f7f9);
  color: var(--color-text-muted); font-size: 12px; padding: 8px;
}

.absensi-izin-link {
  display: block; text-align: center; font-size: 12.5px; color: var(--color-text-muted);
  text-decoration: underline; margin-top: 4px; background: none; border: none; width: 100%; cursor: pointer;
  font-family: var(--font-main);
}

.absensi-textarea {
  width: 100%; box-sizing: border-box; padding: 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); font-family: var(--font-main); font-size: 13.5px;
  resize: vertical; min-height: 64px;
}

.absensi-pill-choice {
  flex: 1; padding: 11px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border);
  background: transparent; color: var(--color-text); font-weight: 700; font-size: 13.5px; cursor: pointer;
  font-family: var(--font-main);
}
.absensi-pill-choice.selected { border-color: var(--color-sky-deep); background: var(--color-sky-soft); color: var(--color-sky-deep); }
.absensi-section-title {
  font-size: 13px; font-weight: 700; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 22px 0 10px 2px;
}

/* ================================================================
   MODUL STOK & PERSEDIAAN (BARU) — aditif, tidak mengubah gaya lain
   ================================================================ */

.stok-subtab.active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.stok-summary-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px;
}
@media (min-width: 640px) { .stok-summary-grid { grid-template-columns: repeat(4, 1fr); } }
.stok-summary-card {
  background: #f7f8fa; border-radius: var(--radius-md); padding: 14px; text-align: center;
}
.stok-summary-card span { display: block; font-size: 24px; font-weight: 800; color: var(--color-navy); }
.stok-summary-card p { font-size: 11.5px; color: var(--color-text-muted); margin: 4px 0 0; }
.stok-card-aman { background: #e8f6ee; }
.stok-card-aman span { color: #1a7a4c; }
.stok-card-menipis { background: #fff8e1; }
.stok-card-menipis span { color: #b28900; }
.stok-card-habis { background: #fdeaea; }
.stok-card-habis span { color: #b23a3a; }

.stok-badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.stok-badge-aman { background: #e8f6ee; color: #1a7a4c; }
.stok-badge-menipis { background: #fff8e1; color: #b28900; }
.stok-badge-habis { background: #fdeaea; color: #b23a3a; }

.stok-perhatian-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: var(--radius-md); background: #f7f8fa; margin-bottom: 8px;
}
.stok-perhatian-row p { margin: 0; font-weight: 700; font-size: 13.5px; color: var(--color-navy); }
.stok-perhatian-row small { color: var(--color-text-muted); font-size: 12px; }

.stok-item-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center;
  background: #f7f8fa; border-radius: var(--radius-sm); padding: 8px;
}
.stok-item-row .stok-item-cari { flex-basis: 100%; }
.stok-item-row .stok-item-barang { flex: 2 1 160px; }
.stok-item-row .stok-item-jumlah { flex: 1 1 80px; }
.stok-item-row select, .stok-item-row input { width: 100%; box-sizing: border-box; }
.stok-item-row button {
  border: none; background: var(--color-danger-bg); color: var(--color-danger);
  border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; font-weight: 700;
}

/* ================================================================
   MODUL SHIFT & KOREKSI (BARU) — aditif
   ================================================================ */
.shift-subtab.active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.shift-koreksi-row {
  background: #f7f8fa; border-radius: var(--radius-md); padding: 14px; margin-top: 12px;
}
.shift-koreksi-row .profile-identity-list { margin: 10px 0; }
/* --- Konfirmasi sebelum kamera/GPS aktif --- */
.absensi-confirm-banner {
  border-radius: var(--radius-md); padding: 16px; display: flex; align-items: center; gap: 12px;
  border: 1.5px solid; background: #eef6ff;
}
.absensi-confirm-banner.jenis-masuk { background: #e8f6ee; border-color: #1a7a4c; }
.absensi-confirm-banner.jenis-pulang { background: #fdf0e4; border-color: #b25b16; }
.absensi-confirm-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800;
}
.jenis-masuk .absensi-confirm-icon { background: #1a7a4c; }
.jenis-pulang .absensi-confirm-icon { background: #b25b16; }
.absensi-confirm-title { font-weight: 800; font-size: 15px; margin: 0 0 2px; color: var(--color-navy); }
.absensi-confirm-sub { font-size: 12.5px; color: var(--color-text-muted); margin: 0; }

/* Label jenis di dalam form dibuat jadi banner penuh + lengket di atas,
   supaya tetap kelihatan walau halaman di-scroll ke bawah (kamera/GPS/kirim). */
.absensi-jenis-label {
  display: block; width: 100%; text-align: center; box-sizing: border-box;
  position: sticky; top: 0; z-index: 4;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: var(--color-sky-soft); color: var(--color-sky-deep); margin-bottom: 10px;
}
.absensi-jenis-label.jenis-masuk { background: #1a7a4c; color: #fff; }
.absensi-jenis-label.jenis-pulang { background: #b25b16; color: #fff; }

/* --- Layar sukses setelah submit --- */
.absensi-success-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(10, 20, 35, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.absensi-success-overlay.is-hidden { display: none; }
.absensi-success-card {
  background: #fff; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0;
  padding: 30px 22px 26px; text-align: center; box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
}
.absensi-success-circle {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; color: #fff; font-size: 34px;
  display: flex; align-items: center; justify-content: center;
}
.absensi-success-circle.jenis-masuk { background: #1a7a4c; }
.absensi-success-circle.jenis-pulang { background: #b25b16; }
.absensi-success-title { font-size: 18px; font-weight: 800; color: var(--color-navy); margin: 0 0 4px; }
.absensi-success-sub { font-size: 13px; color: var(--color-text-muted); margin: 0; }

/* ============================================================
   KARTU ID RELAWAN — CR80/ID-1 PORTRAIT: 54mm x 86mm.
   Desain "front v3" DISETUJUI -- ornamen batik ASLI (file gambar nyata,
   assets/batik-ornamen.png) dan logo asli (assets/logo-bgn.png,
   assets/logo.png), BUKAN rekonstruksi SVG. Struktur & kelas identik
   dengan kartu-id-relawan-template.html supaya pratinjau Admin dan
   contoh standalone selalu sinkron.
   Elemen kartu SELALU dalam satuan mm (ukuran fisik asli), baik saat
   preview maupun print -- hanya WRAPPER preview yang di-scale utk
   kenyamanan layar, bukan kartunya sendiri.
   ============================================================ */
.card.front {
  --navy: #0B2A52; --navy2: #071D3A; --gold: #D9A62E; --gold2: #F2C75C; --ink: #17365F;
  width: 54mm; height: 86mm; position: relative; overflow: hidden;
  border-radius: 3.2mm; background: #fff; box-shadow: 0 2mm 6mm rgba(7,29,58,.35);
  font-family: Arial, "Segoe UI", sans-serif; isolation: isolate;
}
.card.front::after { content: ''; position: absolute; inset: 0; border: .35mm solid rgba(11,42,82,.18); border-radius: 3.2mm; pointer-events: none; z-index: 30; }
.card.front .batik { position: absolute; width: 18mm; height: 18mm; object-fit: contain; pointer-events: none; z-index: 0; }
.card.front .watermark { opacity: .055; }
.card.front .c1 { top: 18mm; left: -7mm; }
.card.front .c2 { top: 18mm; right: -7mm; transform: scaleX(-1); }
.card.front .c3 { bottom: 10mm; left: -7mm; transform: scaleY(-1); }
.card.front .c4 { bottom: 10mm; right: -7mm; transform: scale(-1,-1); }

/* PENTING: .top/.body/.bottom BERADA SETELAH watermark di DOM (lihat
   admin-kartu-qr.js) dan punya background OPAQUE. Tanpa z-index eksplisit,
   CSS mengecat elemen positioned ber-z-index:auto sesuai urutan DOM --
   artinya .top/.body akan menimpa watermark sepenuhnya, membuatnya TAK
   TERLIHAT walau opacity sudah diatur benar. z-index:1 di sini memastikan
   watermark (z-index:0 di atas) benar-benar di LAPISAN BELAKANG. */
.card.front .top { height: 20mm; background: linear-gradient(145deg, var(--navy), var(--navy2)); color: #fff; position: relative; z-index: 1; overflow: hidden; }
.card.front .logos { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 2.4mm; padding-top: 3mm; }
.card.front .logo { width: 10mm; height: 10mm; object-fit: contain; border-radius: 50%; background: #fff; display: block; }
.card.front .logo.sppg { width: 10.5mm; height: 10.5mm; }
.card.front .logo-divider { height: 7.2mm; width: .25mm; background: rgba(255,255,255,.7); }
.card.front .brand { position: relative; z-index: 2; text-align: center; margin-top: 1.8mm; font-weight: 900; letter-spacing: .55mm; font-size: 3.65mm; }
.card.front .gold-line { position: absolute; left: 5mm; right: 5mm; bottom: 0; height: .7mm; background: linear-gradient(90deg, transparent, var(--gold2), var(--gold), transparent); }

/* body diperbesar (60mm, naik dari 56mm) -- ruang tambahan didapat dari .top
   yang dikecilkan (subtitle dihapus) DAN .bottom yang disederhanakan supaya
   TIDAK LAGI tumpang-tindih ke body (sebelumnya overlap 3mm, itu yg bikin
   QR "digerogoti" footer walau sudah di-push margin-top:auto). Sudah
   dihitung ulang: aman bahkan utk skenario terburuk nama+divisi 2 baris. */
.card.front .body { position: relative; z-index: 1; height: 60mm; padding: 3.2mm 4mm 2.2mm; background: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; }
.card.front .title { color: var(--gold); font-size: 2.65mm; font-weight: 800; letter-spacing: .28mm; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 1.4mm; }
.card.front .title .garis { display: block; width: 7mm; height: .3mm; background: var(--gold); flex-shrink: 0; }
.card.front .title .title-teks { white-space: nowrap; }
.card.front .diamond { width: 1.25mm; height: 1.25mm; background: var(--navy); transform: rotate(45deg); display: block; }
/* Diperkecil 23 Okt 2026 (Kartu Identitas Relawan, diminta Admin) --
   dari 4.15mm/margin 2mm jadi ukuran di bawah, SATU-SATUNYA alasan:
   memberi ruang ke .foto-profil (BARU) tanpa card meluap dari 60mm
   tinggi .body. Dihitung presisi dari anggaran tinggi yg tersisa,
   BUKAN perkiraan kasar -- lihat rincian perhitungan di komentar
   .foto-profil di bawah. */
/* Diperbaiki 27 Okt 2026 (dilaporkan Admin -- QR code terpotong di
   bawah kartu utk relawan dgn nama 2-baris, mis. "FATUR RIZKY
   FAHRIANSYAH" + divisi panjang "ASISTEN LAPANGAN"). Akar masalah:
   anggaran tinggi .body (lihat komentar .foto-profil) SENGAJA pas-
   pasan ("toleransi tipis"), dan pil Divisi max-width:42mm sebelumnya
   kemungkinan membuat teks divisi panjang BUNGKUS JADI 2 BARIS di
   dalam pilnya sendiri -- menambah tinggi melebihi anggaran yg
   dihitung. Diperbaiki: margin-top name dikurangi (1mm->0.6mm) & pil
   meta max-width diperbesar (42mm->48mm, msh muat dlm lebar kartu
   54mm) supaya divisi 1-2 kata panjang tetap 1 baris -- total
   mengembalikan toleransi aman tanpa mengubah ukuran font/foto/QR. */
.card.front .name { margin-top: 0.6mm; margin-left: 2mm; margin-right: 2mm; color: var(--navy); font-weight: 900; font-size: 3.3mm; line-height: 1.12; text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.card.front .meta { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: .5mm; margin-top: 0.7mm; font-size: 1.85mm; color: #5d6b7d; flex-shrink: 0; }
.card.front .meta div { min-width: 28mm; max-width: 48mm; padding: .3mm 2mm; border-radius: 5mm; background: #f4f6f9; line-height: 1.2; white-space: nowrap; }
.card.front .meta strong { color: #17365f; font-weight: 800; }

/* Area foto profil -- BARU 23 Okt 2026 (dokumen Kartu Identitas
   Relawan §D/§I). Dihitung presisi dari anggaran .body:
   tinggi .body 60mm - padding(3.2+2.2)=54.6mm tersedia. Dipakai:
   title ~2.8mm + foto 17mm+margin 1.6mm=18.6mm + name ~8.2mm +
   meta ~7.6mm + qr-wrap 20mm (diperkecil dari 25.8mm, lihat aturan
   .qr-wrap di bawah) = ~55.4mm -- pas, sisa toleransi tipis utk variasi
   rendering font antar-browser. Foto PERSEGI (bukan oval/bulat) sesuai
   permintaan Admin, proporsi mendekati pasfoto. */
.card.front .foto-profil {
  display: block;
  width: 17mm;
  height: 17mm;
  margin: 0.8mm auto;
  border-radius: 1.2mm;
  border: 0.35mm solid var(--navy);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 0.3mm 0.8mm rgba(11,45,107,0.18);
}
.card.front .foto-profil-kosong {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f6;
  color: #9aa5b8;
  border-style: dashed;
}
@media print {
  .card.front .foto-profil { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Diperkecil 23 Okt 2026 (Kartu Identitas Relawan) dari 25.8mm jadi
   20mm -- SATU-SATUNYA alasan: memberi ruang ke foto profil (lihat
   rincian anggaran di komentar .foto-profil). 20mm persegi masih
   "cukup besar" utk dipindai kamera HP dari jarak dekat (dokumen §I),
   jauh di atas batas minimum QR yg umum dipakai kartu ID fisik (~15mm). */
.card.front .qr-wrap { position: relative; flex-shrink: 0; margin-top: auto; width: 20mm; height: 20mm; padding: 0.9mm; background: #fff; border: .38mm solid var(--navy); box-shadow: 0 0 0 .3mm var(--gold); border-radius: 1.5mm; display: flex; align-items: center; justify-content: center; }
.card.front .qr-wrap > div { width: 18.2mm; height: 18.2mm; display: flex; align-items: center; justify-content: center; }
.card.front .qr-wrap img, .card.front .qr-wrap canvas { width: 100% !important; height: 100% !important; display: block; }

/* Footer disederhanakan total: dulu TUMPANG TINDIH 3mm ke .body (desain
   wave melengkung ke atas) DAN ornamennya diposisikan bottom:-3.4mm (lebih
   besar dari tinggi footer sendiri) -- gabungan keduanya membuat gambar
   ornamen terpotong overflow:hidden kartu, muncul sebagai "gambar kosong"
   di hasil cetak. Desain baru: strip bersih TIDAK overlap apa pun di
   atasnya, ornamen berukuran pas (5mm) dan 100% berada DALAM batas footer
   sendiri -- tidak mungkin terpotong lagi. */
.card.front .bottom { position: relative; z-index: 1; flex-shrink: 0; height: 6mm; overflow: hidden; background: linear-gradient(180deg, #173c6c 0%, #0b2a52 100%); }
.card.front .bottom::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: .5mm; background: linear-gradient(90deg, transparent 0%, #d9a62e 16%, #f2c75c 50%, #d9a62e 84%, transparent 100%); }

/* Preview di layar: HANYA wrapper ini yang di-scale (kartu itu sendiri tidak pernah di-transform). */
.kartu-qr-preview-scale { transform: scale(2.7); transform-origin: top center; margin-bottom: 190mm; }

/* Diperbaiki 25 Okt 2026 (dilaporkan Admin -- kartu di halaman "ID Card
   Saya" meluber ke samping di HP, cuma kelihatan separuh kiri). Akar
   masalah: scale(2.7) di atas dirancang utk preview ADMIN di desktop
   (layar lebar) -- di viewport HP (~380-430px) kartu 54mm hasil
   di-scale 2.7x jadi ~146mm, jauh lebih lebar dari layar. TIDAK
   mengubah .kartu-qr-preview-scale dasar (admin-kartu-qr.js di desktop
   MASIH pakai scale 2.7 spt sebelumnya) -- override KHUSUS
   #icsKartuArea (cuma dipakai id-card-saya.html, halaman relawan,
   SELALU dibuka di HP) via media query. */
@media (max-width: 640px) {
  #icsKartuArea.kartu-qr-preview-scale { transform: scale(1.35); transform-origin: top center; margin-bottom: 58mm; }
  #icsKartuArea.kartu-qr-preview-scale .card.front { margin-left: auto; margin-right: auto; }
}

/* Area cetak: tersembunyi total di layar normal, hanya tampil saat print. */
#areaCetakKartuQr { display: none; }

@media print {
  /* PENTING: tanpa ini, Chrome/browser lain MEMBUANG semua background-color
     dan background-image (termasuk gradient navy header, gradient footer)
     dari hasil cetak secara default (demi hemat tinta) -- border dan teks
     tetap tercetak, tapi semua warna ISI jadi putih polos. Inilah penyebab
     persis kartu tercetak "putih polos" walau di layar warnanya benar. */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }

  body * { visibility: hidden; }
  #areaCetakKartuQr, #areaCetakKartuQr * { visibility: visible; }
  #areaCetakKartuQr { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  @page { size: A4 portrait; margin: 10mm; }

  /* A4 portrait, margin 10mm: kartu PORTRAIT 54x86mm -> 3 kolom x 3 baris = 9 kartu/lembar.
     Lebar: 54*3 + 5*2 = 172mm (masuk area 190mm). Tinggi: 86*3 + 5*2 = 268mm (masuk area 277mm). */
  .kartu-qr-grid-cetak { display: grid; grid-template-columns: repeat(3, 54mm); grid-auto-rows: 86mm; gap: 5mm; justify-content: center; width: 172mm; margin: 0 auto; }
  .kartu-qr-grid-cetak .card.front { page-break-inside: avoid; box-shadow: none; }
}
