/* === agent d3: customer filing system (Documents page, Files explorer additions) === */
/* Version labels: color only says which copy it is. Sources stay neutral (WorkDrive keeps its sky chip). */
.fx-chip.ver-draft { color: #8A5A00; background: rgb(var(--sg-gold-rgb) / .2); }
.fx-chip.ver-approved { color: var(--sg-blue); background: rgb(var(--sg-blue-rgb) / .1); }
.fx-chip.ver-revision { color: var(--ink-2); background: rgb(16 22 43 / .07); }
.fx-chip.src-desk, .fx-chip.src-gdrive { color: var(--ink-2); background: rgb(255 255 255 / .8); box-shadow: inset 0 0 0 1px var(--line-2); }
.fx-review { display: flex; align-items: center; gap: var(--sp-2); min-height: 30px; margin-top: var(--sp-1); padding: 0 var(--sp-2); border-radius: 10px; font-size: var(--fs-sm); font-weight: 600;
  color: #8A5A00; background: rgb(var(--sg-gold-rgb) / .14); text-decoration: none; }
.fx-review:hover { background: rgb(var(--sg-gold-rgb) / .22); text-decoration: none; }
.fx-review:active { transform: scale(.985); transition-duration: .1s; }
.fx-review .fx-nc { margin-left: auto; color: inherit; }
.fx-noprev .muted.small { max-width: 34ch; }
/* A file name keeps its room; its labels sit beside it, or drop under it when the column is narrow. */
.fx-ltxt { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 2px; min-width: 0; flex: 1 1 auto; padding: 3px 0; }
.fx-ltxt .fx-name { flex: 0 1 auto; min-width: min(16ch, 100%); }
.fx-lchips { display: inline-flex; gap: 4px; flex: none; }
.fx-lchips:empty { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Page */
.dc { max-width: 980px; margin: 0 auto; display: grid; gap: var(--sp-3); }
.dc-head { display: flex; align-items: center; gap: var(--sp-3); }
.dc-head h1 { margin: 0; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.02em; }
.dc-title p { margin: .15rem 0 0; color: var(--muted); font-size: var(--fs-md); line-height: 1.45; }
.dc-seg { display: inline-flex; justify-self: start; padding: 3px; gap: 3px; border-radius: var(--r-pill); background: rgb(255 255 255 / .5); box-shadow: inset 0 0 0 1px var(--line-2); }
.dc-seg button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: var(--fs-md); color: var(--muted); height: 32px; padding: 0 16px; border-radius: var(--r-pill); cursor: pointer;
  transition: background .2s, color .2s, transform .1s; }
.dc-seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(16 24 40 / .12); }
.dc-seg button:active { transform: scale(.97); }
.dc-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: var(--r-pill); font-size: 11px; font-variant-numeric: tabular-nums;
  color: #8A5A00; background: rgb(var(--sg-gold-rgb) / .25); }
.dc-hint { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin: 0; padding: 8px 14px; border-radius: 14px; font-size: var(--fs-sm); color: var(--ink-2);
  background: rgb(255 255 255 / .62); box-shadow: inset 0 0 0 1px var(--line-2); }
.dc-hint .ico { color: var(--mod); }
.dc-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; color: var(--muted); border-radius: var(--r-card); background: var(--panel); box-shadow: var(--glass-edge), var(--sh-1); }
.dc-empty b { color: var(--ink); font-size: var(--fs-lg); }
.dc-empty .ico { color: var(--mod); }

