:root {
  --green-900: #062e22;
  --green-800: #0b4f3a;
  --green-700: #14664a;
  --green-600: #1c7a58;
  --green-100: #e6f4ee;
  --green-50: #f2faf6;
  --gold: #c9a227;
  --gold-soft: #f6ecd0;
  --ink: #16211c;
  --ink-2: #3e4d45;
  --muted: #6b7c73;
  --line: #dfe7e2;
  --line-2: #eef3f0;
  --bg: #f5f8f6;
  --white: #fff;
  --red: #b42318;
  --red-bg: #fef3f2;
  --amber: #a15c07;
  --amber-bg: #fffaeb;
  --blue: #175cd3;
  --blue-bg: #eff8ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 8px 24px -12px rgba(16, 40, 30, .18);
  --shadow-sm: 0 1px 2px rgba(16, 40, 30, .08);
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0; }
button { font-family: inherit; }
.muted { color: var(--muted); font-size: 12.5px; }
.w-full { width: 100%; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.login-side {
  background:
    radial-gradient(circle at 82% 12%, rgba(201, 162, 39, .26), transparent 46%),
    linear-gradient(150deg, #062e22, #0b4f3a 58%, #14664a);
  color: #eaf5ef;
  padding: 64px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-side::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -140px;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, .28);
  box-shadow: 0 0 0 60px rgba(201, 162, 39, .05), 0 0 0 120px rgba(201, 162, 39, .04);
}
.brand-mark {
  width: 68px; height: 68px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--gold), #e6c95e);
  color: #24301a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; letter-spacing: .5px;
  box-shadow: 0 10px 26px -10px rgba(201, 162, 39, .8);
  margin-bottom: 26px;
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; font-size: 12px; margin: 0; flex: 0 0 auto; }
.brand-mark.has-logo { background: #fff; box-shadow: 0 10px 26px -10px rgba(16, 40, 30, .38); padding: 0; overflow: hidden; }
.brand-mark.has-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.login-side h1 { font-size: 46px; letter-spacing: -.03em; margin-bottom: 8px; }
.login-sub { font-size: 15.5px; color: #bfe0d0; max-width: 420px; }
.login-org {
  margin-top: 22px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 13.5px; color: #9dc8b5; line-height: 1.7;
}
.login-points {
  margin: 30px 0 0; padding: 0; list-style: none;
  display: grid; gap: 11px;
  font-size: 13.5px; color: #d3eadf;
}
.login-points li { display: flex; gap: 10px; align-items: flex-start; }
.login-points li::before {
  content: "✓";
  color: #0d3b2b;
  background: var(--gold);
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex: 0 0 auto; margin-top: 2px;
}
.login-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: var(--white);
}
.login-card { width: 100%; max-width: 392px; }
.login-card h2 { font-size: 23px; margin-bottom: 4px; }
.login-card > label { display: block; margin-top: 18px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.login-card input {
  width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(28, 122, 88, .13);
}
.login-card .btn { margin-top: 20px; }
.demo-box {
  margin-top: 24px; padding: 14px;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--green-50);
}
.demo-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green-700); margin-bottom: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid #cfe3d9; background: #fff; color: var(--green-800);
  border-radius: 999px; padding: 5px 11px; font-size: 11.5px;
  cursor: pointer; font-weight: 600; transition: all .14s;
}
.chip:hover { background: var(--green-800); color: #fff; border-color: var(--green-800); transform: translateY(-1px); }
.login-alt { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--green-700);
}
.link-btn:hover { text-decoration: underline; }
.login-row { display: flex; gap: 10px; }
.login-row > label { flex: 1; margin-top: 18px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.login-row input { width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; }
.login-row input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(28, 122, 88, .13); }

