:root {
  --bg: #070b14;
  --bg-soft: #0b1222;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-2: rgba(15, 23, 42, 0.55);
  --panel-3: rgba(255, 255, 255, 0.045);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e8eefb;
  --muted: #94a6c2;
  --soft: #c8d6ee;
  --teal: #2dd4bf;
  --blue: #60a5fa;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius-sm: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(45, 212, 191, 0.12), transparent 24%),
    linear-gradient(135deg, #050810 0%, #08101f 45%, #0c1020 100%);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { color: #a5f3fc; }

.club-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 21px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 14px 28px rgba(0,0,0,.2);
  flex: 0 0 auto;
}
.stat-tile.warn .value { color: var(--amber); }
.modal-body { display: grid; gap: 12px; }
.modal-body h4 { margin: 0; }
.modal-body .stack { gap: 8px; }

/* ---------------- generic UI ---------------- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.03)), var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
}
.page { width: min(1220px, calc(100% - 32px)); margin: 26px auto 70px; }
.page.narrow { width: min(980px, calc(100% - 32px)); }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.page-head h1, .page-head h2 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); }
.page-head h2 { font-size: clamp(24px, 3vw, 36px); }
.sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 860px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.flex { display: flex; align-items: center; gap: 12px; }
.flex.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.mb14 { margin-bottom: 14px; }
.stack { display: grid; gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 11px 15px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity .18s;
  text-align: center;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); box-shadow: 0 14px 30px rgba(0,0,0,0.22); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.48; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--blue) 58%, var(--violet));
  border: none;
  color: #04101c;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(45, 212, 191, 0.18);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 18px 40px rgba(96, 165, 250, 0.28); }
.btn-danger { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.28); color: #ffd4dd; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--soft); }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.btn-sm { padding: 8px 11px; border-radius: 11px; font-size: 13px; }
.btn-lg { padding: 14px 18px; border-radius: 16px; }
.btn-block { width: 100%; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.055);
  font-size: 12px;
  color: var(--soft);
  white-space: nowrap;
}
.chip-green { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.25); background: rgba(52,211,153,.1)}
.chip-blue { color: #bfdbfe; border-color: rgba(96,165,250,.25); background: rgba(96,165,250,.1)}
.chip-amber { color: #fde68a; border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.09)}
.chip-red { color: #fecdd3; border-color: rgba(251,113,133,.25); background: rgba(251,113,133,.09)}
.chip-violet { color: #ddd6fe; border-color: rgba(139,92,246,.25); background: rgba(139,92,246,.1)}

.card { padding: 20px; border-radius: var(--radius); }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }

.field { display: block; margin-bottom: 14px; }
.field span, .field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.55);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { min-height: 104px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(96,165,250,.55); box-shadow: 0 0 0 4px rgba(96,165,250,.11); background: rgba(7,11,20,.75); }
select option { background: #0b1222; }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.035); }
.check input { width: auto; }
.check.adv { justify-content: space-between; }
.form-error { color: #ffb4c2; min-height: 18px; font-size: 13px; margin: 8px 0; }
.form-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.empty {
  padding: 42px 22px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 22px;
  background: rgba(255,255,255,0.028);
}
.empty .em { font-size: 42px; display: block; margin-bottom: 12px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); }
.empty h3 { margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 auto; max-width: 640px; color: var(--muted); line-height: 1.65; }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  letter-spacing: .02em;
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
  flex: 0 0 auto;
}
.avstack { display: inline-flex; align-items: center; }
.avstack span { margin-left: -8px; }
.avstack span:first-child { margin-left: 0; }
.av-more { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:999px; margin-left:-8px; background:rgba(255,255,255,.08); border:1px solid var(--border); font-size:10px; color:var(--soft); }

.progress { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.07); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--blue), var(--violet)); border-radius: 999px; }
.progress.warn span { background: linear-gradient(90deg, var(--amber), var(--red)); }

/* ---------------- 3D decorations ---------------- */
.tilt { transform-style: preserve-3d; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; will-change: transform; }
.tilt:hover { border-color: rgba(255,255,255,.22); }
.float3d { animation: floaty 6s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  50% { transform: translateY(-9px) rotateX(4deg) rotateY(-4deg); }
}
.scene { width: 116px; height: 116px; perspective: 700px; margin: 24px auto 8px; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: cubeSpin 16s linear infinite; }
.cube-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 36px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.17);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  box-shadow: inset 0 0 35px rgba(255,255,255,.05);
  backdrop-filter: blur(4px);
}
.f-front  { transform: translateZ(58px); }
.f-back   { transform: rotateY(180deg) translateZ(58px); }
.f-right  { transform: rotateY(90deg) translateZ(58px); }
.f-left   { transform: rotateY(-90deg) translateZ(58px); }
.f-top    { transform: rotateX(90deg) translateZ(58px); }
.f-bottom { transform: rotateX(-90deg) translateZ(58px); }
@keyframes cubeSpin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to { transform: rotateX(-18deg) rotateY(360deg); }
}
.orb3d {
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.42), rgba(255,255,255,0) 32%),
              radial-gradient(circle at 70% 80%, rgba(45,212,191,.34), transparent 36%),
              linear-gradient(135deg, rgba(96,165,250,.6), rgba(139,92,246,.52));
  box-shadow: 0 28px 70px rgba(96,165,250,.22), inset 0 -16px 40px rgba(0,0,0,.22), inset 0 12px 34px rgba(255,255,255,.16);
  animation: floaty 7s ease-in-out infinite;
}

