:root {
  --ink: #061226;
  --muted: #52647a;
  --line: rgba(7, 25, 45, 0.14);
  --glass: rgba(255, 255, 255, 0.64);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --ok: #0d7b5d;
  --warn: #a16617;
  --offline: #8a2b2b;
  --shadow: 0 26px 70px rgba(8, 24, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(132, 238, 255, 0.55), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(142, 255, 218, 0.5), transparent 34%),
    radial-gradient(circle at 50% 96%, rgba(255, 210, 153, 0.3), transparent 28%),
    linear-gradient(140deg, #edf9ff 0%, #ecf4ff 45%, #f8fcff 100%);
  overflow-x: hidden;
}

.blob {
  position: fixed;
  width: min(44vw, 560px);
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.44;
  z-index: 0;
}

.blob-a {
  left: -12vw;
  top: -14vh;
  background: radial-gradient(circle at 35% 35%, rgba(98, 224, 255, 0.86), rgba(98, 224, 255, 0.1) 70%);
  animation: driftA 15s ease-in-out infinite;
}

.blob-b {
  right: -14vw;
  bottom: -20vh;
  background: radial-gradient(circle at 70% 65%, rgba(32, 225, 175, 0.82), rgba(32, 225, 175, 0.1) 72%);
  animation: driftB 19s ease-in-out infinite;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
  background-image: radial-gradient(rgba(16, 40, 66, 0.08) 1px, transparent 1px);
  background-size: 3px 3px;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 28px));
  margin: 16px auto 34px;
  display: grid;
  gap: 12px;
}

.glass {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.52)),
    linear-gradient(150deg, rgba(200, 243, 255, 0.22), rgba(213, 255, 241, 0.18));
  backdrop-filter: blur(14px) saturate(1.16);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.42), transparent 35%, rgba(255, 255, 255, 0.2) 72%, transparent);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.brand {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, #19c8ff, #1ce5a8);
  box-shadow: 0 0 16px rgba(25, 200, 255, 0.85);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.top-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-link,
.ghost-btn,
.primary-link,
.secondary-link {
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}

.ghost-link,
.ghost-btn {
  color: var(--ink);
  background: var(--glass-strong);
}

.primary-link {
  color: #fff;
  border: 0;
  background: linear-gradient(120deg, #0f2744 0%, #135f7f 54%, #11836f 100%);
}

.secondary-link {
  color: var(--ink);
  background: var(--glass-strong);
}

.ghost-link:hover,
.ghost-btn:hover,
.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(9, 25, 42, 0.14);
}

.hero h1 {
  margin: 10px 0 10px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.4rem, 3.8vw, 3rem);
  line-height: 1.06;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2f4f68;
}

.lead {
  margin: 0;
  max-width: 820px;
  color: #24405a;
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  line-height: 1.5;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1rem, 2vw, 1.26rem);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field {
  min-width: 150px;
}

.field label {
  display: block;
  margin-bottom: 4px;
  color: #2f4f68;
  font-size: 0.8rem;
  font-weight: 700;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass-strong);
  color: var(--ink);
  font: inherit;
  padding: 8px 9px;
}

.metric-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 10px;
}

.metric-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(8, 24, 42, 0.12);
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.metric-title {
  margin: 0;
  font-size: 0.98rem;
}

.status-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
}

.status-chip.online {
  color: var(--ok);
}

.status-chip.maintenance {
  color: var(--warn);
}

.status-chip.offline {
  color: var(--offline);
}

.meta {
  color: #2f4d66;
  font-size: 0.86rem;
  line-height: 1.45;
}

.metric-dropdown {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

.metric-dropdown > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 9px 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e4262;
}

.metric-dropdown > summary::-webkit-details-marker {
  display: none;
}

.metric-dropdown > summary::after {
  content: "▾";
  float: right;
  opacity: 0.76;
  transition: transform 0.2s ease;
}

.metric-dropdown[open] > summary::after {
  transform: rotate(180deg);
}

.metric-dropdown-body {
  border-top: 1px solid var(--line);
  padding: 8px;
  display: grid;
  gap: 8px;
}

.graph-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.graph {
  width: 100%;
  height: 84px;
  display: block;
}

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-actions a {
  text-decoration: none;
  color: #143e5d;
  font-weight: 700;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  padding: 12px;
}

.card p {
  margin: 0;
  font-size: 0.76rem;
  color: #44617a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card h3 {
  margin: 7px 0 0;
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  word-break: break-word;
}

.easter {
  display: none;
  font-size: 0.92rem;
}

.easter.show {
  display: block;
}

.empty-tile {
  border: 1px dashed rgba(7, 25, 45, 0.25);
  border-radius: 12px;
  padding: 12px;
  color: #355570;
  background: rgba(255, 255, 255, 0.58);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: panelIn 0.62s ease forwards;
}

.reveal-1 { animation-delay: 70ms; }
.reveal-2 { animation-delay: 170ms; }
.reveal-3 { animation-delay: 300ms; }
.reveal-4 { animation-delay: 430ms; }

.motion-off * {
  animation: none !important;
  transition: none !important;
}

@keyframes panelIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes driftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, 26px) scale(1.06); }
}

@keyframes driftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -24px) scale(1.08); }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.72; }
}

@media (max-width: 980px) {
  .topbar,
  .section-head {
    grid-template-columns: 1fr;
  }

  .top-controls {
    justify-content: flex-start;
  }

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