/* Incubate360 v3.5: the Committee Room and the cohort desk.

   EVERY class in this file starts with `v5-`. That is not house style, it is the fix for
   §1.13: a short generic class name is a name somebody else has already taken, and a modifier
   word given a bare rule breaks a screen three modules away. `scripts/css-clash.mjs` is the
   guard that keeps it that way.

   Every colour is a token, never a hard-coded hex on anything whose text is var(--ink), or it
   is a dark-mode bug waiting (gotcha 39). */

/* ── forms ── */
.v5-form { display: grid; gap: 14px; }
.v5-f { display: block; }
.v5-fl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.v5-fh { display: block; font-size: 12px; color: var(--mut); margin-top: 4px; line-height: 1.45; }
.v5-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.v5-row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.v5-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-width: 0; }
.v5-chk input { width: 16px; height: 16px; flex: 0 0 auto; }
.v5-chk span { min-width: 0; }
.v5-sec { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 6px 0 0;
  padding-top: 12px; border-top: 1px solid var(--line); }

/* ── a banner that explains, not warns ── */
.v5-banner { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--blue, #1878F0);
  border-radius: 10px; padding: 11px 14px; font-size: 13px; color: var(--ink); margin-bottom: 14px;
  line-height: 1.5; }
.v5-warn { background: var(--card); border: 1px solid var(--line); border-left: 3px solid #E8A33D;
  border-radius: 10px; padding: 11px 14px; font-size: 13px; color: var(--ink); margin-bottom: 14px;
  line-height: 1.5; }

/* ── cards laid out in a grid that never pushes the page sideways ── */
.v5-grid { display: grid; gap: 14px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }

/* ── a committee card ── */
.v5-cmt, .v5-prg, .v5-rep { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.v5-cmt-h, .v5-prg-h { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.v5-cmt-n, .v5-prg-n { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3;
  overflow-wrap: anywhere; }
.v5-cmt-k, .v5-prg-t { font-size: 12px; color: var(--mut); margin-top: 2px; }
.v5-cmt-m { font-size: 12.5px; color: var(--mut); font-style: italic; line-height: 1.5;
  border-left: 2px solid var(--line); padding-left: 10px; }
.v5-prg-d { font-size: 12.5px; color: var(--mut); line-height: 1.5; }
.v5-cmt-s { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--mut); }
.v5-cmt-s span { white-space: nowrap; }
.v5-cmt-w { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.v5-cmt-w.bad { color: #D6455B; }
.v5-cmt-b { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }

/* ── the committees a centre is expected to have ── */
.v5-miss { display: flex; align-items: center; gap: 12px; padding: 11px 0; min-width: 0;
  border-top: 1px solid var(--line); }
.v5-miss:first-child { border-top: 0; }

/* ── why the committee exists, said once at the top ── */
.v5-motive { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.v5-motive-l { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--mut); margin-bottom: 6px; }

/* ── quorum, said out loud ── */
.v5-quorum { border-radius: 12px; padding: 12px 15px; margin-bottom: 14px; font-size: 13px;
  line-height: 1.5; border: 1px solid var(--line); background: var(--card); }
.v5-quorum.ok { border-left: 3px solid #15A34A; }
.v5-quorum.bad { border-left: 3px solid #D6455B; }

/* ── the five minutes clocks ── */
.v5-clock { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.v5-step { display: flex; align-items: flex-start; gap: 9px; flex: 1 1 0; min-width: 132px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.v5-step-d { width: 22px; height: 22px; border-radius: 999px; flex: 0 0 auto; display: grid;
  place-items: center; font-size: 12px; font-weight: 700; background: var(--canvas, #F5F7FB);
  color: var(--mut); }
.v5-step.done .v5-step-d { background: #15A34A; color: #fff; }
.v5-step.late .v5-step-d { background: #D6455B; color: #fff; }
.v5-step.late { border-color: #D6455B; }
.v5-step-l { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.v5-step-a { font-size: 11.5px; color: var(--mut); margin-top: 2px; }

/* ── the agenda ── */
.v5-ag { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0;
  align-items: flex-start; }
.v5-ag:first-child { border-top: 0; }
.v5-ag-n { width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto; display: grid;
  place-items: center; background: var(--canvas, #F5F7FB); color: var(--mut);
  font-size: 12px; font-weight: 700; }
.v5-ag-t { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.v5-ag-b { font-size: 12.5px; color: var(--mut); margin-top: 4px; line-height: 1.5; }
.v5-ag-d { font-size: 12.5px; color: var(--ink); margin-top: 5px; font-weight: 600; }
.v5-ag-p { font-size: 12px; color: var(--mut); margin-top: 3px; }

/* ── the agenda builder, inside the dialog ── */
.v5-items { display: grid; gap: 8px; }
.v5-item { display: flex; gap: 8px; align-items: center; min-width: 0; }
.v5-item .inp { min-width: 0; }
.v5-item-n { width: 22px; flex: 0 0 auto; text-align: center; font-size: 12px; color: var(--mut);
  font-weight: 700; }

/* ── the attendance register ── */
.v5-reg { display: grid; gap: 2px; }
.v5-att { display: flex; align-items: center; gap: 11px; padding: 9px 2px; min-width: 0;
  border-top: 1px solid var(--line); cursor: pointer; }
.v5-att:first-child { border-top: 0; }
.v5-att input[type=checkbox] { width: 17px; height: 17px; flex: 0 0 auto; }
/* a select will not shrink below its longest option, so it holds the row open unless told
   otherwise. Gotcha 38. */
.v5-att select { flex: 0 0 auto; min-width: 0; max-width: 128px; }

/* ── minutes, once they are signed ── */
.v5-mom-ro { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--ink);
  background: var(--canvas, #F5F7FB); border-radius: 10px; padding: 14px 16px; }

/* ── the shown-once password ── */
.v5-pw { display: grid; gap: 6px; margin: 10px 0; }
.v5-pw code { background: var(--canvas, #F5F7FB); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; display: block; overflow-wrap: anywhere; color: var(--ink); }

/* ── what is waiting for you ── */
.v5-wait { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 2px;
  border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: left; min-width: 0; }
.v5-wait:first-child { border-top: 0; }
.v5-wait:hover { background: var(--canvas, #F5F7FB); }
.v5-wait-n { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; display: grid;
  place-items: center; background: var(--violet, #5B21E8); color: #fff; font-size: 13px; font-weight: 700; }
.v5-wait-g { font-size: 12.5px; color: var(--mut); flex: 0 0 auto; }

/* ── a cohort or programme that charges nothing ── */
.v5-free { background: var(--card); border: 1px solid var(--line); border-left: 3px solid #15A34A;
  border-radius: 10px; padding: 11px 14px; font-size: 13px; color: var(--ink); line-height: 1.5;
  margin-bottom: 14px; }
.v5-free-box { border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px;
  background: var(--canvas, #F5F7FB); }

/* ── spend by head ── */
.v5-heads { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.v5-head { display: flex; gap: 9px; align-items: baseline; padding: 7px 12px; border-radius: 999px;
  background: var(--canvas, #F5F7FB); border: 1px solid var(--line); font-size: 12.5px; color: var(--mut); }
.v5-head b { color: var(--ink); }

/* ── rules and joining instructions ── */
.v5-instr { background: var(--canvas, #F5F7FB); border-radius: 11px; padding: 13px 15px;
  margin-bottom: 12px; font-size: 13px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }
.v5-rule { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; min-width: 0;
  border-top: 1px solid var(--line); }
.v5-rule:first-child { border-top: 0; }
.v5-rule-b { font-size: 12.5px; color: var(--mut); margin-top: 4px; line-height: 1.55; }

/* ── picking startups to enrol ── */
.v5-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px;
  padding: 4px 12px; }
.v5-pick-r { display: flex; align-items: center; gap: 11px; padding: 9px 0; min-width: 0;
  border-top: 1px solid var(--line); cursor: pointer; }
.v5-pick-r:first-child { border-top: 0; }
.v5-pick-r input { width: 16px; height: 16px; flex: 0 0 auto; }

/* ── a fee the bill run refused ── */
.v5-blocked { border: 1px solid var(--line); border-left: 3px solid #E8A33D; border-radius: 9px;
  padding: 10px 13px; margin-bottom: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink); }

/* ── the reports cards ── */
.v5-rep-n { font-size: 14px; font-weight: 700; color: var(--ink); }
.v5-rep-d { font-size: 12.5px; color: var(--mut); line-height: 1.5; flex: 1 1 auto; }

/* ── what the founder sees of their cohort ── */
.v5-my { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 14px; }
.v5-my-t { font-size: 16px; font-weight: 700; color: var(--ink); }
.v5-my-s { font-size: 12.5px; color: var(--mut); margin-top: 3px; }
.v5-my-fee { margin-top: 12px; padding: 12px 14px; border-radius: 11px;
  background: var(--canvas, #F5F7FB); font-size: 13px; line-height: 1.55; color: var(--ink); }

@media (max-width: 640px) {
  .v5-cmt-b { gap: 6px; }
  .v5-att select { max-width: 96px; }
}

/* ── v3.6 · where a committee is assigned, and its history ── */
.v5-asg, .v5-hist { display: flex; align-items: flex-start; gap: 11px; width: 100%; min-width: 0;
  padding: 11px 2px; border: 0; border-top: 1px solid var(--line); background: none;
  font: inherit; color: var(--ink); text-align: left; }
.v5-asg:first-child, .v5-hist:first-child { border-top: 0; }
button.v5-asg, button.v5-hist { cursor: pointer; }
button.v5-asg:hover, button.v5-hist:hover { background: var(--canvas, #F5F7FB); }
.v5-asg-k, .v5-hist-k { flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--mut); padding: 3px 9px; border-radius: 999px;
  background: var(--canvas, #F5F7FB); border: 1px solid var(--line); white-space: nowrap; }
.v5-asg-d { font-size: 12.5px; color: var(--mut); margin-top: 3px; line-height: 1.5; }
.v5-hist-d { flex: 0 0 auto; width: 92px; font-size: 12px; color: var(--mut); padding-top: 3px; }
@media (max-width: 640px) { .v5-hist-d { width: 74px; } }
.v5-hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* ─── v3.7.1 · who looks after a programme, read and changed with the same control ─── */
.v5-coordpick { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.v5-dutytick { margin-top: 2px; }
.v5-coordbtn { display: flex; align-items: center; gap: 8px; width: 100%; font: inherit;
  font-size: 12px; color: var(--ink); background: transparent; border: 1px dashed var(--line);
  border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; cursor: pointer; text-align: left; }
.v5-coordbtn:hover { border-style: solid; border-color: var(--violet); color: var(--violet); }
.v5-coordbtn.none { color: var(--mut); font-style: italic; }
.v5-coordbtn-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.v5-coordbtn-i { display: inline-flex; opacity: .55; flex: 0 0 auto; }
.v5-coordbtn:hover .v5-coordbtn-i { opacity: 1; }
.v5-coordsays { font-size: 12px; color: var(--mut); margin: 8px 0 0; }
.v5-coordrow { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.v5-nobody { color: #D6455B; }
