/* ======= CONFIG VARIABLES ======= */
:root {
  --site-name: "Phoenix Resist Events";
  --archive-retention-months: 12;

  /* Desert Dusk palette */
  --clay: #C2452D;
  --clay-light: #D4634E;
  --clay-dark: #9A3522;
  --sand: #F5E6D3;
  --sand-light: #FDF6EF;
  --sand-dark: #E8D0B8;
  --mesa: #2D2926;
  --mesa-light: #4A4541;
  --mesa-mid: #3A3633;
  --sage: #6B8F71;
  --sage-light: #8DB193;
  --sky: #4A8FBF;
  --sky-light: #6BA8D4;
  --amber: #E59E2F;
  --amber-light: #F0B550;
  --purple: #7B5EA7;

  --bg: #1A1715;
  --bg-card: #242120;
  --bg-elevated: #2E2A27;
  --text: #F5E6D3;
  --text-muted: #A89B8E;
  --text-dim: #6B6259;
  --border: rgba(194, 69, 45, 0.15);
  --border-strong: rgba(194, 69, 45, 0.3);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(194, 69, 45, 0.1);

  --font-display: 'Libre Franklin', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ======= RESET & BASE ======= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(194,69,45,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(107,143,113,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ======= SCROLLBAR ======= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--mesa-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--clay); }

/* ======= TYPOGRAPHY ======= */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.2; }

/* ======= HEADER ======= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,23,21,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--clay);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-display);
  color: white;
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--clay-light);
  opacity: 0.4;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.logo-text .highlight { color: var(--clay); }

.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(107,143,113,0.12);
  border: 1px solid rgba(107,143,113,0.2);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--sage-light);
}

.user-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--sage);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ======= NAVIGATION ======= */
.nav-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 2px;
  padding: 6px 24px;
  min-width: max-content;
}

.nav-btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.nav-btn:hover {
  background: rgba(194,69,45,0.08);
  color: var(--text);
}

.nav-btn.active {
  background: var(--clay);
  color: white;
}

.nav-btn.organizer-btn {
  color: var(--sage-light);
  position: relative;
}

.nav-btn.organizer-btn::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--sage);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.nav-btn.admin-btn {
  color: var(--amber-light);
  position: relative;
}

.nav-btn.admin-btn::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--amber);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--amber);
  color: var(--bg);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  line-height: 1;
}

.nav-divider {
  width: 1px;
  background: var(--border-strong);
  margin: 4px 8px;
  flex-shrink: 0;
}

/* ======= BUTTONS ======= */
.btn {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.btn-primary {
  background: var(--clay);
  color: white;
}
.btn-primary:hover { background: var(--clay-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--mesa-mid); border-color: var(--clay); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.btn-danger {
  background: transparent;
  color: #E05555;
  border: 1px solid rgba(224,85,85,0.3);
}
.btn-danger:hover { background: rgba(224,85,85,0.1); }

.btn-success {
  background: var(--sage);
  color: white;
}
.btn-success:hover { background: var(--sage-light); }

.btn-sm { font-size: 12px; padding: 6px 12px; }
.btn-xs { font-size: 11px; padding: 4px 10px; }

/* ======= MAIN CONTENT ======= */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ======= MODAL OVERLAY ======= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: modal-in 0.25s ease;
  position: relative;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--clay); color: white; }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ======= FORM ELEMENTS ======= */
.form-group { margin-bottom: 20px; }

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

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  font-style: italic;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(194,69,45,0.1);
}

.form-input:disabled, .form-textarea:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-textarea { min-height: 100px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--clay);
  cursor: pointer;
}

/* ======= TAGS / CHIPS ======= */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.chip:hover { border-color: var(--clay); color: var(--text); }

.chip.selected {
  background: rgba(194,69,45,0.12);
  border-color: var(--clay);
  color: var(--clay-light);
}

.chip.selected .chip-x { display: inline; }
.chip .chip-x { display: none; font-size: 10px; }

.chip.custom { border-style: dashed; }

.add-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.add-chip-btn:hover { border-color: var(--clay); color: var(--clay-light); }

/* ======= SECTION PANELS ======= */
.section-panel {
  display: none;
}
.section-panel.active { display: block; }

/* ======= HERO / LANDING ======= */
.hero-section {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-section h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-section h1 .accent { color: var(--clay); }

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--clay);
}

.hero-stat-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ======= EVENT CARDS ======= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 400px) {
  .events-grid { grid-template-columns: 1fr; }
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.event-card:hover {
  border-color: var(--clay);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-2px);
}

.event-card-date {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clay);
  margin-bottom: 8px;
}

.event-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.event-card-org {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--sage);
  border-radius: 50%;
  font-size: 9px;
  color: white;
  cursor: help;
  flex-shrink: 0;
}

.event-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.event-card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.event-tag {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(194,69,45,0.08);
  color: var(--clay-light);
  border: 1px solid rgba(194,69,45,0.15);
}

.event-tag.reg-required {
  background: rgba(229,158,47,0.1);
  color: var(--amber);
  border-color: rgba(229,158,47,0.2);
}

.event-tag.virtual-tag {
  background: rgba(74,143,191,0.1);
  color: var(--sky-light);
  border-color: rgba(74,143,191,0.2);
}

/* ======= EVENT LIST (organizer) ======= */
.event-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all 0.15s;
}

.event-list-item:hover { border-color: var(--border-strong); }

.event-list-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 90px;
}

