﻿@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #f4efe7;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-border: rgba(15, 31, 51, 0.08);
  --text: #122033;
  --muted: #59667a;
  --accent: #007c74;
  --accent-strong: #015a55;
  --danger: #b93e34;
  --success: #11795f;
  --shadow: 0 20px 50px rgba(24, 33, 49, 0.08);
}

:root[data-theme="dark"] {
  --bg: #101720;
  --panel: rgba(20, 29, 40, 0.9);
  --panel-border: rgba(205, 224, 244, 0.08);
  --text: #eef6ff;
  --muted: #99a8bb;
  --accent: #49b8aa;
  --accent-strong: #9ce9db;
  --danger: #ff8f84;
  --success: #79ddb9;
  --shadow: 0 22px 55px rgba(3, 8, 16, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(200, 100, 50, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(0, 124, 116, 0.16), transparent 28%),
    linear-gradient(180deg, #f5eee2 0%, #f4efe7 45%, #f0ece7 100%);
  font-family: "IBM Plex Sans", sans-serif;
  transition: background 220ms ease, color 220ms ease;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(177, 92, 58, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(73, 184, 170, 0.16), transparent 26%),
    linear-gradient(180deg, #0d141d 0%, #101720 44%, #0b1017 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 32, 51, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 51, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 80%);
}

.app-shell {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
  padding: 34px 22px 56px;
}

.topbar,
.hero-card,
.panel-card,
.table-card,
.message-card {
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 32px;
  padding: 16px 20px;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #0d5d79 100%);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-copy h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.brand-copy p,
.muted,
.section-header p,
.footer-note,
th { color: var(--muted); }

.topbar-actions,
.actions,
.hero-tags,
.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill,
.tag,
.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
}

.status-pill { background: rgba(1, 90, 85, 0.08); color: var(--accent-strong); }
.status-pill.warn { background: rgba(185, 62, 52, 0.08); color: var(--danger); }

:root[data-theme="dark"] .status-pill {
  background: rgba(73, 184, 170, 0.12);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  animation: pulse 1.8s infinite;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 15px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: progress; }
.btn-primary { background: linear-gradient(135deg, var(--accent) 0%, #0d5d79 100%); color: #fff; }
.btn-secondary { background: rgba(255, 255, 255, 0.78); color: var(--text); border: 1px solid var(--panel-border); }

:root[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
}

.control-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.input-select {
  min-width: min(100%, 360px);
  flex: 1 1 280px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 11px 14px;
  font: inherit;
}

:root[data-theme="dark"] .input-select {
  background: rgba(255, 255, 255, 0.06);
}

.input-text {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 11px 14px;
  font: inherit;
}

:root[data-theme="dark"] .input-text {
  background: rgba(255, 255, 255, 0.06);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.field-group,
.field-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group span,
.field-toggle span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.toggle-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.field-toggle {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(18, 32, 51, 0.03);
}

.field-toggle input {
  width: 18px;
  height: 18px;
}
.btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 22px;
  margin-bottom: 28px;
}

.hero-card,
.table-card,
.panel-card,
.message-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  animation: rise 360ms ease both;
}

.hero-card { padding: 34px; }

.hero-card h2,
.section-header h3,
.card-title h4,
.stat-card strong {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.hero-card h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 0.96; letter-spacing: -0.03em; max-width: 14ch; }
.hero-card p { max-width: 62ch; line-height: 1.6; }
.tag { background: rgba(18, 32, 51, 0.06); }
.tag.accent { background: rgba(0, 124, 116, 0.1); color: var(--accent-strong); }

.stat-grid,
.grid-two,
.grid-three,
.grid-four {
  display: grid;
  column-gap: 22px;
  row-gap: 34px;
}

.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-card .eyebrow {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.section { margin-top: 42px; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 18px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section > .grid-two,
.section > .grid-three,
.section > .grid-four {
  margin-bottom: 34px;
}

.section > .grid-two:last-child,
.section > .grid-three:last-child,
.section > .grid-four:last-child {
  margin-bottom: 0;
}

.scroll-table { width: 100%; overflow-x: auto; }

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

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(18, 32, 51, 0.07);
  vertical-align: top;
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

tbody tr:last-child td,
.key-value div:last-child { border-bottom: 0; }

.positive { color: var(--success); }
.negative { color: var(--danger); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

.signal-list { display: grid; gap: 12px; }
.signal-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(18, 32, 51, 0.07);
}

.signal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.signal-head strong { display: block; font-size: 0.98rem; }
.cell-stack { display: grid; gap: 8px; min-width: 180px; }
.signal-meta,
.message-card pre { line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.signal-meta { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }
.mini-pill { padding: 6px 9px; background: rgba(18, 32, 51, 0.06); font-size: 0.78rem; }
.mini-pill.good { background: rgba(17, 121, 95, 0.12); color: var(--success); }
.mini-pill.bad { background: rgba(185, 62, 52, 0.1); color: var(--danger); }

.key-value { display: grid; gap: 10px; }
.key-value div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(18, 32, 51, 0.07);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(18, 32, 51, 0.04);
  color: var(--muted);
}

.footer-note { margin-top: 18px; font-size: 0.88rem; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 124, 116, 0.24); }
  70% { box-shadow: 0 0 0 8px rgba(0, 124, 116, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 124, 116, 0); }
}

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

@media (max-width: 1180px) {
  .hero,
  .grid-four,
  .grid-three { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .topbar { position: static; flex-direction: column; align-items: stretch; }
  .hero,
  .grid-two,
  .grid-three,
  .grid-four,
  .stat-grid,
  .settings-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .app-shell { padding: 20px 14px 34px; }
  .topbar,
  .hero-card,
  .table-card,
  .panel-card,
  .message-card { border-radius: 18px; }
  th, td { padding-left: 4px; padding-right: 4px; }
}




.tab-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab-button {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.tab-button:hover {
  transform: translateY(-1px);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--accent) 0%, #0d5d79 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(1, 90, 85, 0.18);
}

.tab-panel {
  animation: rise 260ms ease both;
}




