/* ===========================================================
   PPP DPC KOTA MAKASSAR - Sistem Informasi Manajemen Organisasi
   Identitas visual: hijau PPP + aksen kuning-emas, bersih & elegan
   =========================================================== */
:root {
  --p: #0b6b3a;
  --p-600: #085c31;
  --p-700: #064e2b;
  --p-100: #dff3e7;
  --p-50: #f0faf4;
  --acc: #f2c200;
  --acc-100: #fdf6dc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-2: #f6f8f7;
  --ok: #15803d;
  --warn: #b45309;
  --err: #c0392b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 34px rgba(15,23,42,.12);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--p); text-decoration: none; }
a:hover { color: var(--p-600); }
h1,h2,h3,h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--ink); }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8rem; }
ul { margin: 0; padding-left: 1.1rem; }
code { background: var(--bg-2); padding: 1px 5px; border-radius: 5px; font-size: .85em; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; } .mt-2 { margin-top: 26px; } .mb { margin-bottom: 14px; }
.hide { display: none !important; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.spacer { flex: 1; }
.grid.split { grid-template-columns: 300px minmax(0,1fr); align-items: start; }
.grid.split.wide { grid-template-columns: minmax(0,1fr) 340px; }
input.in, select.in, textarea.in, .field, .alert, .card-b, .card-h, h1, h2, h3, p, td, th { overflow-wrap: anywhere; }
input.in, select.in, textarea.in { max-width: 100%; }
.nm, .title, .list-item .grow { overflow-wrap: anywhere; word-break: break-word; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #86c9a5; outline-offset: 2px;
}

/* ------------------------------------------------------------ header publik */
.topbar { background: var(--p-700); color: #d9efe3; font-size: .82rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar a { color: #d9efe3; }
header.site { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 18px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--p); }
.logo img { height: 42px; width: auto; border-radius: 9px; }
.logo .txt { font-size: 1.02rem; line-height: 1.15; text-decoration: none; }
.logo .txt small { display: block; font-weight: 600; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
nav.main { display: flex; gap: 2px; align-items: center; }
nav.main a { padding: 8px 11px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
nav.main a:hover { background: var(--p-50); color: var(--p); }
nav.main a.on { background: var(--p-100); color: var(--p-700); }
.head-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.burger { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 1.05rem; cursor: pointer; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; border: 1px solid transparent;
  background: var(--p); color: #fff; font-weight: 700; font-size: .9rem; padding: 10px 17px; border-radius: 999px; text-decoration: none; transition: .15s; }
.btn:hover { background: var(--p-600); color: #fff; }
.btn.acc { background: var(--acc); color: #3d3000; } .btn.acc:hover { background: #ddb100; color: #3d3000; }
.btn.ghost { background: #fff; color: var(--p); border-color: var(--p-100); }
.btn.ghost:hover { background: var(--p-50); }
.btn.outline { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.outline:hover { background: var(--bg-2); color: var(--ink); }
.btn.danger { background: var(--err); } .btn.danger:hover { background: #9e2f24; }
.btn.warn { background: var(--warn); } 
.btn.sm { padding: 7px 13px; font-size: .83rem; }
.btn.xs { padding: 5px 10px; font-size: .77rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.lg { padding: 13px 24px; font-size: .98rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ badge & chip */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .73rem; font-weight: 700;
  background: var(--p-100); color: var(--p-700); white-space: nowrap; }
.badge.acc { background: var(--acc-100); color: #7a5c00; }
.badge.ok { background: #e2f5e8; color: var(--ok); }
.badge.warn { background: #fdf1dd; color: var(--warn); }
.badge.err { background: #fdeaea; color: var(--err); }
.badge.grey { background: #f1f5f9; color: var(--ink-2); }
.badge.gold { background: linear-gradient(135deg,var(--acc),#f6d75c); color: #4a3900; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: .84rem; color: var(--ink-2); }
.chip.on { background: var(--p); color: #fff; border-color: var(--p); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card-h { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 1.03rem; }
.card-b { padding: 18px; }
.card-f { padding: 13px 18px; border-top: 1px solid var(--line); background: var(--bg-2); border-radius: 0 0 var(--radius) var(--radius); }

/* ------------------------------------------------------------ hero */
.hero { background: linear-gradient(135deg, var(--p-700), var(--p) 55%, #12814a); color: #fff; padding: 46px 0 40px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(242,194,0,.16); }
.hero .inner { position: relative; z-index: 2; max-width: 720px; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -.6px; }
.hero p { color: #d9efe3; font-size: 1.03rem; }
.hero .pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.28);
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; margin-bottom: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 22px; margin-top: 22px; }
.hero-stats div b { display: block; font-size: 1.5rem; color: var(--acc); }
.hero-stats div span { font-size: .8rem; color: #d9efe3; }

section.blk { padding: 36px 0; }
section.blk.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.blk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.blk-head h2 { margin: 0; position: relative; padding-left: 14px; }
.blk-head h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; border-radius: 4px; background: var(--acc); }
.blk-head p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

/* kartu pengurus / caleg */
.person-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: center; }
.person-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.person-card .body { padding: 14px; }
.person-card .name { font-weight: 700; font-size: .98rem; }
.person-card .role { color: var(--p); font-size: .84rem; font-weight: 600; }
.person-card .meta { font-size: .78rem; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .lbl { font-size: .79rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat .val { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.stat .sub { font-size: .77rem; color: var(--ok); margin-top: 2px; }
.stat .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--p-50); display: grid; place-items: center; font-size: 1.05rem; }
.stat.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

.chart-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.chart-box h3 { font-size: .97rem; margin: 0 0 10px; }
.chart-svg { width: 100%; height: 210px; }

/* ------------------------------------------------------------ forms */
label.fl { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 5px; color: var(--ink-2); }
input.in, select.in, textarea.in { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .92rem; font-family: inherit; background: #fff; color: var(--ink); }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--p); outline: none; box-shadow: 0 0 0 3px var(--p-100); }
textarea.in { min-height: 92px; resize: vertical; }
.field { margin-bottom: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: .89rem; }
.checkline input { width: 16px; height: 16px; accent-color: var(--p); }
.help { font-size: .77rem; color: var(--muted); margin-top: 4px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 140px; }
.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: .91rem; border: 1px solid; }
.alert.success { background: #eaf8ef; border-color: #b7e4c7; color: #14663a; }
.alert.error { background: #fdeaea; border-color: #f6c8c8; color: #8f1d1d; }
.alert.warning { background: #fef5e5; border-color: #fbdfae; color: #8a5206; }
.alert.info { background: var(--p-50); border-color: #c9e5d5; color: var(--p-700); }

/* ------------------------------------------------------------ tabel */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .89rem; }
table.tbl th { text-align: left; padding: 11px 12px; background: var(--bg-2); color: var(--ink-2); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--p-50); }
table.tbl img.tb { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty .ic { font-size: 2.3rem; margin-bottom: 8px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .nm { font-weight: 600; font-size: .91rem; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; }
.avatar-md { width: 56px; height: 56px; border-radius: 14px; }

.progress { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; display: inline-block; width: calc(100% - 48px); vertical-align: middle; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--p); transition: width .3s; }
.progress-fill.ok { background: var(--ok); } .progress-fill.mid { background: var(--acc); } .progress-fill.low { background: var(--err); }
.progress-label { font-size: .79rem; color: var(--ink-2); font-weight: 700; margin-left: 6px; }

/* ------------------------------------------------------------ dashboard shell */
.shell { display: grid; grid-template-columns: 264px minmax(0,1fr); min-height: 100vh; background: var(--bg-2); }
.side { background: var(--p-700); color: #d9efe3; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.14); margin-bottom: 10px; }
.side .brand .txt { color: #fff; font-weight: 800; font-size: .92rem; line-height: 1.2; }
.side .brand .txt small { display: block; font-weight: 500; font-size: .7rem; color: #a8cdb9; }
.side .grp { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #9dc3ae; padding: 13px 10px 5px; font-weight: 700; }
.side a.item { display: flex; align-items: center; gap: 10px; padding: 8.5px 11px; border-radius: 10px; color: #d9efe3; font-size: .88rem; font-weight: 600; }
.side a.item:hover { background: rgba(255,255,255,.10); color: #fff; }
.side a.item.on { background: var(--acc); color: #3d3000; }
.side a.item .ic { width: 20px; text-align: center; }
.side .sidefoot { margin-top: 14px; padding: 10px; border-top: 1px solid rgba(255,255,255,.14); font-size: .74rem; color: #9dc3ae; }
.content { padding: 20px 24px 44px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.45rem; margin: 0; }
.page-head p { margin: 3px 0 0; color: var(--muted); font-size: .89rem; }
.topnav { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 16px; flex-wrap: wrap; }
.topnav .who { display: flex; align-items: center; gap: 9px; }
.topnav .who img { width: 34px; height: 34px; border-radius: 50%; }
.sidebar-toggle { display: none; }
.searchbox { position: relative; }
.searchbox input { width: 100%; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); font-size: .88rem; }
.search-result { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; z-index: 80; padding: 6px; }
.search-result a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); }
.search-result a:hover { background: var(--p-50); }
.search-result .t { font-weight: 600; font-size: .88rem; }
.search-result .s { font-size: .77rem; color: var(--muted); }
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; }
.filterbar > div { min-width: 140px; }

/* ------------------------------------------------------------ footer */
footer.site { background: #08422a; color: #bcd8c7; padding: 40px 0 20px; font-size: .89rem; margin-top: 40px; }
footer.site h4 { color: #fff; font-size: .96rem; margin-bottom: 12px; }
footer.site a { color: #bcd8c7; display: block; padding: 3px 0; }
footer.site a:hover { color: #fff; }
footer.site .cols { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 26px; }
footer.site .bottom { border-top: 1px solid #155c3d; margin-top: 26px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .83rem; }
footer.site .social { display: flex; gap: 10px; margin-top: 10px; }
footer.site .social a { width: 34px; height: 34px; border-radius: 50%; background: #10583a; display: grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 700; }

/* ------------------------------------------------------------ bottom nav */
.bottomnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line);
  z-index: 80; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottomnav a { flex: 1; text-align: center; font-size: .68rem; color: var(--muted); display: grid; gap: 2px; }
.bottomnav a .ic { font-size: 1.22rem; }
.bottomnav a.on { color: var(--p); font-weight: 700; }

/* kartu KTA */
.kta { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); max-width: 480px; }
.kta .top { background: linear-gradient(135deg, var(--p-700), var(--p) 60%, #12814a); color: #fff; padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.kta .top .t { font-weight: 800; font-size: .95rem; }
.kta .top .s { font-size: .72rem; color: #cfe8db; }
.kta .body { padding: 18px; background: #fff; }
.kta .row { display: flex; justify-content: space-between; gap: 12px; font-size: .87rem; padding: 5px 0; border-bottom: 1px dashed var(--line); }
/* Background KTA diunggah admin (Pengaturan -> Identitas & Tampilan -> Background Kartu
   Anggota). Foto jadi latar kartu; lapisan putih transparan menjaga teks tetap terbaca. */
.kta.kta-bg { background-image: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.72)), var(--kta-bg); background-size: cover; background-position: center; background-repeat: no-repeat; }
.kta.kta-bg .body { background: transparent; }
.kta.kta-bg .top { background: linear-gradient(135deg, rgba(11,107,58,.90), rgba(18,129,74,.84)); }

.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.steps div { display: flex; gap: 8px; align-items: center; font-size: .84rem; color: var(--muted); }
.steps div.on { color: var(--p); font-weight: 700; }
.steps .num { width: 25px; height: 25px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.steps div.on .num { background: var(--p); color: #fff; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .87rem; color: var(--ink-2); }
.pagination .on { background: var(--p); color: #fff; border-color: var(--p); }
.pagination .dis { opacity: .5; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer;
  border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--p); border-color: var(--p); }
.tab-pane { display: none; padding-top: 15px; }
.tab-pane.on { display: block; }
.accordion { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.accordion summary { padding: 12px 14px; cursor: pointer; font-weight: 700; background: var(--bg-2); font-size: .92rem; }
.accordion .in-body { padding: 12px 14px; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline .item { position: relative; padding-bottom: 16px; }
.timeline .item::before { content: ""; position: absolute; left: -23px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--p); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--p-100); }

/* struktur organisasi */
.org-node { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 15px; text-align: center; }
.org-node.root { background: linear-gradient(135deg, var(--p-700), var(--p)); color: #fff; border: 0; }
.org-node.root .nm { color: #fff; }
.org-level { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.org-connector { text-align: center; color: var(--muted); font-size: 1.4rem; line-height: 1; margin: 6px 0; }

/* ============================ responsive ============================ */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  footer.site .cols { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 880px) {
  nav.main { display: none; }
  .burger { display: block; }
  header.site .wrap { height: 64px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.split, .grid.split.wide { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: .22s; box-shadow: var(--shadow-lg); }
  .side.open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 14px 14px 92px; }
  .bottomnav { display: flex; }
  body.has-bottomnav { padding-bottom: 64px; }
  table.tbl.responsive thead { display: none; }
  table.tbl.responsive tbody tr { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 10px 12px; background: #fff; }
  table.tbl.responsive tbody td { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px; border: 0; padding: 6px 0; text-align: right; min-width: 0; }
  table.tbl.responsive tbody td::before { content: attr(data-label); font-size: .77rem; color: var(--muted);
    font-weight: 700; text-align: left; flex: 0 0 auto; }
  table.tbl.responsive tbody td > * { min-width: 0; max-width: 100%; }
  table.tbl.responsive tbody td .flex { flex-wrap: wrap; justify-content: flex-end; }
  table.tbl.responsive tbody td .btn-group, table.tbl.responsive tbody td form { justify-content: flex-end; }
  table.tbl.responsive tbody td .nm, table.tbl.responsive tbody td .name { overflow-wrap: anywhere; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { padding: 30px 0 26px; }
  .blk-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 580px) {
  body { font-size: 14.5px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.55rem; }
  footer.site .cols { grid-template-columns: 1fr; }
  .hide-xs { display: none !important; }
  .topnav .who div { display: none; }
  .kta { max-width: 100%; }
}
@media print {
  header.site, footer.site, .bottomnav, .btn, .topbar, .side, .topnav { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  /* Cetak KTA: warna & background foto harus ikut tercetak (default browser membuangnya). */
  .kta, .kta .top, .kta.kta-bg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kta { break-inside: avoid; }
}
