/* ============================================================
   Events portal + shared page furniture (page heads, cards, chips).
   Same language as the website: cream, navy Fraunces, yellow highlights.
   ============================================================ */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; }
.card { background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.linkish { background: none; border: none; padding: 0; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { background: linear-gradient(transparent 55%, var(--accent) 55%); }

.ev-wrap { max-width: 1100px; margin: 0 auto; }

/* List of events */
.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ev-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px;
  background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.ev-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.ev-card-date { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.ev-card-name { font-size: 22px; font-weight: 700; line-height: 1.15; }
.ev-card-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.ev-card-stats b { color: var(--text); }
.ev-countdown { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: var(--pill); background: var(--accent); color: var(--text-on-accent); }

/* Progress: sold vs capacity, target range shaded */
.ev-progress { position: relative; height: 10px; border-radius: var(--pill); background: var(--bg-sunken); overflow: hidden; margin: 8px 0 2px; border: 1px solid var(--surface-border); }
.ev-progress-target { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(253, 227, 88, .55) 0 6px, rgba(253, 227, 88, .25) 6px 12px); }
.ev-progress-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--primary); border-radius: var(--pill); min-width: 3px; }

/* Event detail */
.ev-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ev-hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0 8px; }
.ev-back { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.ev-back:hover { color: var(--text); }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--text-muted); font-size: 15px; }
.ev-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--surface-border); margin-bottom: 20px; overflow-x: auto; }
.ev-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px 11px; font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ev-tab:hover { background: var(--primary-wash); border-radius: 10px 10px 0 0; }
.ev-tab.active { border-bottom-color: var(--primary); font-weight: 700; }
.ev-tab.active .tab-label { background: linear-gradient(transparent 55%, var(--accent) 55%, var(--accent) 92%, transparent 92%); }
.ev-tab-n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--pill); background: var(--bg-sunken); color: var(--text-muted); }
.ev-body { display: flex; flex-direction: column; gap: 16px; }
.ev-section { padding: 18px 20px; }
.ev-section h2 { font-size: 17px; margin-bottom: 12px; }
.ev-notes { white-space: pre-line; margin: 0; }
.ev-kpi-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }

/* Funnel */
.ev-funnel { display: flex; flex-direction: column; gap: 9px; }
.ev-funnel-row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 12px; }
.ev-funnel-row:hover .ev-funnel-label { text-decoration: underline; }
.ev-funnel-label { font-weight: 600; font-size: 14px; }
.ev-funnel-track { height: 14px; background: var(--bg-sunken); border-radius: var(--pill); overflow: hidden; }
.ev-funnel-fill { display: block; height: 100%; border-radius: var(--pill); min-width: 3px; background: var(--primary); }
.ev-funnel-fill.tone-none { background: var(--primary); }
.ev-funnel-fill.tone-yellow { background: var(--status-yellow); }
.ev-funnel-fill.tone-orange { background: var(--status-orange); }
.ev-funnel-fill.tone-green { background: var(--status-green); }
.ev-funnel-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* To-do lines */
.ev-todo { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; border-top: 1px solid var(--surface-border); font-size: 15px; }
.ev-todo:first-of-type { border-top: none; }
.ev-todo:hover { background: var(--primary-wash); }
.ev-todo-go { color: var(--text-muted); }

/* Toolbars, filters, tables */
.ev-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-toolbar .search-input { max-width: 320px; flex: 1; }
.ev-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip { border: 1px solid var(--line); background: var(--bg-elevated); color: var(--text); border-radius: var(--pill); padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ev-chip:hover { border-color: var(--primary); }
.ev-chip.active { background: var(--primary); color: var(--text-on-primary); border-color: var(--primary); }
.ev-summary { font-size: 13px; margin: 2px 0 8px; }
.ev-table td { vertical-align: middle; }
.ev-table th.num, .ev-table td.num { text-align: right; }
.ev-name { font-weight: 600; white-space: nowrap; }
.ev-party { margin-left: 7px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--pill); background: var(--primary-wash); color: var(--text); }
.ev-notes-cell { max-width: 300px; color: var(--text-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-link { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); word-break: break-all; }
.ev-link:hover { text-decoration-color: var(--primary); }

/* Status: pills, selects and row tints share one tone scale */
.ev-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: var(--pill); white-space: nowrap; }
.tone-none   { background: var(--bg-sunken); color: var(--text); }
.tone-yellow { background: var(--status-yellow); color: var(--qu-navy); }
.tone-orange { background: var(--status-orange); color: var(--qu-navy); }
.tone-green  { background: var(--status-green); color: var(--qu-cream); }
.tone-muted  { background: #E7E3E1; color: #6B5B57; }
.ev-chip.tone-yellow, .ev-chip.tone-orange, .ev-chip.tone-green, .ev-chip.tone-none, .ev-chip.tone-muted { border-color: transparent; }
.ev-chip.active.tone-yellow, .ev-chip.active.tone-orange, .ev-chip.active.tone-green, .ev-chip.active.tone-none, .ev-chip.active.tone-muted { outline: 2px solid var(--primary); outline-offset: 1px; }
.ev-status-sel {
  appearance: none; -webkit-appearance: none; border: none; border-radius: var(--pill);
  padding: 4px 26px 4px 11px; font-size: 13px; font-weight: 700; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 12px center, right 7px center; background-size: 5px 5px; background-repeat: no-repeat;
}
.ev-status-sel.tone-none { background-color: var(--bg-sunken); }
.ev-status-sel.tone-yellow { background-color: var(--status-yellow); }
.ev-status-sel.tone-orange { background-color: var(--status-orange); }
.ev-status-sel.tone-green { background-color: var(--status-green); color: var(--qu-cream); }
.ev-status-sel.tone-muted { background-color: #E7E3E1; }
.table tbody tr.row-tone-green > td { background: rgba(31, 107, 69, .07); }
.table tbody tr.row-tone-muted > td { opacity: .7; }

/* Channels grouped by category */
.ev-group { background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: var(--radius); overflow: hidden; }
.ev-group + .ev-group { margin-top: 12px; }
.ev-group-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; background: none; border: none; cursor: pointer; color: var(--text); text-align: left; }
.ev-group-head:hover { background: var(--primary-wash); }
.ev-group-name { font-weight: 700; font-size: 16px; }
.ev-caret { width: 14px; color: var(--text-muted); }
.ev-rows { border-top: 1px solid var(--surface-border); }
.ev-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px 92px 130px; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--surface-border); cursor: pointer; }
.ev-row:first-child { border-top: none; }
.ev-row:hover { background: var(--primary-wash); }
.ev-row.row-tone-green { background: rgba(31, 107, 69, .06); }
.ev-row-name { font-weight: 600; }
.ev-row-notes { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.ev-row-codes { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.ev-row-cost { text-align: right; font-size: 13px; font-weight: 600; }
.ev-row-status { text-align: right; }
.ev-code { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: var(--qu-navy); border: 1px dashed rgba(30, 58, 95, .45); }
button.ev-code { cursor: copy; font-family: inherit; }
.ev-code.big { font-size: 13.5px; padding: 4px 10px; }

@media (max-width: 760px) {
  .ev-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ev-row-codes, .ev-row-cost, .ev-row-follow { display: none; }
  .ev-funnel-row { grid-template-columns: 86px 1fr 36px; }
}
