/* ── En Meets Custom Styles (Bootstrap 5 override layer) ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

:root {
  --cs-primary:     #e8460a;
  --cs-primary-dk:  #c73a08;
  --cs-primary-lt:  #fff0eb;
  --cs-text:        #1a1a2e;
  --cs-muted:       #6b7280;
  --cs-border:      #e5e7eb;
  --cs-card:        #ffffff;
  --cs-bg:          #f7f8fb;
  --cs-success:     #166534;
  --cs-success-bg:  #dcfce7;
  --cs-danger:      #dc2626;
  --cs-locked-bg:   #f9fafb;
}

/* ── Base ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cs-bg);
  color: var(--cs-text);
}

h1, h2, h3, h4, .display-font {
  font-family: 'Fraunces', Georgia, serif;
}

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--cs-border);
  padding: 16px 0;
}

.site-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--cs-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.site-header .tagline {
  color: var(--cs-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ── Buttons ── */
.btn-cs-primary {
  background: var(--cs-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
}
.btn-cs-primary:hover  { background: var(--cs-primary-dk); color: #fff; }
.btn-cs-primary:active { transform: scale(0.98); }

.btn-cs-secondary {
  background: #fff;
  color: var(--cs-text);
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.btn-cs-secondary:hover { border-color: var(--cs-primary); background: var(--cs-primary-lt); color: var(--cs-text); }

/* ── Progress Steps ── */
.cs-steps {
  display: flex;
  align-items: center;
  margin: 28px 0 24px;
}

.cs-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cs-muted);
}

.cs-step.active   { color: var(--cs-primary); }
.cs-step.complete { color: var(--cs-success); }

.cs-step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--cs-border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
}
.cs-step.active   .cs-step-dot { border-color: var(--cs-primary); background: var(--cs-primary); color: #fff; }
.cs-step.complete .cs-step-dot { border-color: var(--cs-success); background: var(--cs-success); color: #fff; }

.cs-step-line {
  flex: 1; height: 2px;
  background: var(--cs-border);
  margin: 0 6px;
  transition: background 0.3s;
}
.cs-step-line.complete { background: var(--cs-success); }

/* ── Form Card ── */
.cs-form-card {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

.cs-step-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cs-step-header p { color: var(--cs-muted); margin-bottom: 0; }

/* ── Inputs ── */
.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: var(--cs-text);
}

.form-label .optional {
  font-weight: 400;
  color: var(--cs-muted);
  font-size: 0.82rem;
}

.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid var(--cs-border);
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(232,70,10,0.12);
  outline: none;
}

/* Locked field (can't edit after profile created) */
.form-control.locked {
  background: var(--cs-locked-bg);
  color: var(--cs-muted);
  cursor: not-allowed;
  border-style: dashed;
}
.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cs-muted);
  background: #f3f4f6;
  border: 1px solid var(--cs-border);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Password strength ── */
