/*
 * The v3 board (lane t22-deskv3, 15 Oct 2026; js/v3_desk.js 1.0.0). Only the desk's own tokens, so every theme follows
 * (light, dark, Eucalypt, Harbour, High contrast). Nothing here draws while the server switch desk.ui.v3 is off: every
 * rule hangs off .v3-* or :root[data-v3="on"], which only that file adds.
 */

/* ---------- one label and one line per card ---------- */
.v3-aud { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 4px; min-width: 0; }
.v3-aud-l {
  flex: none; display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: .6875rem;
  line-height: 1.125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--info); background: color-mix(in srgb, var(--info) var(--tint-alpha), transparent);
}
.v3-aud-cm { color: var(--accent, var(--brand-text)); background: color-mix(in srgb, var(--accent, var(--brand-text)) var(--tint-alpha), transparent); }
.v3-aud-leads { color: var(--ok); background: color-mix(in srgb, var(--ok) var(--tint-alpha), transparent); }
.v3-aud-leaders { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); }
.v3-todo { min-width: 0; font-size: .8125rem; line-height: 1.125rem; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.v3-help-mount[hidden], .v3-help-mount-job[hidden] { display: none; }

/* The older stickers that said who a card is for are not drawn on the v3 board (the label above says it once). */
:root[data-v3="on"] .card .nst-badge,
:root[data-v3="on"] .card .adp-badge { display: none; }

/* ---------- the clean head ---------- */
:root[data-v3="on"] .board-head .clr-link { display: none; }
:root[data-v3="on"] #board-sub { max-width: 40rem; }
.vcx-v3 .vcx-sel { max-width: 12rem; }

/* ---------- the gamified extras are not drawn (the data is kept) ---------- */
:root[data-v3="on"] #pp-tally,
:root[data-v3="on"] #pp-level { display: none; }

/* ---------- the one Today panel ---------- */
.v3-today { gap: 10px; }
.v3-today h2 { margin: 0; font-size: 1rem; }
.v3-today .btn { justify-self: start; }
.v3-today-foot { position: static; margin: 16px 0 0; }

/* ---------- Errors (the Director and the GM) ---------- */
.v3-err {
  margin: 0 0 12px; border-radius: var(--r-card); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  box-shadow: inset 4px 0 0 var(--danger), var(--shadow-1); background: var(--solid); color: var(--ink); min-width: 0;
}
.v3-err-sum {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 10px 14px; cursor: pointer; list-style: none;
  font-size: .875rem; font-weight: 700; color: var(--danger);
}
.v3-err-sum::-webkit-details-marker { display: none; }
.v3-err-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-card); }
.v3-err-t { color: var(--ink); }
.v3-err-k { font-weight: 600; color: var(--ink-3); font-size: .8125rem; }
.v3-err-list { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 8px; }
.v3-err-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 2px 10px;
  padding-top: 8px; border-top: 1px solid var(--glass-rim); font-size: .8125rem; line-height: 1.25rem;
}
.v3-err-kind { font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-size: .6875rem; }
.v3-err-line { min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.v3-err-more { grid-column: 2; min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
@media (max-width: 599px) {
  .v3-err-row { grid-template-columns: minmax(0, 1fr) auto; }
  .v3-err-kind { grid-column: 1 / -1; }
  .v3-err-more { grid-column: 1 / -1; }
}

/* ---------- nothing needed: hidden, or faded under a leader's Show all switch ---------- */
:root[data-v3="on"] .card.v3-nothing,
:root[data-v3="on"] .cc-card.v3-nothing { opacity: .5; }
:root[data-v3="on"] .card.v3-nothing:hover,
:root[data-v3="on"] .card.v3-nothing:focus-within,
:root[data-v3="on"] .cc-card.v3-nothing:focus-within { opacity: .8; }
.v3-nothing-tag {
  flex: none; display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: .6875rem;
  line-height: 1.125rem; font-weight: 700; color: var(--ink-2); border: 1px dashed var(--edge-strong); background: var(--glass-1);
}
.v3-nothing-cc { margin: 0 0 6px; }
.v3-all {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 2px solid var(--brand); background: transparent; color: var(--brand-text); font: inherit; font-size: .8125rem;
  font-weight: 700; cursor: pointer; max-width: 100%;
}
.v3-all:hover { background: var(--glass-hover); }
.v3-all:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.v3-all .v3-all-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--brand); }
.v3-all.is-on { background: var(--brand); color: var(--brand-ink); }
.v3-all.is-on .v3-all-dot { background: var(--brand-ink); border-color: var(--brand-ink); }
.v3-all .v3-all-w { min-width: 0; overflow-wrap: anywhere; text-align: left; }
.v3-all .v3-all-n {
  flex: none; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: .75rem; line-height: 1.25rem;
  background: color-mix(in srgb, var(--brand) 18%, transparent);
}
.v3-all.is-on .v3-all-n { background: color-mix(in srgb, var(--brand-ink) 25%, transparent); }

