:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-accent: #0f1c31;
  --panel: #0d1728;
  --panel-2: #111f35;
  --border: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #93a5c1;
  --brand: #60a5fa;
  --brand-2: #a78bfa;
  --ok: #22c55e;
  --blocked: #ef4444;
  --warning: #f59e0b;
  --unsupported: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.14), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, #030712 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(15, 28, 49, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.header-copy,
.muted,
.hero-copy,
.window-meta,
.account-footer,
.empty-state p {
  color: var(--muted);
}

.header-copy {
  margin: 8px 0 0;
  max-width: 44rem;
  line-height: 1.6;
}

main {
  margin-top: 24px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 700;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(96, 165, 250, 0.28);
}

.notice,
.hero-panel,
.empty-state,
.account-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(13, 23, 40, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.notice {
  margin-bottom: 16px;
  padding: 16px 18px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  padding: 28px;
}

.hero-panel h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 12px 0 0;
  max-width: 55ch;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.stat-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.stat-card-wide {
  grid-column: 1 / -1;
}

.stat-value {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.stat-value-small {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.section-block {
  margin-top: 24px;
}

.section-heading h3 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.account-card {
  padding: 22px;
}

.account-card-blocked {
  border-color: rgba(239, 68, 68, 0.38);
}

.account-card-unauthorized {
  border-color: rgba(245, 158, 11, 0.38);
}

.account-card-unsupported,
.account-card-error {
  border-color: rgba(148, 163, 184, 0.35);
}

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

.account-provider {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 700;
}

.account-topline h4 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.account-meta,
.linked-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.meta-pill,
.profile-chip,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
}

.window-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.window-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(17, 31, 53, 0.9);
}

.window-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.window-header span {
  color: var(--muted);
  font-weight: 600;
}

.window-header strong {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.usage-meter-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.12);
}

.usage-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.usage-meter-fill-secondary {
  background: linear-gradient(90deg, #22c55e, #60a5fa);
}

.window-meta {
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.account-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.empty-state {
  margin-top: 18px;
  padding: 24px;
}

.empty-state h4 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.badge-blocked {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.badge-unauthorized {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.badge-unsupported,
.badge-error {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

@media (max-width: 900px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 20px), 1120px);
    padding-top: 14px;
  }

  .page-header {
    flex-direction: column;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .account-footer,
  .window-header,
  .account-topline {
    flex-direction: column;
  }
}
