/* Wi5River captive portal — small, no web fonts (it loads before the user is online), strict CSP.
   Same look as the console sign-in pages; --brand is the tenant colour set by the layout. */
:root {
  --brand: #1e40af; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --line-2: #eef2f6; --input: #cbd5e1;
  --good: #16a34a; --bad: #dc2626;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; font: 14px/1.45 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, #f3f5f9) 0%, #f3f5f9 50%, #eef6f3 100%);
  display: flex; flex-direction: column; }
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, p { margin: 0; }
.ico { display: inline-block; vertical-align: -3px; }

.card { width: 100%; max-width: 410px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .12); padding: 2rem 1.75rem 1.6rem; animation: rise .35s ease both; }
.head { text-align: center; margin-bottom: 1.35rem; }
.logo { max-height: 56px; max-width: 220px; display: block; margin: 0 auto .85rem; }
.mark { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto .85rem; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 80%, #fff), var(--brand)); box-shadow: 0 6px 16px -6px var(--brand); }
.head h1 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.head .zone { display: inline-block; margin-top: .35rem; font-size: 12px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, #fff);
  padding: 2px 10px; border-radius: 999px; }
.head p { color: var(--muted); font-size: 13px; margin-top: .45rem; }

.tabs { display: flex; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 11px; margin-bottom: 1.1rem; }
.tabs a { flex: 1; text-align: center; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

.field + .field { margin-top: .9rem; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=tel] { width: 100%; height: 44px; padding: 0 .85rem; font: 15px var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--input); border-radius: 10px; outline: none; transition: border-color .12s, box-shadow .12s; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.otp-input { text-align: center; font: 700 24px var(--mono) !important; letter-spacing: .35em; height: 54px !important; }

.btn { display: flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; height: 46px; margin-top: 1.2rem; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; font: 600 15px var(--sans); cursor: pointer; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink-2); border: 1px solid var(--input); height: 40px; font-size: 13.5px; margin-top: 0; }
.btn.secondary:hover { background: #f8fafc; filter: none; }
.resend { display: flex; align-items: center; gap: .75rem; margin-top: .8rem; }
.resend .btn { width: auto; flex: none; padding: 0 1rem; }
.resend a { font-size: 13px; }

.alert { border-radius: 10px; padding: .65rem .85rem; font-size: 13px; margin-bottom: 1rem; border: 1px solid; }
.alert.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert.error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.alert.warning { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 1rem; text-align: center; }
.help { border-top: 1px solid var(--line-2); margin-top: 1.25rem; padding-top: .9rem; text-align: center; font-size: 12.5px; color: var(--muted); }

/* Status page */
.online { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12.5px; font-weight: 600; margin-top: .5rem; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: pulse 1.8s infinite; }
.online.off { background: #fef3c7; color: #92400e; }
.online.off i { background: #f59e0b; animation: none; }
.meters { display: grid; gap: .9rem; margin-top: .25rem; }
.meter .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.meter .row b { font-size: 16px; color: var(--ink); }
.bar { height: 8px; background: #eef2f6; border-radius: 4px; overflow: hidden; margin-top: .4rem; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .6s ease; }
.bar > i.low { background: #f59e0b; } .bar > i.out { background: var(--bad); }
.facts { margin: 1.1rem 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; }

footer { text-align: center; color: #94a3b8; font-size: 12px; padding: 0 1rem 1.2rem; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 100% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .card, .online i { animation: none; } }
@media (max-width: 420px) { .card { padding: 1.6rem 1.25rem 1.35rem; border-radius: 14px; } main { padding: .75rem; } }
