:root {
  --bg: #07111b;
  --panel: rgba(9, 24, 37, 0.82);
  --panel-strong: rgba(11, 30, 47, 0.96);
  --line: rgba(145, 202, 255, 0.18);
  --text: #ecf5ff;
  --muted: #9db5ca;
  --accent: #7cf0cf;
  --accent-2: #ffcc7c;
  --accent-3: #6db9ff;
  --accent-4: #f99292;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(109, 185, 255, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(124, 240, 207, 0.16), transparent 24%),
    linear-gradient(160deg, #050b12 0%, #081727 48%, #06101a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}

.app-shell {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero,
.status-bar,
.metric-card,
.panel,
.table-card,
.detail-card {
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(12, 28, 42, 0.92), rgba(7, 18, 28, 0.92)),
    radial-gradient(circle at top right, rgba(124, 240, 207, 0.18), transparent 35%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent);
}

.hero h1,
.panel-header h2,
.detail-header h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw, 4.4rem);
  max-width: 12ch;
}

.hero-text,
.muted-copy {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

button,
.search-input,
.select-input {
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

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

.primary-button,
.ghost-button {
  padding: 14px 18px;
  font-weight: 600;
}

.compact {
  padding: 12px 16px;
}

.primary-button {
  color: #04131c;
  background: linear-gradient(135deg, #7cf0cf, #b0ffe8);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(6, 19, 29, 0.78);
}

.status-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-message {
  align-self: center;
  justify-self: end;
  color: var(--accent-2);
  text-align: right;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -45% 35%;
  height: 120px;
  transform: rotate(-8deg);
  border-radius: 999px;
  opacity: 0.3;
}

.accent-a::after {
  background: linear-gradient(135deg, rgba(124, 240, 207, 0.75), transparent);
}

.accent-b::after {
  background: linear-gradient(135deg, rgba(255, 204, 124, 0.75), transparent);
}

.accent-c::after {
  background: linear-gradient(135deg, rgba(109, 185, 255, 0.75), transparent);
}

.accent-d::after {
  background: linear-gradient(135deg, rgba(249, 146, 146, 0.72), transparent);
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 2.2vw, 3rem);
}

.metric-card small {
  color: var(--muted);
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 20px;
}

.tab-button {
  padding: 12px 18px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.tab-button.active {
  color: var(--text);
  background: rgba(124, 240, 207, 0.1);
  border-color: rgba(124, 240, 207, 0.45);
}

.panel-stack {
  display: grid;
  gap: 20px;
}

.panel {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.panel.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-input,
.select-input {
  min-height: 46px;
  min-width: 220px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.content-grid {
  display: grid;
  gap: 18px;
}

.members-layout {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
}

.clubs-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.95fr);
}

.table-card,
.detail-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(8, 20, 31, 0.84);
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(145, 202, 255, 0.12);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: rgba(10, 25, 38, 0.94);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: rgba(124, 240, 207, 0.05);
}

.clickable-row {
  cursor: pointer;
}

.member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.principal-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 240, 207, 0.35);
  transition: color 160ms ease, border-color 160ms ease;
}

.principal-link:hover {
  color: var(--accent);
  border-color: rgba(124, 240, 207, 0.8);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.badge.snapshot {
  color: #9effd9;
  background: rgba(124, 240, 207, 0.12);
}

.badge.purchase {
  color: #ffd59f;
  background: rgba(255, 204, 124, 0.12);
}

.badge.club {
  color: #abd4ff;
  background: rgba(109, 185, 255, 0.12);
}

.detail-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(145, 202, 255, 0.12);
}

.detail-summary {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.detail-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-sources {
  margin-top: 18px;
}

.detail-sources h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(145, 202, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.source-item strong,
.source-item span {
  display: block;
}

.source-item strong {
  margin-bottom: 6px;
}

.source-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
}

.pagination button {
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

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

@media (max-width: 1100px) {
  .hero,
  .members-layout,
  .clubs-layout,
  .summary-grid,
  .status-bar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .app-shell {
    padding: 18px 14px 40px;
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .search-input,
  .select-input,
  .toolbar button {
    width: 100%;
  }

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