/* =============================================================================
   SDLust — Events Styles
   Extends main.css — include after it.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   BROWSE PAGE
   ----------------------------------------------------------------------------- */
.events-layout { padding-top: var(--space-xl); padding-bottom: var(--space-2xl); }

.events-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.events-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-plum-border);
  padding-bottom: var(--space-md);
}

.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.filter-tab:hover { color: var(--color-text-primary); text-decoration: none; }
.filter-tab.active { color: var(--color-rose-light); border-bottom-color: var(--color-rose); }

/* Event list (browse) */
.event-list { display: flex; flex-direction: column; gap: var(--space-md); }

.event-card {
  display: flex;
  align-items: stretch;
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.event-card:hover {
  border-color: var(--color-rose);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}
.event-card--past { opacity: 0.7; }

.event-card-cover {
  width: 130px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-plum-light), #2e0a38);
  background-size: cover;
  background-position: center;
  position: relative;
}

.event-card-body { padding: var(--space-md) var(--space-lg); flex: 1; display: flex; flex-direction: column; gap: 4px; }

.event-card-meta-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.event-date   { font-size: 12px; color: var(--color-rose-light); font-weight: 600; }
.event-clique { font-size: 11px; color: var(--color-gold-light); background: var(--color-gold-subtle); padding: 2px 7px; border-radius: var(--radius-pill); }

.event-card-title { font-size: 17px; font-weight: 600; color: var(--color-text-primary); line-height: 1.3; }

.event-card-meta-bottom {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: 2px;
}
.event-loc   { font-size: 12px; color: var(--color-text-muted); }
.event-going { font-size: 12px; color: var(--color-text-muted); }
.event-age   {
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-plum-light);
  border: 1px solid var(--color-plum-border);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.event-card-host {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* My-status badge on event card */
.event-my-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}
.event-status-going, .event-status-approved { background: rgba(46,194,126,0.12); color: var(--color-success); }
.event-status-maybe    { background: rgba(212,160,23,0.12); color: var(--color-gold-light); }
.event-status-waitlist { background: rgba(91,156,246,0.12); color: var(--color-info); }
.event-status-invited  { background: rgba(232,66,122,0.08); color: var(--color-rose-light); }

/* Urgency badges on browse cards */
.event-urgency {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  pointer-events: none;
}
.event-urgency--spots { background: rgba(232,66,122,0.9); color: #fff; }
.event-urgency--today { background: rgba(212,160,23,0.9); color: #1a0a22; }
.event-urgency--soon  { background: rgba(91,156,246,0.85); color: #fff; }

/* -----------------------------------------------------------------------------
   EVENT VIEW PAGE
   ----------------------------------------------------------------------------- */
.event-cover {
  height: 280px;
  background: linear-gradient(135deg, var(--color-plum-mid) 0%, #2e0a38 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.cover-past-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(0,0,0,0.6);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  align-items: start;
}

/* Event header */
.event-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}
.event-clique-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--color-gold-light);
  background: var(--color-gold-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
  text-decoration: none;
}
.event-clique-link:hover { text-decoration: none; color: var(--color-gold-light); opacity: 0.85; }

.event-details-list { display: flex; flex-direction: column; gap: var(--space-md); margin-top: var(--space-lg); }
.event-detail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}
.detail-icon    { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; line-height: 1.4; }
.detail-secondary { display: block; font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }
.detail-link { color: var(--color-rose-light); }
.badge-full {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-error);
  background: rgba(224,72,72,0.1);
  border: 1px solid rgba(224,72,72,0.25);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}

/* Event sections */
.event-section { margin-top: var(--space-xl); padding-top: var(--space-xl); border-top: 1px solid var(--color-plum-border); }
.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.section-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--color-plum-light);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
  color: var(--color-text-muted);
  text-transform: none; letter-spacing: 0;
}
.event-description { color: var(--color-text-secondary); font-size: 15px; line-height: 1.75; }

