/* Mootit - Community Event Platform (theme-aware) */

:root {
  /* Theme tokens — set by theme.js at runtime, CSS defaults are BSW fallback */
  --theme-primary: #2A9D8F;
  --theme-primary-dark: #21867A;
  --theme-primary-light: #E8F5F3;
  --theme-accent: #E76F51;
  --theme-accent-dark: #D45A3C;
  --theme-accent-light: #FCF0ED;
  --theme-bg: #ffffff;
  --theme-surface: #f8f9fa;
  --theme-text: #1a1a1a;
  --theme-text-muted: rgba(0,0,0,0.5);
  --theme-border: rgba(0,0,0,0.1);
  --theme-font-heading: 'Space Grotesk', sans-serif;
  --theme-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Legacy aliases — point to theme tokens for backward compat */
  --revel-teal: var(--theme-primary);
  --revel-teal-dark: var(--theme-primary-dark);
  --revel-teal-light: var(--theme-primary-light);
  --revel-orange: var(--theme-accent);
  --revel-orange-dark: var(--theme-accent-dark);
  --revel-orange-light: var(--theme-accent-light);

  --bsw-teal: var(--theme-primary);
  --bsw-teal-dark: var(--theme-primary-dark);
  --bsw-teal-light: var(--theme-primary-light);
  --bsw-orange: var(--theme-accent);
  --bsw-orange-dark: var(--theme-accent-dark);
  --bsw-orange-light: var(--theme-accent-light);

  --bsw-primary: var(--theme-primary);
  --bsw-primary-dark: var(--theme-primary-dark);
  --bsw-primary-light: var(--theme-primary-light);
  --bsw-accent: var(--theme-accent);
  --bsw-accent-dark: var(--theme-accent-dark);
  --bsw-accent-light: var(--theme-accent-light);

  /* Neutrals */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic aliases for admin.css */
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --bg-subtle: #F9FAFB;
  --border: #E5E7EB;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;

  /* Semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 320px;
  --max-width: 1280px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
}

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

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--bsw-teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-primary {
  background: var(--bsw-teal);
  color: white;
}

.btn-primary:hover {
  background: var(--bsw-teal-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-success-flash {
  background: var(--bsw-teal, #2A9D8F) !important;
  border-color: var(--bsw-teal, #2A9D8F) !important;
  color: white !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: #EF4444;
}

/* When btn-outline is inside a dark header, adapt colors */
.header .btn-outline,
.admin-header .btn-outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

.header .btn-outline:hover,
.admin-header .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-orange {
  background: var(--bsw-orange);
  color: white;
}

.btn-orange:hover {
  background: var(--bsw-orange-dark);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bsw-orange);
  color: white;
  border-radius: 999px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  overflow: visible;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--revel-teal);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

.logo-mark svg {
  width: 24px;
  height: 24px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-900);
}

.logo-dates {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav.admin-nav {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.header-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.header-nav-link:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.header-nav-link.active {
  color: var(--theme-primary, var(--bsw-teal));
  background: rgba(42, 143, 133, 0.08);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--gray-900);
  text-decoration: none;
}

.nav-link.active {
  color: var(--bsw-teal);
  border-bottom-color: var(--bsw-teal);
}

.conference-select {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.conference-select option {
  color: var(--gray-900, #111);
  background: white;
}

.conference-select:hover {
  background: rgba(255, 255, 255, 0.25);
}

.conference-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Header avatar (authenticated) */
.header-avatar-btn {
  padding: 0 !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}
.header-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.header-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bsw-teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Settings dropdown user section */
.settings-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.625rem 0.875rem 0.625rem;
}
.settings-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-user-email {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--bsw-teal) 0%, var(--bsw-teal-dark) 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero.has-hero-image {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero.has-hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero.has-hero-image > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* Main */
.main {
  flex: 1;
  padding: 2rem 0;
}

/* Header icon buttons */
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  border: none;
  background: none;
  color: var(--gray-500);
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}

.header-icon-btn:hover,
.header-icon-btn.active {
  color: var(--theme-primary, var(--bsw-teal));
}

.header-filter-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--theme-accent, var(--bsw-orange));
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  min-width: 12px;
  height: 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Settings dropdown menu */
.header-menu {
  position: relative;
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.625rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  min-width: 220px;
  max-width: min(260px, calc(100vw - 1.5rem));
  z-index: 300;
  padding: 0.375rem 0;
  animation: fadeIn 0.15s ease;
  overflow: hidden;
}

.header-dropdown-item {
  /* Reset native button chrome so <button> and <a> render identically */
  all: unset;
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 0.5rem 0.875rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-700);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.header-dropdown-item:hover,
.header-dropdown-item:focus-visible {
  background: var(--gray-50);
  color: var(--gray-900);
  outline: none;
}

.header-dropdown-section {
  padding: 0;
}

.header-dropdown-section + .header-dropdown-section,
.header-dropdown-divider + .header-dropdown-section {
  padding-top: 0.25rem;
}

/* Conference selector sits in its own padded section */
.header-dropdown-section:has(.header-dropdown-select) {
  padding: 0.5rem 0.75rem;
}

.header-dropdown-select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.375rem;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
}