.event-list-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-list-status {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.status-published { background: rgba(107,143,113,0.15); color: var(--sage-light); }
.status-review { background: rgba(229,158,47,0.12); color: var(--amber); }
.status-draft { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.status-archived { background: rgba(224,85,85,0.08); color: rgba(224,85,85,0.6); font-style: italic; }
.status-pending-org { background: rgba(123,94,167,0.15); color: var(--purple); }

.event-list-item.archived-row {
  opacity: 0.55;
  border-style: dashed;
}

.event-list-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ======= CONTACT / MESSAGE LIST ======= */
.msg-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.msg-list-item:hover { border-color: var(--clay); }

.msg-list-item.msg-unread { border-color: var(--sage); background: rgba(107,143,113,0.06); }
.event-list-item.review-unseen { border-color: var(--amber); background: rgba(229,158,47,0.06); }

.new-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: var(--sage);
  color: white;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.msg-topic {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.msg-meta {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.5;
}

.msg-bubble.from-org {
  background: rgba(194,69,45,0.1);
  border: 1px solid rgba(194,69,45,0.15);
  margin-left: auto;
}

.msg-bubble.from-admin {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  margin-right: auto;
}

.msg-bubble-meta {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ======= CALENDAR VIEW ======= */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 16px;
}

.cal-header {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 4px;
  color: var(--text-dim);
}

.cal-day {
  aspect-ratio: 1;
  min-height: 70px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s;
  overflow: hidden;
}

.cal-day:hover { border-color: var(--border-strong); }
.cal-day.today { border-color: var(--clay); }
.cal-day.today .cal-day-num { color: var(--clay); font-weight: 700; }
.cal-day.other-month { opacity: 0.3; }

.cal-day-num { margin-bottom: 4px; }

.cal-event-dot {
  display: block;
  font-size: 10px;
  color: var(--clay-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 4px;
  background: rgba(194,69,45,0.1);
  border-radius: 3px;
  margin-bottom: 2px;
  line-height: 1.4;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-nav h3 {
  font-size: 20px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .cal-day { min-height: 50px; aspect-ratio: auto; }
  .cal-event-dot { display: none; }
  .cal-day.has-events::after {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background: var(--clay);
    border-radius: 50%;
    margin: 4px auto 0;
  }
}

/* ======= ORG LIST ======= */
.org-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.15s;
}
.org-card:hover { border-color: var(--border-strong); }

.org-avatar {
  width: 44px;
  height: 44px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--clay);
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
}

.org-info h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.org-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.org-links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.org-link-icon {
  width: 28px;
  height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.15s;
}
.org-link-icon:hover { border-color: var(--clay); color: var(--clay); }

/* ======= PROFILE MODAL ======= */
.social-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .social-inputs { grid-template-columns: 1fr; }
}

.social-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  flex-shrink: 0;
}

.social-input-group .form-input { flex: 1; padding: 8px 10px; font-size: 13px; }

/* ======= SECTION TITLES ======= */
.section-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ======= FORM SECTIONS ======= */
.form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title .icon {
  width: 24px;
  height: 24px;
  background: rgba(194,69,45,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ======= CONFIRMATION DIALOG ======= */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.confirm-overlay.open { display: flex; }

.confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}

.confirm-box h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #E05555;
}

.confirm-box p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ======= EMPTY STATES ======= */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-dim);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ======= SYNC INFO ======= */
.sync-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .sync-options { grid-template-columns: 1fr; }
}

.sync-option {
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.sync-option:hover { border-color: var(--clay); }

.sync-option-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.sync-option h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sync-option p {
  font-size: 12px;
  color: var(--text-dim);
}

/* ======= TOAST ======= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--sage);
  color: white;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  z-index: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ======= DEMO MODE ======= */
.demo-banner {
  background: rgba(229, 158, 47, 0.15);
  border-bottom: 1px solid rgba(229, 158, 47, 0.3);
  padding: 6px 24px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
}

.demo-role-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.demo-role-modal .modal-box {
  max-width: 480px;
}

.demo-role-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.demo-role-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.demo-role-btn:hover {
  border-color: var(--clay);
  background: rgba(194, 69, 45, 0.06);
}

.demo-role-btn .role-icon {
  width: 40px;
  height: 40px;
  background: rgba(194,69,45,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.demo-role-btn .role-info h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.demo-role-btn .role-info p {
  font-size: 12px;
  color: var(--text-dim);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .logo-text { display: none; }
  .user-badge span:not(.dot) { display: none; }
  .main-content { padding: 20px 16px 60px; }
  .hero-section { padding: 40px 0 24px; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 24px; }
  .event-list-item { flex-wrap: wrap; gap: 8px; }
  .event-list-actions { width: 100%; justify-content: flex-end; }
}

/* ======= SITE FOOTER ======= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer p {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.footer-links {
  font-family: var(--font-display);
  font-size: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--clay-light);
}

.footer-sep {
  margin: 0 8px;
  color: var(--text-dim);
}

/* ======= SECTION FADE IN ======= */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======= ROLE BADGES ======= */
.role-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.role-admin { background: rgba(229,158,47,0.15); color: var(--amber); }
.role-organizer { background: rgba(107,143,113,0.15); color: var(--sage-light); }
.role-guest { background: rgba(255,255,255,0.06); color: var(--text-dim); }

/* ======= LOADING SPINNER ======= */
.section-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 13px;
  gap: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
