:root {
  --bg: #07110d;
  --bg-deep: #030806;
  --panel: rgba(12, 24, 18, 0.88);
  --panel-strong: rgba(19, 36, 28, 0.94);
  --line: rgba(86, 255, 145, 0.18);
  --text: #eefbf2;
  --muted: #9ac2a8;
  --accent: #52ff92;
  --accent-strong: #a8ff6a;
  --accent-soft: rgba(82, 255, 146, 0.12);
  --warning: #ffd66b;
  --danger: #ff7272;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Bahnschrift", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(82, 255, 146, 0.12), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(168, 255, 106, 0.1), transparent 26%),
    linear-gradient(180deg, #0a1510 0%, var(--bg) 45%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(82, 255, 146, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 255, 146, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
}

.page {
  min-height: 100vh;
  padding: 32px 18px 48px;
}

.shell {
  width: min(1260px, 100%);
  margin: 0 auto;
}

.hero,
.topbar,
.panel-head,
.metric-row,
.status-grid,
.chip-row,
.topbar-actions,
.hero-actions {
  display: flex;
  gap: 16px;
}

.hero,
.topbar,
.panel-head,
.metric-row {
  justify-content: space-between;
  align-items: flex-end;
}

.hero {
  margin-bottom: 28px;
}

.hero-actions,
.topbar-actions,
.chip-row {
  flex-wrap: wrap;
  align-items: center;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
}

h3 {
  font-size: 24px;
}

.eyebrow,
.section-label,
.metric-label,
.metric-small-label,
.integration-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

.lede,
.muted,
.metric-note {
  color: var(--muted);
}

.lede {
  margin-top: 14px;
  max-width: 760px;
  line-height: 1.55;
}

.panel {
  background: linear-gradient(180deg, rgba(16, 30, 22, 0.92), rgba(8, 18, 14, 0.9));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hidden {
  display: none;
}

.login-panel {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
}

.login-form,
.content-grid,
.hero-grid,
.stack-list,
.compact-list {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  margin-top: 22px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  margin-top: 22px;
}

.metric-panel {
  min-height: 290px;
}

.metric-value,
.status-value {
  font-family: "Consolas", "JetBrains Mono", monospace;
  line-height: 1;
}

.metric-value {
  margin-top: 10px;
  font-size: clamp(72px, 12vw, 128px);
  color: var(--accent);
  text-shadow: 0 0 24px rgba(82, 255, 146, 0.24);
}

.status-value {
  margin-top: 8px;
  font-size: 28px;
  color: var(--accent-strong);
}

.metric-side {
  text-align: right;
}

.metric-small-value {
  margin-top: 8px;
  font-size: 20px;
  color: var(--text);
}

.metric-note {
  margin-top: 16px;
  line-height: 1.55;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(82, 255, 146, 0.18);
  font-size: 13px;
  color: var(--muted);
}

.chip strong {
  color: var(--text);
}

.status-grid {
  justify-content: space-between;
  margin: 18px 0 14px;
}

.integration-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(4, 12, 9, 0.84);
  border: 1px solid rgba(168, 255, 106, 0.15);
}

code {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-family: "Consolas", "JetBrains Mono", monospace;
  word-break: break-word;
}

.notice,
.error,
.item {
  border-radius: 20px;
}

.notice,
.error {
  margin-top: 18px;
  padding: 14px 16px;
}

.notice {
  background: rgba(82, 255, 146, 0.1);
  border: 1px solid rgba(82, 255, 146, 0.2);
  color: var(--accent);
}

.error {
  background: rgba(255, 114, 114, 0.12);
  border: 1px solid rgba(255, 114, 114, 0.2);
  color: var(--danger);
}

.item {
  padding: 16px;
  background: rgba(5, 12, 9, 0.86);
  border: 1px solid rgba(82, 255, 146, 0.1);
}

.item-head,
.item-meta,
.device-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.item-title {
  font-size: 16px;
  font-weight: 700;
}

.item-subtitle,
.item-meta,
.token-preview {
  color: var(--muted);
  font-size: 13px;
}

.device-status,
.delivery-status,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(82, 255, 146, 0.16);
  background: rgba(82, 255, 146, 0.09);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.badge-user {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.badge-live.offline {
  color: var(--warning);
  border-color: rgba(255, 214, 107, 0.22);
  background: rgba(255, 214, 107, 0.08);
}

.ghost-link,
.ghost-button,
button,
input {
  font: inherit;
}

input,
button,
.ghost-link {
  min-height: 50px;
  border-radius: 16px;
}

input {
  width: 100%;
  padding: 0 16px;
  border: 1px solid rgba(82, 255, 146, 0.16);
  background: rgba(2, 8, 5, 0.92);
  color: var(--text);
}

button {
  padding: 0 18px;
  border: 0;
  background: linear-gradient(135deg, #52ff92, #a8ff6a);
  color: #031008;
  font-weight: 800;
  cursor: pointer;
}

.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(82, 255, 146, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.divider {
  height: 1px;
  margin: 4px 0;
  background: linear-gradient(90deg, transparent, rgba(82, 255, 146, 0.2), transparent);
}

.empty-state {
  padding: 22px;
  border-radius: 20px;
  border: 1px dashed rgba(82, 255, 146, 0.18);
  color: var(--muted);
}

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

.status-failed {
  color: var(--danger);
}

.status-disabled {
  color: var(--warning);
}

@media (max-width: 980px) {
  .hero,
  .topbar,
  .panel-head,
  .metric-row,
  .status-grid,
  .login-panel,
  .content-grid,
  .hero-grid,
  .item-head,
  .item-meta,
  .device-line {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .metric-side {
    text-align: left;
  }
}
