/* SkyPro Internet WiFi captive page.
 * Tokens are the customer app's (src/mobileapp/ui/theme.ts): light-only, white
 * cards on a soft blue-tinted canvas, slate neutrals, one sky accent for actions,
 * and the deep-to-bright blue brand card from the SkyPro Internet front page. */
:root {
  --bg: #F6F9FC; --card: #FFFFFF; --border: #E2E8F0; --border-strong: #CBD5E1;
  --text: #0F172A; --text-2: #475569; --muted: #64748B; --faint: #94A3B8;
  --primary: #0EA5E9; --primary-dark: #0284C7; --primary-deep: #0369A1; --primary-soft: #F0F9FF;
  --brand-deep: #062B4E; --brand-mid: #0F5E90; --brand-bright: #1E8FD3; --sky: #7FD1FF;
  --success: #059669; --success-soft: #ECFDF5; --success-border: #D1FAE5; --success-text: #047857;
  --warning-soft: #FFFBEB; --warning-border: #FEF3C7; --warning-text: #B45309;
  --on-brand-success: #4ADE80; --on-brand-warning: #FBBF24;
  --r-md: 12px; --r-lg: 16px; --gutter: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%;
  min-height: 100vh; padding: 16px 16px 28px; padding-top: max(16px, env(safe-area-inset-top));
}
.shell { width: 100%; max-width: 440px; margin: 0 auto; display: grid; gap: 14px; }
[hidden] { display: none !important; }

/* ---- brand card ---------------------------------------------------------- */
.brand {
  position: relative; overflow: hidden; border-radius: 18px; padding: var(--gutter);
  background: var(--brand-mid);
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-mid) 50%, var(--brand-bright) 100%);
  box-shadow: 0 16px 28px -16px rgba(15, 94, 144, 0.9); color: #fff;
  display: grid; gap: 18px;
}
.orb { position: absolute; border-radius: 999px; pointer-events: none; }
.orb-a { width: 170px; height: 170px; top: -60px; right: -40px; background: rgba(255, 255, 255, 0.1); }
.orb-b { width: 156px; height: 156px; bottom: -78px; left: -40px; background: rgba(127, 209, 255, 0.1); }
.brand-row { position: relative; display: flex; align-items: center; gap: 12px; }
.brand-foot { align-items: flex-end; justify-content: space-between; }
.brand-foot > div { min-width: 0; }   /* on narrow phones the tagline wraps instead of pushing the router out */
.logo { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 6px 14px rgba(0, 0, 0, 0.25); }
.brand-name { min-width: 0; }
.eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.3px; color: rgba(255, 255, 255, 0.7); }
h1 { margin: 1px 0 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.tagline { margin: 9px 0 0; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.router { display: block; flex-shrink: 0; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.28)); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.15); font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.6); }
.pill.warn .dot { background: var(--on-brand-warning); }
.pill.ok .dot { background: var(--on-brand-success); }

/* ---- cards & type -------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--gutter); }
h2 { margin: 0 0 2px; font-size: 17px; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
.lead { color: var(--text-2); margin-bottom: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.field-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tiny { font-size: 12px; color: var(--muted); text-align: center; margin: 2px 0; word-break: break-all; }
footer { padding: 2px 8px 0; }

/* ---- plans --------------------------------------------------------------- */
.plans { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.plan { position: relative; }
.plan input { position: absolute; opacity: 0; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.plan label { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--card); }
.plan .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; position: relative; }
.plan .info { flex: 1; min-width: 0; }
.plan .name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 16px; font-weight: 700; line-height: 1.25; }
.plan .speed { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.plan .price { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; padding: 2px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); border: 1px solid #E0F2FE; }
.plan input:checked + label { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.plan input:checked + label .radio { border-color: var(--primary); }
.plan input:checked + label .radio::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.plan input:checked + label .price { color: var(--primary-deep); }
.plan input:focus-visible + label { outline: 3px solid rgba(14, 165, 233, 0.35); outline-offset: 2px; }

/* ---- form ---------------------------------------------------------------- */
.field { margin: 0 0 16px; }
.field input { width: 100%; font: inherit; font-size: 16px; min-height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: #fff; color: var(--text); -webkit-appearance: none; appearance: none; }
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 14px; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; border-radius: var(--r-md); border: 1px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.btn:active { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.secure svg { flex-shrink: 0; }

.notice { background: var(--warning-soft); border: 1px solid var(--warning-border); color: var(--warning-text); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }

/* ---- states -------------------------------------------------------------- */
.okmark { width: 60px; height: 60px; border-radius: 50%; background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 6px auto 12px; }
.remaining { display: table; margin: 8px auto 16px; padding: 4px 10px; border-radius: 999px; background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success-text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.state { text-align: center; }
.state h2 { margin-bottom: 4px; }
.state .lead { margin-bottom: 16px; }
.spinner { width: 34px; height: 34px; margin: 10px auto 12px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---- how it works -------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); }
.steps b { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-deep); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.noscript { max-width: 440px; margin: 16px auto; padding: 0 16px; text-align: center; }

/* ---- account portal ------------------------------------------------------ */
.tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 16px; background: #F1F5F9; border-radius: var(--r-md); }
.tabs button { flex: 1; min-height: 38px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-2); background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.linkbtn { font: inherit; font-size: 14px; font-weight: 700; color: var(--primary-dark); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: none; }
.linkbtn.danger { color: #BE123C; }
.center-row { display: flex; justify-content: center; margin-top: 10px; }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn.small { min-height: 44px; font-size: 15px; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success-text); }
.chip.idle { background: #F1F5F9; border-color: var(--border); color: var(--text-2); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kv div { background: #F8FAFC; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; }
.kv .v { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kv .k { display: block; font-size: 12px; color: var(--muted); }
.devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.devices li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r-md); }
.devices .dname { display: block; font-weight: 700; font-size: 15px; }
.devices .dmac { display: block; font-size: 12.5px; color: var(--muted); }
.ok-note { background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success-text); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.info-note { background: var(--primary-soft); border: 1px solid #E0F2FE; color: var(--primary-deep); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; }
details.more { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
details.more summary { font-size: 14px; font-weight: 700; color: var(--primary-dark); cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 12px; }
.plan .devs { display: block; font-size: 12.5px; color: var(--muted); }
.dstatus { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.dstatus.on { color: var(--success-text); }
.dstatus.warn { color: var(--warning-text); }