/* Attendee table */
.attendee-table-wrap { overflow-x: auto; }
.attendee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.attendee-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-plum-border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.attendee-table td { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid rgba(82,40,95,0.3); vertical-align: middle; }
.attendee-table tr:last-child td { border-bottom: none; }

.attendee-name-link {
  display: flex; align-items: center; gap: var(--space-sm);
  color: var(--color-text-primary); text-decoration: none;
}
.attendee-name-link:hover { color: var(--color-rose-light); }
.attendee-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.attendee-age    { font-size: 11px; color: var(--color-text-muted); }
.attendee-note   { color: var(--color-text-muted); font-size: 12px; max-width: 200px; }
.attendee-actions { display: flex; gap: 4px; }

/* RSVP badges */
.rsvp-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; }
.rsvp-going, .rsvp-approved { background: rgba(46,194,126,0.12); color: var(--color-success); }
.rsvp-maybe    { background: rgba(212,160,23,0.12); color: var(--color-gold-light); }
.rsvp-declined { background: rgba(136,135,128,0.15); color: var(--color-text-muted); }
.rsvp-waitlist { background: rgba(91,156,246,0.12); color: var(--color-info); }
.rsvp-invited  { background: rgba(232,66,122,0.08); color: var(--color-rose-light); }
.rsvp-removed  { background: rgba(224,72,72,0.1); color: var(--color-error); }

/* Guest grid (public view) */
.guest-grid { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.guest-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--color-plum-light);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: border-color var(--transition);
}
.guest-chip:hover { border-color: var(--color-rose); color: var(--color-text-primary); text-decoration: none; }
.guest-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* Invite search (layout-specific rules; shared component styles are in main.css) */
.invite-search-wrap { margin-top: var(--space-lg); }
.invite-search-row { position: relative; max-width: 360px; }
.invite-search-row .invite-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 200;
}

/* -----------------------------------------------------------------------------
   SIDEBAR: RSVP + HOST CONTROLS
   ----------------------------------------------------------------------------- */
.event-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.rsvp-card, .host-card {
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.rsvp-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: var(--space-md);
}
.rsvp-current { font-size: 13px; color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.rsvp-full-msg, .rsvp-past-msg { color: var(--color-text-muted); font-size: 14px; text-align: center; padding: var(--space-md) 0; }

.rsvp-buttons { display: flex; flex-direction: column; gap: var(--space-sm); margin-bottom: var(--space-md); }
.rsvp-btn {
  padding: 12px var(--space-md);
  background: var(--color-plum-light);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.rsvp-btn:hover { border-color: var(--color-rose); color: var(--color-text-primary); }
.rsvp-active.rsvp-going, .rsvp-active.rsvp-approved {
  background: rgba(46,194,126,0.1);
  border-color: rgba(46,194,126,0.4);
  color: var(--color-success);
}
.rsvp-active.rsvp-maybe {
  background: rgba(212,160,23,0.1);
  border-color: rgba(212,160,23,0.4);
  color: var(--color-gold-light);
}
.rsvp-active.rsvp-declined {
  background: var(--color-plum-light);
  border-color: var(--color-plum-border);
  color: var(--color-text-muted);
}

.rsvp-form { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-plum-border); }

.host-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* -----------------------------------------------------------------------------
   EVENT FORM
   ----------------------------------------------------------------------------- */
.form-section {
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-plum-border);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .event-body { grid-template-columns: 1fr; }
  .event-sidebar { position: static; order: -1; }
  .rsvp-buttons { flex-direction: row; }
  .rsvp-btn { flex: 1; }
}
@media (max-width: 640px) {
  .event-card-cover { width: 80px; }
  .event-title      { font-size: 26px; }
  .event-cover      { height: 180px; }
  .events-controls  { flex-direction: column; align-items: stretch; }
  .events-controls-right { flex-wrap: wrap; }
  .events-page-header { flex-wrap: wrap; gap: var(--space-sm); }
  .filter-tabs      { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab       { white-space: nowrap; flex-shrink: 0; }
  .search-form      { width: 100%; }
  .search-input     { flex: 1; max-width: none; }
  .form-row-2       { grid-template-columns: 1fr; }

  /* RSVP buttons: horizontal row on mobile for touch accessibility */
  .rsvp-buttons     { flex-direction: row; flex-wrap: wrap; }
  .rsvp-btn         { flex: 1; min-width: 0; font-size: 13px; padding: 10px var(--space-sm); }

  /* Attendee table: ensure horizontal scroll */
  .attendee-table-wrap { -webkit-overflow-scrolling: touch; }
}

/* =============================================================================
   CALENDAR VIEWS
   ============================================================================= */

/* Controls layout sub-sections */
.events-controls-left  { display: flex; align-items: center; }
.events-controls-right { display: flex; align-items: center; gap: var(--space-sm); }

/* View toggle (List / Month / Week) */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-md);
  padding: 3px;
  flex-shrink: 0;
}
.view-toggle-btn {
  padding: 5px 14px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.view-toggle-btn:hover { color: var(--color-text-primary); text-decoration: none; }
.view-toggle-btn.active {
  background: var(--color-plum-light);
  color: var(--color-rose-light);
  text-decoration: none;
}

/* Calendar navigation bar */
.cal-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.cal-nav-title {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}
.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  color: var(--color-text-muted);
  font-size: 18px;
  text-decoration: none;
  line-height: 1;
  transition: border-color var(--transition), color var(--transition);
}
.cal-nav-btn:hover { border-color: var(--color-rose); color: var(--color-text-primary); text-decoration: none; }
.cal-today-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--transition), color var(--transition);
}
.cal-today-btn:hover { border-color: var(--color-rose); color: var(--color-text-primary); text-decoration: none; }

