/* kentel — shared design tokens.
   Palette is deliberately a dark, toxic-green "venom" scheme: it's the
   literal brand mark (VenomByte / "spitting tech like venom"), not a
   generic dark-mode default — the green is saturated and warm-leaning
   rather than a neutral mint, and pairs with a cool cyan for data/telemetry
   so the two accents read as "venom" vs "signal" rather than a random pair. */
:root {
  --void:        #07100B;
  --panel:       #0E1A13;
  --panel-raised:#13251A;
  --line:        #1E3527;

  --venom:       #9FFF3B;
  --venom-deep:  #6FD11E;
  --signal:      #2BE7C9;

  --text:        #E8F5E4;
  --text-muted:  #82998A;
  --text-faint:  #4C6157;

  --danger:      #FF5C5C;
  --warn:        #FFC24B;
  --ok:          #64E38A;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: -apple-system, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-body: -apple-system, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}


* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--void);
  background-image:
    radial-gradient(60% 50% at 85% -10%, rgba(159,255,59,0.08), transparent),
    radial-gradient(40% 40% at 0% 100%, rgba(43,231,201,0.06), transparent);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--venom); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
code, .mono { font-family: var(--font-mono); }
button, input, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel-raised);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  transition: border-color .15s ease, transform .05s ease;
}
button:hover { border-color: var(--venom-deep); }
button:active { transform: translateY(1px); }
button.primary {
  background: var(--venom);
  color: #06210B;
  border-color: var(--venom);
  font-weight: 600;
}
button.primary:hover { background: var(--venom-deep); border-color: var(--venom-deep); }
button:disabled { opacity: .5; cursor: not-allowed; }

input, select {
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}
label { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; }
tr:hover td { background: rgba(159,255,59,0.03); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; border: 1px solid var(--line);
}
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
.badge.danger { color: var(--danger); border-color: var(--danger); }
.badge.muted { color: var(--text-muted); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.footer-brand {
  text-align: center;
  padding: 22px 16px 28px;
  color: var(--text-faint);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.footer-brand .credit { color: var(--text-muted); font-weight: 600; }
.footer-brand .tagline { color: var(--venom); }
.footer-brand .sponsor { margin-top: 4px; }
.footer-brand .engine { color: var(--signal); font-family: var(--font-mono); font-size: 11px; }

::selection { background: var(--venom); color: #06210B; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Toggled by JS instead of inline style attributes, so the Content-Security
   -Policy can forbid inline styles outright (style-src 'self'). */
.is-hidden { display: none !important; }

/* ===================================================================
   RESPONSIVE FOUNDATION
   Mobile-first. The captive portal is opened on a phone the instant a
   customer joins the WiFi, while staff run the dashboard on anything
   from a 5" phone to a widescreen monitor, so both extremes are real.
   =================================================================== */

html {
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text in landscape */
  text-size-adjust: 100%;
}

body {
  /* Keeps content clear of notches and home indicators on modern phones. */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img { max-width: 100%; height: auto; }

/* Inputs below 16px make iOS Safari zoom the whole page on focus, which
   then leaves the layout scrolled sideways. 16px is the floor. */
input, select, textarea { font-size: 16px; }
@media (min-width: 700px) {
  input, select, textarea { font-size: 14px; }
}

/* Touch targets. 44px is the smallest reliably tappable size. */
@media (pointer: coarse) {
  button, .nav a, a.tap { min-height: 44px; }
}

/* Tables are the worst offender on narrow screens: they force the whole
   page to scroll sideways. Wrapping each one lets the table scroll on its
   own while the page stays put. */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 560px; }

@media (max-width: 560px) {
  th, td { padding: 9px 10px; font-size: 12.5px; }
  th { font-size: 11px; }
}

/* Brand identity blocks (tenant name, domain, logo) */
.brand-logo {
  max-height: 46px;
  max-width: 160px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}
.brand-domain {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 3px;
  word-break: break-all;
}
.network-domain {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 6px;
}
.support-strip {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 14px 16px 0;
}
.support-strip a { color: var(--signal); }

/* Respect reduced-motion everywhere, not only in the loader. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
