:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(10, 20, 38, 0.9);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 35%),
    linear-gradient(180deg, #020617 0%, var(--bg) 55%, #020617 100%);
  color: var(--text);
}

a { color: #7dd3fc; text-decoration: none; }
a:hover { text-decoration: underline; }
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: rgba(14, 165, 233, 0.12);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button-link:hover { background: rgba(14, 165, 233, 0.2); }
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
}
textarea { resize: vertical; }
label { display: grid; gap: 8px; }
label span { color: var(--muted); font-size: 0.85rem; }

.page-shell {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.35);
}
.sidebar { position: sticky; top: 24px; align-self: start; padding: 24px; }
.sidebar-nav { display: grid; gap: 10px; margin-top: 24px; }
.sidebar-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.45);
}
.content { display: grid; gap: 20px; }
.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.32));
}
.hero-meta { display: grid; gap: 16px; min-width: 220px; }
.hero-meta div,
.stat {
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
}
.hero-meta strong,
.stat strong { font-size: 1.8rem; display: block; margin-top: 6px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  margin: 0 0 10px;
  color: var(--muted);
}
.muted,
.channel-summary,
.detail-list dt,
.section-heading p,
.data-card p { color: var(--muted); }
.stats-grid,
.channel-grid,
.integration-grid,
.workstream-grid,
.data-grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.channel-grid,
.integration-grid,
.workstream-grid,
.data-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat { padding: 20px; }
#operations,
#assets,
#logs,
#schedule,
#services,
#channels,
#integrations,
#launch { padding: 24px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}
.alert-list,
.service-groups,
.checklist,
.form-grid { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
.full-width { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 16px; }
.alert,
.checklist-item,
.service-group,
.channel-card,
.integration-card,
.workstream-card,
.data-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
}
.alert,
.checklist-item { padding: 18px; display: flex; justify-content: space-between; gap: 16px; }
.alert-warning { border-left: 5px solid var(--warning); }
.alert-critical { border-left: 5px solid var(--danger); }
.alert-info { border-left: 5px solid var(--info); }
.alert-success { border-left: 5px solid var(--success); }
.badge {
  align-self: start;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.badge-neutral { background: rgba(51, 65, 85, 0.55); }
.badge-success { background: rgba(34, 197, 94, 0.16); color: #bbf7d0; }
.badge-warning { background: rgba(245, 158, 11, 0.16); color: #fde68a; }
.badge-danger { background: rgba(239, 68, 68, 0.16); color: #fecaca; }
.badge-info { background: rgba(56, 189, 248, 0.16); color: #bae6fd; }
.service-group { padding: 18px; }
.service-group header,
.data-card-top,
.channel-header,
.integration-header,
.row-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.service-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.service-card {
  padding: 18px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
}
.service-card.is-ok { box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18); }
.service-card.is-bad { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2); }
.service-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  font-weight: 700;
}
.service-card footer,
.row-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.channel-card,
.integration-card,
.workstream-card,
.data-card { padding: 20px; }
.channel-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.detail-list div {
  background: rgba(2, 6, 23, 0.25);
  border-radius: 14px;
  padding: 12px;
}
.detail-list dd { margin: 0; }
.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(51, 65, 85, 0.55);
  margin: 16px 0;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}
.integration-columns { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.integration-columns ul,
.workstream-card ul { margin: 0; padding-left: 18px; }
.checklist-item.done { box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18); }
.checklist-item.pending { box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18); }
.empty-state {
  padding: 32px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 1100px) {
  .page-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats-grid,
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .page-shell,
  #operations,
  #assets,
  #logs,
  #schedule,
  #services,
  #channels,
  #integrations,
  #launch { padding: 16px; }
  .hero,
  .form-actions,
  .service-group header,
  .data-card-top,
  .row-actions { flex-direction: column; }
  .stats-grid,
  .form-grid,
  .integration-columns { grid-template-columns: 1fr; }
}