/* ── Month grid ───────────────────────────────────────────────────────────── */
.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--color-plum-border);
}
.cal-dow-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-sm) 0;
}

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 110px);
  border-left: 1px solid var(--color-plum-border);
  border-top: 1px solid var(--color-plum-border);
}

.cal-day {
  border-right: 1px solid var(--color-plum-border);
  border-bottom: 1px solid var(--color-plum-border);
  padding: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.cal-day:hover { background: rgba(255,255,255,0.03); }
.cal-day--out  { opacity: 0.35; }

.cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.cal-day--today .cal-day-num {
  background: var(--color-rose);
  color: #fff;
  font-size: 12px;
}

.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.cal-event-chip {
  display: block;
  font-size: 11px;
  padding: 2px 5px;
  background: var(--color-rose);
  color: #fff;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  transition: opacity var(--transition);
}
.cal-event-chip:hover { opacity: 0.82; text-decoration: none; color: #fff; }
.cal-event-chip.cal-event-nsfw {
  background: var(--color-gold-light);
  color: #1a0a22;
}

.cal-more-btn {
  font-size: 11px;
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 1px 3px;
  cursor: pointer;
  text-align: left;
  border-radius: 3px;
  transition: color var(--transition);
  flex-shrink: 0;
}
.cal-more-btn:hover { color: var(--color-rose-light); }

/* ── Week grid ────────────────────────────────────────────────────────────── */
.cal-week-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 1px;
  background: var(--color-plum-border);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* Explicit minimum matches 7 × 120px so all columns are always reachable */
  min-width: 840px;
}

.cal-week-col {
  background: var(--color-bg-dark);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.cal-week-col--today { background: rgba(232,66,122,0.04); }

.cal-week-header {
  padding: var(--space-sm) var(--space-sm);
  border-bottom: 1px solid var(--color-plum-border);
  text-align: center;
  flex-shrink: 0;
}
.cal-week-dow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.cal-week-date {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.cal-week-col--today .cal-week-date { color: var(--color-rose-light); }

.cal-week-events {
  padding: var(--space-sm) 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cal-event-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px;
  background: rgba(232,66,122,0.1);
  border-left: 3px solid var(--color-rose);
  border-radius: 0 3px 3px 0;
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 12px;
  transition: background var(--transition);
}
.cal-event-block:hover { background: rgba(232,66,122,0.18); text-decoration: none; }
.cal-event-block.cal-event-nsfw {
  border-left-color: var(--color-gold-light);
  background: rgba(212,160,23,0.08);
}
.cal-event-time  { font-size: 11px; color: var(--color-text-muted); }
.cal-event-title { font-weight: 500; color: var(--color-text-primary); word-break: break-word; }

.cal-no-events {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-lg) 0;
}

/* ── Day popup ────────────────────────────────────────────────────────────── */
.cal-popup {
  position: absolute;
  z-index: 600;
  width: 308px;
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}
.cal-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-plum-border);
}
.cal-popup-date { font-size: 13px; font-weight: 600; color: var(--color-text-primary); }
.cal-popup-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted);
  padding: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  flex-shrink: 0;
}
.cal-popup-close:hover { color: var(--color-text-primary); }
.cal-popup-list { max-height: 320px; overflow-y: auto; }
.cal-popup-event {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(82,40,95,0.3);
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 13px;
  transition: background var(--transition);
}
.cal-popup-event:hover { background: rgba(255,255,255,0.04); text-decoration: none; }
.cal-popup-event:last-child { border-bottom: none; }
.cal-popup-time  { font-size: 11px; color: var(--color-rose-light); font-weight: 600; }
.cal-popup-title { color: var(--color-text-primary); font-weight: 500; }
.cal-popup-going { font-size: 11px; color: var(--color-text-muted); }

