/* =====================================================================
   Koin Kaleng Jemput Donasi NU — gaya aplikasi (mobile-first)
   Palet hijau sesuai acuan desain: header hijau, kartu putih,
   kartu statistik hijau & kuning, teks gelap yang mudah dibaca.
   ===================================================================== */

:root {
  --green-900: #08331F;
  --green-800: #0B5132;
  --green-700: #0E6B41;
  --green-600: #128D4E;
  --green-500: #17A34A;
  --green-400: #2FB552;
  --green-300: #55C96F;
  --green-100: #DCFCE7;
  --green-50: #F0FDF4;
  --gold: #FFD54A;
  --gold-600: #E9B71C;
  --gold-50: #FFF8DC;
  --ink: #14301F;
  --muted: #63756A;
  --line: #E3EFE6;
  --bg: #F2F7F3;
  --white: #FFFFFF;
  --red: #DC4C40;
  --red-50: #FDECEA;
  --radius: 16px;
  --shadow-sm: 0 4px 14px rgba(10, 61, 39, .07);
  --shadow-md: 0 12px 30px rgba(10, 61, 39, .12);
  --nav-h: 64px;
  --side-w: 258px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: var(--green-700); text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }
.ic { width: 22px; height: 22px; flex: 0 0 auto; }
.i16 { width: 16px; height: 16px; }
.i14 { width: 14px; height: 14px; }
.i12 { width: 12px; height: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------- Kerangka ---------------- */

.app-shell { min-height: 100vh; }

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 14px calc(var(--nav-h) + 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.content-solo { padding-top: 28px; max-width: 640px; }

/* Sidebar (hanya komputer) */
.sidebar { display: none; }

/* ---------------- Header hijau ---------------- */

.hero {
  position: relative;
  background: linear-gradient(150deg, #21A44D 0%, #38BE56 60%, #46C75F 100%);
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 14px 18px;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 12px 26px rgba(13, 92, 50, .18);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }
.hero-bar { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.hero-title-wrap { min-width: 0; flex: 1 1 auto; text-align: center; }
.hero-title {
  font-size: 18px; font-weight: 700; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.hero-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff;
}
.hero-btn:hover { background: rgba(255, 255, 255, .3); }
.hero-actions { display: flex; align-items: center; gap: 6px; }
.hero-user { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; border: 1.5px solid rgba(255, 255, 255, .6);
}
.hero-user-text { display: flex; flex-direction: column; min-width: 0; }
.hero-hello { font-size: 12px; opacity: .92; }
.hero-user-text strong { font-size: 15px; }
.role-pill {
  margin-left: auto;
  background: #fff; color: var(--green-700);
  border-radius: 999px; padding: 4px 12px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.hero-search { display: none; gap: 8px; margin-top: 12px; }
.hero-search.is-open { display: flex; }
.hero-search input {
  flex: 1 1 auto; min-width: 0; height: 42px;
  border-radius: 12px; border: 0; padding: 0 14px;
  font-size: 16px; color: var(--ink); background: rgba(255, 255, 255, .96);
}
.hero-search-btn {
  width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .22); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}

/* ---------------- Kartu & bagian ---------------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card-tight { padding: 12px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.section-head h2, .section-title { font-size: 16px; font-weight: 800; }
.section-head .link-more { margin-left: auto; font-size: 13px; font-weight: 700; }
.section-sub { font-size: 12.5px; color: var(--muted); }

/* ---------------- Statistik ---------------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 10px 12px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.stat-label { font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.stat-ico { display: inline-flex; flex: 0 0 auto; opacity: .95; }
.stat-rule { height: 4px; border-radius: 3px; background: var(--ink); margin: 9px 0 8px; }
.stat-value { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.stat-value span { font-size: 11px; font-weight: 600; }
.stat-green { background: linear-gradient(160deg, #0F8143, #0B7A3C); border-color: transparent; color: #fff; }
.stat-green .stat-rule { background: rgba(255, 255, 255, .92); }
.stat-gold { background: linear-gradient(160deg, #FFD95E, #FFC93C); border-color: transparent; color: #3A3208; }
.stat-gold .stat-rule { background: rgba(255, 255, 255, .95); }
.stat-white .stat-rule { background: var(--ink); }

/* Kotak info hijau */
.info-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--green-100);
  border: 1px solid #B7EFC9;
  border-radius: 16px;
  padding: 14px;
}
.info-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  background: var(--green-500); color: #fff;
  display: grid; place-items: center;
}
.info-box strong { display: block; font-size: 13.5px; }
.info-box .info-line { font-size: 12.5px; color: #245C3A; }
.info-box .info-line b { font-weight: 800; }

/* ---------------- Filter periode ---------------- */

.filter-card { display: flex; flex-direction: column; gap: 12px; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 600; color: #3B4A41; white-space: nowrap;
}
.chip-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #B9C9BF; background: #fff;
}
.chip.is-active { border-color: var(--green-400); background: var(--green-50); color: var(--green-800); }
.chip.is-active .chip-dot { border-color: var(--green-500); box-shadow: inset 0 0 0 2.5px #fff, inset 0 0 0 8px var(--green-500); }

.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-grid .filter-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 700; color: #3B4A41; }
.field .hint { font-size: 11.5px; color: var(--muted); }
input[type="text"], input[type="number"], input[type="date"], input[type="month"],
input[type="password"], input[type="email"], input[type="search"], input[type="tel"],
input[type="file"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #D6E4DA;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(23, 163, 74, .35);
  outline-offset: 1px;
  border-color: var(--green-400);
}
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.check-row input { width: 18px; height: 18px; min-height: 0; accent-color: var(--green-500); }

/* ---------------- Tombol ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 9px 16px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  background: #EEF3EF; color: #2C3A31;
  text-align: center; transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn-green {
  background: linear-gradient(160deg, #1EA34C, #147A3C);
  color: #fff; box-shadow: 0 6px 14px rgba(30, 158, 69, .22);
}
.btn-outline { background: #fff; border-color: #B9E3C6; color: var(--green-700); }
.btn-gray { background: #EFEFEF; color: #55605A; border-color: #E2E2E2; }
.btn-dark { background: var(--green-800); color: #fff; }
.btn-danger { background: var(--red-50); color: #A9281D; border-color: #F6C9C4; }
.btn-sm { min-height: 34px; padding: 6px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- Badge & status ---------------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1;
}
.badge-green { background: #0C7F3F; color: #fff; }
.badge-grey { background: #6B7671; color: #fff; }
.badge-gold { background: var(--gold); color: #3A3208; }
.badge-red { background: #D0402F; color: #fff; }
.badge-soft { background: var(--green-100); color: var(--green-800); }

/* ---------------- Kartu penjemputan ---------------- */

.list-stack { display: flex; flex-direction: column; gap: 12px; }
.pj-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: var(--shadow-sm);
}
.pj-head {
  display: grid; grid-template-columns: 1.15fr .85fr 1fr; gap: 8px;
}
.pj-col { min-width: 0; }
.pj-label { font-size: 11.5px; color: #42564A; font-weight: 600; }
.pj-value { font-size: 14px; font-weight: 600; word-break: break-word; }
.pj-meta { font-size: 11.5px; color: var(--muted); }
.pj-money-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.money-green { color: #0C7F3F; }
.pj-money { color: #0C7F3F; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.pj-money-row .btn-row { margin-left: auto; }
.pj-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pj-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted);
}
.pj-foot .done { margin-left: auto; color: var(--green-700); font-weight: 700; }

/* Bar sinkronisasi */
.sync-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);
  z-index: 8;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px;
  background: #9AA5A0; color: #fff;
  border: 0; border-radius: 14px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 22px rgba(20, 48, 31, .18);
}
.sync-bar.is-pending { background: linear-gradient(160deg, #0F8143, #0B7A3C); }
.sync-bar .ic { width: 18px; height: 18px; }

/* ---------------- Dashboard ---------------- */

.dash-hero { padding-bottom: 12px; }
.dash-stats {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  gap: 0 14px;
  background: #fff; border-radius: 18px;
  padding: 16px 14px;
  box-shadow: var(--shadow-md);
  margin: -46px 14px 0;
  position: relative; z-index: 3;
  border: 1px solid var(--line);
}
.dash-stats .divider { background: #DCEFE2; border-radius: 2px; }
/* WAJIB: kartu ini berada DI DALAM header hijau yang berwarna putih.
   Tanpa `color` eksplisit, seluruh angkanya mewarisi putih header dan
   menjadi tidak terlihat di atas kartu putih (bug nyata). */
.dash-stats, .dash-stats * { color: var(--ink); }
.dash-stat-label { font-size: 12.5px; color: #2F4437; }
.dash-stat-big { font-size: 22px; font-weight: 800; margin: 6px 0 7px; letter-spacing: -.5px; color: var(--ink); }
.dash-stat-note { font-size: 11.5px; color: var(--muted); }
.dash-body { margin-top: 6px; }

.menu-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 8px;
}
.menu-item { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.menu-ico {
  width: 54px; height: 54px; border-radius: 18px;
  background: linear-gradient(150deg, #E9FBEF, #FFFFFF);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--green-600);
  box-shadow: 0 6px 14px rgba(10, 61, 39, .07);
}
.menu-ico .ic { width: 26px; height: 26px; }
.menu-label { font-size: 11.5px; font-weight: 600; color: #2C3A31; text-align: center; line-height: 1.2; }
.menu-item.is-cta .menu-ico { background: linear-gradient(150deg, #0F8143, #0B7A3C); color: #fff; border-color: transparent; }

.act-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.act-item:last-child { border-bottom: 0; padding-bottom: 0; }
.act-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
  background: var(--green-50); color: var(--green-600);
  display: grid; place-items: center;
}
.act-body { min-width: 0; flex: 1 1 auto; }
.act-title { font-size: 13px; font-weight: 700; }
.act-meta { font-size: 11.5px; color: var(--muted); }

/* ---------------- Tabel ---------------- */

.table-wrap {
  width: 100%; overflow-x: auto; border-radius: 14px;
  border: 1px solid var(--line); background: #fff;
  -webkit-overflow-scrolling: touch;
}
table.table { width: 100%; border-collapse: collapse; min-width: 620px; }
table.table th, table.table td {
  padding: 10px 12px; text-align: left; font-size: 13px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.table th { background: #F7FBF8; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: #4C6356; }
table.table tr:last-child td { border-bottom: 0; }
table.table td.wrap { white-space: normal; min-width: 160px; }
table.table tfoot td { font-weight: 800; background: #F7FBF8; }

/* ---------------- Laporan & rekap ---------------- */

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.mini-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px;
  box-shadow: var(--shadow-sm);
}
.mini-stat .label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mini-stat .value { font-size: 18px; font-weight: 800; margin-top: 4px; }
.mini-stat .value.green { color: #0C7F3F; }
.rekap-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rekap-row:last-child { border-bottom: 0; }
.rekap-name { font-size: 13px; font-weight: 700; }
.rekap-sub { font-size: 11.5px; color: var(--muted); }
.rekap-val { margin-left: auto; text-align: right; font-size: 13px; font-weight: 800; color: var(--green-700); }

/* ---------------- Formulir ---------------- */

.form-card { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.form-actions .btn { flex: 1 1 auto; }
.form-note { font-size: 12px; color: var(--muted); }

/* ---------------- Flash & keadaan kosong ---------------- */

.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; font-size: 13.5px;
  border: 1px solid transparent;
}
.flash-ico { display: inline-flex; }
.flash-success { background: var(--green-100); border-color: #B7EFC9; color: #14532D; }
.flash-error { background: var(--red-50); border-color: #F6C9C4; color: #8C2018; }
.flash-warning { background: var(--gold-50); border-color: #F3DFA0; color: #6B5208; }
.flash-info { background: #EAF3FE; border-color: #CBE0FA; color: #14406B; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 30px 16px; text-align: center;
  background: #fff; border: 1px dashed #CFE3D6; border-radius: 16px;
  color: var(--muted); font-size: 13px;
}
.empty-ico { color: var(--green-400); }
.empty-ico .ic { width: 30px; height: 30px; }
.empty strong { color: var(--ink); font-size: 14px; }

/* ---------------- Navigasi bawah (HP) ---------------- */

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(10, 61, 39, .07);
  border-radius: 20px 20px 0 0;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #5F6E66; font-size: 10.5px; font-weight: 600;
  min-height: 44px;
}
.nav-item .nav-ico {
  display: grid; place-items: center;
  width: 38px; height: 26px; border-radius: 999px;
}
.nav-item .ic { width: 22px; height: 22px; }
.nav-item.is-active { color: #0C7F3F; }
.nav-item.is-active .nav-ico { background: var(--green-100); }
.nav-item.nav-add { position: relative; }
.nav-item.nav-add .nav-ico {
  position: absolute; top: -26px;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(160deg, #0F8143, #0B7A3C);
  color: #fff; border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(30, 158, 69, .35);
}
.nav-item.nav-add .nav-ico .ic { width: 26px; height: 26px; }
.nav-item.nav-add .nav-label { margin-top: 32px; }

.nav-backdrop {
  position: fixed; inset: 0; background: rgba(11, 40, 25, .45);
  z-index: 40; border: 0;
}
.nav-backdrop[hidden] { display: none; }

/* ---------------- Login ---------------- */

.auth-body {
  background:
    radial-gradient(circle at 15% 0%, #3FC861 0%, rgba(63, 200, 97, 0) 42%),
    radial-gradient(circle at 90% 10%, #FFD54A 0%, rgba(255, 213, 74, 0) 35%),
    linear-gradient(170deg, #0E6B41 0%, #08331F 62%, #061F13 100%);
  min-height: 100vh;
}
.auth-wrap {
  max-width: 430px; margin: 0 auto;
  padding: 34px 18px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}
.auth-brand { text-align: center; color: #fff; }
.auth-logo {
  width: 84px; height: 84px; margin: 0 auto 12px;
  border-radius: 24px; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  display: grid; place-items: center;
}
.auth-logo .ic { width: 44px; height: 44px; }
.auth-logo .auth-img { width: 60px; height: 60px; object-fit: contain; border-radius: 16px; display: block; }
.auth-brand h1 { font-size: 20px; font-weight: 800; }
.auth-brand p { font-size: 13px; opacity: .88; margin-top: 4px; }
.auth-card {
  background: #fff; border-radius: 22px; padding: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  display: flex; flex-direction: column; gap: 14px;
}
.auth-card h2 { font-size: 17px; }
.auth-foot { text-align: center; color: rgba(255, 255, 255, .8); font-size: 11.5px; }

/* ---------------- Halaman lain ---------------- */

.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head h1 { font-size: 18px; font-weight: 800; }
.page-head .toolbar { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.hero-stats { margin-top: 12px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; font-weight: 600; color: #43554A; white-space: nowrap;
}
.tab.is-active { background: #0C7F3F; border-color: #0C7F3F; color: #fff; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 12.5px; }
.pager-btn { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; }
.pager-btn.is-disabled { opacity: .45; pointer-events: none; }
.pager-info { color: var(--muted); }

.kv { display: grid; grid-template-columns: 1fr; gap: 8px; }
.kv-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv-row:last-child { border-bottom: 0; }
.kv-key { color: var(--muted); flex: 0 0 42%; }
.kv-val { font-weight: 600; word-break: break-word; }

.thumb { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }

.alert-note {
  background: var(--gold-50); border: 1px solid #F1E0A6; color: #6B5208;
  padding: 12px 14px; border-radius: 13px; font-size: 12.5px;
}

code { background: #EFF5F1; color: #55665C; padding: 1px 5px; border-radius: 5px; font-size: .92em; }

/* ---------------- Desktop ---------------- */

@media (min-width: 700px) {
  .stat-row { gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-label { font-size: 12.5px; }
  .stat-value { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .menu-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .menu-ico { width: 58px; height: 58px; }
  .kv { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .app-shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .sidebar {
    display: flex; flex-direction: column; gap: 12px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: linear-gradient(175deg, #0E6B41, #08331F 70%);
    color: #fff; padding: 18px 12px;
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; }
  .brand-logo {
    width: 42px; height: 42px; border-radius: 13px; flex: 0 0 42px;
    background: rgba(255, 255, 255, .16); display: grid; place-items: center;
    overflow: hidden;
  }
  .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
  .brand-text strong { font-size: 14px; }
  .brand-text span { font-size: 11px; opacity: .75; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
  .side-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 11px;
    color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 500;
  }
  .side-link .ic { width: 18px; height: 18px; opacity: .9; }
  .side-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .side-link.is-active { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; }
  .side-link-logout { color: #FFD9D4; }
  .side-user { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 8px; }
  .side-note { font-size: 10.5px; opacity: .55; padding: 6px 10px 0; }

  .app-main { min-height: 100vh; }
  .hero {
    margin: 16px 20px 0; border-radius: 22px; padding: 14px 18px 16px;
    max-width: none;
  }
  .hero-title-wrap { text-align: left; }
  .hero-title { font-size: 20px; }
  .hero-btn-menu { display: none; }
  .content { padding: 16px 20px 30px; gap: 16px; max-width: 1120px; }
  .bottom-nav { display: none; }
  .sync-bar { bottom: 16px; }
  .dash-stats { margin: -34px 20px 0; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pj-head { grid-template-columns: 1.3fr .8fr .9fr; }
}

@media (min-width: 1200px) {
  .menu-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px 12px; }
}

/* Sidebar geser untuk HP/tablet */
@media (max-width: 959px) {
  .sidebar {
    display: flex; flex-direction: column; gap: 10px;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    width: 272px; max-width: 84vw;
    background: linear-gradient(175deg, #0E6B41, #08331F 70%);
    color: #fff; padding: 18px 12px;
    transform: translateX(-102%);
    transition: transform .22s ease;
    overflow-y: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 16px 0 44px rgba(0, 0, 0, .28); }
  body.nav-open { overflow: hidden; }
}

/* ---------------- Cetak ---------------- */

@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .bottom-nav, .hero, .no-print, .btn { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card, .table-wrap, .mini-stat { box-shadow: none; border-color: #bbb; }
  table.table { min-width: 0; }
  table.table th, table.table td { white-space: normal; padding: 6px 8px; }
  .print-title { display: block !important; margin-bottom: 10px; }
  .print-title h1 { font-size: 16px; }
  .print-title p { font-size: 11px; color: #444; }
}
.print-title { display: none; }

/* ---------------- Dashboard (hero + kartu melayang) ---------------- */

.page-dash .hero { padding-bottom: 0; overflow: visible; }
/* Ornamen tidak boleh melewati tepi layar saat overflow hero dibuat visible
   (dulu menyebabkan scrollWidth +60px di ponsel). */
.page-dash .hero::after { right: 0; top: -80px; }
.page-dash .content { padding-top: 64px; }
.dash-stats { margin: 14px 0 -50px; }
.dash-hero { border-radius: 0 0 26px 26px; }
@media (min-width: 960px) {
  .page-dash .content { padding-top: 66px; }
  .dash-stats { margin: 16px 0 -48px; }
  .page-dash .hero { padding-bottom: 0; }
}

/* ---------------- Logo organisasi (unggahan) ---------------- */

.brand-img { width: 34px; height: 34px; object-fit: contain; display: block; }
.avatar.avatar-logo { background: rgba(255, 255, 255, .92); border-color: rgba(255, 255, 255, .9); overflow: hidden; }
.avatar .avatar-img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }
.logo-box {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border: 1px dashed #CFE3D6; border-radius: 14px; background: #FAFDFA;
}
.logo-box img {
  width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain;
  border-radius: 14px; background: #fff; border: 1px solid var(--line); padding: 4px;
}
.logo-box .logo-meta { min-width: 0; }
.logo-box strong { display: block; font-size: 13px; }
.logo-box .form-note { margin-top: 2px; }
