/* Model library: reuse the workbench's light surfaces and primary buttons. */
.model-library-page { --model-accent: #4e54ca; --model-muted: #596474; --model-line: #dce0e7; }
.model-library-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.model-gender-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.model-gender-filters .btn { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; color: #414b5a; border-color: #dce0e7; }
.model-gender-filters .btn span { min-width: 22px; border-radius: 10px; background: #edf0f5; color: #424c5b; font-size:14px; font-variant-numeric: tabular-nums; text-align: center; }
.model-gender-filters .btn[aria-pressed="true"] { color: #fff; background: #4e54ca; border-color: #4e54ca; }
.model-gender-filters .btn[aria-pressed="true"] span { background: #fff; color: #4046b6; }
.model-library-count { margin: 0 0 18px; color: var(--model-muted); font-size:15px; line-height: 1.6; }
.model-library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 18px; }
.model-library-card { min-width: 0; overflow: hidden; border: 1px solid var(--model-line); border-radius: 12px; background: #fff; }
.model-library-preview { display: block; width: 100%; aspect-ratio: 16 / 10; padding: 10px; border: 0; background: #f7f8fa; cursor: zoom-in; }
.model-library-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.model-library-card-info { padding: 14px; }
.model-library-card-info > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-library-card-info strong { min-width: 0; color: #202631; overflow-wrap: anywhere; font-size:16px; line-height: 1.5; }
.model-gender-badge { flex-shrink: 0; padding: 3px 8px; color: #4046b6; background: #eff0ff; border: 1px solid #dfe1fc; border-radius: 6px; font-size:14px; }
.model-library-card-info p { margin: 8px 0 14px; color: var(--model-muted); font-size:14px; overflow-wrap: anywhere; }
.model-library-card-info footer { display: flex; justify-content: space-between; gap: 10px; }
.model-library-card-info footer .btn { min-height: 40px; font-size:14px; }
.model-library-empty { display: grid; justify-items: center; gap: 12px; padding: 54px 24px; border: 1px dashed var(--model-line); border-radius: 12px; background: #fff; text-align: center; }
.model-library-empty h2 { margin: 0; color: #252c36; font-size:21px; }
.model-library-empty p { max-width: 620px; margin: 0; color: var(--model-muted); line-height: 1.7; font-size:16px; }
.model-library-empty .btn { margin-top: 6px; }
dialog.model-dialog { width: min(600px,calc(100vw - 48px)); max-height: calc(100dvh - 64px); margin: auto; padding: 24px; color: #242b36; overflow-y: auto; overscroll-behavior: contain; }
dialog.model-dialog::backdrop { background: rgba(24,31,45,.4); }
.model-dialog header { gap: 16px; }
.model-dialog .modal-close { width: 40px; height: 40px; flex-shrink: 0; }
.model-dialog form { gap: 10px; }
.model-dialog label { margin-top: 4px; color: #343e4d; font-size:15px; font-weight: 600; }
.model-dialog select,.model-dialog input { width: 100%; min-height: 44px; font-size:16px; }
.model-dialog .model-dialog-help { margin: 2px 0 8px; color: #596474; font-size:15px; line-height: 1.7; }
.model-dialog .model-file-summary { max-height: 120px; overflow-y: auto; overflow-wrap: anywhere; padding: 12px; color: #3f4858; border: 1px solid #dce0e7; border-radius: 8px; background: #f6f7fa; font-size:15px; line-height: 1.7; }
.model-dialog .model-dialog-error { margin: 4px 0; padding: 10px; color: #a3212d; border: 1px solid #e7b9be; border-radius: 6px; background: #fff5f6; font-size:15px; line-height: 1.6; }
.model-dialog #modelUploadProgress { min-height: 20px; margin: 0; color: #4046b6; font-size:15px; overflow-wrap: anywhere; }
.model-dialog footer { margin-top: 12px; }
.model-dialog button:disabled,.model-dialog input:disabled,.model-dialog select:disabled { opacity: .6; cursor: wait; }
.model-dialog :is(button,input,select,a):focus-visible,.model-library-page :is(button,a):focus-visible,.model-gender-filters button:focus-visible { outline: 3px solid #4e54ca; outline-offset: 3px; }
.model-selection .model-gender-filters { margin-top: 12px; gap: 6px; }
.model-selection .model-gender-filters .btn { min-height: 36px; padding: 6px 9px; font-size:14px; gap: 6px; }
@media (max-width: 1280px) { .model-library-page .page-head { flex-wrap: wrap; gap: 16px; } .model-library-actions { justify-content: flex-start; } }

