/* CornSmart — sistem tampilan
   Konsep: "buku lapangan" — kertas kulit jagung hijau muda, tinta hijau hutan, aksen biji jagung.
   Sidebar gelap di desktop, bilah navigasi bawah di ponsel. */
:root {
  /* Palet hijau–putih: putih bersih, hijau daun sebagai warna utama, hijau muda sebagai aksen. */
  --bg: #F5F9F6;
  --surface: #FFFFFF;
  --surface-2: #EDF5EF;
  --ink: #13301F;
  --muted: #5A6E60;
  --line: #DCE8DF;
  --forest: #17553A;
  --forest-ink: #17553A;
  --forest-2: #1F6E4A;
  --on-forest: #FFFFFF;
  --on-forest-muted: #BFDCC9;
  --kernel: #2E9D5E;
  --on-kernel: #FFFFFF;
  --kernel-ink: #1B6B40;
  --kernel-soft: #E2F3E7;
  --mint: #C9F0D6;
  --good: #2E7D4F;  --good-soft: #E1F2E6;
  --warn: #A86A12;  --warn-soft: #FBF1DD;
  --bad: #B03F2B;   --bad-soft: #F8E4DE;
  --info: #2D6A73;  --info-soft: #E3F1F2;
  --grain: #C3D6C8;
  --shadow: 0 1px 2px rgba(19, 48, 31, .05), 0 8px 24px -12px rgba(19, 48, 31, .16);
  --radius: 18px;
  --radius-sm: 12px;
  --f-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { font-family: var(--f-display); letter-spacing: -.02em; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--forest-ink); }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--kernel); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--forest); color: var(--on-forest); padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; }
.brand b { font-family: var(--f-display); font-size: 19px; display: block; letter-spacing: -.02em; }
.brand small { color: var(--on-forest-muted); font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 0;
  background: transparent; color: var(--on-forest-muted); cursor: pointer; text-align: left; font-weight: 600; font-size: 14px;
}
.nav button:hover { background: rgba(255,255,255,.07); color: var(--on-forest); }
.nav button.on { background: #FFFFFF; color: var(--forest); }
.side .who { margin-top: auto; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 8px; }
.who .name { font-weight: 700; font-size: 14px; }
.who .role { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-forest-muted); }
.who button { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--on-forest); border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.main { min-width: 0; padding: 28px clamp(16px, 3.5vw, 40px) 48px; max-width: 1180px; width: 100%; }
.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
    background: var(--forest); color: var(--on-forest); padding: 10px 16px;
  }
  .topbar .brand img { width: 34px; height: 34px; }
  .topbar .brand b { font-size: 16px; }
  .topbar button { border: 0; background: rgba(255,255,255,.1); color: var(--on-forest); border-radius: 10px; padding: 8px; display: flex; cursor: pointer; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 10px; }
  .tabbar button.on { color: var(--forest-ink); background: var(--surface-2); }
  .main { padding: 18px 16px 96px; }
}