.header-dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 0.25rem 0;
}

/* Filter sheet — bottom-anchored slide-up modal opened by .filter-fab.
   Hosts day jump-to + type/topic/venue filters in one place. */
.filter-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  max-height: 80vh;
  animation: slideUpSheet 0.2s ease;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.filter-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--gray-300, #d1d5db);
  margin: 0.25rem auto 0.25rem;
}

.filter-sheet-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.filter-sheet-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.filter-sheet-clear {
  background: none;
  border: none;
  color: var(--gray-500, #6b7280);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.filter-sheet-clear:hover { color: var(--primary, #2563eb); }

.filter-sheet-close {
  background: none;
  border: none;
  color: var(--gray-500, #6b7280);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.filter-sheet-close:hover { background: var(--gray-100); color: var(--gray-900); }

.filter-sheet-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

.filter-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 290;
  animation: fadeIn 0.15s ease;
}

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

/* Floating filter button — bottom-right above bottom nav */
.filter-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--bsw-teal);
  color: white;
  border: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 250;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.filter-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.3); background: var(--bsw-teal-dark); }
.filter-fab.has-active {
  background: var(--bsw-orange);
}
.filter-fab.has-active:hover { background: var(--bsw-orange-dark); }

.filter-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bsw-orange);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}
.filter-fab-badge[hidden] { display: none; }

/* Desktop: place FAB lower since there's no bottom nav */
@media (min-width: 768px) {
  .filter-fab { bottom: 1.5rem; right: 1.5rem; }
}

.day-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
}

.day-tabs::-webkit-scrollbar {
  display: none;
}

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

.day-tab {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.day-tab:hover {
  border-color: var(--bsw-teal);
}

.day-tab.active {
  background: var(--bsw-teal);
  border-color: var(--bsw-teal);
  color: white;
}

.day-name {
  font-weight: 600;
  font-size: 0.75rem;
}

.day-date {
  font-size: 0.6875rem;
  opacity: 0.7;
}

/* Filters Bar — hidden on mobile, fixed at bottom on desktop */
.filters-bar {
  display: none;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: white;
  margin-bottom: 1rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--bsw-teal);
  box-shadow: 0 0 0 3px var(--bsw-teal-light);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: var(--gray-200);
}

.filter-pill.active {
  background: var(--bsw-teal);
  color: white;
}

/* Schedule Layout */
.schedule-layout {
  display: flex;
  gap: 2rem;
}

.sessions-container {
  flex: 1;
  min-width: 0;
}

.my-schedule-sidebar {
  width: 280px;
  flex-shrink: 0;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--gray-500);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--bsw-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

.empty-state svg {
  color: var(--gray-300);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

/* Sessions List */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  /* Leave room at the bottom so the last day can scroll under the fixed
     day-picker without leaving content trapped behind it. */
  padding-bottom: 8rem;
}

/* Day section — anchor target for day-tab jump-to navigation */
.day-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Ensure scroll target lands below the page header even if the browser
     uses CSS scroll-margin instead of our JS offset. */
  scroll-margin-top: 88px;
}

.day-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.day-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900, #111);
  margin: 0;
}

.day-section-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.time-block {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.125rem;
}

.time-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.time-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bsw-teal);
  white-space: nowrap;
}

.time-line {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.time-sessions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
}

/* Session Card — condensed layout */
.session-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.15s;
  cursor: pointer;
  display: flex;
  align-items: stretch;
}