/* -----------------------------------------------------------------------------
   STI REQUIREMENTS — collapsed accordion in event form
   ----------------------------------------------------------------------------- */
.sti-req-details {
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.sti-req-summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--color-plum-mid);
}
.sti-req-summary::-webkit-details-marker { display: none; }
.sti-req-summary:hover { background: var(--color-plum-light); }

.sti-req-summary-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.sti-req-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: rgba(232, 66, 122, 0.12);
  color: var(--color-rose-light);
  border: 1px solid rgba(232, 66, 122, 0.3);
}

.sti-req-details .sti-chevron {
  color: var(--color-text-muted);
  font-size: 14px;
  transition: transform 0.2s ease;
  display: inline-block;
}
details.sti-req-details[open] .sti-chevron { transform: rotate(180deg); }

.sti-req-body {
  padding: var(--space-md);
  border-top: 1px solid var(--color-plum-border);
  background: var(--color-plum);
}

.sti-req-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.sti-req-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.sti-req-cat-label:hover {
  border-color: var(--color-rose);
  color: var(--color-text-primary);
}
.sti-req-cat-label--checked {
  border-color: rgba(232, 66, 122, 0.5);
  background: rgba(232, 66, 122, 0.08);
  color: var(--color-text-primary);
}

.sti-req-cat-checkbox { margin: 0; }

/* -----------------------------------------------------------------------------
   STAFF / HOST CHECK-IN PANEL
   ----------------------------------------------------------------------------- */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: var(--space-xs);
  padding: 1px 7px;
  background: var(--color-plum-light);
  border: 1px solid var(--color-plum-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  vertical-align: middle;
}

.checkin-search-wrap {
  margin-bottom: var(--space-sm);
}
.checkin-search {
  width: 100%;
  font-size: 13px;
  padding: 6px 10px;
}

.checkin-guest-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 380px;
  overflow-y: auto;
  margin: 0 calc(var(--space-lg) * -1);
  padding: 0 var(--space-lg);
}

.checkin-guest-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-plum-border);
  transition: background var(--transition);
}
.checkin-guest-row:last-child { border-bottom: none; }

.checkin-guest-row.is-checked-in { background: rgba(46,194,126,0.05); }
.checkin-guest-row.is-checked-out { opacity: 0.6; }

.checkin-guest-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkin-guest-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkin-guest-name:hover { color: var(--color-rose); }

.checkin-time {
  font-size: 11px;
  color: var(--color-success);
  font-weight: 500;
}
.checkin-time--out {
  color: var(--color-text-muted);
  font-weight: 400;
}

