/* ================================================================
   GalSol — Event Planner (EP) Shared Styles
   ep.css  |  Used by all EP module pages
   ================================================================ */

/* ── EP Color Tokens (extend dashboard.css vars) ──────────────── */
:root {
  --ep-violet:      #8b5cf6;
  --ep-violet-dim:  rgba(139, 92, 246, 0.12);
  --ep-violet-glow: rgba(139, 92, 246, 0.25);
  --ep-amber:       #f59e0b;
  --ep-amber-dim:   rgba(245, 158, 11, 0.12);
  --ep-sky:         #38bdf8;
  --ep-sky-dim:     rgba(56, 189, 248, 0.12);
  /* Brighter, more readable secondary text across all EP pages */
  --text-2: #aab9d0;
  --text-3: #7387a3;
  /* Display font for all numeric stats. Falls back cleanly if Pliant
     isn't installed/served. Add @font-face for 'Pliant' to activate it. */
  --font-stat: 'Pliant', 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* All numeric stats across Event Planner use the Pliant display font, bold */
.ep-summary-value, .ep-cat-total, .ep-auto-cell,
.ep-stat-tile-num, .ep-stats-ring-pct, .ep-sf-count,
.ep-stat-value, .ep-stat-num, .ep-hero-stat-value, .ep-card-stat strong,
.ep-calc-result, .ep-calc-expr,
.ep-budget-table .ep-cell-input[type="number"] {
  font-family: var(--font-stat);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.ep-summary-value, .ep-stat-tile-num, .ep-stats-ring-pct,
.ep-stat-value, .ep-stat-num, .ep-hero-stat-value { font-weight: 800; }

/* ── EP Topbar (for module pages) ─────────────────────────────── */
.ep-topbar {
  height: 56px;
  background: rgba(4, 8, 15, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 12px;
  flex-shrink: 0;
}

.ep-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.ep-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ep-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.ep-back-btn:hover {
  color: var(--text);
  border-color: var(--glass-border-2);
  background: rgba(255,255,255,0.06);
}

.ep-back-btn svg { width: 14px; height: 14px; }

.ep-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  min-width: 0;
}

.ep-breadcrumb-sep { color: var(--text-3); }
.ep-breadcrumb-event { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-breadcrumb-page { color: var(--text); font-weight: 600; white-space: nowrap; }

.ep-save-indicator {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}
.ep-save-indicator.saving { color: var(--ep-amber); }
.ep-save-indicator.saved  { color: var(--green); }
.ep-save-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ep-save-indicator.saving .ep-save-dot { animation: ep-pulse 1s infinite; }
@keyframes ep-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── Modal Overlay ─────────────────────────────────────────────── */
.ep-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ep-overlay-in 0.18s ease;
}
@keyframes ep-overlay-in { from{opacity:0} to{opacity:1} }

.ep-modal {
  background: #0a1020;
  border: 1px solid var(--glass-border-2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: ep-modal-in 0.22s var(--ease);
  position: relative;
}
.ep-modal::-webkit-scrollbar { width: 4px; }
.ep-modal::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 99px; }

@keyframes ep-modal-in {
  from { opacity:0; transform:translateY(14px) scale(0.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

.ep-modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ep-modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.ep-modal-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

.ep-modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.ep-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.ep-modal-close svg { width: 15px; height: 15px; }

.ep-modal-body { padding: 20px 28px; }
.ep-modal-footer {
  padding: 0 28px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Form Controls ─────────────────────────────────────────────── */
.ep-form-group { margin-bottom: 18px; }
.ep-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}
.ep-label span { color: var(--red); }

.ep-input, .ep-textarea, .ep-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.ep-input { padding: 10px 14px; }
.ep-textarea { padding: 10px 14px; resize: vertical; min-height: 80px; line-height: 1.5; }
.ep-select { padding: 10px 14px; appearance: none; }

.ep-input::placeholder, .ep-textarea::placeholder { color: var(--text-3); }

.ep-input:focus, .ep-textarea:focus, .ep-select:focus {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: rgba(255,255,255,0.07);
}

.ep-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ep-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

/* ── Color Swatches ────────────────────────────────────────────── */
.ep-color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ep-color-swatch {
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
}

.ep-color-swatch.selected {
  border-color: rgba(255,255,255,0.8);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.ep-color-swatch.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
}

/* ── Event Planner List Page ───────────────────────────────────── */
.ep-list-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 14px;
  flex-wrap: wrap;
}

.ep-list-search-wrap {
  position: relative;
}
.ep-list-search {
  width: 240px;
  padding: 9px 14px 9px 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.ep-list-search:focus { border-color: rgba(0,212,255,0.5); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
.ep-list-search::placeholder { color: var(--text-3); }
.ep-list-search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-3); pointer-events: none;
}

.ep-filter-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 4px;
}
.ep-filter-tab {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}
.ep-filter-tab:hover { color: var(--text); }
.ep-filter-tab.active { background: rgba(0,212,255,0.14); color: var(--cyan); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(0,212,255,0.4); }

/* ── Event Cards Grid ─────────────────────────────────────────── */
.ep-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Loading skeleton cards for the events grid */
.ep-card-skeleton {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  min-height: 244px;
  padding: 18px 18px 15px;
  display: flex; flex-direction: column; gap: 14px;
}
.ep-card-skeleton .ep-sk-row { display: flex; align-items: center; gap: 12px; }
.ep-sk-icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; }
.ep-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ep-sk-foot { margin-top: auto; display: flex; gap: 16px; }
.ep-sk-bar { height: 11px; border-radius: 6px; }
.ep-sk-bar.w90 { width: 90%; } .ep-sk-bar.w75 { width: 75%; }
.ep-sk-bar.w60 { width: 60%; } .ep-sk-bar.w40 { width: 40%; } .ep-sk-bar.w30 { width: 30%; }
.ep-sk-icon, .ep-sk-bar {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.11) 37%, rgba(255,255,255,0.05) 63%);
  background-size: 400% 100%;
  animation: ep-shimmer 1.4s ease infinite;
}
@keyframes ep-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.ep-event-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 244px;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  text-decoration: none;
  position: relative;
}
/* soft accent glow in the top-right corner — replaces the harsh top bar */
.ep-event-card::before {
  content: '';
  position: absolute; top: 0; right: 0; width: 60%; height: 120px;
  background: radial-gradient(ellipse 80% 90% at 90% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.ep-event-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border-2));
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}

.ep-event-card .ep-card-body {
  padding: 18px 18px 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ep-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.ep-card-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ep-card-icon svg { width: 21px; height: 21px; }
.ep-card-headtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.ep-card-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  width: 100%;
  text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.ep-card-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  width: 100%;
  text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.ep-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ep-status-pill.planning { background: var(--ep-violet-dim); color: var(--ep-violet); border: 1px solid rgba(139,92,246,0.2); }
.ep-status-pill.active   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.ep-status-pill.completed{ background: var(--glass); color: var(--text-3); border: 1px solid var(--glass-border); }
.ep-status-pill.archived { background: var(--glass); color: var(--text-3); border: 1px solid var(--glass-border); }

.ep-event-card .ep-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
}
.ep-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  color: var(--text-2);
  min-width: 0;
}
.ep-card-meta-row svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; opacity: 0.85; }
.ep-card-meta-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-card-countdown {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.ep-card-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding-top: 13px;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}
.ep-card-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}
.ep-card-stat svg { width: 15px; height: 15px; color: var(--accent); opacity: 1; }
.ep-card-stat strong { color: var(--text); font-weight: 800; font-family: var(--font-stat); }
/* status badge sits at the end of the stats row */
.ep-card-stats .ep-status-pill { margin-left: auto; }

.ep-card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  transition: background 0.2s ease;
}
.ep-event-card:hover .ep-card-footer { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.ep-card-footer svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.ep-event-card:hover .ep-card-footer svg { transform: translateX(3px); }

/* Context menu on card */
.ep-card-menu-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.ep-card-menu-btn:hover { color: var(--text); background: var(--glass); }
.ep-card-menu-btn svg { width: 15px; height: 15px; }

/* ── Empty State ───────────────────────────────────────────────── */
.ep-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}
.ep-empty-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--ep-violet-dim);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ep-empty-icon svg { width: 32px; height: 32px; color: var(--ep-violet); }
.ep-empty-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ep-empty-desc  { font-size: 14px; color: var(--text-2); max-width: 340px; line-height: 1.6; margin-bottom: 24px; }

/* ── Workspace Hub ────────────────────────────────────────────── */
.ep-workspace-hero {
  --hero-color: #8b5cf6;
  background:
    radial-gradient(135% 130% at 0% 0%, color-mix(in srgb, var(--hero-color) 18%, transparent), transparent 44%),
    radial-gradient(120% 130% at 100% 0%, color-mix(in srgb, var(--hero-color) 9%, transparent), transparent 50%),
    var(--surface-solid, #0d1728);
  border: 1px solid var(--glass-border-2);
  border-radius: 20px;
  padding: 0;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.26);
}
.ep-workspace-hero::before {
  content: '';
  position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--hero-color), color-mix(in srgb, var(--hero-color) 10%, transparent) 75%);
  pointer-events: none;
}

.ep-hero-top {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
  padding: 26px 30px 22px;
}

.ep-hero-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--hero-color) 24%, transparent);
}
.ep-hero-icon svg { width: 26px; height: 26px; }

.ep-hero-info { flex: 1; min-width: 0; }
.ep-hero-name {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.ep-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ep-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  padding: 4px 11px;
}
.ep-hero-meta-item svg { width: 13px; height: 13px; color: var(--hero-color); opacity: 0.95; }

.ep-workspace-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,0.15);
}

.ep-stat-item {
  text-align: left;
  padding: 18px 24px;
  border-right: 1px solid var(--glass-border);
}
.ep-stat-item:last-child { border-right: none; }
.ep-stat-value { font-family: 'Inter', var(--font); font-size: 26px; font-weight: 700; color: #ffffff; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1; }
.ep-stat-label { font-size: 11px; color: var(--text-2); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }

/* ── Module Cards Grid ───────────────────────────────────────── */
.ep-modules-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.ep-modules-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ep-module-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 17px 15px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}
.ep-module-card:hover {
  border-color: var(--glass-border-2);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.ep-module-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.ep-module-card:hover .ep-module-card-glow { opacity: 1; }

.ep-module-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}
.ep-module-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ep-module-icon svg { width: 20px; height: 20px; }

.ep-module-info { flex: 1; min-width: 0; }
.ep-module-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 5px; line-height: 1.3; }
.ep-module-desc  {
  font-size: 12px; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.ep-module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;              /* pin to bottom → all footers align */
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
  font-size: 12.5px;
  font-weight: 600;
}
.ep-module-footer svg { width: 14px; height: 14px; transition: transform 0.18s ease; }
.ep-module-card:hover .ep-module-footer svg { transform: translateX(3px); }

/* ── Budget Tool ──────────────────────────────────────────────── */
.ep-budget-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Budget loading skeleton (pulse, same feel as Database tool) */
.bp-skel-wrap { display: flex; flex-direction: column; gap: 24px; }
.bp-skel-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bp-skel { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; animation: bpPulse 1.4s ease infinite; }
.bp-skel-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@keyframes bpPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (max-width: 900px) { .bp-skel-row, .bp-skel-charts { grid-template-columns: 1fr 1fr; } }

/* Summary cards */
.ep-summary-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 1400px) { .ep-summary-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .ep-summary-row { grid-template-columns: repeat(2, 1fr); } }

.ep-summary-card {
  background: var(--surface);
  border: 1px solid var(--glass-border-2);
  border-radius: 14px;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.ep-summary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}

.ep-summary-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ep-summary-label svg { width: 12px; height: 12px; }

