:root {
  --p: #2455d6; --p-dark: #1b43ad; --side: #101d45; --side-hi: #243d7a;
  --bg: #f5f7fb; --card: #fff; --text: #172033; --muted: #697386; --line: #e5e9f2;
  --ok: #159957; --ok-bg: #e9f8ef; --warn: #b26b00; --warn-bg: #fff5e0; --bad: #d23b3b; --bad-bg: #fdecec;
  --blue-bg: #eaf0ff; --gray-bg: #edf0f5;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Noto Sans Bengali", "Hind Siliguri", "Nirmala UI", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--p); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--gray-bg); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
h1 { font-size: 22px; margin: 0; } h3 { font-size: 15px; margin: 0 0 12px; }
small, .small { font-size: 12px; } .muted { color: var(--muted); } .center { text-align: center; } .mt { margin-top: 16px; }

/* layout */
.app { display: flex; min-height: 100vh; }
.side { width: 232px; background: var(--side); color: #fff; padding: 20px 12px; position: fixed; inset: 0 auto 0 0; overflow-y: auto; }
.brand { display: block; color: #fff; font-size: 19px; font-weight: 700; padding: 6px 10px 22px; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-size: 11px; font-weight: 400; opacity: .7; margin-top: 4px; }
.nav a { display: flex; gap: 10px; align-items: center; color: #dce4ff; padding: 10px 12px; border-radius: 10px; margin: 3px 0; }
.nav a:hover, .nav a.active { background: var(--side-hi); color: #fff; text-decoration: none; }
.main { margin-left: 232px; width: calc(100% - 232px); }
.top { height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 3; }
.top-title { font-weight: 700; }
.top-user { display: flex; gap: 14px; align-items: center; color: var(--muted); }
.container { padding: 22px 26px 60px; max-width: 1400px; margin: 0 auto; }
.title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.title p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: 0 2px 10px #17203308; min-width: 0; }
.card.narrow { max-width: 640px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .num { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 10px 16px; background: var(--p); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.btn:hover { background: var(--p-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--p); border: 1px solid #b9c7ef; }
.btn.green { background: var(--ok); } .btn.red { background: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.block { display: block; width: 100%; margin-top: 14px; }
.link { background: none; border: 0; color: var(--p); cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px; }
form.inline input { padding: 6px 8px; border: 1px solid #d8deea; border-radius: 6px; font: inherit; font-size: 12px; width: 120px; }
.badge { display: inline-block; border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge.green { background: var(--ok-bg); color: var(--ok); } .badge.gray { background: var(--gray-bg); color: #687386; }
.badge.blue { background: var(--blue-bg); color: var(--p); } .badge.amber { background: var(--warn-bg); color: var(--warn); }
.badge.red { background: var(--bad-bg); color: var(--bad); }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #bfe8cf; color: #0e6b3d; }
.flash.error { background: var(--bad-bg); border-color: #f5c2c2; color: #9d2222; }
.flash.warn { background: var(--warn-bg); border-color: #f3dca8; color: #7a4a00; }
.empty { color: var(--muted); padding: 22px; text-align: center; }
.empty.big { padding: 40px; font-size: 15px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--text); }
.tabs a.active { background: var(--p); color: #fff; border-color: var(--p); }
.kv { list-style: none; padding: 0; margin: 14px 0 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv li span { color: var(--muted); white-space: nowrap; } .kv li b { font-weight: 600; text-align: right; word-break: break-word; }
.faq { border-bottom: 1px solid var(--line); padding: 10px 0; } .faq summary { cursor: pointer; font-weight: 600; }

/* chart */
.chart { margin: 0 0 8px; } .chart figcaption { font-weight: 700; margin-bottom: 8px; }
.chart svg { width: 100%; height: 180px; display: block; }
.chart .bar { fill: var(--p); } .chart .bar:hover { fill: var(--p-dark); }
.chart .axis { fill: var(--muted); font-size: 10px; } .chart .baseline { stroke: var(--line); }
.chart-max { color: var(--muted); font-size: 11px; text-align: right; }

/* forms */
.form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea { width: 100%; padding: 10px; border: 1px solid #d8deea; border-radius: 8px; background: #fff; font: inherit; }
.form textarea { min-height: 80px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #b9c7ef; border-color: var(--p); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.presets, .pay, .days { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.presets button { border: 1px solid #d8deea; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: inherit; }
.presets button:hover { border-color: var(--p); color: var(--p); }
.form .days label, .form .pay label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* auth */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 16px; }
.auth { display: grid; grid-template-columns: 420px 1fr; max-width: 980px; width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px #17203318; }
.auth-form { border-radius: 0; padding: 32px; border: 0; }
.auth-brand { font-size: 20px; margin-bottom: 18px; } .auth-brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.auth-side { background: linear-gradient(135deg, #e8eeff, #f3f0ff); padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { font-size: 22px; margin: 0 0 18px; }
.stats { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.stats li { font-size: 15px; } .stats b { font-size: 22px; color: var(--p); margin-right: 6px; }

/* wizard */
.wizard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.step { margin-bottom: 14px; }
.step h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--p); color: #fff; font-size: 14px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 6px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.form .choice { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 14px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; text-align: center; }
.choice span { font-size: 26px; } .choice small { color: var(--muted); font-weight: 400; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--p); background: var(--blue-bg); color: var(--p); box-shadow: 0 0 0 1px var(--p); }
.assist { background: #f7f5ff; border: 1px solid #e3dcff; border-radius: 10px; padding: 4px 14px 14px; margin-bottom: 4px; }
.assist .btn { margin-top: 10px; }
.suggestions { display: grid; gap: 6px; margin-top: 10px; }
.suggestions button { text-align: left; background: #fff; border: 1px solid #e3dcff; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.suggestions button:hover { border-color: #5b35d5; }
.tree, .tree ul { list-style: none; margin: 0; padding-left: 18px; }
.tree { padding-left: 0; }
.tree summary { cursor: pointer; padding: 4px 0; }
.form .tree label, .form label.all { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; margin: 2px 0; }
.form .tree label.hs { font-weight: 400; } .tree small { color: var(--muted); }
.form label.all { padding: 8px 12px; border: 1px dashed #b9c7ef; border-radius: 8px; margin-bottom: 8px; }
.tree input:disabled + * , .tree label:has(input:disabled) { opacity: .55; }
.sticky { position: sticky; top: 74px; }
.est { list-style: none; padding: 0; margin: 0; }
.est li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.est b { font-variant-numeric: tabular-nums; }
.balance { margin-top: 12px; padding: 10px; background: var(--gray-bg); border-radius: 8px; font-size: 13px; }

/* ad card (same look as on the hotspot login page) */
.phone-mini { background: #eef1f7; border-radius: 14px; padding: 12px; }
.adcard { position: relative; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px #0002; }
.adcard img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.adtag { position: absolute; top: 8px; right: 8px; background: #000a; color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 10px; }
.adcard.noimg .adtag { position: static; float: right; margin: 10px 10px 0 6px; }
.adbody { padding: 12px 14px 14px; }
.adh { font-size: 17px; font-weight: 700; line-height: 1.35; }
.adb { color: #444; margin-top: 4px; font-size: 13px; }
.adcta { display: inline-block; margin-top: 10px; background: #f5a800; color: #1a1a1a; font-weight: 700; border-radius: 20px; padding: 6px 16px; font-size: 13px; }
.adfrom { color: var(--muted); font-size: 11px; margin-top: 8px; }

/* offer landing page */
body.offer { background: #eef1f7; }
.offer-wrap { max-width: 440px; margin: 0 auto; padding: 20px 16px; }

@media (max-width: 1100px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wizard-grid, .g2-1 { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 800px) {
  .side { position: static; width: auto; padding: 10px; }
  .app { flex-direction: column; }
  .brand { padding: 4px 6px 8px; font-size: 16px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav a { white-space: nowrap; padding: 8px 10px; margin: 0; }
  .main { margin-left: 0; width: 100%; }
  .top { padding: 0 16px; position: static; }
  .container { padding: 16px; }
  .g5, .g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form { padding: 22px; }
  .row2, .choices.two { grid-template-columns: 1fr; }
}

/* wizard: area / network target pickers */
details.pick { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
details.pick > summary { cursor: pointer; font-weight: 700; }
details.pick > summary small { color: var(--muted); font-weight: 400; margin-left: 6px; }
details.pick .tree { margin-top: 8px; }
.red-text { color: var(--bad); }

/* language switch */
.lang-switch { font-size: 13px; color: var(--muted); white-space: nowrap; }
.lang-switch b { color: var(--text); }
.auth-lang { width: 100%; max-width: 980px; text-align: right; margin-bottom: 10px; }

/* creative templates (keep in sync with public/hotspot-ad.js and AdSlot.tsx) */
.adcard .adcta { background: var(--ad-accent, #f5a800); color: var(--ad-on, #1a1a1a); }
.adcard.tpl-banner { display: flex; align-items: center; gap: 10px; padding: 8px; }
.adcard.tpl-banner img { width: 72px; height: 72px; max-height: none; object-fit: cover; border-radius: 8px; flex: none; }
.adcard.tpl-banner .adbody { padding: 0 34px 0 0; flex: 1; min-width: 0; }
.adcard.tpl-banner .adh { font-size: 15px; }
.adcard.tpl-banner .adb { display: none; }
.adcard.tpl-banner .adcta { margin-top: 6px; padding: 4px 12px; font-size: 12px; }
.adcard.tpl-banner .adfrom { margin-top: 4px; }
.adcard.tpl-bold { background: var(--ad-accent, #f5a800); color: var(--ad-on, #1a1a1a); }
.adcard.tpl-bold img { max-height: 160px; }
.adcard.tpl-bold .adbody { padding: 18px 16px; text-align: center; }
.adcard.tpl-bold .adh { font-size: 21px; }
.adcard.tpl-bold .adb, .adcard.tpl-bold .adfrom { color: inherit; opacity: .9; }
.adcard.tpl-bold .adcta { background: var(--ad-on, #fff); color: var(--ad-accent, #f5a800); }
.adcard.noimg.tpl-banner .adtag { float: none; position: absolute; }

/* wizard: template / colour pickers, map */
.choices.tpl { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choices.tpl .choice { font-weight: 600; font-size: 13px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.form .swatch { margin: 0; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--a); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch:has(input:checked) span { box-shadow: 0 0 0 3px var(--p); }
.map { height: 320px; border-radius: 10px; margin: 8px 0; background: var(--gray-bg); display: grid; place-items: center; color: var(--muted); text-align: center; }
.radius-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form .radius-row label { margin: 0; }
.radius-row input[type=range] { flex: 1; min-width: 140px; }
