/* ============================================================
   Hackley Clubz — Application Stylesheet
   
   Font stack:
     BD Megalona Extra Light  → titles, prompts, bold/italic emphasis
     BB Noname Pro Regular    → body, UI text
   
   Color palette (change these variables to retheme):
     --coral       vibrant coral/orange for primary CTAs
     --purple-dark dark blue/purple gradient partner
     --accent-blue #038BFF  "next" / primary action buttons
   ============================================================ */

/* ============================================================
   0. Custom Fonts
   ============================================================ */
/* BD Megalona Extra Light — place font files in public/fonts/ to enable */
@font-face {
  font-family: 'BD Megalona';
  /* Uncomment when font files are placed in public/fonts/:
  src: url('/public/fonts/BDMegalona-ExtraLight.woff2') format('woff2'),
       url('/public/fonts/BDMegalona-ExtraLight.woff')  format('woff');
  */
  src: local('');   /* no-op until files are present; falls back to Georgia */
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* BB Noname Pro Regular — place font files in public/fonts/ to enable */
@font-face {
  font-family: 'BB Noname Pro';
  /* Uncomment when font files are placed in public/fonts/:
  src: url('/public/fonts/BBNonamePro-Regular.woff2') format('woff2'),
       url('/public/fonts/BBNonamePro-Regular.woff')  format('woff');
  */
  src: local('');   /* no-op until files are present; falls back to system-ui */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   1. CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
  /* Brand palette */
  --coral:          #FF6B47;
  --coral-light:    #FF8E72;
  --purple-dark:    #2D1B69;
  --purple-mid:     #4A2FA0;
  --accent-blue:    #038BFF;
  --accent-blue-hover: #0275d8;

  /* Gradient (used for hero areas, splash) */
  --gradient-brand: linear-gradient(135deg, var(--coral) 0%, var(--purple-dark) 100%);

  /* UI neutrals */
  --white:          #FFFFFF;
  --bg:             #F8F8FA;
  --surface:        #FFFFFF;
  --border:         #E2E2E8;
  --border-light:   #F0F0F5;

  /* Text */
  --text-primary:   #1A1A2E;
  --text-secondary: #6B6B80;
  --text-muted:     #9999AA;

  /* Feedback */
  --success:        #2ECC71;
  --success-bg:     #EAFAF1;
  --error:          #E74C3C;
  --error-bg:       #FDEDEC;
  --info:           #3498DB;
  --info-bg:        #EBF5FB;

  /* Pastel chat-bubble accents */
  --bubble-sent:    #E8F4FD;
  --bubble-recv:    #F5F0FF;

  /* Typography */
  --font-title:     'BD Megalona', Georgia, serif;
  --font-body:      'BB Noname Pro', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      20px;
  --shadow:         0 2px 12px rgba(0,0,0,.08);
  --shadow-md:      0 4px 24px rgba(0,0,0,.12);
  --shadow-lg:      0 8px 40px rgba(0,0,0,.16);

  /* Layout */
  --sidebar-width:  68px;
  --panel-width:    280px;
}

/* ============================================================
   2. Reset / Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

img { display: block; max-width: 100%; }

ul, ol { list-style: none; }

/* ============================================================
   3. Typography
   ============================================================ */

/* All headings use BD Megalona */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 200;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* Wizard prompts / page-question style */
.prompt {
  font-family: var(--font-title);
  font-weight: 200;
  font-size: 1.75rem;
  color: var(--text-primary);
  line-height: 1.3;
}

/* The "bold and italic" emphasis pattern: BD Megalona Extra Light, bold+italic */
.prompt strong, .prompt em {
  font-family: var(--font-title);
  font-weight: bold;
  font-style: italic;
  color: var(--purple-dark);
}

/* ============================================================
   4. Form Elements
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(3,139,255,.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Password field wrapper (for eye toggle) */
.input-wrapper {
  position: relative;
}
.input-wrapper input {
  padding-right: 44px;
}
.input-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
}
.input-eye-btn:hover { color: var(--text-secondary); }

/* ============================================================
   5. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .1s, box-shadow .2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(.98); }

/* Primary "Next" / action button — always #038BFF */
.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-blue-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(3,139,255,.35);
}

