/* Club portal — aligned with user chrome (Outfit / dark glass / blue accent) */
:root {
  --cm-bg: #050505;
  --cm-surface: #121212;
  --cm-glass: rgba(20, 20, 20, 0.65);
  --cm-border: rgba(255, 255, 255, 0.1);
  --cm-accent: #3e90ff;
  --cm-accent-hover: #5aa3ff;
  --cm-text: #ffffff;
  --cm-muted: #86868b;
  --cm-danger: #ff6b6b;
  --cm-ok: #8fcea8;
  --cm-font: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

* { box-sizing: border-box; }

body.club-chrome {
  margin: 0;
  min-height: 100vh;
  background: var(--cm-bg);
  color: var(--cm-text);
  font-family: var(--cm-font);
  -webkit-font-smoothing: antialiased;
}

.club-ambient {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(62, 144, 255, 0.18) 0%, transparent 68%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.club-brand-pill {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  background: rgba(15, 15, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--cm-border);
  padding: 10px 22px;
  border-radius: 100px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}
.club-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3e90ff;
}
.club-brand-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.club-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 48px;
}

.club-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--cm-glass);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--cm-border);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.club-auth-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.club-auth-card .sub {
  margin: 0 0 28px;
  text-align: center;
  color: var(--cm-muted);
  font-size: 14px;
  line-height: 1.5;
}

.club-auth-card label {
  display: block;
  text-align: left;
  font-size: 13px;
  color: var(--cm-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.club-auth-card .form-group { margin-bottom: 16px; }

.club-auth-card input[type="email"],
.club-auth-card input[type="password"],
.club-auth-card input[type="text"],
.club-auth-card input[type="tel"],
.club-auth-card input[type="url"],
.club-auth-card select,
.club-auth-card textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.club-auth-card input:focus,
.club-auth-card select:focus,
.club-auth-card textarea:focus {
  border-color: rgba(62, 144, 255, 0.55);
}

.club-password-wrap { position: relative; }
.club-password-wrap input { padding-right: 48px; }
.club-password-wrap .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--cm-muted);
  cursor: pointer;
  padding: 4px;
}

.club-btn {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  border: none;
  border-radius: 100px;
  background: var(--cm-accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.club-btn:hover { background: var(--cm-accent-hover); }
.club-btn:disabled { opacity: 0.7; cursor: wait; }

.club-btn-ghost {
  background: transparent;
  border: 1px solid var(--cm-border);
  color: #fff;
  margin-top: 10px;
}

.club-alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  margin-bottom: 18px;
  text-align: left;
  line-height: 1.45;
}
.club-alert-error {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.45);
  color: #ff6b6b;
}
.club-alert-pending {
  background: rgba(62, 144, 255, 0.12);
  border: 1px solid rgba(62, 144, 255, 0.4);
  color: #7eb6ff;
}
.club-alert-ok {
  background: rgba(52, 120, 80, 0.18);
  border: 1px solid rgba(52, 120, 80, 0.4);
  color: var(--cm-ok);
}

.club-links {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--cm-muted);
  line-height: 1.7;
}
.club-links a {
  color: #a8c4ef;
  text-decoration: none;
}
.club-links a:hover { text-decoration: underline; }

/* Edit / dashboard shell */
.club-page-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 28px, 1100px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.78);
  border: 1px solid var(--cm-border);
  backdrop-filter: blur(18px);
}
.club-page-header .logo-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.club-page-header .back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--cm-border);
  color: #fff;
  text-decoration: none;
}

.club-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 96px 16px 80px;
}

.club-page-title {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}
.club-page-title span { color: var(--cm-accent); }

.club-form-panel {
  background: var(--cm-glass);
  border: 1px solid var(--cm-border);
  border-radius: 24px;
  padding: 32px 28px;
  backdrop-filter: blur(20px);
}

