/* Insightra Field App — screen components */
.scr { padding: 8px 20px 28px; }
.scr-head { padding: 6px 0 16px; }
.scr-head .hi { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.scr-head h1 { margin: 2px 0 0; font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.scr-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.scr-title h2 { margin: 0; font-size: 16px; font-weight: 700; }
.scr-title a, .scr-title button { font-size: 12.5px; font-weight: 600; color: var(--brand-text); }

.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.m-card.pad { padding: 16px; }

/* Points ring (signature) ---------------------------------- */
.points-hero {
  background: var(--brand); color: #fff; border-radius: 22px; padding: 22px;
  display: flex; align-items: center; gap: 20px; margin-bottom: 16px;
}
.ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-num {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600;
}
.ring .ring-num b { font-size: 26px; letter-spacing: -0.02em; line-height: 1; }
.ring .ring-num span { font-size: 9.5px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px; }
.points-hero .ph-side .ph-label { font-size: 12px; color: rgba(255,255,255,0.6); }
.points-hero .ph-side .ph-rank { font-size: 19px; font-weight: 700; margin: 2px 0 8px; }
.points-hero .ph-side .ph-meta { font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.5; }

/* Stat row ------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 13px 12px; }
.stat .s-num { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.stat .s-num.brand { color: var(--brand); }
.stat .s-label { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* Task / list cards ---------------------------------------- */
.t-card { display: flex; gap: 13px; align-items: center; padding: 14px; margin-bottom: 11px; }
.t-pin { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.t-time { width: 52px; flex-shrink: 0; text-align: center; }
.t-time b { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--brand-text); display: block; }
/* Severity (traffic-light) — Must Visit / Potential / Observe */
.sv-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.sv-must { background: #FBE4E2; color: #B23A30; }
.sv-pot { background: var(--warn-bg); color: var(--warn-fg); }
.sv-obs { background: var(--ok-bg); color: var(--ok-fg); }
.sv-filter { display: flex; gap: 7px; margin-bottom: 14px; overflow-x: auto; }
.sv-chip { flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sv-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.day-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 10px; }
.day-head span:first-child { font-size: 13px; font-weight: 700; }
.day-head .day-count { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.t-main { flex: 1; min-width: 0; }
.t-main .t-name { font-weight: 700; font-size: 14px; }
.t-main .t-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.t-score { font-family: var(--font-mono); font-weight: 600; font-size: 14px; flex-shrink: 0; }

.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }

/* Badges / recognition (SOW #6) */
.badge-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px 10px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.badge .b-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; }
.badge.gold .b-ic { background: var(--brand-soft); color: var(--brand); }
.badge .b-txt b { font-size: 16px; display: block; } .badge .b-txt span { font-size: 11px; color: var(--ink-3); }
.pt-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--border); }
.pt-row:first-child { border-top: none; }
.pt-act { font-size: 13px; font-weight: 600; } .pt-at { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.pt-pts { font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--brand-text); }

/* Forms ---------------------------------------------------- */
.f-group { margin-bottom: 16px; }
.f-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; display: block; }
.m-field {
  width: 100%; min-height: 44px; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  font-size: 14px; color: var(--ink); outline: none;
}
textarea.m-field { resize: none; line-height: 1.5; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all var(--duration) var(--ease);
}
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg button.on.ok { background: var(--ok-fg); border-color: var(--ok-fg); }
.seg button.on.no { background: var(--brand); border-color: var(--brand); }

.photo-tile {
  width: 100%; aspect-ratio: 16/10; border-radius: 14px; border: 1.5px dashed var(--border-strong);
  background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3);
  text-align: center; gap: 6px; cursor: pointer;
}
.photo-tile.filled { border-style: solid; border-color: var(--ok-fg); background: var(--ok-bg); color: var(--ok-fg); }

.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.photo-slot { aspect-ratio: 1/1; border-radius: 12px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--ink-3); font-size: 11px; font-weight: 600; cursor: pointer; }
.photo-slot.filled { border-style: solid; border-color: var(--ok-fg); background: var(--ok-bg); color: var(--ok-fg); }
.photo-slot.filled::after { content: "✓"; position: absolute; }

select.m-field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23797B80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.gps-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--ok-bg); color: var(--ok-fg); font-size: 12.5px; font-weight: 600;
}

.m-btn {
  width: 100%; height: 50px; border-radius: 14px; background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.m-btn:disabled { background: var(--surface-3); color: var(--ink-faint); }
.m-btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }

/* Login ---------------------------------------------------- */
.login { height: 100%; display: flex; flex-direction: column; padding: 40px 26px 30px; }
.login .login-logo { height: 54px; width: auto; align-self: flex-start; display: block; margin-bottom: 26px; }
.login h1 { margin: 0 0 4px; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.login p.lead { margin: 0 0 36px; color: var(--ink-3); font-size: 14px; }
.login .spacer { flex: 1; }
.login .legal { text-align: center; font-size: 11px; color: var(--ink-faint); margin-top: 16px; }

/* Reward sheet --------------------------------------------- */
.reward { text-align: center; padding: 8px 4px 4px; }
.reward .reward-badge {
  width: 72px; height: 72px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.reward h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.reward .reward-pts { font-family: var(--font-mono); font-size: 40px; font-weight: 600; color: var(--brand); letter-spacing: -0.02em; margin: 8px 0; }
.reward .reward-lines { text-align: left; background: var(--surface-2); border-radius: 14px; padding: 14px; margin: 16px 0 20px; }
.reward .reward-lines .rl { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.reward .reward-lines .rl .mono { font-weight: 600; }

/* Leaderboard ---------------------------------------------- */
.lb-row { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-top: 1px solid var(--border); }
.lb-row:first-child { border-top: none; }
.lb-row.me { background: var(--brand-soft); border-radius: 12px; border-top: none; }
.lb-rank { width: 26px; font-family: var(--font-mono); font-weight: 600; text-align: center; color: var(--ink-3); }
.lb-rank.top { color: var(--brand); }
.lb-main { flex: 1; min-width: 0; }
.lb-name { font-weight: 700; font-size: 14px; }
.lb-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.lb-pts { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }

.note-box { background: var(--warn-bg); color: var(--warn-fg); border-radius: 12px; padding: 13px 14px; font-size: 12.5px; font-weight: 500; display: flex; gap: 9px; align-items: flex-start; }

/* Reward catalog (peringkat) ------------------------------- */
.scr-title .reward-hint { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.reward-row {
  display: flex; gap: 11px; overflow-x: auto; margin: 0 -20px 24px; padding: 2px 20px 4px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.reward-row::-webkit-scrollbar { display: none; }
.reward-card {
  flex: 0 0 138px; scroll-snap-align: start; text-align: left; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.reward-card:active { transform: scale(0.97); }
.reward-card.on { border-color: var(--accent); }
.reward-img { position: relative; aspect-ratio: 1/1; background: var(--surface-2); }
.reward-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reward-badge {
  position: absolute; top: 7px; left: 7px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 3px 7px; border-radius: var(--r-pill);
}
.reward-body { padding: 9px 11px 11px; }
.reward-name { font-size: 12.5px; font-weight: 700; line-height: 1.25; min-height: 2.4em; }
.reward-pts { font-size: 15px; font-weight: 600; color: var(--brand); margin-top: 5px; }
.reward-pts span { font-size: 10.5px; font-weight: 500; color: var(--ink-3); font-family: var(--font-sans); }
.reward-go { display: inline-block; margin-top: 7px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 9px; border-radius: var(--r-pill); }
.reward-prog { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.reward-prog-bar { height: 100%; background: var(--brand); border-radius: 2px; }
.reward-lack { font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-top: 5px; }

.reward-sheet { text-align: center; padding: 4px 4px 2px; }
.reward-sheet-img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--border); margin: 0 auto 14px; display: block; }
.reward-sheet-name { font-size: 17px; font-weight: 700; }
.reward-sheet-pts { font-size: 14px; font-weight: 600; color: var(--brand); margin-top: 3px; }
.reward-sheet-note { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 12px 4px 18px; }
.reward-sheet-check { width: 56px; height: 56px; line-height: 56px; margin: 4px auto 14px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-fg); font-size: 28px; font-weight: 700; }

.scorebar { position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.scorebar > i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ink-2); }
.scorebar.hi > i { background: var(--brand); }

.reveal { opacity: 0; transform: translateY(8px); animation: rise 420ms var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* --- revisi: detail toko, map route, closed-store confirm, KTP ------------ */
.t-card .t-chev { color: var(--ink-faint); flex-shrink: 0; }

/* m-btn usable as <a> (Map route / WhatsApp) */
a.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row .m-btn { font-size: 13.5px; }

/* WhatsApp owner link (lapor header) */
.wa-owner { display: flex; align-items: center; gap: 9px; margin: -2px 0 16px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--ok-fg); color: var(--ok-fg); background: var(--ok-bg); font-size: 12.5px; font-weight: 600; text-decoration: none; }

/* closed-store mismatch vs validated data */
.warn-box { background: var(--warn-bg); border: 1px solid #E7C764; border-radius: 14px; padding: 13px 15px; margin-bottom: 16px; }
.wb-head { display: flex; align-items: center; gap: 8px; color: var(--warn-fg); font-weight: 700; font-size: 13px; }
.wb-cmp { display: flex; align-items: center; gap: 12px; margin: 11px 0 9px; }
.wb-cmp > div { display: flex; flex-direction: column; gap: 4px; }
.wb-cmp span { font-size: 10.5px; color: var(--ink-3); }
.wb-cmp svg { color: var(--warn-fg); flex-shrink: 0; }
.ok-pill { background: var(--ok-bg); color: var(--ok-fg); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; align-self: flex-start; }
.warn-pill { background: #F6E0DC; color: #B23A30; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; align-self: flex-start; }
.wb-note { font-size: 11.5px; color: var(--warn-fg); margin: 0 0 10px; line-height: 1.45; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); flex-shrink: 0; }

.consent-note { font-size: 11px; color: var(--ink-3); margin: -6px 0 16px; line-height: 1.45; }
.photo-row.one { grid-template-columns: 104px; }

/* detail toko cards */
.fact { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.fact:last-child { border-bottom: 0; }
.fact span { color: var(--ink-3); } .fact b { font-weight: 600; text-align: right; }
.kv .kv-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.kv .kv-top .mono { color: var(--brand-text); font-weight: 600; }
.kv-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); }
