/* =============================================
   Gather — Design System
   ============================================= */

:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #ede9fe;
  --accent: #ec4899;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #1e1b4b;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8f7ff;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(124,58,237,0.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.05), 0 20px 40px rgba(124,58,237,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   Auth Page
   ============================================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Animated gradient background */
.auth-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #ec4899, #4facfe, #7c3aed);
  background-size: 400% 400%;
  animation: gradientShift 10s ease infinite;
  z-index: 0;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Blurred orbs for depth */
.auth-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  z-index: 0;
  animation: float 6s ease-in-out infinite;
}

.auth-orb-1 {
  width: 400px; height: 400px;
  background: #7c3aed;
  top: -100px; left: -100px;
}

.auth-orb-2 {
  width: 300px; height: 300px;
  background: #ec4899;
  bottom: -80px; right: -80px;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(20px, -20px); }
}

.auth-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.5);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.auth-brand h1 {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.auth-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Google Button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.btn-google:hover {
  background: #f9fafb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.btn-google svg { flex-shrink: 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* =============================================
   Forms
   ============================================= */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: all 0.15s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

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

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(124,58,237,0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary-full {
  width: 100%;
  padding: 0.75rem;
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

.btn-ghost {
  background: none;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
}

.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

.btn-danger-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: #fee2e2;
  color: var(--danger);
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-danger-sm:hover { background: #fecaca; }

/* =============================================
   Alerts
   ============================================= */
.alert {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  margin-bottom: 1rem;
  display: none;
  font-weight: 500;
}

.alert.show { display: block; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #d1fae5; color: #065f46; }

/* =============================================
   Navbar
   ============================================= */
.navbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,0.8);
  padding: 0 1.5rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =============================================
   Avatar
   ============================================= */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.avatar-xs {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  border: 2px solid white;
}

.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
}

.avatar-stack .avatar-xs + .avatar-xs { margin-right: -8px; }

.avatar-stack-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  align-self: center;
  margin-left: 8px;
}

/* =============================================
   Main Layout
   ============================================= */
.main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* =============================================
   Tabs
   ============================================= */
.tabs {
  display: flex;
  background: white;
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.tab-btn {
  flex: 1;
  padding: 0.65rem;
  border: none;
  background: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn.active {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(124,58,237,0.25);
}

/* =============================================
   Sections
   ============================================= */
.section { display: none; }
.section.active { display: block; }

/* =============================================
   Calendar
   ============================================= */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.month-nav h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  min-width: 190px;
  text-align: center;
}

.btn-nav {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
  color: var(--text);
}

.btn-nav:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Legend */
.family-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Availability key */
.avail-key {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.avail-key-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.key-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.key-dot.available { background: var(--success); }
.key-dot.busy      { background: var(--danger); }
.key-dot.maybe     { background: var(--warning); }
.key-dot.none      { background: #d1d5db; }

/* Calendar grid */
.calendar-grid {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  overflow: hidden;
}

.day-header {
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--gradient-soft);
  border-bottom: 1px solid var(--border);
}

.day-cell {
  min-height: 72px;
  padding: 0.5rem;
  border-right: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}

.day-cell:nth-child(7n) { border-right: none; }
.day-cell:hover:not(.empty) { background: #faf7ff; }
.day-cell.empty { background: #fafafa; cursor: default; }

.day-cell.today .day-number {
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.day-number {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.avail-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.avail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avail-dot.available { background: var(--success); }
.avail-dot.busy      { background: var(--danger); }
.avail-dot.maybe     { background: var(--warning); }
.avail-dot.none      { background: #e5e7eb; }

/* =============================================
   Availability Modal
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,10,40,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-header h3 { font-size: 1rem; font-weight: 700; }

.modal-close {
  background: none; border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer; line-height: 1;
  border-radius: 6px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }

.avail-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.avail-btn {
  padding: 0.65rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 700;
  transition: all 0.15s;
  text-align: center;
  font-family: inherit;
}

.avail-btn.available       { color: var(--success); }
.avail-btn.available:hover,
.avail-btn.available.active { background: #d1fae5; border-color: var(--success); }

.avail-btn.busy             { color: var(--danger); }
.avail-btn.busy:hover,
.avail-btn.busy.active      { background: #fee2e2; border-color: var(--danger); }

.avail-btn.maybe            { color: var(--warning); }
.avail-btn.maybe:hover,
.avail-btn.maybe.active     { background: #fef3c7; border-color: var(--warning); }

.btn-clear {
  width: 100%;
  padding: 0.45rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: background 0.15s;
  font-family: inherit;
}

.btn-clear:hover { background: var(--bg); }

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

.modal-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.family-avail-list { display: flex; flex-direction: column; gap: 0.4rem; }

.family-avail-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
}

.family-avail-name { flex: 1; font-weight: 500; }

.status-badge {
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge.available { background: #d1fae5; color: #065f46; }
.status-badge.busy      { background: #fee2e2; color: #b91c1c; }
.status-badge.maybe     { background: #fef3c7; color: #92400e; }
.status-badge.none      { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* =============================================
   Events Section
   ============================================= */
.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.events-header h2 { font-size: 1.1rem; font-weight: 700; }

/* Create Event Card */
.create-event-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-top: 3px solid transparent;
  border-image: var(--gradient) 1;
}

.create-event-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* People Picker */
.people-picker-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: block;
}

.people-picker {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color 0.15s;
  overflow: hidden;
}

.people-picker:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }

.chips-input-area {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  cursor: text;
}

.chips-input-area:empty::before {
  content: 'Nobody selected yet';
  color: var(--text-muted);
  font-size: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--gradient-soft);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 20px;
  padding: 0.2rem 0.3rem 0.2rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.1s;
  opacity: 0.7;
}

.chip-remove:hover { background: rgba(124,58,237,0.15); opacity: 1; }

.picker-search {
  padding: 0.5rem 0.75rem;
  border: none;
  font-size: 0.875rem;
  width: 100%;
  background: white;
  color: var(--text);
  font-family: inherit;
}

.picker-search:focus { outline: none; }
.picker-search::placeholder { color: var(--text-muted); }

.picker-list {
  max-height: 180px;
  overflow-y: auto;
  border-top: 1px solid #f3f4f6;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.1s;
}

.picker-item:hover   { background: #faf7ff; }
.picker-item.selected { background: var(--primary-light); }

.picker-item-name { flex: 1; font-weight: 500; }

.picker-check {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.picker-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
}

/* Event Cards */
.event-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.875rem;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.event-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.event-card-accent {
  height: 4px;
  background: var(--gradient);
}

.event-card-body { padding: 1.25rem; }

.event-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.event-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.event-meta span { display: flex; align-items: center; gap: 0.25rem; }

.event-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
  line-height: 1.5;
}

.event-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f3f4f6;
}

.rsvp-counts { display: flex; gap: 0.4rem; align-items: center; }

.rsvp-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
}

.rsvp-count.yes   { background: #d1fae5; color: #065f46; }
.rsvp-count.maybe { background: #fef3c7; color: #92400e; }
.rsvp-count.no    { background: #fee2e2; color: #b91c1c; }

.rsvp-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.rsvp-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.rsvp-btn {
  padding: 0.3rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.15s;
  font-family: inherit;
}

.rsvp-btn.yes               { color: var(--success); }
.rsvp-btn.yes:hover,
.rsvp-btn.yes.active        { background: #d1fae5; border-color: var(--success); }

.rsvp-btn.maybe             { color: var(--warning); }
.rsvp-btn.maybe:hover,
.rsvp-btn.maybe.active      { background: #fef3c7; border-color: var(--warning); }

.rsvp-btn.no                { color: var(--danger); }
.rsvp-btn.no:hover,
.rsvp-btn.no.active         { background: #fee2e2; border-color: var(--danger); }

/* =============================================
   Empty / Loading States
   ============================================= */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* =============================================
   Utilities
   ============================================= */
.hidden { display: none !important; }

/* =============================================
   Attendees List
   ============================================= */
.attendees-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.875rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.attendee-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.attendee-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.attendee-badge.yes     { background: #d1fae5; color: #065f46; }
.attendee-badge.maybe   { background: #fef3c7; color: #92400e; }
.attendee-badge.no      { background: #fee2e2; color: #b91c1c; }
.attendee-badge.pending { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

.attendee-names {
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

/* =============================================
   Comments
   ============================================= */
.btn-comments {
  width: 100%;
  margin-top: 0.875rem;
  padding: 0.55rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
}

.btn-comments:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.comments-section {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 0.875rem;
  padding-right: 0.25rem;
}

.comment-empty {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

.comment-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.comment-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-delete {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  font-family: inherit;
  transition: color 0.15s;
}

.comment-delete:hover { color: var(--danger); }

.comment-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.comment-input-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 0.35rem 0.35rem 0.35rem 0.6rem;
  transition: border-color 0.15s;
}

.comment-input-area:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.comment-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.875rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.comment-input::placeholder { color: var(--text-muted); }

.comment-send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.comment-send:hover { opacity: 0.85; }

/* =============================================
   Bottom Navigation (mobile only)
   ============================================= */
.bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Show bottom nav, hide top tabs */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom); /* iPhone notch */
  }

  .tabs { display: none; }

  .bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.15s;
    font-family: inherit;
  }

  .bottom-nav-btn.active {
    color: var(--primary);
  }

  .bottom-nav-icon { font-size: 1.4rem; }

  /* Extra padding so content doesn't hide behind bottom nav */
  .main-content {
    padding-bottom: 5rem;
  }

  /* ---- General mobile improvements ---- */
  .navbar { padding: 0 1rem; }
  .main-content { padding: 1rem 0.75rem 5rem; }
  .month-nav h2 { min-width: 150px; font-size: 0.95rem; }
  .form-row { grid-template-columns: 1fr; }
  .event-footer { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .rsvp-actions { margin-left: 0; width: 100%; }
  .auth-card { padding: 2rem 1.5rem; }
  .avail-buttons { gap: 0.35rem; }

  /* Larger tap targets on calendar */
  .day-cell {
    min-height: 62px;
    padding: 0.4rem 0.3rem;
    cursor: pointer;
  }

  .day-number { font-size: 0.78rem; width: 24px; height: 24px; }
  .avail-dot { width: 6px; height: 6px; }

  /* Full-screen modal on mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    border-radius: var(--radius) var(--radius) 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    animation: slideUpModal 0.25s ease;
  }

  @keyframes slideUpModal {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  /* Bigger RSVP buttons on mobile */
  .rsvp-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
  }

  /* Picker list taller on mobile */
  .picker-list { max-height: 220px; }

  /* Event cards full width */
  .event-card { border-radius: var(--radius-sm); }
}