.ep-summary-value {
  font-family: 'Inter', var(--font);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.ep-summary-sub {
  font-size: 12px;
  color: var(--text-2);
}

.ep-summary-progress {
  margin-top: 12px;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}
.ep-summary-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* Budget table card */
.ep-table-card {
  background: var(--surface);
  border: 1px solid var(--glass-border-2);
  border-radius: 14px;
  overflow: hidden;
}

.ep-table-card-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border-2);
  gap: 12px;
}

.ep-table-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ep-table-card-title svg { width: 16px; height: 16px; color: var(--ep-violet); }

/* Budget table */
.ep-budget-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,0.45) transparent;
}
.ep-budget-table-wrap::-webkit-scrollbar { height: 9px; width: 9px; }
.ep-budget-table-wrap::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 99px; }
.ep-budget-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(0,212,255,0.5), rgba(124,58,237,0.5));
  border-radius: 99px;
}
.ep-budget-table-wrap::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, rgba(0,212,255,0.7), rgba(124,58,237,0.7)); }

.ep-budget-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.ep-budget-table thead th {
  padding: 15px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff !important;   /* beats dashboard.css `table thead th { color: var(--text-3) !important }` */
  text-align: left;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--glass-border-2);
  white-space: nowrap;
}
.ep-budget-table thead th.col-num { text-align: right; }

/* Column widths */
.ep-budget-table .col-drag  { width: 32px; padding: 0 4px; }
.ep-budget-table .col-name  { min-width: 180px; }
.ep-budget-table .col-unit  { width: 96px; }
.ep-budget-table .col-qty   { width: 80px; }
.ep-budget-table .col-ucost { width: 120px; }
.ep-budget-table .col-est   { width: 130px; }
.ep-budget-table .col-actual{ width: 130px; }
.ep-budget-table .col-var   { width: 120px; }
.ep-budget-table .col-status{ width: 110px; }
.ep-budget-table .col-del   { width: 40px; }

/* Category header row */
.ep-cat-row td {
  padding: 0;
  background: rgba(255,255,255,0.035);
  border-top: 1px solid var(--glass-border-2);
  border-bottom: 1px solid var(--glass-border-2);
  vertical-align: middle;
}
/* Higher specificity than `.ep-cat-row td { padding:0 }` so the total
   lines up with the item Estimated values below (12px right padding). */
.ep-cat-row td.ep-cat-total-cell { padding: 0 12px; text-align: right; }
.ep-cat-del-cell   { text-align: center; }
.ep-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
}
.ep-cat-collapse-btn {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 10px;
}
.ep-cat-collapse-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }

.ep-cat-name-input {
  flex: 1;
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  outline: none;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 7px;
  line-height: 1.3;
}
.ep-cat-name-input:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.ep-cat-name-input:focus {
  background: rgba(0,212,255,0.06);
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 2px rgba(0,212,255,0.1);
}

.ep-cat-total {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.ep-cat-name-input { font-size: 13.5px; }

.ep-cat-delete-btn {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 13px;
}
.ep-cat-delete-btn:hover { color: var(--red); background: var(--red-dim); }

/* Item rows */
.ep-item-row {
  border-bottom: 1px solid rgba(255,255,255,0.085);
  transition: background 0.15s ease;
}
.ep-item-row:hover { background: rgba(255,255,255,0.04); }

.ep-item-row td {
  padding: 10px 12px;
  vertical-align: middle;
}

.ep-drag-handle {
  color: var(--text-3);
  font-size: 14px;
  cursor: grab;
  text-align: center;
  line-height: 1;
  letter-spacing: -1px;
  padding: 0 6px;
}

/* Table inputs */
.ep-cell-input {
  width: 100%;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.ep-cell-input:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
.ep-cell-input:focus { border-color: rgba(0,212,255,0.45); background: rgba(0,212,255,0.06); box-shadow: 0 0 0 2px rgba(0,212,255,0.1); }
.ep-cell-input::placeholder { color: var(--text-3); }
.ep-cell-input[type="number"] { text-align: right; }
.ep-cell-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Custom Unit dropdown (replaces the plain text input) ──────────── */
.ep-unit-select {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 5px 8px; color: var(--text); font-size: 13.5px; font-family: var(--font);
  cursor: pointer; transition: var(--transition); text-align: left;
}
.ep-unit-select:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); }
.ep-unit-select.open { border-color: rgba(0,212,255,0.45); background: rgba(0,212,255,0.06); box-shadow: 0 0 0 2px rgba(0,212,255,0.1); }
.ep-unit-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-unit-caret { width: 13px; height: 13px; color: var(--text-3); flex-shrink: 0; transition: transform 0.18s ease, color 0.18s ease; }
.ep-unit-select.open .ep-unit-caret { transform: rotate(180deg); color: var(--cyan); }

.ep-unit-menu {
  position: fixed; z-index: 1000;
  background: #0d1728;
  border: 1px solid var(--glass-border-2);
  border-radius: 10px;
  padding: 5px;
  max-height: 240px; overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  display: flex; flex-direction: column; gap: 1px;
  min-width: 120px;
  animation: ep-unit-pop 0.12s ease;
}
@keyframes ep-unit-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ep-unit-menu::-webkit-scrollbar { width: 6px; }
.ep-unit-menu::-webkit-scrollbar-track { background: transparent; }
.ep-unit-menu::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.4); border-radius: 99px; }
.ep-unit-menu { scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.4) transparent; }
.ep-unit-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: none; border: none; border-radius: 7px;
  padding: 7px 10px; color: var(--text-2); font-size: 13px; font-family: var(--font);
  text-align: left; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.ep-unit-opt:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.ep-unit-opt.active { color: var(--cyan); background: rgba(0,212,255,0.1); font-weight: 600; }
.ep-unit-opt svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Auto-calc cells */
.ep-auto-cell {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  padding: 5px 8px;
}
.ep-auto-cell.muted { color: var(--text-3); }

/* Variance colors */
.ep-var-pos { color: var(--green); }
.ep-var-neg { color: var(--red); }

/* Status badge */
.ep-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  user-select: none;
  border: 1px solid transparent;
}
.ep-status-badge:hover { filter: brightness(1.15); }

.ep-status-badge.planned  { background: rgba(255,255,255,0.07); color: var(--text-2); border-color: var(--glass-border); }
.ep-status-badge.approved { background: var(--ep-amber-dim); color: var(--ep-amber); border-color: rgba(245,158,11,0.2); }
.ep-status-badge.spent    { background: var(--green-dim); color: var(--green); border-color: rgba(16,185,129,0.2); }

.ep-status-badge .ep-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Income & Funds table ─────────────────────────────────────── */
.ep-table-card-hint {
  font-size: 11.5px; font-weight: 500; color: var(--text-3);
  margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--glass-border);
}
.ep-funds-table .col-fund-loc    { width: 150px; }
.ep-funds-table .col-fund-status { width: 140px; }
.ep-funds-table .col-fund-amt    { width: 150px; }
.ep-funds-table .col-name        { min-width: 220px; }

.ep-funds-empty {
  padding: 26px 16px; text-align: center;
  font-size: 13px; color: var(--text-2);
}

/* Location badge (Hand / Bank) — clickable toggle */
.ep-fund-loc-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; user-select: none; border: 1px solid transparent;
  transition: filter 0.18s ease;
}
.ep-fund-loc-badge:hover { filter: brightness(1.15); }
.ep-fund-loc-badge.hand { background: rgba(0,212,255,0.12);  color: var(--cyan);      border-color: rgba(0,212,255,0.22); }
.ep-fund-loc-badge.bank { background: rgba(139,92,246,0.14); color: var(--ep-violet); border-color: rgba(139,92,246,0.22); }

/* Status badge (Receivable / Confirmed / Received) */
.ep-fund-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; user-select: none; border: 1px solid transparent;
  transition: filter 0.18s ease;
}
.ep-fund-status-badge:hover { filter: brightness(1.15); }
.ep-fund-status-badge .ep-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ep-fund-status-badge.receivable { background: rgba(255,255,255,0.06); color: var(--text-2);  border-color: var(--glass-border); }
.ep-fund-status-badge.confirmed  { background: var(--ep-amber-dim);    color: var(--ep-amber); border-color: rgba(245,158,11,0.22); }
.ep-fund-status-badge.received   { background: var(--green-dim);       color: var(--green);    border-color: rgba(16,185,129,0.25); }

.ep-funds-table .col-fund-amt .ep-cell-input { font-family: var(--font-stat); font-weight: 700; }

/* Delete button in row */
.ep-row-del {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  margin: auto;
}
.ep-item-row:hover .ep-row-del { opacity: 1; }
.ep-row-del:hover { color: var(--red); background: var(--red-dim); }
.ep-row-del svg { width: 13px; height: 13px; }

/* Add row / add category */
.ep-add-item-row td { padding: 8px 12px 10px; }
.ep-add-item-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: none;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text-3);
  font-size: 12.5px;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}
.ep-add-item-btn:hover { color: var(--cyan); border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.1); }
.ep-add-item-btn svg { width: 12px; height: 12px; }

.ep-add-category-wrap {
  padding: 12px 14px;
  border-top: 1px solid var(--glass-border);
}
.ep-add-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: none;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}
.ep-add-cat-btn:hover { color: var(--cyan); border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.1); }
.ep-add-cat-btn svg { width: 14px; height: 14px; }

/* Generic EP page header (title + back, used where there's no topbar) */
.ep-page-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.ep-page-h1 {
  font-size: 22px; font-weight: 600; color: #ffffff;
  margin: 0; line-height: 1.1; letter-spacing: -0.01em;
  font-family: var(--font-display, var(--font));
}
.ep-page-head .ep-save-indicator { margin-left: 4px; }

/* Budget table-card action cluster (export / print / calc / add) */
.ep-table-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Charts section */
.ep-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .ep-charts-row { grid-template-columns: 1fr; }
}

/* Pie chart with a scrollable legend list on the right */
.ep-pie-row { display: flex; align-items: center; gap: 18px; }
.ep-pie-canvas { width: 200px; height: 200px; flex-shrink: 0; }
.ep-pie-legend {
  flex: 1; min-width: 0;
  max-height: 200px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding-right: 4px;
}
.ep-pie-legend::-webkit-scrollbar { width: 6px; }
.ep-pie-legend::-webkit-scrollbar-track { background: transparent; }
.ep-pie-legend::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.45); border-radius: 99px; }
.ep-pie-legend::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.7); }
.ep-pie-legend { scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.45) transparent; }
.ep-pie-leg-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 6px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-2); transition: background 0.15s;
}
.ep-pie-leg-item:hover { background: rgba(255,255,255,0.04); }
.ep-pie-leg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.ep-pie-leg-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-pie-leg-val {
  flex-shrink: 0; font-weight: 600; color: var(--text);
  font-family: 'Inter', var(--font); font-variant-numeric: tabular-nums;
}

.ep-chart-card {
  background: var(--surface);
  border: 1px solid var(--glass-border-2);
  border-radius: 14px;
  padding: 20px 22px;
}

.ep-chart-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ep-chart-card-title svg { width: 14px; height: 14px; color: var(--ep-violet); }

.ep-chart-canvas-wrap {
  position: relative;
  height: 220px;
}

/* ── Calculator Floating Window ─────────────────────────────────── */
.ep-calc-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 256px;
  background: #0a1422;
  border: 1px solid rgba(0,212,255,0.5);
  border-radius: 14px;
  z-index: 600;
  display: none;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65), 0 0 0 1px rgba(0,212,255,0.18), 0 0 24px rgba(0,212,255,0.16);
  overflow: hidden;
  resize: both;
  min-width: 240px; min-height: 392px;
  max-width: 520px; max-height: 760px;
  font-family: 'DM Sans', var(--font);
}
/* keypad fills the extra space when the calculator is resized larger */
.ep-calc-keypad { flex: 1; grid-auto-rows: 1fr; }
.ep-calc-panel.open { display: flex; }

