/* ============================================================
   CYBEAR Portal — Event Calendar CSS
   event-calendar.css — Industry conference calendar view
   ============================================================ */

/* ── Page wrap ─────────────────────────────────────────────── */
.ec-wrap {
  margin-left: var(--nav-width);
  padding-top: var(--topbar-height);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 0%, #091E2A 0%, #061318 55%);
  overflow: hidden;
}

/* ── Calendar header ───────────────────────────────────────── */
.ec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
}
.ec-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ec-month-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font);
  letter-spacing: -0.01em;
  min-width: 160px;
}
.ec-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.ec-nav-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.ec-nav-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

.ec-today-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: var(--text-sub);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ec-today-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }

.ec-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filter pills */
.ec-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ec-filter-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: var(--text-note);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.ec-filter-btn svg { width: 10px; height: 10px; stroke: currentColor; fill: none; transition: transform 0.15s; }
.ec-filter-btn:hover { color: var(--text-muted); border-color: rgba(255,255,255,0.15); }
.ec-filter-btn.active { color: var(--gold-light); border-color: rgba(249,169,67,0.4); background: rgba(249,169,67,0.08); }
.ec-filter-btn.open svg { transform: rotate(180deg); }

.ec-reset-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(204,50,50,0.3);
  background: transparent;
  color: var(--red);
  font-size: var(--text-note);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ec-reset-btn:hover { background: rgba(204,50,50,0.08); }

/* Filter dropdown */
.ec-filter-drop {
  position: fixed;
  z-index: 3000;
  background: #0a1e2a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 6px 0;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  min-width: 180px;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.ec-filter-drop.open { display: block; }
.ec-filter-opt {
  padding: 9px 16px;
  font-size: var(--text-sub);
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ec-filter-opt:hover { background: rgba(255,255,255,0.06); }
.ec-filter-opt.selected { color: var(--gold-light); }
.ec-filter-opt .ec-opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Calendar body ─────────────────────────────────────────── */
.ec-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ec-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ec-dow {
  padding: 8px 12px;
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-family: var(--font);
  text-align: center;
}

/* ── Calendar grid ─────────────────────────────────────────── */
.ec-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, 1fr);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding-bottom: 60px;
  font-family: var(--font);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.ec-grid::-webkit-scrollbar { width: 4px; }
.ec-grid::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

/* ── Day cell ──────────────────────────────────────────────── */
.ec-day {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  font-family: var(--font);
  transition: background 0.1s;
  overflow: hidden;
}
.ec-day:hover { background: rgba(255,255,255,0.018); }
.ec-day.other-month { opacity: 0.35; }
.ec-day.today { background: rgba(249,169,67,0.04); }
.ec-day.today .ec-day-num {
  color: var(--gold-light);
  font-weight: 800;
}
.ec-day.today::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-mid);
}

.ec-day-num {
  font-size: var(--text-sub);
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font);
  line-height: 1;
  padding: 2px 0 4px;
  flex-shrink: 0;
}

/* ── Event chips ───────────────────────────────────────────── */
.ec-event {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.1s, opacity 0.1s;
  min-width: 0;
  flex-shrink: 0;
}
.ec-event:hover { filter: brightness(1.15); }
.ec-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ec-event-name {
  font-size: var(--text-chip);
  font-weight: 600;
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  letter-spacing: 0.01em;
}
.ec-event-time {
  font-size: var(--text-chip-meta);
  font-weight: 700;
  font-family: var(--font);
  flex-shrink: 0;
  opacity: 0.7;
}

