/* Dashboard Animaji — gaya dasar (tanpa build step) */
:root {
  --orange: #F07F00; --orange-deep: #D96F00; --orange-ink: #8A3F00; --orange-soft: #FFEBD6;
  --ink: #1F1A17; --ink-2: #3D332C; --muted: #6B5E55; --line: #F1E4D6; --line-2: #EADBCB; --field: #DCC8B4;
  --bg: #FFF8F1; --card: #FFFFFF; --sand: #F4EDE6; --sand-2: #F8F2EC;
  --good: #166534; --good-bg: #DCFCE7; --bad: #B3261E; --bad-bg: #FDECEA; --grey: #7A6A5E;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--orange-ink); } a:hover { color: #6B3300; }
h1, h2, h3 { font-family: "Baloo 2", Inter, sans-serif; margin: 0; line-height: 1.15; }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 12px; } .strong { font-weight: 700; }
.good { color: var(--good); } .bad { color: var(--bad); }

/* Layout */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 240px; max-width: 260px; background: #fff; border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 22px; }
.side .brand { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.side .brand img { width: 132px; height: auto; display: block; }
.side-menu { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.menu-btn { display: none; }
.side .group { display: flex; flex-direction: column; gap: 4px; }
.side .group-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); padding: 0 12px 6px; text-transform: uppercase; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; text-decoration: none; min-height: 44px; }
.side a.nav:hover { background: var(--sand-2); }
.side a.nav.active { background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.side .soon { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; color: var(--muted); min-height: 44px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--orange); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; background: var(--orange-soft); color: var(--orange-ink); }
.main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 24px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .title { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; }
.g-auto-220 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g-fill-240 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.g-auto-420 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.g-auto-320 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.wait { background: var(--sand-2); border: 1px dashed var(--field); color: #5C4F46; }
.kpi .value { font-family: "Baloo 2", Inter, sans-serif; font-size: 34px; font-weight: 800; line-height: 1; }
.acc .value { font-family: "Baloo 2", Inter, sans-serif; font-size: 28px; font-weight: 800; line-height: 1; }
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--orange); }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; color: var(--muted); }
.mini b { display: block; font-size: 14px; color: var(--ink); }
.note { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 12px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); }
.flash { border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.flash.ok { background: var(--good-bg); color: var(--good); }
.flash.err { background: var(--bad-bg); color: #8C1D18; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* Badges & chips */
.chip { font-size: 11px; font-weight: 700; color: #fff; padding: 3px 8px; border-radius: 6px; display: inline-block; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; display: inline-block; white-space: nowrap; }
.badge.good { color: var(--good); background: var(--good-bg); }
.badge.bad { color: #8C1D18; background: var(--bad-bg); }
.badge.warn { color: var(--orange-ink); background: var(--orange-soft); }
.badge.neutral { color: var(--ink-2); background: var(--sand); }
.badge.admin { color: var(--ink); background: var(--orange); font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 999px; flex: none; margin-top: 5px; }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--orange); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--field); background: #fff; color: var(--ink); font: 600 14px Inter, sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--orange); color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #3D332C; color: #fff; }
.btn.orange { background: var(--orange); color: var(--ink); border-color: var(--orange); font-weight: 700; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--orange-ink); text-decoration: underline; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=month], input[type=url], input[type=date], input[type=search], input[type=email], input[type=file], select, textarea {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; font: 400 14px Inter, sans-serif; color: var(--ink); background: #fff; width: 100%;
}
textarea { padding: 10px 12px; min-height: 90px; resize: vertical; }
input[type=file] { padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
input.cell { min-height: 40px; min-width: 100px; background: #FFFCF8; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg a, .seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; font: 600 13px Inter, sans-serif; color: var(--ink-2); background: transparent; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.seg a.on, .seg button.on { background: var(--orange); color: var(--ink); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills a { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; }
.pills a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; white-space: nowrap; }
table.t td { padding: 10px 8px; border-top: 1px solid var(--sand); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
table.t .r { text-align: right; }
table.t tr.group td { background: var(--bg); border-top: 1px solid var(--line-2); font-weight: 700; }
table.t tr.total td { border-top: 2px solid var(--line-2); font-weight: 700; }

/* Bars */
.bar { position: relative; height: 18px; background: var(--sand); border-radius: 6px; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--orange); }
.bar > i.good { background: var(--good); } .bar > i.grey { background: var(--grey); }
.bar > s { position: absolute; top: -4px; width: 2px; height: 26px; background: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-box { position: relative; width: 100%; height: 280px; }

/* Modal-less inline forms */
details.inline > summary { list-style: none; cursor: pointer; }
details.inline > summary::-webkit-details-marker { display: none; }

/* Login */
.login { display: flex; flex-wrap: wrap; min-height: 100vh; }
.login .hero { flex: 1 1 420px; background: var(--orange); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login .hero .logo { background: #fff; border-radius: 16px; padding: 14px 18px; align-self: flex-start; }
.login .hero .logo img { width: 150px; display: block; }
.login .hero h1 { font-size: 46px; color: var(--ink); max-width: 480px; }
.login .hero p { font-size: 16px; color: #2B1A0C; max-width: 460px; margin: 0; }
.login .hero .tags span { font-size: 13px; font-weight: 600; background: #fff; padding: 8px 14px; border-radius: 999px; }
.login .form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.login form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 720px) { .login .hero { padding: 32px 24px; } .login .hero h1 { font-size: 32px; } }

/* Report / print */
.paper { background: #fff; max-width: 820px; margin: 0 auto; padding: 40px 48px; box-shadow: 0 2px 12px rgba(31,26,23,.12); display: flex; flex-direction: column; gap: 20px; }
.paper .head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--orange); padding-bottom: 14px; gap: 12px; }
.paper .head img { width: 110px; }
@media print {
  .side, .no-print { display: none !important; }
  body, .main { background: #fff; padding: 0; }
  .paper { box-shadow: none; padding: 0; max-width: none; }
  .card { break-inside: avoid; }
}

/* Laporan: form + pratinjau */
.report-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.report-form { flex: 1 1 300px; max-width: 380px; }
.report-preview { flex: 999 1 560px; min-width: 0; background: #EFE6DC; border-radius: 16px; padding: 12px; }
.report-preview iframe { width: 100%; height: 1180px; border: 0; border-radius: 8px; background: #EFE6DC; display: block; }
@media (max-width: 720px) { .report-form { max-width: none; } .report-preview { padding: 0; } .report-preview iframe { height: 1400px; } }

/* Mobile (di akhir supaya menimpa aturan dasar) */
@media (max-width: 900px) {
  .app { flex-direction: column; flex-wrap: nowrap; }
  .side { max-width: none; flex: none; padding: 10px 16px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .side .brand { flex-direction: row; align-items: center; justify-content: space-between; padding: 0; gap: 12px; }
  .side .brand img { width: 96px; }
  .side .brand-sub { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--field); border-radius: 12px; background: #fff; font: 600 14px Inter, sans-serif; color: var(--ink); cursor: pointer; }
  .side-menu { display: none; padding: 12px 0 4px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .side.open .side-menu { display: flex; }
  .side .me { margin-top: 8px; }
  .main { padding: 20px 16px 40px; gap: 18px; }
  h1 { font-size: 28px; }
  .page-head { align-items: stretch; }
  .page-head > form, .page-head > .row { width: 100%; }
  .page-head label.field { flex: 1 1 100%; min-width: 0 !important; }
  .card { padding: 16px; }
  .kpi .value { font-size: 28px; }
  .chart-box { height: 240px; }
}
@media (max-width: 480px) {
  .g-auto-220 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g-auto-220 .card { padding: 12px; gap: 6px; }
  .kpi .value { font-size: 22px; }
  .g-fill-240 { grid-template-columns: 1fr; }
  .g-2 { grid-template-columns: 1fr; }
  .seg { width: 100%; }
  .seg a, .seg button { flex: 1 1 auto; justify-content: center; }
  .row.between { align-items: flex-start; }
  .btn { width: auto; }
}

/* Menu tiga bagian */
.side-menu { gap: 12px; }
.side .sec { --acc: var(--orange); --acc-soft: var(--orange-soft); --acc-ink: var(--orange-ink); --acc-num: var(--ink);
  gap: 2px; padding: 12px 8px 8px; border-radius: 14px; background: var(--sand-2); border: 1px solid transparent; }
.sec.s2, .ctx.s2 { --acc: #1458C4; --acc-soft: #E3ECFB; --acc-ink: #0E3F8C; --acc-num: #fff; }
.sec.s3, .ctx.s3 { --acc: #0F766E; --acc-soft: #DDF3EF; --acc-ink: #0B524C; --acc-num: #fff; }
.ctx.s1 { --acc: var(--orange); --acc-soft: var(--orange-soft); --acc-ink: var(--orange-ink); --acc-num: var(--ink); }
.side .sec.on { background: #fff; border-color: var(--acc); box-shadow: 0 1px 0 var(--line); }
.side .sec-head { display: flex; align-items: center; gap: 10px; padding: 0 6px 8px; }
.sec-num { width: 22px; height: 22px; border-radius: 7px; background: var(--acc); color: var(--acc-num); font: 800 12px Inter, sans-serif; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.side .sec-title { font-weight: 700; font-size: 13px; color: var(--ink); line-height: 1.2; }
.side .sec-sub { font-size: 11px; color: var(--muted); line-height: 1.3; }
.side .sec a.nav { min-height: 38px; padding: 8px 10px 8px 38px; position: relative; font-size: 13.5px; }
.side .sec a.nav::before { content: ""; position: absolute; left: 16px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 999px; background: var(--line-2); }
.side .sec a.nav:hover { background: #fff; }
.side .sec.on a.nav:hover { background: var(--sand-2); }
.side .sec a.nav.active { background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; }
.side .sec a.nav.active::before { background: var(--acc); }
.ctx { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--acc-soft); color: var(--acc-ink); font-size: 12px; font-weight: 700; }
.ctx .sec-num { width: 20px; height: 20px; border-radius: 999px; font-size: 11px; }
@media (max-width: 860px) { .grid[style*="minmax(240px,300px)"] { grid-template-columns: 1fr !important; } }

/* Thumbnail adaptif: potret, lanskap, dan persegi tampil utuh di bingkai yang sama */
.cards-fill { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); align-items: start; }
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; isolation: isolate; }
.thumb .bg { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); object-fit: cover; filter: blur(16px) saturate(1.1); opacity: .5; z-index: -1; }
.thumb .fg { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb .tl, .thumb .tr { position: absolute; top: 8px; z-index: 1; } .thumb .tl { left: 8px; } .thumb .tr { right: 8px; }
.thumb .rank { font: 800 16px "Baloo 2", Inter, sans-serif; background: var(--ink); color: #fff; padding: 0 9px; border-radius: 8px; }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Baris label + bar + angka */
.dimrow { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.dimrow > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Temuan utama */
.insight { display: flex; gap: 14px; align-items: flex-start; }
.insight .big { font: 800 30px/1 "Baloo 2", Inter, sans-serif; min-width: 64px; }
.insight.good .big { color: var(--good); } .insight.bad .big { color: var(--bad); } .insight.info .big { color: var(--orange-ink); }
/* Heatmap hari × jam */
.heat { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: 12px; }
.heat th { color: var(--muted); font-weight: 600; text-align: left; white-space: nowrap; padding: 4px; }
.heat td { text-align: center; border-radius: 8px; padding: 10px 4px; min-width: 52px; }
.heat td b { display: block; font-size: 14px; } .heat td span { font-size: 10px; opacity: .8; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .thumb { aspect-ratio: 1 / 1; }
}
@media (max-width: 640px) {
  .dimrow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .dimrow > .bar { grid-column: 1 / -1; order: 3; }
  .mini { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .heat { font-size: 11px; border-spacing: 2px; } .heat td { min-width: 38px; padding: 6px 2px; } .heat td b { font-size: 12px; }
  table.t { font-size: 12px; }
  .insight .big { font-size: 24px; min-width: 52px; }
  .cards-fill { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards-fill .stack { padding: 10px 12px !important; }
}
@media (max-width: 380px) { .cards-fill { grid-template-columns: 1fr; } }

@media (max-width: 960px) { .grid[style*="minmax(0,1.4fr)"] { grid-template-columns: 1fr !important; } }

/* Formulir dalam kartu: tata ke samping, bukan ke bawah (mencegah ruang kosong besar) */
.card.row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.card.row > .hint-line { flex: 1 1 100%; }
.card.row input:not([type=checkbox]), .card.row select { min-height: 44px; width: 100%; }
/* Thumbnail gagal dimuat */
.thumb.noimg { display: flex; align-items: center; justify-content: center; }
.thumb .ph { font: 800 15px "Baloo 2", Inter, sans-serif; color: var(--muted); text-align: center; padding: 12px; }
/* Tab sederhana */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--orange); }
/* Ringkasan angka besar */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.fact .k { font-size: 12px; color: var(--muted); } .fact .v { font: 800 24px/1.1 "Baloo 2", Inter, sans-serif; } .fact .s { font-size: 12px; color: var(--ink-2); }
/* Daftar ringkas dengan pratinjau */
.mlist { display: flex; flex-direction: column; }
.mitem { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.mitem:first-child { border-top: 0; }
.mitem img, .mitem .noimg { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--sand); display: block; }
.mitem .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem .d { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem:hover .t { color: var(--orange-ink); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; }
.pager [aria-disabled=true] { opacity: .45; pointer-events: none; }

/* ---------- Penyempurnaan tampilan (25 Nov) ---------- */
input[type=date] { padding: 0 10px; }
input[type=file] { padding: 9px 12px; background: #FFFCF8; }
input::placeholder, textarea::placeholder { color: #A8998C; }
.page-head .title p { max-width: 720px; }
/* Tabel responsif: di layar kecil setiap baris menjadi kartu */
@media (max-width: 760px) {
  table.t.resp thead { display: none; }
  table.t.resp, table.t.resp tbody, table.t.resp tr, table.t.resp td { display: block; width: 100%; }
  table.t.resp tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  table.t.resp td { border: 0; padding: 4px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.t.resp td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  table.t.resp td.full { display: block; text-align: left; } table.t.resp td.full::before { display: none; }
  table.t.resp td:empty { display: none; }
}
/* Bilah filter */
.filterbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.filterbar .pills a { min-height: 36px; padding: 0 14px; }
.filterbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filterbar label.field { min-width: 160px; }
@media (max-width: 640px) { .filterbar form, .filterbar label.field { width: 100%; } }
/* Kartu statistik kecil */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--sand-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat span { font-size: 11px; color: var(--muted); } .stat b { font: 800 18px/1.15 "Baloo 2", Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat small { font-size: 11px; color: var(--ink-2); }
.avatar-img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; background: var(--sand); flex: none; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--sand); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.scroll-list { max-height: 520px; overflow: auto; padding-right: 4px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* Label konten */
.lhead, .lrow { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(150px, 1fr) minmax(140px, .9fr) minmax(150px, 1fr); gap: 14px; align-items: center; }
.lhead { padding: 10px 0; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.lrow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.lrow:hover { background: linear-gradient(90deg, transparent, var(--sand-2) 8%, var(--sand-2) 92%, transparent); }
.lmain { display: flex; gap: 12px; align-items: center; min-width: 0; }
.lthumb { width: 56px; flex: none; border-radius: 10px; aspect-ratio: 1 / 1 !important; }
.lthumb .ph { font-size: 10px; padding: 4px; }
.lf span { display: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.lf select, .lf input { min-height: 40px; }
.savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #1F1A17; color: #fff; border-radius: 14px; padding: 10px 12px 10px 16px; margin-top: 14px; box-shadow: 0 10px 24px rgba(31,26,23,.22); }
.savebar .muted { color: #D9CDBF !important; }
@media (max-width: 900px) {
  .lhead { display: none; }
  .lrow { grid-template-columns: 1fr 1fr; }
  .lmain { grid-column: 1 / -1; }
  .lf span { display: block; margin-bottom: 4px; }
  .lf:last-child { grid-column: 1 / -1; }
}
/* Profil audiens */
.persona { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, #0F766E, #14907F); color: #fff; border-radius: 18px; padding: 20px 24px; min-height: 120px; }
.persona p { margin: 8px 0 0; font: 700 clamp(17px, 2vw, 22px)/1.35 "Baloo 2", Inter, sans-serif; max-width: 760px; }
.persona .chip, .persona .badge { background: rgba(255,255,255,.18) !important; color: #fff !important; }
.persona-img { height: 130px; margin: -10px -6px -40px 0; opacity: .95; flex: none; }
@media (max-width: 640px) { .persona-img { height: 90px; } .persona { padding: 16px; } }
.fact { border-top: 4px solid var(--line-2); }
.fact-orange { border-top-color: var(--orange); } .fact-blue { border-top-color: #1458C4; } .fact-green { border-top-color: #0F766E; } .fact-grey { border-top-color: var(--grey); }
.donut { width: 120px; height: 120px; border-radius: 999px; display: grid; place-items: center; flex: none; }
.donut span { width: 74px; height: 74px; border-radius: 999px; background: #fff; display: grid; place-items: center; font: 800 20px "Baloo 2", Inter, sans-serif; }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cols { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 6px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.col-bar { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 3px 3px; overflow: hidden; background: var(--sand); }
.col-bar span { display: block; min-height: 0; }
.col-v { font-size: 11px; font-weight: 700; } .col-l { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stackbar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--sand); }
.stackbar span { display: block; height: 100%; }
.monthnav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.monthnav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.monthnav a:hover { border-color: var(--orange); }
html { scroll-behavior: smooth; }
/* Papan referensi */
.refgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; }
.refcard { padding: 12px; gap: 10px; }
.refframe { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 620px; border-radius: 12px; overflow: hidden; background: #111; }
.refframe.wide { aspect-ratio: 16 / 9; }
.refframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fact { padding: 10px 12px; } .fact .v { font-size: 19px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .tabs a { flex: none; }
  .page-head .row { width: 100%; } .page-head .row .btn, .page-head .row form { flex: 1 1 auto; } .page-head .row form .btn { width: 100%; }
}
/* Petunjuk tabel bisa digeser di layar kecil */
.table-wrap { -webkit-overflow-scrolling: touch; background: linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 24px 100% no-repeat local, linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right / 24px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(31,26,23,.14), transparent) left / 10px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(31,26,23,.14), transparent) right / 10px 100% no-repeat scroll; }

/* Statistik pembanding: 2 × 2, lebih lega */
.stat-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-grid.wide .stat { padding: 12px 14px; gap: 4px; border-radius: 12px; }
.stat-grid.wide .stat b { font-size: 22px; }
.stat-grid.wide .stat small { color: var(--muted); }
.stat small.up { color: var(--good); font-weight: 600; } .stat small.down { color: var(--bad); font-weight: 600; }
/* Catatan kampanye */
.note-form { display: grid; gap: 12px 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
.note-form .c3 { grid-column: span 3; } .note-form .c4 { grid-column: span 4; } .note-form .c5 { grid-column: span 5; } .note-form .c6 { grid-column: span 6; } .note-form .c2 { grid-column: span 2; }
@media (max-width: 900px) { .note-form > * { grid-column: 1 / -1 !important; } }
.tl { display: flex; flex-direction: column; }
.tl-month { font: 700 13px Inter, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 0 6px; }
.tl-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.tl-date { text-align: center; background: var(--orange-soft); border-radius: 12px; padding: 6px 0; color: var(--orange-ink); }
.tl-date b { display: block; font: 800 22px/1 "Baloo 2", Inter, sans-serif; } .tl-date span { font-size: 11px; font-weight: 600; }
/* Profil audiens: susunan dua kolom yang seimbang */
.aud-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 900px) { .aud-grid { grid-template-columns: 1fr; } }
.persona-img { height: 96px; margin: 0 -4px -20px 0; align-self: flex-end; }
