/* KAROFI FLOW HUB — shared design system. Karofi blue anchor, white background, young campaign accents.
   MOVE FLOW: blue + aqua + lime.  HOME FLOW: green + yellow + blue.  No icon glyphs; real product photos only. */
:root {
  --blue: #1659D9; --blue-deep: #0B3C9E; --navy: #0B2A5B; --aqua: #22B8F0; --aqua-soft: #D6F3FF; --sky: #EAF8FF;
  --lime: #B6E22B; --green: #22A84A; --green-deep: #1B8A3F; --green-soft: #E3F7E8;
  --yellow: #FFD83D; --yellow-soft: #FFF7CC; --coral: #F04E45; --coral-soft: #FFE1E1;
  --ink: #0B2A5B; --ink-2: #2E4A7A; --ink-3: #5E7AA8; --line: #D6E4F5; --bg: #FFFFFF; --card: #FFFFFF;
  --r: 22px; --r-sm: 14px; --shadow: 0 8px 28px rgba(11, 42, 91, 0.10);
  --grad-move: linear-gradient(135deg, #1659D9 0%, #22B8F0 55%, #B6E22B 100%);
  --grad-home: linear-gradient(135deg, #22A84A 0%, #B6E22B 45%, #FFD83D 100%);
  --grad-blue: linear-gradient(135deg, #1659D9 0%, #22B8F0 100%);
  --grad-hot: linear-gradient(135deg, #FF7A59 0%, #F04E45 100%);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Fredoka', 'DM Sans', system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; font-size: 17px; line-height: 1.4; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: 34px; } h2 { font-size: 26px; } h3 { font-size: 20px; }
p { margin: 0; }
.muted { color: var(--ink-3); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.b { font-weight: 700; }

/* Layout */
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 92px; }
@media (min-width: 900px) { #app { max-width: 560px; } }
.screen { padding: 18px 18px 24px; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spacer { flex: 1; }
.center { text-align: center; }

/* Hero / header */
.hero { border-radius: var(--r); padding: 22px 20px 24px; color: #fff; position: relative; overflow: hidden; }
.hero.move { background: var(--grad-move); }
.hero.home { background: var(--grad-home); color: var(--navy); }
.hero.blue { background: var(--grad-blue); }
.hero .wave { position: absolute; left: -10%; right: -10%; bottom: -28px; height: 70px; opacity: .35; }
.hero h1 { font-size: 40px; text-transform: uppercase; letter-spacing: .02em; }
.hero .tag { font-size: 18px; font-weight: 600; margin-top: 6px; opacity: .95; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.22); }
.hero.home .eyebrow { background: rgba(11,42,91,.12); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--blue); letter-spacing: .02em; }
.brand span { color: var(--aqua); }
.pill { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--sky); color: var(--blue); }
.pill.lime { background: #EEF8CC; color: #4E6B00; } .pill.yellow { background: var(--yellow-soft); color: #7A5A00; }
.pill.coral { background: var(--coral-soft); color: #A8231B; } .pill.green { background: var(--green-soft); color: var(--green-deep); }
.pill.grey { background: #EEF2F7; color: var(--ink-3); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.soft { background: var(--sky); border-color: transparent; }
.card.lime { background: #F3FBDD; border-color: transparent; }
.card.yellow { background: var(--yellow-soft); border-color: transparent; }
.card.green { background: var(--green-soft); border-color: transparent; }
.card.coral { background: var(--coral-soft); border-color: transparent; }
.card.navy { background: var(--navy); color: #fff; border-color: transparent; }
.card.shadow { box-shadow: var(--shadow); border-color: transparent; }
.kpi { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.kpi.sm { font-size: 30px; }
.kpi-label { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 18px; border-radius: 16px; border: 0; cursor: pointer; font-weight: 700; font-size: 17px; text-align: center; transition: transform .08s ease, filter .15s ease; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--grad-blue); color: #fff; }
.btn.move { background: var(--grad-move); color: #fff; }
.btn.home { background: var(--grad-home); color: var(--navy); }
.btn.lime { background: var(--lime); color: var(--navy); }
.btn.yellow { background: var(--yellow); color: var(--navy); }
.btn.coral { background: var(--grad-hot); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: #fff; border: 2px solid var(--line); color: var(--ink); }
.btn.quiet { background: var(--sky); color: var(--blue); }
.btn.sm { min-height: 42px; font-size: 15px; padding: 8px 14px; border-radius: 12px; width: auto; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; } .btn-row .btn { flex: 1; }

/* Choice chips / options */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.options.one { grid-template-columns: 1fr; }
.opt { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 14px 14px; text-align: left; cursor: pointer; min-height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.opt .t { font-weight: 700; font-size: 16px; } .opt .s { font-size: 13px; color: var(--ink-3); }
.opt.on { border-color: var(--blue); background: var(--sky); }
.home-pal .opt.on { border-color: var(--green); background: var(--green-soft); }
.move-pal .opt.on { border-color: var(--aqua); background: var(--aqua-soft); }

/* Inputs */
label.f { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input { width: 100%; min-height: 54px; border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; font-size: 18px; background: #fff; outline: none; }
.input:focus { border-color: var(--aqua); }
.input.big { font-size: 28px; font-family: var(--display); font-weight: 700; text-align: center; }
.stepper { display: grid; grid-template-columns: 54px 1fr 54px; gap: 8px; align-items: center; }
.stepper .btn { min-height: 54px; padding: 0; font-size: 26px; }
.slider { width: 100%; accent-color: var(--blue); height: 36px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--blue); flex: none; }
.err { color: var(--coral); font-size: 13.5px; font-weight: 600; }

/* Progress */
.prog { display: flex; gap: 6px; margin: 2px 0 6px; }
.prog i { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.prog i.on { background: var(--blue); }
.move-pal .prog i.on { background: var(--aqua); } .home-pal .prog i.on { background: var(--green); }
.bar { height: 14px; border-radius: 10px; background: #EEF2F7; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad-blue); border-radius: 10px; transition: width .4s ease; }
.move-pal .bar > i { background: var(--grad-move); } .home-pal .bar > i { background: var(--grad-home); }

/* Timeline */
.tl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tl .slot { background: var(--sky); border-radius: 12px; padding: 8px 4px; text-align: center; }
.tl .slot .tm { font-size: 11.5px; font-weight: 800; color: var(--blue); } .tl .slot .lb { font-size: 10.5px; color: var(--ink-3); } .tl .slot .lt { font-weight: 700; font-size: 13px; }
.tl .slot.done { background: var(--lime); } .tl .slot.done .tm, .tl .slot.done .lb { color: var(--navy); }

/* Product */
.product { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; }
.product img { width: 112px; height: 132px; object-fit: contain; background: #fff; border-radius: 12px; }
.product .noimg { width: 112px; height: 132px; border-radius: 12px; background: var(--sky); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink-3); text-align: center; padding: 8px; }
.facts { margin: 8px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); }
.facts li { margin: 3px 0; }
.price { font-family: var(--display); font-size: 26px; font-weight: 700; }
.price small { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* Reward */
.reward { border-radius: var(--r); padding: 18px; text-align: center; position: relative; overflow: hidden; }
.reward.move { background: var(--grad-move); color: #fff; } .reward.home { background: var(--grad-home); color: var(--navy); }
.reward h2 { font-size: 30px; text-transform: uppercase; }
.code { font-family: var(--display); font-size: 36px; letter-spacing: .12em; font-weight: 700; }
.qrbox { background: #fff; border-radius: 18px; padding: 12px; display: inline-block; margin: 10px auto 0; }
.qrbox svg { width: 200px; height: 200px; display: block; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.badge.valid { background: var(--green-soft); color: var(--green-deep); } .badge.used { background: #EEF2F7; color: var(--ink-3); }
.badge.expired { background: var(--coral-soft); color: #A8231B; } .badge.cancelled { background: var(--yellow-soft); color: #7A5A00; }
.grade { display: inline-block; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13.5px; }
.grade.HOT { background: var(--grad-hot); color: #fff; } .grade.WARM { background: var(--yellow); color: var(--navy); } .grade.NURTURE { background: var(--sky); color: var(--blue); }

/* Tabs */
.tabs { display: flex; background: #EEF2F7; border-radius: 14px; padding: 4px; gap: 4px; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 10px 6px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--blue); box-shadow: 0 2px 8px rgba(11,42,91,.08); }

/* Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.item .sw { width: 10px; height: 44px; border-radius: 6px; flex: none; }
.sw.move { background: var(--grad-move); } .sw.home { background: var(--grad-home); } .sw.blue { background: var(--blue); } .sw.grey { background: var(--line); }

/* Tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tbl td.n { text-align: right; font-variant-numeric: tabular-nums; }

/* Bottom nav */
.nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 20; }
.nav .in { width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(4, 1fr); }
@media (min-width: 900px) { .nav .in { max-width: 560px; } }
.nav button { border: 0; background: transparent; padding: 10px 4px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nav button .dot { width: 26px; height: 6px; border-radius: 6px; background: var(--line); }
.nav button.on { color: var(--blue); } .nav button.on .dot { background: var(--grad-blue); }

/* Toast / modal */
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14.5px; z-index: 50; box-shadow: var(--shadow); max-width: 92vw; }
.modal-bg { position: fixed; inset: 0; background: rgba(11,42,91,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 20px 18px 28px; max-height: 88vh; overflow: auto; }
@media (min-width: 900px) { .modal { max-width: 560px; border-radius: 22px; margin-bottom: 40px; } }

/* Wave motif (decorative shape, not an icon) */
.wavebg { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; opacity: .25; pointer-events: none; }

/* Staff / admin */
.staff-pal .hero { background: var(--navy); }
.metric { background: var(--sky); border-radius: 14px; padding: 12px; }
.metric .v { font-family: var(--display); font-size: 26px; font-weight: 700; } .metric .l { font-size: 12px; color: var(--ink-3); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters select, .filters input { min-height: 44px; border: 2px solid var(--line); border-radius: 12px; padding: 6px 10px; font-size: 14px; background: #fff; }
.disclaimer { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hide { display: none !important; }
