/* ==========================================================================
   LPX Portal — shared styles
   Keeps the original landing-page identity: near-black field, cyan glow,
   faint grid, glassy terminal cards.
   ========================================================================== */

:root {
  --bg: #07090e;
  --bg-raise: #0b0f17;
  --card-bg: rgba(13, 17, 26, 0.85);
  --card-bg-solid: #0d111a;
  --border: rgba(0, 242, 254, 0.15);
  --border-soft: rgba(255, 255, 255, 0.07);
  --primary: #00f2fe;
  --secondary: #38bdf8;
  --accent: #818cf8;
  --text: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --ok: #27c93f;
  --warn: #ffbd2e;
  --danger: #ff5f56;
  --mono: 'SFMono-Regular', Consolas, Monaco, 'Liberation Mono', monospace;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

/* ------------------------------------------------------------ backdrop ---- */

.ambient-glow {
  position: fixed;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,242,254,.08) 0%, rgba(129,140,248,.03) 45%, rgba(0,0,0,0) 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  animation: pulseGlow 7s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0%   { transform: translateX(-50%) scale(.95); opacity: .6; }
  100% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

.page { position: relative; z-index: 2; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow { max-width: 660px; }

/* -------------------------------------------------------------- topbar ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 9, 14, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 58px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark .mark-sub {
  font-weight: 500;
  font-size: .78rem;
  color: var(--text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--border-soft);
}
.topbar-spacer { flex: 1; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 9999px;
  background: rgba(255,255,255,.03);
  font-size: .82rem;
  color: var(--text-muted);
}
.avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 700;
  color: #04121a;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* --------------------------------------------------------------- hero ----- */

.hero { text-align: center; padding: 46px 0 8px; }
.hero-compact { padding: 30px 0 4px; }

.logo-container {
  position: relative;
  width: 260px; height: 260px;
  margin: 0 auto .75rem;
  display: flex; align-items: center; justify-content: center;
}
.logo-container.sm { width: 150px; height: 150px; margin-bottom: .4rem; }
.logo-svg { width: 100%; height: 100%; overflow: visible; }

.orbit-ring {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.5;
  opacity: .4;
  transform-origin: center;
}
.orbit-1 { animation: rotateOrbit 16s linear infinite; }
.orbit-2 { animation: rotateOrbitReverse 22s linear infinite; }
@keyframes rotateOrbit        { from { transform: rotate(0);      } to { transform: rotate(360deg);  } }
@keyframes rotateOrbitReverse { from { transform: rotate(0);      } to { transform: rotate(-360deg); } }

.node-icon {
  fill: none;
  stroke: var(--secondary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(0,242,254,.6));
}
.brand-text {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -.04em;
  fill: url(#brand-gradient);
  filter: drop-shadow(0 0 12px rgba(0,242,254,.4));
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(0,242,254,.04);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--secondary);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 20px rgba(0,242,254,.05);
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100% { opacity:1; transform:scale(1);} 50% { opacity:.3; transform:scale(.85);} }

.hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 18px 0 8px;
}
.hero p.lede {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: .95rem;
}

.tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.tag {
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,.03);
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(8px);
}

/* ----------------------------------------------------------- terminal ----- */