/* Review */
.dc-review { display: grid; gap: var(--sp-2); }
.dc-filter { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 600; }
.dc-keys { margin: 0; }
.dc-list { display: grid; gap: var(--sp-2); }
.dc-card { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--glass-edge), var(--sh-1); outline: none; min-width: 0; }
.dc-card.cur { box-shadow: var(--glass-edge), var(--sh-1), inset 0 0 0 1.5px rgb(var(--mod-rgb) / .45); }
.dc-card:focus-visible { box-shadow: var(--glass-edge), 0 0 0 3px rgb(var(--mod-rgb) / .28), inset 0 0 0 1.5px rgb(var(--mod-rgb) / .6); }
.dc-row1 { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; flex-wrap: wrap; }
.dc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; letter-spacing: -.005em; }
.dc-row1 .dc-name { flex: 0 1 auto; max-width: 100%; }
.dc-where { overflow-wrap: anywhere; }
.dc-why { margin: 0; padding: 0 0 0 1.1em; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; }
.dc-sugg { display: grid; gap: 4px; margin: 2px 0 0; padding: 0; border: 0; min-width: 0; }
.dc-sugg label { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 7px 10px; border-radius: 12px; cursor: pointer; background: rgb(255 255 255 / .5); box-shadow: inset 0 0 0 1px var(--line); }
.dc-sugg label:active { transform: scale(.99); transition-duration: .1s; }
.dc-sugg label.on { background: #fff; box-shadow: inset 0 0 0 1.5px rgb(var(--mod-rgb) / .5); }
.dc-sugg input[type=radio] { width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--mod); flex: none; }
.dc-k { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--muted); background: rgb(16 22 43 / .06); flex: none; }
.dc-st { display: grid; gap: 1px; min-width: 0; }
.dc-st small { color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.dc-acts { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: 2px; }
.dc-cat select { height: 32px; min-height: 0; border-radius: var(--r-pill); padding: 0 28px 0 12px; font-size: var(--fs-sm); width: auto; }
.dc-pick { max-width: 420px; }
.dc-undo { position: sticky; bottom: 12px; justify-self: center; }

/* Search */
.dc-search { display: grid; gap: var(--sp-2); }
.dc-bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.dc-bar .dc-q { flex: 1 1 280px; width: auto; height: 36px; background: #fff; }
.dc-bar .dc-q input { width: 100%; height: 34px; }
.dc-bar select { width: auto; height: 34px; min-height: 0; border-radius: var(--r-pill); padding: 0 28px 0 12px; font-size: var(--fs-sm); }
.dc-results { display: grid; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--glass-edge), var(--sh-1); padding: 6px; }
.dc-results > p { margin: 4px 10px 6px; }
.dc-res { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3); padding: 2px 6px 2px 2px; border-radius: 14px; }
.dc-res + .dc-res { box-shadow: 0 -1px 0 var(--line); }
.dc-res:hover { background: rgb(255 255 255 / .7); }
.dc-open { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: 8px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 12px; }
.dc-open:active { transform: scale(.99); transition-duration: .1s; }
.dc-cat-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--mod); background: rgb(var(--mod-rgb) / .1); flex: none; }
.dc-rt { display: grid; gap: 2px; min-width: 0; }
.dc-r1 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.dc-r1 .dc-name { flex: 0 1 auto; min-width: min(16ch, 100%); }
.dc-r2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-links { display: grid; justify-items: end; gap: 1px; max-width: 220px; text-align: right; }
.dc-links a, .dc-links span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.dc-date { min-width: 52px; text-align: right; }
.dc-more { justify-self: center; margin: 8px; }

/* Sources */
.dc-sources { display: grid; gap: var(--sp-2); }
.dc-src { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--glass-edge), var(--sh-1); }
.dc-src p { margin: 0; line-height: 1.45; }
.dc-src-h { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.dc-src-h b { font-size: var(--fs-lg); letter-spacing: -.01em; }
.dc-src .fx-dot.off { background: var(--faint); }
.dc-ic { color: var(--mod); display: inline-grid; }
.dc-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.dc-counts b { color: var(--ink); }
.dc-counts .warn b { color: #8A5A00; }
.dc-err { color: #B42318; }
.dc-help summary { cursor: pointer; color: var(--muted); width: fit-content; }
.dc-help p { margin-top: 4px; color: var(--ink-2); }

@media (max-width: 640px) {
  .dc-head h1 { font-size: 1.3rem; }
  .dc-res { grid-template-columns: minmax(0, 1fr) auto; }
  .dc-links { grid-column: 1 / -1; justify-items: start; text-align: left; padding: 0 0 8px 46px; max-width: none; }
  .dc-date { grid-row: 1; grid-column: 2; }
  .dc-bar select { flex: 1 1 40%; }
  .dc-seg { justify-self: stretch; } .dc-seg button { flex: 1; padding: 0 10px; }
  .dc-acts .dc-cat { flex: 1 1 100%; } .dc-acts .dc-cat select { width: 100%; } .dc-acts .grow { display: none; } .dc-acts .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .dc-seg button, .dc-open, .dc-sugg label { transition: none; } }
@media (prefers-contrast: more) { .dc-card, .dc-src, .dc-results { box-shadow: inset 0 0 0 1px var(--line-2); background: #fff; } }
