/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f1117;
  --card:     #1e2130;
  --border:   #2a2f45;
  --accent:   #e94560;
  --accent2:  #3d8ef8;
  --text:     #e0e0e0;
  --muted:    #7a8099;
  --success:  #2ecc71;
  --danger:   #e74c3c;
  --sidebar:  180px;
  --radius:   8px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar);
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
}

.sidebar-logo {
  padding: 24px 20px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.5px;
}

.sidebar-logo span { color: var(--text); }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
  background: rgba(233, 69, 96, 0.08);
  border-left-color: var(--accent);
  text-decoration: none;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.sidebar-footer a { color: var(--danger); }

/* ── Main content ──────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
}

.topbar h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.topbar .user-info {
  font-size: 12px;
  color: var(--muted);
}

.content {
  padding: 28px 32px;
  flex: 1;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

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

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody tr:last-child { border-bottom: none; }

td { padding: 10px 12px; color: var(--text); vertical-align: middle; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
}
.badge-green  { background: rgba(46,204,113,0.15); color: var(--success); }
.badge-red    { background: rgba(231,76,60,0.15);  color: var(--danger); }
.badge-blue   { background: rgba(61,142,248,0.15); color: var(--accent2); }
.badge-accent { background: rgba(233,69,96,0.15);  color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary { background: var(--accent);  color: #fff; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.form-select-sm {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-inline .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ── Alert/error box ─────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.3); color: #e74c3c; }
.alert-success { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.3); color: var(--success); }

/* ── Auth page ───────────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.auth-logo {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.auth-logo span { color: var(--text); }

.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Admin role styles ───────────────────────────────────────────────────────── */
.admin-badge {
  display: inline-block;
  background: rgba(233,69,96,0.18);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.topbar-admin {
  border-bottom-color: rgba(233,69,96,0.4);
  background: linear-gradient(
    to right,
    var(--card),
    rgba(233,69,96,0.06)
  );
}

/* ── Landing page ────────────────────────────────────────────────────────────── */

.landing-body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Utility ── */
.gradient-text {
  background: linear-gradient(135deg, #e94560 0%, #ff6b9d 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navbar ── */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(42,47,69,0.6);
}

.landing-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  text-decoration: none;
}
.landing-logo span { color: var(--accent); }

/* ── Discord / Outline buttons ── */
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  border: none;
  cursor: pointer;
  letter-spacing: -0.1px;
}
.btn-discord:hover {
  background: #4752C4;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88,101,242,0.35);
  color: #fff;
}
.btn-discord-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
  letter-spacing: -0.1px;
}
.btn-outline:hover {
  border-color: rgba(233,69,96,0.4);
  color: var(--text);
  text-decoration: none;
}

/* ── Hero ── */
.landing-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 48px 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid background */
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(42,47,69,0.8) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* Accent glow — static base */
.landing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 30% 50%, rgba(233,69,96,0.06) 0%, transparent 65%);
  pointer-events: none;
}

/* Animated glow layer */
.hero-ambient-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse 55% 40% at 32% 52%, rgba(233,69,96,0.13) 0%, rgba(255,107,157,0.06) 40%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: hero-glow-breathe 5s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes hero-glow-breathe {
  0%   { opacity: 0.55; transform: scale(1)    translateY(0px); }
  30%  { opacity: 1;    transform: scale(1.08) translateY(-12px); }
  65%  { opacity: 0.7;  transform: scale(0.97) translateY(6px); }
  100% { opacity: 0.55; transform: scale(1)    translateY(0px); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(233,69,96,0.08);
  border: 1px solid rgba(233,69,96,0.2);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: eyebrow-pulse 2.5s ease-in-out infinite;
}
@keyframes eyebrow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes bot-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(46,204,113,0.6); }
  50%       { box-shadow: 0 0 14px rgba(46,204,113,0.95); }
}

