/* ============================================================
   HUSH — Styles
   Clean, friendly, Lu.ma-inspired aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-base: #f8f6f3;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #faf9f7;
  --bg-muted: #f2f0ed;

  --color-confirmed: #2ba878;
  --color-confirmed-faint: rgba(43, 168, 120, 0.08);
  --color-confirmed-glow: rgba(43, 168, 120, 0.2);
  --color-detected: #d6823b;
  --color-detected-faint: rgba(214, 130, 59, 0.08);
  --color-detected-glow: rgba(214, 130, 59, 0.2);
  --color-rumored: #b8961a;
  --color-rumored-faint: rgba(184, 150, 26, 0.08);
  --color-rumored-glow: rgba(184, 150, 26, 0.2);
  --color-past: #b0a99f;
  --color-gold: #d4922a;
  --color-gold-faint: rgba(212, 146, 42, 0.1);

  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-dim: #999999;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.06);
  --red-alert: #e04040;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* --- Dark Mode Tokens --- */
[data-theme="dark"] {
  --bg-base: #1a1a1a;
  --bg-card: #242424;
  --bg-elevated: #2a2a2a;
  --bg-hover: #2e2e2e;
  --bg-muted: #2a2a2a;

  --text-primary: #e8e6e3;
  --text-secondary: #a8a8a8;
  --text-dim: #707070;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
  flex-shrink: 0;
}

.header-brand { display: flex; align-items: center; gap: 1rem; }

.header-logo {
  height: 28px;
  width: auto;
}
[data-theme="dark"] .header-logo { filter: invert(1); }

.header-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

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

/* Full nav button links (Instagram, Coffee Club) */
.header-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.header-nav-btn:hover { color: var(--text-primary); border-color: var(--text-dim); }

/* Small icon buttons (theme toggle, host login) */
.header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.host-icon-btn:hover { color: var(--color-confirmed); }
.header-link:hover { color: var(--text-primary); background: var(--bg-muted); }

.theme-toggle-btn .icon-sun { display: none; }
.theme-toggle-btn .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle-btn .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle-btn .icon-moon { display: none; }

/* Host icon button active state (when admin panel is open) */
.host-icon-btn.active {
  color: var(--color-confirmed);
  background: var(--color-confirmed-faint);
}

/* --- Main Layout --- */
.main-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* --- Map Panel (Leaflet) --- */
.map-panel {
  flex: 0 0 55%;
  position: relative;
  overflow: hidden;
  background: var(--bg-muted);
}

#home-map {
  width: 100%;
  height: 100%;
}

/* Home map tiles — soft warm filter */
#home-map .leaflet-tile {
  filter: saturate(0.75) brightness(1.02) sepia(0.05);
}

/* Home map marker styles */
.home-map-marker {
  background: none !important;
  border: none !important;
}

.home-marker-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 2;
  transition: transform 0.2s;
}

.home-marker-wrapper:hover .home-marker-dot {
  transform: scale(1.3);
}

.home-marker-pulse {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  animation: markerPulse 2.5s ease-out infinite;
  z-index: 1;
}

@keyframes markerPulse {
  0% { transform: scale(0.5); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* --- Host Map Markers (Gold Triangles) --- */
.host-map-marker {
  background: none !important;
  border: none !important;
}

.host-marker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.host-marker-triangle {
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s;
}

.host-marker-wrapper:hover .host-marker-triangle {
  transform: scale(1.25);
}

.host-marker-pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212, 146, 42, 0.3);
  animation: markerPulse 3s ease-out infinite;
  z-index: 1;
}

/* Highlighted host (selected profile open) */
.host-marker-highlighted .host-marker-triangle {
  transform: scale(1.3);
  filter: drop-shadow(0 2px 8px rgba(43, 168, 120, 0.5));
}
.host-marker-pulse-active {
  width: 36px !important;
  height: 36px !important;
  background: rgba(43, 168, 120, 0.35) !important;
  animation: markerPulseActive 1.5s ease-out infinite !important;
}
@keyframes markerPulseActive {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Tooltip */
.home-map-tooltip {
  font-family: var(--font-body) !important;
  font-size: 0.78rem !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-md) !important;
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

/* Leaflet controls override */
#home-map .leaflet-control-zoom a,
.phase-map-container .leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-subtle) !important;
  font-size: 14px !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
}

#home-map .leaflet-control-zoom,
.phase-map-container .leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}

.leaflet-control-layers {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-sm) !important;
  font-family: var(--font-body) !important;
  font-size: 0.72rem !important;
  color: var(--text-secondary) !important;
  padding: 0.4rem 0.6rem !important;
}

.leaflet-control-layers label {
  font-size: 0.72rem !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0 !important;
}

/* --- Events Panel (right side, card-based) --- */
.events-panel {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
  border-left: 1px solid var(--border-subtle);
  position: relative;
}

.events-panel-inner {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: #ddd var(--bg-base);
}

.events-panel-inner::-webkit-scrollbar { width: 4px; }
.events-panel-inner::-webkit-scrollbar-track { background: var(--bg-base); }
.events-panel-inner::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* --- Events Tabs --- */
.events-tabs {
  display: flex;
  gap: 0;
  padding: 0.75rem 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: var(--bg-base);
}

.events-tab {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0.5rem 1rem 0.65rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
  bottom: -1px;
}

.events-tab:hover {
  color: var(--text-secondary);
}

.events-tab.active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--text-primary);
}

.events-tab .tab-count {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: 0.3rem;
}