.terminal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.7), 0 0 30px rgba(0,242,254,.03);
  backdrop-filter: blur(16px);
  text-align: left;
  font-family: var(--mono);
}
.terminal-header {
  padding: 10px 14px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-red { background: #ff5f56; } .dot-yellow { background: #ffbd2e; } .dot-green { background: #27c93f; }
.terminal-title { margin-left: 8px; font-size: .75rem; color: var(--text-muted); }
.terminal-body { padding: 16px; font-size: .8rem; line-height: 1.65; }
.line { display: flex; gap: 8px; margin-bottom: 4px; }
.prompt { color: var(--primary); user-select: none; }
.log { color: var(--text); }
.log .hl { color: var(--secondary); }

/* ------------------------------------------------------------ sections ---- */

.section { padding: 42px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.section-head h2 {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary);
}
.section-head .count { font-size: .78rem; color: var(--text-dim); font-family: var(--mono); }

/* ----------------------------------------------------------- app grid ----- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(16px);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.app-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--app-accent, var(--primary)), transparent 75%);
  opacity: .8;
}
.app-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 0 26px rgba(0,242,254,.05);
}
.app-card.locked { opacity: .72; }
.app-card.locked:hover { transform: none; }

.app-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.app-icon {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.25rem;
  background: rgba(0,242,254,.06);
  border: 1px solid var(--border);
  color: var(--app-accent, var(--primary));
}
.app-name { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
.app-tagline { font-size: .84rem; color: var(--text-muted); margin-top: 2px; }
.app-desc {
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex: 1;
}
.app-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.app-foot { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------------------- pills ------ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.03);
  color: var(--text-muted);
  font-family: var(--mono);
  white-space: nowrap;
}
.pill-live    { color: var(--ok);     border-color: rgba(39,201,63,.3);   background: rgba(39,201,63,.07); }
.pill-beta    { color: var(--warn);   border-color: rgba(255,189,46,.3);  background: rgba(255,189,46,.07); }
.pill-wip     { color: var(--accent); border-color: rgba(129,140,248,.3); background: rgba(129,140,248,.08); }
.pill-offline { color: var(--danger); border-color: rgba(255,95,86,.3);   background: rgba(255,95,86,.07); }
.pill-public  { color: var(--secondary); border-color: var(--border); }
.pill-granted { color: var(--primary);   border-color: var(--border); background: rgba(0,242,254,.06); }
.pill-locked  { color: var(--text-dim); }
.pill-admin   { color: var(--accent); border-color: rgba(129,140,248,.35); }

/* ------------------------------------------------------------ buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,242,254,.06);
  color: var(--primary);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(0,242,254,.12); border-color: rgba(0,242,254,.4); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, rgba(0,242,254,.9), rgba(56,189,248,.85));
  color: #04121a;
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, rgba(0,242,254,1), rgba(56,189,248,.95)); }
.btn-ghost { background: transparent; border-color: var(--border-soft); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--border); color: var(--text); background: rgba(255,255,255,.03); }
.btn-danger { background: rgba(255,95,86,.08); border-color: rgba(255,95,86,.3); color: #ff8b84; }
.btn-danger:hover { background: rgba(255,95,86,.16); border-color: rgba(255,95,86,.5); }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-block { width: 100%; }

/* -------------------------------------------------------------- forms ----- */

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  overflow: hidden;
}
.panel-pad { padding: 24px; }

.tabs { display: flex; border-bottom: 1px solid var(--border-soft); }
.tab {
  flex: 1;
  padding: 13px 16px;
  text-align: center;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--text-muted); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(0,242,254,.03); }

.field { margin-bottom: 15px; }
.field label {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field .hint { font-size: .76rem; color: var(--text-dim); margin-top: 5px; }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], select, textarea {
  width: 100%;
  padding: 10px 13px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(0,242,254,.45);
  background: rgba(0,242,254,.04);
}
input::placeholder, textarea::placeholder { color: #475569; }
textarea { resize: vertical; min-height: 78px; }
select option { background: var(--card-bg-solid); color: var(--text); }

.field-row { display: flex; gap: 14px; }
.field-row > * { flex: 1; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
}
.check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex: none; }

/* ------------------------------------------------------------- alerts ----- */

