/* ==========================================================================
   Cazieo web portals - design tokens and components
   Brand: navy #0A2463 · royal blue #0047AB · gold #F8B400
   Icons: single-line (1.75 stroke), navy line on a gold tile
   ========================================================================== */

:root {
  --navy-900: #061844;
  --navy-800: #0A2463;
  --navy-700: #12307A;
  --blue-600: #0047AB;
  --blue-500: #1F5FC4;
  --blue-50:  #EAF1FC;
  --gold-500: #F8B400;
  --gold-400: #FFC83D;
  --gold-100: #FFF4D6;
  --ink:      #0B1530;
  --ink-2:    #3D4A66;
  --ink-3:    #5E6A82;
  --line:     #DFE4EE;
  --line-2:   #EEF1F6;
  --ground:   #F5F7FB;
  --surface:  #FFFFFF;
  --good:     #0F7B4D;
  --good-50:  #E5F5ED;
  --warn:     #9A5B00;
  --warn-50:  #FFF3DD;
  --bad:      #B42318;
  --bad-50:   #FDECEA;
  --radius:   14px;
  --radius-sm: 10px;
  --shadow:   0 1px 2px rgba(10, 36, 99, .06), 0 8px 24px rgba(10, 36, 99, .06);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--ground); }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-800); text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Icon tile: gold background, navy single-line icon ---------- */
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--gold-500); color: var(--navy-800); }
.ico svg { width: 22px; height: 22px; }
.ico--sm { width: 34px; height: 34px; border-radius: 10px; }
.ico--sm svg { width: 18px; height: 18px; }
.ico--lg { width: 56px; height: 56px; border-radius: 16px; }
.ico--lg svg { width: 26px; height: 26px; }
.ico--soft { background: var(--gold-100); }
.ico--plain { background: transparent; color: currentColor; width: 22px; height: 22px; }
.ico--plain svg { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; font: 600 15px/1 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-900); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-600); color: var(--blue-600); }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--blue-600); font: 600 14px var(--font); cursor: pointer; padding: 8px 0; min-height: 44px; }
.btn[disabled], .btn-link[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: 500 16px var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-50); outline: none; }
.input.is-invalid { border-color: var(--bad); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.input-group:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-50); }
.input-group .addon { display: flex; align-items: center; padding: 0 14px; background: var(--ground); border-right: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.input-group .input { border: none; box-shadow: none; border-radius: 0; }
.error { font-size: 13px; color: var(--bad); }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* OTP / MPIN boxes */
.otp { display: flex; gap: 10px; }
.otp input { width: 52px; height: 58px; text-align: center; font: 700 22px var(--font); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--navy-800); }
.otp input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-50); outline: none; }
@media (max-width: 400px) { .otp { gap: 6px; } .otp input { width: 44px; height: 52px; } }