/* ---------- type & layout helpers ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(26px, 3.2vw, 34px); }
.eyebrow { font: 700 11.5px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lead { color: var(--muted); max-width: 62ch; margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 0; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.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)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
@media (max-width: 1020px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: var(--f-mono); font-size: .92em; }
.num { font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.pad-lg { padding: 26px; }
.card h3 { font-size: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tile .val { font: 700 28px/1.05 var(--f-display); letter-spacing: -.03em; }
.tile .val small { font: 600 13px var(--f-body); color: var(--muted); letter-spacing: 0; }
.tile .lab { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tile .lab .ic { color: var(--forest-ink); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: transform .12s, background .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--forest); color: var(--on-forest); }
.btn.primary:hover { background: var(--forest-2); }
.btn.accent { background: var(--kernel); color: var(--on-kernel); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--surface); border-color: var(--bad-soft); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.block { width: 100%; }
label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
label.f .hint { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.input {
  height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--forest-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kernel) 35%, transparent); }
.req { color: var(--bad); }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + label { outline: 2px solid var(--kernel); }
.hara-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; }
@media (max-width: 520px) { .hara-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.pill.sig { background: var(--good); color: #fff; }
.pill.ink { background: #1b1f1c; color: #fff; }
.pill.kernel { background: var(--kernel-soft); color: var(--kernel-ink); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; overflow-x: auto; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.hl td { background: color-mix(in srgb, var(--kernel-soft) 70%, transparent); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art {
  background: var(--forest); color: var(--on-forest); padding: 48px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden;
}
.auth-art h1 { font-size: clamp(34px, 4.4vw, 56px); max-width: 13ch; }
.auth-art h1 em { font-style: normal; color: var(--mint); }
.auth-art p { color: var(--on-forest-muted); max-width: 44ch; }
.auth-art .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 520px; }
.auth-art .facts div { border-top: 1px solid rgba(255,255,255,.2); padding-top: 10px; }
.auth-art .facts b { font: 700 26px/1 var(--f-display); display: block; color: var(--on-forest); }
.auth-art .facts span { font-size: 12px; color: var(--on-forest-muted); }
.cob { position: absolute; right: -40px; top: 40px; opacity: .16; pointer-events: none; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-form .box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.role-pick { display: flex; flex-direction: column; gap: 10px; }
.role-pick button {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; text-align: left; transition: border-color .15s, transform .15s;
}
.role-pick button:hover { border-color: var(--forest-2); transform: translateY(-1px); }
.role-pick .ri { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--forest-ink); }
.role-pick b { display: block; font-size: 15px; }
.role-pick span { font-size: 13px; color: var(--muted); }
.demo { font-size: 12.5px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; color: var(--muted); }
@media (max-width: 880px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 32px 20px; }
  .auth-art .facts { display: none; }
}

/* ---------- hasil analisis ---------- */
.hero {
  background: var(--forest); color: var(--on-forest); border-radius: 24px; padding: clamp(20px, 3vw, 32px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center;
}
.hero .eyebrow { color: var(--on-forest-muted); }
.hero h2 { font-size: clamp(30px, 4vw, 46px); margin: 8px 0 10px; }
.hero h2 em { font-style: normal; color: var(--mint); }
.hero p { color: var(--on-forest-muted); max-width: 52ch; }
.hero p b { color: var(--on-forest); }
@media (max-width: 880px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.waffle { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; max-width: 270px; width: 100%; margin-left: auto; }
.waffle i { aspect-ratio: 3 / 4; border-radius: 45% 45% 40% 40%; background: rgba(255,255,255,.10); display: block; }
.waffle i.k0 { background: #FFFFFF; }
.waffle i.k1 { background: #7CCB98; }
.waffle i.k2 { background: #3F9463; }
@media (max-width: 880px) { .waffle { margin: 0; max-width: 220px; } }
.legend { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 11px; height: 14px; border-radius: 45% 45% 40% 40%; display: inline-block; flex-shrink: 0; }
.legend b { margin-left: auto; font-family: var(--f-mono); font-weight: 600; }
.waffle-box { display: flex; flex-direction: column; align-items: flex-end; }
@media (max-width: 880px) { .waffle-box { align-items: flex-start; } }
.waffle-box .legend { width: 100%; max-width: 300px; }

.contrib { display: flex; flex-direction: column; gap: 12px; }
.contrib .cr { display: grid; grid-template-columns: 150px minmax(0, 1fr) 76px; gap: 12px; align-items: center; font-size: 14px; }
.contrib .axis { position: relative; height: 22px; background: var(--surface-2); border-radius: 6px; }
.contrib .axis::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--grain); }
.contrib .bar { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; }
.contrib .bar.pos { background: var(--good); }
.contrib .bar.neg { background: var(--bad); }
.contrib .v { text-align: right; font-family: var(--f-mono); font-weight: 600; font-size: 13px; }
.contrib .sum { border-top: 1px dashed var(--line); padding-top: 12px; font-weight: 700; }
@media (max-width: 560px) { .contrib .cr { grid-template-columns: 96px minmax(0, 1fr) 62px; font-size: 13px; } }

.big-pred { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big-pred .n { font: 800 clamp(44px, 6vw, 64px)/1 var(--f-display); letter-spacing: -.04em; color: var(--forest-ink); }
.big-pred .u { font-weight: 700; color: var(--muted); }
.strip { position: relative; height: 54px; margin-top: 8px; }
.strip .base { position: absolute; left: 0; right: 0; top: 26px; height: 2px; background: var(--line); }
.strip .d { position: absolute; top: 21px; width: 12px; height: 12px; border-radius: 50%; background: var(--grain); transform: translateX(-50%); border: 2px solid var(--surface); }
.strip .me { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.strip .me span { font-size: 11px; font-weight: 800; background: var(--kernel); color: var(--on-kernel); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.strip .me i { width: 16px; height: 16px; border-radius: 50%; background: var(--kernel); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--kernel-ink); margin-top: 1px; }
.strip .band { position: absolute; top: 22px; height: 10px; background: color-mix(in srgb, var(--kernel) 30%, transparent); border-radius: 6px; }
.strip-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-family: var(--f-mono); }

.rec { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.rec .idx { width: 44px; height: 44px; border-radius: 14px; background: var(--kernel-soft); color: var(--kernel-ink); display: grid; place-items: center; font: 800 18px var(--f-display); }
.rec h3 { font-size: 20px; margin-bottom: 4px; }
.rec .why { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
@media (max-width: 560px) { .rec { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.callout { border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.callout.good { background: var(--good-soft); color: var(--ink); } .callout.good > .ic { color: var(--good); }
.callout.warn { background: var(--warn-soft); color: var(--ink); } .callout.warn > .ic { color: var(--warn); }
.callout.info { background: var(--info-soft); color: var(--ink); } .callout.info > .ic { color: var(--info); }
.callout.kernel { background: var(--kernel-soft); color: var(--ink); } .callout.kernel > .ic { color: var(--kernel-ink); }
.callout ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.meter { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; background: var(--forest-2); border-radius: 6px; }
.meter i.best { background: var(--kernel); }
.dose { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dose > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.dose .nm { font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dose .kg { font: 800 26px/1.1 var(--f-display); letter-spacing: -.03em; }
.dose .kg small { font: 600 12.5px var(--f-body); color: var(--muted); }
@media (max-width: 640px) { .dose { grid-template-columns: minmax(0, 1fr); } }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; font-size: 14px; }
.timeline li b { font-family: var(--f-mono); font-size: 12.5px; color: var(--forest-ink); padding-top: 1px; }

/* ---------- lahan card ---------- */
.lahan { display: flex; flex-direction: column; gap: 14px; }
.lahan .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lahan h3 { font-size: 19px; }
.lahan .meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lahan .meta div { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.lahan .meta span { display: block; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lahan .meta b { font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lahan .acts { display: flex; gap: 8px; }
.lahan .acts .btn:first-child { flex: 1; }
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ic { width: 34px; height: 34px; color: var(--muted); }

/* ---------- list rows ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.li:first-child { border-top: 0; padding-top: 0; }
.li .t { font-weight: 700; }

/* ---------- chart ---------- */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 600 11px var(--f-body); }
.chart .bar { fill: var(--forest-2); }
.chart .bar.last { fill: var(--kernel); }
.chart .grid { stroke: var(--line); }
.chart .vl { fill: var(--ink); font: 700 12px var(--f-mono); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 18, 12, .5); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 440px; padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h3 { font-size: 20px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#toasts { position: fixed; top: 16px; right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); animation: tin .25s ease; }
.toast.error { background: var(--bad); color: #fff; }
.toast.warn { background: var(--warn); color: #fff; }
@keyframes tin { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; background: var(--surface-2); }
.drop:hover { border-color: var(--forest-2); }
.bars-h { display: flex; flex-direction: column; gap: 10px; }
.bars-h .bh { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 14px; }
.bars-h .bh .meter { height: 12px; }
.bars-h .bh b { text-align: right; font-family: var(--f-mono); font-size: 13px; }
@media (max-width: 560px) { .bars-h .bh { grid-template-columns: 100px minmax(0, 1fr) 54px; } }
.foot-note { font-size: 12.5px; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; align-items: center; }
.insight { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
@media (max-width: 880px) { .split, .split-r { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .insight { grid-template-columns: minmax(0, 1fr); } }

/* tabel indikator: batang ΔR² di dalam tabel, legenda warna status */
.dr2 { display: grid; grid-template-columns: minmax(80px, 1fr) 52px; gap: 10px; align-items: center; }
.dr2 .meter { height: 10px; }
.dr2 b { text-align: right; font-size: 13px; }
.legend-ind { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend-ind > span { display: inline-flex; gap: 6px; align-items: center; }
.sub-h { margin: 22px 0 10px; font-size: 15px; }

.tbl td.nw { white-space: nowrap; }

/* kolom Keterangan: latar belakang mengikuti warna status */
.ket { display: inline-block; padding: 4px 10px; border-radius: 8px; font-weight: 600; line-height: 1.4; }
.ket.sig { background: var(--good); color: #fff; }
.ket.good { background: var(--good-soft); color: var(--good); }
.ket.ink { background: #1b1f1c; color: #fff; font-weight: 500; }