.club-form-panel .form-section {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.club-form-panel .form-section:last-of-type { border-bottom: none; }
.club-form-panel .form-section h3 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.club-form-panel .form-section h3 i { color: var(--cm-accent); }
.club-form-panel .form-group { margin-bottom: 18px; }
.club-form-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-muted);
}
.club-form-panel .form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
}
.club-form-panel .form-control:focus {
  outline: none;
  border-color: rgba(62, 144, 255, 0.55);
}
.club-btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: var(--cm-accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.club-btn-primary:hover { background: var(--cm-accent-hover); }
.club-btn-secondary {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--cm-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Quill dark theme (shared with create) */
.rules-editor-wrap {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.rules-editor-wrap .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}
.rules-editor-wrap .ql-container.ql-snow { border: none; font-family: inherit; }
.rules-editor-wrap .ql-editor {
  min-height: 140px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}
.rules-editor-wrap .ql-editor.ql-blank::before {
  color: rgba(255, 255, 255, 0.38);
  font-style: normal;
}
.rules-editor-wrap .ql-stroke { stroke: rgba(255, 255, 255, 0.75); }
.rules-editor-wrap .ql-fill { fill: rgba(255, 255, 255, 0.75); }
.rules-editor-wrap .ql-picker { color: rgba(255, 255, 255, 0.85); }
.rules-quill-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* ── Event / club analytics (solid blue, no purple) ── */
.cm-ana-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(5, 5, 5, 0.92);
  border-bottom: 1px solid var(--cm-border);
  backdrop-filter: blur(16px);
}
.cm-ana-back, .cm-ana-top-actions a {
  color: var(--cm-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.cm-ana-top-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cm-ana-top-actions a { color: var(--cm-muted); }
.cm-ana-top-actions a:hover { color: #fff; }

.cm-ana-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}
.cm-ana-hero { margin-bottom: 28px; }
.cm-ana-kicker {
  margin: 0 0 8px;
  color: var(--cm-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cm-ana-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.cm-ana-sub { margin: 0; color: var(--cm-muted); font-size: 14px; }

.cm-ana-section { margin-bottom: 36px; }
.cm-ana-section h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.cm-ana-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-muted);
}
.cm-ana-hint {
  margin: 0 0 16px;
  color: var(--cm-muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 640px;
}

.cm-ana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.cm-ana-card {
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid var(--cm-border);
  border-radius: 16px;
  padding: 18px 16px;
}
.cm-ana-card .n {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cm-ana-card .l {
  margin-top: 6px;
  font-size: 12px;
  color: var(--cm-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.cm-ana-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.cm-ana-chart-box {
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid var(--cm-border);
  border-radius: 16px;
  padding: 18px;
}
.cm-ana-canvas { position: relative; height: 240px; }

.cm-ana-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cm-border);
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.9);
}
.cm-ana-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.cm-ana-table th {
  text-align: left;
  padding: 14px 14px;
  color: var(--cm-muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cm-ana-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
  color: #fff;
}
.cm-ana-table .muted { color: var(--cm-muted); font-size: 12px; margin-top: 3px; }
.cm-ana-table .empty { color: var(--cm-muted); text-align: center; padding: 28px; }
.cm-ana-table a { color: var(--cm-accent); text-decoration: none; font-weight: 600; }
.cm-ana-table a:hover { text-decoration: underline; }

/* Dashboard analytics blocks */
.cm-dash-ana { margin-bottom: 36px; }
.cm-dash-ana .cm-ana-section { margin-bottom: 28px; }


/* ── Shared club top bar (solid blue) ── */
.cm-topbar-bar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 24px, 1100px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}
.cm-topbar-brand {
  color: #3e90ff;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cm-topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
}
.cm-topbar-nav a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.cm-topbar-nav a:hover,
.cm-topbar-nav a.active { color: #fff; }
.cm-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.cm-topbar-club {
  font-size: 12px;
  color: #86868b;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-topbar-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff6b6b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.cm-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 20px 80px;
}
.cm-page-title {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.cm-page-sub {
  margin: 0 0 24px;
  color: #86868b;
  font-size: 14px;
}

@media (max-width: 820px) {
  .cm-topbar-bar {
    flex-direction: column;
    border-radius: 20px;
    align-items: stretch;
  }
  .cm-topbar-nav { justify-content: flex-start; }
  .cm-page { padding-top: 150px; }
}