.hero-title {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Mock Discord card ── */
.hero-visual { display: flex; justify-content: flex-end; }

.mock-discord {
  background: #2b2d31;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-dh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
}
.mock-dh-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.mock-dh-name {
  font-size: 13px; font-weight: 600; color: #e0e0e0;
  display: flex; align-items: center; gap: 6px;
}
.mock-bot-tag {
  background: #5865F2; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.mock-dh-channel { font-size: 11px; color: #5a6080; }

.mock-embed {
  border-radius: 6px;
  background: #313338;
  border-left: 3px solid;
  padding: 8px 10px;
}
.mock-embed-green  { border-left-color: #2ecc71; }
.mock-embed-red    { border-left-color: #e94560; }
.mock-embed-orange { border-left-color: #e67e22; }
.mock-embed-dark   { border-left-color: #5a6080; }

.mock-embed-title {
  font-size: 12px; font-weight: 600; color: #dde1e8; margin-bottom: 3px;
}
.mock-embed-desc { font-size: 11px; color: #7a8099; line-height: 1.5; }
.mock-embed-time  { font-size: 10px; color: #4a5070; margin-top: 3px; }
.mock-chars {
  font-size: 10px; background: rgba(255,255,255,0.06);
  padding: 1px 5px; border-radius: 3px; font-family: monospace;
}

/* ── Section headers ── */
.landing-section {
  padding: 96px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  text-align: center;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--text);
  line-height: 1.15;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 52px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Bento feature grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
}
.feature-card:hover {
  border-color: rgba(233,69,96,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

.feature-card.card-wide { grid-column: span 2; }

/* Icon container */
.feature-icon-wrap {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(233,69,96,0.09);
  border: 1px solid rgba(233,69,96,0.18);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}
.feature-icon-wrap svg { width: 18px; height: 18px; fill: currentColor; }

.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.feature-tag {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* ── Supported Servers ── */
.servers-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}

.server-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: border-color 0.15s;
}
.server-pill:hover { border-color: rgba(46,204,113,0.35); }

.server-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(46,204,113,0.6);
  flex-shrink: 0;
}

/* ── Steps ── */
.steps-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

/* Connecting line between step numbers */
.steps-wrap::before {
  content: '';
  position: absolute;
  top: 23px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    var(--border) 15%,
    var(--border) 85%,
    transparent
  );
  z-index: 0;
}

.step {
  text-align: center;
  padding: 0 24px 0;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.step:first-child .step-number {
  border-color: rgba(233,69,96,0.45);
  background: rgba(233,69,96,0.06);
  box-shadow: 0 0 0 4px rgba(233,69,96,0.05);
}

.step-title {
  font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── CTA ── */
.landing-cta {
  padding: 100px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(233,69,96,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
  position: relative;
}

.cta-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 36px;
  position: relative;
}

/* ── Footer ── */
.landing-footer {
  padding: 24px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ── Error toast ── */
.landing-error {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.35);
  color: #e74c3c;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 200;
  white-space: nowrap;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
  .hero-sub { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-visual { justify-content: center; }
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .feature-card.card-wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .landing-nav { padding: 0 20px; }
  .landing-nav .btn-discord-sm span { display: none; }
  .landing-section { padding: 64px 20px; }
  .landing-cta { padding: 64px 20px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-discord, .btn-outline { width: 100%; max-width: 300px; justify-content: center; }
  .bento-grid { grid-template-columns: 1fr; }
  .feature-card.card-wide { grid-column: span 1; }
  .steps-wrap { grid-template-columns: 1fr; gap: 32px; }
  .steps-wrap::before { display: none; }
  .landing-error { white-space: normal; width: 90%; text-align: center; }
}

/* Discord avatar in topbar/sidebar */
.discord-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Sortable table headers ──────────────────────────────────────────────────── */
.sortable-th {
  cursor: pointer;
  user-select: none;
}

.sortable-th:hover { color: var(--text); }

.sort-ind {
  display: inline-block;
  font-size: 10px;
  color: var(--border);
  margin-left: 4px;
  transition: color 0.15s;
}

.sort-ind.active { color: var(--accent); }

/* ── Tab bar ─────────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-panel { display: block; }
.tab-panel.hidden { display: none; }

/* ── Stats section sub-tabs ─────────────────────────────────────────────────── */
.stats-section-bar {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats-section-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  background: #1e2130;
  border: none;
  border-right: 1px solid var(--border);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.stats-section-btn:last-child { border-right: none; }
.stats-section-btn:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.stats-section-btn.active { background: rgba(233,69,96,0.1); color: var(--accent); }

/* ── Chart ─────────────────────────────────────────────────────────────────── */
.chart-wrap { position: relative; height: 300px; margin-bottom: 16px; }

.range-bar { display: flex; gap: 4px; }
.range-btn {
  -webkit-appearance: none;
  appearance: none;
  background: #1e2130;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.range-btn:hover { color: var(--text); border-color: var(--accent); }
.range-btn.active {
  background: rgba(233,69,96,.12);
  color: var(--accent);
  border-color: rgba(233,69,96,.4);
}

.icon-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e2130;
  border: 1px solid var(--border);
  border-radius: 3px;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: #4ecdc4; border-color: #4ecdc4; }

.chart-overlays {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.chart-overlay-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.chart-overlay-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }


/* ── Gather cards ─────────────────────────────────────────────────────────── */
.gather-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.gather-card:last-child { border-bottom: none; }
.gather-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gather-header strong { flex: 1; font-size: 14px; }
.gather-responses {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ── Language picker ──────────────────────────────────────────────────────── */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}
.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 16px;
  cursor: pointer;
  transition: border-color .15s;
  color: var(--text);
  line-height: 1.4;
}
.lang-btn:hover { border-color: var(--accent2); }
.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 150px;
  z-index: 300;
  box-shadow: 0 4px 20px rgba(0,0,0,.55);
  overflow: hidden;
}
.lang-menu.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: background .1s;
}
.lang-option:hover { background: var(--bg); text-decoration: none; }
.lang-option.active { color: var(--accent2); font-weight: 600; }
