:root {
  --bg: #070b17;
  --bg-2: #0e1226;
  --panel: rgba(8, 14, 31, 0.78);
  --panel-border: rgba(90, 215, 255, 0.22);
  --text: #e6f3ff;
  --muted: #8fa7c4;
  --cyan: #67f0ff;
  --pink: #ff4fd8;
  --violet: #9c7cff;
  --amber: #ffcf5a;
  --green: #4cffb1;
  --danger: #ff5e7a;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(156, 124, 255, 0.22), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(103, 240, 255, 0.18), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(255, 79, 216, 0.18), transparent 28%),
    linear-gradient(180deg, #050811 0%, #090e1d 40%, #060913 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

.bg-grid,
.bg-noise,
.frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(103, 240, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 240, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 95%);
  opacity: 0.28;
  transform: perspective(900px) rotateX(70deg) translateY(-18%);
  transform-origin: top;
}

.bg-noise {
  background-image: linear-gradient(rgba(255,255,255,0.025), rgba(255,255,255,0.015));
  opacity: 0.35;
}

.frame {
  border: 1px solid rgba(103, 240, 255, 0.12);
  box-shadow: inset 0 0 120px rgba(103, 240, 255, 0.035);
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(103, 240, 255, 0.08), transparent 30%, rgba(255, 79, 216, 0.05));
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 24px;
}

.eyebrow,
.section-kicker,
.score-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--cyan);
  margin: 0 0 10px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
  text-shadow: 0 0 24px rgba(103, 240, 255, 0.25), 0 0 40px rgba(255, 79, 216, 0.18);
}

.subtitle {
  color: #ffc9ef;
  margin: 14px 0 10px;
  font-size: 1.05rem;
}

.hero-summary {
  margin: 0;
  max-width: 72ch;
  color: var(--text);
  line-height: 1.7;
}

.hero-side {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: end;
}

.system-chip {
  border: 1px solid rgba(76, 255, 177, 0.45);
  color: var(--green);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.84rem;
  background: rgba(76, 255, 177, 0.08);
  box-shadow: 0 0 18px rgba(76, 255, 177, 0.15);
}

.time-block {
  min-width: 220px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.time-block span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.time-block strong {
  font-size: 1rem;
}

.tag-row,
.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag,
.signal {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text);
  border: 1px solid rgba(103, 240, 255, 0.15);
  background: rgba(103, 240, 255, 0.08);
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: 18px;
}

.stat-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.stat-sub {
  margin-top: 8px;
  color: #bfd1e8;
  font-size: 0.92rem;
}

.status-row {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.status-pill.degraded {
  color: #ffd48d;
  border-color: rgba(255, 207, 90, 0.4);
  background: rgba(255, 207, 90, 0.1);
}

.sections-grid {
  margin-top: 18px;
}

.section-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.section {
  padding: 20px;
  border-radius: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 1.5rem;
}

.section-count {
  font-size: 0.9rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 240, 255, 0.32);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.item-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.summary,
.why {
  margin: 0;
  color: #d6e3f4;
  line-height: 1.6;
}

.why {
  color: #ffcdf0;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.score-wrap {
  min-width: 180px;
}

.score-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  margin: 8px 0 6px;
}

.score-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--amber), var(--green));
  box-shadow: 0 0 18px rgba(103, 240, 255, 0.25);
}

.score-number,
.worth-label {
  font-size: 0.88rem;
}

.worth-label {
  margin-left: 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.item-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.item-link:hover {
  color: #fff;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.12);
}

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

  .hero-side {
    justify-items: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .time-block {
    min-width: 0;
  }

  .stats-grid,
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1440px);
    padding-top: 12px;
  }

  .hero,
  .section {
    padding: 18px;
    border-radius: 18px;
  }

  .hero-side,
  .stats-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .card-footer {
    flex-direction: column;
    align-items: start;
  }
}