/* ---------------- login ---------------- */
.login-body { display: grid; place-items: center; padding: 28px; position: relative; }
.sky-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(18px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.orb-1 { width: 280px; height: 280px; background: rgba(45,212,191,.22); top: 8%; left: 5%; }
.orb-2 { width: 340px; height: 340px; background: rgba(96,165,250,.22); top: 18%; right: 4%; animation-delay: -3s; }
.orb-3 { width: 260px; height: 260px; background: rgba(139,92,246,.23); bottom: 6%; left: 28%; animation-delay: -6s; }
.grid-line {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 78%);
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(34px, -28px, 0) scale(1.08); }
}
.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 28px;
  width: min(1160px, 100%);
  align-items: stretch;
}
.login-brand {
  padding: 40px 34px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)), rgba(8,12,24,.55);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.login-brand:before {
  content: "";
  position: absolute; inset: -40% auto auto -30%;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,191,.18), transparent 66%);
}
.brand-mark { width: 128px; filter: drop-shadow(0 22px 40px rgba(45,212,191,.22)); animation: floaty 7s ease-in-out infinite; }
.login-brand h1 { margin: 20px 0 10px; font-size: clamp(38px, 6vw, 64px); letter-spacing: -.06em; line-height: .96; }
.login-tagline { color: var(--soft); font-size: 16px; line-height: 1.7; max-width: 580px; margin: 0; }
.login-points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.login-points li {
  display: flex; gap: 14px; align-items: flex-start;
  color: var(--muted); line-height: 1.6; font-size: 14.5px;
  padding: 14px 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px;
  background: rgba(255,255,255,.035);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.login-points li:hover { transform: translateX(6px); border-color: rgba(96,165,250,.34); background: rgba(255,255,255,.055); }
.login-points span {
  width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(45,212,191,.2), rgba(96,165,250,.2));
  border: 1px solid rgba(255,255,255,.1); color: #dff8ff; font-weight: 800; font-size: 12px;
}
.login-card {
  padding: 30px;
  border-radius: 30px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)), rgba(8,12,24,.72);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card-head h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.login-card-head p { margin: 8px 0 22px; color: var(--muted); }
/* The login page used to carry a panel of one-click demo sign-ins. It was
   removed with the demo data: it listed every account and its password, which
   is not something a page in front of a real roster can do. */