/* ---------- release 116: To and Cc for the person working on the job ---------- */
.v3-lines { display: grid; gap: 6px; min-width: 0; }
.v3-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.v3-line > .k { flex: none; min-width: 1.75rem; font-size: .75rem; font-weight: 700; color: var(--ink-3); }
.v3-chips { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.v3-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 1px 2px 1px 10px;
  border-radius: 999px; background: var(--glass-1); border: 1px solid var(--glass-rim); font-size: .8125rem;
}
.v3-chip.is-typed { border-style: dashed; border-color: var(--brand); }
.v3-chip .nm { font-weight: 600; }
.v3-chip .ad { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.v3-chip .v3-x { min-height: 26px; min-width: 26px; }
.v3-add-row { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 14rem; }
.v3-add-in {
  flex: 1 1 10rem; min-width: 0; min-height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--edge-strong);
  background: var(--solid); color: var(--ink); font: inherit; font-size: .8125rem;
}
.v3-add-in:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

/* ---------- release 116: New email at the bottom of an open client card ---------- */
.cc-new { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--glass-rim); }
.cc-new .meta { min-width: 0; overflow-wrap: anywhere; }

/* ---------- release 117: one client card, each job a folded part ---------- */
.cc-part { border-top: 1px solid var(--glass-rim); padding: 8px 0 0; margin: 8px 0 0; min-width: 0; }
.cc-part:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.cc-part-sum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; cursor: pointer; list-style: none; min-width: 0; }
.cc-part-sum::-webkit-details-marker { display: none; }
.cc-part-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.cc-part-t { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.cc-part-do { font-size: .8125rem; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.cc-own { display: grid; gap: 8px; padding: 8px 0; border-top: 1px solid var(--glass-rim); min-width: 0; }
.cc-own:first-child { border-top: 0; }
.cc-own-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0; min-width: 0; }

/* ---------- release 118: the claims manager's own colour (--cmc, set per card from their avatar colour) ---------- */
.card.v3-cm, .cc-card.v3-cm {
  box-shadow: inset 4px 0 0 var(--cmc), 0 0 0 1px color-mix(in srgb, var(--cmc) 45%, transparent),
    0 6px 20px color-mix(in srgb, var(--cmc) 16%, transparent), var(--shadow-1);
}
.card.v3-cm:hover, .card.v3-cm:focus-within, .cc-card.v3-cm:hover, .cc-card.v3-cm.is-open {
  box-shadow: inset 4px 0 0 var(--cmc), 0 0 0 1px color-mix(in srgb, var(--cmc) 60%, transparent),
    0 8px 26px color-mix(in srgb, var(--cmc) 26%, transparent), var(--shadow-1);
}
.cc-part.v3-cm { box-shadow: inset 3px 0 0 var(--cmc); padding-left: 10px; }
.v3-cm-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 6px; }
.v3-cm-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: .6875rem; line-height: 1.125rem; font-weight: 700; color: var(--ink);
  border: 1px solid var(--cmc); background: color-mix(in srgb, var(--cmc) 14%, var(--solid));
}
.v3-cm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cmc); }
@media (prefers-reduced-motion: no-preference) { .card.v3-cm, .cc-card.v3-cm { transition: box-shadow var(--t-small, .2s) ease; } }

/* ---------- release 124: Clients: compact (one line per client) ---------- */
.cc-card.cc-one { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; }
.cc-card.cc-one > .v3-cm-chips { order: 2; margin: 0; flex: none; }
.cc-card.cc-one > .cc-head { order: 1; flex: 1 1 18rem; min-width: 0; margin: 0; }
.cc-card.cc-one > .cc-foot { order: 3; flex: none; margin: 0; padding: 0; border: 0; }
.cc-card.cc-one .cc-av, .cc-card.cc-one .cc-meta, .cc-card.cc-one .cc-badge,
.cc-card.cc-one > .cc-why, .cc-card.cc-one > .cc-urgent-why, .cc-card.cc-one .cc-chips { display: none; }
.cc-card.cc-one.is-urgent .cc-name::after { content: " (urgent)"; color: var(--danger); font-weight: 700; font-size: .8125rem; }
.cc-one-line { margin: 2px 0 0; font-size: .8125rem; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- release 124: "I need help with this" shows on every card (the mounts are no longer hidden) ---------- */
.v3-help-mount:empty { display: none; }
.v3-help-card { display: flex; justify-content: flex-end; margin: 6px 0 0; position: relative; z-index: 2; }
.cc-help { display: inline-flex; }
@media (max-width: 599px) {
  .cc-card.cc-one > .cc-foot { flex: 1 1 100%; }
  .cc-one-line { white-space: normal; }
}
.cc-card.cc-one > .cc-head { display: block; }
.cc-card.cc-one .cc-id { min-width: 0; }
.cc-card.cc-one .cc-name { margin: 0; font-size: 1rem; line-height: 1.3rem; }
