﻿/* Tema "Buku Catatan" — kuning #F5DF4D + abu #939597, latar buku bergaris kotak-kotak.
   Header lurus (tanpa lengkung), interaktif, mobile-friendly. */
:root {
  --y:#f5df4d; --y2:#fbe97a; --g:#939597; --ink:#26282e; --ink2:#4a4e57;
  --paper:#fbfaf5; --card:#fff; --line:#e8e4d4; --soft:#fffdf3;
  --acc:#26282e; --acc-soft:#f5f3ea;
  --red:#c03636; --ok:#127a4b; --warn:#8a6410;
  --r-lg:20px; --r-md:14px; --r-sm:10px;
  --shadow:0 8px 20px rgba(120,118,100,.10);
  --ease:cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image:
    linear-gradient(#00000008 1.5px, transparent 1.5px),
    linear-gradient(90deg, #00000008 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

.shell { min-height: 100vh; }

/* ---------- Topbar bersih (tanpa nav di header) ---------- */
.topbar {
  background: linear-gradient(165deg, var(--y), var(--y2));
  border-bottom: 1.5px solid #00000010;
  position: sticky; top: 0; z-index: 20;
}
.topbar-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 24px; position: relative; }
#btnMenu { display: none; }
.mdrop {
  position: absolute; top: calc(100% + 6px); right: 12px; z-index: 40;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 10px; min-width: 210px;
  display: flex; flex-direction: column; gap: 8px;
}
@media (max-width: 900px) {
  .topbar { position: static; }
  #btnMenu { display: inline-flex; }
  #btnLogout, #btnPengaturan { display: none; }
}
.toplogo { height: 46px; width: 46px; object-fit: contain; }
.topbrand b { font-size: 16px; font-weight: 600; display: block; line-height: 1.2; }
.topbrand small { font-size: 11.5px; color: #5a551c; font-weight: 600; }
.sp { flex: 1; }
.who { font-size: 12.5px; color: #5a551c; font-weight: 600; }

.main { min-width: 0; }
.content { padding: 22px 24px 120px; max-width: 980px; width: 100%; margin: 0 auto; overflow-x: clip; }
html, body { overflow-x: clip; }
.card, .listrow .grow, .grid-cards .card, .kpi { min-width: 0; }
.card a, .listrow a { overflow-wrap: anywhere; }
img { max-width: 100%; }
.pagetitle { font-size: 20px; font-weight: 600; margin: 0 0 16px; }

/* ---------- Tab nav (desktop): di dalam konten ---------- */
.tabnav { display: none; gap: 6px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 6px; width: 100%; margin: 0 0 20px; box-shadow: 0 4px 12px rgba(120,118,100,.10); overflow-x: auto; scrollbar-width: none; }
.tabnav::-webkit-scrollbar { display: none; }
.bottomnav::-webkit-scrollbar { display: none; }
.tabnav button {
  flex: 0 0 auto; justify-content: center;
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0;
  color: var(--g); font-size: 14px; font-weight: 500; padding: 9px 18px; border-radius: 999px;
  cursor: pointer; font-family: inherit; min-height: 40px; box-shadow: none;
  transition: background .18s, color .18s;
}
.tabnav button .ic { font-size: 17px; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.tabnav button:hover { background: var(--soft); transform: none; box-shadow: none; }
.tabnav button:hover .ic { transform: scale(1.25) rotate(-8deg); }
.tabnav button.on { background: var(--y); color: #4a460f; box-shadow: 0 2px 0 #00000018; }
.tabnav:empty { display: none !important; }

/* ---------- Bottom nav (mobile): bar bersih ---------- */
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1.5px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  overflow-x: auto; scrollbar-width: none;
}
.bottomnav button {
  flex: 0 0 auto; min-width: 68px; background: none; border: 0; color: var(--g); min-height: 58px;
  font-size: 11px; font-weight: 600; border-radius: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 8px 2px; box-shadow: none;
}
.bottomnav button:hover { transform: none; box-shadow: none; }
.bottomnav button .ic { font-size: 21px; transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.bottomnav button:hover .ic { transform: translateY(-2px); }
.bottomnav button.on { color: var(--ink); font-weight: 600; }
.bottomnav button.on .ic { filter: drop-shadow(0 3px 0 var(--y)); }

/* ---------- Responsive ---------- */
@media (min-width: 901px) {
  .tabnav { display: flex; }
}
@media (max-width: 900px) {
  .content { padding: 18px 14px 120px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .cols2, .grid2 { grid-template-columns: 1fr; }
  .bottomnav { display: flex; }
  .wfit { max-width: 100%; flex: 1; }
  .who { display: none; }
  .tabnav { display: none !important; }
}

/* ---------- Kartu ---------- */
.card {
  background: var(--card); border: 1px solid #00000006; border-radius: var(--r-lg);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.note-line { background: #fff8d6; border: 1.5px solid var(--y); color: #5a551c; border-radius: var(--r-md); padding: 10px 14px; font-size: 13.5px; margin-bottom: 10px; }

/* ---------- Kontrol ---------- */
label { font-size: 12px; font-weight: 500; display: block; margin: 14px 0 5px; color: var(--g); }
input, select, textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 15px; background: #fff; color: var(--ink); font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--y); box-shadow: 0 0 0 4px rgba(245,223,77,.4); }
textarea { min-height: 120px; resize: vertical; }
textarea.short { min-height: 70px; }
input[type="checkbox"] { width: auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.wfit { max-width: 250px; }

button {
  background: var(--y); color: #3d3a10; border: 2px solid #3d3a10; border-radius: 999px;
  padding: 12px 22px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 3px 0 #3d3a10;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, background .15s;
}
button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #3d3a10; background: var(--y2); }
button:active { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 #3d3a10; }
button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: 0 3px 0 #3d3a10; }
button.dark { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 3px 0 #00000055; }
button.dark:hover { background: #34373e; box-shadow: 0 5px 0 #00000055; }
button.ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: 0 3px 0 var(--line); }
button.ghost:hover { background: var(--acc-soft); border-color: var(--g); box-shadow: 0 5px 0 var(--line); }
button.danger { background: #ff8f8f; color: #5b1010; border-color: #5b1010; box-shadow: 0 3px 0 #5b1010; }
button.danger:hover { background: #ffa3a3; box-shadow: 0 5px 0 #5b1010; }
button.small { padding: 8px 16px; min-height: 38px; font-size: 13px; box-shadow: 0 2px 0 #3d3a10; }
button.small:hover { box-shadow: 0 4px 0 #3d3a10; }
button.ghost.small { box-shadow: 0 2px 0 var(--line); }
button.danger.small { box-shadow: 0 2px 0 #5b1010; }
button.block { width: 100%; }
button.linklike { background: none; color: var(--ink); border: 0; padding: 6px 2px; min-height: 36px; font-weight: 500; box-shadow: none; }
button.linklike:hover { transform: none; text-decoration: underline; background: none; box-shadow: none; }
/* ikon di dalam tombol ikut memantul saat hover */
button .ic { display: inline-block; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
button:hover .ic { transform: scale(1.25) rotate(-8deg); }

/* ---------- Link di dalam konten ---------- */
.card a { color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1.5px solid var(--y); }
.card a:hover { color: #8a7a10; border-bottom-color: #8a7a10; }

/* ---------- Badge → pastel penuh (oval, tegak, seperti tombol) ---------- */
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 600; padding: 5px 13px;
  border: 0; border-radius: 999px; background: #fdf0b3;
  text-transform: uppercase; letter-spacing: .4px; color: #6b5f0a;
}
.badge.green { background: #cdeeda; color: #0f6b3d; }
.badge.gold { background: #fbe3b5; color: #8a6410; }
.badge.grey { background: #e4e7eb; color: #5f6368; }
.badge.red { background: #fbdcdc; color: #a01a1a; }

/* ---------- Pill counter (jumlah, bukan stempel) ---------- */
.countpill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 3px 11px; border-radius: 99px; background: var(--y); color: #4a460f;
  transform: none; letter-spacing: 0; text-transform: none; border: 0; box-shadow: none;
}
  display: inline-block; font-size: 10.5px; font-weight: 600; padding: 5px 13px;
  border: 0; border-radius: 999px; background: #fdf0b3;
  text-transform: uppercase; letter-spacing: .4px; color: #6b5f0a;
}
.badge.green { background: #cdeeda; color: #0f6b3d; }
.badge.gold { background: #fbe3b5; color: #8a6410; }
.badge.grey { background: #e4e7eb; color: #5f6368; }
.badge.red { background: #fbdcdc; color: #a01a1a; }
.muted { color: var(--g); font-size: 13px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; font-weight: 600; }
.ok { color: var(--ok); font-size: 13px; margin-top: 8px; font-weight: 600; }
.hidden { display: none !important; }
img.att { max-width: 100%; border-radius: var(--r-md); margin-top: 12px; border: 1.5px solid var(--line); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi {
  background: var(--card); border: 1px solid #00000006; border-radius: var(--r-md);
  padding: 14px 10px; box-shadow: var(--shadow); text-align: center;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 84px; /* tinggi seragam */
}
.kpi small {
  color: var(--g); font-size: 11px; font-weight: 500; display: block;
  min-height: 30px; line-height: 1.25; /* label 2 baris tetap sejajar */
  display: flex; align-items: center; justify-content: center;
}
.kpi b { font-size: 26px; font-weight: 600; line-height: 1; margin-top: 2px; }

/* ---------- List ---------- */
.listrow { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-top: 1.5px solid var(--line); flex-wrap: wrap; }
.listrow:first-of-type { border-top: 0; }
.listrow .grow { flex: 1; min-width: 160px; }
.listrow a { color: var(--ink); text-decoration: none; font-weight: 500; }
.listrow a:hover { text-decoration: underline; }

/* ---------- Forum item ---------- */
.item { display: flex; gap: 12px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: #fff; margin-bottom: 12px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.item:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(120,118,100,.14); border-color: var(--y); }
.av { width: 44px; height: 44px; border-radius: 50%; background: var(--g); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.av.anon { background: var(--y); color: #4a460f; }

/* ---------- Timeline ---------- */
.timeline { border-left: 3px solid var(--y); margin: 12px 0 0 8px; padding-left: 16px; }
.timeline div { margin-bottom: 10px; font-size: 13.5px; position: relative; }
.timeline div::before { content: ""; position: absolute; left: -22.5px; top: 5px; width: 10px; height: 10px; background: var(--y); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--y); }

/* ---------- Agenda: timeline zig-zag, garis di tengah ---------- */
.agenda { position: relative; margin: 4px 0 16px; padding: 0; }
.agenda::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: var(--y); border-radius: 99px; transform: translateX(-50%);
}
.ag-item { position: relative; width: 50%; margin: 0; padding: 0 28px 16px 0; }
.ag-item:nth-child(even) { margin-left: 50%; padding: 0 0 16px 28px; }
.ag-item .ag-dot {
  position: absolute; top: 22px; width: 14px; height: 14px;
  background: var(--y); border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--y);
}
.ag-item:nth-child(odd) .ag-dot { right: -10px; }
.ag-item:nth-child(even) .ag-dot { left: -10px; }
.ag-item.berjalan .ag-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok); }
.ag-item.selesai .ag-dot { background: var(--g); box-shadow: 0 0 0 3px var(--g); }
.ag-item .ag-card { margin-bottom: 0; }
.ag-item.selesai .ag-card { opacity: .75; }
@media (max-width: 700px) {
  .agenda::before { left: 8px; transform: none; }
  .ag-item, .ag-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 14px 28px; }
  .ag-item .ag-dot, .ag-item:nth-child(odd) .ag-dot, .ag-item:nth-child(even) .ag-dot { left: 0; right: auto; }
}

/* ---------- Donasi: progress bar ---------- */
.progress { height: 12px; border-radius: 99px; background: var(--acc-soft); border: 1.5px solid var(--line); overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--y), var(--y2)); border-radius: 99px; }
.center { text-align: center; }

/* ---------- Modal dalam web ---------- */
.mwrap {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(38,40,46,.45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.mbox {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow);
  max-width: 440px; width: 100%; padding: 22px;
  border-top: 6px solid var(--y);
}
.mbox h3 { margin: 0 0 8px; font-size: 17px; }
.mbox .muted { font-size: 14px; }
.mbox button.danger { margin-left: 0; }
.mbox.wide { max-width: 640px; max-height: 92vh; overflow-y: auto; }

/* ---------- Kartu berita ber-thumbnail ---------- */
.bthumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-md); border: 1.5px solid var(--line); margin-bottom: 10px;
}
.bthumb.ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; background: var(--soft);
}

@media (max-width: 700px) {
  .mwrap { padding: 0; align-items: flex-end; }
  .mbox.wide { border-radius: 18px 18px 0 0; max-height: 94vh; max-width: 100%; }
}

/* ---------- Grid kartu 2 kolom (daftar rapat) ---------- */
.grid-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-cards .card { margin-bottom: 0; display: flex; flex-direction: column; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.grid-cards .card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(120,118,100,.14); border-color: var(--y); }
.grid-cards .card .grow { flex: 1; }
@media (max-width: 700px) {
  .grid-cards { grid-template-columns: 1fr; }
}

/* ---------- Dashboard admin: grid kartu aksi ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.acard {
  background: var(--soft); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 16px 14px; cursor: pointer; transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.acard:hover { transform: translateY(-3px); border-color: var(--y); box-shadow: var(--shadow); }
.acard .ic { font-size: 28px; }
.acard b.num { display: block; font-size: 30px; line-height: 1.1; margin-top: 4px; }
.acard small { color: var(--ink2); font-size: 12.5px; font-weight: 600; display: block; }
.acard .go { color: #8a7a10; font-size: 12.5px; font-weight: 700; }
.acard.zero { opacity: .55; }
.acard.zero .go { color: var(--g); }

/* ---------- Judul halaman berita ---------- */
.post-title { text-align: center; font-size: 24px; font-weight: 800; margin: 8px 0 22px; line-height: 1.3; }
/* ---------- Kolom artikel berita (lebih sempit dari kartu) ---------- */
.post-body { max-width: 640px; margin: 0 auto; }
.post-artikel { margin-top: 26px; line-height: 1.75; }
.post-admin { margin-top: 34px; }

/* ---------- Komentar ---------- */
.cmt { display: flex; gap: 10px; margin-top: 14px; }
.cmt .b { flex: 1; background: var(--soft); border-radius: 4px 18px 18px 18px; padding: 11px 14px; font-size: 14px; border: 1px solid var(--line); }

/* ---------- Auth ---------- */
.authwrap {
  max-width: 430px; margin: 0 auto; width: 100%;
  padding: 24px 0; /* cukup napas, tidak didorong ke tengah viewport */
}
.authwrap > .authcard { width: 100%; }
.authcard { background: var(--card); border: 1px solid #00000006; border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow); }
.authcard h2 { margin: 10px 0 4px; font-size: 21px; font-weight: 600; }
.authcard.center { text-align: center; }
.authlogo { height: 60px; width: auto; max-width: 90px; object-fit: contain; display: block; }
.authcard.center .authlogo { margin: 0 auto 10px; }
.authcard hr { border: 0; border-top: 1.5px solid var(--line); margin: 18px 0; }
.authcard label { margin-top: 12px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1.5px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  overflow-x: auto; scrollbar-width: none;
}
.bottomnav button {
  flex: 0 0 auto; min-width: 68px; background: none; border: 0; color: var(--g); min-height: 58px;
  font-size: 11px; font-weight: 600; border-radius: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 8px 2px;
}
.bottomnav button:hover { transform: none; box-shadow: none; }
.bottomnav button .ic { font-size: 21px; }
.bottomnav button.on { color: var(--ink); font-weight: 600; }
.bottomnav button.on .ic { filter: drop-shadow(0 3px 0 var(--y)); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .side { width: 270px; }
  .content { padding: 18px 14px 120px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .cols2, .grid2 { grid-template-columns: 1fr; }
  .bottomnav { display: flex; }
  .wfit { max-width: 100%; flex: 1; }
  .who { display: none; }
  .topbar h1 { font-size: 15.5px; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