/* ---------- Alerts and badges ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.alert-info { background: var(--blue-50); color: var(--navy-800); }
.alert-ok { background: var(--good-50); color: var(--good); }
.alert-bad { background: var(--bad-50); color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--good-50); color: var(--good); }
.badge-warn { background: var(--warn-50); color: var(--warn); }
.badge-bad { background: var(--bad-50); color: var(--bad); }
.badge-blue { background: var(--blue-50); color: var(--blue-600); }

/* ==========================================================================
   Auth layout (sign-in / sign-up)
   ========================================================================== */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand { flex: 1 1 420px; position: relative; overflow: hidden; background: var(--navy-800); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-brand::before { content: ""; position: absolute; right: -180px; top: -160px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid var(--blue-600); opacity: .55; }
.auth-brand::after { content: ""; position: absolute; right: -60px; top: 120px; width: 300px; height: 300px; border-radius: 50%; border: 26px solid var(--gold-500); opacity: .9; clip-path: polygon(0 40%, 100% 40%, 100% 100%, 0 100%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: inline-flex; background: #fff; border-radius: 14px; padding: 10px 16px; align-self: flex-start; }
.auth-logo img { height: 40px; width: auto; display: block; }
.auth-brand h2 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 440px; }
.auth-brand p { color: #C9D4EE; max-width: 420px; font-size: 16px; }
.auth-points { display: flex; flex-direction: column; gap: 14px; }
.auth-points div { display: flex; gap: 12px; align-items: center; color: #E4EAF7; font-weight: 500; }
.auth-panel { flex: 999 1 520px; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 36px; display: flex; flex-direction: column; gap: 24px; }
.auth-card header { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 900px) { .auth-brand { padding: 28px 24px; flex-basis: 100%; } .auth-brand h2 { font-size: 24px; } .auth-points { display: none; } .auth-card { padding: 24px; } }

/* Portal picker on the sign-in page */
.portal-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.portal-tabs input { position: absolute; opacity: 0; }
.portal-tabs label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: center; min-height: 44px; }
.portal-tabs input:checked + label { border-color: var(--blue-600); background: var(--blue-50); color: var(--navy-800); }
.portal-tabs input:focus-visible + label { outline: 3px solid var(--gold-400); outline-offset: 2px; }

/* Sign-up stepper */
.stepper { display: flex; gap: 6px; }
.stepper span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.stepper span.done { background: var(--blue-600); }
.stepper span.now { background: var(--gold-500); }
.step-label { font-size: 12px; font-weight: 700; color: var(--blue-600); letter-spacing: .06em; text-transform: uppercase; }

/* ==========================================================================
   Portal layout (dashboards)
   ========================================================================== */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 260px; max-width: 100%; background: var(--navy-800); color: #C9D4EE; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 12px; margin-bottom: 14px; }
.sidebar .brand img { height: 32px; width: auto; }
.sidebar .who { padding: 4px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 8px; }
.sidebar .who b { display: block; color: #fff; font-size: 15px; }
.sidebar .who span { font-size: 12.5px; }
.nav-title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8FA0C6; padding: 14px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: #DCE4F5; font-weight: 500; min-height: 46px; }
.nav-link:hover { background: var(--navy-700); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav-link .ico { width: 32px; height: 32px; border-radius: 9px; }
.nav-link .ico svg { width: 17px; height: 17px; }
.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1 1 280px; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground); color: var(--ink-3); }
.topbar .search input { border: none; background: transparent; font: 500 15px var(--font); flex: 1; min-width: 0; color: var(--ink); }
.topbar .search input:focus { outline: none; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--navy-800); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.content { padding: 28px; display: flex; flex-direction: column; gap: 24px; max-width: 1400px; width: 100%; }
@media (max-width: 700px) { .content { padding: 18px; } .topbar { padding: 14px 18px; } }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.page-head .crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-services { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.kpi { display: flex; gap: 14px; align-items: flex-start; }
.kpi .label { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.kpi .value { font-size: 24px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.kpi .delta { font-size: 12.5px; font-weight: 600; margin-top: 2px; }

.service { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-height: 120px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.service:hover { border-color: var(--gold-500); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transform: translateY(-1px); }
.service b { font-size: 15px; }
.service span { font-size: 12.5px; color: var(--ink-3); margin-top: -8px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.list-row:first-of-type { border-top: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .amt { font-weight: 700; white-space: nowrap; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--ground); }
table.data td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:hover td { background: #FAFBFE; }

.hero-balance { background: var(--navy-800); color: #fff; border: none; position: relative; overflow: hidden; }
.hero-balance::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 240px; height: 240px; border-radius: 50%; border: 28px solid var(--gold-500); opacity: .85; }
.hero-balance > * { position: relative; z-index: 1; }
.hero-balance .label { color: #C9D4EE; }
.hero-balance .value { color: #fff; font-size: 32px; font-weight: 700; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; text-align: center; color: var(--ink-3); }
.map-ph { min-height: 280px; border-radius: 12px; background: linear-gradient(135deg, var(--blue-50), #fff); border: 1px dashed #B7C7E6; display: flex; align-items: center; justify-content: center; color: var(--ink-3); text-align: center; padding: 20px; }


/* ---------- prepaid card and wallet services ---------- */
.vcard { position: relative; aspect-ratio: 1.586; max-width: 380px; width: 100%; border-radius: 18px; padding: 20px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800) 0%, #0047AB 100%); box-shadow: 0 14px 34px rgba(10,36,99,.25); display: flex; flex-direction: column; justify-content: space-between; }
.vcard::after { content: ""; position: absolute; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 22px solid rgba(248,180,0,.85); }
.vcard.blocked { filter: grayscale(.85); }
.vcard .num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: .12em; }
.vcard .meta { display: flex; justify-content: space-between; font-size: 12px; opacity: .9; }
.vcard .chip { width: 40px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #F8D36B, #C99400); }
.offer { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px dashed var(--gold-500); border-radius: var(--radius); background: #FFF8E6; }
.offer .code { font-family: ui-monospace, monospace; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { min-width: 140px; flex: 1; }
.reveal { font-family: ui-monospace, monospace; font-size: 18px; letter-spacing: .08em; }
