/* CloudyPOS Partners app — mobile first, system fonts, light/dark. */
:root {
  --pri: #1456fc; --pri2: #0093fe; --ink: #0f1b33; --mut: #5b6b85; --line: #e3e8f1; --bg: #f4f7fc; --card: #ffffff;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #92400e; --warn-bg: #fef3c7; --bad: #b42318; --bad-bg: #fee4e2; --info: #1e40af; --info-bg: #e0eaff;
  --off: #64748b; --off-bg: #eef1f6; --radius: 16px; --nav-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e8eefc; --mut: #9aa8c2; --line: #26324a; --bg: #0b1222; --card: #121b30;
    --ok-bg: #0f2e1d; --ok: #6ee7a0; --warn-bg: #3a2a0b; --warn: #fcd34d; --bad-bg: #3a1414; --bad: #fca5a5; --info-bg: #142450; --info: #a5c0ff; --off-bg: #1b2539; --off: #9aa8c2; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--pri); }
button { font: inherit; }
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; color: var(--mut);
  background: radial-gradient(circle at 50% 38%, #fff 0, var(--bg) 70%); }
.boot-logo { width: 190px; height: auto; animation: float 2.4s ease-in-out infinite; }
.boot-bar { width: 140px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--pri), var(--pri2)); border-radius: 4px; animation: slide 1.1s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Shell */
.top { position: sticky; top: 0; z-index: 5; background: linear-gradient(120deg, var(--pri), var(--pri2)); color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px; display: flex; align-items: center; gap: 10px; }
.top h1 { font-size: 17px; margin: 0; flex: 1; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .back, .top .bell { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; position: relative; }
.top .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: #ff4d4f; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
main { max-width: 720px; margin: 0 auto; padding: 14px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--card); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; color: var(--mut); text-decoration: none; font-size: 12px; min-height: var(--nav-h); justify-content: center; }
nav.tabs a.on { color: var(--pri); font-weight: 650; }
nav.tabs svg { width: 22px; height: 22px; }

/* Blocks */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(16,33,61,.05), 0 4px 16px rgba(16,33,61,.05); }
.card h2 { font-size: 16px; margin: 0 0 10px; }
.hello { font-size: 20px; font-weight: 700; margin: 4px 0 2px; }
.mut { color: var(--mut); font-size: 14px; }
.small { font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .stats.four { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg); border-radius: 12px; padding: 10px; }
.stat b { display: block; font-size: 22px; line-height: 1.15; }
.stat span { color: var(--mut); font-size: 12px; }
a.stat { text-decoration: none; color: inherit; }
.code { font: 700 26px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }
.codecard { display: flex; gap: 14px; align-items: center; }
.codecard img { width: 112px; height: 112px; border-radius: 10px; background: #fff; padding: 6px; flex: none; }
.link { font: 12px ui-monospace, Menlo, Consolas, monospace; color: var(--mut); word-break: break-all; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 650;
  cursor: pointer; text-decoration: none; background: linear-gradient(120deg, var(--pri), var(--pri2)); color: #fff; min-height: 44px; }
.btn.sec { background: var(--info-bg); color: var(--info); }
.btn.wa { background: #1fa855; }
.btn.ghost { background: transparent; color: var(--pri); padding: 8px 10px; }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.signed_up, .pill.off, .pill.reversed { background: var(--off-bg); color: var(--off); }
.pill.set_up, .pill.info, .pill.paid_out, .pill.paid.payout { background: var(--info-bg); color: var(--info); }
.pill.active, .pill.warn, .pill.pending, .pill.requested { background: var(--warn-bg); color: var(--warn); }
.pill.paid, .pill.ok, .pill.available { background: var(--ok-bg); color: var(--ok); }
.pill.bad, .pill.rejected { background: var(--bad-bg); color: var(--bad); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.item { display: flex; gap: 10px; align-items: center; padding: 12px 2px; color: inherit; text-decoration: none; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { color: var(--mut); font-size: 13px; }
.item .amt { font-weight: 700; white-space: nowrap; }
.amt.neg { color: var(--mut); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.chips button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 12px; white-space: nowrap; cursor: pointer; font-size: 14px; }
.chips button.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert a { color: inherit; font-weight: 650; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 8px 0; align-items: center; }
.timeline .d { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.timeline .done .d { background: var(--ok); border-color: var(--ok); }
.timeline .when { margin-left: auto; color: var(--mut); font-size: 13px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
input, select { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
input:focus, select:focus { outline: 2px solid rgba(20,86,252,.35); border-color: var(--pri); }
.otp { font: 700 24px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .4em; text-align: center; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 6px; }
.signin { min-height: 100vh; display: flex; flex-direction: column; }
.signin .hero { background: linear-gradient(120deg, var(--pri), var(--pri2)); color: #fff; padding: calc(env(safe-area-inset-top) + 40px) 24px 70px; }
.signin .hero h1 { margin: 12px 0 6px; font-size: 26px; }
.signin .hero p { margin: 0; opacity: .92; }
.signin .box { margin: -44px 16px 24px; max-width: 480px; align-self: center; width: calc(100% - 32px); }
.empty { text-align: center; color: var(--mut); padding: 24px 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; color: var(--mut); font-weight: 600; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); background: #10213d; color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.hidden { display: none !important; }
.right { text-align: right; }
details summary { cursor: pointer; color: var(--pri); font-weight: 650; padding: 6px 0; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--pri); border-radius: 50%; animation: s 0.8s linear infinite; margin: 30px auto; }
@keyframes s { to { transform: rotate(360deg); } }

/* ---------- 1.2: brand, motion, interactivity ---------- */
.top-logo { width: 40px; height: auto; background: #fff; border-radius: 10px; padding: 3px 4px; flex: none; }
.hero-logo { width: 170px; height: auto; display: block; margin: 0 auto 6px; filter: drop-shadow(0 8px 22px rgba(0,0,0,.22)); animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.signin .hero { text-align: center; padding-top: calc(env(safe-area-inset-top) + 28px); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.enter > * { animation: rise .32s ease both; }
.enter > *:nth-child(2) { animation-delay: .04s; } .enter > *:nth-child(3) { animation-delay: .08s; } .enter > *:nth-child(4) { animation-delay: .12s; }
.enter > *:nth-child(5) { animation-delay: .16s; } .enter > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.list li[style*="--d"] { animation: rise .3s ease both; animation-delay: calc(var(--d) * 30ms); }
.btn { transition: transform .12s ease, filter .12s ease, opacity .12s; position: relative; }
.btn:active:not(:disabled) { transform: scale(.97); filter: brightness(.95); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.grow, .grow { flex: 1; }
.btn svg { width: 18px; height: 18px; }
.btn.busy { color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: s .7s linear infinite; }
.btn.sec.busy::after { border-color: var(--line); border-top-color: var(--pri); }
.card, .alert, .stat, .item { transition: transform .15s ease, box-shadow .15s ease; }
a.card:active, a.alert:active, a.stat:active, a.item:active, .frow:active { transform: scale(.985); }
a.alert, a.card { text-decoration: none; color: inherit; display: flex; }
a.card.linkcard { display: block; }
a.alert svg, .cta svg, .row-link svg { width: 22px; height: 22px; flex: none; }
.cta { gap: 12px; align-items: center; }
.cta.warn { background: var(--warn-bg); color: var(--warn); }
.cta b { display: block; } .cta span { font-size: 14px; }
.row-link { display: flex !important; align-items: center; gap: 10px; font-weight: 600; }
.ok-text { color: var(--ok); font-weight: 650; display: flex; align-items: center; gap: 6px; } .ok-text svg { width: 18px; height: 18px; }
.sep { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; } .sep:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.vh, .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tabs */
nav.tabs a { position: relative; transition: color .15s; }
nav.tabs a.on svg { animation: bounce .35s ease; }
nav.tabs a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--pri); }
@keyframes bounce { 40% { transform: translateY(-3px) scale(1.08); } }
.tdot { position: absolute; top: 8px; left: 56%; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f; }

/* offline + pull to refresh */
.offline { position: sticky; top: 0; z-index: 6; background: #10213d; color: #fff; font-size: 13px; text-align: center; padding: 6px 12px; }
.ptr { height: 0; overflow: hidden; display: grid; place-items: center; transition: height .2s; color: var(--pri); }
.ptr-i { width: 30px; height: 30px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .2s; transform: rotate(180deg); }
.ptr-i svg { width: 18px; height: 18px; }
.ptr.ready .ptr-i { transform: rotate(0); }
.ptr.spinning { height: 46px !important; } .ptr.spinning .ptr-i { animation: s .8s linear infinite; }

/* skeletons */
.sk { pointer-events: none; }
.sk-line { height: 12px; border-radius: 6px; margin: 10px 0; background: linear-gradient(90deg, var(--line) 0, var(--bg) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.sk-line.w40 { width: 40%; height: 16px; } .sk-line.w70 { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* toast */
.toast { animation: rise .25s ease both; transition: opacity .3s, transform .3s; display: flex; gap: 8px; align-items: center; }
.toast.ok { background: #14532d; } .toast.bad { background: #7f1d1d; }
.toast.out { opacity: 0; transform: translate(-50%, 8px); }

/* code card + QR */
.qr-btn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; flex: none; border-radius: 12px; }
.qr-btn img { display: block; }
.qr-btn span { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.qr-btn span svg { width: 14px; height: 14px; }
button.code { border: 0; background: none; color: inherit; padding: 0; cursor: copy; text-align: left; }
.qr-big { text-align: center; }
.qr-big img { width: min(72vw, 300px); height: auto; background: #fff; padding: 12px; border-radius: 16px; box-shadow: 0 6px 24px rgba(16,33,61,.12); image-rendering: pixelated; }
.qr-big .code { margin-top: 10px; }

/* get started */
.start-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.start-h h2 { margin: 0; }
.ring { width: 56px; height: 56px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--line); } .ring-fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.todo .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: #fff; }
.todo .tick svg { width: 14px; height: 14px; }
.todo li.done .tick { background: var(--ok); border-color: var(--ok); animation: pop .3s ease both; }
.todo li.done .grow { color: var(--mut); text-decoration: line-through; }

/* funnel */
.funnel { display: grid; gap: 8px; }
.frow { display: grid; grid-template-columns: 112px 1fr 34px 38px; align-items: center; gap: 8px; color: inherit; text-decoration: none; padding: 4px 0; border-radius: 10px; }
.fl { font-size: 13px; color: var(--mut); }
.fb { height: 14px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.ff { display: block; height: 100%; width: var(--w); border-radius: 8px; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; }
.ff.s0 { background: #94a3b8; } .ff.s1 { background: #60a5fa; } .ff.s2 { background: #f59e0b; } .ff.s3 { background: #22c55e; }
.frow b { text-align: right; font-size: 16px; }
.conv { font-size: 12px; color: var(--mut); text-align: right; }
@keyframes grow { from { width: 0; } }

/* trend chart */
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--mut); margin: -4px 0 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .l1, .trend .b1 { background: var(--pri); fill: var(--pri); } .legend .l2, .trend .b2 { background: #22c55e; fill: #22c55e; }
.trend { width: 100%; height: 140px; display: block; }
.trend text { font-size: 10px; fill: var(--mut); }
.trend .hit { fill: transparent; }
.trend .tg { cursor: pointer; outline: none; }
.trend .tg rect.b1, .trend .tg rect.b2 { transform-box: fill-box; transform-origin: bottom; animation: up .7s cubic-bezier(.2,.8,.2,1) both; opacity: .55; transition: opacity .15s; }
.trend .tg.on rect.b1, .trend .tg.on rect.b2, .trend .tg:focus rect.b1, .trend .tg:focus rect.b2 { opacity: 1; }
.trend .tg.on text { fill: var(--ink); font-weight: 700; }
@keyframes up { from { transform: scaleY(0); } }

/* meters */
.meter { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; margin: 10px 0 6px; }
.meter span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--pri), #22c55e); border-radius: 6px; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; }
.meter.big { height: 10px; }
.money-hero .big-num { display: block; font-size: 34px; line-height: 1.15; margin: 2px 0 4px; letter-spacing: -.01em; }
.stats.two { grid-template-columns: 1fr 1fr; margin-top: 10px; }

/* lists */
.list-card { padding: 4px 14px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: var(--info-bg); color: var(--info); flex: none; }
.avatar.big { width: 52px; height: 52px; font-size: 22px; border-radius: 16px; }
.item.st-paid .avatar { background: var(--ok-bg); color: var(--ok); } .item.st-active .avatar { background: var(--warn-bg); color: var(--warn); } .item.st-signed_up .avatar { background: var(--off-bg); color: var(--off); }
.biz-h, .profile { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.profile { margin-bottom: 12px; }
.count { margin: 0 2px 8px; }
.search input { border-radius: 999px; padding-left: 16px; margin-bottom: 10px; }
.empty-art { text-align: center; color: var(--mut); padding: 22px 8px; }
.empty-art svg { width: 44px; height: 44px; color: var(--pri); opacity: .55; }
.empty-art p { margin: 8px 0 14px; }
.timeline .d { display: grid; place-items: center; color: #fff; width: 20px; height: 20px; }
.timeline .d svg { width: 12px; height: 12px; }
.item.unread .t { font-weight: 750; }
.ndot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; }
.item.unread .ndot { background: var(--pri); }

/* leaderboard */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board li { display: grid; grid-template-columns: 26px minmax(70px, 34%) 1fr 30px; align-items: center; gap: 8px; font-size: 14px; }
.rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--mut); }
.rank.r1 { background: #fde68a; color: #92400e; } .rank.r2 { background: #e5e7eb; color: #374151; } .rank.r3 { background: #fed7aa; color: #9a3412; }
.who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .bar { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.board .bar span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--pri), var(--pri2)); border-radius: 6px; animation: grow .8s ease both; }
.board b { text-align: right; }

/* application steps */
.steps { list-style: none; margin: 0 0 8px; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 8px 0; position: relative; color: var(--mut); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 36px; bottom: -8px; width: 2px; background: var(--line); }
.steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--bg); border: 2px solid var(--line); flex: none; z-index: 1; }
.steps .n svg { width: 15px; height: 15px; }
.steps li.done { color: var(--ink); } .steps li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 650; } .steps li.now .n { border-color: var(--pri); color: var(--pri); animation: pulse 1.6s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(20,86,252,.15); } }
.hero-card { background: linear-gradient(120deg, var(--info-bg), var(--card)); }

/* documents */
.doc-h { display: flex; gap: 12px; align-items: center; }
.doc-h b { display: block; margin-bottom: 4px; }
.doc-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); flex: none; }
.doc-i svg { width: 22px; height: 22px; } .doc-i.sm { width: 32px; height: 32px; border-radius: 10px; } .doc-i.sm svg { width: 18px; height: 18px; }
.doc.accepted .doc-i { background: var(--ok-bg); color: var(--ok); }
.doc.missing .doc-i, .doc.rejected .doc-i { background: var(--warn-bg); color: var(--warn); }
.doc.missing { border: 1.5px dashed var(--warn); }
.uploader { margin-top: 12px; }
.up-btns { display: flex; gap: 8px; }
.up-btns .btn { font-size: 14px; padding: 10px; }
.preview { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 14px; word-break: break-all; }
.preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.progress { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: var(--pri); transition: width .2s; }
details.more summary { padding: 0; }
details.more select { margin-top: 4px; }
.pill.info { background: var(--info-bg); color: var(--info); }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10,18,34,.5); opacity: 0; transition: opacity .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 20px);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); max-width: 640px; margin: 0 auto; }
.sheet-wrap.open .sheet-bg { opacity: 1; } .sheet-wrap.open .sheet { transform: none; }
.sheet h2 { font-size: 18px; margin: 6px 40px 12px 0; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 6px; }
.sheet-x { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sheet-x svg { width: 18px; height: 18px; }
textarea.msg { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); resize: vertical; }
.howto { padding-left: 20px; line-height: 1.9; }
.nets { display: flex; gap: 8px; flex-wrap: wrap; }
.net { position: relative; margin: 0; font-weight: 600; }
.net input { position: absolute; opacity: 0; }
.net span { display: inline-block; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; }
.net input:checked + span { border-color: var(--pri); background: var(--info-bg); color: var(--info); }
.net.n-mtn input:checked + span { border-color: #ffcb05; background: #fff8d6; color: #5c4a00; }
.net.n-telecel input:checked + span { border-color: #e60000; background: #ffe5e5; color: #8a0000; }
.net input:focus-visible + span { outline: 2px solid var(--pri); }

/* OTP boxes */
.otp-field { position: relative; }
.otp-field input { position: absolute; inset: 0; opacity: 0.01; width: 100%; height: 100%; font-size: 16px; }
.otp-boxes { display: flex; gap: 8px; justify-content: center; }
.otp-boxes span { width: 44px; height: 52px; border-radius: 12px; border: 2px solid var(--line); display: grid; place-items: center; font: 700 22px ui-monospace, Menlo, Consolas, monospace; background: var(--card); transition: border-color .15s, transform .15s; }
.otp-boxes span.on { border-color: var(--pri2); }
.otp-field input:focus ~ .otp-boxes span.cur, .otp-boxes span.cur { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(20,86,252,.15); }
.otp-boxes.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.chips button { transition: background .15s, color .15s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.stat { min-width: 0; }
.stats.money .stat { padding: 10px 8px; }
.stats.money .stat b { font-size: clamp(13px, 4vw, 18px); white-space: nowrap; }

/* 1.2.1 terms gate */
.terms-points { padding-left: 20px; margin: 6px 0 14px; font-size: 15px; }
.terms-points li { margin: 6px 0; }
label.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; margin: 16px 0 6px; cursor: pointer; }
label.agree input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--pri); }

/* 1.3.0 requests and engagements */
nav.tabs a { position: relative; }
.tbadge { position: absolute; top: 4px; left: 54%; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ff4d4f; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
a.card.req-card, .req-card { display: block; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.req-card:active { transform: scale(.99); }
.req-card .t { font-weight: 700; font-size: 17px; margin-top: 6px; }
.req-card .s { color: var(--mut); font-size: 13px; }
.req-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--info); background: var(--info-bg); padding: 4px 10px 4px 8px; border-radius: 999px; }
.kind svg { width: 16px; height: 16px; }
.kind.k-loan { color: var(--ok); background: var(--ok-bg); }
.kind.k-tax { color: var(--warn); background: var(--warn-bg); }
.amt-line { font-weight: 700; margin-top: 4px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0; font-size: 14.5px; }
.first-right { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--warn); margin: -2px 0 8px; }
.first-right svg { width: 16px; height: 16px; }
.alert svg { width: 18px; height: 18px; flex: none; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; font-size: 14.5px; }
dl.kv dt { color: var(--mut); } dl.kv dd { margin: 0; font-weight: 600; }
.quote { white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 12px; margin: 10px 0; font-size: 14.5px; }
.ok-card h2 { display: flex; align-items: center; gap: 6px; color: var(--ok); } .ok-card h2 svg { width: 20px; height: 20px; }
.btn svg { width: 18px; height: 18px; }
.chat { padding: 10px; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px 2px 10px; scroll-behavior: smooth; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 16px; background: var(--bg); white-space: pre-wrap; word-wrap: break-word; font-size: 15px; animation: pop .18s ease-out; }
.bubble.mine { align-self: flex-end; background: linear-gradient(120deg, var(--pri), var(--pri2)); color: #fff; border-bottom-right-radius: 5px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.sys { align-self: center; background: transparent; color: var(--mut); font-size: 12.5px; text-align: center; max-width: 92%; padding: 2px 8px; }
.bubble .meta { display: block; font-size: 11px; opacity: .75; margin-top: 3px; }
.compose { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.compose textarea { flex: 1; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); resize: none; max-height: 140px; }
.compose .send { width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; flex: none; }
.compose .send svg { width: 20px; height: 20px; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } .req-card { transition: none; } }

/* 1.3.1 offline bar (CloudyOffline kit): tap it to see what is waiting on this phone */
button.offline { display: block; width: 100%; border: 0; font-family: inherit; font-weight: 600; cursor: pointer; }
.offline.hidden { display: none; }
.offline.bad { background: #b42318; }
.offline.ok { background: #067647; }
.bubble.waiting { opacity: .72; border: 1px dashed rgba(255,255,255,.7); }