.ep-calc-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  background: rgba(255,255,255,0.02);
}
.ep-calc-header:active { cursor: grabbing; }
.ep-calc-title { font-size: 12px; font-weight: 700; color: #ffffff; letter-spacing: 0.05em; text-transform: uppercase; }
.ep-calc-actions { display: flex; align-items: center; gap: 6px; }
.ep-calc-iconbtn {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.ep-calc-iconbtn:hover { color: var(--cyan); border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.1); }
.ep-calc-iconbtn svg { width: 13px; height: 13px; }

/* History drawer */
.ep-calc-drawer {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 62%;
  background: #0a1422;
  border-top: 1px solid rgba(0,212,255,0.25);
  border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(101%);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
  z-index: 2;
}
.ep-calc-drawer.open { transform: translateY(0); }
.ep-calc-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--glass-border);
  font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.05em;
}

.ep-calc-display {
  padding: 12px 14px 10px;
  text-align: right;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.2);
}
.ep-calc-expr {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-family: 'DM Sans', var(--font);
  font-variant-numeric: tabular-nums;
  min-height: 16px;
  word-break: break-all;
  margin-bottom: 4px;
}
.ep-calc-result {
  font-family: 'DM Sans', var(--font);
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.ep-calc-history {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 8px 14px 12px;
}
.ep-calc-history:empty::before {
  content: 'No calculations yet.';
  font-size: 12px; color: var(--text-3); font-family: var(--font);
}
.ep-calc-history-item {
  font-size: 12.5px;
  color: var(--text-2);
  font-family: 'DM Sans', var(--font);
  line-height: 1.9;
  cursor: pointer;
  padding: 3px 6px; border-radius: 6px;
  word-break: break-all;
}
.ep-calc-history-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.ep-calc-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--glass-border);
}
.ep-calc-key {
  padding: 13px 6px;
  background: #0a1120;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: 'DM Sans', var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s ease;
  display: flex; align-items: center; justify-content: center;
}
.ep-calc-key:hover  { background: rgba(255,255,255,0.06); }
.ep-calc-key:active { background: rgba(255,255,255,0.12); transform: scale(0.95); }
.ep-calc-key.op     { color: var(--cyan); background: rgba(0,212,255,0.04); }
.ep-calc-key.op:hover{ background: rgba(0,212,255,0.1); }
.ep-calc-key.eq     { background: rgba(0,212,255,0.16); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(0,212,255,0.4); }
.ep-calc-key.eq:hover{ background: rgba(0,212,255,0.26); }
.ep-calc-key.clear  { color: var(--red); background: var(--red-dim); }
.ep-calc-key.clear:hover { background: rgba(244,63,94,0.2); }
.ep-calc-key.mem    { font-size: 10px; color: var(--text-2); background: rgba(255,255,255,0.03); }

/* Budget notes cell tooltip */
.ep-notes-btn {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.ep-notes-btn:hover { color: var(--cyan); background: rgba(0,212,255,0.1); }

/* ── Confirm Dialog (for delete) ───────────────────────────────── */
.ep-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ep-overlay-in 0.15s ease;
}
.ep-confirm-box {
  background: #0a1020;
  border: 1px solid var(--glass-border-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 380px;
  width: 90%;
  animation: ep-modal-in 0.2s var(--ease);
}
.ep-confirm-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ep-confirm-desc  { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 22px; }
.ep-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Floating Gal Agent button ──────────────────────────────────── */
.ep-agent-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--grad-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,212,255,0.3);
  z-index: 900;
  transition: all 0.22s var(--ease);
}
.ep-agent-fab:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(0,212,255,0.4); }
.ep-agent-fab svg { width: 22px; height: 22px; color: #fff; }
.ep-agent-fab-label {
  position: absolute;
  right: 60px;
  background: #0a1020;
  border: 1px solid var(--glass-border-2);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ep-agent-fab:hover .ep-agent-fab-label { opacity: 1; }

/* ══════════════════════════════════════════════════════════════════
   COMMITTEE MANAGEMENT  (ec-* prefix)
   ══════════════════════════════════════════════════════════════════ */

/* Full-height layout so canvas fills the viewport */
.ec-full-layout { height: 100vh; overflow: hidden; }

/* ec-shell also carries main-area so dashboard.js sidebar-collapse logic applies automatically.
   Override main-area's min-height and overflow so the canvas fills exactly the remaining space. */
.ec-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
}

/* Three-panel body */
.ec-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ── Topbar extras ────────────────────────────────────────── */
.ec-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 3px;
}
.ec-tab {
  padding: 5px 16px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.ec-tab.active {
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
}
.ec-tab:not(.active):hover { color: var(--text); background: rgba(255,255,255,0.06); }

.ec-topbar-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.ec-topbar-btn:hover { color: var(--text); border-color: var(--glass-border-2); background: rgba(255,255,255,0.07); }
.ec-topbar-btn.active { color: var(--cyan); border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.08); }
.ec-topbar-btn.primary { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.3); color: var(--cyan); font-weight: 600; }
.ec-topbar-btn.primary:hover { background: rgba(0,212,255,0.18); border-color: rgba(0,212,255,0.5); }

/* ── Members panel (left) ─────────────────────────────────── */
.ec-members-panel {
  width: 230px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  background: rgba(4,8,15,0.5);
  overflow: hidden;
}

.ec-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ec-panel-title { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ec-member-count {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-3);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  padding: 1px 7px;
}

.ec-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ec-search-icon { width: 13px; height: 13px; color: var(--text-3); flex-shrink: 0; }
.ec-search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
}
.ec-search::placeholder { color: var(--text-3); }

.ec-members-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.ec-members-list::-webkit-scrollbar { width: 3px; }
.ec-members-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 99px; }

.ec-member-chip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-bottom: 2px;
  position: relative;
}
.ec-member-chip:hover { background: rgba(255,255,255,0.05); }
.ec-member-chip:hover .ec-chip-add-icon { opacity: 1; }

.ec-member-avatar-sm {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(139,92,246,0.15);
  color: var(--ep-violet);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.ec-member-chip-info { flex: 1; min-width: 0; }
.ec-member-chip-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ec-member-chip-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.ec-member-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec-member-chip-unassigned { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.ec-chip-add-icon { width: 14px; height: 14px; color: var(--ep-violet); opacity: 0; transition: opacity 0.15s ease; flex-shrink: 0; margin-top: 7px; }

.ec-panel-footer {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--glass-border);
  text-align: center;
  flex-shrink: 0;
}

.ec-empty-msg {
  text-align: center;
  padding: 24px 12px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
}

.ec-list-skeleton {
  height: 38px;
  background: var(--glass);
  border-radius: 10px;
  margin-bottom: 6px;
  animation: ep-skeleton 1.4s ease infinite;
}

/* ── Canvas viewport (center) ────────────────────────────── */
.ec-canvas-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #03070e;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 36px 36px;
}

.ec-canvas-world {
  position: absolute;
  width: 4000px;
  height: 3000px;
  transform-origin: 0 0;
}

.ec-connections-svg {
  position: absolute;
  top: 0; left: 0;
  width: 4000px; height: 3000px;
  pointer-events: none;
  overflow: visible;
}

/* Empty state overlay */
.ec-canvas-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

/* Zoom controls */
.ec-zoom-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 4px;
}
.ec-zoom-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(10,16,32,0.9);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.ec-zoom-btn:hover { color: var(--text); border-color: var(--glass-border-2); }
.ec-zoom-fit { width: auto; padding: 0 10px; font-size: 12px; font-family: var(--font); font-weight: 600; }

/* Connection drag hint (shown in temp SVG path, no banner needed) */

/* ── Committee nodes ─────────────────────────────────────── */
.ec-node {
  position: absolute;
  width: 240px;
  background: rgba(7,12,24,0.97);
  border: 1.5px solid rgba(0,212,255,0.25);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.55);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.ec-node:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.65); }
.ec-node.selected {
  box-shadow: 0 0 0 2px rgba(139,92,246,0.55), 0 8px 28px rgba(0,0,0,0.65);
}
.ec-node.connect-target {
  box-shadow: 0 0 0 2px rgba(0,212,255,0.8), 0 0 24px rgba(0,212,255,0.2);
}

/* Drag area = header + sub-row combined */
.ec-node-drag-area { cursor: grab; }
.ec-node-drag-area:active { cursor: grabbing; }

.ec-node-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 8px 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ec-node-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ec-node-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Progress ring */
.ec-node-ring { flex-shrink: 0; display: flex; align-items: center; }

/* Expand/collapse chevron */
.ec-node-chevron-btn {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  padding: 0;
}
.ec-node-chevron-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.ec-chevron { width: 13px; height: 13px; transition: transform 0.22s var(--ease); }
.ec-chevron.open { transform: rotate(180deg); }

/* Delete button */
.ec-node-del {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
  padding: 0;
}
.ec-node:hover .ec-node-del { opacity: 1; }
.ec-node-del:hover { color: var(--red); background: var(--red-dim); }
.ec-node-del svg { width: 11px; height: 11px; }

/* Sub-header row (head name) */
.ec-node-subrow {
  padding: 7px 12px 8px;
}
.ec-node-head-name { font-size: 12px; color: var(--text-2); }
.ec-node-head-empty { font-size: 12px; color: var(--text-3); font-style: italic; }

/* Expanded member list */
.ec-node-body-exp {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 6px 10px 8px;
}
.ec-node-empty-members { font-size: 11.5px; color: var(--text-3); padding: 4px 2px; text-align: center; }

.ec-node-mem-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 2px;
  border-radius: 7px;
  transition: background 0.15s ease;
}
.ec-node-mem-row:hover { background: rgba(255,255,255,0.04); }

.ec-node-mem-av {
  width: 22px; height: 22px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ec-node-mem-name {
  flex: 1;
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec-node-mem-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-3);
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 1px 4px;
  flex-shrink: 0;
}

/* Connection handle — bottom-center, shows on hover */
.ec-conn-handle {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid #03070e;
  cursor: crosshair;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}
.ec-node:hover .ec-conn-handle { opacity: 1; }
.ec-conn-handle:hover { transform: translateX(-50%) scale(1.35); }

/* ── Detail panel (right) ────────────────────────────────── */
.ec-detail-panel {
  width: 0;
  flex-shrink: 0;
  overflow: hidden;
  border-left: 1px solid transparent;
  background: rgba(6,12,24,0.8);
  transition: width 0.25s var(--ease), border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}
.ec-detail-panel.open {
  width: 280px;
  border-left-color: var(--glass-border);
}

.ec-detail-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.ec-detail-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ec-detail-color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ec-detail-name-wrap { flex: 1; min-width: 0; }
.ec-detail-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  border-radius: 5px;
  padding: 1px 4px;
  margin: -1px -4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec-detail-name[contenteditable="true"]:hover { background: rgba(255,255,255,0.04); }
.ec-detail-name[contenteditable="true"]:focus { background: rgba(139,92,246,0.08); box-shadow: 0 0 0 2px rgba(139,92,246,0.25); }
.ec-detail-close-btn {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.ec-detail-close-btn:hover { color: var(--text); }

.ec-detail-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ec-detail-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.ec-detail-members-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-bottom: none;
}
.ec-detail-members-list {
  flex: 1;
  overflow-y: auto;
  margin-top: 8px;
}
.ec-detail-members-list::-webkit-scrollbar { width: 3px; }
.ec-detail-members-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 99px; }

.ec-detail-member-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 4px;
  border-radius: 9px;
  transition: background 0.15s ease;
}
.ec-detail-member-row:hover { background: rgba(255,255,255,0.04); }

