:root {
  --bg-top: #08111f;
  --bg-bottom: #12243d;
  --panel: rgba(8, 17, 31, 0.75);
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --success: #0f766e;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  padding-bottom: 3rem;
}

.container {
  width: min(1180px, calc(100% - 2rem));
}

.app-header {
  padding: 1.5rem 0 0.75rem;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.brand-mark {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-subtitle,
.metric-hint,
.notes {
  color: var(--muted);
}

.page-content {
  display: grid;
  gap: 1.5rem;
}

.hero-panel,
.panel,
.metric-card {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.hero-panel {
  border-radius: 28px;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: #fdba74;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero-panel h1,
.panel h2 {
  margin: 0;
}

.hero-panel h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.hero-copy {
  max-width: 60ch;
  margin: 1rem 0 0;
  color: #cbd5e1;
}

.refresh-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  padding: 0.9rem 1.25rem;
  font-weight: 700;
}

.toolbar-stack {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.snapshot-form {
  display: grid;
  gap: 0.35rem;
}

.snapshot-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.snapshot-select {
  min-width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 0.7rem 0.9rem;
}

.metrics-grid,
.dashboard-grid,
.operation-grid {
  display: grid;
  gap: 1rem;
}

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

.dashboard-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.metric-card,
.panel {
  border-radius: 24px;
  padding: 1.5rem;
}

.metric-label {
  display: block;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.metric-value {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.metric-value.small {
  font-size: 1.25rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.action-list {
  display: grid;
  gap: 0.85rem;
}

.action-row,
.operation-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

.diagnostics-table {
  color: var(--text);
  margin-bottom: 0;
}

.diagnostics-table thead th {
  border-bottom-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.diagnostics-table tbody td {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.12);
}

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

@media (max-width: 900px) {
  .hero-panel,
  .dashboard-grid,
  .brand-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .chart-wrap {
    max-width: 320px;
  }
}

@media print {
  :root {
    --text: #111827;
    --muted: #4b5563;
  }

  body {
    background: #fff !important;
    color: #111827 !important;
  }

  .hero-panel,
  .panel,
  .metric-card,
  .action-row,
  .operation-card {
    background: #fff !important;
    color: #111827 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .refresh-form,
  .snapshot-form,
  .brand-subtitle {
    display: none !important;
  }

  .diagnostics-table,
  .diagnostics-table thead th,
  .diagnostics-table tbody td,
  .notes,
  .metric-hint {
    color: #111827 !important;
  }

  .eyebrow {
    color: #9a3412 !important;
  }

  a {
    color: #111827 !important;
  }
}
