/* ========================================================================
   Crowe Host Control — panel.css
   Reusable tokens and components for the slim home-stack admin panel.
   Same family as Crowe Host Ingress and crowehost.com.
   Fonts: Oxanium (display), Inter (UI), JetBrains Mono (addresses, numbers).
   Dark is the default. Light tokens are included for a later theme switch;
   the mockups are dark only.
   Contrast: every text token is at least 4.5:1 on --panel and --panel-2.
   ======================================================================== */

@font-face {
  font-family: Inter;
  src: url("fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Oxanium;
  src: url("fonts/Oxanium.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---------------------------------------------------------- */
:root, .theme-dark {
  --ground: #0A0E17;
  --panel: #121826;
  --panel-2: #1A2235;
  --raise: #232E46;
  --line: #212C42;
  --line-2: #2E3C5A;
  --text: #E8EDF4;
  --text-muted: #A7B3C6;
  --soft: #8795AA;
  --brand: #4DA6FF;
  --brand-fill: #1B6FE0;
  --on-brand: #FFFFFF;
  --brand-tint: rgba(30, 144, 255, 0.14);
  --cyan: #00E5FF;
  --electric: #1E90FF;
  --ok: #2BD9A0;
  --ok-tint: rgba(43, 217, 160, 0.13);
  --warn: #FFB020;
  --warn-tint: rgba(255, 176, 32, 0.14);
  --bad: #FF6B87;
  --bad-tint: rgba(255, 59, 92, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  --scrim: rgba(5, 8, 15, 0.70);
  --accent-grad: linear-gradient(90deg, #00E5FF, #1E90FF 40%, rgba(30, 144, 255, 0));
  --btn-grad: linear-gradient(180deg, #2A86F2 0%, #1B6FE0 55%, #1559C0 100%);
  --btn-glow: 0 0 0 1px rgba(79, 180, 255, 0.35) inset, 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 18px rgba(30, 144, 255, 0.28);
  --bevel: inset 0 1px 0 rgba(201, 209, 220, 0.06);
  --wash: radial-gradient(900px 420px at 12% -8%, rgba(30, 144, 255, 0.10), transparent 70%);
  --font-display: Oxanium, Inter, system-ui, sans-serif;
  --font-sans: Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar-w: 240px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --pad-page: 32px 40px 48px;
  color-scheme: dark;
}

.theme-light {
  --ground: #EEF2F8;
  --panel: #FFFFFF;
  --panel-2: #F4F7FB;
  --raise: #E6ECF5;
  --line: #DDE4EF;
  --line-2: #C5D0E0;
  --text: #111827;
  --text-muted: #44546B;
  --soft: #55657C;
  --brand: #1560D0;
  --brand-fill: #1B6FE0;
  --on-brand: #FFFFFF;
  --brand-tint: rgba(27, 111, 224, 0.09);
  --cyan: #0897C4;
  --electric: #1E90FF;
  --ok: #0E7C4D;
  --ok-tint: rgba(18, 145, 90, 0.10);
  --warn: #9A630B;
  --warn-tint: rgba(230, 160, 40, 0.16);
  --bad: #C42834;
  --bad-tint: rgba(212, 47, 59, 0.09);
  --shadow: 0 16px 40px rgba(26, 34, 53, 0.14);
  --scrim: rgba(26, 34, 53, 0.40);
  --accent-grad: linear-gradient(90deg, #1E90FF, #1B6FE0 40%, rgba(27, 111, 224, 0));
  --btn-grad: linear-gradient(180deg, #2C86EE 0%, #1B6FE0 55%, #1559C0 100%);
  --btn-glow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px rgba(27, 111, 224, 0.22);
  --bevel: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --wash: radial-gradient(900px 420px at 12% -8%, rgba(30, 144, 255, 0.08), transparent 70%);
  color-scheme: light;
}

/* ---- Reset + base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background-color: var(--ground);
  background-image: var(--wash);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
::selection { background: rgba(30, 144, 255, 0.35); color: inherit; }

/* Mock capture frames — not required in a live app */
html.mock-1080, html.mock-1080 body { width: 1920px; height: 1080px; overflow: hidden; }
html.mock-mobile, html.mock-mobile body { width: 390px; height: 844px; overflow: hidden; }

/* ---- Type ------------------------------------------------------------ */
.display, h1, h2, h3, .num {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-synthesis: none;
}
h1 { font-size: 28px; line-height: 34px; font-weight: 700; }
h2 { font-size: 16px; line-height: 22px; }
h3 { font-size: 14px; line-height: 20px; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}
.muted { color: var(--text-muted); }
.soft { color: var(--soft); }
.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.num { font-family: var(--font-display); }

/* ---- Icons ----------------------------------------------------------- */
.ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ico-lg { width: 22px; height: 22px; }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  color: var(--text);
}
.btn.lg { height: 44px; width: 100%; font-size: 14px; }
.btn.pri {
  background: var(--brand-fill);
  background-image: var(--btn-grad);
  color: var(--on-brand);
  box-shadow: var(--btn-glow);
}
.btn.ghost {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}
.btn.soft {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}
.btn.tiny { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn .ico { width: 16px; height: 16px; }

/* ---- Fields ---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.input, .select, .textarea {
  height: 40px;
  border: 1px solid var(--line-2);
  background: rgba(10, 14, 23, 0.35);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}
.textarea { height: auto; min-height: 72px; padding: 10px 12px; align-items: flex-start; }
.input.focus, .otp-d.focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18);
  outline: none;
}
.input .ph { color: var(--soft); }
.hint { font-size: 12px; color: var(--soft); line-height: 16px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; }
.affix {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding-left: 10px;
  white-space: nowrap;
}

/* ---- Switch, pip, pill ----------------------------------------------- */
.switch {
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: var(--raise);
  border: 1px solid var(--line-2);
  position: relative;
  flex: none;
}
.switch.on {
  background: var(--brand-fill);
  background-image: var(--btn-grad);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(79, 180, 255, 0.35) inset, 0 4px 12px rgba(30, 144, 255, 0.28);
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.switch.on i { left: 21px; }

.pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-tint), 0 0 8px rgba(43, 217, 160, 0.45);
  flex: none;
}
.pip.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-tint), 0 0 8px rgba(255, 176, 32, 0.4); }
.pip.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-tint), 0 0 8px rgba(255, 107, 135, 0.4); }
.pip.off { background: var(--soft); box-shadow: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
.pill.ok { background: var(--ok-tint); color: var(--ok); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.bad { background: var(--bad-tint); color: var(--bad); }
.pill.info { background: var(--brand-tint); color: var(--brand); }
.pill.quiet { background: var(--panel-2); color: var(--soft); border: 1px solid var(--line); }

/* ---- Quota ----------------------------------------------------------- */
.quota {
  height: 6px;
  background: var(--raise);
  border-radius: 99px;
  overflow: hidden;
  width: 100%;
}
.quota > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #00E5FF, #1E90FF);
}
.quota.warn > i { background: linear-gradient(90deg, #FFB020, #E08900); }
.quota.bad > i { background: linear-gradient(90deg, #FF6B87, #E03A55); }

/* ---- Cards ----------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--bevel);
}
.card-lg { border-radius: var(--radius-lg); box-shadow: var(--bevel), var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.icon-well {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}
.icon-well.ok { background: var(--ok-tint); color: var(--ok); }
.icon-well.warn { background: var(--warn-tint); color: var(--warn); }

/* ---- App shell ------------------------------------------------------- */
.shell { display: flex; min-height: 100%; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  z-index: 2;
}
.sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-grad);
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 8px 16px;
}
.brand img.lockup { height: 32px; width: auto; }
.brand .product {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-left: 2px;
}
.side-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 16px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 12px;
  color: var(--text-muted);
}
.side-badge b { color: var(--text); font-weight: 600; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav a, .nl {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nl.cur {
  background: var(--brand-tint);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--cyan);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--raise);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text);
  flex: none;
}
.side-user b { font-weight: 600; font-size: 13px; display: block; }
.side-user small { font-size: 11.5px; color: var(--soft); }
.side-foot {
  padding: 10px 8px 0;
  font-size: 11px;
  color: var(--soft);
  letter-spacing: 0.02em;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: var(--pad-page);
  position: relative;
  max-width: calc(var(--sidebar-w) + 1360px);
}
.main::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-grad);
}
.page-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-hd .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.page-hd .lede { margin-top: 4px; color: var(--text-muted); font-size: 14px; }

/* ---- Status cards ---------------------------------------------------- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.status {
  padding: 20px 22px 22px;
  min-height: 196px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.status .who { display: flex; align-items: center; gap: 12px; }
.status .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 30px;
  letter-spacing: 0.01em;
}
.status .value.ok { color: var(--ok); }
.status .value.warn { color: var(--warn); }
.status .meta-row { margin-top: auto; font-size: 12.5px; color: var(--text-muted); }
.status .list { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.cert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.cert .host { font-family: var(--font-mono); font-size: 12.5px; }
.cert .days { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ok); }
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px rgba(43, 217, 160, 0.45); }

/* ---- Quick links ----------------------------------------------------- */
.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 12px;
}
.qlinks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.qlink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 72px;
}
.qlink .name { font-weight: 600; font-size: 13.5px; line-height: 18px; }
.qlink .go { margin-left: auto; color: var(--soft); }
.qlink .go .ico { width: 16px; height: 16px; }