/* Secondary / ghost */
.btn-secondary {
  background: transparent;
  color: var(--accent-blue);
  border: 1.5px solid var(--accent-blue);
}
.btn-secondary:hover {
  background: rgba(3,139,255,.06);
  text-decoration: none;
}

/* Danger */
.btn-danger {
  background: var(--error);
  color: #fff;
}
.btn-danger:hover {
  background: #c0392b;
  color: #fff;
  text-decoration: none;
}

/* Full-width helper */
.btn-block { width: 100%; }

/* ============================================================
   6. Flash / Alert Messages
   ============================================================ */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.flash--success { background: var(--success-bg); color: #1a7a45; border-left: 4px solid var(--success); }
.flash--error   { background: var(--error-bg);   color: #922b21; border-left: 4px solid var(--error); }
.flash--info    { background: var(--info-bg);     color: #1a5276; border-left: 4px solid var(--info); }

/* ── Announcement banner (set via Admin → Settings) ────────────────────── */
.announcement-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff5f0 0%, #fff0f8 100%);
  border: 1px solid #f4a57a;
  border-left: 4px solid var(--coral, #f4643c);
  border-radius: var(--radius);
  font-size: 0.925rem;
  color: #7a2e10;
  line-height: 1.5;
}
.announcement-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.announcement-text {
  flex: 1;
  white-space: pre-wrap;   /* preserve line breaks from the textarea */
}

/* ============================================================
   7. Splash / Login Screens
   ============================================================ */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--gradient-brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
  text-align: center;
}

.splash-quote {
  font-family: var(--font-title);
  font-weight: 200;
  font-style: italic;
  font-size: clamp(1.25rem, 4vw, 2rem);
  color: #fff;
  max-width: 520px;
  opacity: 0;
  transition: opacity .8s ease;
}
.splash-quote.visible { opacity: 1; }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.auth-logo img {
  max-height: 56px;
  max-width: 200px;
  object-fit: contain;
}
.auth-logo .app-name {
  font-family: var(--font-title);
  font-weight: 200;
  font-size: 1.75rem;
  color: var(--purple-dark);
  letter-spacing: .02em;
}

.auth-title {
  font-family: var(--font-title);
  font-weight: 200;
  font-size: 1.5rem;
  margin-bottom: 24px;
  text-align: center;
  color: var(--text-primary);
}

.auth-footer-links {
  margin-top: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.auth-footer-links a {
  color: var(--accent-blue);
  margin: 0 8px;
}

/* ============================================================
   8. Wizard / Step Indicator
   ============================================================ */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.wizard-step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background .3s, transform .2s;
}
.wizard-step.active {
  background: var(--accent-blue);
  transform: scale(1.3);
}
.wizard-step.done {
  background: var(--success);
}

.wizard-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ============================================================
   9. App Shell (main authenticated layout)
   ============================================================ */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Top bar (Full Width mode header) ────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  box-shadow: var(--shadow);
}

.topbar-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.topbar-nav-btn:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}
.topbar-nav-btn img,
.topbar-nav-btn > div {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ── Left icon rail ──────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 8px;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 10;
}

.sidebar-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  transition: background .15s, color .15s;
  text-decoration: none;
  font-size: 20px;
}
.sidebar-icon-btn:hover,
.sidebar-icon-btn.active {
  background: var(--border-light);
  color: var(--purple-dark);
}

/* Collapse-to-full-width button in the sidebar */
.sidebar-collapse-btn {
  color: var(--text-muted);
  opacity: .7;
}
.sidebar-collapse-btn:hover {
  opacity: 1;
  background: var(--border-light);
  color: var(--purple-dark);
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color .15s;
}
.sidebar-avatar:hover { border-color: var(--accent-blue); }

.sidebar-spacer { flex: 1; }

/* ── Club panel ──────────────────────────────────────────────────────────── */
.club-panel {
  width: var(--panel-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  transition: width .3s ease;
  display: flex;
  flex-direction: column;
}

.club-panel.collapsed { width: 28px; }
.club-panel.collapsed .club-panel-title { display: none; }
.club-panel.collapsed .club-panel-body  { display: none; }

.club-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px;
  gap: 8px;
  flex-shrink: 0;
  min-height: 44px;
}

