/* T9.6.3: theme-aware diagnostics and safeguarded manual maintenance. */
.document-storage-section{display:grid;gap:18px;min-width:0;color:var(--ink)}
.document-storage-section[hidden]{display:none!important}
.document-storage-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.document-storage-head h2{margin:.2rem 0}
.document-storage-head p{margin:.2rem 0;color:var(--muted)}
.doc-storage-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.doc-storage-kpis>div{min-width:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);display:grid;gap:6px}
.doc-storage-kpis small,.doc-storage-kpis span{font-size:.81rem;color:var(--muted)}
.doc-storage-kpis strong{font-size:1.3rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.doc-storage-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.doc-storage-panel{padding:18px;min-width:0;background:var(--surface)}
.doc-storage-panel h3{margin:0 0 12px}
.doc-storage-panel .muted{line-height:1.5}
.doc-storage-table-wrap{max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:10px}
.doc-storage-table{width:100%;border-collapse:collapse;font-size:.87rem;color:var(--ink)}
.doc-storage-table th,.doc-storage-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.doc-storage-table thead th{background:var(--surface-muted,var(--surface));font-weight:700;white-space:nowrap}
.doc-storage-table tr:last-child td{border-bottom:0}
.doc-storage-table td small{display:block;color:var(--muted);font-size:.77rem;margin-top:4px;overflow-wrap:anywhere}
.doc-storage-table td strong{font-weight:650}
.doc-storage-table .doc-storage-empty{color:var(--muted);padding:22px;text-align:center}
.doc-storage-filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin:10px 0 14px}
.doc-storage-filters label{display:grid;gap:6px;flex:1 1 160px;min-width:145px}
.doc-storage-filters input,.doc-storage-filters select{box-sizing:border-box;width:100%;min-height:40px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);padding:9px;font:inherit}
.doc-storage-page-controls{display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.doc-storage-error{color:var(--danger,#bc3145);margin:0}
.doc-storage-note{color:var(--muted);font-size:.84rem;line-height:1.55}
@media(max-width:950px){.doc-storage-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.doc-storage-panels{grid-template-columns:1fr}}
@media(max-width:550px){.doc-storage-kpis{grid-template-columns:1fr}.doc-storage-filters label{flex-basis:100%}}

/* T9.6.2 — bounded, read-only reconciliation. */
.doc-storage-diagnostic-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.doc-storage-diagnostic-head>div{flex:1 1 400px}
.doc-storage-diagnostic-summary{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}
.doc-storage-diagnostic-summary span{border:1px solid var(--line);border-radius:8px;padding:8px 11px;background:var(--surface);font-size:.88rem}
.doc-storage-diagnostic-summary strong{font-variant-numeric:tabular-nums}
.doc-storage-diagnostic .doc-storage-table td:nth-child(3){font-family:ui-monospace,monospace;font-size:.82rem;overflow-wrap:anywhere}
.doc-storage-diagnostic .doc-storage-note{margin:.65rem 0}
