:root {
  --cockpit-sub-surface: rgba(15, 23, 42, 0.68);
  --cockpit-sub-border: rgba(148, 163, 184, 0.12);
  --cockpit-sub-border-strong: rgba(103, 232, 249, 0.22);
  --cockpit-sub-shadow: 0 22px 52px rgba(2, 8, 23, 0.22);
}

body.cockpit-subpage {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 20%),
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 18%),
    linear-gradient(180deg, #040912 0%, #07111d 48%, #0b1728 100%);
}

.cockpit-subpage .container {
  max-width: 1380px;
}

.cockpit-subpage .chart-panel,
.cockpit-subpage .tile,
.cockpit-subpage .content-panel,
.cockpit-subpage .error-panel,
.cockpit-subpage .storm-hero,
.cockpit-subpage .storm-filter,
.cockpit-subpage .storm-panel,
.cockpit-subpage .storm-stat {
  position: relative;
  border-radius: 1.5rem;
  border: 1px solid var(--cockpit-sub-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--cockpit-sub-surface);
  box-shadow: var(--cockpit-sub-shadow);
  backdrop-filter: blur(22px) saturate(135%);
}

.cockpit-subpage .chart-panel,
.cockpit-subpage .content-panel,
.cockpit-subpage .error-panel,
.cockpit-subpage .tile,
.cockpit-subpage .storm-panel {
  padding: 1.2rem;
}

.cockpit-subpage .storm-hero,
.cockpit-subpage .storm-filter {
  padding: 1.1rem 1.2rem;
}

.cockpit-subpage .chart-panel::before,
.cockpit-subpage .content-panel::before,
.cockpit-subpage .error-panel::before,
.cockpit-subpage .tile::before,
.cockpit-subpage .storm-panel::before,
.cockpit-subpage .storm-hero::before,
.cockpit-subpage .storm-filter::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.7;
}

.cockpit-subpage .section-title,
.cockpit-subpage .storm-panel__header {
  margin-bottom: 1rem;
}

.cockpit-subpage .section-title h1,
.cockpit-subpage .section-title h2,
.cockpit-subpage .storm-hero h1,
.cockpit-subpage .storm-panel__header h2,
.cockpit-subpage .error-panel h1 {
  color: #ecf4ff;
}

.cockpit-subpage .text-muted-strong,
.cockpit-subpage .storm-hero p,
.cockpit-subpage .storm-panel__header p,
.cockpit-subpage .chart-summary__label,
.cockpit-subpage .form-label {
  color: #8ca1bd !important;
}

.cockpit-subpage .subtle-badge,
.cockpit-subpage .status-pill,
.cockpit-subpage .storm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background: rgba(8, 17, 31, 0.58);
  color: #67e8f9;
}

.cockpit-subpage .chart-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}

.cockpit-subpage .chart-summary__item,
.cockpit-subpage .trend-tile,
.cockpit-subpage .history-compare-option,
.cockpit-subpage .storm-stat {
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(8, 17, 31, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cockpit-subpage .chart-summary__item,
.cockpit-subpage .trend-tile,
.cockpit-subpage .storm-stat {
  padding: 0.95rem 1rem;
}

.cockpit-subpage .chart-summary__item strong,
.cockpit-subpage .trend-tile strong,
.cockpit-subpage .storm-stat strong {
  color: #f8fbff;
}

.cockpit-subpage .trend-grid,
.cockpit-subpage .storm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.cockpit-subpage .form-select,
.cockpit-subpage .form-control {
  border-radius: 1rem;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(8, 17, 31, 0.66);
  color: #ecf4ff;
}

.cockpit-subpage .form-select:focus,
.cockpit-subpage .form-control:focus {
  border-color: var(--cockpit-sub-border-strong);
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.12);
}

.cockpit-subpage .btn-info {
  border-radius: 999px;
  border: 0;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
  color: #04111e;
  font-weight: 700;
}

.cockpit-subpage .table-dark {
  --bs-table-bg: rgba(8, 17, 31, 0.56);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-border-color: rgba(148, 163, 184, 0.08);
  border-radius: 1rem;
  overflow: hidden;
}

.cockpit-subpage .storm-map,
.cockpit-subpage .radar-container,
.cockpit-subpage .radar-frame {
  border-radius: 1.2rem;
  overflow: hidden;
}

.cockpit-subpage .timeline-item {
  border-radius: 1rem !important;
  border-color: rgba(148, 163, 184, 0.08) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(8, 17, 31, 0.54) !important;
}

.cockpit-subpage .error-panel {
  text-align: center;
}

@media (max-width: 767.98px) {
  .cockpit-subpage .chart-panel,
  .cockpit-subpage .content-panel,
  .cockpit-subpage .error-panel,
  .cockpit-subpage .tile,
  .cockpit-subpage .storm-panel,
  .cockpit-subpage .storm-hero,
  .cockpit-subpage .storm-filter {
    padding: 1rem;
    border-radius: 1.25rem;
  }

  .cockpit-subpage .section-title,
  .cockpit-subpage .storm-panel__header {
    gap: 0.7rem;
  }

  .cockpit-subpage .subtle-badge,
  .cockpit-subpage .status-pill,
  .cockpit-subpage .storm-badge {
    max-width: 100%;
  }
}
