*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #1a1a2e;
  background: #f0f2f7;
  min-height: 100vh;
}

header {
  background: #1e2d4a;
  color: white;
  padding: 18px 32px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
header h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
header .subtitle { font-size: 12px; opacity: 0.6; font-weight: 400; }

.tab-bar {
  background: #1a2540;
  padding: 0 32px;
  display: flex;
  gap: 2px;
}

.tab-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  padding: 11px 22px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.tab-btn:hover { color: rgba(255,255,255,0.85); }
.tab-btn.active { color: #fff; border-bottom-color: #60a5fa; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.filter-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 6px 11px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #fafafa;
}
.filter-bar input[type="search"]:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.filter-bar select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: #fafafa;
  cursor: pointer;
  outline: none;
  max-width: 180px;
}
.filter-bar select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

.count-bar {
  padding: 6px 32px;
  font-size: 11px;
  color: #9ca3af;
  background: #fff;
  border-bottom: 1px solid #f0f0f5;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: #f1f5f9;
  padding: 9px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #374151;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

thead th.sortable {
  cursor: pointer;
  user-select: none;
}
thead th.sortable:hover { background: #e8edf4; }
thead th.sort-asc,
thead th.sort-desc { background: #dbeafe; color: #1e40af; }

.sort-icon { margin-left: 3px; font-size: 10px; color: #9ca3af; }
th.sort-asc .sort-icon,
th.sort-desc .sort-icon { color: #3b82f6; }

tbody tr:nth-child(even) { background: #f8f9fc; }
tbody tr:hover { background: #eff6ff; }

td {
  padding: 9px 16px;
  border-bottom: 1px solid #f0f0f5;
  vertical-align: top;
  line-height: 1.4;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
}

.linkedin-link {
  color: #0077b5;
  text-decoration: none;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.linkedin-link:hover { text-decoration: underline; }
.linkedin-link svg { width: 13px; height: 13px; fill: #0077b5; }

.speaker-link {
  color: #1d4ed8;
  text-decoration: none;
  font-size: 13px;
}
.speaker-link:hover { text-decoration: underline; }

.session-badge {
  display: inline-block;
  background: #e5e7eb;
  color: #374151;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 600;
}

.loading {
  text-align: center;
  padding: 80px;
  color: #9ca3af;
  font-size: 15px;
}

.no-results {
  text-align: center;
  padding: 48px 16px;
  color: #9ca3af;
  font-size: 13px;
}

tbody tr.clickable { cursor: pointer; }

/* ── Modal ────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 10px 14px;
  color: #6b7280;
  border-radius: 0 12px 0 8px;
  z-index: 1;
}
.modal-close:hover { color: #111; background: #f3f4f6; }

.modal-body { padding: 24px 28px 28px; }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
  padding-right: 36px;
}

.modal-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.modal-abstract {
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  white-space: pre-line;
  margin-bottom: 20px;
  border-top: 1px solid #f0f0f5;
  padding-top: 16px;
}

.modal-speakers-heading,
.modal-sessions-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  margin-bottom: 12px;
}

.speaker-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

.speaker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fc;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 200px;
}

.speaker-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}

.speaker-card-info { display: flex; flex-direction: column; gap: 3px; }
.speaker-card-name { font-size: 13px; font-weight: 600; color: #1a1a2e; }

.session-card {
  background: #f8f9fc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 3px solid #3b82f6;
  cursor: pointer;
}
.session-card:last-child { margin-bottom: 0; }
.session-card:hover { background: #eff6ff; }

.session-card-title { font-size: 13px; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.session-card-meta  { font-size: 11px; color: #6b7280; margin-bottom: 6px; }
.session-card-abstract {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
  white-space: pre-line;
}

.speaker-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.speaker-modal-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}

.speaker-modal-name { font-size: 20px; font-weight: 700; color: #1a1a2e; }

/* ── Tracks tab ───────────────────────────────────────────────────────── */
.track-sub-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.track-sub-btn {
  border: 2px solid var(--track-color, #6b7280);
  background: transparent;
  color: var(--track-color, #6b7280);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.track-sub-btn:hover {
  background: color-mix(in srgb, var(--track-color, #6b7280) 15%, transparent);
}
.track-sub-btn.active {
  background: var(--track-color, #6b7280);
  color: var(--track-fg, #fff);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--track-color, #6b7280) 40%, transparent);
}

.track-count {
  padding: 6px 32px;
  font-size: 11px;
  color: #9ca3af;
  background: #fff;
  border-bottom: 1px solid #f0f0f5;
}

.track-list {
  padding: 20px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(333px, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .track-list { grid-template-columns: repeat(2, 1fr); padding: 16px 20px; }
}
@media (max-width: 560px) {
  .track-list { grid-template-columns: 1fr; padding: 12px 14px; }
}

.track-row {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.track-speaker-col {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f0f0f5;
  background: #f8f9fc;
}

.track-speaker-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e5e7eb;
}

.list-speaker-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e5e7eb;
}

.track-speaker-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.track-speaker-name {
  font-size: 22px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
  line-height: 1.3;
}
.track-speaker-name:hover { text-decoration: underline; }

.track-li svg { width: 25px; height: 25px; fill: #0077b5; }

.track-sessions-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
}

.track-session-title {
  font-size: 12px;
  color: #1a1a2e;
  cursor: pointer;
  line-height: 1.4;
  padding: 4px 6px;
  border-radius: 4px;
  display: block;
}
.track-session-title:hover { background: #eff6ff; color: #1d4ed8; }