.alert {
  padding: 11px 15px;
  border-radius: 8px;
  font-size: .86rem;
  margin-bottom: 16px;
  border: 1px solid;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.alert-error { background: rgba(255,95,86,.07);  border-color: rgba(255,95,86,.3);  color: #ffb4ae; }
.alert-ok    { background: rgba(39,201,63,.07);  border-color: rgba(39,201,63,.3);  color: #9ff0ac; }
.alert-info  { background: rgba(56,189,248,.06); border-color: rgba(56,189,248,.28); color: #a5dcfb; }
.alert-warn  { background: rgba(255,189,46,.07); border-color: rgba(255,189,46,.3); color: #ffd98a; }

.empty {
  text-align: center;
  padding: 46px 24px;
  color: var(--text-dim);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  font-size: .9rem;
}

/* -------------------------------------------------------------- admin ----- */

.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.admin-nav a {
  padding: 8px 15px;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.02);
  transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-nav a:hover { color: var(--text); border-color: var(--border); }
.admin-nav a.active { color: var(--primary); border-color: var(--border); background: rgba(0,242,254,.07); }
.badge-count {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #1a0503;
  font-size: .68rem; font-weight: 800;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }
table.grid { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
table.grid th {
  text-align: left;
  padding: 11px 14px;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  font-weight: 700;
}
table.grid td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: rgba(255,255,255,.02); }
table.grid td.actions { text-align: right; white-space: nowrap; }
table.grid td.actions form { display: inline-block; margin-left: 5px; }
.mono { font-family: var(--mono); font-size: .82rem; color: var(--text-muted); }

.matrix th.rot { text-align: center; }
.matrix td.cell { text-align: center; }
.matrix td.rowhead { font-weight: 600; white-space: nowrap; }

.card-list { display: grid; gap: 14px; }
.mini-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(255,255,255,.02);
}
.mini-card h3 { font-size: .95rem; font-weight: 650; margin-bottom: 3px; }
.mini-card .sub { font-size: .8rem; color: var(--text-dim); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack-14 { display: grid; gap: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: .82rem; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; }

.footer {
  padding: 34px 0 44px;
  text-align: center;
  font-size: .78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-soft);
  margin-top: 30px;
  font-family: var(--mono);
}
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--primary); }

/* --------------------------------------------------------------- misc ----- */

.code-box {
  font-family: var(--mono);
  font-size: .8rem;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--secondary);
  overflow-x: auto;
  white-space: pre;
}

details.dropdown summary {
  cursor: pointer;
  list-style: none;
  font-size: .82rem;
  color: var(--text-muted);
  padding: 6px 0;
}
details.dropdown summary::-webkit-details-marker { display: none; }
details.dropdown summary::before { content: '▸ '; color: var(--primary); }
details.dropdown[open] summary::before { content: '▾ '; }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .app-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
  .logo-container { width: 200px; height: 200px; }
  .hero h1 { font-size: 1.5rem; }
  .topbar-inner { height: 54px; gap: 10px; }
  .brand-mark .mark-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Ops dashboard — meters, gauges, service states
   ========================================================================== */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 15px 17px;
  backdrop-filter: blur(16px);
}
.metric .lbl {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.metric .val {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.metric .sub { font-size: .76rem; color: var(--text-dim); margin-top: 3px; font-family: var(--mono); }

.bar {
  height: 6px;
  background: rgba(255, 255, 255, .06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 9px;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width .5s ease, background .5s ease;
}
.bar.warn > i { background: linear-gradient(90deg, #ffbd2e, #ff9f43); }
.bar.crit > i { background: linear-gradient(90deg, #ff5f56, #ff3b30); }

.core-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.core {
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 9px 11px;
}
.core .n { font-size: .64rem; color: var(--text-dim); font-family: var(--mono); letter-spacing: .06em; }
.core .p { font-size: .95rem; font-weight: 650; font-variant-numeric: tabular-nums; }

.rowlist { display: grid; gap: 11px; }
.rowitem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  align-items: center;
}
.rowitem .name { font-size: .85rem; }
.rowitem .name small { color: var(--text-dim); font-family: var(--mono); font-size: .74rem; }
.rowitem .num {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rowitem .bar { grid-column: 1 / -1; margin-top: 2px; }

.svc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  flex-wrap: wrap;
}
.svc .state-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-dim);
  flex: none;
}
.svc.is-active   .state-dot { background: var(--ok);     box-shadow: 0 0 9px rgba(39,201,63,.8); }
.svc.is-failed   .state-dot { background: var(--danger); box-shadow: 0 0 9px rgba(255,95,86,.8); }
.svc.is-inactive .state-dot { background: var(--warn); }
.svc .svc-name { font-weight: 600; font-size: .9rem; }
.svc .svc-meta { font-family: var(--mono); font-size: .74rem; color: var(--text-dim); }
.svc .svc-actions { margin-left: auto; display: flex; gap: 7px; }

.livedot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
  animation: blink 2s infinite;
}
.stale { opacity: .45; }

/* Compact strip shown to admins on the portal landing page */
.opsstrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 13px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  font-family: var(--mono);
  font-size: .78rem;
}
.opsstrip b {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.opsstrip .k { color: var(--text-dim); }
.opsstrip .spacer { flex: 1; }
.opsstrip a { color: var(--secondary); text-decoration: none; }
.opsstrip a:hover { color: var(--primary); }

@media (max-width: 720px) {
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .svc .svc-actions { margin-left: 0; width: 100%; }
}

/* ==========================================================================
   Modal — the password warning gate on the register tab
   ========================================================================== */

/* A class setting `display` outbids the UA stylesheet's [hidden]{display:none},
   so the attribute has to be honoured explicitly or the modal never hides. */
.modal-backdrop[hidden] { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 9, .82);
  backdrop-filter: blur(7px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  animation: modalFade .18s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .8), 0 0 40px rgba(0, 242, 254, .05);
  animation: modalRise .22s cubic-bezier(.2, .8, .3, 1);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}
@keyframes modalRise { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head .icon {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255, 189, 46, .1);
  border: 1px solid rgba(255, 189, 46, .3);
  font-size: .95rem;
}
.modal-head h2 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.modal-body {
  padding: 22px 24px 6px;
  overflow-y: auto;
}
.modal-body p {
  font-size: .89rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.modal-body p.lead { color: var(--text); }
.modal-body p.lead strong { color: var(--warn); }
.modal-body .objection {
  display: block;
  color: var(--secondary);
  font-style: italic;
  margin-bottom: 5px;
}
.modal-body .motto {
  text-align: center;
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .04em;
  padding: 14px 0 6px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
}

.modal-foot {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.modal-foot .spacer { flex: 1; }

/* Register form while the warning has not been acknowledged */
.pane-locked { opacity: .35; filter: grayscale(.4); transition: opacity .2s ease; }
.pane-locked input, .pane-locked button { pointer-events: none; }

.relock-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  cursor: pointer;
}
.relock-note:hover { color: var(--text-muted); }

@media (max-width: 720px) {
  .modal-head, .modal-body, .modal-foot { padding-left: 17px; padding-right: 17px; }
  .modal-foot .btn { width: 100%; }
}
