:root {
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --surface: rgba(15, 23, 42, 0.82);
  --surface-2: rgba(30, 41, 59, 0.78);
  --text: #eff6ff;
  --subtle: #cbd5e1;
  --accent: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --teal: #14b8a6;
  --outline: rgba(148, 163, 184, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, #0b3b5e 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #184e63 0%, transparent 35%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 78%);
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(2, 6, 23, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--outline);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
}

h1,
h2 {
  margin: 0.2rem 0;
}

.admin-link,
button {
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, #0369a1, #0891b2);
  border: none;
  padding: 0.62rem 0.9rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
}

.dashboard-layout,
.admin-layout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.dashboard-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.hero-card,
.panel {
  border: 1px solid var(--outline);
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.28);
}

.hero-card {
  grid-column: span 12;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2), rgba(20, 184, 166, 0));
  pointer-events: none;
}

.panel:nth-of-type(2) {
  grid-column: span 12;
}

.panel:nth-of-type(3),
.panel:nth-of-type(4) {
  grid-column: span 6;
}

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

.drawer-toggle {
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.9), rgba(8, 145, 178, 0.9));
}

.checks-drawer {
  overflow: hidden;
}

.checks-drawer.is-collapsed {
  display: none;
}

.status-pill {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.25rem;
  font-weight: 500;
  border: 1px solid var(--outline);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.15) inset;
}

.hero-card .status-pill {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.status-green {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.status-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.status-red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.7rem;
}

.kpi-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--subtle);
}

.kpi-value {
  margin: 0.3rem 0 0;
  font-size: 1.6rem;
  font-family: "IBM Plex Mono", monospace;
}

table {
  width: 100%;
  margin-top: 0.8rem;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.9rem;
}

.subtle {
  color: var(--subtle);
  margin-top: 0.35rem;
}

.footer {
  text-align: center;
  color: var(--subtle);
  padding: 0.5rem 0 1.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

input {
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.7rem;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  border: 1px solid var(--outline);
  padding: 0.62rem;
  border-radius: 0.55rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-row input {
  width: auto;
}

.admin-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.admin-layout .panel {
  grid-column: span 6;
}

.admin-layout .panel.wide {
  grid-column: span 12;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.65s ease forwards;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

.delay-3 {
  animation-delay: 0.24s;
}

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

@media (max-width: 900px) {
  .panel:nth-of-type(3),
  .panel:nth-of-type(4),
  .admin-layout .panel {
    grid-column: span 12;
  }
}
