/* Shared surface tokens keep themes consistent across tables, dialogs and forms. */
:root{--surface:#fff;--soft:#eef4f9;--accent:#0078bd;--accent-hover:#00669f;--accent-text:#fff;--side:#102e49;--side-active:#1a4668;--highlight:#a8cf1c;--focus:#80b8d8}
:root[data-theme=green]{--ink:#293b26;--muted:#61715b;--line:#dce5d2;--paper:#f5f7ef;--surface:#fff;--soft:#edf3df;--accent:#abcF1c;--accent-hover:#97ba14;--accent-text:#23340b;--side:#263b27;--side-active:#40552b;--highlight:#b9dd35;--focus:#7e9d23;--green:#4d701b;--green-dark:#334e16}
:root[data-theme=dark]{color-scheme:dark;--ink:#e3eaf2;--muted:#abb9c9;--line:#354458;--paper:#151d28;--surface:#202b3a;--soft:#2b3a4d;--accent:#79bdeb;--accent-hover:#a1d3f4;--accent-text:#122a3e;--side:#101925;--side-active:#2b4258;--highlight:#b5d83b;--focus:#86c6f0;--green:#87c7f0;--green-dark:#acd8f6;--white:#202b3a}
:root[data-theme=pink]{--ink:#493740;--muted:#826974;--line:#eadbe2;--paper:#fcf5f7;--surface:#fffafb;--soft:#f7e9ef;--accent:#a64f76;--accent-hover:#8f3e62;--accent-text:#fff;--side:#45303e;--side-active:#68475b;--highlight:#eab1c8;--focus:#ce8cab;--green:#a64f76;--green-dark:#7d3856}
[data-theme] body{background:var(--paper);color:var(--ink)}
[data-theme] :is(.topbar,.record-card,.settings-card,.request-card,.content-part,.layout-toggle,.drawer,dialog,.auth-shell,.table-wrap){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme] :is(.hero,.button){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme] :is(.sidebar,.auth-brand){background:var(--side)}
[data-theme] .nav-item.active{background:var(--side-active)}
[data-theme] :is(.nav-item.active:before,.tiny-dot){background:var(--highlight)}
[data-theme] :is(.brand-caption,.nav-label,.account small,.local-note small){color:#b3c2c9}
[data-theme] :is(.nav-item,.local-note,.space-label){color:#d8e3e7}
[data-theme] .hero{border-left-color:var(--highlight)}
[data-theme] :is(.hero-number,.detail-cell,.price-block,.global-search,.storage-path,code,th,.product-matrix th,.tag,.tag.neutral,.top-avatar,.avatar,.empty-icon){background:var(--soft);color:var(--ink);border-color:var(--line)}
[data-theme] :is(.hero-copy h2,.hero-number strong,.card-body h3,.breadcrumb strong,.section-heading,.detail-section p,.content-part pre){color:var(--ink)}
[data-theme] :is(.subtitle,.eyebrow,.hero-copy p,.hero-number span,.card-body p,.card-body .code,.card-meta,.settings-card p,.detail-cell small,.price-block p,.spec-table small,.content-part small,.version small,.request-card small,label.field,.check,.dropzone small,.result-label,.footer,.footer span:first-child,.data-warning,.pill,.tab,.setup-tip,.upload-status){color:var(--muted)}
[data-theme] :is(td,.card-meta,.parameter-row,.export-product,.footer,.content-part td,.global-search kbd){border-color:var(--line)}
[data-theme] :is(input,select,textarea){color:var(--ink);accent-color:var(--green)}
[data-theme] :is(label.field input,label.field select,label.field textarea,select,.excel-fields input:not([type=checkbox]),.export-limit){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme] input::placeholder,[data-theme] textarea::placeholder{color:var(--muted);opacity:1}
[data-theme] .button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
[data-theme] .button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
[data-theme] :is(.button:hover,.row-link:hover,.pill:hover,.tab:hover){background:var(--soft)}
[data-theme] :is(.pills .button.primary,.icon-button.active,.pill.active,.tab.active){background:var(--soft);color:var(--green);border-color:var(--line)}
[data-theme] :is(.link-button,.card-meta strong,.dropzone svg){color:var(--green)}
[data-theme] :is(.notice.neutral,.dropzone,.dropzone.drag){background:var(--soft);color:var(--ink);border-color:var(--line)}
[data-theme] :is(.card-cover,.card-cover.blue,.card-cover.sand){background:var(--soft);border-color:var(--line)}
/* Product photography keeps its original white background in every theme. */
[data-theme] .card-cover:has(.card-product-image){background:#f7f9fc}
[data-theme] :is(button,a,input,select,textarea):focus-visible{outline-color:var(--focus)}
[data-theme] .record-card:hover{border-color:var(--focus)}
[data-theme] #toast{background:var(--side);color:#fff}
[data-theme=dark] :is(.notice,.tag.warn){background:#473c23;color:#f2d596;border-color:#6c5934}
[data-theme=dark] :is(.tag.error,.auth-error,.button.danger){color:#ffb5ad;border-color:#80534e}
[data-theme=dark] .tag.error{background:#4f302f}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.theme-option{text-align:left;background:var(--surface);color:var(--ink);border:2px solid var(--line);border-radius:10px;padding:10px;min-width:0}
.theme-option[aria-pressed=true]{border-color:var(--green);box-shadow:0 0 0 1px var(--green)}
.theme-option strong{display:flex;justify-content:space-between;gap:6px;font-size:13px;margin:12px 0 8px;flex-wrap:wrap}
.theme-option small{font-size:11px;line-height:1.7;color:var(--muted)}
.theme-check{font-size:10px;color:var(--green);font-weight:500}
.theme-preview{height:78px;display:block;border-radius:5px;position:relative;overflow:hidden;background:#f3f6fa;border:1px solid #dce3e9}
.theme-preview i{position:absolute;inset:0 auto 0 0;width:23%;background:#102e49}
.theme-preview b{position:absolute;left:31%;top:17%;width:56%;height:13%;background:#0078bd;border-radius:3px}
.theme-preview em{position:absolute;left:31%;top:45%;width:56%;height:37%;background:white;border-radius:3px;border:1px solid #dce3e9}
.preview-green{background:#f5f7ef}.preview-green i{background:#263b27}.preview-green b{background:#abcf1c}
.preview-dark{background:#151d28;border-color:#354458}.preview-dark i{background:#101925}.preview-dark b{background:#79bdeb}.preview-dark em{background:#2b3a4d;border-color:#354458}
.preview-pink{background:#fcf0f4}.preview-pink i{background:#45303e}.preview-pink b{background:#a64f76}.preview-pink em{background:#fffafb}
.settings-card .theme-hint{margin:16px 0 0;font-size:11px}
@media(max-width:1050px){.theme-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:380px){.theme-options{grid-template-columns:1fr}}
.model-frame{width:100%;height:490px;border:1px solid var(--line);border-radius:10px;display:block;margin-top:14px}.model-section{padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.model-section .toolbar{margin-bottom:12px}.model-section h3{margin:0}.model-section .model-note{font-size:11px;line-height:1.8;margin:10px 0 14px;color:var(--muted)}.model-name-preview{margin:12px 0 18px;overflow-wrap:anywhere;color:var(--green);font-size:12px}#model-upload-error,#model-delete-error{color:#bb5148;font-size:12px;margin-top:12px}[data-theme=dark] :is(#model-upload-error,#model-delete-error){color:#ffb5ad}@media(max-width:760px){.model-frame{height:440px}}
.platform-card{margin:0;display:flex;flex-direction:column;gap:12px}.platform-card .toolbar,.platform-card p,.platform-card h3{margin:0}.platform-card>.actions{margin-top:auto}.platform-card p{white-space:pre-wrap;overflow-wrap:anywhere}.platform-url{overflow-wrap:anywhere;margin-top:10px}.platform-account-editor{padding:18px;border:1px solid var(--line);border-radius:9px;margin:16px 0;background:var(--soft)}.platform-password{display:flex;align-items:flex-end;gap:10px;margin-top:12px}.platform-password .field{flex:1}.account-info p{white-space:pre-wrap}.account-info .toolbar h3{margin:0}
.variant-header .toolbar{gap:15px;flex-wrap:wrap}.variant-header .field{min-width:220px;flex:1}.product-filters{margin-bottom:18px}.product-filters .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.material-editor{padding:18px;margin:16px 0;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.variant-image-controls{display:flex;flex-wrap:wrap;gap:16px}.variant-image-controls img{width:160px;height:120px;object-fit:contain;background:white;border-radius:8px}.variant-image-controls .actions{margin-top:8px}dialog:has(#material-form),dialog:has(#variant-package-form),dialog:has(#variant-excel-form){width:min(1000px,96vw)}#variant-package-form .check{margin:8px 0} @media(max-width:760px){.product-filters .form-grid{grid-template-columns:1fr}}
.model-and-drawing{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr);gap:16px;margin-top:18px}.model-and-drawing h4{margin:0 0 10px;font-size:13px}.model-and-drawing .model-frame{margin-top:0;height:490px}.model-drawing{min-width:0}.drawing-open{width:100%;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:zoom-in;min-height:220px;display:grid;place-items:center;margin-bottom:12px}.drawing-open img{display:block;width:100%;height:auto;object-fit:contain}.drawing-scroll{margin-top:18px;overflow:auto;max-height:72vh;background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px}.drawing-scroll img{display:block;width:100%;height:auto;object-fit:contain}.drawing-scroll.drawing-zoomed img{width:auto;max-width:none;min-width:160%;height:auto}dialog:has(.drawing-scroll){width:min(1250px,96vw)}@media(max-width:760px){.model-and-drawing{grid-template-columns:1fr}.model-and-drawing .model-frame{height:440px}}
.drawing-scroll:not(.drawing-zoomed) img{width:auto;max-width:100%;max-height:65vh;margin:0 auto;object-fit:contain}.drawing-scroll.drawing-zoomed img{max-height:none}

.variant-count{display:inline-block;margin:4px 0 10px;font-weight:700}.product-version-subtitle{margin:4px 0 0;font-size:16px;font-weight:600;color:var(--accent,#007eb8)}

/* OS-inspired themes: opaque reading surfaces over decorative chrome. */
:root[data-theme=macos]{color-scheme:light;--ink:#242429;--muted:#63636e;--line:#dcdce2;--paper:#f4f4f6;--surface:#fff;--soft:#ededf2;--accent:#0069d9;--accent-hover:#0054b2;--accent-text:#fff;--side:#e6e7ee;--side-active:#d3e4fb;--highlight:#007aff;--focus:#007aff;--green:#0065cb;--green-dark:#004c9f;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
[data-theme=macos] body{background:radial-gradient(ellipse at 0 0,#dce7f8,transparent 45%),var(--paper)}
[data-theme=macos] .sidebar{background:linear-gradient(145deg,#e7eaf2f5,#eae8eff0);backdrop-filter:blur(20px);border-right:1px solid #d0d2db;box-shadow:none}
[data-theme=macos] :is(.brand-product,.nav-item,.local-note,.space-label){color:var(--ink)}
[data-theme=macos] :is(.brand-caption,.nav-label,.account small,.local-note small){color:var(--muted)}
[data-theme=macos] :is(.account,.space-label){border-color:var(--line)}
[data-theme=macos] .nav-item:hover{background:#dcdfe8;color:var(--ink)}
[data-theme=macos] .nav-item.active{background:var(--side-active);color:#004eaa}
[data-theme=macos] .topbar{background:#fafafbeF;backdrop-filter:blur(20px);border-bottom:1px solid var(--line)}
[data-theme=macos] :is(.record-card,.settings-card,.hero,dialog,.drawer){border-radius:14px;box-shadow:0 4px 18px #25254009}
[data-theme=macos] :is(dialog,.drawer){box-shadow:0 16px 60px #1e203130}
[data-theme=macos] .button{border-radius:8px;box-shadow:0 1px 2px #00000009}
[data-theme=macos] #toast{background:#303039;color:#fff}
.preview-macos{background:#f4f4f6}.preview-macos i{background:linear-gradient(135deg,#dce5f3,#e9e5ef)}.preview-macos b{background:#007aff}.preview-macos em{border-radius:7px;box-shadow:0 2px 6px #25254018}
:root[data-theme=vista]{color-scheme:light;--ink:#173249;--muted:#4c6677;--line:#b7cdd9;--paper:#eaf3f8;--surface:#fff;--soft:#e2f0f7;--accent:#176b9b;--accent-hover:#0c527e;--accent-text:#fff;--side:#113e5b;--side-active:#28617c;--highlight:#a6dc62;--focus:#167eae;--green:#176b9b;--green-dark:#124d72;font-family:"Segoe UI","Microsoft YaHei",sans-serif}
[data-theme=vista] body{background:radial-gradient(ellipse at 85% 0,#d4edc4,transparent 48%),linear-gradient(145deg,#d5eafa,#edf5f9 65%)}
[data-theme=vista] .sidebar{background:radial-gradient(ellipse at 10% 100%,#407c54,transparent 65%),linear-gradient(140deg,#3c7797 0%,#123e5c 42%,#0a263c 100%);border-right:1px solid #153b55;box-shadow:inset -1px 0 #ffffff35,3px 0 15px #15395320}
[data-theme=vista] .topbar{background:linear-gradient(#f4fbfbdc 0%,#dbedf5e8 48%,#c7deeaed 49%,#e4f3f8ef);backdrop-filter:blur(14px);border-bottom:1px solid #9dbbce;box-shadow:inset 0 1px #fff}
[data-theme=vista] .nav-item.active{background:linear-gradient(#80bcd566,#1f5b7c99);box-shadow:inset 0 1px #ffffff65,inset 0 0 0 1px #a5d6e855;color:#fff}
[data-theme=vista] :is(.record-card,.settings-card,.hero,.table-wrap){border-radius:6px;box-shadow:0 3px 9px #1a4b6510}
[data-theme=vista] :is(dialog,.drawer){border:1px solid #7eacbf;border-radius:8px;box-shadow:0 0 0 5px #99c4d76b,0 15px 45px #15395340}
[data-theme=vista] .button{border-radius:4px;background:linear-gradient(#fff 0%,#f0f6f9 48%,#dceaf2 49%,#edf6fa);border-color:#9cb7c8;box-shadow:inset 0 0 0 1px #ffffffa0}
[data-theme=vista] .button.primary{background:linear-gradient(#3989b3 0%,#2379a6 48%,#125d88 49%,#207ca4);border-color:#14527b;color:#fff;box-shadow:inset 0 1px #a4d6ec}
[data-theme=vista] .button.primary:hover{background:linear-gradient(#3282ad,#104d77)}
[data-theme=vista] :is(th,.product-matrix th){background:linear-gradient(#f3f9fc,#dcecf5)}
.preview-vista{background:linear-gradient(135deg,#cce6fa,#def0d5)}.preview-vista i{background:linear-gradient(145deg,#4486aa,#103c5b 60%,#467f53)}.preview-vista b{background:linear-gradient(#58a4cb,#155a83)}.preview-vista em{border:2px solid #9bc4d5;box-shadow:0 1px 5px #24495930}
.language-switch{flex-shrink:0;white-space:nowrap}.topbar{gap:16px}html:not([lang=zh-CN]):not([lang=ar]) .nav-item{font-size:12px}html:not([lang=zh-CN]):not([lang=ar]) .space-label{letter-spacing:0}html:not([lang=zh-CN]):not([lang=ar]) .theme-options small{line-height:1.5}html:not([lang=zh-CN]):not([lang=ar]) .button{white-space:normal}html:not([lang=zh-CN]):not([lang=ar]) .page-head .actions{flex-wrap:wrap}@media(max-width:760px){.topbar{gap:8px}.language-switch{padding:6px 8px;font-size:11px}.global-search{min-width:0;flex:1}.topbar .top-avatar{display:none}}
.solution-sections{margin:0 0 24px}.brochure-frame{display:block;width:100%;height:60vh;border:1px solid var(--line);border-radius:8px;background:var(--soft);margin:12px 0 20px}dialog:has(.brochure-reader){width:min(1200px,96vw)}.brochure-reader .settings-card{margin-bottom:0}.brochure-reader .toolbar{flex-wrap:wrap}.brochure-reader p{line-height:1.7}.cards .card-body h3{overflow-wrap:anywhere}
dialog:has(.presentation-reader){width:min(1280px,96vw)}.presentation-slide{display:block;max-width:100%;width:auto;max-height:66vh;height:auto;margin:18px auto;background:#fff;border:1px solid var(--line)}.presentation-reader .toolbar{flex-wrap:wrap}.presentation-reader p{color:var(--muted);line-height:1.7}.presentation-reader select{margin:0 8px}
.product-feature-badges{position:absolute;right:12px;bottom:12px;display:flex;gap:6px;z-index:3;flex-wrap:wrap}.product-feature-badge{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--green);box-shadow:0 2px 6px #0002;cursor:pointer}.product-feature-badge svg{width:20px;height:20px}.certificate-section{padding:16px;margin:12px 0 20px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:8px;background:var(--soft)}.certificate-section .toolbar{flex-wrap:wrap;margin-bottom:8px}.certificate-section p{font-size:12px;color:var(--muted);line-height:1.6}.certificate-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0}.certificate-row>span{flex:1;overflow-wrap:anywhere}.certificate-preview img{display:block;max-width:100%;max-height:70vh;margin:18px auto;object-fit:contain}dialog:has(.certificate-preview){width:min(1100px,96vw)}
.certificate-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:20px 0;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:8px;scroll-margin-top:80px}.certificate-pagination select{padding:6px 10px;margin-left:8px}.certificate-pagination .actions{flex-wrap:wrap}.certificate-pagination>span,.certificate-pagination label{font-size:12px;color:var(--ink)}
