/* Registrations — builds on partners.css (shared masthead, filter bar, table pane,
   modal and toast) so the tab reads as part of the same product. Only what is
   specific to registrations lives here. Profession colours match the count card. */
.registrations-page {
  --prof-doctor: #003366;
  --prof-nurse: #0E9AA0;
  --prof-student: #E8A317;
  --prof-other: #7956A5;
}

/* Masthead buttons on the dark strip (same treatment as Speakers' Export Excel) */
.btn-ghost { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.page-count .match-ok { color: #8EF0B4; font-weight: 600; }
.page-count .match-off { color: #FFC66B; font-weight: 600; }
.stat-dot-ipsc { background: #5AA9FF; }
.stat-dot-hope { background: #FFB020; }
.stat-dot-international { background: #C084FC; }

/* Insight cards: who + where */
.insight-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-bottom: 16px; }
.insight-card, .history-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 18px 20px 20px; }
.insight-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.insight-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-muted); }
.insight-sub { font-size: 12px; color: var(--ink-muted); }
.prof-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prof-tile { text-align: left; font-family: inherit; cursor: pointer; background: #fff; border: 1px solid var(--border); border-top: 6px solid var(--c); border-radius: 12px; padding: 16px 16px 18px; transition: box-shadow .15s, transform .1s; }
.prof-tile:hover { box-shadow: 0 0 0 2px rgba(0,94,184,.16); }
.prof-tile.active { box-shadow: 0 0 0 2px var(--c); }
.prof-tile .lab { font-size: 13px; font-weight: 700; color: var(--ink); }
.prof-tile .num { font-size: 42px; font-weight: 700; line-height: 1.1; margin-top: 4px; color: var(--c); font-variant-numeric: tabular-nums; font-family: 'Space Grotesk', var(--font-sans, sans-serif); }
.prof-tile .pct { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.prof-bar { display: flex; gap: 3px; height: 10px; margin-top: 18px; border-radius: 6px; overflow: hidden; }
.prof-bar > span { border-radius: 4px; }

.state-bars { display: flex; flex-direction: column; gap: 4px; }
.state-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; font-family: inherit; font-size: 13px; color: var(--ink-soft); background: none; border: 0; padding: 3px 6px; margin: 0 -6px; border-radius: 8px; cursor: pointer; text-align: left; }
.state-row:hover { background: var(--surface-2); }
.state-row.active { background: var(--blue-soft); }
.state-row .name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-row .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.state-row .fill { display: block; height: 100%; border-radius: 99px; background: #0E9AA0; }
.state-row:first-child .fill { background: #003366; }
.state-row .n { font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.state-row.muted .name, .state-row.muted .n { color: var(--ink-muted); font-weight: 600; }
.state-row.muted { cursor: default; }
.state-row.muted:hover { background: none; }

/* Filter bar extras */
.registrations-page .org-filter { max-width: 180px; }
.registrations-page .org-filter:first-of-type { margin-left: auto; }
.clear-link { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--blue-mid); cursor: pointer; padding: 6px 4px; }
.clear-link:hover { text-decoration: underline; }

/* Table */
.registrations-page table { min-width: 1500px; }
.registrations-page .table-card { max-height: calc(100vh - 220px); }
.select-col { width: 46px; text-align: center !important; position: sticky; left: 0; z-index: 2; background: var(--surface); }
thead th.select-col { z-index: 4; background: var(--surface-2); }
.select-col input, #selectAll { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.can-edit .name-col { left: 46px; }
tbody tr:nth-child(even) .select-col { background: #FAFAFA; }
tbody tr:hover .select-col { background: var(--blue-soft); }
tbody tr.selected, tbody tr.selected .name-col, tbody tr.selected .select-col { background: #EEF5FF; }
.can-edit tbody tr { cursor: pointer; }
.person-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-avatar { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 4px color-mix(in srgb, var(--c) 35%, #fff); }
.person-text { min-width: 0; }
.person-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-role { font-size: 12px; color: var(--ink-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash { color: var(--ink-muted); }
.email-link { color: var(--blue-mid); text-decoration: none; }
.email-link:hover { text-decoration: underline; }
.badge-ipsc { background: #EBF2FC; color: #003366; }
.badge-hope { background: #FFF4E0; color: #B05000; }
.badge-international { background: #F3E8FF; color: #6B21A8; }
.prof-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.prof-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.prof-pill .by-hand { font-weight: 600; color: var(--ink-muted); }
.source-chip { display: inline-block; padding: 2px 8px; margin: 0 4px 2px 0; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.source-chip.website { background: #EBF2FC; color: #005EB8; }
.source-chip.offline { background: #E8F9ED; color: #1A7A3C; }
.source-chip.international { background: #F3E8FF; color: #6B21A8; }

/* Selection bar */
.select-bar { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; background: var(--ink); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; z-index: 500; transition: transform .2s; }
.select-bar.show { transform: translate(-50%, 0); }
.select-bar .btn-primary { background: #fff; color: var(--ink); }
.select-bar .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

/* History */
.history-card { margin-top: 16px; }
.history-card > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; justify-content: space-between; }
.history-card > summary::-webkit-details-marker { display: none; }
.history-card > summary::after { content: '▾'; color: var(--ink-muted); font-size: 12px; margin-left: 8px; }
.history-card[open] > summary { margin-bottom: 12px; }
.history-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-soft); }
.history-row .when { color: var(--ink-muted); font-size: 12px; }
.history-row .what { font-weight: 600; color: var(--ink); }
.history-row .who { font-size: 12px; color: var(--ink-muted); }
.history-counts { display: flex; gap: 6px; }

/* Modals */
.modal-wide { max-width: 860px; }
.registrations-page .modal input[type="file"] { font: inherit; font-size: 13px; }
.registrations-page .modal input[type="search"] { padding: 10px 12px; }
.field-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-muted); margin: 4px 0 12px; }
.field-group { margin-bottom: 20px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.map-grid { grid-template-columns: repeat(3, 1fr); }
.step-no { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; align-items: center; justify-content: center; font-size: 11px; }
.section-note { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-muted); margin-left: 4px; }
.preview-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.preview-table { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.preview-table table { min-width: 0; table-layout: auto; }
.preview-table td { padding: 8px 12px; font-size: 12px; vertical-align: top; }
.preview-table th { position: sticky; top: 0; }
.badge-new { background: var(--green-soft); color: #1A7A3C; }
.badge-changed { background: var(--blue-soft); color: var(--blue-mid); }
.badge-matched { background: var(--surface-2); color: var(--ink-muted); }
.badge-rejected { background: var(--red-soft); color: var(--red); }

@media (max-width: 1100px) {
  .insight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .prof-tiles { grid-template-columns: repeat(2, 1fr); }
  .form-grid.three, .map-grid { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 1fr; gap: 4px; }
  .registrations-page .org-filter { max-width: none; flex: 1 1 140px; }
}
