/* KAASIM - dark neon-lime theme */
:root {
  --bg: #070907;
  --bg-2: #0c0f0b;
  --card: #11150f;
  --card-2: #171c14;
  --text: #f4f7ee;
  --muted: #949c8d;
  --line: #232a1f;
  --line-2: #2f3829;
  --brand: #c8f031;          /* neon lime */
  --brand-2: #b3dc1e;
  --brand-ink: #0a0d06;      /* text on lime */
  --brand-soft: rgba(200, 240, 49, .12);
  --glow: rgba(200, 240, 49, .35);
  --danger: #ff5c5c;
  --danger-soft: rgba(255, 92, 92, .12);
  --ok: #c8f031;
  --ok-soft: rgba(200, 240, 49, .12);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, .12);
  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { color-scheme: dark; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  background-image:
    radial-gradient(600px 300px at 85% -60px, rgba(200, 240, 49, .10), transparent 70%),
    radial-gradient(500px 260px at -10% 30%, rgba(200, 240, 49, .05), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 1.75rem; margin: 6px 0 6px; font-weight: 700; }
h2 { font-size: 1.15rem; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 1rem; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.lime { color: var(--brand); }
::selection { background: var(--brand); color: var(--brand-ink); }

.container { max-width: 760px; margin: 0 auto; padding: 16px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: rgba(7, 9, 7, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: .04em; color: var(--text); font-size: 1.1rem; line-height: 1; }
.brand small { display: block; color: var(--brand); font-size: .62rem; letter-spacing: .25em; margin-top: 3px; }
.logo { width: 34px; height: 34px; border-radius: 11px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; box-shadow: 0 0 22px var(--glow); }
.balance-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text); font-weight: 700; font-size: .92rem;
}
.balance-chip b { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }

/* Bottom nav */
.bottomnav {
  position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 10; max-width: 520px; margin: 0 auto;
  display: flex; justify-content: space-around; background: rgba(17, 21, 15, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); border-radius: 22px;
  padding: 8px 6px; margin-bottom: env(safe-area-inset-bottom);
}
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: .72rem; padding: 6px 0; border-radius: 16px; }
.bottomnav a[hidden] { display: none; }
.bottomnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottomnav a.active { color: var(--brand-ink); background: var(--brand); font-weight: 700; box-shadow: 0 0 18px var(--glow); }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
.card.glow { border-color: rgba(200, 240, 49, .35); box-shadow: 0 0 0 1px rgba(200, 240, 49, .08), 0 10px 40px -10px rgba(200, 240, 49, .25); }

/* Forms */
label { display: block; font-weight: 600; font-size: .85rem; margin: 14px 0 6px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font-size: 16px; outline: none; font-family: inherit;
}
input::placeholder { color: #5f6759; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input.invalid { border-color: var(--danger); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); padding: 0; flex-shrink: 0; }
.field { position: relative; }
.field .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; font-size: .8rem; font-weight: 700; }
.phone-field { display: flex; gap: 8px; }
.phone-field .cc { width: 92px; flex-shrink: 0; text-align: center; color: var(--muted); }
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.err { font-size: .8rem; color: var(--danger); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--muted); font-size: .88rem; margin-top: 14px; }
.strength { display: flex; gap: 4px; margin-top: 8px; }
.strength span { flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .2s; }
.strength.s1 span:nth-child(-n+1) { background: var(--danger); }
.strength.s2 span:nth-child(-n+2) { background: var(--warn); }
.strength.s3 span:nth-child(-n+3) { background: #e2f06a; }
.strength.s4 span { background: var(--brand); }
.search { position: relative; }
.search input { padding-left: 46px; border-radius: 999px; background: var(--card); }
.search svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }

/* Buttons */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer; font-family: var(--display);
  font-weight: 700; font-size: 1rem; background: var(--brand); color: var(--brand-ink); text-align: center;
  transition: transform .1s, box-shadow .2s, background .2s;
}
.btn:hover { background: #d6ff45; box-shadow: 0 0 24px var(--glow); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn.block { width: 100%; }
.btn.light { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn.light:hover { background: rgba(200, 240, 49, .2); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--brand); background: transparent; }
.btn.danger { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.btn.danger:hover { background: rgba(255, 92, 92, .2); }
.btn.sm { padding: 8px 14px; font-size: .85rem; }

/* Tabs */
.tabs { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px 14px; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: .92rem; white-space: nowrap; font-family: var(--display); }
.tabs button.active { background: var(--brand); color: var(--brand-ink); }

/* Steps */
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); }
.steps span.on { background: var(--brand); box-shadow: 0 0 10px var(--glow); }

/* Service grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.service {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; color: var(--text); text-align: left; font-size: .95rem; font-weight: 600; font-family: inherit;
  transition: border-color .15s, transform .1s;
}
.service:hover { border-color: var(--brand); }
.service:active { transform: scale(.98); }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; flex-shrink: 0; font-size: 1rem; font-family: var(--display); }
.service .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer; width: 100%; text-align: left; font-size: 1rem; font-family: inherit;
  transition: border-color .15s;
}
.item:hover { border-color: var(--brand); }
.flag { width: 32px; height: 24px; border-radius: 5px; object-fit: cover; background: var(--line); flex-shrink: 0; }
.price { font-weight: 800; white-space: nowrap; color: var(--brand); font-family: var(--display); }
.stock { font-size: .78rem; color: var(--muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--line); color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.wait { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }

/* Order view */
.number-box { text-align: center; padding: 24px 14px; }
.number { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: .02em; word-break: break-all; }
.code-box { text-align: center; background: var(--card); border: 1px solid rgba(200, 240, 49, .45); box-shadow: 0 0 40px -10px var(--glow); border-radius: var(--radius); padding: 20px; margin-top: 12px; }
.code { font-family: var(--display); font-size: 2.8rem; font-weight: 700; letter-spacing: .12em; color: var(--brand); text-shadow: 0 0 24px var(--glow); }
.waiting { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Wallet */
.balance-card { position: relative; overflow: hidden; background: linear-gradient(140deg, #1a2210, #0e120c 60%); border: 1px solid rgba(200, 240, 49, .3); }
.balance-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 240, 49, .35), transparent 70%); }
.big-balance { font-family: var(--display); font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amounts button { padding: 13px 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-weight: 700; cursor: pointer; font-size: .95rem; font-family: var(--display); }
.amounts button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.methods button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 8px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font-weight: 700; font-size: .92rem; cursor: pointer; font-family: inherit; text-align: center; min-width: 0;
}
.methods button[data-m="mtn"].active { border-color: #ffcc00; background: rgba(255, 204, 0, .1); box-shadow: 0 0 0 1px #ffcc00 inset; }
.methods button[data-m="orange"].active { border-color: #ff7900; background: rgba(255, 121, 0, .1); box-shadow: 0 0 0 1px #ff7900 inset; }
.logo-chip { flex-shrink: 0; width: 42px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .66rem; font-weight: 900; letter-spacing: -.01em; }
.pay-logos { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.pay-logos span { font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 7px; }
.mtn { background: #ffcc00; color: #000; }
.orange { background: #ff7900; color: #fff; }

.tx { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.plus { color: var(--brand); font-weight: 700; white-space: nowrap; }
.minus { color: var(--text); font-weight: 700; white-space: nowrap; }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 26px 20px 22px; margin-bottom: 18px; background: #0b0f09; border: 1px solid var(--line-2); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(200, 240, 49, .22) 1px, transparent 1.3px); background-size: 14px 14px; mask-image: radial-gradient(ellipse at 80% 20%, #000 10%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 80% 20%, #000 10%, transparent 65%); }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 240, 49, .3), transparent 65%); }
.hero > * { position: relative; z-index: 1; }
.hero .kicker { color: var(--muted); font-size: .95rem; margin-bottom: 4px; }
.hero h1 { font-size: 2.3rem; text-transform: uppercase; line-height: 1; margin: 0 0 12px; }
.hero h1 span { color: var(--brand); display: block; text-shadow: 0 0 30px var(--glow); }
.hero p { color: #c5ccbd; margin: 0; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.how div { background: rgba(17, 21, 15, .85); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px; font-size: .78rem; color: var(--muted); }
.how b { display: block; font-size: 1.1rem; color: var(--brand); font-family: var(--display); }
.hero-stats { display: flex; gap: 22px; margin-top: 16px; }
.hero-stats b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--brand); line-height: 1.1; }
.hero-stats span { font-size: .78rem; color: var(--muted); }

/* Auth screens */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-head { text-align: center; margin: 8px 0 18px; }
.auth-head .logo { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px; font-size: 1.5rem; }
.auth-head h1 { font-size: 1.9rem; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.perks { display: grid; gap: 8px; margin-top: 16px; }
.perks div { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: #c5ccbd; }
.perks i { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-style: normal; font-size: .75rem; font-weight: 800; flex-shrink: 0; }

/* Toast + modal */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--brand); color: var(--brand-ink); padding: 12px 20px; border-radius: 999px; z-index: 50; max-width: 90vw; font-weight: 700; box-shadow: 0 0 30px var(--glow);
}
.toast.error { background: var(--danger); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.modal[hidden] { display: none; }
.sheet { background: var(--card); border: 1px solid var(--line-2); width: 100%; max-width: 520px; border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .modal { align-items: center; } .sheet { border-radius: 26px; } }

.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 6px; cursor: pointer; background: none; border: 0; font-size: .95rem; padding: 4px 0; font-family: inherit; }
.back:hover { color: var(--brand); }
.skeleton { height: 56px; border-radius: 16px; background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* Help & support */
.help-fab {
  position: fixed; right: 18px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 11;
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center;
  box-shadow: 0 0 0 6px rgba(200, 240, 49, .12), 0 0 28px var(--glow);
}
.help-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.help-fab:active { transform: scale(.95); }
@media (min-width: 900px) { .help-fab { right: calc(50% - 440px); } }
.fab-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; font-weight: 700; padding: 0; font-size: inherit; font-family: inherit; }
.link-btn.muted { color: var(--muted); }
textarea { resize: vertical; min-height: 48px; line-height: 1.45; }

.faq { border-bottom: 1px solid var(--line); }
.faq:last-child { border-bottom: 0; }
.faq-q { width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center; background: none; border: 0; color: var(--text); font-weight: 600; font-size: .98rem; padding: 14px 0; cursor: pointer; text-align: left; font-family: inherit; }
.faq-q span:last-child { font-size: 1.3rem; font-weight: 400; }
.faq-a { color: #c5ccbd; font-size: .92rem; padding: 0 0 14px; }

.thread, .chat { display: flex; flex-direction: column; gap: 10px; }
.chat { height: min(52vh, 440px); overflow-y: auto; margin: 14px -4px 0; padding: 4px; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: .93rem; line-height: 1.45; word-wrap: break-word; }
.bubble.them { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line-2); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 6px; }
.bubble .who { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .7; margin-bottom: 3px; }
.bubble .when { font-size: .7rem; opacity: .6; margin-top: 4px; text-align: right; }
.reply { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.reply textarea { flex: 1; border-radius: 18px; min-height: 48px; max-height: 140px; resize: none; }
.reply .btn { padding: 13px 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 999px; padding: 7px 12px; font-size: .82rem; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.typing { display: flex; gap: 4px; padding: 4px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-sheet { max-width: 480px; }

/* Shared admin bits (also used on admin.html) */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.stat .l { font-size: .8rem; color: var(--muted); }
.stat .v { font-family: var(--display); font-size: 1.5rem; font-weight: 700; margin-top: 4px; }
.stat.hl { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 0 30px -6px var(--glow); }
.stat.hl .l { color: rgba(10, 13, 6, .7); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(200, 240, 49, .03); }
.notice { background: var(--brand-soft); border: 1px solid rgba(200, 240, 49, .28); color: var(--text); border-radius: 14px; padding: 12px 14px; font-size: .88rem; line-height: 1.45; }
.notice b { color: var(--brand); }