.ec-detail-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.ec-detail-member-info { flex: 1; min-width: 0; }
.ec-detail-member-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-detail-member-role { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.ec-detail-remove-btn {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.ec-detail-member-row:hover .ec-detail-remove-btn { opacity: 1; }
.ec-detail-remove-btn:hover { color: var(--red); background: var(--red-dim); }

.ec-detail-add-btn {
  background: none;
  border: none;
  color: var(--ep-violet);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
}
.ec-detail-add-btn:hover { color: #a78bfa; }

.ec-detail-empty {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
  padding: 8px 4px;
}
.ec-detail-empty em { color: var(--ep-violet); font-style: normal; }

.ec-detail-footer-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

/* ── Workspace page title + hero edit pencil ─────────────────────── */
.ep-ws-pagetitle {
  display: flex; align-items: center; justify-content: flex-start; gap: 14px;
  position: relative;
  margin: 4px 0 22px;
  font-family: var(--font-display, var(--font));
  font-size: 22px; font-weight: 600; color: #ffffff; letter-spacing: -0.01em;
}
.ep-ws-pagetitle > span { display: inline-block; }
.ep-ws-back {
  position: static; transform: none; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-2); transition: var(--transition);
}
.ep-ws-back:hover { color: var(--text); border-color: var(--glass-border-2); background: rgba(255,255,255,0.06); }

.ep-hero-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ep-hero-name-row .ep-hero-name { margin-bottom: 0; }
.ep-hero-edit {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-2); cursor: pointer; transition: var(--transition);
}
.ep-hero-edit:hover { color: var(--cyan); border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.1); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1400px) { .ep-modules-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) {
  .ep-workspace-stats { grid-template-columns: repeat(2, 1fr); }
  .ep-stat-item:nth-child(2) { border-right: none; }
  .ep-stat-item:nth-child(1), .ep-stat-item:nth-child(2) { border-bottom: 1px solid var(--glass-border); }
  .ep-modules-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ep-modules-grid { grid-template-columns: 1fr; }
  .ep-ws-pagetitle { font-size: 20px; }
}

@media (max-width: 700px) {
  .ep-events-grid { grid-template-columns: 1fr; }
  .ep-form-row { grid-template-columns: 1fr; }
}

/* ================================================================
   COMMITTEE — member add button + assign work styles
   ================================================================ */

.ec-add-member-btn {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.ec-add-member-btn:hover {
  background: rgba(0, 212, 255, 0.18);
  border-color: rgba(0, 212, 255, 0.45);
}

.ec-aw-assignees {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px 0;
}
.ec-aw-assignee-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-2);
}
.ec-aw-assignee-row:hover { background: var(--glass); }
.ec-aw-cb { accent-color: var(--cyan); width: 14px; height: 14px; cursor: pointer; }
.ec-aw-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.12);
  color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}

/* ================================================================
   GENERAL PLANNER — Kanban board
   ================================================================ */

.ep-planner-layout { height: 100vh; overflow: hidden; }

.ep-planner-shell {
  display: flex;
  flex-direction: column;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  min-width: 0;
}

/* Board */
.ep-planner-board {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 20px 24px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
}
.ep-planner-board::-webkit-scrollbar { height: 6px; }
.ep-planner-board::-webkit-scrollbar-track { background: transparent; }
.ep-planner-board::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Column */
.ep-kanban-col {
  flex-shrink: 0;
  width: 290px;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.028);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
}

.ep-kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  flex-shrink: 0;
}

.ep-col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ep-col-todo       { background: #94a3b8; }
.ep-col-inprogress { background: #f59e0b; }
.ep-col-review     { background: #8b5cf6; }
.ep-col-done       { background: #10b981; }

.ep-kanban-col-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font);
}

.ep-kanban-count {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

/* Task list (drop target) */
.ep-kanban-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.ep-kanban-list::-webkit-scrollbar { width: 3px; }
.ep-kanban-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.ep-kanban-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 12.5px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  flex-shrink: 0;
  border-top: 1px solid transparent;
}
.ep-kanban-add-btn:hover { color: var(--text); border-top-color: var(--glass-border); }

/* Sortable ghost */
.ep-card-ghost {
  opacity: 0.3;
  background: rgba(255,255,255,0.06) !important;
  border: 1px dashed rgba(255,255,255,0.2) !important;
}

/* Task card */
.ep-kanban-card {
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0;
  transition: border-color 0.18s, transform 0.12s;
  position: relative;
}
.ep-kanban-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.ep-card-grab {
  padding: 10px 6px;
  color: var(--text-3);
  cursor: grab;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 14px;
  opacity: 0;
  transition: opacity 0.15s;
}
.ep-kanban-card:hover .ep-card-grab { opacity: 1; }
.ep-card-grab:active { cursor: grabbing; }

.ep-card-body {
  flex: 1;
  padding: 10px 12px 10px 4px;
  min-width: 0;
}

.ep-card-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ep-card-priority-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  font-family: var(--font);
  letter-spacing: 0.2px;
}

.ep-card-committee-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid;
  font-family: var(--font);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
  word-break: break-word;
  margin-bottom: 8px;
}

.ep-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ep-card-avs {
  display: flex;
  gap: -4px;
}

.ep-card-av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.12);
  color: var(--cyan);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg, #03070e);
  font-family: var(--font);
  margin-left: -4px;
}
.ep-card-av:first-child { margin-left: 0; }

.ep-card-deadline {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  font-family: var(--font);
  white-space: nowrap;
}
.ep-card-overdue { color: #f43f5e; }

.ep-card-check {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

/* ── Task Detail Panel ──────────────────────────────────────── */

.ep-task-detail {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  background: var(--surface, #0b1120);
  border-left: 1px solid var(--glass-border);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.ep-task-detail.open { transform: translateX(0); }

.ep-task-detail-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  min-height: 52px;
}

.ep-task-source-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.ep-detail-close-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.ep-detail-close-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.ep-task-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 24px;
}
.ep-task-detail-body::-webkit-scrollbar { width: 3px; }
.ep-task-detail-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.ep-detail-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}
.ep-detail-section:last-child { border-bottom: none; }

.ep-detail-title-section { padding: 20px 20px 16px; }

.ep-detail-task-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 24px;
  outline: none;
  word-break: break-word;
}
.ep-detail-task-title:focus {
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.ep-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
}
.ep-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  font-family: var(--font);
  width: 72px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ep-detail-select {
  flex: 1;
  height: 32px;
  font-size: 13px;
}
.ep-detail-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font);
}

.ep-detail-assignees-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 160px;
  overflow-y: auto;
}
.ep-detail-assignee-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-2);
}
.ep-detail-assignee-row:hover { background: var(--glass); }
.ep-detail-assignee-cb { accent-color: var(--cyan); cursor: pointer; }

.ep-detail-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.12);
  color: var(--ep-violet);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
  flex-shrink: 0;
}

/* Checklist */
.ep-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.ep-cl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
}
.ep-cl-item:hover { background: var(--glass); }
.ep-cl-cb { accent-color: var(--cyan); width: 14px; height: 14px; flex-shrink: 0; cursor: pointer; }
.ep-cl-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
  font-family: var(--font);
  word-break: break-word;
}
.ep-cl-done { text-decoration: line-through; color: var(--text-3); }
.ep-cl-del {
  width: 18px; height: 18px;
  border: none; background: none;
  color: var(--text-3);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.ep-cl-item:hover .ep-cl-del { opacity: 1; }
.ep-cl-del:hover { color: #f43f5e; }

.ep-cl-add-row {
  display: flex;
  gap: 6px;
}
.ep-cl-add-row input { flex: 1; height: 32px; font-size: 13px; }
.ep-cl-add-btn {
  padding: 0 12px;
  height: 32px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.ep-cl-add-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* Danger zone */
.ep-detail-danger { border-top: 1px solid var(--glass-border); padding: 16px 20px; }
.ep-danger-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #f43f5e;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
}
.ep-danger-btn:hover { background: rgba(244, 63, 94, 0.18); }

/* Overlay backdrop */
.ep-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 299;
  display: none;
}
.ep-detail-overlay.active { display: block; }

/* Assignee checkboxes in create modal */
.ep-assignee-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 8px;
}
.ep-assignee-checkboxes::-webkit-scrollbar { width: 3px; }
.ep-assignee-checkboxes::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ================================================================
   COMMITTEE — members, invites, access control
   ================================================================ */

/* Avatars that may hold a Google profile image */
.ec-av { overflow: hidden; }
.ec-av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Notify & Call count chip on the topbar button */
.ec-notify-count {
  min-width: 17px; height: 17px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--cyan);
  color: #03070e;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 2px;
  font-family: var(--font);
}