.checkin-ec {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkin-guest-actions {
  flex-shrink: 0;
}

/* Staff check-in panel host-card title row */
#staff-checkin-panel .host-card-title {
  display: flex;
  align-items: center;
}

/* =============================================================================
   DOOR MANAGEMENT PAGE  (/events/:id/checkin)
   ============================================================================= */

.door-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-2xl);
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.door-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.door-back-link {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-xs);
}
.door-back-link:hover { color: var(--color-text-primary); }
.door-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 4px;
}
.door-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}
.door-header-actions { display: flex; gap: var(--space-sm); align-items: flex-start; }

/* ── Stats bar ───────────────────────────────────────────────────────────── */
.door-stats {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.door-stat {
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  flex: 1;
}
.door-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-primary);
}
.door-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.door-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-plum-border);
}
.door-tab {
  padding: 10px var(--space-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition), border-color var(--transition);
}
.door-tab:hover { color: var(--color-text-primary); }
.door-tab.is-active {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-rose);
}
.door-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--color-plum-light);
  border: 1px solid var(--color-plum-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.door-tab.is-active .door-tab-badge {
  background: rgba(232,66,122,0.12);
  border-color: rgba(232,66,122,0.4);
  color: var(--color-rose);
}

/* ── Panel ───────────────────────────────────────────────────────────────── */
.door-panel { animation: door-fade 150ms ease; }
@keyframes door-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Toolbar row (search + action) ──────────────────────────────────────── */
.door-toolbar {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.door-search { flex: 1; min-width: 180px; max-width: 360px; }

/* ── Walk-in panel ───────────────────────────────────────────────────────── */
.door-walkin-panel {
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}
.door-walkin-inner { display: flex; flex-direction: column; gap: var(--space-sm); }
.door-walkin-hint { font-size: 13px; color: var(--color-text-muted); margin: 0; }
.door-search-wrap { position: relative; }

/* ── Live search results dropdown ────────────────────────────────────────── */
.door-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  list-style: none;
  padding: 4px 0;
  max-height: 260px;
  overflow-y: auto;
}
.door-result-item {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.door-result-item:hover { background: var(--color-plum-light); }
.door-result-name { font-size: 14px; font-weight: 500; color: var(--color-text-primary); }
.door-result-handle { font-size: 12px; color: var(--color-text-muted); }
.door-result-empty { padding: 10px 14px; font-size: 13px; color: var(--color-text-muted); }

.door-selected-name {
  display: block;
  margin-top: var(--space-xs);
  padding: 4px 10px;
  background: rgba(46,194,126,0.08);
  border: 1px solid rgba(46,194,126,0.3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-success);
}
.door-inline-error {
  font-size: 13px;
  color: var(--color-danger);
  margin-top: var(--space-xs);
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.door-table-wrap {
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.door-table {
  width: 100%;
  border-collapse: collapse;
}
.door-table th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  background: var(--color-plum-light);
  border-bottom: 1px solid var(--color-plum-border);
}
.door-th-actions { text-align: right; }
.door-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-plum-border); }
.door-table tbody tr:last-child td { border-bottom: none; }
.door-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.door-row--in { background: rgba(46,194,126,0.04) !important; }

/* ── Cell: guest ─────────────────────────────────────────────────────────── */
.door-cell-guest {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}
.door-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.door-avatar--placeholder,
.door-avatar--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-plum-light);
  border: 1px solid var(--color-plum-border);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.door-guest-info { display: flex; flex-direction: column; gap: 1px; }
.door-guest-name { font-size: 14px; font-weight: 500; color: var(--color-text-primary); }
.door-guest-handle { font-size: 11px; color: var(--color-text-muted); }
.door-guest-plusone { font-size: 11px; color: var(--color-text-muted); font-style: italic; }
.door-custom-label { color: var(--color-text-muted); font-style: italic; }
.door-cell-pos { font-weight: 600; color: var(--color-text-muted); font-size: 14px; }
.door-cell-notes { font-size: 13px; color: var(--color-text-muted); max-width: 180px; }
.door-cell-date { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }

