:root {
  /* Warna korporat BNI: teal/tosca gelap dipadukan oranye */
  --primary: #00838f;
  --primary-dark: #005e68;
  --primary-light: #e3f3f4;
  --orange: #f26522;
  --orange-dark: #d9531a;
  --gradient: linear-gradient(135deg, #004b54 0%, #00838f 55%, #f26522 100%);
  --green: #16a34a;
  --red: #dc2626;
  --bg: #f4f7f7;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e4edee;
  --radius: 18px;
  --radius-sm: 12px;
  --navbar-h: 64px;
  --shadow-sm: 0 2px 10px rgba(0,60,65,0.06);
  --shadow-md: 0 8px 24px rgba(0,60,65,0.12);
  --shadow-lg: 0 20px 48px rgba(0,40,45,0.24);
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   DARK MODE — diaktifkan lewat atribut data-theme="dark" di <html>
   ============================================================ */
[data-theme="dark"] {
  --bg: #10181a;
  --card: #182225;
  --text: #e7f0f1;
  --muted: #93a5a8;
  --border: #253134;
  --primary-light: #1c3336;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
}
[data-theme="dark"] input[type=text],
[data-theme="dark"] input[type=password],
[data-theme="dark"] input[type=date],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1a2528;
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] input[type=text]:focus,
[data-theme="dark"] input[type=password]:focus,
[data-theme="dark"] input[type=date]:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus { background: #1f2e31; }
[data-theme="dark"] .toast { background: #182225; color: var(--text); }
[data-theme="dark"] .modal-box { background: #182225; }
[data-theme="dark"] .navbar-dropdown { background: #182225; }
[data-theme="dark"] .empty-state { color: var(--muted); }
[data-theme="dark"] .activity-item:active { background: #1c282b; }
[data-theme="dark"] input[type=file] { background: #16201f; border-color: var(--border); }

/* Tombol toggle dark/light (disuntik otomatis lewat JS ke navbar) */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.theme-toggle-btn:active { transform: scale(0.92); background: rgba(255,255,255,0.32); }
.theme-toggle-floating {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* Jam berjalan: di navbar, sebelah kiri profil user, minimalis */
.navbar-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  padding-right: 2px;
  flex-shrink: 0;
}
.navbar-clock-time {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.navbar-clock-date {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
@media (max-width: 360px) {
  .navbar-clock-date { display: none; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .25s var(--ease), color .25s var(--ease);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient);
  box-shadow: 0 6px 20px rgba(0,131,143,0.30);
  border-radius: 0 0 22px 22px;
}
.navbar-inner {
  max-width: 720px;
  margin: 0 auto;
  height: var(--navbar-h);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.navbar-brand .navbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  padding: 4px;
}
.navbar-brand .navbar-title {
  font-size: 16px;
}
.navbar-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  padding: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.navbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.navbar-logo-sm { width: 34px; height: 34px; padding: 4px; }
.navbar-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

/* Tombol Kembali (back) — presisi, bulat, konsisten di semua sub-halaman */
.navbar-back {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.navbar-back:active { transform: scale(0.92); background: rgba(255,255,255,0.3); }
.navbar-back svg { display: block; }

.navbar-title-wrap {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.navbar-title-wrap .navbar-title { display: inline-block; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.navbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.navbar-icon-btn:active { transform: scale(0.92); background: rgba(255,255,255,0.3); }

/* Dropdown user (avatar + nama + menu) */
.navbar-user { position: relative; }
.navbar-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  padding: 5px 10px 5px 5px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  max-width: 160px;
  transition: background .18s var(--ease);
  font-family: inherit;
}
.navbar-user-btn:active { background: rgba(255,255,255,0.32); }
.navbar-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.navbar-user-btn .chevron {
  transition: transform .18s var(--ease);
  flex-shrink: 0;
  opacity: .85;
}
.navbar-user.open .navbar-user-btn .chevron { transform: rotate(180deg); }

.navbar-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all .16s var(--ease);
  z-index: 200;
  border: 1px solid var(--border);
}
.navbar-user.open .navbar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.navbar-dropdown a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.navbar-dropdown a:active { background: var(--primary-light); }
.navbar-dropdown a.text-danger { color: var(--red); }
.navbar-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 2px; }

/* ---------- Card ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ---------- Avatar (presisi: selalu center, tidak gepeng) ---------- */
.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 0 0 1px rgba(30,30,60,0.06);
}
.avatar-fallback {
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 0 0 1px rgba(30,30,60,0.06);
}

/* ---------- Form ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  margin-top: 14px;
}
input[type=text], input[type=password], input[type=date],
select, textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  background: #fafafa;
  font-family: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type=text]:focus, input[type=password]:focus, input[type=date]:focus,
select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,131,143,0.16);
  background: #fff;
}
textarea { resize: vertical; min-height: 70px; }

input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1.5px dashed #cfd2ea;
  border-radius: 10px;
  background: #fafafa;
  font-size: 13.5px;
}

.btn {
  display: inline-block;
  padding: 13px 18px;
  border-radius: 14px;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  margin-top: 18px;
  box-shadow: 0 4px 12px rgba(242,101,34,0.32);
  font-family: inherit;
  transition: transform .12s var(--ease), filter .12s var(--ease);
}
.btn:active { filter: brightness(0.95); transform: scale(0.985); }
.btn.btn-secondary { background: #6b7280; box-shadow: 0 4px 12px rgba(107,114,128,0.25); }
.btn.btn-green { background: var(--green); box-shadow: 0 4px 12px rgba(22,163,74,0.28); }
.btn.btn-red { background: var(--red); box-shadow: 0 4px 12px rgba(220,38,38,0.28); }
.btn.btn-block-small { width: auto; padding: 8px 14px; font-size: 13px; margin-top: 0; }

/* ---------- Activity list ---------- */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  transition: background .12s var(--ease);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:active { background: #fafafe; }
.activity-thumb {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.activity-title { font-weight: 600; font-size: 15px; margin: 0 0 2px; }
.activity-meta { font-size: 12.5px; color: var(--muted); margin: 0; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.5;
}
.badge-open { background: #fef3c7; color: #92400e; }
.badge-closed { background: #dcfce7; color: #166534; }
.badge-pending { background: #e0e7ff; color: #3730a3; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* ---------- Alert (fallback jika JS mati; kalau JS aktif akan diubah jadi toast) ---------- */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 500;
}
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}
.filter-bar select { width: auto; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
}

.photo-preview {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
  display: none;
}

/* ---------- Multi-foto: grid preview saat upload ---------- */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.photo-preview-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ---------- Multi-foto: galeri di halaman detail ---------- */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.photo-gallery-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  transition: transform .15s var(--ease), filter .15s var(--ease);
}
.photo-gallery a:active .photo-gallery-item { transform: scale(0.96); filter: brightness(0.92); }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--gradient);
}
.login-box { max-width: 380px; width: 100%; animation: loginRise .45s var(--ease); }
.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.login-logo {
  width: 108px;
  height: auto;
  padding: 14px 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: block;
}
.login-box h1 { text-align: center; font-size: 22px; margin-bottom: 4px; color: #fff; letter-spacing: -0.3px; font-weight: 700; }
.login-box p.sub { text-align: center; color: rgba(255,255,255,0.85); margin-top: 0; margin-bottom: 20px; font-size: 14px; }
.login-box .card { border-radius: 22px; box-shadow: var(--shadow-lg); border: none; }
@keyframes loginRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--gradient);
  color: #fff;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(242,101,34,0.45);
  z-index: 90;
  transition: transform .15s var(--ease);
  line-height: 1;
}
.fab:active { transform: scale(0.92); }

/* ============================================================
   TOAST (popup notifikasi mengambang, dibuat otomatis oleh main.js dari .alert)
   ============================================================ */
.toast-stack {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 460px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 12px 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 4px solid var(--green);
  animation: toastIn .28s var(--ease);
}
.toast.toast-error { border-left-color: var(--red); }
.toast.toast-hide { animation: toastOut .25s var(--ease) forwards; }
.toast-icon { font-size: 16px; line-height: 1.3; flex-shrink: 0; }
.toast-msg { flex: 1; color: var(--text); line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.97); }
}

/* ============================================================
   MODAL (konfirmasi popup + lightbox foto)
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,16,40,0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 500;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.modal-backdrop.show { opacity: 1; }
.modal-box {
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 18px;
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) translateY(8px);
  transition: transform .2s var(--ease);
}
.modal-backdrop.show .modal-box { transform: scale(1) translateY(0); }
.modal-message { font-size: 15px; color: var(--text); margin: 0 0 18px; line-height: 1.5; text-align: center; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { margin-top: 0; }

.lightbox-backdrop { background: rgba(10,8,20,0.82); padding: 12px; }
.lightbox-box { position: relative; max-width: 92vw; max-height: 88vh; background: none; box-shadow: none; }
.lightbox-box img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--text);
}

@media (max-width: 380px) {
  .navbar-user-name { display: none; }
  .navbar-user-btn { padding: 5px; }
}

/* ============================================================
   PAGE TRANSITION (fade masuk/keluar antar halaman)
   ============================================================ */
body.page-fade { animation: pageFadeIn .28s var(--ease); }
body.page-fade-out { opacity: 0; transition: opacity .18s var(--ease); }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SKELETON LOADING (placeholder abu-abu berkedip)
   ============================================================ */
.skeleton-line, .skeleton-circle, .skeleton-thumb {
  background: linear-gradient(90deg, var(--border) 25%, #d4e6e8 37%, var(--border) 63%);
  background-size: 400% 100%;
  animation: skeletonShine 1.4s ease infinite;
  border-radius: 8px;
}
[data-theme="dark"] .skeleton-line,
[data-theme="dark"] .skeleton-circle,
[data-theme="dark"] .skeleton-thumb {
  background: linear-gradient(90deg, #1c282b 25%, #24373a 37%, #1c282b 63%);
  background-size: 400% 100%;
}
@keyframes skeletonShine {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skeleton-circle { border-radius: 50%; flex-shrink: 0; }
.skeleton-thumb { border-radius: 12px; flex-shrink: 0; }
.skeleton-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.skeleton-item:last-child { border-bottom: none; }
.skeleton-item-body { flex: 1; display: flex; flex-direction: column; gap: 7px; }

.hidden-until-ready { display: none; }
.ready .hidden-until-ready { display: block; }
.ready .skeleton-wrap { display: none; }

/* ============================================================
   SEARCH BAR (filter aktivitas tanpa reload)
   ============================================================ */
.search-bar {
  position: relative;
  margin-bottom: 12px;
}
.search-bar input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14.5px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,131,143,0.16);
}
.search-bar svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 16px;
  font-size: 13.5px;
  display: none;
}

/* ============================================================
   BADGE NOTIFIKASI (dot/angka di ikon navbar)
   ============================================================ */
.navbar-icon-btn { position: relative; }
.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  line-height: 1;
}
.notif-badge.hidden { display: none; }

/* Dropdown notifikasi: daftar petugas yang punya aktivitas belum diselesaikan */
.navbar-notif { position: relative; }
.navbar-notif-dropdown {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(var(--navbar-h) + 10px);
  width: auto;
  max-width: 380px;
  margin: 0 auto;
  padding: 8px;
}
.navbar-notif.open .navbar-notif-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.notif-dropdown-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  padding: 6px 8px 8px;
}
.notif-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notif-empty {
  padding: 14px 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  transition: background .15s var(--ease);
}
.notif-item:active { background: var(--primary-light); }
.notif-item-avatar { position: relative; flex-shrink: 0; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-name {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-sub {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Highlight menonjol: border + label merah supaya langsung kelihatan */
.notif-item.is-pending {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.25);
}
.notif-item-count {
  flex-shrink: 0;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-manage-link {
  display: block;
  text-align: center;
  margin-top: 4px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 9px 9px;
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.notif-manage-link:active { background: var(--primary-light); }

/* ============================================================
   PULL TO REFRESH
   ============================================================ */
.ptr-indicator {
  position: fixed;
  top: calc(var(--navbar-h) + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-40px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 95;
  opacity: 0;
  transition: transform .15s var(--ease), opacity .15s var(--ease);
}
.ptr-indicator.show { opacity: 1; }
.ptr-indicator svg {
  color: var(--primary);
  transition: transform .1s linear;
}
.ptr-indicator.spin svg {
  animation: ptrSpin .7s linear infinite;
}
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* ============================================================
   Pengumuman / Reminder Penting — teks berjalan (marquee) di
   bawah navbar. Hanya bisa diisi/diubah oleh admin (pimpinan).
   ============================================================ */
.announcement-bar {
  position: sticky;
  top: var(--navbar-h);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: linear-gradient(90deg, #b91c1c, #ea580c);
  box-shadow: 0 3px 10px rgba(185,28,28,0.25);
  overflow: hidden;
}
.announcement-icon {
  flex-shrink: 0;
  font-size: 15px;
  animation: announcementPulse 1.4s ease-in-out infinite;
}
@keyframes announcementPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.75; }
}
.announcement-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.announcement-content {
  display: inline-block;
  white-space: nowrap;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  will-change: transform;
  animation: announcementScroll linear infinite;
}
.announcement-content strong {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-right: 4px;
}
.announcement-sep { opacity: 0.6; }
@keyframes announcementScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* Kalau JS belum sempat jalan / dinonaktifkan, teks tetap kebaca (tidak scroll) */
.announcement-content.no-anim { animation: none; }