/* ldu/pages-dan.css: Daniel's internal pages, the fixes from the UX audit (docs/audits/dan-internal-ux-2026-11-11.md; Milan, 11 Nov 2026).
   Kept apart from ldu/pages-work.css (DHH's) and loaded after it. Layout only; colours through tokens (bin/ds-lint). Hover is a colour change. */

/* ── A client's data room (clients/show): asks first, then the matter row with its own buttons, the documents, the login line last ── */
.dclient__matter { display: grid; gap: 12px; }
.dclient__tabs .ldu-tabs__label { display: inline-flex; align-items: center; gap: 6px; }
/* an ask waiting on that matter: a 6px dot in the danger colour, like a late chip's */
.dclient__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--danger); }
.dclient__pick { display: none; }
.dclient__title { font-size: var(--fs-body); }
.dclient__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dclient__row > .dataroom__actions { margin-left: auto; }
.dclient__matter-link { color: var(--ink); font-weight: 500; text-decoration: none; }
.dclient__matter-link:hover, .dclient__matter-link:focus-visible { color: var(--accent); }

/* a document card: the title, then the type as a small chip-like select and the reference */
.dclient__card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.dclient__card-meta > small { white-space: nowrap; }
.dclient__kind {
  appearance: none; -webkit-appearance: none; flex: none; width: auto; max-width: 100%; box-sizing: border-box; min-height: 24px; padding: 2px 22px 2px 10px;
  border: 1px solid var(--line); border-radius: 999px; background-color: var(--ldu-wash); color: var(--ink-2);
  font: 500 var(--fs-meta) / 1.4 var(--sans); cursor: pointer; transition: color var(--dur), background-color var(--dur), border-color var(--dur);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 11px center, right 7px center; background-size: 4px 4px; background-repeat: no-repeat;
}
.dclient__kind:hover { border-color: var(--ink-4); color: var(--ink); }
.dclient__kind:focus-visible { outline: var(--ring-w) solid var(--ring); outline-offset: var(--ring-offset); }

/* a client with no matter yet: the first matter's form sits in the page */
.dclient__start { display: grid; gap: 8px; padding: 20px; }
.dclient__start-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; max-width: none; margin-top: 8px; }
.dclient__start-form label { display: grid; gap: 4px; font-size: var(--fs-meta); color: var(--ink-2); }

/* the client's login: one quiet line, its modal behind a text link (a button that reads as one) */
.dclient__login { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.dclient__login > p { margin: 0; color: var(--ink-2); font-size: var(--fs-meta); }
.dclient__link { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; color: var(--ink-2); font-size: var(--fs-meta); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; transition: color var(--dur); }
.dclient__link:hover, .dclient__link:focus-visible { color: var(--accent); }

/* the matter tabs scroll sideways (ldu-tabs) beside an open chat pane; only a phone-wide page swaps them for the dropdown */
@container page (max-width: 560px) {
  .dclient__tabs { display: none; }
  .dclient__pick { display: block; }
}
@container page (max-width: 720px) {
  .dclient__row > .dataroom__actions { margin-left: 0; }
  .dclient__start-form { grid-template-columns: 1fr; }
}

/* ── My Agents, an agent's page (agent_sessions/show): the shared tab strip inside the card, inset like its panels ── */
.agentshow__tabbar { padding: 0 12px; }

/* ── The modals on Daniel's pages (modal_tag, as the client's Settings): a matter's flags as one titled group of tick boxes ── */
.dmodal__flags { margin: 0; padding: 0; border: 0; }
.dmodal__flags > .field__label { padding: 0; margin-bottom: 0; }

/* My Agents' Add an agent (modal_tag, Alpine steps): the shared box at its own width; the terminal step widens it for the QR beside the steps */
.dagents__body--qr { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px 24px; }
@media (min-width: 721px) {
  dialog.popup-dialog.dagents--wide .modal.ldu-modal__box { width: min(860px, calc(100vw - 32px)); }
}
@media (max-width: 720px) { .dagents__body--qr { grid-template-columns: minmax(0, 1fr); } }