/* ---- Mailboxes ------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: stretch; }
.split > .card { height: 100%; }
.mbox-list { display: flex; flex-direction: column; padding: 8px; gap: 6px; }
.mbox {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.mbox.sel {
  background: var(--brand-tint);
  border-color: rgba(77, 166, 255, 0.28);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.mbox .addr { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; }
.mbox .who { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.mbox .qwrap { min-width: 200px; }
.mbox .qmeta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.panel-block { padding: 18px 20px 20px; }
.panel-block + .panel-block { /* used inside a stack of cards */ }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.alias-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; }
.alias {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.alias .x { color: var(--soft); }

/* ---- Settings -------------------------------------------------------- */
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1120px; align-items: stretch; }
.settings > .card { height: 100%; }
.kv { display: flex; flex-direction: column; gap: 0; }
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  min-height: 48px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--text-muted); font-size: 13px; }
.kv-row .v { font-weight: 500; text-align: right; }
.api {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.api:last-child { border-bottom: 0; padding-bottom: 0; }
.api:first-child { padding-top: 0; }
.api .body { flex: 1; min-width: 0; }
.api .nm { font-weight: 600; }
.api .sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---- Login ----------------------------------------------------------- */
.login {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 72px;
  position: relative;
  overflow: hidden;
  background-image:
    var(--wash),
    radial-gradient(rgba(77, 166, 255, 0.10) 1px, transparent 1.2px);
  background-size: auto, 28px 28px;
}
.login-mark {
  position: absolute;
  right: -6%;
  top: -12%;
  width: 46vw;
  max-width: 820px;
  opacity: 0.055;
  pointer-events: none;
  user-select: none;
}
.login-col { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 1; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login-brand img { height: 56px; width: auto; }
.login-brand .product {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.auth-card { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 24px; line-height: 30px; }
.auth-card .sub { color: var(--text-muted); margin-top: 6px; font-size: 14px; }
.login-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.login-foot .lockish { display: inline-flex; align-items: center; gap: 6px; }

/* OTP */
.otp { display: flex; gap: 8px; justify-content: space-between; }
.otp-d {
  width: 52px;
  height: 60px;
  border: 1px solid var(--line-2);
  background: rgba(10, 14, 23, 0.35);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0;
  color: var(--text);
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.check i {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: rgba(10, 14, 23, 0.35);
  flex: none;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
}

/* ---- Mobile ---------------------------------------------------------- */
.mob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--ground) 70%, transparent);
  z-index: 2;
}
.mob-top .left { display: flex; align-items: center; gap: 10px; }
.mob-top img { height: 28px; width: 28px; }
.mob-top .titles { display: flex; flex-direction: column; gap: 1px; }
.mob-top .titles strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.mob-top .titles span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 700;
}
.mob-body { padding: 0 16px 76px; }
.mob-hd { margin: 2px 0 12px; }
.mob-hd h1 { font-size: 22px; line-height: 26px; }
.mob-hd .meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }

