/* =====================================================================
   INTEL AFRICA — intel.css
   Design tokens, base, layout and core components. Loaded on every page.
   Order: intel.css → polish.css → v2.css → (wallet.css | home.css)
   ===================================================================== */

:root {
  --brand: #0052FF;
  --brand-2: #00C6FF;
  --grad: linear-gradient(135deg, #0052FF, #00C6FF);
  --grad-soft: linear-gradient(135deg, rgba(0,82,255,.10), rgba(0,198,255,.10));
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface-2: #F3F5F8;
  --text: #1A1A1A;
  --muted: #6B7280;
  --faint: #98A2B3;
  --border: #E2E7EF;
  --success: #0E9F6E;    --success-bg: #E6F7EF;
  --warning: #8A6500;    --warning-bg: #FFF4CC;
  --danger: #E5484D;     --danger-bg: #FDECEC;
  --panel: linear-gradient(155deg, #061540, #0A2E9A);
  --panel-glow: radial-gradient(60% 60% at 85% 10%, rgba(0,170,255,.5), transparent 70%);
  --withdraw: #FFD21A;   --withdraw-text: #1B1500;
  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 22px;
  --r-modal: 28px; --r-pill: 99px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px -8px rgba(16,24,40,.10);
  --shadow-brand: 0 10px 18px -12px rgba(0,82,255,.8);
  --shine: inset 0 1px 0 rgba(255,255,255,.2);
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-pop: cubic-bezier(.2,.9,.3,1.1);

  /* extra tokens */
  --link: #0052FF;
  --ring: 0 0 0 3px rgba(0,82,255,.15);
  --toast-bg: #111827;  --toast-text: #FFFFFF;
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-num: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0A0F1A; --surface: #111827; --surface-2: #182133;
  --text: #F3F6FB; --muted: #9AA6BA; --faint: #6B7891; --border: #243149;
  --success: #34D399; --success-bg: rgba(52,211,153,.12);
  --warning: #FBD25E; --warning-bg: rgba(251,210,94,.12);
  --danger: #F87171; --danger-bg: rgba(248,113,113,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px -10px rgba(0,0,0,.6);
  --link: #5B9BFF;
  --ring: 0 0 0 3px rgba(91,155,255,.22);
  --toast-bg: #F3F6FB;  --toast-text: #0A0F1A;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); font-size: 13.5px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
strong { font-weight: 800; }
[hidden] { display: none !important; }
.icon { flex: none; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.card-title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.small, .small-link { font-size: 12.5px; }
.small-link { font-weight: 700; }
.label-caps { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* money: tabular figures, 800 weight, ₦ at 60% / 600 / 80% opacity */
.money { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; font-weight: 800; white-space: nowrap; }
.money .cur { font-size: .6em; font-weight: 600; opacity: .8; margin-right: .1em; vertical-align: .32em; }

/* ---------- logo ---------- */
.logo-link { display: inline-flex; color: var(--text); }
.logo { height: 26px; width: auto; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.label .opt { font-weight: 500; color: var(--faint); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.input {
  display: block; width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text); font-size: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.has-error .input, .input[aria-invalid="true"] { border-color: var(--danger); }
.has-error .input:focus { box-shadow: 0 0 0 3px rgba(229,72,77,.15); }
.help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.help.err { color: var(--danger); }
.help.ok  { color: var(--success); }
.help.ref { color: var(--link); font-weight: 700; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.eye-btn {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 9px;
  background: transparent; color: var(--faint);
}
.eye-btn:hover { color: var(--text); }
.eye-btn .i-off, .eye-btn[aria-pressed="true"] .i-on { display: none; }
.eye-btn[aria-pressed="true"] .i-off { display: block; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.strength { height: 4px; margin-top: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.strength i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--danger); transition: background-color .25s var(--ease); }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; margin-bottom: 16px; border-radius: 12px; font-size: 13px; font-weight: 600; background: var(--danger-bg); color: var(--danger); text-align: left; }
.alert .icon { margin-top: 1px; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.info { background: var(--warning-bg); color: var(--warning); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px;
  font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none;
  user-select: none; -webkit-user-select: none;
  transition: transform .12s var(--ease), box-shadow .2s var(--ease), border-color .15s, color .15s, opacity .15s, background-color .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand), var(--shine); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--link); }
.btn.is-loading { color: transparent !important; opacity: 1; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: ia-spin .7s linear infinite;
}
.btn-ghost.is-loading::after { border-color: var(--border); border-top-color: var(--brand); }
@keyframes ia-spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  transition: border-color .15s, color .15s, transform .12s var(--ease);
}
.icon-btn:hover { border-color: var(--brand); color: var(--link); }
.icon-btn:active { transform: scale(.96); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* ---------- auth pages ---------- */
.auth {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 84px 16px 48px;
  background:
    radial-gradient(80% 50% at 50% -10%, rgba(0,82,255,.12), transparent 70%),
    radial-gradient(40% 30% at 100% 100%, rgba(0,198,255,.10), transparent 70%),
    var(--bg);
}
.auth-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; }
.auth-card {
  width: 100%; max-width: 400px; padding: 28px 24px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.auth-sub { margin: 6px 0 22px; color: var(--muted); font-size: 13px; }
.auth-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.auth-foot a { font-weight: 700; }
.hero-ico { width: 60px; height: 60px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; background: var(--grad-soft); color: var(--link); }
.hero-ico.ok  { background: var(--success-bg); color: var(--success); }
.hero-ico.bad { background: var(--danger-bg);  color: var(--danger); }

/* ---------- member layout ---------- */
.app { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
.app-main { max-width: 560px; margin: 0 auto; padding: 4px 16px 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 560px; margin: 0 auto; padding: 14px 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.avatar {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.02em;
  box-shadow: var(--shine), 0 6px 14px -8px rgba(0,82,255,.7);
}
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }
.greet { line-height: 1.2; min-width: 0; }
.greet small { display: block; font-size: 12px; color: var(--muted); }
.greet strong { display: block; font-size: 17px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: var(--r-pill); border: 2px solid var(--bg);
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; line-height: 1;
}

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-head.tight { margin-bottom: 12px; }

/* announcement */
.banner { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 14px; border-radius: var(--r); background: var(--grad-soft); border: 1px solid rgba(0,82,255,.16); }
.banner strong { display: block; font-size: 13px; }
.banner p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.banner-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--grad); color: #fff; }

/* quick actions */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); font-size: 12px; font-weight: 700; text-align: center;
  transition: transform .15s var(--ease), border-color .15s;
}
.qa:active { transform: scale(.97); }
.qa-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--grad-soft); color: var(--link); }
.plan-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; color: var(--plan); background: color-mix(in srgb, var(--plan) 12%, transparent); }

/* checklist */
.progress { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.check-list { list-style: none; margin: 10px 0 0; padding: 0; }
.check-list a { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--text); border-top: 1px solid var(--border); }
.check-list li:first-child a { border-top: 0; }
.tick { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1.5px dashed var(--faint); color: var(--muted); }
.is-done .tick { border: 0; background: var(--success); color: #fff; }
.ci-text { flex: 1; min-width: 0; }
.ci-title { display: block; font-weight: 700; font-size: 13.5px; }
.ci-hint { display: block; font-size: 12px; color: var(--muted); }
.is-done .ci-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.is-done .ci-hint { color: var(--success); font-weight: 700; }
.is-done a { pointer-events: none; }
.ci-chev { color: var(--faint); }

/* transactions */
.tx-list { padding: 4px 16px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.tx:first-child { border-top: 0; }
.tx-ico { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--success-bg); color: var(--success); }
.tx.debit .tx-ico { background: var(--danger-bg); color: var(--danger); }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 12px; color: var(--muted); }
.tx-amt { font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.tx.credit .tx-amt { color: var(--success); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 8px; text-align: center; color: var(--muted); }
.empty strong { color: var(--text); font-size: 13.5px; }
.empty p { font-size: 12.5px; }
.empty-ico { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 14px; background: var(--surface-2); color: var(--faint); }

/* me page */
.profile { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.profile .muted { font-size: 12.5px; margin-top: 2px; word-break: break-all; }
.menu { margin-top: 14px; padding: 6px 16px; }
.menu form { margin: 0; }
.menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 0;
  border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); text-align: left; font-weight: 700; font-size: 13.5px;
}
.menu > :first-child, .menu > :first-child .menu-row { border-top: 0; }
.menu-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.menu-ico .i-sun, [data-theme="dark"] .menu-ico .i-moon { display: none; }
[data-theme="dark"] .menu-ico .i-sun { display: block; }
.menu-text { flex: 1; }
.menu-row.danger { color: var(--danger); }
.menu-row.danger .menu-ico { background: var(--danger-bg); color: var(--danger); }
.switch { position: relative; width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--border); transition: background-color .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease-pop); }
[data-theme="dark"] .switch { background: var(--brand); }
[data-theme="dark"] .switch::after { transform: translateX(16px); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(102px + env(safe-area-inset-bottom)); z-index: 100;
  max-width: calc(100% - 32px); padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--toast-bg); color: var(--toast-text); font-size: 13px; font-weight: 600; text-align: center;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transform: translate(-50%, 14px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }
.auth-body .toast, .home .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Part 5 — reduced motion: nothing animates at all. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
