:root {
  --bg: #05070c;
  --bg2: #081118;
  --panel: rgba(8, 12, 19, 0.78);
  --panel-2: rgba(10, 15, 24, 0.92);
  --line: rgba(159, 224, 255, 0.14);
  --line-strong: rgba(199, 240, 255, 0.22);
  --text: #eef7ff;
  --muted: rgba(220, 236, 255, 0.64);
  --cyan: #6ef4df;
  --blue: #1fb7ff;
  --green: #44ff7b;
  --violet: #7f88ff;
  --glow: rgba(31, 183, 255, 0.26);
  --danger: #ff4f7f;
  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 24px 100px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(31, 183, 255, 0.14), transparent 18%),
    radial-gradient(circle at 85% 15%, rgba(110, 244, 223, 0.13), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(68,255,123,0.08), transparent 25%),
    linear-gradient(180deg, #04060a, #06090f 40%, #04080d 100%);
  overflow-x: hidden;
}
a { color: inherit; }

.grid, .matrix, .ambient { position: fixed; inset: 0; pointer-events: none; }
.grid {
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .05;
}
.matrix {
  opacity: .12;
  mask-image: linear-gradient(180deg, transparent, black 14%, black 84%, transparent);
}
.matrix::before {
  content: '1010011010010110100101101001011010010110100101101001011010010110100101101001011010010110100101101001011010010110100101101001011\A0101101001011010010110100101101001011010010110100101101001011010010110100101101001011010010110100101101001011010010110100101101001\A1101001011010010110100101101001011010010110100101101001011010010110100101101001011010010110100101101001011010010110100101101001011010';
  white-space: pre;
  position: absolute;
  inset: 0;
  color: rgba(68,255,123,.25);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(11px, 1.3vw, 16px);
  line-height: 1.65;
  letter-spacing: .16em;
  transform: perspective(900px) rotateX(68deg) translateY(-18vh);
  filter: blur(0.2px);
}
.ambient-a { background: radial-gradient(circle at 20% 20%, rgba(31,183,255,.14), transparent 34%); }
.ambient-b { background: radial-gradient(circle at 80% 70%, rgba(110,244,223,.14), transparent 28%); }

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px;
  gap: 22px;
}

.glass,
.card,
.kpi,
.chart-card,
.signal-card {
  position: relative;
  overflow: hidden;
}

.glass::before,
.card::before,
.kpi::before,
.chart-card::before,
.signal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.01) 42%, rgba(255,255,255,.03));
  pointer-events: none;
}

.glass {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)),
    rgba(8, 12, 19, 0.56);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
}

.glass-light {
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(18px) saturate(135%);
}

.topbar, .footer {
  border-radius: 24px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nexus-chip {
  color: rgba(229, 244, 255, 0.88);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(31,183,255,.28));
}
.brand-name {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 14px;
  font-weight: 700;
}
.brand-sub,
.footer { color: rgba(226,241,255,.56); font-size: 12px; }

.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.navlinks a {
  text-decoration: none;
  color: rgba(232,244,255,.82);
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  padding: 12px 14px;
  border-radius: 999px;
  transition: .22s ease;
  font-size: 14px;
}
.navlinks a:hover {
  transform: translateY(-1px);
  border-color: rgba(159,224,255,.28);
  box-shadow: 0 0 0 1px rgba(159,224,255,.06), 0 10px 30px rgba(31,183,255,.12);
}

.alpha-btn,
.cta,
.ghost-btn,
.chip-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: .22s ease;
}
.alpha-btn,
.cta.solid {
  color: #021018;
  background: linear-gradient(135deg, #8dfce8, #60cdfd 50%, #7f88ff);
  padding: 14px 18px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 18px 46px rgba(31,183,255,.22);
}
.alpha-btn:hover,
.cta.solid:hover { transform: translateY(-1px) scale(1.01); }

.ghost-btn,
.chip-link {
  color: rgba(236,246,255,.88);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  padding: 12px 14px;
}
.ghost-btn:hover,
.chip-link:hover {
  border-color: rgba(159,224,255,.3);
  background: rgba(255,255,255,.05);
}

.page {
  display: grid;
  gap: 18px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 22px;
  min-height: 640px;
  border-radius: 34px;
  padding: 30px;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 16px;
}
.section-tag {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--cyan);
  font-size: 12px;
}
.hero-title {
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  line-height: .98;
  letter-spacing: -.04em;
}
.hero-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 900px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.hero-grid,
.feature-grid,
.signal-strip,
.doc-grid,
.status-grid,
.portal-grid,
.network-grid {
  display: grid;
  gap: 14px;
}
.hero-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
}
.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.signal-strip,
.doc-grid,
.status-grid,
.portal-grid,
.network-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.kpi,
.chart-card,
.signal-card {
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)),
    rgba(7, 10, 17, 0.76);
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 22px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.04);
  padding: 18px;
}

.card h3,
.signal-card h3,
.chart-title {
  margin: 0 0 10px;
  font-size: 17px;
}
.card p,
.card li,
.signal-card p,
.signal-card span {
  color: var(--muted);
  line-height: 1.6;
}

ul {
  margin: 0;
  padding-left: 18px;
}

.kpi {
  padding: 18px;
  display: grid;
  gap: 6px;
}
.kpi-label {
  color: rgba(225,239,255,.62);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.kpi-value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}
.kpi-note {
  color: rgba(222,239,255,.56);
  font-size: 13px;
}

.chart-card {
  min-height: 100%;
  display: grid;
  gap: 18px;
  align-content: start;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.chart-title {
  font-size: 18px;
}
.chart-badge {
  color: rgba(235,245,255,.74);
  font-size: 12px;
}
.chart-stat {
  text-align: right;
  display: grid;
  gap: 2px;
}
.chart-stat strong {
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.chart-stat span,
.muted,
.tiny {
  color: var(--muted);
}
.tiny { font-size: 12px; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(244, 250, 255, 0.9);
}
canvas#chart {
  width: 100%;
  min-height: 310px;
  display: block;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0));
}

.surface-rail,
.signal-list {
  display: grid;
  gap: 10px;
}
.surface-rail .chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(232,246,255,.88);
}
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #49ff7b;
  box-shadow: 0 0 22px rgba(73,255,123,.65);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.03);
}
.owner { color: #c9eaff; }
.admin { color: #9de7ff; }
.engineer { color: #80ffba; }

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(232,244,255,.82);
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 8, 14, 0.56);
  z-index: 12;
}
.hidden { display: none; }

.alpha-modal {
  width: min(640px, 100%);
  border-radius: 30px;
  padding: 24px;
}
.modal-close {
  margin-left: auto;
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(240,248,255,.88);
  cursor: pointer;
}
.portal-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.portal-form label {
  display: grid;
  gap: 8px;
  color: rgba(236,245,255,.86);
}
.portal-form input {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
}
.portal-form input:focus {
  border-color: rgba(111, 220, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(31,183,255,.08);
}
.signal-card {
  margin-top: 18px;
}
.signal-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.signal-row:last-child { border-bottom: 0; }

@media (max-width: 1100px) {
  .hero-panel,
  .hero-grid,
  .feature-grid,
  .signal-strip,
  .doc-grid,
  .status-grid,
  .portal-grid,
  .network-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell { padding: 16px; }
  .topbar,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }
  .navlinks { justify-content: flex-start; }
  .topbar-actions {
    justify-content: space-between;
  }
  .hero-panel {
    min-height: auto;
    padding: 20px;
  }
  .hero-title {
    font-size: clamp(38px, 10vw, 62px);
  }
}
