/* ==========================================================================
   19-speakermgmt.css — SPEAKER MANAGEMENT

   "one complete comprehensive section using a modern layout better than
    📌 Speaker's Record ▸ 📅 Appearances"

   Not a table, and the reason is in js/72-speakermgmt.js: a table shows one
   row per THING, and this screen is one row per PERSON with several things
   hanging off them. So it is a rail of cards down the left and a panel on
   the right — pick somebody and everything about them is in front of you.

   The rail scrolls on its own and the panel scrolls on its own, which is
   what makes it work on a laptop: the list does not disappear up the page
   while you read somebody's pictures.
   ========================================================================== */

.sm-note { font-size: 11px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.sm-note strong { color: var(--white); }

/* ---- the four figures across the top ------------------------------------ */
.sm-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sm-tile {
  background: var(--navy2);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  padding: 9px 12px;
}
.sm-tile-v { font-size: 22px; font-weight: 800; color: var(--white); line-height: 1.05; }
.sm-tile-k { font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--cyan); margin-top: 3px; }
.sm-tile-s { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.sm-tile.is-red   { border-left-color: var(--red); }
.sm-tile.is-red   .sm-tile-v { color: #fca5a5; }
.sm-tile.is-amber { border-left-color: #f59e0b; }
.sm-tile.is-amber .sm-tile-v { color: #fcd34d; }

/* ---- filters and tools --------------------------------------------------- */
.sm-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.sm-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.sm-f {
  background: var(--navy2); border: 1px solid var(--c-border); color: var(--muted);
  border-radius: 5px; padding: 6px 11px; font-size: 11px; cursor: pointer;
  min-height: 32px; letter-spacing: .3px; white-space: nowrap;
}
.sm-f:hover { color: var(--white); border-color: var(--cyan); }
.sm-f.is-on { background: rgba(0, 180, 216, .15); border-color: var(--cyan); color: var(--cyan); font-weight: bold; }
.sm-f-n {
  display: inline-block; min-width: 16px; text-align: center;
  background: rgba(255, 255, 255, .10); border-radius: 8px;
  font-size: 9px; padding: 1px 5px; margin-left: 3px;
}

.sm-tools { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 0; flex-wrap: wrap; }
.sm-search, .sm-select {
  background: var(--navy2); border: 1px solid var(--c-border); color: var(--white);
  border-radius: 5px; padding: 7px 10px; font-size: 11px; min-height: 34px;
}
.sm-search { flex: 1 1 200px; min-width: 0; }
.sm-sm { padding: 6px 12px; font-size: 10.5px; min-height: 32px; }
.sm-danger { border-color: rgba(239, 68, 68, .55); color: #fca5a5; }
.sm-danger:hover { border-color: var(--red); color: #fff; }
.sm-progress { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* ---- the two panes ------------------------------------------------------- */
/* 320px of rail and the rest to the panel. The rail is a fixed width on
   purpose: a name and an organisation are short, and a rail that grows with
   the window just puts more air between the name and the thing you are
   reading about them. */
.sm-split {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.sm-rail {
  background: var(--navy);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Its own scrollbar, so the list stays put while the panel is read. */
  max-height: 62vh;
}
.sm-rail-head {
  padding: 7px 11px;
  font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--cyan);
  background: var(--navy2);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  flex: 0 0 auto;
}
.sm-list { overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }

/* ---- one speaker, in the rail -------------------------------------------- */
.sm-card {
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  border-left: 3px solid transparent;
  padding: 9px 11px; cursor: pointer;
  font: inherit; color: inherit;
  transition: background .15s, border-color .15s;
}
.sm-card:hover { background: rgba(0, 180, 216, .07); }
.sm-card.is-on { background: rgba(0, 180, 216, .15); border-left-color: var(--cyan); }
.sm-card.state-bin .sm-card-name { text-decoration: line-through; opacity: .75; }

.sm-face { flex: 0 0 auto; line-height: 0; }
.sm-face img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; display: block; }
.sm-face-none {
  width: 44px; height: 44px; border-radius: 6px;
  background: var(--navy2); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: var(--muted);
}
.sm-face-big { width: 72px; height: 72px; font-size: 27px; }

.sm-card-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sm-card-name { font-size: 12px; font-weight: 700; color: var(--white); line-height: 1.25; }
.sm-card-org  { font-size: 10px; color: var(--cyan); }
.sm-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sm-card-n    { font-size: 9px; color: var(--muted); white-space: nowrap; }

.sm-chip {
  display: inline-block; font-size: 9px; font-weight: 700;
  padding: 1.5px 6px; border-radius: 3px; white-space: nowrap;
}
.sm-pill-green { background: rgba(34, 197, 94, .18); color: #86efac; }
.sm-pill-grey  { background: rgba(148, 163, 184, .18); color: var(--muted); }
.sm-pill-red   { background: rgba(239, 68, 68, .18); color: #fca5a5; }

/* One dot, because in a list the health is a glance rather than a sentence.
   The sentence is on the panel. */
.sm-health { font-size: 12px; line-height: 1; }
.sm-health.is-broken { color: #f87171; }
.sm-health.is-risk   { color: #fbbf24; }
.sm-health.is-ok     { color: #4ade80; }
.sm-health.is-none   { color: var(--muted); }
.sm-health-chip.is-broken { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.sm-health-chip.is-risk   { background: rgba(245, 158, 11, .20); color: #fcd34d; }
.sm-health-chip.is-ok     { background: rgba(34, 197, 94, .18); color: #86efac; }
.sm-health-chip.is-none   { background: rgba(148, 163, 184, .18); color: var(--muted); }

.sm-empty {
  padding: 24px 14px; color: var(--muted); font-size: 11.5px; text-align: center;
}

/* ---- the panel ----------------------------------------------------------- */
.sm-panel {
  background: var(--navy);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 14px 16px;
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sm-pick-none {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 240px; text-align: center; color: var(--muted); font-size: 12.5px;
}
.sm-pick-none-icon { font-size: 34px; opacity: .5; }
.sm-pick-none-sub { font-size: 11px; max-width: 320px; line-height: 1.6; }

.sm-who { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.sm-who-face { flex: 0 0 auto; line-height: 0; }
.sm-who-face img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; display: block; }
.sm-who-words { flex: 1 1 220px; min-width: 0; }
.sm-who-name { font-size: 19px; font-weight: 700; color: var(--white); line-height: 1.2; }
.sm-who-org  { font-size: 12px; color: var(--cyan); margin-top: 2px; }
.sm-who-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.sm-who-go { flex: 0 0 auto; }

.sm-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sm-fact-v { font-size: 16px; font-weight: 700; color: var(--white); line-height: 1.1; }
.sm-fact-k { font-size: 8.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.sm-block { margin-top: 16px; }
.sm-block-h {
  font-size: 9.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.sm-block-note {
  font-size: 9.5px; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--muted);
}

.sm-standing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sm-say { flex: 1 1 100%; margin: 0 0 4px; font-size: 11px; color: var(--muted); line-height: 1.55; }
.sm-say.sm-locked { color: var(--gold); }

.sm-none { font-size: 11px; color: var(--muted); font-style: italic; }

/* ---- the pictures -------------------------------------------------------- */
.sm-pics { display: flex; flex-direction: column; gap: 8px; }
.sm-pic {
  background: var(--navy2); border: 1px solid var(--c-border);
  border-radius: 5px; padding: 8px 10px;
}
.sm-pic-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sm-pic-what { font-size: 11px; font-weight: 600; color: var(--white); }
.sm-pic-pills { flex: 0 0 auto; }
.sm-pic-where { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.sm-pic-fix { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.sm-pic-url {
  flex: 1 1 240px; min-width: 0;
  background: var(--inp-bg); border: 1px solid var(--c-border); color: var(--inp-text);
  border-radius: 4px; padding: 6px 8px; font-size: 10.5px; font-family: monospace;
}
.sm-pic-url-ro {
  margin-top: 6px; font-size: 10px; font-family: monospace; color: var(--muted);
  word-break: break-all;
}

/* ---- the appearances ----------------------------------------------------- */
.sm-apps { display: flex; flex-direction: column; }
.sm-app {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 11px;
}
.sm-app:last-child { border-bottom: none; }
.sm-app-d { flex: 0 0 92px; color: var(--gold); font-weight: 700; white-space: nowrap; }
.sm-app-t { flex: 1 1 auto; min-width: 0; color: var(--white); }
.sm-app.is-archived .sm-app-d,
.sm-app.is-archived .sm-app-t { color: var(--muted); }

/* ---- narrow ------------------------------------------------------------- */
@media (max-width: 1000px) {
  .sm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-split { grid-template-columns: minmax(0, 1fr); }
  .sm-rail { max-height: 300px; }
  .sm-panel { max-height: none; }
}
@media (max-width: 620px) {
  .sm-tiles { grid-template-columns: minmax(0, 1fr); }
  .sm-who-go { flex: 1 1 100%; }
}

@media print {
  .sm-bar, .sm-tools, .sm-filters, .sm-standing button, .sm-pic-fix { display: none !important; }
  .sm-split { grid-template-columns: minmax(0, 1fr); }
  .sm-rail, .sm-panel { max-height: none; overflow: visible; }
}