.club-panel-title {
  font-family: var(--font-title);
  font-weight: 200;
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.club-panel-toggle {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .3s ease;
  padding: 0;
}
.club-panel-toggle:hover {
  background: var(--border-light);
  color: var(--purple-dark);
}
.club-panel.collapsed .club-panel-toggle { transform: rotate(180deg); }
.club-panel.collapsed .club-panel-header {
  padding: 14px 1px 10px;
  justify-content: center;
}

.club-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 20px;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* ── Full Width mode (default; no .nav-menu class on .app-shell) ─────────── */
/* Topbar visible, sidebar hidden, main content offset below topbar          */
.app-shell:not(.nav-menu) .topbar        { display: flex; }
.app-shell:not(.nav-menu) .sidebar       { display: none; }
.app-shell:not(.nav-menu) .main-content  { padding-top: 72px; }

/* ── Menu Layout mode (.nav-menu class on .app-shell) ────────────────────── */
/* Sidebar visible, topbar hidden, content at normal padding                 */
.app-shell.nav-menu .topbar        { display: none; }
.app-shell.nav-menu .sidebar       { display: flex; }
.app-shell.nav-menu .main-content  { padding-top: 32px; }

/* ============================================================
   10. Profile Photo (circle avatar)
   ============================================================ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  max-width: none;
}
.avatar-sm  { width: 32px;  height: 32px; }
.avatar-md  { width: 48px;  height: 48px; }
.avatar-lg  { width: 72px;  height: 72px; }
.avatar-xl  { width: 120px; height: 120px; }

/* Placeholder when no photo */
.avatar-placeholder {
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 200;
  flex-shrink: 0;
}
.avatar-placeholder.avatar-sm  { width: 32px;  height: 32px;  font-size: 12px; }
.avatar-placeholder.avatar-md  { width: 48px;  height: 48px;  font-size: 16px; }
.avatar-placeholder.avatar-lg  { width: 72px;  height: 72px;  font-size: 24px; }
.avatar-placeholder.avatar-xl  { width: 120px; height: 120px; font-size: 36px; }

/* ============================================================
   11. Photo Cropper (step 5 of wizard)
   ============================================================ */
.photo-crop-wrapper {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 24px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--border);
  border: 2px solid var(--border);
}
.photo-crop-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.photo-upload-area:hover,
.photo-upload-area.drag-over {
  border-color: var(--accent-blue);
  background: rgba(3,139,255,.04);
}

/* ============================================================
   12. Page-level utility classes
   ============================================================ */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); font-size: 0.875rem; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.gap-2 { gap: 8px; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.skip-link {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 12px;
}
.skip-link:hover { color: var(--text-primary); }

/* ============================================================
   13. Admin Panel & Utilities
   ============================================================ */

/* Admin / club panels.
   Desktop (≥ 769px + nav-menu): static flex item — pushes main content right.
   Desktop (≥ 769px, full-width mode): hidden via panel-hidden.
   Mobile (≤ 768px): fixed overlay drawer. */
.admin-panel {
  width: var(--panel-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
  /* Desktop default: in-flow flex item (pushes content) */
  position: static;
  flex-shrink: 0;
}

/* Nav links inside the admin panel */
.admin-panel-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
}

.admin-panel-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.admin-panel-link:hover,
.admin-panel-link.active {
  background: var(--border-light);
  color: var(--purple-dark);
  text-decoration: none;
}

.admin-panel-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color .15s;
}

.admin-panel-link:hover svg,
.admin-panel-link.active svg {
  color: var(--purple-dark);
}

/* Hide a panel without taking up layout space */
.panel-hidden {
  display: none !important;
}

/* ============================================================
   14. Admin Log Tables
   ============================================================ */

.admin-page {
  max-width: 1200px;
}

.admin-subnav {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.admin-subnav a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background .15s, color .15s;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom: none;
}

.admin-subnav a:hover {
  background: var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
}