.session-card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Colored left ribbon — replaces the old border-left and houses the format icon. */
.session-card-ribbon {
  flex: 0 0 auto;
  width: 26px;
  background: var(--gray-400);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.75rem;
  color: white;
}
.session-card-ribbon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Type-colored ribbon */
.session-card.type-keynote .session-card-ribbon { background: var(--bsw-orange); }
.session-card.type-workshop .session-card-ribbon { background: #0369A1; }
.session-card.type-panel .session-card-ribbon { background: #7C3AED; }
.session-card.type-session .session-card-ribbon { background: var(--gray-500, #6b7280); }
.session-card.type-networking .session-card-ribbon { background: #059669; }
.session-card.type-social .session-card-ribbon { background: #D97706; }

/* Registered: light teal tint + keep the type-color ribbon so the card still
   communicates format at a glance. The filled-teal check button is the primary
   "on" indicator. */
.session-card.registered {
  background: #F0FAF8;
  border-color: #A7E5DD;
}

.session-card.registered:hover {
  border-color: var(--bsw-teal, #2A9D8F);
  box-shadow: 0 2px 8px rgba(42, 157, 143, 0.15);
}

.session-card-content {
  flex: 1;
  min-width: 0;
  padding: 0.625rem 0.75rem;
}

.session-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.session-card-info {
  flex: 1;
  min-width: 0;
}

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

.session-type {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 0.25rem;
}

.session-type.keynote { background: var(--bsw-orange-light); color: var(--bsw-orange-dark); }
.session-type.workshop { background: #E0F2FE; color: #0369A1; }
.session-type.panel { background: #F3E8FF; color: #7C3AED; }
.session-type.networking { background: #D1FAE5; color: #059669; }
.session-type.social { background: #FEF3C7; color: #D97706; }

.session-track,
.session-topic {
  font-size: 0.6875rem;
  color: var(--gray-500);
}

.session-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.125rem;
  line-height: 1.3;
}

.session-subtitle {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.3;
  margin-bottom: 0.125rem;
}

.session-topics-line {
  font-size: 0.6875rem;
  color: var(--gray-400);
}

/* Facilitator strip on session cards — only present for sessions the current
   user facilitates (see isFacilitatorOf in schedule.js). Sits below topics. */
.session-card-facilitator-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--gray-200, #e5e7eb);
}
.facilitator-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bsw-teal-dark, #0f766e);
}
.facilitator-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  padding: 0.3125rem 0.625rem;
  background: var(--bsw-teal);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.facilitator-edit-btn:hover { background: var(--bsw-teal-dark); }
.facilitator-edit-btn svg { display: block; }
.session-card.facilitating { box-shadow: inset 3px 0 0 var(--bsw-teal); }

.session-time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.session-time svg {
  width: 14px;
  height: 14px;
  color: var(--gray-400);
}

.session-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.session-location svg {
  width: 14px;
  height: 14px;
  color: var(--gray-400);
}

.session-card-footer {
  display: none; /* Replaced by inline layout */
}

.session-capacity {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.session-capacity.full {
  color: var(--error);
}

.add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  opacity: 0;
  pointer-events: none;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.session-card:hover .add-btn {
  opacity: 1;
  pointer-events: auto;
}

/* On touch devices there's no hover — always show the add button */
@media (hover: none) {
  .add-btn {
    opacity: 1;
    pointer-events: auto;
  }
}

.add-btn:hover {
  background: var(--bsw-teal);
  color: white;
  border-color: var(--bsw-teal);
}

/* Registered: filled teal circle — the primary "on" indicator. */
.add-btn.added {
  opacity: 1;
  pointer-events: auto;
  background: var(--bsw-teal, #2A9D8F);
  color: white;
  border-color: var(--bsw-teal, #2A9D8F);
}

.add-btn.added:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* =================================================================
   My Schedule — Day Timeline View
   ================================================================= */

.my-schedule-days {
  max-width: 640px;
  margin: 0 auto;
}

.my-schedule-day-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.my-schedule-day-tabs .day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: white;
  cursor: pointer;
  white-space: nowrap;
  min-width: 56px;
  transition: all var(--transition-fast);
}

.my-schedule-day-tabs .day-tab.active {
  background: var(--bsw-teal, #2B8A8F);
  color: white;
  border-color: var(--bsw-teal, #2B8A8F);
}

.my-schedule-day-tabs .day-tab .day-count {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.7;
}

.my-schedule-timeline {
  display: none;
}

.my-schedule-timeline.active {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-gap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0 0.5rem 1.5rem;
}

.timeline-gap-line {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
  border-style: dashed;
}

.timeline-gap-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  white-space: nowrap;
  font-style: italic;
}

/* Events I Manage Section */
#my-events-section {
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.05) 0%, rgba(231, 111, 81, 0.05) 100%);
}

.my-event-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.5rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-100);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.my-event-item:hover {
  border-color: var(--revel-teal, #2A9D8F);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.my-event-icon {
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.my-event-icon.conference {
  background: rgba(42, 157, 143, 0.1);
  color: var(--revel-teal, #2A9D8F);
}

.my-event-icon.session {
  background: rgba(231, 111, 81, 0.1);
  color: var(--revel-orange, #E76F51);
}

.my-event-icon svg {
  width: 16px;
  height: 16px;
}

.my-event-info {
  flex: 1;
  min-width: 0;
}

.my-event-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-event-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.my-event-role {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.my-event-role.organizer,
.my-event-role.admin {
  background: rgba(42, 157, 143, 0.1);
  color: var(--revel-teal, #2A9D8F);
}

.my-event-role.facilitator {
  background: rgba(231, 111, 81, 0.1);
  color: var(--revel-orange, #E76F51);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal.open,
.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 0;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

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

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 1;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 2rem);
  overscroll-behavior: contain;
}

.modal-session-type {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.modal-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.modal-meta-item svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400);
}

.modal-description {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-facilitators {
  margin-bottom: 1.5rem;
}

.modal-facilitators h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.facilitator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.facilitator-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gray-500);
  overflow: hidden;
}

.facilitator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.facilitator-name {
  font-weight: 500;
  color: var(--gray-800);
}

.facilitator-headline {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 0.75rem 1.5rem;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--gray-800);
  color: white;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

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

.toast.toast-success,
.toast.success {
  background: var(--success);
}

.toast.toast-error,
.toast.error {
  background: var(--error);
}

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

/* Responsive */
/* === Desktop (>1024px): header nav visible, bottom nav hidden === */
/* desktop overrides merged into the ≥1025px block below */

/* === Mobile (≤1024px) === */
@media (max-width: 1024px) {
  .header-nav:not(.admin-nav) {
    display: none; /* nav is always in bottom bar */
  }

  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }

  .header-content {
    gap: 0.25rem;
  }

  .header-left {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 0;
  }

  .logo-text {
    min-width: 0;
    overflow: hidden;
  }

  .logo-title {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo-dates {
    display: none;
  }

  .header-actions {
    gap: 0.25rem;
  }

  /* Hide Sign In text, show only on wider screens */
  #sign-in-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Day picker: fixed above bottom nav */
  .day-picker {
    position: fixed;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* bottom-nav display moved to after base styles */
}

/* Bottom Nav — fixed to viewport bottom on all sizes */
.bottom-nav {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: white;
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* creates containing block for absolutely-positioned search row */
}

.bottom-nav-links {
  display: flex;
  align-items: stretch;
  height: 56px;
  max-width: 600px;
  margin: 0 auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--theme-primary, var(--bsw-teal));
}

.bottom-nav-item svg {
  flex-shrink: 0;
}

.bottom-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: var(--theme-accent, var(--bsw-orange));
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.bottom-nav-search-expanded {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 0.75rem;
  gap: 0.5rem;
}

.bottom-nav-search-expanded input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 0 1rem;
  font-size: 1rem;
  outline: none;
}

.bottom-nav-search-expanded input:focus {
  border-color: var(--theme-primary, var(--bsw-teal));
  box-shadow: 0 0 0 3px rgba(42, 143, 133, 0.15);
}

.bottom-nav-search-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
}


/* Filter dropdown sections — used in #filter-dropdown */
.legend-section {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.legend-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}

.legend-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.legend-pills .filter-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin: 0;
}

/* Shared schedule view */
.shared-banner {
  background: #0B2520;
  color: #F2EDE6;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.875rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.shared-schedule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.5rem 0 1rem;
}

.shared-day-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  padding: 1.25rem 0 0.5rem;
}

/* People Grid — gallery style */
.people-section {
  padding: 1.5rem 0 4rem;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .people-grid { grid-template-columns: 1fr; }
}

.person-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.15s, transform 0.15s;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.person-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.person-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0B2520;
  color: #F2EDE6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  flex-shrink: 0;
  overflow: hidden;
}

.person-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.person-identity {
  min-width: 0;
  flex: 1;
}

.person-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0B2520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-role {
  font-size: 0.8125rem;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.person-sessions-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bsw-teal-light, #E8F5F3);
  color: var(--bsw-teal, #2A9D8F);
  align-self: flex-start;
}

.person-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.person-schedule-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bsw-teal, #2A9D8F);
  text-decoration: none;
  white-space: nowrap;
}
.person-schedule-link:hover { text-decoration: underline; }

/* ============================================================
   Profile Edit Sheet
   ============================================================ */

.profile-edit-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.profile-edit-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-edit-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-edit-avatar-btn {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--bsw-teal, #2A9D8F);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.profile-edit-avatar-btn:hover {
  background: var(--bsw-teal-dark, #21867A);
}

.profile-edit-avatar-hint {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.profile-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.profile-edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.profile-edit-field-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 480px) {
  .profile-edit-field-row { flex-direction: column; }
}

.profile-edit-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: 0.01em;
}

.profile-edit-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--gray-900);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  font-family: inherit;
}

.profile-edit-input:focus {
  outline: none;
  border-color: var(--bsw-teal, #2A9D8F);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.12);
}

.profile-edit-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.profile-edit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-edit-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-700, #374151);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-edit-tag:hover {
  border-color: var(--bsw-teal, #2A9D8F);
  color: var(--bsw-teal, #2A9D8F);
}

.profile-edit-tag.selected {
  background: var(--bsw-teal, #2A9D8F);
  border-color: var(--bsw-teal, #2A9D8F);
  color: white;
}

.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--gray-100);
  padding-top: 18px;
}

.people-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4rem 1rem;
  color: var(--gray-500);
}

.people-empty-icon { font-size: 2rem; }
.people-empty-title { font-weight: 600; color: var(--gray-700); }
.people-empty-text { font-size: 0.875rem; }

/* Profile modal */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11,37,32,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s;
  padding: 0;
}

.profile-modal-overlay.open {
  opacity: 1;
}

@media (min-width: 640px) {
  .profile-modal-overlay {
    align-items: center;
    padding: 1rem;
  }
}

.profile-modal-panel {
  position: relative;
  background: white;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform 0.2s;
}

@media (min-width: 640px) {
  .profile-modal-panel {
    border-radius: 20px;
    max-height: 80vh;
  }
}

.profile-modal-overlay.open .profile-modal-panel {
  transform: translateY(0);
}

.profile-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.profile-modal-close:hover {
  background: var(--gray-200);
}

.profile-modal-body {
  padding: 28px 24px 32px;
}

.profile-modal-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-modal-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0B2520;
  color: #F2EDE6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-modal-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.profile-modal-identity {
  min-width: 0;
}

.profile-modal-name {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0B2520;
  line-height: 1.2;
}

.profile-modal-role {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.profile-modal-bio {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-700);
  margin: 0 0 20px;
}

.profile-modal-goals {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-700);
  margin: 0 0 20px;
  padding: 12px 14px;
  background: var(--gray-50, #f9fafb);
  border-left: 3px solid var(--bsw-teal, #2A9D8F);
  border-radius: 4px;
}

.profile-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.profile-interest-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-700, #374151);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.profile-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bsw-teal, #2A9D8F);
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 500;
}

.profile-social-link:hover {
  text-decoration: underline;
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 16px 0;
}

.profile-sessions-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bsw-teal-light, #E8F5F3);
  color: var(--bsw-teal, #2A9D8F);
  font-size: 0.875rem;
  font-weight: 600;
}
button.profile-sessions-toggle {
  border: none;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s;
}
button.profile-sessions-toggle:hover {
  background: var(--bsw-teal, #2A9D8F);
  color: white;
}
.person-schedule-inline {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.profile-modal-sessions-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-modal-session-item {
  font-size: 0.875rem;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: 8px;
  color: var(--gray-700);
  border-left: 3px solid var(--bsw-teal, #2A9D8F);
}

/* ============================================================
   Page switching via body[data-page] attribute
   ============================================================ */

/* Sections outside .main are hidden by default; shown only by their data-page rule */
#my-schedule-view,
#people-section,
#feed-section {
  display: none;
}

/* Hide footer on all sub-pages */
body[data-page="people"] .footer,
body[data-page="schedule"] .footer,
body[data-page="feed"] .footer {
  display: none;
}

body[data-page="people"] .main,
body[data-page="people"] .hero {
  display: none;
}

body[data-page="people"] #people-section {
  display: block !important;
}

body[data-page="schedule"] .main,
body[data-page="schedule"] .hero {
  display: none;
}

body[data-page="schedule"] #my-schedule-view {
  display: block !important;
}

body[data-page="feed"] .main,
body[data-page="feed"] .hero {
  display: none;
}

body[data-page="feed"] #feed-section {
  display: block !important;
}

/* Search morphs inline within the bottom nav bar (transitions defined on .bottom-nav-links above) */

.bottom-nav.search-open .bottom-nav-links {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

/* Search row: sits absolutely inside the nav bar, fades+slides up */
.bottom-nav-search-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bottom-nav.search-open .bottom-nav-search-row {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bottom-nav-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 40px;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 0 14px;
  border: 1.5px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.bottom-nav-search-inner:focus-within {
  background: white;
  border-color: var(--theme-primary, var(--bsw-teal));
  box-shadow: 0 0 0 3px rgba(42, 143, 133, 0.12);
}

.bottom-nav-search-inner > svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

.bottom-nav-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  outline: none;
  color: var(--gray-800);
}

.bottom-nav-search-input::placeholder {
  color: var(--gray-400);
}

.bottom-nav-search-close {
  background: none;
  border: none;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.bottom-nav-search-close:hover {
  color: var(--gray-700);
}

/* Feed Cards */
.feed-section {
  padding: 1rem 0 6rem;
}

.feed-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-100);
}

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

.feed-type-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.feed-time {
  font-size: 0.7rem;
  color: var(--gray-400);
}

.feed-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.feed-body {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.feed-author {
  font-size: 0.7rem;
  color: var(--gray-400);
}

/* ============================================================
   Responsive — organized into clean breakpoint blocks
   ============================================================ */

/* === Desktop (≥1025px) === */
@media (min-width: 1025px) {
  /* Day picker: fixed above bottom nav (consistent with mobile) */
  .day-picker .day-tabs {
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Filters bar removed — filter icon in header opens dropdown; search is in bottom nav */

  /* Bottom nav: always visible, centered on wide screens */
  .bottom-nav-links {
    max-width: 480px;
    margin: 0 auto;
  }

  /* Header nav for sessions app has no links — only admin nav is used */
  .header-nav:not(.admin-nav) {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Distribute date tabs evenly across the row so Mon–Fri all fit */
  .day-tabs {
    gap: 0.3125rem;
    overflow-x: hidden;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .day-tab {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0.375rem 0.25rem;
    line-height: 1.15;
  }

  .day-tab .day-name {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
  }

  .day-tab .day-date {
    font-size: 0.625rem;
    opacity: 0.85;
  }

  .time-sessions {
    grid-template-columns: 1fr;
  }
}

/* === MOBILE OPTIMIZATIONS === */

/* iOS momentum scroll for scrollable containers */
.day-tabs,
.filter-pills,
.sessions-list {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Touch-action for better scrollable zones */
.day-tabs,
.filter-pills {
  touch-action: pan-x;
}

/* Filter bar: stack vertically on small phones */
@media (max-width: 480px) {
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .search-box {
    min-width: 100%;
    max-width: none;
  }

  .filter-pills {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }
}

/* Smaller search box min-width to fit 375px screens */
@media (max-width: 375px) {
  .search-box {
    min-width: 120px;
  }

  .day-tab {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }
}

/* Modal padding reduction on small phones */
@media (max-width: 480px) {
  .modal-content {
    width: 96%;
    margin: 0.5rem auto;
    max-height: 92vh;
    overflow-y: auto;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Increase touch target sizes on mobile */
@media (max-width: 768px) {
  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 36px;
    padding: 0.5rem 0.875rem;
  }

  .add-btn {
    width: 44px;
    height: 44px;
  }

  .nav-link {
    padding: 0.625rem 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Header nav on very small screens */
@media (max-width: 375px) {
  .header-nav {
    gap: 0.25rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.5rem 0.5rem;
  }
}

/* Toast notification mobile positioning */
@media (max-width: 480px) {
  .toast-container {
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }

  .toast {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }
}

/* Prevent iOS input zoom (must be 16px on mobile) */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="search"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Keyboard overlap: scroll focused inputs into view */
@media (max-width: 768px) {
  .modal input:focus,
  .modal textarea:focus,
  .modal select:focus {
    scroll-margin-top: 100px;
  }
}

/* Session detail card adjustments for narrow screens */
@media (max-width: 375px) {
  .session-card {
    padding: 1rem;
  }

  .session-meta {
    flex-direction: column;
    gap: 0.375rem;
  }
}
