#app .model-management-page .page-head,#app .model-management-page .model-management-card{background:linear-gradient(145deg,#f6fbff,#eef1fc)!important;border:1px solid #c7d9ee!important;border-radius:16px!important;padding:20px;box-shadow:0 10px 30px #244a7514}
#app .model-management-page h1{color:#2857a4!important}
#app .model-management-page th{background:#eaf2ff!important;color:#2857a4!important}
#app .model-management-page table{background:white}
.model-actions{display:flex;gap:8px;white-space:nowrap}
.model-actions .model-retire{color:#ae5318;border-color:#edb087;background:#fff7ef}
.model-management-page .toolbar input{flex:1;min-width:180px}
.model-pagination{display:flex;justify-content:center;align-items:center;gap:16px;margin:16px 0}
dialog.model-management-dialog .dialog-head h2{color:#fff!important;-webkit-text-fill-color:#fff!important;font-size:21px!important;font-weight:400!important}
dialog.model-management-dialog label{display:block;margin:14px 0;color:#2857a4}
dialog.model-management-dialog select{background:#fff!important;border:1px solid #c9d9ee!important;width:100%}
dialog.model-management-dialog{min-height:0}
#app .model-management-page .primary{background:linear-gradient(110deg,#248ee6,#3b45ad)!important;color:white!important}

/* Keep the model and document collections inside the same fixed frame as the other lists. */
#app .model-management-page{padding-bottom:16px}
#app .model-management-page>.page-scroll{display:flex;flex-direction:column;overflow:hidden;min-height:0;padding:0;scrollbar-gutter:auto}
#app .model-management-page>.page-scroll>.footer-note{display:none}
#app .model-management-page .model-management-card{display:flex;flex-direction:column;flex:1;min-height:0;margin:0;overflow:hidden;padding:16px;box-shadow:0 4px 16px #244a750a}
.model-management-page .model-library-toolbar{flex:none;gap:12px;margin:0 0 14px;min-width:0}
.model-management-page .model-library-toolbar input{min-width:150px;max-width:580px;flex:1;font-size:13px;min-height:38px;height:38px;background:#fff}
.model-library-toolbar .search-clear-field{flex:1;max-width:580px;min-width:150px}
.model-management-page .model-library-toolbar select{width:160px;min-height:38px;height:38px;font-size:13px;padding:6px 10px;background:#fff}
.model-result-count{margin-left:auto;font-size:12px;color:#667c97;white-space:nowrap}
.model-library-results{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;border:1px solid #d5e2f0;border-radius:10px;background:#fff}
.model-table-wrap{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;max-width:100%}
.model-table-wrap:focus-visible{outline:2px solid #5b99d8;outline-offset:-2px}
#app .model-management-page .model-library-table{width:100%;min-width:780px;table-layout:auto;border-collapse:separate;border-spacing:0;background:#fff}
#app .model-management-page .model-library-table th{position:sticky;top:0;z-index:1;font-size:12px;font-weight:500;text-align:left;padding:12px 13px;white-space:nowrap;border-bottom:1px solid #d5e2f0}
#app .model-management-page .model-library-table td{padding:12px 13px;font-size:13px;line-height:1.6;border-bottom:1px solid #e6edf5;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
#app .model-management-page .model-library-table tbody tr:last-child td{border-bottom:0}
#app .model-management-page .model-library-table tbody tr:hover td{background:#f8fbff}
.model-library-table td:first-child{min-width:145px;max-width:320px}
.model-name-link{color:#2c619e;font-weight:500;display:inline-flex;align-items:center;gap:12px;text-decoration:none}
.model-name-link:hover{text-decoration:underline}
.model-name-link span{font-size:16px;font-weight:400;color:#7399c6}
.model-document-count{color:#366b9f;white-space:nowrap;text-decoration:none;background:#edf5ff;border:1px solid #dbe9f9;border-radius:6px;padding:5px 8px;display:inline-block;font-size:12px}
.model-document-count:hover{background:#e3effe;text-decoration:none}
.model-status,.model-category-label{display:inline-flex;align-items:center;padding:3px 9px;border:1px solid #dbe3ed;border-radius:20px;background:#f0f3f7;color:#6b7b8e;white-space:nowrap;font-size:11px}
.model-status.active{background:#edf8f1;border-color:#cce6d5;color:#367450}
.model-category-label{background:#edf4fe;border-color:#d8e5f8;color:#4771a2}
.model-management-page .model-actions{gap:6px}
.model-management-page .model-actions button,.model-management-page .model-actions .button{font-size:12px;min-height:31px;height:31px;padding:4px 9px;border-radius:6px;white-space:nowrap;line-height:1.5}
.model-library-note{flex:none;font-size:11px;color:#70829a;line-height:1.6;margin:10px 0 0}
.model-library-empty{margin:auto;padding:30px 18px;max-width:620px;text-align:center;color:#788ba2;overflow:auto}
.model-library-empty h3{font-size:17px;color:#49688e;margin:8px 0}
.model-library-empty p{font-size:13px;line-height:1.8;margin:0}
.model-empty-symbol{display:inline-flex;align-items:center;justify-content:center;width:60px;height:60px;border-radius:14px;background:#f0f6ff;color:#78a4d4;font-size:30px;margin-bottom:8px}
.model-management-page>.model-library-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin:0;padding:6px 10px;gap:5px;border:1px solid #dfe6ef;border-radius:10px;background:#f5f8fc;flex-shrink:0;font-size:11px}
.model-library-pagination button{width:27px;height:27px;min-height:27px;padding:0;font-size:11px;border-radius:5px}
.model-library-pagination .numbered-page-buttons{gap:5px}
.model-library-pagination .report-page-size{grid-column:1;justify-self:start;display:flex;align-items:center;gap:6px;font-size:12px;margin:0;font-weight:400;white-space:nowrap}
.model-library-pagination .report-page-size select{width:55px;height:27px;min-height:27px;padding:2px 5px;font-size:12px}
.model-documents-context{display:flex;align-items:center;gap:12px;flex:none;margin:0 0 14px}
.model-documents-context .model-back{font-size:12px;min-height:33px;padding:6px 10px;background:#fff}
.model-document-categories{display:flex;flex-wrap:wrap;gap:8px;flex:none;margin-bottom:14px}
.model-document-categories button{display:inline-flex;align-items:center;gap:9px;min-height:36px;font-size:12px;padding:6px 12px;background:#fff;color:#5b7390;border-color:#d5e1ef;border-radius:8px}
.model-document-categories button span{font-size:11px;background:#eef3f9;color:#7b8ea5;padding:0 6px;border-radius:5px;min-width:19px;line-height:1.7}
.model-document-categories button[aria-pressed=true]{background:#e7f1ff;border-color:#9fbfe8;color:#2d609c}
.model-document-categories button[aria-pressed=true] span{background:#d8e8fe;color:#3b6ca5}
.model-document-access{font-size:11px;line-height:1.6;color:#8797aa}
.model-documents-table td:first-child{max-width:370px;min-width:200px}
.model-documents-table strong{display:block;font-weight:500;color:#34587e}
.model-documents-table small{display:block;color:#8190a3;font-size:11px;margin-top:4px;overflow-wrap:anywhere}
#app .model-management-page .model-library-table td.model-nowrap{white-space:nowrap}

/* The new document form has its own styling; existing model dialogs are unchanged. */
dialog.model-document-dialog{width:min(590px,calc(100vw - 28px));max-width:590px;max-height:calc(100dvh - 40px);min-height:0;margin:auto;padding:0;overflow:hidden;border:1px solid #d0deee;border-radius:12px;background:#fff;color:#29476a;box-shadow:0 18px 60px #1834572e}
dialog.model-document-dialog[open]{display:flex;flex-direction:column}
.model-document-dialog .dialog-head{display:flex;align-items:center;justify-content:space-between;flex:none;margin:0;padding:14px 20px;background:#f0f6fe;border-bottom:1px solid #dce6f4;border-radius:0}
dialog.model-document-dialog .dialog-head h2{font-size:19px;font-weight:500;margin:0;color:#315b88;-webkit-text-fill-color:#315b88}
.model-document-dialog .dialog-head button{width:30px;min-height:30px;padding:0;font-size:23px;border:0;background:transparent;color:#7390af}
.model-document-dialog form{display:flex;flex-direction:column;min-height:0;padding:0;overflow:hidden}
.model-document-form-body{padding:18px 20px;overflow:auto;overscroll-behavior:contain;min-height:0}
.model-document-model{font-size:12px;color:#6e85a0;line-height:1.7;margin:0 0 18px;overflow-wrap:anywhere}
.model-document-dialog label{display:block;font-size:13px;font-weight:500;color:#526e8e;margin:0 0 15px}
.model-document-dialog label input,.model-document-dialog label select{display:block;margin-top:6px;width:100%;min-height:40px;font-size:13px;background:#fff;color:#294666;border:1px solid #cbdced;padding:8px 10px;border-radius:7px}
.model-document-dialog input[type=file]{font-size:12px;padding:9px;line-height:1.7}
.model-document-dialog .hint{font-size:11px;line-height:1.7;margin:6px 0;color:#7c8da3}
.model-current-file{border:1px solid #dce6f3;background:#f7faff;border-radius:8px;padding:11px 13px;margin-bottom:15px;overflow-wrap:anywhere}
.model-current-file span,.model-current-file small{display:block;font-size:11px;color:#7a8ca3;line-height:1.7}
.model-current-file strong{display:block;color:#4c6b8e;font-size:12px;font-weight:500;margin:3px 0}
.model-file-selection{font-size:12px;color:#477e5f;line-height:1.6;overflow-wrap:anywhere;margin:8px 0}
.model-document-form-footer{padding:12px 20px;display:flex;justify-content:flex-end;gap:9px;flex:none;border-top:1px solid #e0e9f3;background:#f8fafd}
.model-document-form-footer button{font-size:13px;min-height:37px;padding:7px 16px}
.model-document-dialog .primary{background:linear-gradient(110deg,#248ee6,#3b45ad);color:#fff;border-color:transparent}
.model-document-dialog .form-error:not(:empty){margin-top:10px}
/* Fixed desktop layout; original media: (max-width:850px) */ @media (max-width:0px){.model-documents-context{flex-wrap:wrap}.model-document-categories{gap:6px}.model-document-categories button{padding:5px 9px}.model-management-page .model-library-toolbar{flex-wrap:wrap}.model-result-count{font-size:11px}}
/* Fixed desktop layout; original media: (max-width:650px) */ @media (max-width:0px){.model-management-page>.model-library-pagination{grid-template-columns:1fr;gap:8px}.model-library-pagination .report-page-size{justify-self:center}.model-library-pagination .report-page-buttons{grid-column:1;justify-self:center}#app .model-management-page .model-management-card{padding:11px}.model-management-page .model-library-toolbar input{min-width:120px}.model-management-page .model-library-toolbar select{width:130px}.model-library-toolbar .search-clear-field{min-width:120px}}
@media(max-height:700px){#app .model-management-page .model-management-card{padding:11px}.model-management-page .model-library-toolbar,.model-documents-context,.model-document-categories{margin-bottom:9px}.model-library-note{margin-top:7px}}

/* Brand and model cards keep the established frame with simple, centered visuals. */
#app .model-management-page .model-cards-panel{background:#f5f8fc!important}
.model-card-results{display:block;overflow:auto;padding:3px;border:0;border-radius:0;background:transparent;scrollbar-gutter:stable;overscroll-behavior:contain}
.model-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:17px;align-content:start;padding:1px 2px 12px}
.model-library-card{display:flex;flex-direction:column;align-items:center;min-width:0;padding:13px 12px 15px;background:#fff;border:1px solid #d5dfe9;border-radius:5px;box-shadow:0 2px 3px #183d6710;color:#355578;text-align:center;text-decoration:none;transition:border-color .15s,box-shadow .15s}
.model-library-card:hover,.model-library-card:focus-visible{border-color:#8fb3d8;box-shadow:0 3px 9px #25496a18;text-decoration:none;outline:2px solid #c4ddf5;outline-offset:2px}
.model-card-visual{display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;width:100%;min-height:0;margin-bottom:12px;overflow:hidden;background:white}
.model-card-visual img{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.model-library-card strong{display:block;color:#31587b;font-size:14px;font-weight:500;line-height:1.6;overflow-wrap:anywhere}
.model-library-card small{display:block;color:#8393a5;font-size:11px;line-height:1.6;margin-top:4px}
.model-brand-card .model-card-visual,.model-summary-card .model-card-visual{aspect-ratio:auto;height:98px;margin:4px 0 13px}
.model-summary-card .model-card-visual svg{width:48px;height:48px;color:#648bb4}
.model-brand-card .model-card-visual img{max-width:135px;max-height:76px}
.model-brand-initial{font-size:34px;font-weight:500;letter-spacing:1px;color:#83a0bd}
.model-photo-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;height:100%;min-height:75px;color:#a0afbd;font-size:11px;line-height:1.6;text-align:center}
.model-photo-placeholder svg{width:40px;height:40px;opacity:.7}
.model-summary-link{font-size:12px}

/* Pictures sit beside documents, which remain immediately available. */
.model-detail-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:16px;flex:1;min-height:0;overflow:hidden}
.model-detail-documents{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.model-management-page .model-document-toolbar,.model-management-page .model-software-toolbar{flex-wrap:nowrap;margin-bottom:12px}
.model-resource-pane .search-clear-field,.model-management-page .model-resource-pane .toolbar input{min-width:0;max-width:none;width:100%}
.model-resource-pane .toolbar>button{flex:none;min-height:38px;padding:6px 12px;font-size:12px;white-space:nowrap}
.model-detail-resources{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.model-resource-tabs{display:flex;align-items:center;flex:none;gap:6px;margin-bottom:14px;padding:0 0 10px;border-bottom:1px solid #d4e1f0}
.model-resource-tabs button{display:flex;align-items:center;gap:9px;min-height:37px;padding:7px 15px;border:1px solid transparent;border-radius:7px;background:transparent;color:#657e9b;font-size:13px;font-weight:500}
.model-resource-tabs button[aria-selected=true]{background:#fff;border-color:#b9cde6;color:#285c98;box-shadow:0 2px 4px #2747690b}
.model-resource-tabs button:focus-visible{outline:2px solid #74a7dc;outline-offset:2px}
.model-resource-tabs button span{display:inline-flex;align-items:center;justify-content:center;min-width:23px;padding:0 6px;border-radius:5px;background:#edf3fb;color:#6c88a8;font-size:11px;line-height:1.8}
.model-resource-pane{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden}
.model-resource-pane[hidden]{display:none!important}
.model-management-page>.model-library-pagination.is-inactive{visibility:hidden;pointer-events:none}
.model-document-actions{display:flex;flex-direction:column;gap:7px;align-items:flex-end}
.model-document-actions .model-actions{justify-content:flex-end}
.model-document-actions .model-document-manage{flex-wrap:wrap;max-width:100%}
.model-document-actions .model-document-open{background:#eef5ff;border-color:#c0d6ef;color:#2e65a0}
.model-document-manage button{border-color:transparent;background:transparent;color:#7e8da0}
.model-document-manage button.danger{color:#ba6870}
.model-document-manage button:hover{background:#f2f6fb;border-color:#dce5f0}
.model-documents-table .model-document-metadata{font-size:11px;color:#8395aa;margin-top:6px}
.model-documents-table .model-document-filename{font-size:11px;color:#70859f;margin-top:3px}
.model-software-progress{margin-top:14px}
.model-software-progress progress{display:block;width:100%;height:9px;accent-color:#3985cb}
.model-software-progress span{display:block;margin-top:7px;font-size:12px;color:#607c99;line-height:1.7}
.model-software-library{min-width:0;overflow:hidden;background:transparent}
.model-software-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid #e1e9f2}
.model-software-heading h2{font-size:13px;font-weight:500;color:#486b90;margin:0}
.model-software-heading h2 span{margin-left:5px;font-size:11px;color:#8c9bae;font-weight:400}
.model-software-heading button{min-height:29px;padding:4px 8px;font-size:11px;border-radius:5px;white-space:nowrap}
.model-software-search{padding:8px 12px;border-bottom:1px solid #e7edf5}
.model-software-search input{width:100%;min-height:32px;height:32px;padding:6px 9px;font-size:12px}
.model-software-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.model-software-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px;border-bottom:1px solid #e7edf5}
.model-software-item:last-child{border-bottom:0}
.model-software-info{min-width:0;overflow-wrap:anywhere;color:#34587e;font-size:12px}
.model-software-info strong{font-weight:500;line-height:1.7}
.model-software-info small{display:block;color:#8190a3;font-size:10px;line-height:1.8;margin-top:3px}
.model-software-version{display:inline-block;color:#5a7a9d;font-size:11px;margin-left:10px}
.model-software-notes{white-space:pre-wrap;margin:5px 0 0;color:#687f98;font-size:11px;line-height:1.7}
.model-software-compatible{margin:5px 0 0;color:#617e99;font-size:11px;line-height:1.7}
.model-software-compatible>span{font-weight:500;color:#42698d}
.model-software-actions{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex:none}
.model-software-delete-actions{flex-wrap:wrap;justify-content:flex-end}
.model-software-delete-actions button{font-size:10px;padding:4px 7px;min-height:27px}
.model-software-models{min-width:0;margin:0 0 15px;padding:10px 12px;border:1px solid #d6e2ef;border-radius:8px;background:#fbfdff}
.model-software-models legend{padding:0 5px;color:#526e8e;font-size:13px;font-weight:500}
.model-software-models>input[type=search]{width:100%;min-height:35px;padding:7px 9px;border:1px solid #cbdced;border-radius:6px;background:#fff;font-size:12px;color:#294666}
.model-software-model-options{max-height:158px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;margin-top:7px}
.model-software-model-options>p{margin:8px 3px;color:#7c8da3;font-size:12px}
.model-software-model-options>button{font-size:12px;min-height:30px;padding:4px 10px}
.model-document-dialog .model-software-model-option{display:flex;align-items:center;gap:10px;margin:0;padding:7px 3px;border-bottom:1px solid #edf2f7;cursor:pointer}
.model-document-dialog .model-software-model-option:last-child{border-bottom:0}
.model-document-dialog .model-software-model-option input{flex:none;display:block;width:16px;height:16px;min-height:16px;margin:0;padding:0;accent-color:#3985cb}
.model-software-model-option>span{min-width:0;overflow-wrap:anywhere}
.model-software-model-option strong{font-size:12px;font-weight:500;line-height:1.5}
.model-software-model-option small{display:block;font-size:10px;font-weight:400;color:#7c8da3;line-height:1.6}
.model-software-model-selection{margin:7px 0 0;color:#42698d;font-size:11px}
.model-software-scope{margin:4px 0 0;color:#7c8da3;font-size:11px;line-height:1.6}
.model-software-empty{padding:20px 12px;margin:0;color:#8190a3;font-size:12px;text-align:center;line-height:1.7}
.model-software-empty p{font-size:12px;margin:0 0 8px}
.model-software-empty button{font-size:12px;min-height:30px;padding:4px 10px}
.model-software-dialog label textarea{display:block;margin-top:6px;width:100%;min-height:75px;max-height:180px;resize:vertical;font:inherit;font-size:13px;background:#fff;color:#294666;border:1px solid #cbdced;padding:8px 10px;border-radius:7px}
dialog.model-software-manual-dialog{width:min(760px,calc(100vw - 28px));max-width:760px;height:min(660px,calc(100dvh - 40px))}
.model-software-manual-context{padding:16px 20px 8px;flex:none;overflow-wrap:anywhere}
.model-software-manual-context strong{font-size:14px;font-weight:500;color:#345c84}
.model-software-manual-context>span{font-size:12px;color:#7b8fa6;margin-left:10px}
.model-software-manual-context p{font-size:11px;color:#7b8fa6;margin:6px 0 0;line-height:1.7}
.model-software-manual-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 20px 12px;flex:none;color:#7b8fa6;font-size:12px}
.model-software-manual-toolbar button{font-size:12px;min-height:34px;padding:6px 11px}
.model-software-manual-results{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;margin:0 20px;border:1px solid #dce6f1;border-radius:8px;scrollbar-width:thin}
.model-software-manual-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 12px;border-bottom:1px solid #e7edf5}
.model-software-manual-row:last-child{border-bottom:0}
.model-software-manual-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}
.model-software-manual-actions .model-actions{justify-content:flex-end;gap:6px}
.model-software-manual-actions button,.model-software-manual-actions .button{font-size:11px;min-height:30px;padding:5px 9px;white-space:nowrap}
.model-software-manual-note{margin:10px 20px 12px;color:#7b8fa6;font-size:11px;flex:none;line-height:1.7}
dialog.model-brand-management-dialog{width:min(720px,calc(100vw - 28px));max-width:720px;height:min(660px,calc(100dvh - 40px))}
.model-brand-management-note{margin:14px 20px 10px;font-size:12px;line-height:1.7;color:#748aa3}
.model-brand-management-toolbar{display:flex;gap:8px;padding:0 20px 12px;flex:none}
.model-brand-management-toolbar input{flex:1;min-width:0}
.model-brand-management-toolbar select{width:auto;flex:none}
.model-brand-management-toolbar [hidden]{display:none!important}
.model-brand-management-toolbar input,.model-brand-management-toolbar select,.model-brand-management-toolbar button{min-height:35px;font-size:12px;padding:6px 9px}
.model-brand-management-results{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;margin:0 20px 15px;border:1px solid #dce6f1;border-radius:8px;scrollbar-width:thin}
.model-brand-management-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 12px;border-bottom:1px solid #e7edf5}
.model-brand-management-row:last-child{border-bottom:0}
.model-brand-management-info{display:flex;align-items:center;gap:10px;min-width:0;overflow-wrap:anywhere}
.model-brand-management-info img{width:45px;height:32px;object-fit:contain;flex:none}
.model-brand-management-info strong{display:block;font-size:13px;font-weight:500;color:#345c84}
.model-brand-management-info small{display:block;font-size:11px;color:#7b8fa6;line-height:1.7}
.model-brand-management-row button{font-size:11px;min-height:30px;padding:5px 9px}
.model-brand-delete{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.model-brand-delete-reason{max-width:210px;text-align:right;font-size:11px;line-height:1.5;color:#7b8fa6}
.brand-picker .customer-picker-footer{display:flex;gap:6px;flex-wrap:wrap}
.brand-picker .customer-picker-manage{font-size:12px;padding:6px 9px;min-height:30px;border:0;background:transparent;color:#587a9d}
.brand-picker .customer-picker-footer [hidden]{display:none!important}
/* Fixed desktop layout; original media: (max-width:550px) */ @media (max-width:0px){.model-brand-management-toolbar{flex-wrap:wrap}.model-brand-management-toolbar input{flex-basis:100%}.model-brand-management-row{align-items:flex-start;flex-wrap:wrap}}
.model-manual-upload-list{margin-top:15px}
.model-manual-upload-entry{padding:11px 12px;margin-bottom:10px;border:1px solid #dde7f1;border-radius:7px;background:#fafcff;overflow-wrap:anywhere}
.model-manual-upload-entry label{margin-bottom:7px;font-size:12px}
.model-manual-upload-entry small,.model-manual-upload-entry>span{display:block;font-size:11px;color:#7b8fa6;line-height:1.7}
.model-manual-upload-entry>span{margin-top:3px;color:#4c7c63}
.model-manual-upload-entry>span.error{color:#bd5964}
/* Fixed desktop layout; original media: (max-width:550px) */ @media (max-width:0px){.model-software-manual-row{flex-direction:column;align-items:flex-start;gap:8px}.model-software-manual-actions{flex-direction:row;flex-wrap:wrap}.model-software-manual-context,.model-software-manual-toolbar{padding-left:12px;padding-right:12px}.model-software-manual-results{margin:0 12px}}
/* Fixed desktop layout; original media: (max-width:850px) */ @media (max-width:0px){.model-software-item{align-items:flex-start;flex-direction:column;gap:8px}.model-software-item .model-actions{flex-wrap:wrap}.model-software-actions{align-items:flex-start}.model-software-delete-actions{justify-content:flex-start}}
#app .model-management-page .model-documents-table{min-width:0;table-layout:fixed}
#app .model-management-page .model-documents-table th:last-child{width:185px;text-align:right}
#app .model-management-page .model-documents-table td:first-child{min-width:0;max-width:none}
#app .model-management-page .model-documents-table th,#app .model-management-page .model-documents-table td{padding:13px 16px}
.model-photo-gallery{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#fff;border:1px solid #d5e2f0;border-radius:10px}
.model-photo-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;flex:none;border-bottom:1px solid #e1e9f2}
.model-photo-heading h2{display:flex;gap:6px;align-items:center;font-size:13px;font-weight:500;color:#486b90;margin:0}
.model-photo-heading h2 span{font-size:11px;color:#8c9bae;font-weight:400}
.model-photo-heading button{min-height:28px;font-size:11px;padding:4px 7px;border-radius:5px}
.model-photo-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;gap:9px;overflow:auto;min-height:0;padding:9px;overscroll-behavior:contain;scrollbar-width:thin}
.model-photo-tile{margin:0;border:1px solid #e0e8f0;border-radius:7px;overflow:hidden;min-width:0;background:#fff}
.model-photo-tile.is-cover{grid-column:1/-1}
.model-photo-open{display:block;min-height:0;height:87px;width:100%;padding:5px;border:0;border-radius:0;background:white;overflow:hidden}
.model-photo-open:hover{background:#f6faff}
.model-photo-open img{display:block;width:100%;height:100%;object-fit:contain}
.model-photo-tile.is-cover .model-photo-open{height:154px}
.model-photo-tile figcaption{padding:6px 7px;background:#fafcfe;border-top:1px solid #edf1f6}
.model-photo-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7d90a5;font-size:10px;line-height:1.5}
.model-photo-actions{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:24px;margin-top:4px}
.model-photo-actions button{font-size:10px;min-height:23px;padding:3px 5px;border-radius:4px;white-space:nowrap}
.model-photo-cover-label{color:#9a7a28;font-size:10px;white-space:nowrap}
.model-photo-frame-button{display:block;width:100%;font-size:10px;min-height:24px;padding:3px 5px;margin-top:5px;border-radius:4px;white-space:nowrap}
.model-photo-framing-dialog .model-document-model{margin-bottom:12px}
.model-photo-framing-stage{position:relative;width:min(100%,480px);aspect-ratio:4/3;overflow:hidden;margin:2px auto 12px;background:#fff;outline:1px solid #cfdae8;border-radius:7px;touch-action:none;user-select:none}
.model-photo-framing-stage.is-ready{cursor:grab}
.model-photo-framing-stage.is-dragging{cursor:grabbing}
.model-photo-framing-stage:focus-visible{outline:2px solid #5692d1;outline-offset:2px}
.model-photo-framing-stage img{position:absolute;display:block;max-width:none;max-height:none;transform:translate(-50%,-50%);pointer-events:none;user-select:none}
.model-photo-framing-stage img[hidden],.model-photo-framing-load[hidden]{display:none}
.model-photo-framing-load{display:flex;position:absolute;inset:0;align-items:center;justify-content:center;flex-direction:column;gap:12px;padding:15px;color:#8295ad;font-size:12px;text-align:center;cursor:default}
.model-photo-framing-load button{font-size:12px;min-height:31px;padding:5px 10px}
.model-photo-framing-zoom{display:flex;align-items:center;gap:9px;margin-top:15px;flex-wrap:wrap}
.model-photo-framing-zoom label{flex:1;min-width:120px;margin:0;font-size:11px;color:#748ba4}
.model-photo-framing-zoom input[type=range]{width:100%;min-height:24px;height:24px;padding:0;margin:2px 0 0;accent-color:#477fba;border:0;background:transparent;cursor:pointer}
.model-photo-framing-zoom button{font-size:12px;min-height:32px;padding:5px 10px}
.model-photo-framing-zoom output{font-size:12px;color:#57799d;min-width:42px;text-align:center}
/* Fixed desktop layout; original media: (max-width:650px) */ @media (max-width:0px){.model-photo-framing-zoom{gap:6px}.model-photo-framing-zoom [data-frame-reset]{margin-left:auto}.model-photo-framing-stage{max-width:100%}}
.model-photo-empty{grid-column:1/-1;padding:20px 6px;color:#91a0b0;text-align:center;font-size:11px;line-height:1.7}
.model-photo-empty p{font-size:11px;margin:10px 0 0;line-height:1.7}
.model-photo-empty button{font-size:11px;margin-top:10px;min-height:28px}
.model-photo-upload-list{margin-top:15px;max-height:280px;overflow:auto;overscroll-behavior:contain;border:1px solid #e0e8f1;border-radius:7px}
.model-photo-upload-list:empty{display:none}
.model-photo-upload-list>div{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 12px;border-bottom:1px solid #e9eff5;font-size:12px;color:#5b7390;line-height:1.6;overflow-wrap:anywhere}
.model-photo-upload-list>div:last-child{border-bottom:0}
.model-photo-upload-list small{display:block;color:#8b9caf;font-size:10px}
.model-photo-upload-list>div>span:last-child{flex:none;max-width:50%;font-size:11px;color:#7189a2}
.model-photo-upload-list .photo-upload-error{color:#b25555!important}
/* Fixed desktop layout; original media: (max-width:1100px) */ @media (max-width:0px){.model-detail-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:160px minmax(0,1fr);gap:10px}.model-photo-list{display:flex;flex:1;gap:8px;padding:7px;overflow:auto;align-items:stretch}.model-photo-tile,.model-photo-tile.is-cover{display:flex;flex:0 0 190px}.model-photo-open,.model-photo-tile.is-cover .model-photo-open{height:100%;width:100px;flex:0 0 100px}.model-photo-tile figcaption{display:flex;flex-direction:column;justify-content:center;width:90px;min-width:0;padding:6px;border-top:0;border-left:1px solid #edf1f6}.model-photo-actions{flex-wrap:wrap;justify-content:flex-start}.model-photo-empty{padding:5px;display:flex;align-items:center;gap:15px;width:100%}.model-photo-empty .model-photo-placeholder{min-height:55px;width:auto;flex-direction:row}.model-photo-empty p{margin:0}.model-photo-heading{padding:6px 10px}}
/* Fixed desktop layout; original media: (max-width:650px) */ @media (max-width:0px){.model-card-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}.model-library-card{padding:10px}.model-brand-card .model-card-visual,.model-summary-card .model-card-visual{height:80px}.model-detail-layout{grid-template-rows:140px minmax(0,1fr)}.model-documents-context{gap:8px;margin-bottom:9px}.model-documents-context .model-result-count{margin-left:0}.model-library-card strong{font-size:13px}}

.model-brand-references-dialog{width:min(940px,95vw);max-height:90vh}.brand-reference-content{overflow:auto;padding:16px;max-height:65vh}.brand-reference-row{display:flex;align-items:center;gap:14px;padding:14px;margin:10px 0;border:1px solid #c9d9ee;border-radius:10px;background:white}.brand-reference-row>div{flex:1}.brand-reference-row small{display:block;margin-top:5px;color:#66778e}.brand-reference-deleted{color:#c13838;background:#fff0f0;border:1px solid #f1aaaa;padding:6px 10px;border-radius:7px;white-space:nowrap}.brand-reference-note{background:#eaf3ff;padding:12px;border-radius:8px;color:#2857a4}.brand-history-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px;border:1px solid #c9d9ee;border-radius:10px;background:white}.brand-history-info small,.brand-history-report small{display:block;color:#66778e;margin-bottom:5px}.brand-history-report{border:1px solid #c9d9ee;border-radius:8px;background:white;padding:12px;margin:10px 0}.brand-history-report summary{cursor:pointer}.brand-history-report>div{padding-top:12px;display:grid;gap:10px}.brand-history-report strong{white-space:pre-wrap}/* Fixed desktop layout; original media: (max-width:600px) */ @media (max-width:0px){.brand-reference-row{flex-wrap:wrap}.brand-history-info{grid-template-columns:1fr}}

/* All-model gallery uses the same entry-card dimensions as brands. */
.model-all-card .model-card-visual{aspect-ratio:auto;height:98px;margin:4px 0 13px}
.model-all-card .model-card-visual svg{width:48px;height:48px;color:#648bb4}
.model-card-brand{font-size:12px;color:#607d9b;line-height:1.6;margin-top:2px}
/* Fixed desktop layout; original media: (max-width:650px) */ @media (max-width:0px){.model-all-card .model-card-visual{height:80px}}
.brand-reference-search{padding:14px 16px 0;flex-shrink:0}
.brand-reference-search label{display:block;font-weight:600}
.brand-reference-search input{display:block;width:100%;margin-top:6px;background:#fff;border:1px solid #c9d9ee;box-shadow:inset 0 1px 3px #345c7910}
.brand-reference-search p{margin:8px 0 3px;font-size:13px}
.brand-reference-search small{display:block;color:#526a83;margin-bottom:8px}
#brand-reference-list .brand-reference-content{min-height:0;flex:1 1 auto}

/* Style 01: edit a software manual, preserving the existing form layout. */
:root[data-theme="light"] body dialog.model-software-manual-edit{padding:0!important;background:linear-gradient(145deg,#f6fbff,#eef1fc)!important;border:1px solid #c7d9ee;border-radius:16px;box-shadow:0 18px 50px #244a7520}
:root[data-theme="light"] body dialog.model-software-manual-edit>.dialog-head{margin:16px 16px 0!important;background:linear-gradient(110deg,#198ee6,#393bad)!important;border:1px solid #ffffff40;border-radius:10px;box-shadow:0 5px 12px #2453a530}
:root[data-theme="light"] body dialog.model-software-manual-edit>.dialog-head h2{color:#fff!important;-webkit-text-fill-color:#fff!important;font-size:21px!important;font-weight:400!important}
:root[data-theme="light"] body dialog.model-software-manual-edit>.dialog-head button{background:#ffffff18!important;color:#fff!important;border:1px solid #ffffff55;border-radius:7px}
:root[data-theme="light"] body dialog.model-software-manual-edit>.dialog-head button:hover{background:#ffffff30!important;border-color:#ffffff90}
:root[data-theme="light"] body dialog.model-software-manual-edit :is(input,.model-current-file){background:#fff;border-color:#c9d9ee;box-shadow:inset 0 1px 3px #345c7910}
:root[data-theme="light"] body dialog.model-software-manual-edit .model-document-form-footer{background:transparent!important}
:root[data-theme="light"] body dialog.model-software-manual-edit .primary{background:linear-gradient(110deg,#248ee6,#3b45ad)!important;color:#fff!important;border-color:transparent;box-shadow:0 4px 9px #2058bd33}