/* ── Membership badge ────────────────────────────────────────────────────── */
.door-mem-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.door-mem-badge--paid   { background: rgba(212,160,23,0.12); border: 1px solid rgba(212,160,23,0.4); color: var(--color-gold-light, #d4a017); }
.door-mem-badge--free   { background: rgba(46,194,126,0.10); border: 1px solid rgba(46,194,126,0.35); color: var(--color-success); }
.door-mem-badge--none   { background: var(--color-plum-light); border: 1px solid var(--color-plum-border); color: var(--color-text-muted); }

/* ── RSVP badge ──────────────────────────────────────────────────────────── */
.door-rsvp-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.door-rsvp-badge--approved { background: rgba(46,194,126,0.10); border: 1px solid rgba(46,194,126,0.35); color: var(--color-success); }
.door-rsvp-badge--going    { background: var(--color-plum-light); border: 1px solid var(--color-plum-border); color: var(--color-text-muted); }

/* ── Check-in time ───────────────────────────────────────────────────────── */
.door-cell-ci { font-size: 13px; }
.door-ci-time { display: block; }
.door-ci-time--in   { color: var(--color-success); font-weight: 600; }
.door-ci-time--out  { color: var(--color-text-muted); }
.door-ci-time--none { color: var(--color-text-muted); }
.door-ec { display: block; font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Actions ─────────────────────────────────────────────────────────────── */
.door-cell-actions { text-align: right; }
.door-action-group { display: flex; gap: var(--space-xs); justify-content: flex-end; flex-wrap: wrap; }

/* ── Role badges ─────────────────────────────────────────────────────────── */
.door-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.door-role-badge--host        { background: rgba(232,66,122,0.12); border-color: rgba(232,66,122,0.4);  color: var(--color-rose); }
.door-role-badge--door        { background: rgba(120,80,220,0.12); border-color: rgba(120,80,220,0.4);  color: #a87dff; }
.door-role-badge--safety      { background: rgba(255,80,80,0.12);  border-color: rgba(255,80,80,0.4);   color: #ff6060; }
.door-role-badge--greeter     { background: rgba(46,194,126,0.10); border-color: rgba(46,194,126,0.35); color: var(--color-success); }
.door-role-badge--bartender   { background: rgba(212,160,23,0.12); border-color: rgba(212,160,23,0.4);  color: #d4a017; }
.door-role-badge--barback     { background: rgba(200,140,10,0.10); border-color: rgba(200,140,10,0.35); color: #c8960a; }
.door-role-badge--photographer{ background: rgba(60,160,220,0.12); border-color: rgba(60,160,220,0.4);  color: #5bc0f5; }
.door-role-badge--dj          { background: rgba(180,60,220,0.12); border-color: rgba(180,60,220,0.4);  color: #d070ff; }
.door-role-badge--cleanup     { background: var(--color-plum-light); border-color: var(--color-plum-border); color: var(--color-text-muted); }

/* ── Add-volunteer form ──────────────────────────────────────────────────── */
.door-vol-add-form {
  background: var(--color-plum-mid);
  border: 1px solid var(--color-plum-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.door-vol-add-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-md);
}
.door-vol-add-type { display: flex; gap: var(--space-md); margin-bottom: var(--space-md); }
.door-vol-type-opt { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.door-vol-add-row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
.door-vol-add-submit { display: flex; align-items: flex-end; padding-bottom: 0; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.door-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ── Responsive: collapse columns on small screens ───────────────────────── */
@media (max-width: 640px) {
  .door-stats { gap: var(--space-sm); }
  .door-stat  { min-width: 70px; padding: var(--space-sm) var(--space-md); }
  .door-stat-value { font-size: 22px; }
  .door-cell-mem,
  .door-cell-date { display: none; }
  .door-vol-add-row { flex-direction: column; align-items: stretch; }
}
