:root {
  --bg: #041419;
  --bg-2: #0e2428;
  --panel: rgba(7, 30, 37, 0.74);
  --panel-stroke: rgba(143, 239, 210, 0.22);
  --text: #e8fff9;
  --text-soft: #9fd1c2;
  --ok: #65ffaf;
  --warn: #ffc857;
  --danger: #ff6f7c;
  --accent: #45d6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, #1e5a66 0%, transparent 35%),
    radial-gradient(circle at 85% 110%, #1a4b35 0%, transparent 28%),
    linear-gradient(130deg, var(--bg), var(--bg-2));
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.bg-orb-a {
  width: 320px;
  height: 320px;
  background: #4ed0ff;
  top: -90px;
  right: -80px;
}

.bg-orb-b {
  width: 280px;
  height: 280px;
  background: #5dff9c;
  left: -100px;
  bottom: -90px;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.glass {
  backdrop-filter: blur(10px);
  background: var(--panel);
  border: 1px solid var(--panel-stroke);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  border-radius: 16px;
}

.hero {
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.hero h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.72rem;
}

.subtle {
  margin: 0.4rem 0 0;
  color: var(--text-soft);
}

.hero-links {
  display: flex;
  gap: 0.7rem;
}

.hero a,
button {
  border: 1px solid rgba(151, 243, 255, 0.3);
  background: rgba(21, 53, 61, 0.9);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.hero a:hover,
button:hover {
  transform: translateY(-2px);
  background: rgba(49, 92, 101, 0.94);
}

.grid {
  display: grid;
  gap: 1rem;
}

.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 0.95rem;
}

.label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.card h2 {
  margin: 0.45rem 0 0;
  font-size: 1.2rem;
}

.content-grid {
  grid-template-columns: 1.5fr 1fr;
}

.panel {
  padding: 1rem;
}

.panel h3 {
  margin: 0 0 0.9rem;
}

.stack {
  display: grid;
  gap: 0.62rem;
}

label {
  font-size: 0.83rem;
  color: var(--text-soft);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(160, 248, 224, 0.26);
  background: rgba(3, 16, 20, 0.7);
  color: var(--text);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
}

.metrics-panel dl {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.metrics-panel div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(156, 239, 217, 0.2);
  padding-bottom: 0.3rem;
}

.metrics-panel dt {
  color: var(--text-soft);
}

.table-panel .table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  padding: 0.62rem 0.5rem;
  border-bottom: 1px solid rgba(149, 233, 212, 0.12);
}

th {
  color: var(--text-soft);
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.2rem 0.54rem;
}

.state.on {
  color: #00220e;
  background: var(--ok);
}

.state.off {
  color: #301907;
  background: var(--warn);
}

.state.warn {
  color: #402300;
  background: #ffda8a;
}

.actions {
  display: flex;
  gap: 0.4rem;
}

.ghost {
  background: rgba(24, 53, 60, 0.82);
}

.danger {
  border-color: rgba(255, 137, 148, 0.4);
  background: rgba(109, 30, 37, 0.84);
}

.empty {
  text-align: center;
  color: var(--text-soft);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: rgba(5, 26, 31, 0.97);
  border: 1px solid rgba(152, 235, 211, 0.22);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}

.modal {
  width: min(92vw, 640px);
  border: 1px solid rgba(171, 245, 225, 0.25);
  background: rgba(3, 18, 23, 0.96);
  color: var(--text);
  border-radius: 12px;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.modal article {
  padding: 1rem;
}

.modal img {
  width: 220px;
  max-width: 100%;
  display: block;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  background: white;
}

.modal textarea {
  min-height: 180px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass {
  animation: reveal 420ms ease both;
}

@media (max-width: 980px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

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