/* ./src/shared/documents.css */
.document-toolbar,.document-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.document-actions { margin:16px 0; }
.document-actions h2,.document-actions h3 { margin-right:auto; }
.document-toolbar { border:1px solid var(--border-color,#dedee3); border-radius:8px 8px 0 0; background:var(--bg-secondary,#f6f6f8); padding:8px; }
.document-toolbar button,.document-toolbar select { color:inherit; background:var(--bg-primary,#fff); border:1px solid var(--border-color,#dedee3); border-radius:5px; padding:7px 9px; font:inherit; min-height:36px; cursor:pointer; }
.document-toolbar button:hover { border-color:var(--accent,#b76ac4); }
.document-content { font:16px/1.7 Inter,system-ui,sans-serif; overflow-wrap:anywhere; color:var(--text-primary,#292631); }
.document-content h1,.document-content h2,.document-content h3 { line-height:1.25; margin:1.2em 0 .5em; }
.document-content p { margin:0 0 .8em; }
.document-content ul,.document-content ol { padding-left:28px; list-style:revert; }
.document-content li { display:list-item; }
.document-content table { width:100%; border-collapse:collapse; margin:16px 0; table-layout:fixed; }
.document-content td,.document-content th { border:1px solid #d9d7df; padding:8px; vertical-align:top; }
.document-content img { max-width:100%; height:auto; }
.document-content blockquote { border-left:3px solid #b9adc0; margin:16px 0; padding:4px 16px; }
.document-content pre { white-space:pre-wrap; background:#f5f4f7; padding:12px; }
.document-content a,.document-public a { color:var(--accent,#87519a); text-decoration:underline; }
.document-editable { min-height:360px; max-height:65vh; overflow:auto; padding:28px; background:var(--bg-primary,#fff); border:1px solid var(--border-color,#dedee3); border-top:0; border-radius:0 0 8px 8px; }
.document-editable:focus { outline:2px solid var(--accent,#b76ac4); outline-offset:2px; }
.document-caption { color:var(--text-secondary,#686370); font-size:13px; margin:10px 0; }
.document-expanded { position:fixed; inset:20px; z-index:1100; padding:16px; background:var(--bg-primary,#fff); overflow:auto; }
.document-expanded .document-editable { min-height:65vh; }
.document-dialog { width:min(600px,calc(100vw - 32px)); max-height:90vh; overflow:auto; margin:auto; border:1px solid #d9d7df; border-radius:12px; padding:24px; background:var(--bg-primary,#fff); color:var(--text-primary,#292631); }
.document-dialog::backdrop { background:rgb(20 15 25 / 45%); }
.document-dialog-wide { width:min(1000px,calc(100vw - 32px)); }
.document-dialog .form-group { margin:14px 0; }
.document-dialog textarea { width:100%; }
.document-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.document-field { display:flex; flex-direction:column; gap:6px; margin:12px 0; }
.document-field input,.document-field textarea,.document-field select { width:100%; }
.document-section { padding:16px 0; border-bottom:1px solid var(--border-color,#e1dfe5); }
.document-version-row,.todo-row { padding:16px 0; border-bottom:1px solid var(--border-color,#e1dfe5); }
.document-version-row { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.document-status { display:inline-block; font-size:12px; padding:3px 8px; border:1px solid var(--border-color,#ddd); border-radius:20px; margin-left:8px; }
.todo-row[data-scope="cancelled"] .todo-title,.todo-row[data-scope="replaced"] .todo-title { text-decoration:line-through; color:var(--text-secondary,#686370); }
.todo-row p { white-space:pre-wrap; }
.todo-history { margin:12px 0; }
.todo-change { margin:12px 0; padding:12px; border-left:3px solid var(--accent,#b76ac4); background:var(--bg-secondary,#f6f6f8); }
.todo-change pre { white-space:pre-wrap; overflow-wrap:anywhere; font:13px/1.6 Inter,system-ui,sans-serif; }
.document-public { margin:0; padding:40px 20px; background:#f6f5f8; color:#292631; font:16px/1.7 Inter,system-ui,sans-serif; }
.document-paper { max-width:820px; padding:40px; margin:0 auto; background:#fff; }
.document-paper footer { margin-top:40px; padding-top:20px; border-top:1px solid #dedce3; font-size:13px; }
.document-print-frame { position:fixed; width:1px; height:1px; border:0; left:-10000px; }
.document-policies-footer { display:flex; gap:16px; flex-wrap:wrap; padding:20px 0; font-size:12px; color:var(--text-secondary,#686370); }
.document-more { margin-left:auto; }
.document-more summary { padding:6px 10px; cursor:pointer; }
.document-more[open] { flex-basis:100%; }
.document-section > summary { cursor:pointer; padding:8px 0; }
#todo-quick-add { flex-wrap:nowrap; margin-bottom:20px; }
#todo-quick-title { flex:1; min-width:0; }
.todo-row .document-actions { align-items:center; }
@media(max-width:640px) { .document-grid { grid-template-columns:1fr; } .document-editable,.document-paper { padding:16px; } .document-toolbar button { min-height:44px; } .document-expanded { inset:0; } .document-public { padding:12px; } }
@media print { .document-no-print,.document-actions { display:none!important; } .document-public,.document-paper { background:#fff; padding:0; max-width:none; } .document-content { font-size:11pt; } .document-content img { max-height:240mm; } h1,h2,h3,tr { break-inside:avoid; } }
