/* Koraneza — mobile-first styles. No build step needed. */
:root {
  --bg: #f3f5f2;
  --card: #ffffff;
  --ink: #0f1d17;
  --muted: #5d6b64;
  --line: #e2e7e3;
  --green: #12805c;
  --green-d: #0b4d38;
  --green-dd: #08362a;
  --green-l: #e4f3ec;
  --yellow: #fad201;
  --blue: #00a1de;
  --red: #c2362b;
  --red-l: #fbe9e7;
  --amber: #a86400;
  --amber-l: #fff3dc;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 29, 23, .05), 0 4px 16px rgba(15, 29, 23, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ico { width: 22px; height: 22px; flex: none; }
.ico-sm { width: 18px; height: 18px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- app shell (phone column) ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar h1 { font-size: 18px; flex: 1; }
.back { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green-d); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav nav { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px; font-weight: 600; color: var(--muted); }
.bottomnav a.on { color: var(--green); }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); border-top: 1px solid var(--line); min-height: 64px; }
.list-item:first-child { border-top: 0; }
a.list-item:active { background: #f7f9f7; }
.li-title { font-weight: 600; font-size: 15px; }
.li-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-amt { text-align: right; font-weight: 700; font-size: 15px; white-space: nowrap; }
.pos { color: var(--green); }
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 10px; }
.section-h h2 { font-size: 16px; }
.section-h a { font-size: 14px; font-weight: 600; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- balance hero ---------- */
.hero { border-radius: 22px; padding: 20px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #1a8f68 0%, var(--green-d) 45%, var(--green-dd) 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(250, 210, 1, .12); }
.hero .label { font-size: 13px; opacity: .8; }
.hero .big { font-size: 32px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.hero .sub { font-size: 13px; opacity: .8; margin-top: 4px; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 600; }
.action .circle { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--green-dd); display: grid; place-items: center; }
.action:active { background: rgba(255,255,255,.2); }

/* light action cards (token page) */
.actions-light { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.action-l { background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; }
.action-l .circle { width: 42px; height: 42px; border-radius: 12px; background: var(--green-l); color: var(--green); display: grid; place-items: center; }
.action-l small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

/* token icons */
.tok { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 17px; flex: none; }
.tok-usdt { background: #26a17b; }
.tok-rwf { background: linear-gradient(180deg, var(--blue) 0 50%, var(--yellow) 50% 75%, var(--green) 75%); font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.tok-lg { width: 56px; height: 56px; font-size: 22px; }
.tok-lg.tok-rwf { font-size: 16px; }

/* ---------- forms ---------- */
label.lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input { width: 100%; height: 52px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 17px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(18,128,92,.12); }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; font-size: 15px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.input-wrap { position: relative; }
.input-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); font-size: 15px; pointer-events: none; }
.input-wrap .input { padding-right: 72px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.err { font-size: 13px; color: var(--red); margin-top: 6px; font-weight: 500; }
.input.bad { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pill { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pill:active { border-color: var(--green); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border: 0; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; background: var(--green); color: #fff; transition: transform .05s, background .15s; }
.btn:active { transform: scale(.99); background: var(--green-d); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:active { background: #f3f5f2; }
.btn-yellow { background: var(--yellow); color: var(--green-dd); }
.btn-yellow:active { background: #e8c300; }
.btn-red { background: var(--red); }
.btn-sm { height: 40px; width: auto; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* network chooser */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice .box { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: 700; cursor: pointer; min-height: 64px; }
.choice input:checked + .box { border-color: var(--green); background: var(--green-l); }
.choice input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(18,128,92,.25); }
.net { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.net-mtn { background: #ffcc00; color: #1a1a1a; }
.net-airtel { background: #e40000; color: #fff; }
.choice .box small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

/* summary rows */
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.sum-row:first-child { border-top: 0; }
.sum-row b { text-align: right; }
.sum-row.total { font-size: 17px; }

/* ---------- alerts & badges ---------- */
.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.alert-ok { background: var(--green-l); color: var(--green-d); }
.alert-err { background: var(--red-l); color: var(--red); }
.alert-info { background: var(--amber-l); color: var(--amber); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.b-pending { background: var(--amber-l); color: var(--amber); }
.b-completed, .b-approved, .b-active { background: var(--green-l); color: var(--green-d); }
.b-failed, .b-rejected, .b-blocked { background: var(--red-l); color: var(--red); }

/* status page */
.status-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 8px auto 14px; }
.status-ico.pending { background: var(--amber-l); color: var(--amber); }
.status-ico.ok { background: var(--green-l); color: var(--green); }
.status-ico.bad { background: var(--red-l); color: var(--red); }
.spin { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- auth pages ---------- */
.auth { max-width: 420px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 24px 20px 40px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--green-d); display: grid; place-items: center; position: relative; overflow: hidden; }
.logo::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); top: 9px; left: 9px; }
.logo::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--green-d); top: 13px; left: 13px; }
.auth h1 { font-size: 26px; margin-top: 32px; }
.auth .lead { color: var(--muted); margin-top: 6px; }
.auth form { margin-top: 24px; }
.auth .foot { margin-top: 22px; text-align: center; font-size: 15px; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 40px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---------- landing ---------- */
.l-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.l-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.l-nav .links { display: flex; gap: 8px; }
.l-hero { padding: 28px 0 40px; display: grid; gap: 32px; }
.l-hero h1 { font-size: 36px; letter-spacing: -.03em; line-height: 1.08; }
.l-hero h1 em { font-style: normal; color: var(--green); }
.l-hero .lead { font-size: 17px; color: var(--muted); margin-top: 14px; max-width: 520px; }
.l-cta { display: grid; gap: 10px; margin-top: 24px; max-width: 420px; }
.rate-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card); box-shadow: var(--shadow); border-radius: 999px; padding: 8px 14px 8px 8px; font-size: 14px; font-weight: 600; margin-top: 18px; }
.rate-chip .dot { width: 24px; height: 24px; border-radius: 50%; background: #26a17b; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.phone-mock { background: var(--green-dd); border-radius: 32px; padding: 14px; box-shadow: 0 30px 60px -20px rgba(8,54,42,.45); max-width: 360px; width: 100%; margin: 0 auto; }
.phone-mock .screen { background: var(--bg); border-radius: 22px; padding: 14px; }
.steps { display: grid; gap: 12px; padding: 8px 0 36px; }
.step { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; }
.step .n { width: 36px; height: 36px; border-radius: 10px; background: var(--yellow); color: var(--green-dd); font-weight: 800; display: grid; place-items: center; flex: none; }
.step h3 { font-size: 16px; }
.step p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.l-section-h { font-size: 22px; margin: 12px 0 14px; }
.l-band { background: var(--green-dd); color: #fff; border-radius: 22px; padding: 26px 20px; margin-bottom: 36px; display: grid; gap: 16px; }
.l-band h2 { font-size: 22px; }
.l-band p { opacity: .8; }
.l-foot { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.l-foot a { color: var(--muted); }
.prose { max-width: 720px; margin: 0 auto; padding: 8px 20px 48px; }
.prose h1 { font-size: 26px; margin: 12px 0 16px; }
.prose h2 { font-size: 18px; margin: 22px 0 8px; }
.prose p, .prose li { color: #33413a; margin-bottom: 10px; }

@media (min-width: 820px) {
  .l-hero { grid-template-columns: 1.1fr .9fr; align-items: center; padding: 56px 0 64px; }
  .l-hero h1 { font-size: 54px; }
  .l-cta { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .l-band { grid-template-columns: 1fr auto; align-items: center; padding: 32px; }
}

/* ---------- admin ---------- */
.adm { min-height: 100vh; }
.adm-top { position: sticky; top: 0; z-index: 10; background: var(--green-dd); color: #fff; }
.adm-top .bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.adm-top .brand { color: #fff; font-size: 17px; }
.adm-top .logo { background: #fff2; }
.adm-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs a { color: #fffc; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.adm-tabs a.on { background: #ffffff1f; color: #fff; }
.adm-tabs .cnt { background: var(--yellow); color: var(--green-dd); border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 800; }
.adm-main { max-width: 1180px; margin: 0 auto; padding: 16px 16px 48px; }
.adm-main h1 { font-size: 22px; margin: 4px 0 14px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 4px; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.hl { background: var(--yellow); }
.stat.hl .k, .stat.hl .s { color: var(--green-dd); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar form { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.toolbar .input { height: 42px; font-size: 15px; }
.seg { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.seg a { padding: 8px 14px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.seg a.on { background: var(--green-d); color: #fff; }

/* tables turn into cards on phones */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; font-weight: 700; }
.tbl td { padding: 12px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: top; }
@media (max-width: 760px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; padding: 6px 0; }
  .tbl td { border: 0; padding: 6px 14px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  .tbl td.full { display: block; text-align: left; }
  .tbl td.full::before { display: block; margin-bottom: 6px; }
  .tbl-wrap { background: none !important; box-shadow: none !important; }
}
@media (min-width: 761px) {
  .tbl-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .adm-tabs { padding: 0 16px 10px; }
}
.wd-actions { display: grid; gap: 8px; }
.wd-actions details summary { list-style: none; cursor: pointer; }
.wd-actions details summary::-webkit-details-marker { display: none; }
.wd-actions .input { height: 42px; font-size: 14px; }
.two { display: grid; gap: 14px; }
@media (min-width: 761px) { .two { grid-template-columns: 1fr 1fr; } }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.pager a, .pager span { padding: 8px 14px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--ink); }
.pager span { opacity: .45; }
.net-lumicash { background: #00a14b; color: #fff; }
.net-ecocash { background: #0a4ea2; color: #fff; }
.tok-bif { background: linear-gradient(135deg, #ce1126 0 33%, #fff 33% 67%, #1eb53a 67%); color: #0f1d17; font-size: 11px; text-shadow: 0 0 3px #fff; }
.tok-lg.tok-bif { font-size: 15px; }
.seg-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 5px; margin-bottom: 12px; }
.seg-toggle a { text-align: center; padding: 10px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg-toggle a.on { background: var(--green-d); color: #fff; }