/* Member chip name row + status pill */
.ec-member-chip-name-row {
  display: flex; align-items: center; gap: 6px; justify-content: space-between;
}
.ec-status-pill {
  font-size: 9.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px;
  letter-spacing: 0.3px; white-space: nowrap;
  font-family: var(--font); flex-shrink: 0;
}
.ec-status-pill.imported { background: rgba(148,175,200,0.12); color: #8ba4c0; }
.ec-status-pill.invited  { background: rgba(245,158,11,0.14);  color: #f59e0b; }
.ec-status-pill.accepted { background: rgba(16,185,129,0.14);  color: #34d399; }
.ec-status-pill.declined { background: rgba(244,63,94,0.13);   color: #fb7185; }

.ec-member-chip-acc { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.ec-acc-badge {
  font-size: 9.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 5px;
  font-family: var(--font);
}
.ec-acc-badge.owner  { background: rgba(245,158,11,0.14);  color: #f59e0b; }
.ec-acc-badge.mgr    { background: rgba(139,92,246,0.16);  color: #a78bfa; }
.ec-acc-badge.assign { background: rgba(0,212,255,0.12);   color: var(--cyan); }

.ec-member-chip-unassigned { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }

/* Add / Import modal tabs */
.ec-addtabs {
  display: flex; gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid var(--glass-border);
}
.ec-addtab {
  padding: 11px 14px;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-size: 13px; font-weight: 600;
  font-family: var(--font);
  cursor: pointer; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.ec-addtab:hover { color: var(--text-2); }
.ec-addtab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* Spreadsheet drop zone */
.ec-import-drop {
  border: 1.5px dashed var(--glass-border);
  border-radius: 12px;
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  color: var(--text-3);
}
.ec-import-drop:hover { border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.03); color: var(--text-2); }
.ec-import-drop svg { color: var(--cyan); margin-bottom: 8px; }
.ec-import-drop-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ec-import-drop-sub { font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }

.ec-import-summary { font-size: 13px; color: var(--text-2); margin: 14px 0 8px; }
.ec-import-rows {
  max-height: 200px; overflow-y: auto;
  border: 1px solid var(--glass-border); border-radius: 10px;
}
.ec-import-rows::-webkit-scrollbar { width: 3px; }
.ec-import-rows::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.ec-import-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px; border-bottom: 1px solid var(--glass-border);
}
.ec-import-row:last-child { border-bottom: none; }
.ec-import-row-name { font-size: 12.5px; color: var(--text); font-weight: 500; }
.ec-import-row-email { font-size: 11.5px; color: var(--text-3); }
.ec-import-more { padding: 8px 12px; font-size: 11.5px; color: var(--text-3); text-align: center; }

/* Notify modal */
.ec-notify-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.ec-notify-head { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; line-height: 1.5; }
.ec-notify-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.ec-notify-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ec-notify-email { font-size: 11.5px; color: var(--text-3); }
.ec-notify-empty { text-align: center; padding: 26px 14px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.ec-notify-empty span { font-size: 11.5px; color: var(--text-3); }

/* Assign-modal permissions */
.ec-perms-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 12px;
  color: var(--text-3); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ec-perms-divider::before, .ec-perms-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--glass-border);
}
.ec-field-hint { font-size: 11px; color: var(--text-3); margin-top: 5px; line-height: 1.45; }

/* Core committee toggle */
.ec-core-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ec-core-toggle input { margin-top: 2px; accent-color: var(--cyan); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.ec-core-toggle-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ec-core-toggle-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; line-height: 1.45; }

/* ================================================================
   COMMITTEE v2 — refined panel, filters, typeahead, contrast, radius
   ================================================================ */

/* #11 Brighter labels & instruction text */
.ec-panel-title       { color: #c2d0e6; }
.ec-panel-footer      { color: var(--text-2); }
.ec-search::placeholder { color: #8497b3; }
.ec-node-mem-name     { color: var(--text); }
.ec-node-head-name    { color: var(--text); }
.ec-detail-section-label { color: #b8c6dd; }
.ec-field-hint        { color: var(--text-2); }
.ep-modal-subtitle    { color: var(--text-2); }
.ec-detail-member-role{ color: var(--text-2); }

/* #10 Less-rounded buttons throughout the tool */
.ec-full-layout .ec-topbar-btn,
.ec-full-layout .btn,
.ec-full-layout .btn-sm { border-radius: 7px; }
.ec-full-layout .ec-tab,
.ec-full-layout .ec-zoom-btn,
.ec-full-layout .ec-filter-btn,
.ec-full-layout .ec-detail-add-btn,
.ec-full-layout .ec-addtab { border-radius: 6px; }
.ec-full-layout .ec-tabs { border-radius: 8px; }

/* Icon-only topbar button (theme toggle) */
.ec-icon-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.ec-icon-btn:hover { color: var(--text); border-color: var(--glass-border-2); background: rgba(255,255,255,0.07); }

/* #2 #3 #4  Members panel — dividers, email line, professional committee list */
.ec-members-list { padding: 4px 0; }
.ec-member-chip {
  border-radius: 0;
  margin-bottom: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--glass-border);
  align-items: flex-start;
}
.ec-member-chip:last-child { border-bottom: none; }
.ec-member-chip-name { font-size: 13px; font-weight: 700; }
.ec-mem-email {
  font-size: 11px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.ec-mem-coms { margin-top: 7px; display: flex; flex-direction: column; gap: 4px; }
.ec-mem-com-line {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px;
}
.ec-mem-com-bullet { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ec-mem-com-name { color: var(--text); font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-mem-com-role {
  font-size: 10px; font-weight: 600; color: var(--text-2);
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 5px; padding: 1px 6px; flex-shrink: 0;
}
.ec-mem-unassigned { font-size: 11px; color: var(--text-3); margin-top: 6px; font-style: italic; }

/* #5  Filter button + menu */
.ec-search-wrap { position: relative; }
.ec-filter-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-2); cursor: pointer; flex-shrink: 0; position: relative;
  transition: var(--transition);
}
.ec-filter-btn:hover { color: var(--text); border-color: var(--glass-border-2); }
.ec-filter-btn svg { width: 13px; height: 13px; }
.ec-filter-dot {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); border: 1.5px solid var(--bg);
}
.ec-filter-menu {
  position: absolute; top: calc(100% + 6px); right: 8px; z-index: 60;
  width: 220px; max-height: 360px; overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--glass-border-2);
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.5);
  padding: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.45) transparent;
}
.ec-filter-menu::-webkit-scrollbar { width: 5px; }
.ec-filter-menu::-webkit-scrollbar-track { background: transparent; }
.ec-filter-menu::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(0,212,255,0.5), rgba(124,58,237,0.5)); border-radius: 99px; }
.ec-filter-menu::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(0,212,255,0.75), rgba(124,58,237,0.75)); }
.ec-filter-group { margin-bottom: 6px; }
.ec-filter-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); padding: 6px 8px 4px;
}
.ec-filter-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 8px; border-radius: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-size: 12.5px; font-family: var(--font); text-align: left;
  transition: background 0.15s, color 0.15s;
}
.ec-filter-opt:hover { background: var(--glass); color: var(--text); }
.ec-filter-opt.active { background: rgba(0,212,255,0.12); color: var(--cyan); }
.ec-filter-empty { padding: 4px 8px 8px; font-size: 11.5px; color: var(--text-3); }
.ec-filter-clear {
  width: 100%; margin-top: 4px; padding: 7px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 6px;
  color: var(--text-2); font-size: 12px; font-weight: 600; font-family: var(--font); cursor: pointer;
}
.ec-filter-clear:hover { color: var(--text); }

/* #9  Member typeahead */
.ec-typeahead { position: relative; }
.ec-typeahead-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 70;
  max-height: 240px; overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--glass-border-2); border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  padding: 4px;
}
.ec-typeahead-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  transition: background 0.15s;
}
.ec-typeahead-opt:hover { background: var(--glass); }
.ec-typeahead-av {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: rgba(139,92,246,0.15); color: var(--ep-violet);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.ec-typeahead-info { min-width: 0; }
.ec-typeahead-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-typeahead-email { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-typeahead-empty { padding: 10px 8px; font-size: 12px; color: var(--text-3); text-align: center; }

/* Detail panel — member name + status pill row */
.ec-detail-member-name-row { display: flex; align-items: center; gap: 7px; }
.ec-detail-member-name-row .ec-detail-member-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================
   #12  LIGHT THEME  (body.ec-light) — workspace goes light, nav stays dark
   ================================================================ */
body.ec-light {
  --bg: #eef2f8;
  --bg-2: #e4eaf3;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f3f6fb;
  --surface-3: #eaf0f7;
  --glass: rgba(22, 42, 80, 0.045);
  --glass-border: rgba(22, 42, 80, 0.13);
  --glass-border-2: rgba(22, 42, 80, 0.22);
  --text: #15233a;
  --text-2: #46597a;
  --text-3: #6f83a1;
  --cyan: #0093c4;
}

/* Keep the shared sidebar on its dark palette for app-wide consistency */
body.ec-light .sidebar {
  --bg: #04080f; --surface: rgba(13,23,40,0.72); --surface-solid: #0d1728;
  --glass: rgba(255,255,255,0.04); --glass-border: rgba(255,255,255,0.08); --glass-border-2: rgba(255,255,255,0.13);
  --text: #e8f0fd; --text-2: #aab9d0; --text-3: #7387a3;
}

/* Surfaces that hardcode dark colours need explicit light values */
body.ec-light .ep-topbar { background: rgba(255,255,255,0.85); }
body.ec-light .ec-members-panel { background: #f7f9fc; }
body.ec-light .ec-detail-panel { background: #f7f9fc; }
body.ec-light .ec-canvas-viewport {
  background-color: #eef2f8;
  background-image:
    linear-gradient(rgba(22,42,80,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,42,80,0.06) 1px, transparent 1px);
}
body.ec-light .ec-node {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(22,42,80,0.10);
}
body.ec-light .ec-node:hover { box-shadow: 0 8px 24px rgba(22,42,80,0.16); }
body.ec-light .ec-node-header { border-bottom-color: rgba(22,42,80,0.08); }
body.ec-light .ec-node-body-exp { border-top-color: rgba(22,42,80,0.08); }
body.ec-light .ec-node-mem-row:hover { background: rgba(22,42,80,0.05); }
body.ec-light .ec-conn-handle { border-color: #ffffff; }
body.ec-light .ec-zoom-btn { background: rgba(255,255,255,0.92); }
body.ec-light .ec-tab:not(.active):hover { color: var(--text); background: rgba(22,42,80,0.06); }
body.ec-light .ec-member-chip:hover { background: rgba(22,42,80,0.045); }
body.ec-light .ec-topbar-btn:hover,
body.ec-light .ec-icon-btn:hover { background: rgba(22,42,80,0.06); }
body.ec-light .ep-modal { background: #ffffff; }
body.ec-light .ec-node-mem-badge { background: rgba(22,42,80,0.07); }
body.ec-light .ec-status-pill.imported { background: rgba(100,116,139,0.16); color: #475569; }
body.ec-light .ep-modal-overlay { background: rgba(20,30,50,0.45); }
/* Brighter-on-dark label tweaks shouldn't wash out on light */
body.ec-light .ec-panel-title { color: var(--text-2); }
body.ec-light .ec-detail-section-label { color: var(--text-2); }
body.ec-light .ec-search::placeholder { color: var(--text-3); }
body.ec-light .ec-node-name,
body.ec-light .ec-node-mem-name,
body.ec-light .ec-mem-com-name { color: var(--text); }
body.ec-light .ep-input,
body.ec-light .ep-textarea,
body.ec-light .ep-select {
  background: #ffffff;
  border-color: rgba(22,42,80,0.18);
}
body.ec-light .ep-input::placeholder,
body.ec-light .ep-textarea::placeholder { color: var(--text-3); }
body.ec-light .ec-tabs { background: rgba(22,42,80,0.05); }
body.ec-light .ec-search { color: var(--text); }
/* select dropdown arrow uses currentColor-ish; ensure readable option text on some browsers */
body.ec-light .ep-select option { color: #15233a; background: #ffffff; }

/* #10 — softer radius on inputs/selects within the tool */
.ec-full-layout .ep-input,
.ec-full-layout .ep-textarea,
.ec-full-layout .ep-select { border-radius: 8px; }

/* ================================================================
   TO DO'S  (General Planner) — scope toggle, stats, classroom cards
   ================================================================ */
.ep-todo-scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px 26px 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.ep-todo-scroll::-webkit-scrollbar { width: 8px; }
.ep-todo-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* To-Do page content — vertical rhythm so cards never overlap */
.ep-todo-content { display: flex; flex-direction: column; gap: 20px; }

/* To-Do page header (back + title, no topbar) */
.ep-todo-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 2px;
}
.ep-todo-pagetitle {
  font-size: 21px; font-weight: 600; color: #ffffff;
  letter-spacing: -0.01em; margin: 0; line-height: 1.1;
  font-family: var(--font-display, var(--font));
}

/* To-Do loading state */
.ep-todo-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 70px 0; color: var(--text-2); font-size: 14px; font-weight: 500;
}

/* Scope toggle — segmented bar */
.ep-scope-bar {
  display: inline-flex; flex-wrap: wrap; align-self: flex-end; gap: 3px;
  padding: 4px; border-radius: 13px;
  background: var(--glass); border: 1px solid var(--glass-border);
}
.ep-scope-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 9px;
  background: none; border: none;
  color: var(--text-2); font-size: 13px; font-weight: 600; font-family: var(--font);
  cursor: pointer; white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.ep-scope-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.05); }
.ep-scope-btn.active {
  background: rgba(0,212,255,0.14);
  color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(0,212,255,0.4);
  transform: translateY(-0.5px);
}
body.ec-light .ep-scope-btn:hover:not(.active) { background: rgba(22,42,80,0.05); }

/* Stats card — clean, balanced */
.ep-stats-card {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  background: var(--surface-solid, #0d1728);
  border: 1px solid var(--glass-border-2);
  border-radius: 16px; padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

/* Ring */
.ep-stats-ring-wrap {
  position: relative; width: 108px; height: 108px; flex-shrink: 0;
  align-self: center;
}
.ep-stats-ring { display: block; filter: drop-shadow(0 0 6px rgba(16,185,129,0.22)); }
.ep-stats-ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ep-stats-ring-pct { font-size: 27px; font-weight: 500; color: var(--text); font-family: 'Inter', var(--font); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.01em; }
.ep-stats-ring-cap { font-size: 9.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 5px; }

/* Right side of the stats card: committee filter (top) + metrics */
.ep-stats-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 16px; justify-content: center;
}

/* Metric tiles — separate soft panels */
.ep-stats-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  width: 100%; gap: 10px;
}
.ep-stat-tile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.ep-stat-tile-num {
  font-size: 28px; font-weight: 700; color: var(--text);
  font-family: 'Inter', var(--font); font-variant-numeric: tabular-nums; line-height: 1.05;
  letter-spacing: -0.01em;
}
.ep-stat-tile-label {
  font-size: 11.5px; font-weight: 500; color: var(--text-2); margin-top: 7px;
}
.ep-c-todo { color: #cbd5e1; }
.ep-c-prog { color: #f59e0b; }
.ep-c-done { color: #10b981; }

@media (max-width: 760px) {
  .ep-stats-card { flex-direction: column; gap: 20px; align-items: stretch; }
  .ep-stats-metrics { grid-template-columns: repeat(2, 1fr); width: 100%; }
}

/* Action row: Tasks title (left) + status filter + buttons (right) */
.ep-todo-actionrow {
  display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap;
}
.ep-todo-section-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  font-family: 'Syne', var(--font); margin: 0; flex-shrink: 0;
}
.ep-todo-actionrow .ep-status-filter { margin-left: auto; }
.ep-todo-actions { display: flex; align-items: center; gap: 8px; }

/* GalSol-brand glass CTA (matches Database "Connect Source") */
.ep-cta-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 17px; border-radius: 9px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--cyan);
  font-size: 13px; font-weight: 600; font-family: var(--font);
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.ep-cta-btn:hover { background: rgba(0,212,255,0.18); border-color: rgba(0,212,255,0.45); }
.ep-cta-btn svg { width: 14px; height: 14px; }

/* Status filter — segmented control */
.ep-status-filter {
  display: inline-flex; align-self: flex-start; gap: 2px;
  padding: 4px; border-radius: 11px;
  background: var(--glass); border: 1px solid var(--glass-border);
  flex-wrap: wrap;
}
.ep-sf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 8px;
  background: none; border: none;
  color: var(--text-2); font-size: 12.5px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease); white-space: nowrap;
}
.ep-sf-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.05); }
.ep-sf-btn.active {
  background: rgba(0,212,255,0.14);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(0,212,255,0.4);
}
.ep-sf-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ep-sf-count {
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 20px; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--glass); color: var(--text-2);
  border: 1px solid var(--glass-border);
}
.ep-sf-btn.active .ep-sf-count { background: var(--cyan-dim, rgba(0,212,255,0.14)); color: var(--cyan); border-color: rgba(0,212,255,0.3); }