.events-tab.active .tab-count {
  color: var(--text-secondary);
}

/* Section headers — hidden now that we use tabs */
.events-section-header { display: none; }

.events-empty {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --- Event Card (Lu.ma style) --- */
.event-card {
  display: flex;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.event-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.event-card.past {
  opacity: 0.6;
  background: var(--bg-muted);
  box-shadow: none;
}

.event-card.past:hover {
  opacity: 0.8;
  box-shadow: var(--shadow-sm);
}

/* Card date block (left side) */
.card-left {
  flex-shrink: 0;
}

.card-date {
  width: 52px;
  text-align: center;
  padding: 0.35rem 0;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.card-date-month {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-confirmed);
  line-height: 1;
  margin-bottom: 0.15rem;
}

.card-date-day {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.card-date-weekday {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

.card-date-tbd .card-date-month {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
}

/* Confirmed events get a green date accent */
.event-card.confirmed .card-date {
  background: var(--color-confirmed-faint);
}

.event-card.detected .card-date {
  background: var(--color-detected-faint);
}

.event-card.detected .card-date-month {
  color: var(--color-detected);
}

.event-card.rumored .card-date-month {
  color: var(--color-rumored);
}

.event-card.past .card-date-month {
  color: var(--text-dim);
}

/* Card body */
.card-body {
  flex: 1;
  min-width: 0;
}

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

.card-location {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Status pill */
.card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.card-status-pill.confirmed { background: var(--color-confirmed-faint); color: var(--color-confirmed); }
.card-status-pill.confirmed .status-dot { background: var(--color-confirmed); }
.card-status-pill.detected { background: var(--color-detected-faint); color: var(--color-detected); }
.card-status-pill.detected .status-dot { background: var(--color-detected); }
.card-status-pill.rumored { background: var(--color-rumored-faint); color: var(--color-rumored); }
.card-status-pill.rumored .status-dot { background: var(--color-rumored); }
.card-status-pill.past { background: rgba(0, 0, 0, 0.04); color: var(--text-dim); }
.card-status-pill.past .status-dot { background: var(--text-dim); }
.card-status-pill.user-going { background: rgba(0, 122, 255, 0.1); color: #007aff; }
.card-status-pill.user-going .status-dot { background: #007aff; }

.card-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.card-activity-pill {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.card-rsvp-count {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-confirmed);
}

.card-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-confirmed);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.card-cta:hover { opacity: 0.7; }

/* --- Capacity Progress Bar (event cards) --- */
.capacity-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.capacity-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-muted);
  border-radius: 2px;
  overflow: hidden;
}

.capacity-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.capacity-fill.cap-open { background: var(--color-confirmed); }
.capacity-fill.cap-warm { background: var(--color-detected); }
.capacity-fill.cap-hot { background: #e06040; }
.capacity-fill.cap-full { background: var(--red-alert); }

.capacity-label {
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}

.capacity-label.cap-open { color: var(--color-confirmed); }
.capacity-label.cap-warm { color: var(--color-detected); }
.capacity-label.cap-hot { color: #e06040; }
.capacity-label.cap-full { color: var(--red-alert); }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  backdrop-filter: blur(6px);
}

.modal-overlay.visible { opacity: 1; visibility: visible; }

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  max-width: 480px;
  width: 92%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

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

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}
.modal-header-row .modal-title {
  margin-bottom: 0;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Lookup code button in modal header */
.lookup-code-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-confirmed);
  background: transparent;
  color: var(--color-confirmed);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  margin-right: 50px;
}
.lookup-code-btn:hover {
  background: var(--color-confirmed);
  color: #fff;
}

/* Lookup code card (shown in chat) */
.lookup-code-card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: center;
}
.lookup-code-value {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-confirmed);
  margin-bottom: 0.35rem;
}
.lookup-code-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Lookup code inline (Phase 2) */
.lookup-code-inline {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.4rem 0;
  margin-bottom: 0.5rem;
}
.lookup-code-inline strong {
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* Lookup form */
.lookup-form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  text-align: center;
}
.lookup-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.lookup-form-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}
.lookup-form-fields {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.lookup-input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  width: 140px;
  text-align: center;
}
.lookup-input:focus {
  outline: none;
  border-color: var(--color-confirmed);
}
.lookup-input-code {
  width: 70px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.lookup-code-separator {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 300;
}
.lookup-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.chat-btn-cancel {
  background: var(--bg-muted) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
}
.chat-btn-cancel:hover {
  color: var(--text-primary) !important;
}
.lookup-error {
  font-size: 0.8rem;
  color: #d9534f;
  margin-top: 0.25rem;
}

/* Modal-specific elements */
.modal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.85rem;
}

.modal-status-pill .status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.modal-status-pill.confirmed { background: var(--color-confirmed-faint); color: var(--color-confirmed); }
.modal-status-pill.confirmed .status-dot { background: var(--color-confirmed); }
.modal-status-pill.detected { background: var(--color-detected-faint); color: var(--color-detected); }
.modal-status-pill.detected .status-dot { background: var(--color-detected); }
.modal-status-pill.rumored { background: var(--color-rumored-faint); color: var(--color-rumored); }
.modal-status-pill.rumored .status-dot { background: var(--color-rumored); }
.modal-status-pill.past { background: var(--bg-muted); color: var(--text-dim); }
.modal-status-pill.past .status-dot { background: var(--text-dim); }

