:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: rgba(255,255,255,.075);
  --panel-strong: rgba(255,255,255,.11);
  --border: rgba(255,255,255,.12);
  --text: #eef4ff;
  --muted: #9aa8bd;
  --accent: #38bdf8;
  --accent-2: #8b5cf6;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.22), transparent 28rem),
    radial-gradient(circle at top right, rgba(139,92,246,.2), transparent 28rem),
    linear-gradient(180deg, #080b12, #0d1220 58%, #080b12);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

button:hover { border-color: rgba(255,255,255,.26); }

button.primary {
  border: 0;
  color: #06111f;
  background: linear-gradient(135deg, #67e8f9, #a78bfa);
}

button.ghost { background: transparent; }

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(56,189,248,.7);
  box-shadow: 0 0 0 4px rgba(56,189,248,.14);
}

label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 14px;
}

.hidden { display: none !important; }

.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px;
  border-right: 1px solid var(--border);
  background: rgba(5,9,18,.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.03em;
  margin-bottom: 34px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
}

nav a.active,
nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,.08);
}

.side-note {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.side-note a {
  color: var(--text);
  text-decoration: none;
}

.content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h1,
.panel h2 {
  margin: 0;
  letter-spacing: -.045em;
}

.topbar h1 {
  font-size: clamp(36px, 5vw, 56px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #9ee6ff;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
}

.panel,
.notice {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
}

.panel {
  padding: 24px;
}

.notice {
  padding: 14px 16px;
  margin-bottom: 18px;
  color: var(--muted);
}

.notice.ok { border-color: rgba(52,211,153,.32); color: #b8f7df; }
.notice.err { border-color: rgba(251,113,133,.35); color: #fecdd3; }

.auth-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.hero-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background:
    radial-gradient(circle at top right, rgba(56,189,248,.22), transparent 20rem),
    var(--panel);
}

.hero-card h2,
.warning h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.hero-card p,
.panel p {
  color: var(--muted);
  line-height: 1.55;
}

.warning {
  border-color: rgba(251,191,36,.35);
  background: linear-gradient(145deg, rgba(251,191,36,.12), rgba(255,255,255,.06));
}

.code-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}

code {
  flex: 1;
  display: block;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.26);
  border: 1px solid var(--border);
  color: #cffafe;
  font-size: 18px;
  overflow: auto;
}

.row,
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(251,191,36,.12);
  color: var(--warn);
  font-size: 13px;
  font-weight: 800;
}

.pill.active {
  background: rgba(52,211,153,.12);
  color: var(--good);
}

.status-card h2 {
  margin-top: 28px;
  font-size: clamp(30px, 4vw, 48px);
}

.actions,
.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
}

.section-card {
  margin-top: 18px;
}

.muted {
  color: var(--muted);
}

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

.payment {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.payment:last-child {
  border-bottom: 0;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }
  .sidebar nav,
  .side-note {
    display: none;
  }
  .brand {
    margin-bottom: 0;
  }
  .content {
    padding-top: 22px;
  }
  .auth-grid,
  .dashboard-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: start;
  }
}