/* Light theme tweaks for the segmented control */
body.ec-light .ep-sf-btn.active { background: #ffffff; box-shadow: 0 1px 3px rgba(22,42,80,0.12), 0 0 0 1px rgba(22,42,80,0.10); }
body.ec-light .ep-sf-btn:hover:not(.active) { background: rgba(22,42,80,0.05); }

/* Task cards grid (Google-Classroom style) */
.ep-todo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px;
}
.ep-task-card {
  background: var(--surface, rgba(13,23,40,0.72));
  border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 0 0 12px; cursor: pointer;
  transition: border-color 0.18s, transform 0.12s, box-shadow 0.18s;
  overflow: hidden;
}
.ep-task-card:hover { border-color: var(--glass-border-2); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.28); }
.ep-task-card-top {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 12px 16px 10px; border-top: 3px solid var(--accent);
  border-radius: 14px 14px 0 0;
}
.ep-task-status-chip { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.ep-task-com-chip {
  font-size: 10px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  border: 1px solid; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis;
}
.ep-task-com-general { border-color: var(--glass-border); color: var(--text-2); }
.ep-task-card-title {
  padding: 4px 16px 0; font-size: 14.5px; font-weight: 700; color: var(--text);
  font-family: var(--font); line-height: 1.45; word-break: break-word;
}
.ep-task-card-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 16px 0; font-size: 11.5px; color: var(--text-2); font-weight: 500;
}
.ep-task-prio { font-size: 9px; }
.ep-task-dot { opacity: 0.5; }
.ep-task-overdue { color: #f43f5e; font-weight: 700; }
.ep-task-notes-count { color: var(--cyan); }
.ep-task-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding: 10px 16px 0; border-top: 1px solid var(--glass-border);
  font-size: 11px; color: var(--text-2);
}
.ep-task-by strong { color: var(--text); font-weight: 700; }
.ep-task-when { color: var(--text-3); white-space: nowrap; }

/* Empty state */
.ep-todo-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 60px 0; color: var(--text-2);
}
.ep-todo-empty-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ep-todo-empty-sub { font-size: 12.5px; color: var(--text-2); }

/* ── Task dialog ─────────────────────────────────────────────── */
.ep-td-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-top: 4px solid var(--accent);
  border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--glass-border);
}
.ep-td-chips { flex: 1; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ep-td-body { padding: 18px 22px 22px; max-height: 70vh; overflow-y: auto; }
.ep-td-title { font-size: 19px; font-weight: 800; color: var(--text); font-family: var(--font); line-height: 1.3; }
.ep-td-sub { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.ep-td-sub strong { color: var(--text); }
.ep-td-desc { font-size: 13.5px; color: var(--text); line-height: 1.6; margin-top: 14px; background: var(--glass); border-radius: 10px; padding: 12px 14px; }
.ep-td-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.ep-td-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--glass-border); }
.ep-td-row:last-child { border-bottom: none; }
.ep-td-k { width: 100px; flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.ep-td-v { font-size: 13.5px; color: var(--text); font-weight: 500; }

.ep-td-status-edit { margin-top: 18px; }
.ep-td-hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* Status button group */
.ep-td-status-btns {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.ep-td-status-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  border: 1.5px solid var(--glass-border-2); background: var(--glass);
  color: var(--text-2); cursor: pointer; transition: all 0.15s ease;
}
.ep-td-status-btn:hover:not(:disabled) { border-color: var(--glass-border); color: var(--text); }
.ep-td-status-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ep-td-status-btn.active { background: var(--glass); color: var(--text); font-weight: 700; }
.ep-td-s-todo.active          { border-color: #cbd5e1; color: #cbd5e1; box-shadow: 0 0 0 1px #cbd5e150; }
.ep-td-s-in_progress.active   { border-color: #f59e0b; color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b50; }
.ep-td-s-review.active        { border-color: #8b5cf6; color: #8b5cf6; box-shadow: 0 0 0 1px #8b5cf650; }
.ep-td-s-done.active          { border-color: #10b981; color: #10b981; box-shadow: 0 0 0 1px #10b98150; }

/* Status history timeline */
.ep-td-history { margin-top: 20px; }
.ep-td-hist-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ep-td-hist-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); border-radius: 8px; padding: 7px 10px;
  border: 1px solid var(--glass-border);
}
.ep-td-hist-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ep-td-hist-line { flex: 1; font-size: 12.5px; color: var(--text); }
.ep-td-hist-from { color: var(--text-2); }
.ep-td-hist-arrow { color: var(--text-3); margin: 0 4px; }
.ep-td-hist-to { font-weight: 600; }
.ep-td-hist-at { font-size: 11px; color: var(--text-3); flex-shrink: 0; white-space: nowrap; }

.ep-td-notes { margin-top: 20px; }
.ep-td-comments { margin: 8px 0 10px; display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.ep-td-nonotes { font-size: 12.5px; color: var(--text-3); padding: 4px 0; }
.ep-td-comment { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; padding: 9px 12px; }
.ep-td-comment-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.ep-td-comment-by { font-size: 12px; font-weight: 700; color: var(--text); }
.ep-td-comment-at { font-size: 10.5px; color: var(--text-3); }
.ep-td-comment-text { font-size: 13px; color: var(--text); line-height: 1.5; word-break: break-word; }
.ep-td-addnote { display: flex; gap: 8px; }
.ep-td-addnote .ep-input { flex: 1; }
.ep-td-danger { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--glass-border); }

/* ================================================================
   EVENT FLOW — programme timeline
   ================================================================ */
.ep-flow-layout { height: 100vh; overflow: hidden; }
.ep-flow-shell { display: flex; flex-direction: column; height: 100% !important; min-height: 0 !important; overflow: hidden !important; }
.ep-flow-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 28px 48px; }

.ep-flow-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.ep-flow-subtab {
  padding: 7px 16px; border-radius: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-2); font-size: 12.5px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: var(--transition);
}
.ep-flow-subtab:hover { color: var(--text); border-color: var(--glass-border-2); }
.ep-flow-subtab.active { background: rgba(0,212,255,0.12); color: var(--cyan); border-color: rgba(0,212,255,0.4); }
.ep-flow-subtab.add { border-style: dashed; color: var(--text-3); }
.ep-flow-subtab.add:hover { color: var(--cyan); border-color: rgba(0,212,255,0.45); }

.ep-flow-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ep-flow-title { font-size: 20px; font-weight: 800; color: var(--text); font-family: var(--font-display, var(--font)); }
.ep-flow-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.ep-flow-daydate { font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; padding: 7px 13px; white-space: nowrap; }

/* Timeline rows */
.ep-flow-timeline { display: flex; flex-direction: column; }
.ep-seg-row { display: grid; grid-template-columns: 96px 26px 1fr; align-items: stretch; }
.ep-seg-time {
  padding: 16px 12px 0 0; text-align: right;
  font-size: 12.5px; font-weight: 700; color: var(--text);
  font-family: var(--font-stat); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ep-seg-rail { position: relative; display: flex; justify-content: center; }
.ep-seg-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--glass-border-2); }
.ep-seg-row:first-child .ep-seg-rail::before { top: 20px; }
.ep-seg-row:last-child  .ep-seg-rail::before { bottom: calc(100% - 32px); }
.ep-seg-node {
  position: relative; z-index: 1; margin-top: 18px;
  width: 13px; height: 13px; border-radius: 50%;
  border: 3px solid var(--bg, #04080f); box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}
.ep-seg-card {
  margin: 10px 0 14px 8px; padding: 14px 16px;
  background: var(--surface, rgba(13,23,40,0.72));
  border: 1px solid var(--glass-border-2); border-left: 3px solid var(--accent);
  border-radius: 12px; transition: border-color 0.16s, transform 0.12s, box-shadow 0.16s;
}
.ep-seg-card[onclick] { cursor: pointer; }
.ep-seg-card[onclick]:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,0.28); }
.ep-seg-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ep-seg-card-title { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.35; }
.ep-seg-status {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: default;
}
.ep-seg-status[onclick] { cursor: pointer; }
.ep-seg-status-dot { width: 6px; height: 6px; border-radius: 50%; }
.ep-seg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ep-seg-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500; color: var(--text-2);
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 7px; padding: 3px 9px;
}
.ep-seg-tag svg { opacity: 0.8; }
.ep-seg-notes { margin-top: 9px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; white-space: pre-wrap; }

.ep-flow-empty, .ep-cal-day-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 60px 0; color: var(--text-2); text-align: center;
}
.ep-flow-empty-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ep-flow-empty-sub { font-size: 12.5px; color: var(--text-2); }

@media print {
  .sidebar, .ep-topbar, .ep-flow-subtabs, .ep-agent-fab { display: none !important; }
  .main-area { margin-left: 0 !important; }
  .ep-flow-shell, .ep-flow-scroll { height: auto !important; overflow: visible !important; }
  .ep-seg-card { break-inside: avoid; }
}

/* ================================================================
   CALENDAR — month / week / day
   ================================================================ */
.ep-cal-layout { height: 100vh; overflow: hidden; }
.ep-cal-shell { display: flex; flex-direction: column; height: 100% !important; min-height: 0 !important; overflow: hidden !important; }