.modal-description {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.modal-signal-msg {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.modal-date {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.modal-map-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.modal-map-hint.waitlist-hint { color: var(--color-detected); }

.modal-capacity {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.capacity-full {
  color: var(--red-alert);
  font-weight: 700;
}

.modal-next-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.75rem 0;
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.75rem;
}

.modal-action-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  background: var(--color-confirmed);
  border: none;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}

.modal-action-btn:hover { filter: brightness(1.1); box-shadow: 0 2px 8px var(--color-confirmed-glow); }

.modal-venue-details {
  font-size: 0.82rem;
  line-height: 1.8;
}

.modal-venue-details .venue-field { color: var(--text-dim); }
.modal-venue-details .venue-field span { color: var(--text-primary); }

/* --- Phase badges --- */
.phase-badges {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: var(--color-confirmed-faint);
  color: var(--color-confirmed);
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
}

.difficulty-badge.diff-easy { background: rgba(43, 168, 120, 0.08); color: var(--color-confirmed); }
.difficulty-badge.diff-moderate { background: var(--color-detected-faint); color: var(--color-detected); }
.difficulty-badge.diff-challenging { background: rgba(224, 64, 64, 0.06); color: var(--red-alert); }

/* --- Phase map --- */
.phase-map-container {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.5rem;
  background: var(--bg-muted);
  touch-action: none;
}

.phase-map-faded { opacity: 0.6; }

.phase-map-container .leaflet-tile {
  filter: saturate(0.7) brightness(1.05) sepia(0.08);
}

/* Custom pin marker */
.hush-map-pin { background: none !important; border: none !important; }

.hush-pin-inner {
  width: 16px; height: 16px;
  background: var(--color-confirmed);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(43, 168, 120, 0.4), 0 0 0 2px var(--color-confirmed);
}

.hush-popup .leaflet-popup-content-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-primary);
}

.hush-popup .leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

/* --- RSVP Section --- */
.modal-rsvp { margin-top: 0.5rem; }

.rsvp-prompt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.rsvp-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rsvp-buttons.hidden { display: none; }

.rsvp-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.6rem 0.4rem;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
  text-align: center;
}

.rsvp-btn:hover {
  border-color: var(--color-confirmed);
  color: var(--color-confirmed);
}

.rsvp-btn.selected {
  color: white;
  border-color: transparent;
}

.rsvp-yes.selected {
  background: var(--color-confirmed);
  box-shadow: 0 2px 8px var(--color-confirmed-glow);
}

.rsvp-maybe.selected {
  background: var(--color-detected);
  box-shadow: 0 2px 8px var(--color-detected-glow);
}

.rsvp-no.selected { background: var(--color-past); }

.rsvp-btn.rsvp-waitlist { border-color: var(--color-detected); color: var(--color-detected); }
.rsvp-btn.rsvp-waitlist.selected { background: var(--color-detected); color: white; border-color: transparent; }

/* RSVP action links */
.rsvp-action-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.rsvp-action-links.phase-action-links-center { justify-content: center; }

.rsvp-change-link,
.rsvp-clear-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.rsvp-change-link:hover { color: var(--color-detected); }
.rsvp-clear-link:hover { color: var(--red-alert); }
.rsvp-change-link.hidden { display: none; }