.admin-subnav a.active {
  background: var(--surface);
  color: var(--purple-dark);
  border-color: var(--border);
  border-bottom-color: var(--surface);
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.log-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

.log-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.log-table tr:last-child td { border-bottom: none; }
.log-table tr:hover td      { background: var(--bg); }

.log-ts {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.log-meta code {
  font-size: 0.75rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.action-badge {
  display: inline-block;
  font-size: 0.72rem;
  background: var(--border-light);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--purple-mid);
  white-space: nowrap;
  font-family: var(--font-body);
}

.status-success { color: #1a7a45; font-size: 0.875rem; }
.status-failed  { color: var(--error); font-size: 0.875rem; }

/* Typeahead dropdown (admin log user-filter) */
.typeahead-dropdown {
  position: absolute;
  z-index: 100;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  margin-top: 2px;
}

.typeahead-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.typeahead-item:hover { background: var(--bg); }

.typeahead-item small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ============================================================
   15. Club Browse / Discovery Page
   ============================================================ */

/* Vertical list of club cards */
.club-browse-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.club-browse-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}

.club-browse-card:last-child { border-bottom: none; }
.club-browse-card:hover       { background: var(--bg); }

.club-browse-photo-link {
  flex-shrink: 0;
  text-decoration: none;
}

.club-browse-info {
  flex: 1;
  min-width: 0;
}

.club-browse-action {
  flex-shrink: 0;
}

/* ============================================================
   16. Club Description (Markdown-rendered)
   ============================================================ */
.club-description {
  color: var(--text-primary);
  line-height: 1.65;
}
.club-description p            { margin: 0 0 12px; }
.club-description p:last-child { margin-bottom: 0; }

.club-description h1,
.club-description h2,
.club-description h3,
.club-description h4 {
  font-family: var(--font-title);
  font-weight: 200;
  color: var(--text-primary);
  margin: 20px 0 8px;
  line-height: 1.25;
}
.club-description h1:first-child,
.club-description h2:first-child,
.club-description h3:first-child { margin-top: 0; }
.club-description h1 { font-size: 1.5rem; }
.club-description h2 { font-size: 1.25rem; }
.club-description h3 { font-size: 1.05rem; }

.club-description strong { font-weight: 700; }
.club-description em     { font-style: italic; }

.club-description a       { color: var(--accent-blue); text-decoration: underline; }
.club-description a:hover { color: var(--accent-blue-hover); }

.club-description ul,
.club-description ol  { margin: 0 0 12px 20px; padding: 0; }
.club-description li  { margin-bottom: 4px; }

.club-description blockquote {
  border-left: 3px solid var(--border);
  margin: 0 0 12px;
  padding: 6px 16px;
  color: var(--text-secondary);
}
.club-description blockquote p { margin: 0; }

.club-description img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  margin: 12px auto;
}

.club-description code {
  background: var(--border-light);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.875em;
  font-family: monospace;
}
.club-description pre {
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.club-description pre code { background: none; padding: 0; }

.club-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 0.9rem;
}
.club-description th,
.club-description td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.club-description th { background: var(--border-light); font-weight: 600; }

.club-description hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ============================================================
   17. Responsive
   ============================================================ */
@media (max-width: 768px) {
  /* Base mobile padding — restore topbar gap separately below */
  .main-content { padding: 16px; }
  .auth-card    { padding: 28px 20px; }
  .wizard-page  { padding: 24px 16px; }

  /* Full Width mode on mobile: ensure content clears the fixed topbar */
  .app-shell:not(.nav-menu) .main-content { padding-top: 72px; }

  /* Menu Layout on mobile: no topbar, normal top padding */
  .app-shell.nav-menu .main-content { padding-top: 16px; }

  /* On mobile, admin / club panels overlay as fixed drawers */
  .admin-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    /* Full-width mode: panel slides from left edge */
    left: 0;
    z-index: 50;
    box-shadow: var(--shadow-md);
  }
  /* Menu-layout mode on mobile: panel slides in next to the sidebar rail */
  .app-shell.nav-menu .admin-panel:not(.panel-hidden) {
    left: var(--sidebar-width);
  }
}

/* ============================================================
   18. Profile detail list
   ============================================================ */

/* Mobile-first: label sits above value (natural block flow) */
.profile-dl {
  display: block;
  font-size: 0.9rem;
}
.profile-dl dt {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 14px;
}
.profile-dl dt:first-child { margin-top: 0; }
.profile-dl dd { margin: 0; padding: 0; }

/* Desktop: two-column grid */
@media (min-width: 500px) {
  .profile-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 16px;
  }
  .profile-dl dt {
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0;
  }
}