.ep-cal-viewtoggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--glass); border: 1px solid var(--glass-border); }
.ep-cal-vbtn {
  padding: 6px 14px; border-radius: 6px; background: none; border: none;
  color: var(--text-2); font-size: 12.5px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: var(--transition);
}
.ep-cal-vbtn:hover:not(.active) { color: var(--text); }
.ep-cal-vbtn.active { background: var(--surface-solid, #0d1728); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px var(--glass-border); }

.ep-cal-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 28px; border-bottom: 1px solid var(--glass-border); flex-shrink: 0;
}
.ep-cal-nav { display: flex; align-items: center; gap: 10px; }
.ep-cal-navbtn {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-2); cursor: pointer; transition: var(--transition);
}
.ep-cal-navbtn:hover { color: var(--text); border-color: var(--glass-border-2); }
.ep-cal-period { font-size: 16px; font-weight: 800; color: var(--text); min-width: 200px; }
.ep-cal-today {
  padding: 7px 14px; border-radius: 8px; background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-2); font-size: 12.5px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: var(--transition);
}
.ep-cal-today:hover { color: var(--text); border-color: var(--glass-border-2); }
.ep-cal-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.ep-cal-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.ep-cal-leg-dot { width: 9px; height: 9px; border-radius: 50%; }

.ep-cal-surface {
  flex: 1; min-height: 0; overflow: auto; padding: 16px 28px 28px;
  scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.35) transparent;
}
.ep-cal-surface::-webkit-scrollbar { width: 6px; height: 6px; }
.ep-cal-surface::-webkit-scrollbar-track { background: transparent; }
.ep-cal-surface::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.35); border-radius: 99px; }
.ep-cal-surface::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.55); }

/* Month */
.ep-cal-month { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ep-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; flex-shrink: 0; }
.ep-cal-dow > div { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); padding: 0 4px; }
.ep-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(84px, 1fr); gap: 8px; flex: 1; min-height: 0; }
.ep-cal-cell {
  background: var(--surface, rgba(13,23,40,0.55)); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 7px 8px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; transition: border-color 0.14s, background 0.14s;
  overflow: hidden; height: 100%; min-height: 84px;
}
.ep-cal-cell:hover { border-color: var(--glass-border-2); background: rgba(255,255,255,0.03); }
.ep-cal-cell.out { opacity: 0.4; }
.ep-cal-cell.today { border-color: rgba(0,212,255,0.5); box-shadow: inset 0 0 0 1px rgba(0,212,255,0.25); }
.ep-cal-cell.eventday {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.45);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,0.2), 0 0 8px rgba(139,92,246,0.15);
}
.ep-cal-cell-num { font-size: 12.5px; font-weight: 700; color: var(--text); font-family: var(--font-stat); }
.ep-cal-cell.today .ep-cal-cell-num { color: var(--cyan); }
.ep-cal-cell-items {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.4) transparent;
}
.ep-cal-cell-items::-webkit-scrollbar { width: 3px; }
.ep-cal-cell-items::-webkit-scrollbar-track { background: transparent; }
.ep-cal-cell-items::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.4); border-radius: 99px; }
.ep-cal-chip {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border-left: 2px solid var(--c); border-radius: 4px; padding: 2px 6px;
}
.ep-cal-chip:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.ep-cal-chip.done { opacity: 0.55; }
.ep-cal-chip.done .ep-cal-chip-text { text-decoration: line-through; }
.ep-cal-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.ep-cal-chip-text { font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-cal-more { font-size: 10.5px; font-weight: 600; color: var(--text-2); padding: 1px 6px; }

/* Week */
.ep-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-height: 520px; }
.ep-cal-weekcol { background: var(--surface, rgba(13,23,40,0.55)); border: 1px solid var(--glass-border); border-radius: 10px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.ep-cal-weekcol:hover { border-color: var(--glass-border-2); }
.ep-cal-weekcol.today { border-color: rgba(0,212,255,0.5); }
.ep-cal-weekcol-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid var(--glass-border); }
.ep-cal-weekcol-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-2); }
.ep-cal-weekcol-num { font-size: 14px; font-weight: 800; color: var(--text); font-family: var(--font-stat); }
.ep-cal-weekcol-num.today { color: var(--cyan); }
.ep-cal-weekcol-items { display: flex; flex-direction: column; gap: 4px; }
.ep-cal-weekcol-empty { font-size: 12px; color: var(--text-3); text-align: center; padding: 10px 0; }

/* Day (and day-panel rows) */
.ep-cal-day { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.ep-cal-dayrow {
  display: grid; grid-template-columns: 66px 4px 1fr; align-items: stretch; gap: 12px;
  background: var(--surface, rgba(13,23,40,0.55)); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color 0.14s, transform 0.1s;
}
.ep-cal-dayrow:hover { border-color: var(--glass-border-2); transform: translateY(-1px); }
.ep-cal-dayrow-time { font-size: 12.5px; font-weight: 700; color: var(--text); font-family: var(--font-stat); align-self: center; }
.ep-cal-dayrow-bar { background: var(--c); border-radius: 4px; }
.ep-cal-dayrow-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.ep-cal-dayrow-meta { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }

/* Day panel */
.ep-cal-daypanel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; z-index: 300;
  background: var(--surface-solid, #0d1728); border-left: 1px solid var(--glass-border);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
}
.ep-cal-daypanel.open { transform: translateX(0); }
.ep-cal-daypanel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--glass-border); }
.ep-cal-daypanel-title { font-size: 15px; font-weight: 800; color: var(--text); }
.ep-cal-daypanel-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ep-cal-daypanel-foot { padding: 14px 18px; border-top: 1px solid var(--glass-border); }

@media (max-width: 720px) {
  .ep-cal-week { grid-template-columns: 1fr; }
  .ep-cal-daypanel { width: 100%; }
}

/* ================================================================
   BUDGET — softer button corners + brighter add buttons
   ================================================================ */
.ep-topbar .btn,
.ep-table-card-header .btn { border-radius: 8px; }
.ep-add-cat-btn  { border-radius: 8px; border-color: rgba(255,255,255,0.20); color: var(--text); }
.ep-add-item-btn { border-radius: 7px; border-color: rgba(255,255,255,0.18); color: var(--text-2); }
.ep-cat-collapse-btn { border-radius: 6px; }
.ep-cell-input { border-radius: 6px; }
/* Slightly brighter editable cells so numbers read clearly */
.ep-cell-input { color: var(--text); }
.ep-auto-cell { color: var(--text); }
.ep-budget-table thead th.col-del,
.ep-budget-table .col-del { width: 44px; }

/* EP primary buttons → glass blue (no purple) inside dialogs */
.ep-modal .btn-primary,
.ep-modal-footer .btn-primary {
  background: rgba(0,212,255,0.14);
  border: 1px solid rgba(0,212,255,0.4);
  color: var(--cyan);
}
.ep-modal .btn-primary:hover,
.ep-modal-footer .btn-primary:hover {
  background: rgba(0,212,255,0.24);
  border-color: rgba(0,212,255,0.6);
  filter: none;
}

/* ════════════════════════════════════════════════════════════════
   Gal AI — Fixed Right Panel (matches mail-tool)
   ════════════════════════════════════════════════════════════════ */
.gal-ai-fab {
  position: fixed; top: 16px; right: 20px; z-index: 501;
  display: none; align-items: center; gap: 8px;
  padding: 9px 22px; border-radius: 99px;
  color: #fff; font-size: 13px; font-weight: 700; font-family: 'Syne', sans-serif;
  cursor: pointer; letter-spacing: 0.3px;
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(10,14,25,0.95), rgba(10,14,25,0.95)) padding-box,
    linear-gradient(90deg, #00d4ff 0%, #7c3aed 25%, #00d4ff 50%, #7c3aed 75%, #00d4ff 100%) border-box;
  background-size: 100% 100%, 400% 100%;
  animation: galAiBorderPan 6s linear infinite;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  isolation: isolate;
  transition: box-shadow 0.3s ease, transform 0.25s ease, opacity 0.22s ease;
}
.gal-ai-fab.visible { display: flex; }
@keyframes galAiBorderPan { 0% { background-position: 0% 0%, 0% 50%; } 100% { background-position: 0% 0%, 66.67% 50%; } }
.gal-ai-fab:hover { box-shadow: 0 0 12px rgba(0,212,255,0.4), 0 0 22px rgba(124,58,237,0.3); transform: translateY(-2px); }
.gal-ai-fab:active { transform: translateY(1px); }
.gal-ai-fab.panel-open { opacity: 0; pointer-events: none; transform: translateX(12px); }
.gal-ai-fab img { width: 16px; height: 16px; }

.gal-ai-panel {
  position: fixed; top: 14px; right: 12px; bottom: 14px;
  width: 0; overflow: hidden; opacity: 0; pointer-events: none;
  transition: width 0.38s cubic-bezier(0.16,1,0.3,1), opacity 0.25s ease;
  z-index: 500; display: flex; flex-direction: column; border-radius: 20px;
  border: 2px solid transparent;
  background:
    radial-gradient(circle at 50% 0%, rgba(124,58,237,0.1) 0%, transparent 55%) padding-box,
    linear-gradient(180deg, rgba(4,8,15,0.97) 0%, rgba(10,14,25,0.99) 100%) padding-box,
    linear-gradient(90deg, #00d4ff 0%, #7c3aed 25%, #00d4ff 50%, #7c3aed 75%, #00d4ff 100%) border-box;
  background-size: auto, 100% 100%, 400% 100%;
  animation: galAiBorderPan 6s linear infinite;
  font-family: var(--font);
}
.gal-ai-panel.open { width: var(--gal-width, 384px); opacity: 1; pointer-events: auto; animation: galAiBorderPan 6s linear infinite, galAiGlowPulse 3s ease-in-out 0.4s infinite; }
@keyframes galAiGlowPulse {
  0%,100% { box-shadow: 0 8px 50px rgba(0,0,0,0.75), 0 0 25px rgba(0,212,255,0.15), 0 0 55px rgba(124,58,237,0.1); }
  50%     { box-shadow: 0 8px 50px rgba(0,0,0,0.75), 0 0 45px rgba(0,212,255,0.32), 0 0 90px rgba(124,58,237,0.22); }
}
.main-area { transition: margin-right 0.38s cubic-bezier(0.16,1,0.3,1); }
.main-area.gal-open { margin-right: calc(var(--gal-width, 384px) + 24px); }

.gal-ai-inner { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.gal-ai-header {
  padding: 16px 18px 14px; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  background: rgba(255,255,255,0.015);
}
.gal-ai-header-left { display: flex; align-items: center; gap: 10px; }
.gal-ai-avatar-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 22px; }
.gal-ai-title { font-family: 'Syne', sans-serif; font-size: 14.5px; font-weight: 700; color: #ffffff; letter-spacing: 0.2px; }
.gal-ai-subtitle { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 1px; }
.gal-ai-close-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.gal-ai-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.gal-ai-close-btn svg { width: 14px; height: 14px; }

.gal-ai-greeting { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 24px; text-align: center; gap: 16px; flex: 1; }
.gal-ai-greeting.hidden { display: none; }
.gal-ai-greet-avatar {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(124,58,237,0.12));
  border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  margin-bottom: 6px;
}
.gal-ai-greet-name {
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px; font-family: 'Syne', sans-serif;
  background: linear-gradient(90deg, #00d4ff, #7c3aed);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gal-ai-greet-sub { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.55; max-width: 280px; }

.gal-ai-chat {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.2) transparent;
}
.gal-ai-chat::-webkit-scrollbar { width: 5px; }
.gal-ai-chat::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.2); border-radius: 4px; }

