:root {
  --bg: #08111f;
  --bg-elevated: #0f1b2e;
  --panel: #13233b;
  --panel-soft: rgba(19, 35, 59, 0.84);
  --panel-border: rgba(151, 177, 214, 0.14);
  --text: #eef4ff;
  --muted: #99a9c2;
  --accent: #53a6ff;
  --accent-strong: #2583ea;
  --success: #6fd3a3;
  --warning: #ffc978;
  --danger: #ff8e8e;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(83, 166, 255, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(111, 211, 163, 0.08), transparent 18%),
    var(--bg);
  color: var(--text);
}

body.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 264px;
  padding: 26px 20px;
  background: linear-gradient(180deg, rgba(10, 22, 39, 0.96), rgba(8, 17, 31, 0.96));
  border-right: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  margin-bottom: 28px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(83, 166, 255, 0.16);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.brand-name {
  font-size: 23px;
  font-weight: 700;
}

.brand-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 8px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(83, 166, 255, 0.1);
  border-color: rgba(83, 166, 255, 0.16);
}

.nav-spacer {
  height: 18px;
}

.main-content {
  flex: 1;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.page-title {
  margin: 0;
  font-size: 33px;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 780px;
}

.account-chip {
  min-width: 240px;
  padding: 14px 16px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.account-chip-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-chip-value {
  margin-top: 8px;
  font-weight: 700;
}

.account-chip-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.stats-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.panel,
.stat-card,
.card {
  background: var(--panel-soft);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.stat-card,
.card {
  padding: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 14px;
  font-size: 32px;
  font-weight: 700;
}

.stat-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  font-size: 20px;
}

.panel-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(151, 177, 214, 0.12);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.active,
.status-pill.success {
  background: rgba(111, 211, 163, 0.12);
  color: var(--success);
}

.status-pill.warning,
.status-pill.open {
  background: rgba(255, 201, 120, 0.12);
  color: var(--warning);
}

.status-pill.danger,
.status-pill.stopped {
  background: rgba(255, 142, 142, 0.12);
  color: var(--danger);
}

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

.stack {
  display: grid;
  gap: 12px;
}

.list-item {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(151, 177, 214, 0.08);
}

.list-item strong {
  display: block;
  margin-bottom: 6px;
}

.list-item small {
  color: var(--muted);
}

.hero-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(37, 131, 234, 0.32), rgba(19, 35, 59, 0.88)),
    var(--panel-soft);
}

.hero-card h3 {
  margin: 0;
  font-size: 22px;
}

.hero-card p {
  margin: 0;
  color: rgba(238, 244, 255, 0.82);
  line-height: 1.55;
}

.button,
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 11px 14px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.button:hover,
button:hover,
.button-link:hover {
  background: var(--accent-strong);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--panel-border);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button.danger {
  background: rgba(255, 142, 142, 0.18);
  color: var(--danger);
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

label span {
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(151, 177, 214, 0.14);
  border-radius: 8px;
  background: rgba(7, 17, 30, 0.92);
  color: var(--text);
  padding: 12px;
  font-size: 14px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #7c8ca6;
}

.feedback,
.empty-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 420px);
  gap: 24px;
  width: 100%;
  max-width: 960px;
}

.auth-side,
.auth-card {
  background: var(--panel-soft);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.auth-side {
  padding: 26px;
  display: grid;
  align-content: space-between;
  min-height: 520px;
}

.auth-card {
  padding: 28px;
}

.auth-side h1,
.auth-card h2 {
  margin: 0;
}

.auth-side p,
.auth-card p {
  color: var(--muted);
  line-height: 1.6;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.feature-list div {
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(151, 177, 214, 0.08);
}

.feature-list strong {
  display: block;
  margin-bottom: 6px;
}

.auth-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

.price-tag {
  font-size: 30px;
  font-weight: 700;
  margin: 12px 0 18px;
}

.package-points {
  display: grid;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 18px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .section-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-side {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body.app-shell {
    display: block;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
  }

  .main-content {
    padding: 22px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .account-chip {
    min-width: 0;
  }
}
