:root {
  --ink: #07111f;
  --ink-2: #0c1c2b;
  --panel: rgba(8, 22, 34, 0.88);
  --panel-soft: rgba(15, 39, 55, 0.76);
  --paper: #f6fbff;
  --muted: #a9c3ce;
  --line: rgba(246, 251, 255, 0.2);
  --blue: #5aa9ff;
  --teal: #22d3c5;
  --green: #8be28f;
  --coral: #ff7a4c;
  --yellow: #ffd166;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.sysma-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(90, 169, 255, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(7, 17, 31, 0.72), rgba(7, 17, 31, 0.92)),
    url("bgdash.jpg") center / cover fixed;
}

.sysma-app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  mix-blend-mode: soft-light;
}

.app-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 3px solid rgba(246, 251, 255, 0.18);
  background: rgba(7, 17, 31, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.18);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  border: 3px solid var(--paper);
  border-radius: 0.35rem;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--ink);
  font-weight: 950;
  font-size: 0.72rem;
  box-shadow: 5px 5px 0 var(--ink), 8px 8px 0 var(--coral);
  transition: width 180ms ease, height 180ms ease, font-size 180ms ease, box-shadow 180ms ease;
}

.brand-copy h1,
.brand-copy p,
.intro-copy h2,
.intro-copy p,
.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.brand-copy h1 {
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  font-weight: 900;
  line-height: 1;
}

.brand-copy p,
.status-pill,
.panel-heading p,
.intro-copy p,
.metric-detail,
.metric-label,
label {
  color: var(--muted);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(246, 251, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-dot {
  color: var(--green);
}

.filter-toggle {
  display: none;
  min-height: 2.55rem;
  padding: 0 0.9rem;
  border: 2px solid var(--paper);
  border-radius: 0.4rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 950;
  text-transform: uppercase;
}

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.2rem);
}

.hero-band {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
  margin-bottom: 1rem;
}

.intro-copy,
.filter-panel,
.chart-panel,
.metric-card {
  border: 3px solid rgba(246, 251, 255, 0.86);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.72);
}

.intro-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 4vw, 2rem);
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.92), rgba(7, 17, 31, 0.68) 48%, rgba(7, 17, 31, 0.26)),
    url("sysma-cabin-comic.png") center right / cover;
}

.intro-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background-image:
    repeating-linear-gradient(0deg, rgba(246, 251, 255, 0.18) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(246, 251, 255, 0.08) 0 1px, transparent 1px 9px);
  mix-blend-mode: soft-light;
}

.section-kicker {
  width: max-content;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.55rem;
  border: 2px solid var(--paper);
  border-radius: 0.25rem;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.intro-copy h2 {
  max-width: 740px;
  font-size: clamp(2rem, 5.2vw, 4rem);
  line-height: 0.94;
  font-weight: 950;
}

.intro-copy p {
  max-width: 720px;
  margin-top: 1rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.5;
}

.filter-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.segmented-option {
  display: block;
  min-height: 2.7rem;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 0.35rem;
  background: rgba(246, 251, 255, 0.08);
  color: var(--paper);
  font-weight: 850;
  text-align: center;
}

.segmented-input {
  margin-right: 0.45rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.Select-control,
.Select-menu-outer,
.Select-value,
.Select-placeholder {
  background: var(--ink-2) !important;
  border-color: var(--line) !important;
  color: var(--paper) !important;
}

.Select-value-label,
.Select-option {
  color: var(--paper) !important;
}

.Select-option {
  background: var(--ink-2) !important;
}

.rc-slider-track {
  background: var(--teal);
}

.rc-slider-handle {
  border: 3px solid var(--paper);
  background: var(--coral);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.metric-card {
  min-height: 5.6rem;
  padding: 0.72rem;
  background: var(--panel-soft);
}

.metric-card--hero {
  background: linear-gradient(135deg, rgba(90, 169, 255, 0.78), rgba(34, 211, 197, 0.52));
}

.metric-label {
  font-size: 0.73rem;
  font-weight: 950;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 0.2rem;
  color: var(--paper);
  font-size: clamp(1rem, 1.7vw, 1.32rem);
  font-weight: 950;
  line-height: 1.08;
}

.metric-detail {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.comic-tabs .tab-container {
  display: flex;
}

.comic-tab {
  border: 3px solid rgba(246, 251, 255, 0.4) !important;
  border-radius: 0.45rem 0.45rem 0 0 !important;
  background: rgba(7, 17, 31, 0.78) !important;
  color: var(--muted) !important;
  font-weight: 950;
  padding: 0.8rem 1rem !important;
}

.comic-tab--selected {
  background: var(--yellow) !important;
  color: var(--ink) !important;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.chart-grid--dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-panel {
  min-width: 0;
  padding: 1rem;
}

.chart-panel--wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.panel-heading h2 {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 950;
}

.panel-heading p {
  max-width: 36rem;
  font-size: 0.9rem;
  text-align: right;
}

.weather-graph {
  min-height: 440px;
}

.chart-panel--wide .weather-graph {
  min-height: 540px;
}

@media (max-width: 1100px) {
  .hero-band,
  .chart-grid,
  .chart-grid--dense {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sysma-app {
    background-attachment: scroll;
  }

  .app-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem;
  }

  .filter-toggle {
    display: none;
  }

  .status-pill {
    width: 100%;
    white-space: normal;
  }

  .app-shell {
    padding: 0.75rem;
  }

  .hero-band {
    gap: 0.75rem;
  }

  .intro-copy,
  .filter-panel,
  .chart-panel,
  .metric-card {
    border-width: 2px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.72);
  }

  .field-grid,
  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card {
    min-height: 5.2rem;
  }

  .comic-tab {
    padding: 0.72rem 0.45rem !important;
    font-size: 0.86rem;
  }

  .panel-heading {
    display: block;
  }

  .panel-heading p {
    margin-top: 0.25rem;
    text-align: left;
  }

  .weather-graph,
  .chart-panel--wide .weather-graph {
    min-height: 360px;
  }

  .rc-slider-mark-text {
    display: none;
  }
}

@media (max-width: 420px) {
  .field-grid,
  .segmented-control {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }
}