/* ============ APP SHELL ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 246px; flex: 0 0 246px;
  background: linear-gradient(180deg, #062e22, #0a4534);
  color: #cfe6da;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-head {
  display: flex; gap: 11px; align-items: center;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.side-title { font-weight: 750; font-size: 15px; color: #fff; letter-spacing: -.01em; }
.side-sub { font-size: 10.5px; color: #8fb8a5; letter-spacing: .01em; }
.nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-group {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #6f9d88; padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: #c3ddd0; border: none; background: none;
  width: 100%; text-align: left; font-family: inherit;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--green-600); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.nav-item .ico { width: 17px; text-align: center; font-size: 13px; opacity: .95; }
.nav-item .pill {
  margin-left: auto; background: var(--gold); color: #2a2310;
  font-size: 10px; font-weight: 800; border-radius: 999px;
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.09); }
.side-user { display: flex; gap: 9px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: rgba(201,162,39,.18); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 750; font-size: 12.5px; border: 1px solid rgba(201,162,39,.3);
}
.side-name { font-size: 12.5px; color: #fff; font-weight: 600; line-height: 1.3; }
.side-role { font-size: 10.5px; color: #8fb8a5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 26px; background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.view { padding: 22px 26px 46px; max-width: 1280px; width: 100%; }

/* ============ COMPONENTS ============ */
.btn {
  border: 1px solid transparent; border-radius: 9px;
  padding: 9px 15px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .14s; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.btn-primary { background: var(--green-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #2a2310; }
.btn-gold:hover { background: #d8b13a; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.2); color: #cfe6da; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--green-600); color: var(--green-800); background: var(--green-50); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: #fbd5d1; }
.btn-danger:hover { background: #fee4e2; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h3 { font-size: 14.5px; }
.card-body { padding: 18px; }

.grid { display: grid; gap: 14px; }
.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)); }
.row { display: flex; gap: 10px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: grid; gap: 14px; }

.stat {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 17px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--green-600);
}
.stat.warn::before { background: var(--gold); }
.stat.info::before { background: #3b82f6; }
.stat.danger::before { background: #d92d20; }
.stat-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 27px; font-weight: 750; letter-spacing: -.02em; margin-top: 5px; color: var(--green-900); }
.stat-note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 2px 9px;
  font-size: 11px; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-soft { background: var(--green-50); color: var(--green-800); border-color: #d3e8dd; }
.b-slate { background: #f2f4f7; color: #475467; border-color: #e4e7ec; }
.b-blue { background: var(--blue-bg); color: var(--blue); border-color: #d1e9ff; }
.b-amber { background: var(--amber-bg); color: var(--amber); border-color: #fedf89; }
.b-green { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.b-red { background: var(--red-bg); color: var(--red); border-color: #fecdca; }
.b-gold { background: var(--gold-soft); color: #7a5c00; border-color: #eed9a0; }
.b-purple { background: #f4f3ff; color: #5925dc; border-color: #d9d6fe; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; padding: 9px 12px;
  background: #fafcfb; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafcfb; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.tbl-wrap { overflow-x: auto; }
.td-strong { font-weight: 600; color: var(--green-900); }
.td-sub { font-size: 11.5px; color: var(--muted); }

.field { display: block; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
input.inp, select.inp, textarea.inp {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea.inp { resize: vertical; min-height: 74px; line-height: 1.55; }
input.inp:focus, select.inp:focus, textarea.inp:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(28,122,88,.12);
}
input[readonly].inp { background: #f8faf9; color: var(--muted); }

.alert { border-radius: 9px; padding: 10px 13px; font-size: 12.5px; margin-top: 12px; border: 1px solid; }
.alert-error { background: var(--red-bg); color: var(--red); border-color: #fecdca; }
.alert-ok { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.alert-info { background: var(--blue-bg); color: var(--blue); border-color: #d1e9ff; }
.alert-warn { background: var(--amber-bg); color: var(--amber); border-color: #fedf89; }

.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty .big { font-size: 30px; opacity: .35; margin-bottom: 8px; }

/* ============ MODAL ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(12, 28, 22, .48);
  backdrop-filter: blur(2px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 20px; overflow-y: auto;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 64px -16px rgba(6, 46, 34, .42);
  animation: slideUp .18s ease;
}
.modal.wide { max-width: 760px; }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head {
  padding: 17px 20px; border-bottom: 1px solid var(--line-2);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.modal-head h3 { font-size: 16px; }
.modal-close {
  border: none; background: none; font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { background: #f2f4f7; color: var(--ink); }
.modal-body { padding: 20px; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 9px;
  background: #fbfdfc; border-radius: 0 0 14px 14px;
}

/* toast */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; }
.toast {
  background: var(--green-900); color: #eaf5ef;
  border-radius: 10px; padding: 11px 15px; font-size: 12.8px;
  box-shadow: 0 12px 32px -10px rgba(6,46,34,.5);
  animation: slideIn .2s ease; max-width: 360px;
  border-left: 3px solid var(--gold);
}
.toast.err { background: #7a1d13; border-left-color: #fda29b; }
.toast.ok { border-left-color: #6ce9a6; }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0 } to { transform: none; opacity: 1 } }

/* progress */
.progress { height: 7px; background: #edf2ef; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), #35a97c); border-radius: 999px; transition: width .3s; }

/* timeline */
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 1px; background: var(--line);
}
.tl-dot {
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  border: 2px solid var(--green-600); z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--green-700); font-weight: 800;
}
.tl-dot.done { background: var(--green-600); color: #fff; }
.tl-dot.wait { border-color: #cbd5cf; color: #9aa8a0; }
.tl-dot.rej { border-color: #d92d20; color: #d92d20; }
.tl-body { padding-top: 0; }
.tl-title { font-size: 13px; font-weight: 600; }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* stepper */
.steps { display: flex; gap: 0; margin: 4px 0 18px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--muted); padding-right: 10px;
}
.step .num {
  width: 21px; height: 21px; border-radius: 50%; background: #eef2f0;
  color: #8b9a92; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; flex: 0 0 auto;
}
.step.done .num { background: var(--green-600); color: #fff; }
.step.now .num { background: var(--gold); color: #2a2310; box-shadow: 0 0 0 3px var(--gold-soft); }
.step.now { color: var(--ink); font-weight: 650; }
.step-line { width: 22px; height: 1px; background: var(--line); margin-right: 10px; }

/* letter preview */
.letter {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 34px 38px; font-size: 12.5px; line-height: 1.75;
  font-family: "Times New Roman", Georgia, serif; color: #111;
}
.letter .kop { text-align: center; border-bottom: 3px double #111; padding-bottom: 10px; margin-bottom: 6px; }
.letter .kop .u { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.letter .kop .f { font-size: 13px; font-weight: 700; }
.letter .kop .p { font-size: 11px; }
.letter .kop .a { font-size: 9.5px; font-style: italic; }
.letter h4 { text-align: center; font-size: 13px; text-decoration: underline; margin: 16px 0 2px; font-family: inherit; }
.letter .nomor { text-align: center; font-size: 12px; margin-bottom: 16px; }
.letter .ttd { margin-top: 30px; display: flex; justify-content: flex-end; }
.letter .ttd > div { text-align: center; }

.kv { display: grid; grid-template-columns: 132px 1fr; gap: 7px 14px; font-size: 12.8px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; font-weight: 600; }

.hero {
  background:
    radial-gradient(circle at 88% -30%, rgba(201,162,39,.35), transparent 55%),
    linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #eaf5ef; border-radius: var(--radius); padding: 22px 24px;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  flex-wrap: wrap;
}
.hero h2 { color: #fff; font-size: 21px; }
.hero .muted { color: #a9cfbd; }
.hero-side { text-align: right; }
.hero-num { font-size: 30px; font-weight: 750; color: var(--gold); letter-spacing: -.02em; line-height: 1; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  border: none; background: none; padding: 9px 13px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  font-family: inherit; margin-bottom: -1px;
}
.tab:hover { color: var(--green-800); }
.tab.active { color: var(--green-800); border-bottom-color: var(--green-700); }

@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 880px) {
  /* ---- login ---- */
  .login-wrap { grid-template-columns: 1fr; min-height: 100dvh; }
  .login-side { padding: 38px 24px; }
  .login-side h1 { font-size: 32px; }
  .login-side::after { display: none; }
  .login-points { display: none; }
  .login-panel { padding: 26px 20px calc(40px + env(safe-area-inset-bottom)); align-items: flex-start; }
  .login-card { max-width: 440px; }
  .demo-chips { gap: 7px; }
  .chip { padding: 7px 13px; font-size: 12px; }

  /* ---- shell ---- */
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head foot" "nav nav";
    padding-top: env(safe-area-inset-top);
  }
  .side-head { grid-area: head; padding: 10px 14px; border-bottom: none; min-width: 0; }
  .side-sub { display: none; }
  .side-foot {
    grid-area: foot; border-top: none; padding: 8px 12px;
    display: flex; align-items: center; justify-content: flex-end;
  }
  .side-user { margin-bottom: 0; min-width: 0; }
  .side-role { display: none; }
  .side-name { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot .btn { width: auto; padding: 7px 12px; font-size: 12px; }
  .nav {
    grid-area: nav;
    display: flex; gap: 4px;
    overflow-x: auto; overflow-y: hidden;
    padding: 2px 10px 10px;
    border-top: 1px solid rgba(255,255,255,.09);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group { display: none; }
  .nav-item {
    white-space: nowrap; width: auto; flex: 0 0 auto;
    padding: 9px 13px; min-height: 42px;
  }

  .topbar { padding: 10px 14px; gap: 10px; }
  .crumb { font-size: 15px; }
  .page-sub { display: none; }
  .topbar-right .badge { font-size: 10.5px; }

  /* ---- layout ---- */
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .view { padding: 14px 12px calc(36px + env(safe-area-inset-bottom)); }
  .kv { grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); }
  .row, .row-between { flex-wrap: wrap; }
  .hero { padding: 16px 18px; gap: 12px; }
  .hero h2 { font-size: 18px; }
  .hero-num { font-size: 25px; }
  .card-head { padding: 13px 14px; flex-wrap: wrap; }
  .card-body, .card-pad { padding: 14px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 24px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex: 0 0 auto; }
  .tbl-wrap {
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  table.tbl { width: max-content; min-width: 100%; font-size: 12.2px; }
  table.tbl th { padding: 8px 10px; white-space: nowrap; }
  table.tbl td { padding: 9px 10px; max-width: 200px; }
  .letter { padding: 20px 16px; overflow-x: auto; }

  /* ---- sentuh & iOS ---- */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 32px; }
  .login-card input, input.inp, select.inp, textarea.inp { font-size: 16px; }
  .modal-close { min-width: 44px; min-height: 44px; font-size: 24px; }

  /* ---- modal jadi layar penuh ---- */
  .overlay { padding: 0; align-items: stretch; }
  .modal {
    max-width: none; min-height: 100%; border-radius: 0;
    display: flex; flex-direction: column;
    animation: fadeIn .15s ease;
  }
  .modal.wide { max-width: none; }
  .modal-body { flex: 1; padding: 16px; }
  .modal-foot {
    border-radius: 0; position: sticky; bottom: 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  /* ---- toast ---- */
  .toast-root {
    left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .toast { max-width: none; }
}
@media (max-width: 420px) {
  .side-name { display: none; }
  .hero-num { font-size: 22px; }
  .stat-value { font-size: 22px; }
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app { display: block; }
  .view { padding: 0; }
  body { background: #fff; }
  .letter { border: none; padding: 0; }
}

/* ============ PROFIL ============ */
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head h3 { margin: 0 0 2px; }
.avatar-lg { width: 58px; height: 58px; border-radius: 16px; font-size: 19px; background: var(--green-100); color: var(--green-700); border-color: rgba(28,122,88,.25); }
.profile-rows { margin-top: 18px; border-top: 1px solid var(--line-2); }
.profile-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.profile-row span { color: var(--muted); }
.profile-row strong { font-weight: 650; text-align: right; }