.rsvp-confirmed-msg {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.rsvp-confirmed-msg strong { color: var(--color-confirmed); }

/* Confirmation card */
.rsvp-confirmation-card {
  background: var(--color-confirmed-faint);
  border: 1px solid rgba(43, 168, 120, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.rsvp-confirmation-emoji { font-size: 1.5rem; margin-bottom: 0.3rem; line-height: 1; }
.rsvp-confirmation-heading { font-size: 1rem; font-weight: 700; color: var(--color-confirmed); margin-bottom: 0.2rem; }
.rsvp-confirmation-sub { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

/* Share row */
.rsvp-share-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}

.rsvp-share-row .share-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.rsvp-share-btn {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-confirmed);
  background: white;
  border: 1px solid rgba(43, 168, 120, 0.2);
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.rsvp-share-btn:hover { background: var(--color-confirmed); color: white; }
.rsvp-share-btn.copied { background: var(--color-confirmed); color: white; }

/* Revealed details */
.phase-revealed-details {
  padding: 0.75rem 0;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.reveal-label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.reveal-value { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; color: var(--text-primary); margin-bottom: 0.6rem; word-break: break-all; }

/* Decline message */
.phase-decline-msg {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem 0.5rem;
  line-height: 1.6;
}

/* Host IG row (Phase 2 revealed view) */
.host-ig-row {
  margin-bottom: 0.75rem;
}

/* host-ig-link kept for backward compat, now uses ig button */
.host-ig-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gold);
  text-decoration: none;
  transition: opacity 0.2s;
}

.host-ig-link:hover { opacity: 0.7; }

/* --- Chat-Style RSVP UI --- */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.5rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.chat-container::-webkit-scrollbar { width: 3px; }
.chat-container::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.chat-bubble {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 18px;
  font-size: 0.84rem;
  line-height: 1.55;
  animation: chatFadeIn 0.3s ease;
}

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

/* Bot messages — left side, light gray */
.chat-bubble.chat-bot {
  align-self: flex-start;
  background: #e9e9eb;
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

/* User messages — right side, blue */
.chat-bubble.chat-user {
  align-self: flex-end;
  background: #007aff;
  color: white;
  border-bottom-right-radius: 4px;
}

/* Card messages (maps, location details) — left side, white with border */
.chat-bubble.chat-card {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  max-width: 95%;
  width: 100%;
  flex-shrink: 0;
  animation: none;
}

.chat-bubble-text { word-break: break-word; }

/* Date in intro — black, larger */
.chat-date {
  display: block;
  font-size: 0.95rem;
  color: #000;
  font-weight: 700;
  margin-top: 0.35rem;
}

.chat-time-frame {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.chat-going {
  font-size: 0.78rem;
  color: var(--color-confirmed);
  font-weight: 600;
}

/* Action buttons — aligned right (user side) */
.chat-bubble.chat-actions {
  align-self: flex-end;
  background: none;
  padding: 0.4rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.chat-action-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.chat-action-btn:hover {
  border-color: var(--color-confirmed);
  color: var(--color-confirmed);
}

.chat-btn-yes {
  border-color: var(--color-confirmed);
  color: var(--color-confirmed);
}
.chat-btn-yes:hover {
  background: var(--color-confirmed);
  color: white;
}

.chat-btn-maybe {
  border-color: var(--color-detected);
  color: var(--color-detected);
}
.chat-btn-maybe:hover {
  background: var(--color-detected);
  color: white;
}

.chat-btn-no {
  border-color: var(--text-dim);
  color: var(--text-dim);
}
.chat-btn-no:hover {
  background: var(--text-dim);
  color: white;
}

/* Chat input row — aligned right */
.chat-input-row {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem 0;
  animation: chatFadeIn 0.3s ease;
  width: 100%;
}

/* Copy location link in reveal card */
.chat-copy-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-confirmed);
  background: none;
  border: 1px solid rgba(43, 168, 120, 0.25);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  margin: 0.4rem 0.75rem 0.6rem;
}
.chat-copy-location:hover {
  background: var(--color-confirmed);
  color: white;
}
.chat-copy-location.copied {
  background: var(--color-confirmed);
  color: white;
}

.chat-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}

.chat-input:focus {
  border-color: var(--color-confirmed);
  box-shadow: 0 0 0 3px var(--color-confirmed-faint);
}

.chat-send-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-confirmed);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover { filter: brightness(1.1); }

/* Chat map preview (before reveal) */
.chat-map-preview {
  width: 100%;
  height: 260px;
  min-height: 260px;
  position: relative;
  background: var(--bg-muted);
}

.chat-map-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.4rem 0.75rem;
  font-style: italic;
}

/* Chat map reveal (after RSVP) */
.chat-map-reveal {
  width: 100%;
  height: 220px;
  min-height: 220px;
  position: relative;
  background: var(--bg-muted);
}

/* Chat location card content */
.chat-location-card {
  padding: 0.75rem;
}

/* Instagram gradient button */
.chat-ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  margin-top: 0.4rem;
  border-radius: 8px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.chat-ig-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.chat-ig-btn .ig-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 5px;
  font-size: 0;
  position: relative;
}

.chat-ig-btn .ig-icon::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  position: absolute;
}

.chat-ig-btn .ig-icon::after {
  content: '';
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 2px;
}

/* Chat share/change rows */
.chat-share-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.chat-share-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-confirmed);
  background: white;
  border: 1px solid rgba(43, 168, 120, 0.2);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.chat-share-btn:hover { background: var(--color-confirmed); color: white; }
.chat-share-btn.copied { background: var(--color-confirmed); color: white; }

.chat-change-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.chat-change-link,
.chat-clear-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.chat-change-link:hover { color: var(--color-detected); }
.chat-clear-link:hover { color: var(--red-alert); }

/* Chat reveal label */
.chat-reveal-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-confirmed);
  margin-bottom: 0.4rem;
  padding: 0.6rem 0.75rem 0;
  letter-spacing: 0.02em;
}

/* Chat location details in reveal card */
.chat-location-details {
  padding: 0.5rem 0.75rem;
}
.chat-detail-row {
  font-size: 0.78rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.5;
}
.chat-detail-row strong {
  color: var(--text-secondary);
}

/* Post-RSVP description in reveal card */
.chat-post-rsvp-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.4rem;
}

/* Chat contact card */
.chat-contact-card {
  padding: 0.6rem;
}
.chat-contact-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.chat-contact-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-confirmed);
  text-decoration: none;
}
.chat-contact-link:hover { text-decoration: underline; }

/* Done button styling — distinct CTA, not a chat bubble */
.chat-btn-done {
  background: var(--color-confirmed) !important;
  color: white !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 0.75rem 2rem !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(43, 168, 120, 0.35) !important;
  width: 100%;
  text-align: center;
  letter-spacing: 0.02em;
}
.chat-btn-done:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(43, 168, 120, 0.45);
  transform: translateY(-1px);
}

/* --- Nomadic Host Cards --- */
/* --- Host Profile Grid Cards --- */
.host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.host-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.host-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.host-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  overflow: hidden;
  flex-shrink: 0;
}

.host-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.host-avatar-initials {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

.host-card-info { width: 100%; }

.host-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.host-card-location {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.host-card-events {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-confirmed);
}

/* --- Host Profile Sidebar --- */
.host-profile-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-base);
  z-index: 20;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}
.host-profile-panel.open { transform: translateX(0); }