.mob-status { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mob-status .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status.compact { min-height: 0; padding: 10px 12px; gap: 6px; }
.status.compact .value { font-size: 18px; line-height: 22px; }
.status.compact .icon-well { width: 34px; height: 34px; border-radius: 9px; }
.mob-qlinks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qlink.mob {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 0;
  padding: 10px 4px 8px;
  gap: 6px;
}
.qlink.mob .icon-well { width: 32px; height: 32px; }
.qlink.mob .icon-well .ico { width: 16px; height: 16px; }
.qlink.mob .name { font-size: 10px; line-height: 12px; font-weight: 600; }
.qlink.mob .go { display: none; }
.mob-body .section-label { margin: 0 2px 8px; }

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  padding: 6px 12px 10px;
  background: rgba(18, 24, 38, 0.92);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  backdrop-filter: blur(16px);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--soft);
  border-radius: 10px;
}
.tab.cur { color: var(--text); }
.tab.cur .ico { color: var(--cyan); }

/* ---- Helpers --------------------------------------------------------- */
.ex { opacity: 0.95; }

.page-ft {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--soft);
}

/* ---- Ingress hosts, drawer, device dropdown, DNS, push ---- */
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 3px;
  flex: none;
}
.seg.grow { display: flex; width: 100%; }
.seg span, .seg b {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.seg.grow span { flex: 1; }
.seg .on {
  background: var(--raise);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--bevel);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}
