:root {
  --bg-0: #080b14;
  --bg-1: #0b1020;
  --bg-2: #131426;
  --panel: rgba(17, 23, 42, 0.72);
  --panel-strong: rgba(21, 28, 52, 0.84);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f7ff;
  --muted: rgba(226, 233, 255, 0.64);
  --accent: #7de5ff;
  --accent-2: #b07cff;
  --accent-3: #6bf7bf;
  --danger: #ff9cb6;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(125, 229, 255, 0.16), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(176, 124, 255, 0.2), transparent 26%),
    radial-gradient(circle at 60% 90%, rgba(107, 247, 191, 0.1), transparent 28%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 55%, #120d22 100%);
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  overflow-x: hidden;
}

.grid-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.orb {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.48;
}

.orb-a {
  top: -10rem;
  left: -8rem;
  background: rgba(125, 229, 255, 0.18);
}

.orb-b {
  right: -8rem;
  bottom: -10rem;
  background: rgba(176, 124, 255, 0.22);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1340px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 36px;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 16, 0.68);
  backdrop-filter: blur(24px);
}

.auth-screen.is-open {
  display: flex;
}

.auth-card,
.hero-stage,
.panel,
.stat-card,
.preview-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-card {
  width: min(580px, 100%);
  padding: 30px;
  background: linear-gradient(180deg, rgba(20, 28, 50, 0.94), rgba(13, 18, 34, 0.94));
}

.eyebrow,
.panel-kicker,
.chip-title,
.stat-title,
.muted,
.auth-message,
.auth-copy,
.ticker,
.watermark {
  letter-spacing: 0.04em;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 1.08rem;
  font-weight: 650;
}

.auth-card h2 {
  max-width: 14ch;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.auth-copy,
.auth-message,
.muted {
  color: var(--muted);
}

.auth-copy {
  margin-top: 14px;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 22px;
}

.auth-input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.auth-message {
  min-height: 1.5em;
  margin-top: 14px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

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

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(125, 229, 255, 0.92), rgba(176, 124, 255, 0.92));
  color: #09111f;
  box-shadow: 0 10px 30px rgba(125, 229, 255, 0.22);
}

.btn-ghost,
.btn-copy {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.watermark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(125, 229, 255, 0.08);
  border: 1px solid rgba(125, 229, 255, 0.18);
}

.hero-stage {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(125, 229, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(176, 124, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(17, 23, 42, 0.92), rgba(25, 19, 47, 0.82));
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
}

.hero-topline,
.hero-grid,
.dashboard-grid {
  position: relative;
  z-index: 1;
}

.ticker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(244, 247, 255, 0.84);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.ticker-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.72fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 18px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  padding: 10px 8px 8px;
}

.hero-label {
  margin: 22px 0 16px;
  color: rgba(244, 247, 255, 0.62);
  font-size: 0.9rem;
}

.monitor-banner {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  padding: 14px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(125, 229, 255, 0.14), rgba(176, 124, 255, 0.14));
  border: 1px solid rgba(125, 229, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.monitor-pulse {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 18px rgba(107, 247, 191, 0.8);
}

.monitor-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(107, 247, 191, 0.42);
  animation: pulse-ring 1.8s ease-out infinite;
}

.monitor-label {
  color: rgba(244, 247, 255, 0.56);
  font-size: 0.74rem;
  text-transform: uppercase;
}

#monitorHeadline {
  display: block;
  margin-top: 2px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  letter-spacing: 0.02em;
}

.invite-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.invite-code {
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-shadow: 0 0 35px rgba(125, 229, 255, 0.16);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.chip {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chip-title {
  color: rgba(244, 247, 255, 0.5);
  font-size: 0.76rem;
}

.chip strong {
  font-size: 0.98rem;
  font-weight: 650;
}

.hero-side {
  display: grid;
  gap: 16px;
}

.stat-card,
.preview-card,
.panel {
  padding: 18px;
}

.stat-card {
  min-height: 136px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.stat-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.stat-main strong {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 0.9;
}

.stat-main span,
.stat-caption,
.stat-title {
  color: var(--muted);
}

.preview-card {
  min-height: 210px;
  background: rgba(255, 255, 255, 0.04);
}

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

.panel-head.compact {
  margin-bottom: 12px;
}

.panel-head a {
  color: var(--muted);
  text-decoration: none;
}

.panel-head a:hover {
  color: var(--accent);
}

.preview-frame {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
}

.preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 158px;
  object-fit: cover;
}

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

.dashboard-grid-info {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.78fr);
}

.table-panel {
  background: linear-gradient(180deg, rgba(17, 23, 42, 0.84), rgba(14, 18, 32, 0.74));
}

.info-panel {
  display: grid;
  gap: 18px;
  align-self: start;
  background: linear-gradient(180deg, rgba(21, 24, 40, 0.88), rgba(14, 17, 29, 0.8));
}

.info-list {
  margin: 0;
  padding-left: 20px;
  color: rgba(244, 247, 255, 0.82);
  line-height: 1.75;
}

.info-list li + li {
  margin-top: 12px;
}

.qr-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.qr-head h3 {
  margin: 0;
  font-size: 1rem;
}

.qr-frame {
  overflow: hidden;
  margin-top: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 16, 0.7);
}

.qr-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.qr-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.table-list {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(90deg, rgba(125, 229, 255, 0.05), rgba(176, 124, 255, 0.04));
}

.table-row strong,
.table-row span {
  min-width: 0;
}

.table-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.97rem;
}

.table-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.row-left {
  min-width: 0;
}

.row-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
}

.row-badge.live {
  color: var(--accent);
  background: rgba(125, 229, 255, 0.08);
}

.row-badge.good {
  color: var(--accent-3);
  background: rgba(107, 247, 191, 0.12);
}

.row-badge.warn {
  color: #ffcf8c;
  background: rgba(255, 180, 74, 0.12);
}

.row-badge.bad {
  color: var(--danger);
  background: rgba(255, 156, 182, 0.12);
}

.ocr-box {
  min-height: 180px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 7, 14, 0.5);
  color: rgba(241, 246, 255, 0.86);
  font: 0.9rem/1.7 "SFMono-Regular", "Menlo", monospace;
  white-space: pre-wrap;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .dashboard-grid,
  .dashboard-grid-info {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 18px, 100%);
    padding-top: 14px;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions,
  .hero-meta,
  .invite-cluster {
    width: 100%;
  }

  .auth-form {
    grid-template-columns: 1fr;
  }

  .invite-code {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .table-row {
    grid-template-columns: 1fr;
  }
}