.host-profile-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.host-profile-back {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.host-profile-back:hover { color: var(--text-primary); }

.host-profile-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.host-profile-avatar {
  width: 80px;
  height: 80px;
  min-height: 80px;
  min-width: 80px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.host-profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.host-profile-initials { font-size: 1.6rem; font-weight: 700; color: white; }

.host-profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.host-profile-location {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.host-profile-vibe {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-align: center;
}

.host-profile-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 1rem;
  max-width: 280px;
}

.host-profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  justify-content: center;
}

.host-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.host-stat-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.host-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.host-profile-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-bottom: 0;
}
.host-profile-ig:hover { color: var(--text-primary); border-color: var(--text-dim); }

.host-profile-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.host-profile-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}
.host-profile-share:hover { color: var(--text-primary); border-color: var(--text-dim); }

.host-profile-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.host-profile-events {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.host-profile-event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.host-profile-event-card:hover { border-color: var(--color-gold); }

.hpe-left { display: flex; align-items: center; gap: 0.5rem; }
.hpe-date { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); }
.hpe-city { font-size: 0.75rem; color: var(--text-secondary); }

/* Host Profile Banner */
.host-profile-banner {
  width: calc(100% + 2.5rem);
  margin: -1.5rem -1.25rem 1rem;
  height: 160px;
  overflow: hidden;
  border-radius: 0;
  flex-shrink: 0;
}
.host-profile-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Past event cards get slightly muted styling */
.host-profile-event-card[data-event-id] .card-status-pill.past {
  opacity: 0.6;
}

/* Host Profile Editor Form */
.host-profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
}
.hpf-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hpf-row label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hpf-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}
.hpf-row input[type="text"],
.hpf-row input[type="number"],
.hpf-row textarea {
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
}
.hpf-row input:focus,
.hpf-row textarea:focus {
  outline: none;
  border-color: var(--color-confirmed);
  box-shadow: 0 0 0 2px var(--color-confirmed-faint);
}
.hpf-row input[type="color"] {
  width: 40px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
}
.hpf-row-half {
  flex-direction: row;
  gap: 0.5rem;
}
.hpf-row-half > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hpf-upload-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hpf-file-input {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}
.hpf-file-input::file-selector-button {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 0.5rem;
}
.hpf-file-input::file-selector-button:hover {
  background: var(--bg-base);
}
.hpf-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-base);
}
.hpf-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hpf-preview-wide {
  width: 80px;
  height: 48px;
  border-radius: var(--radius-sm);
}
.hpf-preview-placeholder {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
}
.hpf-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.hpf-save-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-confirmed);
  color: white;
  cursor: pointer;
  transition: filter 0.2s;
}
.hpf-save-btn:hover { filter: brightness(1.1); }

.rsvp-messages-form { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.rsvp-msg-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.hpf-cancel-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.hpf-cancel-btn:hover { border-color: var(--text-dim); color: var(--text-primary); }

.hci-edit-btn {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-confirmed);
  border-radius: 3px;
  background: transparent;
  color: var(--color-confirmed);
  cursor: pointer;
  transition: all 0.15s;
}
.hci-edit-btn:hover {
  background: var(--color-confirmed);
  color: white;
}

/* Become a Host CTA */
.become-host-cta {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 0.5rem;
  border: 2px dashed var(--color-gold);
  border-radius: var(--radius-md);
  background: var(--color-gold-faint);
}

.become-host-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.become-host-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gold);
  text-decoration: none;
  transition: opacity 0.2s;
}

.become-host-btn:hover { opacity: 0.7; }

/* --- Host Login Panel --- */
.host-login-panel {
  position: absolute;
  top: 55px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: none;
  padding: 1rem;
  z-index: 50;
  display: none;
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.host-login-panel.visible { display: block; }

.host-login-panel label {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.4rem;
}

.host-login-panel input {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
  display: block;
  margin-bottom: 0.4rem;
}

.host-login-panel input:focus { border-color: var(--color-confirmed); box-shadow: 0 0 0 3px var(--color-confirmed-faint); }

.host-login-panel .login-error {
  font-size: 0.72rem;
  color: var(--red-alert);
  margin-top: 0.3rem;
  display: none;
}

.host-login-panel .login-error.visible { display: block; }

.host-login-btn-full {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-confirmed);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
}
.host-login-btn-full:hover {
  opacity: 0.85;
}

/* --- Admin Panel --- */
.admin-panel {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg-base);
  z-index: 1500;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.admin-panel.visible { display: flex; }

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: var(--bg-card);
}

.admin-panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

.admin-role-badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-role-badge.role-admin { background: var(--color-confirmed-faint); color: var(--color-confirmed); }
.admin-role-badge.role-host { background: var(--color-detected-faint); color: var(--color-detected); }

.admin-header-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.admin-close-btn,
.admin-logout-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}

.admin-close-btn:hover { color: var(--text-primary); border-color: var(--text-dim); }

.admin-logout-btn {
  color: var(--red-alert);
  border-color: rgba(255, 59, 48, 0.3);
}
.admin-logout-btn:hover {
  border-color: var(--red-alert);
  background: rgba(255, 59, 48, 0.08);
}

.admin-panel-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* Event list (left side) */
.event-list-section {
  flex: 0 0 40%;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  min-height: 0;
}
.event-list-section h3 { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; }

/* Event form (right side) */
.event-form-section {
  flex: 1;
  padding: 0;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  min-height: 0;
}
/* Old edit form removed — all editing now happens in the dashboard */
.event-form-section.form-visible {
  display: none;
}

.event-form-section h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem 0;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.event-form-inner { flex: 1; overflow-y: auto; padding: 0 1.25rem; }

.form-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.form-group { display: flex; flex-direction: column; flex: 1; }

