:root { color-scheme: light; --ink:#172033; --muted:#64748b; --line:#dbe3ee; --panel:#fff; --accent:#0f766e; --accent-dark:#115e59; --bg:#f4f7fb; --good:#166534; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.45; }
a { color:var(--accent-dark); }
.site-header { min-height:74px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:10px 32px; background:#0f172a; color:#fff; }
.site-header a { color:#fff; text-decoration:none; }
.site-header nav { display:flex; align-items:center; gap:20px; font-size:.92rem; }
.site-header form { margin:0; }
.brand { display:flex; align-items:center; gap:13px; min-width:0; }
.brand-logo { display:block; width:116px; height:auto; flex:0 0 auto; border-radius:6px; box-shadow:0 0 0 1px rgba(255,255,255,.18); }
.brand-copy { display:flex; min-width:0; flex-direction:column; line-height:1.08; }
.brand-name { font-size:1.15rem; font-weight:780; letter-spacing:.01em; }
.brand-subtitle { margin-top:4px; color:#cbd5e1; font-size:.68rem; font-weight:600; letter-spacing:.055em; text-transform:uppercase; }
.link-button { border:0; padding:0; color:#fff; background:none; cursor:pointer; font:inherit; text-decoration:underline; }
.container { width:min(1180px, calc(100% - 32px)); margin:32px auto 64px; }
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:24px; }
.heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:6px; font-size:2rem; letter-spacing:-.025em; }
h2 { font-size:1.15rem; }
.muted { color:var(--muted); }
.eyebrow { margin-bottom:4px; color:var(--accent); font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.button { display:inline-flex; min-height:40px; align-items:center; justify-content:center; padding:8px 14px; border:1px solid #b8c5d6; border-radius:8px; background:#fff; color:var(--ink); text-decoration:none; cursor:pointer; font:inherit; font-weight:650; }
.button.primary { border-color:var(--accent); background:var(--accent); color:#fff; }
.button.primary:hover { background:var(--accent-dark); }
.button.ghost { background:transparent; }
.filters { display:grid; grid-template-columns:minmax(240px,1fr) 190px 190px auto auto; gap:10px; margin-bottom:18px; }
input,select,textarea { width:100%; padding:10px 11px; border:1px solid #b8c5d6; border-radius:7px; background:#fff; color:var(--ink); font:inherit; }
input:focus,select:focus,textarea:focus { outline:3px solid #99f6e4; border-color:var(--accent); }
input[type="checkbox"] { width:auto; }
.table-card,.card,.login-card { border:1px solid var(--line); border-radius:12px; background:var(--panel); box-shadow:0 8px 22px rgba(15,23,42,.045); }
.table-card { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th,td { padding:13px 14px; border-bottom:1px solid #e7edf4; text-align:left; vertical-align:top; }
th { background:#f8fafc; color:#475569; font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; }
tbody tr:hover { background:#f8fbfd; }
.strong-link { color:#0f4c5c; font-weight:750; text-decoration:none; }
.badge { display:inline-block; padding:3px 8px; border-radius:999px; background:#e8eef5; color:#475569; font-size:.75rem; font-weight:750; }
.badge.good { background:#dcfce7; color:var(--good); }
.empty { padding:36px; color:var(--muted); text-align:center; }
.pagination { display:flex; justify-content:center; gap:18px; margin-top:20px; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
.card { padding:22px; }
dl { display:grid; grid-template-columns:150px 1fr; gap:9px 14px; margin:0; }
dt { color:var(--muted); font-weight:700; }
dd { margin:0; overflow-wrap:anywhere; }
.file-section { margin-top:18px; }
.file-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; }
.file-card { overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
.file-card img { display:block; width:100%; height:170px; object-fit:contain; background:#fff; }
.file-card > div { padding:14px; }
.file-card h3 { margin:10px 0 5px; font-size:1rem; overflow-wrap:anywhere; }
.file-actions { display:flex; gap:16px; }
.preview-dialog { width:min(1100px,calc(100% - 32px)); height:min(820px,calc(100% - 32px)); padding:0; border:0; border-radius:12px; background:#fff; box-shadow:0 24px 70px rgba(15,23,42,.35); }
.preview-dialog::backdrop { background:rgba(15,23,42,.72); }
.preview-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:62px; padding:12px 18px; border-bottom:1px solid var(--line); }
.preview-dialog-header h2 { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.preview-close { width:40px; height:40px; flex:0 0 auto; border:0; border-radius:8px; background:#eef2f7; color:var(--ink); cursor:pointer; font:inherit; font-size:1.7rem; line-height:1; }
.preview-close:hover { background:#e2e8f0; }
.preview-dialog-body { display:grid; place-items:center; height:calc(100% - 62px); min-height:260px; padding:18px; background:#f1f5f9; }
.preview-status { grid-area:1 / 1; margin:0; }
.preview-image,.preview-frame { grid-area:1 / 1; width:100%; height:100%; border:0; border-radius:6px; background:#fff; }
.preview-image { object-fit:contain; }
.upload-form { margin-top:24px; padding-top:22px; border-top:1px solid var(--line); }
.upload-form p { max-width:680px; }
.model-form { padding:24px; }
.import-form { max-width:720px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 20px; }
.field label { display:block; margin-bottom:5px; font-weight:700; }
.field:has(textarea) { grid-column:1 / -1; }
.checkbox-field { display:flex; align-items:center; gap:10px; }
.checkbox-field label { margin:0; }
.checkbox-field input { order:-1; }
.field small { display:block; margin-top:4px; color:var(--muted); }
.error-text { color:#b91c1c !important; }
.form-actions { display:flex; gap:10px; margin-top:24px; }
.message { margin-bottom:18px; padding:12px 14px; border:1px solid #a7f3d0; border-radius:8px; background:#ecfdf5; }
.message.error { border-color:#fecaca; background:#fef2f2; color:#991b1b; }
.login-card { width:min(470px,100%); margin:56px auto; padding:30px; }
.login-identity { display:grid; justify-items:center; gap:13px; margin-bottom:26px; padding-bottom:24px; border-bottom:1px solid var(--line); text-align:center; }
.login-logo { display:block; width:min(320px,100%); height:auto; border-radius:10px; box-shadow:0 8px 24px rgba(15,23,42,.12); }
.login-product-name { margin:0; color:var(--ink); font-size:1.7rem; font-weight:800; letter-spacing:-.025em; }
.login-product-subtitle { margin:3px 0 0; color:var(--muted); font-size:.78rem; font-weight:700; letter-spacing:.055em; text-transform:uppercase; }
.stacked-form { display:grid; gap:10px; }
.stacked-form .button { margin-top:8px; }
@media (max-width:800px) { .filters { grid-template-columns:1fr; } .detail-grid,.form-grid { grid-template-columns:1fr; } .field:has(textarea) { grid-column:auto; } .site-header { min-height:64px; padding:8px 16px; } .brand-logo { width:100px; } .brand-subtitle { display:none; } .container { margin-top:22px; } dl { grid-template-columns:1fr; gap:3px; } dd { margin-bottom:10px; } }
@media (max-width:560px) { .site-header { align-items:flex-start; flex-direction:column; gap:10px; } .site-header nav { width:100%; justify-content:flex-end; gap:14px; } .login-card { margin-top:32px; padding:22px; } }