.login-help { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.login-help .btn { width: 100%; justify-content: center; }

/* ---------------- app shell ---------------- */
.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.topbar {
  position: sticky; top: 12px; z-index: 40;
  width: min(1320px, calc(100% - 24px));
  margin: 12px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 15px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(8,12,22,.72);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.brandline { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brandline svg { width: 42px; height: 42px; flex: 0 0 auto; filter: drop-shadow(0 10px 20px rgba(45,212,191,.18)); }
.brandline strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.brandline span { display: block; font-size: 11.5px; color: var(--muted); }
.nav { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.nav a {
  padding: 10px 13px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 13.5px;
  border: 1px solid transparent; transition: .18s ease; position: relative; white-space: nowrap;
}
/* The icon is for phones, where this nav becomes the bar along the bottom of
   the screen and there is no room for words on their own. css/mobile.css shows
   it; at this size the label says it better. */
.nav .nav-ico { display: none; }
.nav a:hover { color: white; background: rgba(255,255,255,.055); transform: translateY(-1px); }
.nav a.active {
  color: white; border-color: rgba(255,255,255,.12);
  background: linear-gradient(135deg, rgba(45,212,191,.16), rgba(96,165,250,.16));
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.nav .badge {
  position: absolute; top: -5px; right: -2px; min-width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 5px;
  background: linear-gradient(135deg, var(--red), var(--amber)); color: #210b0f;
  font-size: 10.5px; font-weight: 900;
}
.userbox { display: flex; align-items: center; gap: 10px; }
.usermeta { line-height: 1.15; text-align: right; }
.usermeta strong { display: block; font-size: 13.5px; }
.usermeta span { color: var(--muted); font-size: 11.5px; }

/* ---------------- dashboard ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 34px;
  margin-bottom: 18px;
}
.hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; align-items: center; }
.hero h1 { margin: 12px 0 10px; font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.055em; line-height: .98; }
.hero p { margin: 0; color: var(--soft); line-height: 1.7; max-width: 720px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px;
  background: rgba(255,255,255,.055); border: 1px solid var(--border); color: var(--soft);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.hero-side { display: grid; gap: 14px; justify-items: stretch; }
.hero-tile {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.045);
  transform-style: preserve-3d;
}
.hero-tile .num { font-size: 32px; font-weight: 900; letter-spacing: -.04em; }
.hero-glow {
  position: absolute; right: -70px; top: -90px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,.28), transparent 65%);
  pointer-events: none;
}
.dash-grid { display: grid; grid-template-columns: 1.15fr .85fr .85fr; gap: 16px; align-items: stretch; }
.dash-card { padding: 22px; min-height: 240px; position: relative; overflow: hidden; }
.dash-card:after {
  content: ""; position: absolute; inset: auto -70px -90px auto; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,191,.16), transparent 68%); pointer-events: none;
}
.mini-list { display: grid; gap: 10px; margin-top: 14px; }
.mini-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 16px; border: 1px solid var(--border);
  background: rgba(255,255,255,.035); transition: .16s ease;
}
.mini-item:hover { transform: translateX(4px); border-color: rgba(96,165,250,.35); }
.quick-links { display: grid; gap: 10px; margin-top: 14px; }
.quick-link {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: 16px; border: 1px solid var(--border);
  background: rgba(255,255,255,.035); transition: .18s ease;
}
.quick-link:hover { transform: translateY(-2px) translateX(2px); border-color: rgba(45,212,191,.4); background: rgba(255,255,255,.055); }

/* ---------------- club directory ---------------- */
.directory-hero {
  padding: 26px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.directory-hero:before {
  content: ""; position: absolute; inset: -60% auto -90% -10%;
  width: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244,114,182,.17), transparent 68%);
}
.cr-sub { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.activity-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px;
  background: rgba(255,255,255,.045); border: 1px solid var(--border); color: var(--soft); font-size: 12.5px;
}

/* ---------------- club page ---------------- */
.club-banner {
  position: relative;
  overflow: hidden;
  padding: 30px;
  margin-bottom: 18px;
  border-radius: 30px;
}
.club-banner:after {
  content: ""; position: absolute; right: -70px; bottom: -95px; width: 270px; height: 270px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); pointer-events: none;
}
.banner-top { display: flex; gap: 22px; align-items: center; justify-content: space-between; position: relative; z-index: 1; flex-wrap: wrap; }
.banner-left { display: flex; gap: 18px; align-items: center; min-width: min(100%, 700px); }
.banner-icon {
  width: 92px; height: 92px; border-radius: 30px; display: grid; place-items: center; font-size: 42px;
  background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.17);
  box-shadow: 0 22px 50px rgba(0,0,0,.26); transform: perspective(800px) rotateX(8deg) rotateY(-9deg);
}
.banner-title h2 { margin: 0 0 6px; font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.05em; line-height: 1; }
.banner-title p { margin: 0; color: rgba(255,255,255,.82); line-height: 1.6; max-width: 720px; }
.banner-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 9px; flex-wrap: wrap; margin: 20px 0 18px; }
.tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.045);
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s ease;
  font-weight: 750;
}
.tab:hover { transform: translateY(-2px); color: white; }
.tab.active {
  background: linear-gradient(135deg, rgba(45,212,191,.19), rgba(96,165,250,.18));
  border-color: rgba(255,255,255,.16); color: white;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.activity-card {
  padding: 18px; border-radius: 22px; border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  display: grid; gap: 11px; transition: transform .18s ease, border-color .18s ease;
  transform-style: preserve-3d;
}
.activity-card:hover { transform: translateY(-4px) rotateX(2deg); border-color: rgba(255,255,255,.24); }
.activity-icon {
  width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px;
  background: rgba(255,255,255,.07); border: 1px solid var(--border); box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.activity-card h4 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.activity-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

/* avatar and name on top, role + remove on their own line, so a long name
   never has to share a line with a chip and a button */
.member-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "av body" ".  side";
  align-items: center; column-gap: 12px; row-gap: 8px;
  padding: 14px; border-radius: 18px; min-width: 0;
  border: 1px solid var(--border); background: rgba(255,255,255,.035);
}
.member-card .avatar { grid-area: av; }
.mc-body { grid-area: body; min-width: 0; display: grid; gap: 2px; }
.mc-name { display: block; font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.mc-sub { display: block; color: var(--muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-side { grid-area: side; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------- events ---------------- */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 15px; }
.event-card { padding: 18px; border-radius: 24px; display: grid; gap: 11px; position: relative; overflow: hidden; }
.event-card:before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, var(--teal), var(--blue), var(--violet)); opacity: .82;
}
.event-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.event-card h4 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.03em; }
.event-desc { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13.8px; }
.event-meta { display: flex; gap: 9px; flex-wrap: wrap; color: var(--soft); font-size: 13px; }
.event-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 3px; }
.status-Scheduled { color: #bae6fd; background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.28); }
.status-Completed { color: #bbf7d0; background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.28); }
.status-Cancelled { color: #fecdd3; background: rgba(251,113,133,.1); border-color: rgba(251,113,133,.26); }
.status-approved { color:#bbf7d0; background:rgba(52,211,153,.1); border-color:rgba(52,211,153,.28); }
.status-pending { color:#fde68a; background:rgba(251,191,36,.09); border-color:rgba(251,191,36,.28); }
.status-rejected, .status-inactive { color:#fecdd3; background:rgba(251,113,133,.09); border-color:rgba(251,113,133,.26); }
.result-line { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 13px; background: rgba(255,255,255,.035); border: 1px solid var(--border); }

/* ---------------- budget ---------------- */
.budget-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.stat-tile { padding: 16px; border-radius: 19px; border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.stat-tile .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 8px; font-weight: 800; }
.stat-tile .value { font-size: 24px; font-weight: 900; letter-spacing: -.03em; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 18px; }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; }
table.data th, table.data td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; font-size: 13.8px; }
table.data th { color: var(--muted); text-transform: uppercase; font-size: 11.5px; letter-spacing: .11em; background: rgba(255,255,255,.03); }
table.data tr:last-child td { border-bottom: none; }
.budget-row { display: grid; grid-template-columns: 1fr 160px; gap: 10px; margin-bottom: 10px; }

.team-row,
.award-row {
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 17px;
  padding: 12px;
  background: rgba(255,255,255,.03);
  margin-bottom: 10px;
}
.team-row .flex,
.award-row.flex { align-items: center; }
.team-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}
.team-members .check { margin: 0; }

/* ---------------- elections ---------------- */
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.vote-card {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 12px; border-radius: 17px; border: 1px solid var(--border);
  background: rgba(255,255,255,.035); cursor: pointer; transition: .16s ease;
}
.vote-card:hover { transform: translateY(-2px); border-color: rgba(96,165,250,.4); }
.vote-card.on { border-color: rgba(45,212,191,.55); background: rgba(45,212,191,.08); box-shadow: 0 0 0 3px rgba(45,212,191,.09); }
.vote-mark { margin-left: auto; font-weight: 900; color: var(--teal); }
.hbar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.hbar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--teal)); }