.form-group label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.8rem;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.45rem 0.6rem;
  outline: none;
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-confirmed);
  box-shadow: 0 0 0 3px var(--color-confirmed-faint);
}

.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 50px; }

/* Multi-select Activity Type */
.multi-select-wrap {
  background: var(--bg-muted);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  transition: border-color 0.2s;
}
.multi-select-wrap:focus-within {
  border-color: var(--color-confirmed);
  box-shadow: 0 0 0 3px var(--color-confirmed-faint);
}
.multi-select-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.ms-option {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 0 !important;
}
.ms-option:hover { background: var(--bg-hover); }
.ms-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--color-confirmed);
  margin: 0;
  cursor: pointer;
}
.ms-option input[type="checkbox"]:checked + span,
.ms-option:has(input:checked) {
  color: var(--text-primary);
  font-weight: 600 !important;
}

/* Contact detail fields show/hide */
.contact-detail-fields { transition: all 0.2s; }

/* Pin picker help text */
.pin-picker-help {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--color-confirmed-faint);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-confirmed);
}
.pin-picker-help strong { color: var(--text-secondary); }

.pin-picker-instructions {
  font-weight: 600;
  color: var(--text-primary);
}

.form-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

.form-submit-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  background: var(--color-confirmed);
  border: none;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
  flex: 1;
}

.form-submit-btn:hover { filter: brightness(1.1); box-shadow: 0 4px 12px var(--color-confirmed-glow); }

.form-cancel-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.form-cancel-btn:hover { color: var(--red-alert); border-color: var(--red-alert); }

/* Collapsible form sections */
.form-section {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border-subtle);
}

.form-section:last-child { margin-bottom: 0; }

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0.7rem 0;
  cursor: pointer;
  transition: color 0.2s;
}

.form-section-header:hover { color: var(--color-confirmed); }

.form-section-header .section-icon { font-size: 0.55rem; color: var(--text-dim); }

.form-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.2s ease;
  padding: 0;
}

.form-section-body.open {
  max-height: 2000px;
  overflow: visible;
  padding-bottom: 0.5rem;
}

.form-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  font-style: italic;
}
.form-label-hint {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
}

.geocode-status { font-family: var(--font-mono); font-size: 0.68rem; min-height: 1.2em; }
.geocode-status.loading { color: var(--text-dim); }
.geocode-status.success { color: var(--color-confirmed); }
.geocode-status.error { color: var(--color-detected); }

/* Pin picker */
.pin-picker-wrapper { margin-bottom: 0.5rem; }
.pin-picker-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem; }
.pin-picker-label span { font-size: 0.68rem; color: var(--text-dim); }

.pin-picker-toggle-btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-confirmed);
  background: var(--color-confirmed-faint);
  border: 1px solid rgba(43, 168, 120, 0.2);
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.pin-picker-toggle-btn:hover { background: var(--color-confirmed); color: white; }

.pin-picker-map-container {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.35rem;
  background: var(--bg-muted);
  cursor: crosshair;
}

.pin-picker-coords { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); min-height: 1.2em; }
.pin-picker-coords.has-coords { color: var(--color-confirmed); }
.pin-picker-coords.has-error { color: var(--color-detected); }

.pin-picker-link-row { display: flex; gap: 0.35rem; margin-top: 0.35rem; }

.pin-picker-link-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.35rem 0.5rem;
  outline: none;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.pin-picker-link-input:focus { border-color: var(--color-confirmed); box-shadow: 0 0 0 3px var(--color-confirmed-faint); }

.pin-picker-parse-btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.pin-picker-parse-btn:hover { border-color: var(--color-confirmed); color: var(--color-confirmed); }

/* (venue-fields removed — address/time now in Location section) */

/* Read-only form fields */
.form-group input[readonly] { background: var(--bg-muted); color: var(--text-dim); cursor: not-allowed; border-style: dashed; }