.toggle-row .lab { font-size: 13.5px; font-weight: 500; }
.toggle-row .sub { font-size: 12px; color: var(--soft); margin-top: 1px; }

.ingress-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.ingress-bar .copy { flex: 1; min-width: 0; }
.ingress-bar .copy .nm { font-weight: 600; font-size: 14px; }
.ingress-bar .copy .sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.push-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ok-tint);
  border: 1px solid rgba(43, 217, 160, 0.22);
  border-radius: 10px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 500;
}
.push-status .time { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.push-status .ico { width: 16px; height: 16px; }

.host-table { overflow: hidden; }
.ht-head, .ht-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) 150px 168px 72px 72px;
  gap: 12px;
  align-items: center;
  padding: 0 18px;
}
.ht-head {
  height: 40px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.ht-row {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}
.ht-row:last-child { border-bottom: 0; }
.ht-row.sel {
  background: var(--brand-tint);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.ht-row .host { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; }
.ht-row .tgt { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.ht-row .ssl { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.ht-row .ssl .days { font-family: var(--font-mono); font-size: 11.5px; color: var(--ok); }

.src, .access {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.src.lan { background: var(--brand-tint); color: var(--brand); }
.src.ts { background: rgba(0, 229, 255, 0.12); color: var(--cyan); }
.access.pub { background: var(--brand-tint); color: var(--brand); }
.access.priv { background: var(--panel-2); color: var(--text-muted); border: 1px solid var(--line); }

.scrim {
  position: fixed;
  inset: 0 0 0 var(--sidebar-w);
  background: var(--scrim);
  z-index: 10;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 560px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 11;
  display: flex;
  flex-direction: column;
}
.drawer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-grad);
}
.drawer-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--line);
}
.drawer-hd .actions { display: flex; gap: 8px; }
.drawer-body {
  padding: 12px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: visible;
}

.dns {
  padding: 10px 12px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dns-preview {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 18px;
  padding: 8px 10px;
  background: rgba(10, 14, 23, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.dns-ip { display: flex; align-items: center; gap: 8px; }
.dns-ip .input { flex: 1; }
.detect {
  font-size: 11.5px;
  color: var(--soft);
  white-space: nowrap;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex: none;
}

.dd { position: relative; }
.dd-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18);
  background: rgba(10, 14, 23, 0.35);
  border-radius: 8px;
  padding: 0 12px;
  width: 100%;
}
.dd-trigger .chev { margin-left: auto; color: var(--soft); }
.dd-panel {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  background: #1A2235;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--bevel), var(--shadow);
  z-index: 20;
  overflow: hidden;
}
.dd-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
}
.dd-list { display: flex; flex-direction: column; padding: 6px; }
.dd-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "ip tag" "hn tag";
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
}
.dd-row .ip { grid-area: ip; font-family: var(--font-mono); font-size: 13px; }
.dd-row .hn { grid-area: hn; font-size: 12px; color: var(--text-muted); }
.dd-row .src { grid-area: tag; }
.dd-row.sel { background: var(--brand-tint); box-shadow: inset 2px 0 0 var(--cyan); }
.dd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--soft);
}
.dd-foot .link { color: var(--brand); font-weight: 500; }

.adv {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 14px;
  background: rgba(10, 14, 23, 0.2);
}
.adv .adv-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.adv .adv-hd h3 { font-size: 13px; font-weight: 600; font-family: var(--font-sans); letter-spacing: 0; }
.adv .chev { color: var(--soft); }
.snippet {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  background: rgba(10, 14, 23, 0.35);
  border-radius: 8px;
  color: var(--text-muted);
}

.hd-actions { display: flex; align-items: center; gap: 10px; }