/* ---------------- calendar ---------------- */
.calendar-shell { padding: 20px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; flex-wrap: wrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 9px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; padding: 6px 0; }
.cal-cell {
  min-height: 108px; padding: 9px; border-radius: 17px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.028); overflow: hidden; display: grid; gap: 6px; align-content: start;
  transition: .16s ease;
}
.cal-cell:hover { border-color: rgba(96,165,250,.36); background: rgba(255,255,255,.045); }
.cal-cell.other { opacity: .38; }
.cal-cell.today { outline: 1.5px solid rgba(45,212,191,.6); box-shadow: 0 0 0 4px rgba(45,212,191,.08); }
.cal-date { font-size: 12.5px; font-weight: 800; color: var(--soft); }
.cal-event {
  display: block; width: 100%; text-align: left; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(135deg, rgba(96,165,250,.18), rgba(139,92,246,.14));
  color: var(--text); border-radius: 11px; padding: 6px 8px; font-size: 11.5px; line-height: 1.35;
  cursor: pointer; transition: .15s ease;
}
.cal-event:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.24); }
.cal-event small { display:block; color: rgba(255,255,255,.68); }
.cal-legend { display:flex; gap:9px; flex-wrap:wrap; margin-top:15px; }

/* ---------------- leaderboard ---------------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin: 22px 0 18px; }
.podium-card { padding: 20px 16px; text-align: center; border-radius: 24px; border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.podium-card.first { min-height: 215px; background: linear-gradient(180deg, rgba(251,191,36,.15), rgba(255,255,255,.04)); border-color: rgba(251,191,36,.28); transform: translateY(-12px); }
.podium-card.second { min-height: 180px; }
.podium-card.third { min-height: 164px; }
.podium-card .medal { font-size: 35px; display: inline-block; margin-bottom: 10px; animation: floaty 5.5s ease-in-out infinite; }
.podium-card .points { font-size: 29px; font-weight: 950; letter-spacing: -.04em; margin-top: 9px; }
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.highlight-card { padding: 17px; border-radius: 22px; border: 1px solid var(--border); background: rgba(255,255,255,.035); display: grid; gap: 10px; }

/* ---------------- chat ---------------- */
.chat-wrap { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 16px; min-height: calc(100vh - 180px); }
.chat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; align-content: start;
  max-height: calc(100vh - 265px); overflow: auto; padding-right: 4px; }
