:root {
  --bg: #0c1117;
  --bg-soft: #121a23;
  --panel: rgba(17, 25, 34, 0.82);
  --panel-strong: rgba(10, 15, 22, 0.92);
  --line: rgba(170, 205, 255, 0.1);
  --text: #edf4ff;
  --muted: #90a3bb;
  --accent: #3ea0ff;
  --accent-2: #59d7a3;
  --warn: #f5af4c;
  --bad: #f16666;
  --ok: #3fc98b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(62, 160, 255, 0.22), transparent 22%),
    radial-gradient(circle at 80% 10%, rgba(89, 215, 163, 0.16), transparent 20%),
    linear-gradient(180deg, #091018 0%, #0d141d 55%, #0a0f15 100%);
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 12, 0.68);
  backdrop-filter: blur(18px);
}

.auth-screen.hidden {
  display: none;
}

.auth-card {
  width: min(460px, 100%);
  padding: 30px;
  border-radius: 28px;
  background: rgba(12, 19, 27, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-copy {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.login-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--bad);
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.45;
}

.ambient-a {
  width: 280px;
  height: 280px;
  background: rgba(62, 160, 255, 0.28);
  top: 70px;
  right: 120px;
}

.ambient-b {
  width: 300px;
  height: 300px;
  background: rgba(89, 215, 163, 0.18);
  bottom: 50px;
  left: 80px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  width: min(1500px, calc(100vw - 28px));
  margin: 14px auto;
}

.app-shell.locked {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
}

.sidebar,
.board,
.hero,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  border-radius: 28px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #77b9ff);
  color: #04101d;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7fd3ff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.95;
  max-width: 10ch;
}

h3 {
  font-size: 22px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-link,
.shortcut {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: 140ms ease;
}

.nav-link:hover,
.nav-link.active,
.shortcut:hover {
  background: rgba(62, 160, 255, 0.08);
  border-color: rgba(62, 160, 255, 0.18);
}

.sidebar-panel {
  padding: 16px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.panel-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.wide {
  width: 100%;
}

.shortcut-list {
  display: grid;
  gap: 10px;
}

.shortcut {
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.main {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 8px 0 40px;
}

.hero {
  border-radius: 30px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.hero-copy {
  max-width: 56ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.hero-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  width: min(100%, 460px);
}

.hero-chip {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hero-chip span,
.stat-card span,
.fact-row span,
small {
  color: var(--muted);
}

.hero-chip strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  border-radius: 24px;
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 24px;
}

.board {
  border-radius: 28px;
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.board-alerts {
  background:
    linear-gradient(135deg, rgba(17, 25, 34, 0.96), rgba(17, 25, 34, 0.72)),
    radial-gradient(circle at right top, rgba(62, 160, 255, 0.18), transparent 28%);
}

.alerts-list,
.service-grid,
.actions-grid,
.facts-list {
  display: grid;
  gap: 12px;
}

.alert-card {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.alert-card strong {
  display: block;
  margin-bottom: 6px;
}

.alert-card p {
  color: var(--muted);
}

.alert-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 6px;
}

.alert-card.ok .alert-dot {
  background: var(--ok);
}

.alert-card.warn .alert-dot {
  background: var(--warn);
}

.alert-card.bad .alert-dot {
  background: var(--bad);
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.service-card,
.action-btn,
.fact-row {
  border-radius: 18px;
  border: 1px solid var(--line);
}

.service-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.service-card p {
  color: var(--muted);
  margin-top: 8px;
}

.actions-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-btn {
  background: linear-gradient(180deg, rgba(62, 160, 255, 0.12), rgba(62, 160, 255, 0.05));
  color: var(--text);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.action-btn span {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.action-btn small {
  display: block;
}

.action-btn:hover,
.primary:hover,
.shortcut:hover {
  transform: translateY(-1px);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #081018;
  font-weight: 700;
}

.badge.slim {
  min-width: 0;
  font-size: 11px;
}

.badge.ok {
  background: var(--ok);
}

.badge.warn {
  background: var(--warn);
}

.badge.bad {
  background: var(--bad);
  color: white;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #77b9ff);
  color: #04101d;
  font-weight: 700;
  border-radius: 16px;
  padding: 13px 16px;
  cursor: pointer;
}

.ghost {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 13px 16px;
  cursor: pointer;
  border: 1px solid var(--line);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(170, 205, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
}

.facts-list {
  align-content: start;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
}

.board-console {
  padding-bottom: 24px;
}

.command-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 14px;
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

input::placeholder {
  color: #6f8298;
}

.terminal {
  min-height: 360px;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  background: #071018;
  color: #cfffe7;
  overflow: auto;
  border: 1px solid rgba(89, 215, 163, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.empty {
  color: var(--muted);
}

@media (max-width: 1220px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: start;
  }

  .hero-status {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .stats-grid,
  .hero-status,
  .service-grid,
  .actions-grid {
    grid-template-columns: 1fr;
  }

  .command-form {
    grid-template-columns: 1fr;
  }
}