/* Event type colors */
.ec-event.type-conference { background: rgba(45,161,196,0.12); }
.ec-event.type-conference .ec-event-dot { background: #2DA1C4; }
.ec-event.type-conference .ec-event-name { color: #7DCCE8; }
.ec-event.type-conference .ec-event-time { color: #7DCCE8; }

/* var(--purple) is #A97FF5 — flipped back from #4C4C9D (the documented brand purple) on
   2026-07-31, which read too dark once actually implemented across the portal. */
.ec-event.type-interview { background: rgba(169,127,245,0.12); }
.ec-event.type-interview .ec-event-dot { background: var(--purple); }
.ec-event.type-interview .ec-event-name { color: var(--purple); }
.ec-event.type-interview .ec-event-time { color: var(--purple); }

.ec-event.type-meal { background: rgba(67,198,176,0.12); }
.ec-event.type-meal .ec-event-dot { background: #43C6B0; }
.ec-event.type-meal .ec-event-name { color: #43C6B0; }
.ec-event.type-meal .ec-event-time { color: #43C6B0; }

.ec-event.type-infosession { background: rgba(249,169,67,0.12); }
.ec-event.type-infosession .ec-event-dot { background: #F9A943; }
.ec-event.type-infosession .ec-event-name { color: var(--gold-light); }
.ec-event.type-infosession .ec-event-time { color: var(--gold-light); }

/* Contract-v2 (2026-08-17) categories: Talk/Session, Training/Workshop, Webinar */
.ec-event.type-session { background: rgba(91,130,245,0.12); }
.ec-event.type-session .ec-event-dot { background: #5B82F5; }
.ec-event.type-session .ec-event-name { color: #5B82F5; }
.ec-event.type-session .ec-event-time { color: #5B82F5; }

.ec-event.type-training { background: rgba(224,82,99,0.12); }
.ec-event.type-training .ec-event-dot { background: #E05263; }
.ec-event.type-training .ec-event-name { color: #E05263; }
.ec-event.type-training .ec-event-time { color: #E05263; }

.ec-event.type-webinar { background: rgba(155,197,61,0.12); }
.ec-event.type-webinar .ec-event-dot { background: var(--green); }
.ec-event.type-webinar .ec-event-name { color: var(--green); }
.ec-event.type-webinar .ec-event-time { color: var(--green); }

.ec-event.type-other { background: rgba(136,146,166,0.14); }
.ec-event.type-other .ec-event-dot { background: #8892A6; }
.ec-event.type-other .ec-event-name { color: #A9B2C2; }
.ec-event.type-other .ec-event-time { color: #A9B2C2; }

/* Unknown types from DB — colors driven by CSS custom properties set inline by ecTypeClass */
.ec-event.type-dynamic { background: var(--ec-type-bg, rgba(45,161,196,0.12)); }
.ec-event.type-dynamic .ec-event-dot  { background: var(--ec-type-color, #2DA1C4); }
.ec-event.type-dynamic .ec-event-name { color: var(--ec-type-color, #2DA1C4); }
.ec-event.type-dynamic .ec-event-time { color: var(--ec-type-color, #2DA1C4); }

.ec-event.filtered-out { opacity: 0.15; pointer-events: none; }

/* ── Overflow button ──────────────────────────────────────── */
.ec-overflow-btn {
  font-size: var(--text-chip-meta);
  font-weight: 700;
  color: var(--text-dim);
  font-family: var(--font);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  margin-top: auto;
}
.ec-overflow-btn:hover { color: var(--gold-light); border-color: rgba(249,169,67,0.35); background: rgba(249,169,67,0.06); }

/* ── Conference detail modal ───────────────────────────────── */

/* Fixed modal height — conference detail is always 90vh so the box
   never jolts between different-sized conferences. Content scrolls
   inside .modal-panel (max-height: 90vh + overflow-y: auto in main.css).
   Class is added by ecOpenConference() so only conference detail is
   affected — overflow/day-detail modals use the default auto height. */
.ec-conf-modal-box {
  min-height: 90vh;
}

/* ── Formatted event description (ecFormatDescription) ──────── */
.ec-desc .ec-desc-p { margin: 0 0 10px; }
.ec-desc .ec-desc-p:last-child { margin-bottom: 0; }
.ec-desc .ec-desc-head {
  font-size: var(--text-sub);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  margin: 16px 0 6px;
}
.ec-desc .ec-desc-head:first-child { margin-top: 0; }
.ec-desc .ec-desc-list { margin: 4px 0 10px; padding-left: 20px; }
.ec-desc .ec-desc-list li { margin: 3px 0; }
.ec-desc em { font-style: italic; color: var(--text-secondary, var(--text-primary)); }

.ec-modal-header-band {
  padding: 22px 24px 0;
}
.ec-modal-event-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.ec-modal-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ec-modal-datetime {
  font-size: var(--text-sub);
  color: var(--text-muted);
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ec-modal-datetime svg { width: 12px; height: 12px; stroke: currentColor; fill: none; color: var(--text-dim); flex-shrink: 0; }
.ec-modal-cal-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(155,197,61,0.3);
  background: rgba(155,197,61,0.08);
  color: var(--green);
  font-size: var(--text-note);
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.ec-modal-cal-btn:hover { background: rgba(155,197,61,0.15); border-color: rgba(155,197,61,0.5); }
.ec-modal-cal-btn svg { width: 11px; height: 11px; stroke: currentColor; fill: none; }

.ec-modal-occurrence {
  font-size: var(--text-note);
  color: var(--text-dim);
  font-family: var(--font);
  margin-bottom: 4px;
}
.ec-modal-occurrence a {
  color: #2DA1C4;
  text-decoration: none;
  cursor: pointer;
}

/* Category badges */
.ec-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font);
  margin: 2px 4px 2px 0;
}
.ec-cat-conference { background: rgba(45,161,196,0.12);  color: #2DA1C4; border: 1px solid rgba(45,161,196,0.25); }
.ec-cat-interview   { background: rgba(169,127,245,0.12); color: var(--purple); border: 1px solid rgba(169,127,245,0.25); }
.ec-cat-meal        { background: rgba(67,198,176,0.12);  color: #43C6B0; border: 1px solid rgba(67,198,176,0.25); }
.ec-cat-infosession { background: rgba(249,169,67,0.12);  color: var(--gold-light); border: 1px solid rgba(249,169,67,0.25); }
.ec-cat-summit     { background: rgba(249,169,67,0.12);  color: var(--gold-light); border: 1px solid rgba(249,169,67,0.25); }
.ec-cat-bsides     { background: rgba(155,197,61,0.1);   color: var(--green); border: 1px solid rgba(155,197,61,0.2); }
.ec-cat-forum      { background: rgba(169,127,245,0.1);  color: var(--purple); border: 1px solid rgba(169,127,245,0.2); }
.ec-cat-workshop   { background: rgba(67,198,176,0.1);   color: #43C6B0; border: 1px solid rgba(67,198,176,0.2); }
.ec-cat-training   { background: rgba(224,82,99,0.1);    color: #E05263; border: 1px solid rgba(224,82,99,0.25); }
.ec-cat-session    { background: rgba(91,130,245,0.12);  color: #5B82F5; border: 1px solid rgba(91,130,245,0.25); }
.ec-cat-webinar    { background: rgba(155,197,61,0.1);   color: var(--green); border: 1px solid rgba(155,197,61,0.2); }
.ec-cat-awards     { background: rgba(91,130,245,0.1);   color: #5B82F5; border: 1px solid rgba(91,130,245,0.25); }
/* Unknown category from DB — neutral style, still readable */
.ec-cat-other      { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }

/* Sponsor tiers */
.ec-sponsor-tier {
  margin-bottom: 18px;
}
.ec-sponsor-tier:last-child { margin-bottom: 0; }
.ec-sponsor-tier-label {
  display: inline-block;
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.ec-tier-platinum { background: rgba(229,228,226,0.12); color: #E5E4E2; border: 1px solid rgba(229,228,226,0.25); }
.ec-tier-gold     { background: rgba(249,169,67,0.12);  color: var(--gold-light); border: 1px solid rgba(249,169,67,0.25); }
.ec-tier-silver   { background: rgba(184,191,194,0.12); color: #B8BFC2; border: 1px solid rgba(184,191,194,0.25); }
.ec-tier-bronze   { background: rgba(205,127,50,0.12);  color: #CD7F32; border: 1px solid rgba(205,127,50,0.25); }
.ec-tier-other    { background: rgba(255,255,255,0.05);  color: var(--text-dim); border: 1px solid var(--border); }
.ec-sponsor-tier-chips { display: flex; flex-wrap: wrap; gap: 6px; }
[data-theme="light"] .ec-tier-platinum { background: rgba(100,100,100,0.08); color: #555; border-color: rgba(100,100,100,0.2); }
[data-theme="light"] .ec-tier-gold     { background: rgba(224,142,62,0.1);   color: #B86A00; border-color: rgba(224,142,62,0.3); }
[data-theme="light"] .ec-tier-silver   { background: rgba(100,110,115,0.08); color: #556070; border-color: rgba(100,110,115,0.2); }
[data-theme="light"] .ec-tier-bronze   { background: rgba(160,82,45,0.08);   color: #8B4513; border-color: rgba(160,82,45,0.2); }
[data-theme="light"] .ec-tier-other    { background: rgba(0,0,0,0.04);        color: #6A8C9A; border-color: rgba(0,0,0,0.1); }

/* Sponsor chips */
.ec-sponsor-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: var(--text-note);
  font-weight: 600;
  font-family: var(--font);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin: 3px 4px 3px 0;
}
.ec-sponsor-chip:hover {
  background: rgba(45,161,196,0.1);
  border-color: rgba(45,161,196,0.3);
  color: #2DA1C4;
}

/* Speaker chips */
.ec-speaker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: var(--text-note);
  font-weight: 600;
  font-family: var(--font);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin: 3px 4px 3px 0;
}
.ec-speaker-chip:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.18); }
.ec-speaker-chip-in-db { background: rgba(249,169,67,0.1); border-color: rgba(249,169,67,0.35); color: var(--gold-light); }
.ec-speaker-chip-in-db:hover { background: rgba(249,169,67,0.18); border-color: rgba(249,169,67,0.55); }

/* Links list */
.ec-link-list { display: flex; flex-direction: column; gap: 4px; }

/* Exec proximity section inside Location box */
.ec-proximity { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ec-proximity-note {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--text-note); color: var(--text-dim); font-family: var(--font);
  margin-bottom: 8px; line-height: 1.4;
}
.ec-proximity-note strong { color: var(--text-primary); }
.ec-proximity-avatars {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: flex-start;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.ec-proximity-avatars.expanded { overflow: visible; }
.ec-prox-more-btn {
  display: inline-flex; align-items: center;
  margin-top: 6px;
  font-size: var(--text-note); font-weight: 500; font-family: var(--font);
  color: var(--text-dim); background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 2px 9px; cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.ec-prox-more-btn:hover { color: var(--gold-light); border-color: rgba(249,169,67,0.35); background: rgba(249,169,67,0.06); }
.ec-prox-avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--border); flex-shrink: 0; cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}
.ec-prox-avatar:hover { border-color: var(--gold-mid); transform: scale(1.12); z-index: 1; position: relative; }
.ec-prox-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-prox-avatar-initials {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; font-family: var(--font);
  background: var(--blue-mid); color: var(--text-primary);
}

/* Location + Links two-box row */
.ec-loc-links-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ec-info-box {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.ec-info-box-label {
  font-size: var(--text-micro); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--gold-mid);
}
@media (max-width: 560px) { .ec-loc-links-row { flex-direction: column; } }
@media (max-width: 959px) { #ecViewMonth { display: none !important; } }
[data-theme="light"] .ec-info-box { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
.ec-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.ec-link-item:hover { background: rgba(45,161,196,0.08); border-color: rgba(45,161,196,0.2); }
.ec-link-item svg { width: 12px; height: 12px; stroke: #2DA1C4; fill: none; flex-shrink: 0; }
.ec-link-label { font-size: var(--text-sub); font-weight: 600; color: #2DA1C4; font-family: var(--font); }

/* ── Company / Exec right panel ────────────────────────────── */
.ec-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,12,16,0.7);
  z-index: 1800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.ec-panel-overlay.open { opacity: 1; pointer-events: all; }

.ec-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 90vw);
  background: #101e26;
  border-left: 1px solid var(--border);
  z-index: 1900;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ec-panel.open { transform: translateX(0); }

.ec-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ec-panel-title {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font);
}
.ec-panel-subtitle {
  font-size: var(--text-note);
  color: var(--text-dim);
  font-family: var(--font);
  margin-top: 2px;
}
.ec-panel-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.ec-panel-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.ec-panel-close svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

.ec-panel-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.ec-panel-body::-webkit-scrollbar { width: 4px; }
.ec-panel-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

.ec-panel-section-label {
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-mid);
  font-family: var(--font);
  padding: 16px 20px 8px;
}

.ec-panel-conf {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.12s;
}
.ec-panel-conf:hover { background: rgba(255,255,255,0.03); }
.ec-panel-conf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.ec-panel-conf-info { flex: 1; min-width: 0; }
.ec-panel-conf-name {
  font-size: var(--text-sub);
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.3;
  margin-bottom: 3px;
}
.ec-panel-conf-meta {
  font-size: var(--text-note);
  color: var(--text-dim);
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ec-panel-month-header {
  padding: 10px 20px 4px;
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-family: var(--font);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

/* ── Search results dropdown ───────────────────────────────── */
.ec-search-results {
  position: fixed;
  z-index: 2500;
  background: #0a1e2a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
  display: none;
}
.ec-search-results.open { display: block; }
.ec-search-results::-webkit-scrollbar { width: 4px; }
.ec-search-results::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

.ec-search-section-hdr {
  padding: 10px 16px 6px;
  font-size: var(--text-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-mid);
  font-family: var(--font);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ec-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}
.ec-search-result-item:last-child { border-bottom: none; }
.ec-search-result-item:hover { background: rgba(255,255,255,0.05); }
.ec-result-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ec-result-icon svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }
.ec-result-icon.type-conf { background: rgba(45,161,196,0.12); color: #2DA1C4; }
.ec-result-icon.type-company { background: rgba(249,169,67,0.1); color: var(--gold-light); }
.ec-result-icon.type-exec { background: rgba(155,197,61,0.1); color: var(--green); }
.ec-result-main { flex: 1; min-width: 0; }
.ec-result-name { font-size: var(--text-sub); font-weight: 600; color: var(--text-primary); font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-result-sub { font-size: var(--text-note); color: var(--text-dim); font-family: var(--font); margin-top: 1px; }
.ec-result-badge {
  font-size: var(--text-micro);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.ec-result-badge.conf { background: rgba(45,161,196,0.12); color: #2DA1C4; border: 1px solid rgba(45,161,196,0.2); }
.ec-result-badge.company { background: rgba(249,169,67,0.1); color: var(--gold-light); border: 1px solid rgba(249,169,67,0.25); }
.ec-result-badge.exec { background: rgba(155,197,61,0.1); color: var(--green); border: 1px solid rgba(155,197,61,0.2); }
.ec-search-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: var(--text-sub);
  color: var(--text-dim);
  font-family: var(--font);
  font-style: italic;
}

/* ── Light mode ───────────────────────────────────────────── */
[data-theme="light"] .ec-wrap { background: #EEF2F4; }
[data-theme="light"] .ec-day:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .ec-day.today { background: rgba(224,142,62,0.04); }
[data-theme="light"] .ec-nav-btn { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.1); color: #3A5A68; }
[data-theme="light"] .ec-today-btn { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.1); color: #3A5A68; }
[data-theme="light"] .ec-filter-btn { border-color: rgba(0,0,0,0.1); color: #6A8C9A; }
[data-theme="light"] .ec-filter-drop { background: #fff; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .ec-search-results { background: #fff; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .ec-panel { background: rgba(240,244,246,0.99); border-left-color: rgba(0,0,0,0.1); }
[data-theme="light"] .ec-overflow-btn { color: #557282; border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.03); }
[data-theme="light"] .ec-overflow-btn:hover { color: #1B4656; border-color: rgba(27,70,86,0.3); background: rgba(27,70,86,0.05); }

/* ── Add to Calendar dropdown ──────────────────────────── */
.ec-cal-drop {
  position: fixed;
  z-index: 3000;
  background: rgba(6,19,24,0.98);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ec-cal-opt {
  padding: 9px 16px;
  font-size: var(--text-sub);
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}
.ec-cal-opt:hover { background: rgba(27,70,86,0.6); color: var(--text-primary); }
[data-theme="light"] .ec-cal-drop {
  background: rgba(245,247,248,0.98);
  border-color: rgba(0,0,0,0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}
[data-theme="light"] .ec-cal-opt { color: #3A5A68; }
[data-theme="light"] .ec-cal-opt:hover { background: rgba(27,70,86,0.08); color: #0D2028; }

/* ── Day Detail Modal title ─────────────────────────────── */
.ec-day-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}
[data-theme="light"] .ec-day-detail-title { color: #0D2028; }

/* ── Overflow modal row hover ───────────────────────── */
/* Overrides inline onmouseover to match .card-interactive standard  */
.cyber-modal-box .modal-section > div[onmouseover]:hover {
  background: rgba(255,255,255,0.06) !important;
  border-radius: 4px;
}
[data-theme="light"] .cyber-modal-box .modal-section > div[onmouseover]:hover {
  background: rgba(0,0,0,0.04) !important;
}

/* ── Day overflow modal: fixed-height shell so it never resizes on filter ─── */
/* The modal holds a stable height; the header/pills stay fixed and only the
   list scrolls. Filtering changes the list contents, not the modal size. */
.ec-day-modal {
  display: flex; flex-direction: column;
  height: 80vh; max-height: 90vh;
}
.ec-day-sticky {
  flex-shrink: 0;
  background: #101e26;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .ec-day-sticky { background: #F0F4F6; }
.ec-day-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.ec-day-head .ec-day-detail-title { margin-bottom: 0; }
.ec-day-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.ec-day-list {
  flex: 1 1 auto; overflow-y: auto; min-height: 0;
  padding: 4px 20px 20px;
  scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent;
}
.ec-day-list::-webkit-scrollbar { width: 4px; }
.ec-day-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }
.ec-day-empty {
  padding: 28px 0; text-align: center;
  color: var(--text-dim); font-size: var(--text-sub); font-family: var(--font);
}

/* Filter pills — same language as .filter-pill, colored per event type */
.ec-day-pill {
  height: 28px; padding: 0 10px;
  border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-family: var(--font); font-size: 11.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ec-day-pill:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.25); }
[data-theme="light"] .ec-day-pill:hover { border-color: rgba(0,0,0,0.25); }
.ec-day-pill .ec-day-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--p, var(--text-muted)); flex-shrink: 0;
}
.ec-day-pill .ec-day-pill-ct { font-size: 10px; font-weight: 700; opacity: 0.7; }
.ec-day-pill.active {
  background: var(--pbg, rgba(249,169,67,0.15));
  border-color: var(--p, rgba(249,169,67,0.5));
  color: var(--text-primary);
}
.ec-day-pill.ec-day-pill-all.active {
  background: rgba(249,169,67,0.15);
  border-color: rgba(249,169,67,0.45);
  color: var(--gold-light);
}

/* Rows — visual parity with the prior inline markup, hover via class */
.ec-day-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; border-radius: 4px; transition: background 0.12s;
}
.ec-day-row:last-child { border-bottom: none; }
.ec-day-row:hover { background: rgba(255,255,255,0.06); }
[data-theme="light"] .ec-day-row:hover { background: rgba(0,0,0,0.04); }
.ec-day-row-bar { width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.ec-day-row-main { flex: 1; min-width: 0; }
.ec-day-row-top { display: flex; align-items: center; gap: 12px; margin-bottom: 3px; }
.ec-day-row-name {
  font-size: var(--text-sub); font-weight: 600; color: var(--text-primary);
  font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-day-row-badge {
  flex-shrink: 0; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 2px 7px; border-radius: 20px; border: 1px solid;
}
.ec-day-row-sub { font-size: var(--text-note); color: var(--text-dim); font-family: var(--font); }

/* ── Legend ────────────────────────────────────────────────── */
.ec-legend {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(6,19,24,0.3);
  flex-wrap: wrap;
  justify-content: center;
}
.ec-legend .ec-event {
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 10px;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 20px;
  transition: background 0.15s, border-color 0.15s;
}
.ec-legend .ec-event:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
.ec-legend .ec-event.active { background: var(--pbg); border-color: var(--p); box-shadow: 0 0 0 1px var(--p); }
.ec-legend.has-filter .ec-event:not(.cost-pill):not(.active) { opacity: 0.35; }
.ec-legend.has-cost-filter .cost-pill:not(.active) { opacity: 0.35; }
.ec-legend-sep { width: 1px; height: 16px; background: var(--border); flex-shrink: 0; }
.ec-legend .ec-event-dot {
  width: 7px;
  height: 7px;
}
.ec-legend .ec-event-name {
  font-size: var(--text-note);
  letter-spacing: 0.02em;
}
.ec-legend-all {
  height: 26px; padding: 0 12px;
  border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-family: var(--font); font-size: 11.5px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ec-legend-all:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.25); }
.ec-legend-all.active { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
[data-theme="light"] .ec-legend { background: rgba(240,244,246,0.8); }
[data-theme="light"] .ec-legend-item { color: #557282; }
[data-theme="light"] .ec-legend .ec-event:hover { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.03); }
[data-theme="light"] .ec-legend-all:hover { border-color: rgba(0,0,0,0.25); }

/* ── Light mode: green + gold overrides ──────────────────────────────── */
[data-theme="light"] .ec-event.type-bsides .ec-event-dot      { background: #4A7A1A; }
[data-theme="light"] .ec-cat-bsides                            { color: #4A7A1A; border-color: rgba(74,122,26,0.25); background: rgba(74,122,26,0.08); }
[data-theme="light"] .ec-event.type-webinar .ec-event-dot      { background: #4A7A1A; }
[data-theme="light"] .ec-event.type-webinar .ec-event-name     { color: #4A7A1A; }
[data-theme="light"] .ec-event.type-webinar .ec-event-time     { color: #4A7A1A; }
[data-theme="light"] .ec-cat-webinar                           { color: #4A7A1A; border-color: rgba(74,122,26,0.25); background: rgba(74,122,26,0.08); }
[data-theme="light"] .ec-cat-summit                            { color: #B86A00; border-color: rgba(184,106,0,0.25); background: rgba(184,106,0,0.08); }
[data-theme="light"] .ec-modal-cal-btn                         { color: #4A7A1A; border-color: rgba(74,122,26,0.35); background: rgba(74,122,26,0.08); }
[data-theme="light"] .ec-modal-cal-btn:hover                   { background: rgba(74,122,26,0.15); border-color: rgba(74,122,26,0.55); }
[data-theme="light"] .ec-filter-opt.selected                   { color: #B86A00; }
[data-theme="light"] .ec-filter-btn.active                     { color: #B86A00; border-color: rgba(184,106,0,0.4); background: rgba(184,106,0,0.08); }
[data-theme="light"] .ec-info-box-label                        { color: #9A5500; }
[data-theme="light"] .ec-overflow-btn:hover                    { color: #B86A00; border-color: rgba(184,106,0,0.35); background: rgba(184,106,0,0.06); }

/* ── "Missing an Event?" ──────────────────────────────────── */
.ec-missing-btn {
  position: fixed;
  bottom: 20px;
  left: calc(var(--nav-width) + 20px);
  z-index: 100;
  height: 30px;
  padding: 0 14px;
  border-radius: 20px;
  background: rgba(249,169,67,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(249,169,67,0.3);
  color: var(--gold-light);
  font-size: var(--text-note);
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ec-missing-btn:hover { background: rgba(249,169,67,0.18); border-color: rgba(249,169,67,0.5); }

/* ── "Report a missing event" dialog (opened from .ec-missing-btn) ──────────
   Small form modal via the generic showModal(); inputs/buttons follow the
   PORTAL_STYLE_GUIDE §5 recipes (the .ve-form-*/.acct-* families aren't
   loaded on this page). */
.ecm-modal-box { max-width: 440px; }
.ecm-body  { padding: 24px; }
.ecm-title {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  font-family: var(--font); letter-spacing: -0.01em; margin-bottom: 6px;
}
.ecm-sub {
  font-size: var(--text-sub); color: var(--text-muted); font-family: var(--font);
  line-height: 1.5; margin-bottom: 18px;
}
.ecm-group { margin-bottom: 14px; }
.ecm-label {
  display: block; font-size: var(--text-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim);
  font-family: var(--font); margin-bottom: 6px;
}
.ecm-label .ecm-required { color: var(--red); margin-left: 2px; }
.ecm-input {
  width: 100%; box-sizing: border-box;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 9px 12px;
  font-size: var(--text-sub); font-family: var(--font); color: var(--text-primary);
  outline: none; transition: border-color 0.15s;
  color-scheme: dark;   /* native date-picker chrome matches the dark theme */
}
.ecm-input:focus { border-color: rgba(249,169,67,0.4); }
.ecm-input::placeholder { color: var(--text-dim); }
.ecm-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ecm-btn {
  padding: 8px 18px; border-radius: 8px;
  font-size: var(--text-sub); font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ecm-btn:disabled { opacity: 0.5; cursor: default; }
.ecm-btn-primary { background: rgba(249,169,67,0.14); border: 1px solid rgba(249,169,67,0.3); color: var(--gold-light); }
.ecm-btn-primary:hover { background: rgba(249,169,67,0.24); border-color: rgba(249,169,67,0.5); }
.ecm-btn-secondary { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); }
.ecm-btn-secondary:hover { background: rgba(255,255,255,0.09); color: var(--text-primary); }
[data-theme="light"] .ecm-input { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color-scheme: light; }
[data-theme="light"] .ecm-btn-secondary { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .ecm-btn-secondary:hover { background: rgba(0,0,0,0.08); }

/* ── List view ─────────────────────────────────────────────── */
.ec-list {
  /* .ec-list-month-header's rendered height (12px+8px padding + ~14px line
     height + 1px border) — .ec-list-day-label's sticky top reads this so it
     parks just below the sticky month bar instead of at the same top:0, which
     let the month bar (z-index:2) paint over/cut off the day number. Declared
     here (the real common ancestor of both, per js/event-calendar.js's render)
     rather than on .ec-list-month-header itself, which is DAY-ROW's sibling,
     not its ancestor — a custom property doesn't inherit sideways. */
  --ec-month-header-h: 35px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 60px;
  font-family: var(--font);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.ec-list::-webkit-scrollbar { width: 4px; }
.ec-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

.ec-list-month-group { }

/* Actual .ec-list-month-header rule lives further down, under "List: historical
   toggle + month section headers" — this was a dead duplicate (same selector,
   no distinct scoping) that the later rule always overrode; removed rather than
   fixed-up so there's one definition to keep in sync with .ec-list-day-label's
   sticky top offset below. */

/* ── Day row ────────────────────────────────────────────────── */
.ec-list-day-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ec-list-day-label {
  width: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0;
  border-right: 1px solid var(--border);
  position: sticky;
  /* Sticks to the bottom edge of .ec-list-month-header (also sticky, top:0), NOT
     top:0 itself — both stuck at the same offset put the day number and the
     month bar in the same spot, and since the month header has z-index:2 with
     no z-index set here, it painted over (cut off) the day number. Value =
     .ec-list-month-header's rendered height (var(--ec-month-header-h), set
     alongside it below) so they stack instead of collide. */
  top: var(--ec-month-header-h, 35px);
  align-self: flex-start;
}
.ec-list-day-num {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  font-family: var(--font);
}
.ec-list-day-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 6px;
}
.ec-list-today .ec-list-day-num { color: var(--gold-light); }
.ec-list-today .ec-list-day-name { color: var(--gold-light); }

.ec-list-day-events {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
}

/* ── Event row within a day ─────────────────────────────────── */
.ec-list-event-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 16px;
  margin: 2px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.ec-list-event-row:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }

.ec-list-event-left { flex: 1; min-width: 0; }
.ec-list-type-badge {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ec-list-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec-list-organizer {
  font-size: var(--text-note);
  color: var(--text-dim);
  margin-top: 2px;
}

.ec-list-event-right {
  flex-shrink: 0;
  text-align: right;
  min-width: 120px;
}
.ec-list-date {
  font-size: var(--text-note);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ec-list-meta {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  font-size: var(--text-note);
  color: var(--text-dim);
}
.ec-list-cost {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
}
.ec-list-cost-free     { color: #9BC53D; background: rgba(155,197,61,0.12); }
.ec-list-cost-low      { color: #43C6B0; background: rgba(67,198,176,0.12); }
.ec-list-cost-medium   { color: #F9A943; background: rgba(249,169,67,0.12); }
.ec-list-cost-premium  { color: #E05263; background: rgba(224,82,99,0.12); }

.ec-list-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: var(--text-base);
}

/* ── List: historical toggle + month section headers ─────────── */
.ec-list-controls {
  display: flex;
  justify-content: flex-end;
  padding: 12px 24px 4px;
}
.ec-hist-toggle {
  height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: var(--text-note);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.ec-hist-toggle:hover { color: var(--text-primary); border-color: var(--text-dim); }
.ec-hist-toggle.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--text-dim);
}
.ec-list-month-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #061318;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 24px 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Location filter (calendar header) ─────────────────────── */
.ec-loc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text-dim); font-size: var(--text-note); font-weight: 600;
  font-family: var(--font); cursor: pointer; transition: all 0.15s;
}
.ec-loc-btn:hover, .ec-loc-btn.open { color: var(--text-primary); border-color: var(--text-dim); }
.ec-loc-btn.has-filter { color: #7DCCE8; border-color: rgba(45,161,196,0.5); background: rgba(45,161,196,0.12); }
.ec-loc-drop {
  position: fixed; z-index: 1200; display: none;
  width: 288px; max-width: calc(100vw - 24px);
  background: #0c1c24; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.55); padding: 12px;
}
.ec-loc-drop.open { display: block; }
/* City / State / Country tab strip at the top of the location card. */
.ec-loc-tabs { display: flex; gap: 3px; margin-bottom: 10px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,0.04); }
.ec-loc-tab { flex: 1; height: 26px; border: 0; border-radius: 6px; cursor: pointer; background: transparent; color: var(--text-dim); font-size: var(--text-note); font-weight: 600; font-family: var(--font); transition: all 0.15s; }
.ec-loc-tab:hover { color: var(--text-primary); }
.ec-loc-tab.active { background: rgba(45,161,196,0.15); color: #7DCCE8; }
.ec-loc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
  font-size: var(--text-note); color: var(--text-dim); font-family: var(--font); }
.ec-loc-radius-pills { display: inline-flex; gap: 3px; }
.ec-loc-radius-pill { height: 22px; padding: 0 8px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text-dim);
  font-size: var(--text-note); font-weight: 700; font-family: var(--font); }
.ec-loc-radius-pill.active { background: rgba(45,161,196,0.15); color: #7DCCE8; border-color: rgba(45,161,196,0.5); }
.ec-loc-input { width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--text-primary);
  font-size: var(--text-sub); font-family: var(--font); outline: none; }
.ec-loc-input:focus { border-color: #2DA1C4; }
.ec-loc-results { margin-top: 8px; max-height: 240px; overflow-y: auto; }
.ec-loc-city { display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.ec-loc-city:hover { background: rgba(255,255,255,0.06); }
.ec-loc-city-name { font-size: var(--text-sub); color: var(--text-primary); font-family: var(--font); }
.ec-loc-city-ct { font-size: var(--text-note); color: var(--text-dim); font-family: var(--font); flex-shrink: 0; margin-left: 10px; }
.ec-loc-empty { padding: 14px 8px; text-align: center; font-size: var(--text-note); color: var(--text-dim); font-family: var(--font); }
.ec-loc-clear { width: 100%; margin-top: 8px; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  font-size: var(--text-note); font-weight: 600; font-family: var(--font); }
.ec-loc-clear:hover { color: #E05263; border-color: rgba(224,82,99,0.4); }

/* The strip under the legend that names what the location filter hid (FB-641). */
.ec-loc-note { flex-shrink: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 6px 24px; border-bottom: 1px solid var(--border); background: rgba(45,161,196,0.06); font-size: var(--text-note); color: var(--text-primary); font-family: var(--font); }
.ec-loc-note b { color: #7DCCE8; font-weight: 700; }   .ec-loc-note-dim { color: var(--text-dim); }   .ec-loc-note-sep { width: 1px; height: 14px; background: var(--border); }
.ec-loc-note-btn { height: 22px; padding: 0 10px; border-radius: 6px; cursor: pointer; border: 1px solid rgba(45,161,196,0.5); background: rgba(45,161,196,0.12); color: #7DCCE8; font-size: var(--text-note); font-weight: 700; font-family: var(--font); }
.ec-loc-note-btn:hover { background: rgba(45,161,196,0.22); }   [data-theme="light"] .ec-loc-note { background: rgba(45,161,196,0.08); }

/* ── Territory toggle (calendar header) ────────────────────── */
.ec-terr-toggle { display: inline-flex; gap: 3px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.ec-terr-btn { height: 24px; padding: 0 10px; border-radius: 6px; border: none; cursor: pointer;
  background: transparent; color: var(--text-dim); font-size: var(--text-note); font-weight: 600; font-family: var(--font); transition: all 0.15s; }
.ec-terr-btn.active { background: rgba(45,161,196,0.15); color: #7DCCE8; font-weight: 700; cursor: default; }