.conv-item {
  display: flex; gap: 11px; align-items: center; padding: 11px; border-radius: 17px;
  border: 1px solid transparent; transition: .16s ease;
  min-width: 0;   /* a grid item defaults to min-content, which overflowed the panel */
}
.conv-item:hover { background: rgba(255,255,255,.045); transform: translateX(2px); }
.conv-item.on { background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.26); }
.ci-title { display: block; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-sub { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conv-item .club-icon { flex: 0 0 auto; }
.ci-badge {
  min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px;
  background: linear-gradient(135deg, var(--blue), var(--violet)); color: white; font-size: 11px; font-weight: 900;
}
.chat-pane { display: flex; flex-direction: column; min-height: 0; }
.chat-msgs { flex: 1; min-height: 320px; max-height: calc(100vh - 330px); overflow: auto; display: grid; gap: 11px; padding: 6px 2px 12px; }
.msg { display: flex; gap: 10px; max-width: 82%; }
.msg.own { margin-left: auto; flex-direction: row-reverse; }
.msg-bubble {
  padding: 11px 13px; border-radius: 18px; border: 1px solid var(--border);
  background: rgba(255,255,255,.05); line-height: 1.55; font-size: 14px; white-space: pre-wrap; word-break: break-word;
}
.msg.own .msg-bubble { background: linear-gradient(135deg, rgba(45,212,191,.16), rgba(96,165,250,.17)); border-color: rgba(96,165,250,.22); }
.msg-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; color: var(--muted); font-size: 11.5px; }
.msg-system { justify-content: center; max-width: 100%; }
.msg-system .msg-bubble {
  background: rgba(255,255,255,.04); color: var(--soft); font-size: 12.8px; text-align: center;
  border-style: dashed;
}
.chat-compose { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; }
@media (max-width: 560px) { .chat-compose { grid-template-columns: 1fr; } }
.chat-locked { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--border-strong); padding: 13px; border-radius: 16px; }