.password-strength-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--cs-border);
  margin-top: 8px;
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s, background 0.3s;
}
.strength-weak   { width: 25%; background: #ef4444; }
.strength-fair   { width: 50%; background: #f97316; }
.strength-good   { width: 75%; background: #eab308; }
.strength-strong { width: 100%; background: #22c55e; }

.password-strength-label {
  font-size: 0.78rem;
  margin-top: 4px;
  font-weight: 600;
}
.label-weak   { color: #ef4444; }
.label-fair   { color: #f97316; }
.label-good   { color: #eab308; }
.label-strong { color: #22c55e; }

.password-reqs {
  font-size: 0.8rem;
  color: var(--cs-muted);
  margin-top: 6px;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 12px;
}
.password-reqs li { display: flex; align-items: center; gap: 5px; }
.password-reqs li.met { color: #16a34a; }
.password-reqs li::before { content: "○"; font-size: 0.7rem; }
.password-reqs li.met::before { content: "✓"; }

/* ── Phone input group ── */
.phone-prefix-group .input-group-text {
  background: #f3f4f6;
  border: 1px solid var(--cs-border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
  color: var(--cs-muted);
  font-family: 'DM Sans', sans-serif;
}
.phone-prefix-group .form-control {
  border-radius: 0 10px 10px 0;
}

/* ── Verify box ── */
.cs-verify-box {
  background: #f9fafb;
  border: 1px solid var(--cs-border);
  border-radius: 14px;
  padding: 16px 18px;
}
.verify-badge {
  font-size: 0.8rem; font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.verify-badge.unverified { background: #fef2f2; color: #991b1b; }
.verify-badge.verified   { background: #dcfce7; color: #166534; }
.verify-badge.pending    { background: #fefce8; color: #854d0e; }

/* ── Info note ── */
.cs-info-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.875rem;
  color: #9a3412;
}

/* ── Agreements / Checkboxes ── */
.cs-check-card {
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cs-check-card:hover { border-color: var(--cs-primary); background: var(--cs-primary-lt); }
.cs-check-card input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--cs-primary); width: 17px; height: 17px; cursor: pointer; }
.cs-check-card .check-text { font-size: 0.9rem; line-height: 1.5; }
.cs-check-card.optional-check { background: #f9fafb; }

.optional-divider {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cs-muted);
  padding-top: 6px;
  border-top: 1px solid var(--cs-border);
  margin-top: 4px;
}

.text-link-btn {
  background: none; border: none; padding: 0;
  color: var(--cs-primary); text-decoration: underline;
  font-family: 'DM Sans', sans-serif;
  font-size: inherit; cursor: pointer;
}
.text-link-btn:hover { color: var(--cs-primary-dk); }

/* ── Profile summary card ── */
.cs-summary-card {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 20px;
}
.cs-summary-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: #3b82f6; margin-bottom: 14px;
}
.summary-row {
  display: flex; gap: 12px;
  font-size: 0.92rem; padding: 5px 0;
  border-bottom: 1px solid #dbeafe;
}
.summary-row:last-child { border-bottom: none; }
.summary-key { color: var(--cs-muted); min-width: 120px; flex-shrink: 0; }
.summary-val { font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Danger zone ── */
.cs-danger-zone {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--cs-border);
  text-align: center;
}
.btn-text-danger {
  background: none; border: none;
  color: #9ca3af; font-size: 0.85rem;
  cursor: pointer; text-decoration: underline;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.15s;
}
.btn-text-danger:hover { color: var(--cs-danger); }

/* ── Step nav ── */
.cs-step-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 20px;
  border-top: 1px solid var(--cs-border);
}

/* ── Index page cards ── */
.cs-hero {
  background: linear-gradient(135deg, #fff 0%, #fff0eb 100%);
  border: 1px solid #fbd5c5;
  border-radius: 18px;
  padding: 28px 32px;
  margin: 24px 0 16px;
}
.cs-hero h2 { font-size: 1.6rem; color: var(--cs-text); margin-bottom: 6px; }

.cs-profile-card {
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  padding: 20px;
}

.cs-event-card {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  height: 100%;
  display: flex; flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.cs-event-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.1); transform: translateY(-2px); }

.cs-badge {
  font-size: 0.72rem; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
.cs-badge.paid { background: #eef2ff; color: #3730a3; }
.cs-badge.free { background: #ecfdf5; color: #166534; }

.cs-filter-btn {
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--cs-text);
}
.cs-filter-btn:hover, .cs-filter-btn.active {
  background: var(--cs-primary); color: #fff; border-color: var(--cs-primary);
}

/* ── Modal customization ── */
.modal-content { border-radius: 18px; border: none; }
.modal-header  { border-bottom: 1px solid var(--cs-border); padding: 20px 24px 16px; }
.modal-body    { padding: 20px 24px; }
.modal-footer  { border-top: 1px solid var(--cs-border); padding: 16px 24px; }
.modal-title   { font-family: 'Fraunces', serif; font-size: 1.2rem; }
.modal-scroll-body { max-height: 320px; overflow-y: auto; font-size: 0.92rem; line-height: 1.65; }
.modal-scroll-body li { margin-bottom: 7px; }

/* ── Misc ── */
.section-label {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cs-muted); margin-bottom: 12px;
}

.cs-attendance { font-size: 0.85rem; color: var(--cs-muted); }

.success-alert {
  background: var(--cs-success-bg); color: var(--cs-success);
  border: 1px solid #bbf7d0;
  border-radius: 10px; padding: 12px 16px;
  font-weight: 600; font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .cs-form-card { padding: 20px 16px; }
  .cs-hero      { padding: 20px; }
  .cs-steps span { display: none; }
  .cs-step-nav  { gap: 10px; }
  .password-reqs { grid-template-columns: 1fr; }
}


/* ── Preference chips (gender pref) ───────────────────────────────────── */
.pref-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--cs-border);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.pref-chip:hover {
  border-color: var(--cs-primary);
  background: var(--cs-primary-lt);
  color: var(--cs-primary);
}
.pref-chip-active {
  border-color: var(--cs-primary) !important;
  background: var(--cs-primary) !important;
  color: #fff !important;
}
.pref-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


/* ── Preference pills (looking for / open to) ────────────────────────────── */
.pref-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.pref-pill input[type="checkbox"],
.pref-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pref-pill span {
  display: inline-block;
  border: 2px solid var(--cs-border);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  background: #fff;
  color: var(--cs-text);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.pref-pill:hover span {
  border-color: var(--cs-primary);
  background: var(--cs-primary-lt);
  color: var(--cs-primary);
}
.pref-pill input:checked + span {
  border-color: var(--cs-primary);
  background: var(--cs-primary);
  color: #fff;
}

/* ── Auth nav ────────────────────────────────────────────────────────────── */
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cs-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-avatar-link:hover .nav-avatar { background: var(--cs-primary-dk); }
.nav-display-name { font-weight: 600; font-size: 0.9rem; color: var(--cs-text); }

/* ── Profile card avatar (index) ─────────────────────────────────────────── */
.profile-card-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cs-primary);
  color: #fff;
  font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Profile hero card (edit page) ──────────────────────────────────────── */
.profile-hero-card {
  background: linear-gradient(135deg, #fff 0%, #fff0eb 100%);
  border: 1px solid #fbd5c5;
  border-radius: 18px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-hero-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--cs-primary);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(232,70,10,0.25);
}
.profile-hero-info h2 { font-size: 1.5rem; margin: 0; }

.hero-badge {
  font-size: 0.75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  display: inline-block;
}
.verified-badge { background: #dcfce7; color: #166534; }
.event-badge    { background: #fff0eb; color: var(--cs-primary); }
.pref-badge     { background: #eff6ff; color: #1d4ed8; }

@media (max-width: 540px) {
  .profile-hero-card { flex-direction: column; text-align: center; align-items: center; padding: 24px 20px; }
}

/* ── Edit section cards ───────────────────────────────────────────────────── */
.cs-edit-section {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  overflow: hidden;
}
.cs-edit-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid var(--cs-border);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-muted);
}
.cs-edit-section-body { padding: 20px; }

/* Locked display fields */
.locked-field-label {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--cs-muted); margin-bottom: 4px;
}
.locked-field-value {
  font-size: 1rem; font-weight: 500;
  color: var(--cs-text);
}
.locked-field-note {
  font-size: 0.78rem; color: var(--cs-muted); margin-top: 3px;
}

/* ── Auth page ────────────────────────────────────────────────────────────── */
.auth-page body, body.auth-page { background: var(--cs-bg); }

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--cs-border);
  margin-bottom: 0;
  gap: 0;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cs-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--cs-primary); border-bottom-color: var(--cs-primary); }
.auth-tab:hover:not(.active) { color: var(--cs-text); }

.signup-feature-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.5;
}
.signup-feature-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.cs-footer {
  background: #1a1a2e;
  color: #c9cad3;
  margin-top: 64px;
  padding: 48px 0 0;
  font-size: 0.88rem;
}
.cs-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cs-footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--cs-primary);
  margin-bottom: 10px;
}
.cs-footer-brand p { line-height: 1.65; color: #9ca3af; max-width: 240px; }
.cs-footer-social { display: flex; gap: 12px; margin-top: 16px; }
.cs-footer-social a { font-size: 1.2rem; text-decoration: none; opacity: 0.7; transition: opacity 0.15s; }
.cs-footer-social a:hover { opacity: 1; }

.cs-footer-heading {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e5e7eb;
  margin-bottom: 14px;
}
.cs-footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.cs-footer-links a { color: #9ca3af; text-decoration: none; transition: color 0.15s; }
.cs-footer-links a:hover { color: #fff; }

.cs-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
  font-size: 0.8rem;
  color: #6b7280;
}
.cs-footer-bottom a { color: #6b7280; text-decoration: none; }
.cs-footer-bottom a:hover { color: #9ca3af; }

@media (max-width: 768px) {
  .cs-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cs-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .cs-footer-grid { grid-template-columns: 1fr; }
  .cs-footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}