/* app.css — Gaya mobile-first untuk layar 5–6 inci (F-kegunaan). */
:root {
  --bk-green: #0e7490;        /* cyan-700 (warna utama) */
  --bk-green-dark: #155e75;   /* cyan-800 */
  --bk-gold: #22d3ee;         /* cyan-400 (aksen terang) */
  --bg: #eef5f7;
  --card: #ffffff;
  --text: #1a1f1c;
  --muted: #6b7772;
  --border: #d8e0dc;
  --danger: #c0392b;
  --warn: #b8860b;
  --radius: 12px;
  --tap: 52px; /* tinggi target sentuh */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 17px; line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}

/* App bar */
.app-bar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bk-green); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  background: var(--bk-gold); color: var(--bk-green-dark);
  font-weight: 800; width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center; font-size: 15px;
}
.app-bar .title { font-weight: 700; font-size: 15px; }
.app-bar .subtitle { font-size: 12px; opacity: .85; }
.bar-right { display: flex; align-items: center; gap: 8px; }
.net-badge { font-size: 12px; padding: 3px 8px; border-radius: 20px; background: rgba(255,255,255,.15); }
.net-badge.on { color: #a5f3fc; }
.net-badge.off { color: #ffd27f; }
.save-ind { font-size: 12px; opacity: 0; transition: opacity .2s; color: #a5f3fc; }
.save-ind.show { opacity: 1; }

/* Layout */
.screen { max-width: 640px; margin: 0 auto; padding: 16px; }
h2 { font-size: 19px; margin: 14px 0 10px; }

/* Buttons */
button {
  font: inherit; cursor: pointer; border: none; border-radius: var(--radius);
  min-height: var(--tap); padding: 0 18px; font-weight: 600;
}
button.primary { background: var(--bk-green); color: #fff; }
button.primary:active { background: var(--bk-green-dark); }
button.secondary { background: #fff; color: var(--bk-green); border: 1.5px solid var(--bk-green); }
button.ghost { background: transparent; color: var(--muted); }
button.big { width: 100%; font-size: 18px; margin: 8px 0; }

/* User strip */
.user-strip { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.user-strip button { min-height: 40px; }

/* Stat strip */
.stat-strip { display: flex; gap: 8px; margin-bottom: 12px; }
.stat {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; text-align: center;
}
.stat .n { display: block; font-size: 22px; font-weight: 800; color: var(--bk-green); }
.stat .l { font-size: 11px; color: var(--muted); }

/* Responden list */
.resp-list { list-style: none; padding: 0; margin: 0; }
.resp-row {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.resp-head { display: flex; justify-content: space-between; align-items: center; }
.resp-actions { display: flex; gap: 8px; margin-top: 10px; }
.resp-actions .mini { flex: 1; min-height: 44px; font-size: 14px; padding: 0 8px; background: #fff; color: var(--bk-green); border: 1.5px solid var(--border); }
.resp-actions .mini.primary { background: var(--bk-green); color: #fff; border-color: var(--bk-green); }
.resp-actions .mini.danger { color: var(--danger); border-color: #f0c6c0; }

/* Laporan detail */
.rep-head { display: flex; align-items: center; gap: 10px; }
.rep-head h2 { margin: 0; display: inline; }
.rep-sec { margin-top: 14px; }
.rep-sec h3 { font-size: 15px; color: var(--bk-green); border-left: 3px solid var(--bk-gold); padding-left: 8px; margin: 10px 0 6px; }
.rep-row { padding: 8px 0; border-bottom: 1px solid #eef1ef; }
.rep-q { font-size: 14px; color: #333; }
.rep-a { font-weight: 600; margin-top: 2px; }
.status-pill, .status-pill.s-draf { font-size: 11px; padding: 2px 8px; border-radius: 20px; margin-left: 8px; background: #eee; color: #555; }
.status-pill.s-terkirim { background: #d9ecff; color: #1a5f9e; }
.status-pill.s-disetujui { background: #d6f5e0; color: #1d7a42; }
.status-pill.s-dikembalikan { background: #ffe3d1; color: #b25a1e; }
.status-pill.s-dihentikan { background: #fde0e0; color: #a33; }

/* Form */
.form-top { position: sticky; top: 58px; background: var(--bg); padding: 10px 0 8px; z-index: 5; }
.crumb { font-size: 13px; color: var(--muted); font-weight: 600; }
.progress { height: 6px; background: #e3e9e6; border-radius: 20px; overflow: hidden; margin: 6px 0; }
.progress .bar { height: 100%; background: var(--bk-gold); transition: width .3s; }
.sec-title { font-weight: 700; font-size: 15px; }

/* Item */
.item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.item-code { font-size: 11px; font-weight: 700; color: var(--bk-green); background: #def2f8; padding: 2px 7px; border-radius: 6px; }
.badge-review { font-size: 10px; background: #fff3cd; color: #8a6d00; padding: 2px 6px; border-radius: 6px; }
.item-label { display: block; font-weight: 600; margin-bottom: 8px; }
.item-label .req { color: var(--danger); }
.item-help { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.hint.lock { color: var(--bk-green); }

/* Options */
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px;
  min-height: var(--tap); cursor: pointer;
}
.opt input { width: 22px; height: 22px; accent-color: var(--bk-green); flex: none; }
.opt:has(input:checked) { border-color: var(--bk-green); background: #e0f7fa; }
.opt-exclusive { border-style: dashed; }

/* Inputs */
input.num, input.txt, textarea.txt, input[type=date], .txt-other, input[type=text], input[type=number] {
  width: 100%; min-height: var(--tap); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff;
}
textarea.txt { min-height: 72px; resize: vertical; }
.txt-other { margin-top: 8px; }
.other-wrap { margin-top: 4px; }
.special-vals { margin-top: 8px; display: flex; gap: 8px; }
.chip { background: #e0f7fa; color: var(--bk-green); min-height: 40px; padding: 0 12px; font-size: 14px; }

/* Mini table (WORK_01) */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table td { padding: 6px 4px; border-bottom: 1px solid var(--border); }
.mini-table td:first-child { font-size: 14px; }
.mini-table input.num { max-width: 90px; }

/* GPS */
.gps-val { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Help card button */
.help-card-btn { background: var(--bk-gold); color: #06384a; min-height: 44px; margin-bottom: 10px; font-size: 14px; }

/* Errors */
.item-errors { margin-top: 8px; }
.err { color: var(--danger); font-size: 13px; }
.unsupported { color: var(--danger); font-size: 13px; }

/* Nav bar */
.nav-bar {
  position: sticky; bottom: 0; display: flex; gap: 8px;
  background: var(--bg); padding: 12px 0; margin-top: 8px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.nav-bar button { flex: 1; }
.nav-bar .ghost { flex: 0 0 auto; }

/* Stopped / modal / toast */
.stopped-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.muted { color: var(--muted); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal.show { display: flex; }
.help-inner { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
.help-inner h2 { margin-top: 0; color: var(--bk-green); }
.help-inner ul { list-style: none; padding: 0; font-size: 18px; }
.help-inner li { padding: 10px 12px; border-bottom: 1px solid var(--border); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #222; color: #fff; padding: 12px 18px; border-radius: 24px;
  font-size: 14px; opacity: 0; transition: all .25s; z-index: 60; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