/* ---------------- modal / toast / confirm ---------------- */
.modal-root, .confirm-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; }
.modal-backdrop, .confirm-backdrop { position: absolute; inset: 0; background: rgba(3,6,12,.66); backdrop-filter: blur(9px); }
.modal, .confirm-box {
  position: relative; width: min(780px, 100%); max-height: min(86vh, 900px); overflow: auto;
  padding: 22px; border-radius: 26px; border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)), #0b1120;
  box-shadow: var(--shadow);
  animation: pop .18s ease;
}
.modal.wide { width: min(980px, 100%); }
.confirm-box { width: min(560px, 100%); }
@keyframes pop { from { transform: translateY(14px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 15px; }
.modal-head h3 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.modal-close { border: 1px solid var(--border); background: rgba(255,255,255,.05); border-radius: 12px; width: 38px; height: 38px; cursor: pointer; font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.toast-root { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 130; }
.toast {
  min-width: 260px; max-width: 380px; padding: 13px 15px; border-radius: 17px; border: 1px solid var(--border-strong);
  background: rgba(8,12,22,.9); color: var(--text); box-shadow: var(--shadow); animation: toastIn .2s ease; font-size: 14px;
}
.toast.ok { border-color: rgba(52,211,153,.38); }
.toast.err { border-color: rgba(251,113,133,.42); }
.toast.warn { border-color: rgba(251,191,36,.42); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- points history ---------------- */
/* The total on the dashboard is a button now, so it has to shed the browser's
   idea of what a button looks like and keep the tile's. */
button.hero-tile {
  font: inherit; color: inherit; text-align: left; width: 100%;
  cursor: pointer; border: 1px solid var(--border); background: rgba(255,255,255,.04);
}
button.hero-tile:hover { border-color: rgba(255,255,255,.22); }
.pts-hint { opacity: .75; }
.pts-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pts-total { flex: 0 0 auto; }
.pts-total .num { font-size: 40px; font-weight: 950; letter-spacing: -.04em; line-height: 1; }
.pts-breakdown { flex: 1 1 260px; min-width: 0; display: grid; gap: 6px; }
.pts-bucket {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 7px 11px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
}
.pts-bucket-label { font-weight: 700; font-size: 13px; }
.pt-plus { color: var(--green, #34d399); }
.pt-minus { color: var(--red, #fb7185); }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .hero-inner, .dash-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .chat-wrap { grid-template-columns: 1fr; }
  .chat-list { max-height: 280px; }
  .budget-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  /* The shape of the header on a small screen is decided in css/mobile.css,
     which turns the nav into a bar along the bottom; it used to be stacked
     here, and the two cannot both be right. */
  .banner-top, .banner-left { align-items: flex-start; }
  .podium { grid-template-columns: 1fr; }
  .podium-card.first, .podium-card.second, .podium-card.third { min-height: auto; transform: none; }
}


/* ---------- modal: head pinned, body scrolls, submit always reachable ----------
   The create-event form outgrew the modal and the submit button fell off the
   bottom edge. The panel is now a flex column: only .modal-body scrolls, and a
   .modal-foot.stick sticks to the foot of that scrollport. */
.modal { display: flex; flex-direction: column; overflow: hidden; }
.modal > .modal-head { flex: 0 0 auto; }
.modal > .modal-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding-right: 4px; margin-right: -4px;
}
.modal-body form { display: grid; gap: 12px; }
.modal-foot.stick {
  position: sticky; bottom: 0; z-index: 3;
  margin: 4px 0 0; padding: 12px 0 2px;
  background: linear-gradient(180deg, rgba(11,17,32,0) 0%, #0b1120 38%, #0b1120 100%);
}
body.light .modal-foot.stick {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 38%, #fff 100%);
}
body.light .modal { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.75)), #fff; }

/* compact one-line facts inside a form, replacing stacked mini cards */
.info-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* a finished or cancelled event explains why its controls are gone */
.locked-note { border-color: var(--border-strong); background: rgba(255,176,32,.08); }

/* days already gone: visibly not plannable */
.cal-cell.past { opacity: .62; }

/* ---------- spend settlement + leadership change asks ---------- */
.spend-card .info-strip { margin-top: 4px; }
.spend-form { display: grid; gap: 10px; }
.over-budget { color: var(--red, #ff6b6b); font-weight: 700; }
.ask-tally { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; }
.ask-tally .hbar { height: 6px; }

/* ---------- admin leadership ---------- */
.lead-card .lead-post { border-top: 1px solid var(--border); padding: 12px 0; }
.lead-card .lead-post:first-of-type { border-top: 0; padding-top: 4px; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.lead-actions .field { min-width: 240px; margin: 0; }
.flow-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.flow-steps strong { color: var(--text); }
.fill-choice { border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.fill-choice.preferred { border-color: var(--border-strong); background: rgba(255,255,255,.04); }
.fill-choice h4 { margin: 0 0 2px; }

/* the decision rows carry a dropdown, so they need room to wrap rather than
   crushing the text that says what the decision is about */
.lead-inbox .mini-item { flex-wrap: wrap; row-gap: 8px; align-items: center; }
.lead-inbox .mini-item > .grow { min-width: 260px; flex: 1 1 260px; }
.lead-inbox .mini-item select { flex: 0 1 300px; max-width: 300px; }

/* holding a post is visible without opening the club */
.post-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px;
  border-color: color-mix(in srgb, var(--teal, #2dd4bf) 34%, transparent); }
.post-banner .grow { flex: 1 1 260px; min-width: 0; }
.post-chip { margin-left: 6px; vertical-align: middle; }

/* events run at the weekend, so weekdays are visibly not plannable */
.cal-cell.weekday { background: rgba(255,255,255,.012); }
.cal-cell.weekend .cal-date { font-weight: 800; }

/* admin's way into each club: activities, events, members, leadership, budget */
.admin-club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.ac-tile {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  transition: border-color .16s ease, transform .16s ease;
}
.ac-tile:hover { border-color: rgba(96,165,250,.4); transform: translateY(-2px); }
.ac-num { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.ac-label { font-size: 12.5px; font-weight: 700; color: var(--soft); }

/* receipts attached to a spend claim */
.bill-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.bill { margin: 0; width: 150px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.03); }
.bill img { display: block; width: 100%; height: 100px; object-fit: cover; }
.bill-pdf { display: grid; place-items: center; height: 100px; font-weight: 700; }
.bill figcaption { display: flex; align-items: center; gap: 6px; padding: 7px 9px; font-size: 11.5px; }
.bill figcaption .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.bill-add label.btn { cursor: pointer; }

/* the company pot behind every club budget */
.org-ledger .org-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 12px 0 10px; }
.org-fig { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03); }

/* looking around a club you have not joined */
.visitor-note { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-color: color-mix(in srgb, var(--blue, #60a5fa) 32%, transparent); }
.visitor-note .grow { flex: 1 1 280px; min-width: 0; }

/* which three months the quarter covers, wherever events get planned */
.quarter-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 11px 14px; border-radius: 16px;
  border: 1px solid var(--border-strong); background: rgba(255,255,255,.04);
}
.quarter-strip .grow { flex: 1 1 auto; }
.qs-name { font-weight: 800; letter-spacing: -.01em; }
.qs-range { font-weight: 600; color: var(--soft); }
.qs-dates { white-space: nowrap; }

/* the map of demo conditions on the admin overview */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 12px; }
.demo-col h4 { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.demo-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,.025); margin-bottom: 7px; font-size: 13px; }
.demo-row:not(.is-flat):hover { border-color: rgba(96,165,250,.4); }
.demo-row.is-flat { cursor: default; }

/* a filter box in front of any dropdown long enough to need scrolling */
.select-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.select-filter .sf-input {
  flex: 1 1 auto; min-width: 0; padding: 8px 11px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); font-size: 13px;
}
.select-filter .sf-input:focus { outline: 0; border-color: rgba(96,165,250,.5); }
.select-filter .sf-count { flex: 0 0 auto; white-space: nowrap; }

/* staff can move any club's event straight from the calendar */
.cal-event-wrap { position: relative; }
.cal-move {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0;
  border-radius: 7px; border: 1px solid var(--border-strong); cursor: pointer;
  background: rgba(0,0,0,.45); color: var(--text); font-size: 11px; line-height: 1; opacity: 0;
  transition: opacity .15s ease;
}
.cal-event-wrap:hover .cal-move, .cal-move:focus { opacity: 1; }

/* ---------- analysis page ---------- */
.an-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.an-tile { display: grid; gap: 3px; padding: 14px 16px; border-radius: 18px;
  border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.an-num { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.an-num.an-good { color: var(--teal, #2dd4bf); }
.an-num.an-warn { color: var(--amber, #fbbf24); }
.an-label { font-size: 12.5px; font-weight: 700; color: var(--soft); }
.an-bar { display: inline-block; vertical-align: middle; width: 54px; height: 6px; margin-left: 6px;
  border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.an-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--blue, #60a5fa); }
.an-bar > span.ok { background: var(--teal, #2dd4bf); }
.an-bar > span.mid { background: var(--amber, #fbbf24); }
.an-bar > span.low { background: var(--red, #ff6b6b); }

/* analysis tables: numbers line up, headers stay on one line where they can */
.an-table th { white-space: nowrap; }
.an-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-table td:first-child, .an-table th:first-child { white-space: normal; min-width: 130px; }

/* ---------- charts ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.chart-card { padding: 16px 18px; }
.chart-card h4 { margin: 0; font-size: 15px; }
.chart-body { margin-top: 12px; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .ch-label { font-size: 11px; fill: var(--soft); }
.chart .ch-sub { font-size: 9.5px; fill: var(--muted); }
.chart .ch-value { font-size: 11px; font-weight: 700; fill: var(--text); }
.chart .ch-track { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.07); }
.chart .ch-axis { stroke: rgba(255,255,255,.14); stroke-width: 1; }
.chart .ch-center { font-size: 17px; font-weight: 800; fill: var(--text); }
.chart .ch-center-sub { font-size: 10px; fill: var(--muted); }
.ch-donut-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ch-donut { width: 170px; flex: 0 0 auto; }
.ch-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 170px; display: grid; gap: 6px; min-width: 0; }
.ch-legend li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.ch-legend .grow { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.an-rows { display: flex; align-items: center; gap: 6px; }
.an-rows select { padding: 6px 9px; }
