/* V4 Konsol Rapi — ditingkatkan: sidebar desktop, bottom-nav mobile,
   kartu bersih, fokus jelas, ukuran sentuh ≥44px, aman notch. */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #111827;
  --mut: #6b7280;
  --line: #e5e7eb;
  --acc: #0d7a4f;        /* hijau logo */
  --acc-d: #0a5f3e;
  --acc-soft: #e7f3ed;
  --amber: #b7791f;
  --amber-soft: #fdf1d7;
  --red: #c03636;
  --side: #111827;
  --side-ink: #d1d5db;
  --r: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .07);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}
.shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar (desktop) ---------- */
.side {
  width: 248px; flex-shrink: 0; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  padding: 18px 14px; gap: 6px;
}
.side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.side-brand img { height: 40px; width: 40px; border-radius: 10px; object-fit: cover; background: #fff; }
.side-brand b { font-size: 13px; line-height: 1.3; display: block; color: #fff; }
.side-brand span { font-size: 11px; color: #9ca3af; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav button {
  background: transparent; color: var(--side-ink); border: 0; border-radius: 8px;
  padding: 11px 12px; font-size: 13.5px; font-weight: 600; text-align: left;
  cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%;
}
.side-nav button:hover { background: #1f2937; }
.side-nav button.on { background: var(--acc); color: #fff; }
.side-nav .ic { width: 18px; text-align: center; }
.side-user { font-size: 12px; color: #9ca3af; padding: 10px 8px; border-top: 1px solid #1f2937; }
.overlay { display: none; }

/* ---------- Topbar ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 800; }
.sp { flex: 1; }
.who { font-size: 12.5px; }
.iconbtn {
  display: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; width: 42px; height: 42px; font-size: 18px; cursor: pointer;
}
.content { padding: 22px 24px 90px; max-width: 1100px; width: 100%; margin: 0 auto; }

/* ---------- Kartu & kontrol ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.note-line { background: var(--acc-soft); color: var(--acc-d); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 8px; }
label { font-size: 12px; font-weight: 700; color: #374151; display: block; margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: var(--acc); }
textarea { min-height: 120px; resize: vertical; }
textarea.short { min-height: 64px; }
.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: 14px; align-items: start; }
.wfit { max-width: 230px; }

button {
  background: var(--acc); color: #fff; border: 0; border-radius: 9px;
  padding: 11px 18px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
  min-height: 42px;
}
button:hover { background: var(--acc-d); }
button:disabled { opacity: .55; cursor: default; }
button.ghost { background: var(--acc-soft); color: var(--acc-d); }
button.ghost:hover { background: #d7ebe1; }
button.danger { background: var(--red); }
button.small { padding: 8px 14px; min-height: 38px; font-size: 13px; }
button.block { width: 100%; }
button.linklike { background: none; color: var(--acc); padding: 8px 0; min-height: 36px; }

/* ---------- Badge & status ---------- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--acc-soft); color: var(--acc-d); }
.badge.green { background: #dcfae6; color: #067647; }
.badge.gold { background: var(--amber-soft); color: var(--amber); }
.badge.grey { background: #eef0f2; color: var(--mut); }
.muted { color: var(--mut); font-size: 13px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; }
.ok { color: var(--acc); font-size: 13px; margin-top: 8px; }
.hidden { display: none !important; }
img.att { max-width: 100%; border-radius: 10px; margin-top: 10px; border: 1px solid var(--line); }

/* ---------- KPI & list ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi small { color: var(--mut); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; display: block; }
.kpi b { font-size: 22px; font-weight: 800; }
.listrow { display: flex; gap: 10px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.listrow:first-of-type { border-top: 0; }
.listrow .grow { flex: 1; min-width: 140px; }
.listrow a { color: var(--ink); text-decoration: none; font-weight: 600; }
.listrow a:hover { color: var(--acc); }

/* ---------- Timeline ---------- */
.timeline { border-left: 3px solid var(--acc-soft); margin: 10px 0 0 6px; padding-left: 16px; }
.timeline div { margin-bottom: 10px; font-size: 13px; position: relative; }
.timeline div::before { content: ""; position: absolute; left: -21px; top: 4px; width: 8px; height: 8px; background: var(--acc); border-radius: 50%; }

/* ---------- Auth ---------- */
.authwrap { max-width: 420px; margin: 40px auto; }
.authcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.authcard h2 { margin: 8px 0 4px; font-size: 20px; font-weight: 800; }
.authcard.center { text-align: center; }
.authlogo { height: 64px; width: 64px; border-radius: 14px; object-fit: cover; }
.authcard hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- Bottom nav (mobile) ---------- */
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottomnav button {
  flex: 1; background: none; border: 0; color: var(--mut); min-height: 56px;
  font-size: 11px; font-weight: 700; border-radius: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 8px 2px;
}
.bottomnav button .ic { font-size: 19px; }
.bottomnav button.on { color: var(--acc); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .side {
    position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .side.open { transform: translateX(0); }
  .overlay { display: block; position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 35; }
  .iconbtn { display: inline-flex; align-items: center; justify-content: center; }
  .content { padding: 16px 14px 110px; }
  .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: 400px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