/* Status mode toggle */
.status-mode-toggle {
  display: flex;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.status-mode-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  border: none;
  background: var(--bg-muted);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.status-mode-btn + .status-mode-btn { border-left: 1px solid var(--border-subtle); }
.status-mode-btn.active { background: var(--color-confirmed); color: white; }

.auto-status-display {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
  background: var(--bg-muted);
  color: var(--text-dim);
}

.auto-status-display.status-rumored { color: var(--color-rumored); border-color: var(--color-rumored); background: var(--color-rumored-faint); }
.auto-status-display.status-detected { color: var(--color-detected); border-color: var(--color-detected); background: var(--color-detected-faint); }
.auto-status-display.status-confirmed { color: var(--color-confirmed); border-color: var(--color-confirmed); background: var(--color-confirmed-faint); }
.auto-status-display.status-past { color: var(--color-past); border-color: var(--color-past); }

/* (event-list-section moved to admin-panel-body block above) */

.signals-tab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.signals-tab-header h3 { margin-bottom: 0; }

.new-signal-btn {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  background: var(--color-confirmed);
  border: none;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.new-signal-btn:hover { filter: brightness(1.1); }

.event-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: var(--bg-card);
}

.event-list-item:hover { box-shadow: var(--shadow-sm); }

.event-list-item .eli-info { flex: 1; }
.event-list-item .eli-city { color: var(--text-primary); font-weight: 500; }
.event-list-item .eli-status { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.event-list-item .eli-status.rumored { color: var(--color-rumored); }
.event-list-item .eli-status.detected { color: var(--color-detected); }
.event-list-item .eli-status.confirmed { color: var(--color-confirmed); }
.event-list-item .eli-status.past { color: var(--text-dim); }

.event-list-item .eli-actions { display: flex; gap: 0.3rem; }

.eli-edit-btn, .eli-delete-btn {
  font-family: var(--font-body);
  font-size: 0.62rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: transparent;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.eli-edit-btn { color: var(--color-detected); }
.eli-edit-btn:hover { border-color: var(--color-detected); background: var(--color-detected-faint); }
.eli-delete-btn { color: var(--red-alert); }
.eli-delete-btn:hover { border-color: var(--red-alert); background: rgba(224, 64, 64, 0.06); }

.eli-rsvp { font-size: 0.62rem; color: var(--text-dim); margin-top: 0.1rem; }

.draft-badge {
  display: inline-block;
  background: var(--text-dim);
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-right: 4px;
}

.eli-dash-btn, .eli-resume-btn {
  font-family: var(--font-body);
  font-size: 0.62rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: transparent;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.eli-dash-btn { color: var(--color-confirmed); }
.eli-dash-btn:hover { border-color: var(--color-confirmed); background: var(--color-confirmed-faint); }
.eli-resume-btn { color: var(--color-gold); }
.eli-resume-btn:hover { border-color: var(--color-gold); background: var(--color-gold-faint); }

.eli-rsvp-btn {
  font-family: var(--font-body);
  font-size: 0.62rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border: 1px solid var(--color-confirmed);
  background: var(--color-confirmed-faint);
  color: var(--color-confirmed);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.eli-rsvp-btn:hover { background: var(--color-confirmed); color: white; }

/* Segment controller */
.segment-controller {
  display: flex;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.segment-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  border: none;
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.segment-btn + .segment-btn { border-left: 1px solid var(--border-subtle); }
.segment-btn.active { background: var(--color-confirmed); color: white; }
.segment-btn:hover:not(.active) { background: var(--bg-muted); color: var(--text-secondary); }

/* Host code list */
.host-code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.hci-info { flex: 1; min-width: 0; }
.hci-label { color: var(--text-primary); font-weight: 500; margin-bottom: 0.1rem; }
.hci-code { font-family: var(--font-mono); font-size: 0.68rem; color: var(--color-confirmed); word-break: break-all; }
.hci-events { font-size: 0.62rem; color: var(--text-dim); margin-top: 0.1rem; }
.hci-actions { display: flex; gap: 0.3rem; margin-left: 0.5rem; flex-shrink: 0; }

.hci-copy-btn, .hci-delete-btn {
  font-family: var(--font-body);
  font-size: 0.62rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: transparent;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.hci-copy-btn { color: var(--color-confirmed); }
.hci-copy-btn:hover { border-color: var(--color-confirmed); background: var(--color-confirmed-faint); }
.hci-delete-btn { color: var(--red-alert); }
.hci-delete-btn:hover { border-color: var(--red-alert); background: rgba(224, 64, 64, 0.06); }

.add-host-code-form { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }

.add-host-code-form input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem 0.5rem;
  outline: none;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.add-host-code-form input:focus { border-color: var(--color-confirmed); box-shadow: 0 0 0 3px var(--color-confirmed-faint); }

.add-host-code-form button {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  background: var(--color-confirmed);
  border: none;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s;
}

.add-host-code-form button:hover { filter: brightness(1.1); }

/* RSVP Detail View */
.rsvp-detail-header { margin-bottom: 1rem; }
.rsvp-detail-city { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.3rem; }
.rsvp-detail-capacity { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.3rem; }

.rsvp-detail-counts {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.rdc-yes { color: var(--color-confirmed); }
.rdc-maybe { color: var(--color-detected); }
.rdc-no { color: var(--color-past); }
.rdc-waitlist { color: var(--color-detected); }

.rsvp-detail-empty { font-size: 0.78rem; color: var(--text-dim); padding: 1rem 0; }

.rsvp-detail-list { max-height: 300px; overflow-y: auto; }

.rsvp-detail-row {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  gap: 0.75rem;
}

.rdl-attendance { flex: 0 0 55px; font-weight: 600; font-size: 0.65rem; text-transform: uppercase; }
.rsvp-att-yes .rdl-attendance { color: var(--color-confirmed); }
.rsvp-att-maybe .rdl-attendance { color: var(--color-detected); }
.rsvp-att-no .rdl-attendance { color: var(--color-past); }
.rsvp-att-waitlist .rdl-attendance { color: var(--color-detected); }

.rdl-info { flex: 1; min-width: 0; }
.rdl-name { color: var(--text-primary); font-weight: 500; margin-right: 0.5rem; }
.rdl-email { color: var(--text-dim); font-size: 0.68rem; margin-right: 0.4rem; }
.rdl-ig { color: var(--color-detected); font-size: 0.68rem; }
.rdl-date { flex: 0 0 auto; color: var(--text-dim); font-size: 0.62rem; }

/* Host preview panel */
.preview-state-toggle {
  display: flex;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.preview-state-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.4rem 0.3rem;
  border: none;
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.preview-state-btn + .preview-state-btn { border-left: 1px solid var(--border-subtle); }
.preview-state-btn.active { background: var(--color-confirmed); color: white; }

.preview-container { min-height: 150px; }
.preview-empty { font-size: 0.78rem; color: var(--text-dim); text-align: center; padding: 2rem 1rem; font-style: italic; }

.preview-card { border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); overflow: hidden; }

.preview-card-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-muted);
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-modal-mock { padding: 1rem; background: var(--bg-card); }

.preview-map-placeholder {
  width: 100%;
  height: 100px;
  background: var(--bg-muted);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.preview-radius-label { font-family: var(--font-mono); font-size: 0.62rem; color: var(--color-confirmed); }

/* --- Toast --- */
.hush-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
  background: var(--color-confirmed);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--color-confirmed-glow);
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.hush-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Footer --- */
.site-footer {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  .map-panel { flex: 0 0 50%; }
  .events-panel { flex: 0 0 50%; }
}

@media (max-width: 767px) {
  .main-content { flex-direction: column; }

  .map-panel {
    flex: none;
    height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .events-panel {
    flex: 1;
    min-height: 40vh;
    border-left: none;
  }

  .header-title { font-size: 0.95rem; }
  .header-nav-btn span { display: none; }
  .header-nav-btn { padding: 0.4rem; width: 34px; height: 34px; justify-content: center; border: none; }
  .header-brand { gap: 0.6rem; }

  .admin-panel-body { flex-direction: column; }

  .event-form-section,
  .event-list-section {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .phase-map-container { height: 200px; }
  .modal-content { padding: 1.25rem; }

  .event-card { padding: 0.75rem; }
  .card-date-day { font-size: 1.1rem; }

  .chat-bubble { max-width: 92%; }
}

/* --- Dark Mode Overrides --- */
[data-theme="dark"] .chat-bubble.chat-bot { background: #2e2e2e; color: var(--text-primary); }
[data-theme="dark"] .chat-bubble.chat-user { background: #0a5fcf; }
[data-theme="dark"] .chat-bubble.chat-card { background: var(--bg-card); border-color: var(--border-subtle); }
[data-theme="dark"] .chat-date { color: var(--text-primary); }
[data-theme="dark"] .chat-action-btn { border-color: var(--border-subtle); color: var(--text-secondary); background: var(--bg-card); }
[data-theme="dark"] .chat-action-btn.chat-btn-yes { border-color: var(--color-confirmed); color: var(--color-confirmed); }
[data-theme="dark"] .chat-action-btn.chat-btn-maybe { border-color: var(--color-detected); color: var(--color-detected); }
[data-theme="dark"] .chat-input { background: var(--bg-muted); color: var(--text-primary); border-color: var(--border-subtle); }
[data-theme="dark"] .modal-content { background: var(--bg-card); }
[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, 0.7); }
[data-theme="dark"] .admin-panel { background: var(--bg-base); }
[data-theme="dark"] .admin-panel-header { background: var(--bg-card); border-color: var(--border-subtle); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: var(--bg-muted); color: var(--text-primary); border-color: var(--border-subtle);
}
[data-theme="dark"] .host-login-panel { background: var(--bg-card); border-color: var(--border-subtle); }
[data-theme="dark"] .events-tab { color: var(--text-dim); }
[data-theme="dark"] .events-tab.active { color: var(--text-primary); border-color: var(--text-primary); }
[data-theme="dark"] .leaflet-control-layers { background: var(--bg-card); color: var(--text-primary); }
[data-theme="dark"] .leaflet-control-zoom a { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-subtle); }

/* --- Loading Indicator --- */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-light);
  border-top-color: var(--color-confirmed);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Event Password Cards --- */
.event-password-card {
  background: var(--bg-card);
  border: 2px solid var(--color-confirmed);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  margin: 0.75rem 0;
}
.event-password-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.event-password-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.event-password-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.chat-reveal-label {
  font-size: 1.1rem;
}
.chat-post-rsvp-desc {
  padding: 0.75rem;
}

/* --- Wizard Password Card --- */
.wizard-password-card {
  background: var(--bg-card);
  border: 2px solid var(--color-confirmed);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  margin: 1rem 0;
}
.wizard-password-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.wizard-password-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.wizard-password-note {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.wizard-password-select {
  margin-top: 0.75rem;
}

/* --- Admin Event Passwords --- */
.admin-password-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.admin-password-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
}
.admin-password-tag .pw-remove {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-left: 0.15rem;
  transition: color 0.15s;
}
.admin-password-tag .pw-remove:hover {
  color: var(--red-alert);
}
.admin-password-add-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.admin-password-add-row input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
}
.admin-password-add-row button {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: none;
  background: var(--color-confirmed);
  color: #fff;
  cursor: pointer;
}

/* --- Password Input in Chat --- */
.chat-password-input-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.chat-password-input-row input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
}
.chat-password-error {
  color: var(--red-alert);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

/* --- Dashboard Share Links --- */
.dash-link-row {
  margin-bottom: 0.25rem;
}
.dash-link-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.dash-link-value {
  font-size: 0.7rem;
  color: var(--text-dim);
  word-break: break-all;
  margin-bottom: 0.4rem;
  background: var(--bg-muted);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}
.dash-link-password {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.dash-link-copy-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}
.dash-link-copy-btn:hover {
  background: var(--bg-muted);
}

/* --- Chat Copy Buttons Row --- */
.chat-copy-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* --- Event List Link Button --- */
.eli-link-btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-confirmed);
  border-radius: 4px;
  background: transparent;
  color: var(--color-confirmed);
  cursor: pointer;
  transition: all 0.15s;
}
.eli-link-btn:hover {
  background: var(--color-confirmed);
  color: #fff;
}
.eli-link-copy-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}
.eli-link-copy-btn:hover {
  background: var(--bg-muted);
}

/* --- Utility --- */
.hidden { display: none !important; }
