:root {
  --void: #07040f;
  --navy: #0b0616;
  --navy2: #140a24;
  --panel: #1c1030;
  --panel2: #271848;
  --line: #4a2d78;
  --text: #f6efff;
  --muted: #b7a4d6;
  --lime: #f0abfc;
  --cyan: #c4b5fd;
  --violet: #8b5cf6;
  --orchid: #d946ef;
  --red: #fb7185;
  --amber: #fbbf24;
  --radius: 18px;
  --side: 260px;
  --shadow: 0 28px 80px rgba(20, 6, 40, .55);
  --glow: 0 0 40px rgba(168, 85, 247, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(192, 132, 252, .22), transparent 52%),
    radial-gradient(720px 480px at -8% 18%, rgba(147, 51, 234, .18), transparent 48%),
    radial-gradient(640px 360px at 50% 110%, rgba(217, 70, 239, .1), transparent 50%),
    var(--navy);
  font: 15px/1.5 "Segoe UI Variable", "Segoe UI", "SF Pro Display", ui-sans-serif, system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button, a { transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s; }
button { cursor: pointer; }
a { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--orchid); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-150%); padding: 10px 14px;
  background: var(--orchid); color: #2a0836; font-weight: 800;
}
.skip-link:focus { transform: none; }

.landing { min-height: 100vh; position: relative; overflow: hidden; }
.landing:before, .landing:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  z-index: 0;
}
.landing:before { width: 420px; height: 420px; right: -80px; top: -120px; background: rgba(168, 85, 247, .22); }
.landing:after { width: 340px; height: 340px; left: -90px; bottom: 8%; background: rgba(217, 70, 239, .14); }
.landing-header, .hero, .landing-features { position: relative; z-index: 1; }
.landing-header {
  height: 84px;
  max-width: 1240px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img { display: block; width: 196px; max-height: 54px; filter: drop-shadow(0 0 18px rgba(192, 132, 252, .35)); }
.hero {
  width: min(1240px, calc(100% - 56px));
  min-height: calc(100vh - 210px);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 56px 0 36px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .2em;
  padding: 6px 10px;
  border: 1px solid rgba(196, 181, 253, .28);
  border-radius: 999px;
  background: rgba(139, 92, 246, .12);
}
.hero h1 {
  font-size: clamp(46px, 6vw, 80px);
  line-height: .96;
  letter-spacing: -.055em;
  margin: 22px 0 16px;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(120deg, #f0abfc, #c4b5fd 45%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { max-width: 620px; color: var(--muted); font-size: 18px; }
.actions, .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions { margin-top: 30px; }
.button, .icon-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(28, 16, 48, .86);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button:hover, .icon-button:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
  box-shadow: var(--glow);
}
.button.primary {
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px rgba(168, 85, 247, .35);
}
.button.primary:hover { filter: brightness(1.06); }
.button.danger { color: var(--red); }
.button.ghost { background: transparent; }
.button.small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.icon-button { width: 44px; padding: 0; }
.hero-console {
  border: 1px solid rgba(167, 139, 250, .28);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(39, 18, 72, .94), rgba(11, 6, 22, .94));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.console-head {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(74, 45, 120, .7);
  color: var(--muted);
  font: 600 11px ui-monospace, monospace;
}
.console-head span { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; }
.console-head span:nth-child(2) { background: #fbbf24; }
.console-head span:nth-child(3) { background: #34d399; }
.console-head b { margin-left: 8px; letter-spacing: .12em; color: var(--cyan); }
.console-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(74, 45, 120, .55); }
.console-grid article {
  min-height: 154px;
  padding: 24px;
  background: rgba(11, 6, 22, .72);
  display: flex;
  flex-direction: column;
}
.console-grid small { color: var(--muted); font: 700 11px ui-monospace, monospace; letter-spacing: .14em; }
.console-grid strong { font-size: 46px; line-height: 1.15; color: var(--cyan); letter-spacing: -.04em; }
.console-grid .lime { color: var(--lime); }
.console-grid i { margin-top: auto; color: var(--muted); font-style: normal; }
.landing-features {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.landing-features article {
  padding: 18px 18px 16px;
  border: 1px solid rgba(74, 45, 120, .7);
  border-radius: 16px;
  background: rgba(28, 16, 48, .55);
  backdrop-filter: blur(16px);
}
.landing-features b { display: block; margin-bottom: 6px; }
.landing-features span { color: var(--muted); font-size: 13px; }

.app { min-height: 100vh; display: grid; grid-template-columns: var(--side) 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  padding: 20px 14px;
  border-right: 1px solid rgba(74, 45, 120, .65);
  background: linear-gradient(180deg, rgba(16, 8, 32, .96), rgba(8, 4, 16, .98));
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.side-brand { padding: 3px 9px 22px; border-bottom: 1px solid rgba(74, 45, 120, .55); }
.sidebar nav { display: grid; gap: 5px; margin-top: 20px; }
.nav-link {
  width: 100%;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
  font-weight: 700;
}
.nav-link:hover { background: rgba(39, 24, 72, .8); color: var(--text); }
.nav-link.active {
  background: linear-gradient(135deg, rgba(217, 70, 239, .16), rgba(139, 92, 246, .2));
  border-color: rgba(196, 181, 253, .35);
  color: #f5e8ff;
  box-shadow: inset 0 0 0 1px rgba(240, 171, 252, .08);
}
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; padding: 14px 9px; font-size: 12px; }
.sidebar-foot a { color: var(--muted); }
.live-dot { color: var(--lime); font: 700 10px ui-monospace, monospace; letter-spacing: .1em; }
.live-dot:before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--orchid);
}
.workspace { grid-column: 2; min-width: 0; }
.topbar {
  height: 74px;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(74, 45, 120, .5);
  background: rgba(11, 6, 22, .78);
  backdrop-filter: blur(20px);
}
select, input, textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 4, 15, .72);
  color: var(--text);
}
textarea { min-height: 92px; resize: vertical; }
.club-picker { width: min(280px, 45vw); }
.profile { position: relative; }
.profile-button {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(28, 16, 48, .9);
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 12px 4px 5px;
}
.profile-button > span:last-child { text-align: left; }
.profile-button small { display: block; color: var(--muted); }
.avatar {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #d946ef, #7c3aed);
  color: #fff;
  font-weight: 900;
}
.profile-menu {
  position: absolute; right: 0; top: 56px; width: 188px; padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.profile-menu button {
  width: 100%; height: 38px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); text-align: left; padding: 0 10px;
}
.profile-menu button:hover { background: var(--panel2); }
.content { width: min(1500px, 100%); margin: auto; padding: 30px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat, .panel, .card {
  border: 1px solid rgba(74, 45, 120, .7);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(33, 18, 58, .78), rgba(16, 8, 32, .78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.stat { padding: 18px; }
.stat small { display: block; color: var(--muted); font: 700 10px ui-monospace, monospace; letter-spacing: .12em; }
.stat strong { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -.03em; }
.panel { overflow: hidden; }
.panel + .panel { margin-top: 14px; }
.panel-head {
  padding: 15px 17px;
  border-bottom: 1px solid rgba(74, 45, 120, .55);
  display: flex; justify-content: space-between; align-items: center;
}
.panel-head h2, .panel-head h3 { margin: 0; font-size: 16px; }
.panel-body { padding: 18px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid rgba(74, 45, 120, .45); white-space: nowrap; }
th { color: var(--muted); font: 700 10px ui-monospace, monospace; letter-spacing: .09em; }
tbody tr:hover td { background: rgba(139, 92, 246, .06); }
tbody tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(39, 24, 72, .9);
  font-size: 11px; font-weight: 750;
}
.badge:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: #86efac; }
.badge.info { color: var(--cyan); }
.badge.warn { color: var(--amber); }
.badge.bad { color: var(--red); }
.muted { color: var(--muted); }
.empty, .loading, .error-state { padding: 54px 22px; text-align: center; color: var(--muted); }
.loading:before {
  content: ""; display: block; width: 25px; height: 25px; margin: 0 auto 13px;
  border: 2px solid var(--line); border-top-color: var(--orchid); border-radius: 50%;
  animation: spin .7s linear infinite;
}
.error-state strong, .empty strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.message { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; }
.message.error { color: var(--red); border-color: rgba(251, 113, 133, .4); background: rgba(251, 113, 133, .08); }
.message.warn { color: var(--amber); border-color: rgba(251, 191, 36, .35); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 12px; }
.card { padding: 18px; }
.card h3 { margin: 0; }
.card .meta { display: grid; grid-template-columns: 100px 1fr; gap: 6px 10px; margin: 16px 0; font-size: 12px; }
.card .meta span:nth-child(odd) { color: var(--muted); }
.technical { border-color: rgba(251, 191, 36, .55); box-shadow: 0 0 0 1px rgba(251, 191, 36, .12); }
.updates { border-color: rgba(196, 181, 253, .55); }
.disk-low { border-color: rgba(251, 113, 133, .55); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { max-width: 330px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 6px; font-weight: 700; }
.stack label > span { font-size: 12px; color: var(--muted); }
.subscription {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(217, 70, 239, .12), rgba(28, 16, 48, .9));
}
.progress { height: 6px; max-width: 440px; margin-top: 9px; border-radius: 6px; background: var(--navy); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--orchid)); }
.download { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  padding: 12px 16px; max-width: 360px;
  border: 1px solid rgba(196, 181, 253, .45);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.mobile-only { display: none; }
.scrim { display: none; }

dialog {
  width: min(500px, calc(100% - 28px));
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #22143c, #140a24);
  color: var(--text);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(7, 4, 15, .78); backdrop-filter: blur(8px); }
dialog h2 { margin: 0 40px 20px 0; }
.dialog-close { position: absolute; right: 14px; top: 12px; }
.dialog-close button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 24px; }
.tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: 18px; padding: 4px;
  border-radius: 12px; background: rgba(7, 4, 15, .55);
}
.tabs button { height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.tabs button[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(217, 70, 239, .22), rgba(139, 92, 246, .28));
  color: #fff;
}

input[type="checkbox"] { width: auto; min-height: auto; }
.progress { display: block; width: min(440px, 70vw); height: 6px; border: 0; }
.progress::-webkit-progress-bar { background: var(--navy); }
.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--violet), var(--orchid)); }
.progress::-moz-progress-bar { background: linear-gradient(90deg, var(--violet), var(--orchid)); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .landing-features { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 24px; }
  .hero-console { display: none; }
  .app { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { transform: translateX(-105%); transition: transform .2s; }
  .app.menu-open .sidebar { transform: none; }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: #0b061699; z-index: 35; }
  .mobile-only { display: inline-flex; }
  .content { padding: 20px 15px; }
  .topbar { padding: 0 15px; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .landing-header { padding: 0 15px; }
  .landing-header .brand img { width: 145px; }
  .hero { width: calc(100% - 30px); }
  .hero h1 { font-size: 44px; }
  .landing-features { width: calc(100% - 30px); }
  .profile-button > span:last-child { display: none; }
  .cards, .stats { grid-template-columns: 1fr; }
  .page-head, .subscription, .download { align-items: flex-start; flex-direction: column; }
  .club-picker { width: 55vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
