/* The Client File's Documents tab (mockup p-docs). Builds on clients.css (.cl-*) and the design tokens;
   sans only, tabular figures, sentence case. Works down to 375px: the table becomes one card per document. */

.dc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; }
.dc-head h2 { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.005em; }
.dc-sub { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* Filters: one row of small selects, then the search box. */
.dc-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dc-filter { position: relative; display: inline-flex; align-items: center; }
/* Filters are small sunken selects (the field material); a filter in use is lifted onto a panel. */
.dc-filter select { appearance: auto; height: 34px; max-width: 240px; padding: 0 10px; border-radius: var(--radius-pill); border: 0; background: var(--field-bg); color: var(--ink); font: 500 13px var(--font-sans); box-shadow: var(--shadow-field); cursor: pointer; }
.dc-filter select:hover { color: var(--ink); }
.dc-filter select:focus-visible { outline: none; box-shadow: var(--shadow-field), 0 0 0 3px color-mix(in srgb, var(--action) 22%, transparent); }
.dc-filter.on select { background: var(--panel-bg); box-shadow: var(--shadow-panel), inset 0 0 0 1px var(--action); }
.dc-clear { font-size: 13px; }

.dc-search { display: flex; gap: 8px; align-items: center; flex: 1 1 280px; min-width: 0; }
.dc-search .wp-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; }
.dc-search input { flex: 1; min-width: 0; height: 36px; font: inherit; font-size: 14px; color: var(--ink); }
.dc-search input::placeholder { color: var(--faint); }

.dc-results { display: flex; flex-direction: column; }
.dc-result { display: flex; flex-direction: column; gap: 4px; padding: 12px 4px; border-top: 1px solid var(--line); }
.dc-result:first-of-type { border-top: 0; }
.dc-result a.t { font-weight: 500; overflow-wrap: anywhere; }
.dc-result a.t:hover { text-decoration: underline; text-underline-offset: 3px; }
.dc-result .m { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dc-result .s { font-size: 13.5px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.dc-hl { background: var(--highlight); color: var(--ink); border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -1px 0 var(--highlight-edge); }

/* List and detail side by side; the detail pane goes first on narrow screens. */
.dc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dc-cols.single { grid-template-columns: minmax(0, 1fr); }
.section-card.flush.dc-list { padding: 4px 10px 10px; }

.dc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dc-table th { font-weight: 500; text-align: left; color: var(--muted); font-size: 12.5px; padding: 12px 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dc-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dc-table tr:last-child td { border-bottom: 0; }
.dc-table tr.grp td { padding: 16px 10px 6px; font-size: 12.5px; font-weight: 500; color: var(--eyebrow-ink); border-bottom: 1px solid var(--line); }
.dc-table tbody tr:not(.grp):hover { background: var(--row-hover); }
.dc-table tr.sel { background: var(--select-tint); box-shadow: inset 2px 0 0 var(--action); }
.dc-table small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.dc-name { font-weight: 500; overflow-wrap: anywhere; }
.dc-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.dc-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dc-gone { font-size: 12.5px; color: var(--muted); }

/* Detail pane */
/* The open document sticks under the floating top bar and the Client File tabs while the list scrolls. */
.dc-pane { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 124px; min-width: 0; }
.dc-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dc-card h3 { font-size: 15px; line-height: 21px; font-weight: 600; overflow-wrap: anywhere; }
.dc-card .cdh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dc-card .cdh b { font-size: 14px; font-weight: 600; }
.dc-card .cdh span { font-size: 12.5px; color: var(--muted); }
.dc-preview { border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-solid); box-shadow: var(--shadow-paper); overflow: hidden; }
.dc-preview img { display: block; width: 100%; height: auto; }
.dc-preview .none { padding: 28px 16px; font-size: 13px; color: var(--muted); text-align: center; }
.dc-pages { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dc-pages a { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); border: 1px solid var(--line); }
.dc-pages a:hover { background: var(--row-hover); }
.dc-pages a[aria-current="page"] { background: var(--action); border-color: var(--action); color: var(--on-action); font-weight: 500; }
.dc-wp { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.dc-wp:first-of-type { border-top: 0; padding-top: 0; }
.dc-wp > a { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.dc-wp > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dc-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; font-size: 13px; }
.dc-kv > :nth-child(odd) { color: var(--ink-2); overflow-wrap: anywhere; }
.dc-kv > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.dc-facts dt { color: var(--muted); }
.dc-facts dd { margin: 0; overflow-wrap: anywhere; }
.dc-note { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.dc-warn { font-size: 13px; line-height: 19px; padding: 10px 12px; border-radius: var(--radius-control); background: var(--review-soft); color: var(--review); }
.dc-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-error { font-size: 13px; color: var(--danger); }

@media (max-width: 1100px) {
  .dc-cols { grid-template-columns: minmax(0, 1fr); }
  .dc-pane { position: static; order: -1; }
}
/* Phones: each document is a small card; the column headings become labels. */
@media (max-width: 760px) {
  .dc-table thead { display: none; }
  .dc-table, .dc-table tbody, .dc-table tr, .dc-table td { display: block; width: 100%; }
  .dc-table tr:not(.grp) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
  .dc-table tr:not(.grp) td { padding: 0; border: 0; }
  .dc-table tr:not(.grp) td:first-child { grid-column: 1 / -1; }
  .dc-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .dc-table tr.grp td { padding: 14px 6px 6px; }
  .dc-filter select { max-width: 100%; }
  .dc-filters .dc-filter { flex: 1 1 calc(50% - 8px); }
  .dc-filters .dc-filter select { width: 100%; }
  .dc-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dc-facts dd { margin-bottom: 6px; }
}