.gal-ai-bubble { max-width: 92%; font-size: 13.5px; line-height: 1.6; }
.gal-ai-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(124,58,237,0.2));
  border: 1px solid rgba(0,212,255,0.25); color: var(--text);
  padding: 10px 14px; border-radius: 16px; border-bottom-right-radius: 4px;
}
.gal-ai-bubble.ai {
  align-self: flex-start; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2); padding: 10px 14px; border-radius: 16px; border-bottom-left-radius: 4px;
}
.gal-ai-bubble.ai strong { color: var(--text); }
.gal-ai-bubble-label {
  font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 5px; display: flex; align-items: center; gap: 4px; letter-spacing: 0.3px;
}
.gal-ai-thinking { display: flex; align-items: center; gap: 3px; padding: 4px 0; }
.gal-ai-thinking .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #00d4ff, #7c3aed); animation: galThinkDot 1.4s ease-in-out infinite; }
.gal-ai-thinking .dot:nth-child(2) { animation-delay: 0.2s; }
.gal-ai-thinking .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes galThinkDot { 0%,80%,100% { transform: scale(0.7); opacity: 0.4; } 40% { transform: scale(1.2); opacity: 1; } }

/* Inline need-info form (asks for budget / location) */
.gal-ai-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.gal-ai-form input {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  color: var(--text); font-size: 13px; font-family: var(--font); padding: 9px 12px; outline: none;
}
.gal-ai-form input:focus { border-color: rgba(0,212,255,0.4); box-shadow: 0 0 0 3px rgba(0,212,255,0.08); }
.gal-ai-form button {
  align-self: flex-start; padding: 8px 16px; border-radius: 9px; cursor: pointer;
  background: rgba(0,212,255,0.12); border: 1px solid rgba(0,212,255,0.3); color: var(--cyan);
  font-size: 12.5px; font-weight: 600; font-family: var(--font); transition: var(--transition);
}
.gal-ai-form button:hover { background: rgba(0,212,255,0.2); }

/* Apply-plan button shown under a plan bubble */
.gal-ai-apply-btn {
  margin-top: 10px; padding: 9px 16px; border-radius: 10px; cursor: pointer; width: 100%;
  background: linear-gradient(135deg, #00d4ff, #7c3aed); border: none; color: #fff;
  font-size: 13px; font-weight: 700; font-family: var(--font); box-shadow: 0 4px 16px rgba(0,212,255,0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.gal-ai-apply-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(0,212,255,0.45); }
.gal-ai-apply-btn:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.gal-ai-sugg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.gal-ai-sugg-btn {
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2); font-size: 13px; cursor: pointer; text-align: left;
  transition: all 0.18s; font-family: var(--font);
}
.gal-ai-sugg-btn:hover { background: rgba(0,212,255,0.1); color: var(--cyan); border-color: rgba(0,212,255,0.3); transform: translateY(-2px); }

.gal-ai-input-wrap { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; background: rgba(255,255,255,0.015); }

/* Composer — matches Mini-site AI chat box */
.gal-composer {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.gal-composer:focus-within { border-color: rgba(0,212,255,0.4); box-shadow: 0 0 0 3px rgba(0,212,255,0.07); }
.gal-composer-textarea {
  width: 100%; min-height: 52px; max-height: 140px;
  background: transparent; border: none; outline: none; resize: none;
  padding: 14px 16px 10px; font-size: 14px; color: rgba(255,255,255,0.92);
  line-height: 1.5; box-sizing: border-box; overflow-y: auto; font-family: var(--font); display: block;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.gal-composer-textarea::placeholder { color: rgba(255,255,255,0.28); }
.gal-composer-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 10px; border-top: 1px solid rgba(255,255,255,0.06); gap: 8px;
}
.gal-composer-hint { font-size: 11px; color: var(--text-3); padding-left: 4px; }
.gal-send-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #00d4ff, #7c3aed); border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}
.gal-send-btn:hover { opacity: 0.85; }
.gal-send-btn:active { transform: scale(0.93); }
.gal-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.gal-send-btn svg { width: 16px; height: 16px; }

@media (max-width: 760px) {
  .gal-ai-panel.open { width: calc(100vw - 24px); }
  .main-area.gal-open { margin-right: 0; }
}

/* ════════════════════════════════════════════════════════════════
   Budget — header action buttons (inline in ep-page-head)
   Share = glass/save style, Gal AI = solid gradient/publish style
   Matches mini-site editor topbar buttons exactly.
   ════════════════════════════════════════════════════════════════ */
.ep-bp-head-actions {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
}
/* Share button — glass, like mini-site Save button */
.ep-bp-share-btn {
  display: none; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 600; font-family: var(--font);
  color: var(--text); border: 1px solid var(--glass-border);
  background: var(--glass); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ep-bp-share-btn.visible { display: inline-flex; }
.ep-bp-share-btn:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.13); }
/* Gal AI button — EXACT mse-ai-toggle-btn: animated glowing border, dark fill, Syne font */
.ep-bp-gal-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: 'Syne', sans-serif;
  color: #fff; white-space: nowrap; flex-shrink: 0;
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(10,14,25,0.95), rgba(10,14,25,0.95)) padding-box,
    linear-gradient(90deg, #00d4ff 0%, #7c3aed 25%, #00d4ff 50%, #7c3aed 75%, #00d4ff 100%) border-box;
  background-size: 100% 100%, 400% 100%;
  animation: galAiBorderPan 6s linear infinite;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: box-shadow 0.25s, transform 0.2s, opacity 0.2s;
}
.ep-bp-gal-btn:hover { box-shadow: 0 0 10px rgba(0,212,255,0.35), 0 0 20px rgba(124,58,237,0.25); transform: translateY(-1px); }
.ep-bp-gal-btn.active { box-shadow: 0 0 14px rgba(0,212,255,0.5), 0 0 28px rgba(124,58,237,0.35); }
.ep-bp-gal-btn.panel-open { opacity: 0; pointer-events: none; transform: translateX(12px); }

/* ── Share Budget Dialog ──────────────────────────────────────── */
.ep-share-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.ep-share-dialog {
  background: var(--surface-solid); border: 1px solid var(--glass-border-2);
  border-radius: 18px; padding: 28px; width: 420px; max-width: calc(100vw - 32px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.ep-share-title { font-size: 18px; font-weight: 700; color: var(--text); font-family: 'Syne', var(--font); margin-bottom: 4px; }
.ep-share-sub { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.ep-share-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 280px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.45) transparent;
  margin-bottom: 20px;
}
.ep-share-list::-webkit-scrollbar { width: 5px; }
.ep-share-list::-webkit-scrollbar-track { background: transparent; }
.ep-share-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(0,212,255,0.5), rgba(124,58,237,0.5)); border-radius: 99px; }
.ep-share-member {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--glass-border); background: var(--glass);
  transition: border-color 0.15s, background 0.15s;
}
.ep-share-member:hover { border-color: var(--glass-border-2); background: rgba(255,255,255,0.04); }
.ep-share-member.selected { border-color: rgba(0,212,255,0.55); background: rgba(0,212,255,0.07); }
.ep-share-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #00d4ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ep-share-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); }
.ep-share-role { font-size: 11px; color: var(--text-3); }
.ep-share-check {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid var(--glass-border); background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ep-share-member.selected .ep-share-check {
  background: linear-gradient(135deg, #00d4ff, #7c3aed); border-color: transparent;
}
.ep-share-footer { display: flex; justify-content: flex-end; gap: 8px; }

/* ── Light Theme ──────────────────────────────────────────────── */
[data-theme="light"] {
  --ep-violet-dim:  rgba(139, 92, 246, 0.10);
  --ep-violet-glow: rgba(139, 92, 246, 0.15);
  --ep-amber-dim:   rgba(245, 158, 11, 0.10);
  --ep-sky-dim:     rgba(56, 189, 248, 0.10);
  --text-2: #334155;
  --text-3: #64748b;
}

[data-theme="light"] .ep-topbar {
  background: rgba(240, 244, 248, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* ================================================================
   TOOL PAGE HEADERS — module icon + plain title (no black bar)
   Shared across Budget / Committee / To-Do / Event Flow / Calendar.
   ================================================================ */
/* Clickable module-icon chip placed before each tool title.
   Colour + background are set inline per module (matches the
   workspace module cards). */
.ep-head-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.ep-head-icon svg { width: 21px; height: 21px; }
.ep-head-icon:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 5px 16px rgba(0,0,0,0.28); }
.ep-head-title {
  font-size: 22px; font-weight: 700; color: var(--text);
  margin: 0; line-height: 1.1; letter-spacing: -0.01em;
  font-family: var(--font-display, var(--font)); white-space: nowrap;
}

/* Transparent tool topbar — keeps the button cluster up top but
   drops the dark bar background / blur / divider. */
.ep-topbar.ep-topbar-plain {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
}
.ep-topbar-plain .ep-topbar-left { gap: 12px; }

/* ================================================================
   THEMED SCROLLBARS — replace default white bars in tool dialogs
   & side panels with the app's cyan glass scrollbar.
   ================================================================ */
.ep-cal-daypanel-body,
.ef-modal-body,
.ep-td-body,
.ep-td-comments {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,0.4) transparent;
}
.ep-cal-daypanel-body::-webkit-scrollbar,
.ef-modal-body::-webkit-scrollbar,
.ep-td-body::-webkit-scrollbar,
.ep-td-comments::-webkit-scrollbar { width: 6px; }
.ep-cal-daypanel-body::-webkit-scrollbar-track,
.ef-modal-body::-webkit-scrollbar-track,
.ep-td-body::-webkit-scrollbar-track,
.ep-td-comments::-webkit-scrollbar-track { background: transparent; }
.ep-cal-daypanel-body::-webkit-scrollbar-thumb,
.ef-modal-body::-webkit-scrollbar-thumb,
.ep-td-body::-webkit-scrollbar-thumb,
.ep-td-comments::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.4); border-radius: 99px; }
.ep-cal-daypanel-body::-webkit-scrollbar-thumb:hover,
.ef-modal-body::-webkit-scrollbar-thumb:hover,
.ep-td-body::-webkit-scrollbar-thumb:hover,
.ep-td-comments::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.6); }

/* ================================================================
   COMMITTEE LIGHT THEME — Gal AI panel (page uses body.ec-light,
   not html[data-theme=light], so the shared panel needs its own
   light overrides here).
   ================================================================ */
body.ec-light .gal-ai-panel {
  background: #ffffff !important;
  border-color: rgba(15,23,42,0.12) !important;
  box-shadow: 0 24px 64px rgba(15,23,42,0.18) !important;
  animation: none !important;
}
body.ec-light .gal-ai-header,
body.ec-light .gal-ai-input-wrap { background: #f8fafc !important; border-color: rgba(15,23,42,0.10) !important; }
body.ec-light .gal-ai-title { color: #0f172a; }
body.ec-light .gal-ai-subtitle,
body.ec-light .gal-ai-greet-sub,
body.ec-light .gal-composer-hint { color: #46597a; }
body.ec-light .gal-ai-chat { background: #ffffff; }
body.ec-light .gal-ai-bubble.ai {
  background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.10); color: #334155;
}
body.ec-light .gal-ai-bubble.ai strong { color: #0f172a; }
body.ec-light .gal-ai-sugg-btn {
  background: rgba(15,23,42,0.03); border-color: rgba(15,23,42,0.10); color: #334155;
}
body.ec-light .gal-ai-sugg-btn:hover { background: rgba(0,147,196,0.08); color: #0093c4; border-color: rgba(0,147,196,0.3); }
body.ec-light .gal-composer {
  background: #ffffff; border-color: rgba(15,23,42,0.16);
}
body.ec-light .gal-composer-footer { border-top-color: rgba(15,23,42,0.08); }
body.ec-light .gal-composer-textarea { color: #15233a; }
body.ec-light .gal-composer-textarea::placeholder { color: #6f83a1; }
body.ec-light .gal-ai-close-btn {
  background: rgba(15,23,42,0.05); border-color: rgba(15,23,42,0.10); color: #46597a;
}
body.ec-light .gal-ai-close-btn:hover { background: rgba(15,23,42,0.1); color: #15233a; }
