:root[data-theme="dark"]{color-scheme:dark}
[data-theme="dark"] body{background:#141414;color:#f1efec}
[data-theme="dark"] .workspace{background:#181818}
[data-theme="dark"] .sidebar{background:#101010;border-color:#343434}
[data-theme="dark"] .topbar{background:#1c1c1c;border-color:#383838}
[data-theme="dark"] :is(.panel,.stat,.product-card,.auth,dialog,.empty){background:#222;border-color:#414141;color:#f1efec}
[data-theme="dark"] :is(.brand,.auth .brand,.product-heading){color:#f1efec}
[data-theme="dark"] :is(small,.sub,.mini,.topbar-label,.eyebrow,.stat-label,.product-meta,.facts dt,.hint,.event-date,.event-info,.auth-foot,.file-row span,.photo-label,label,.check,.loading){color:#bcb7b2}
[data-theme="dark"] :is(input,select,textarea){background:#181818;border-color:#555;color:#f1efec}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#a7a19c;opacity:1}
[data-theme="dark"] input[type="checkbox"]{accent-color:#da251d}
[data-theme="dark"] :is(th,td,.pack,.event,.file-row,.calendar-item,.modal-head,.modal-footer,hr){border-color:#414141}
[data-theme="dark"] th{color:#c3bdb7}
[data-theme="dark"] .btn{background:#2c2c2c;border-color:#555;color:#eee9e4}
[data-theme="dark"] .btn:hover{background:#37312f;border-color:#a46b60}
[data-theme="dark"] .btn.primary{background:#da251d;border-color:#da251d;color:#fff}
[data-theme="dark"] .btn.primary:hover{background:#bc211a;border-color:#bc211a}
[data-theme="dark"] .btn.soft{background:#402724;border-color:#654039;color:#ffb0a5}
[data-theme="dark"] .btn.ghost{background:transparent;border-color:transparent;color:#d0c9c3}
[data-theme="dark"] .btn.danger{background:#482824;border-color:#805148;color:#ffc3b8}
[data-theme="dark"] a,[data-theme="dark"] .muted-link{color:#ff9b8e}
[data-theme="dark"] .filter{background:transparent;border-color:#555;color:#c9c1ba}
[data-theme="dark"] .filter.active{background:#402724;border-color:#8b4a3f;color:#ffc3b8}
[data-theme="dark"] .badge{background:#284235;color:#bce3c6}
[data-theme="dark"] .badge.neutral{background:#373532;color:#ded7d0}
[data-theme="dark"] .badge.warn{background:#46391e;color:#f6dca0}
[data-theme="dark"] .badge.red{background:#4b2824;color:#ffb8ad}
[data-theme="dark"] .callout{background:#322926;border-color:#665046;color:#e8d8cc}
[data-theme="dark"] .callout.warn,[data-theme="dark"] .offline{background:#3b321f;border-color:#79623d;color:#f3d796}
[data-theme="dark"] .error{background:#4b2824;border-color:#8a4c42;color:#ffccc2}
[data-theme="dark"] .low-note,[data-theme="dark"] .restore-note{color:#f1d08c}
[data-theme="dark"] :is(.product-image,.photo-preview,.detail-photo){background:#303030;color:#ccaca3;border-color:#484848}
[data-theme="dark"] .stat-icon{background:#3c2824;color:#f3a391}
[data-theme="dark"] .avatar{background:#482a25;color:#ffc1b5}
[data-theme="dark"] .auth-wrap{background:radial-gradient(ellipse at 15% 10%,#362522,transparent 60%),#141414}
[data-theme="dark"] .auth{box-shadow:0 12px 60px #0004}
[data-theme="dark"] .search svg,[data-theme="dark"] .modal-close{color:#c5bbb2}
[data-theme="dark"] dialog::backdrop{background:#000a}
[data-theme="dark"] :is(button,a,input,select,textarea):focus-visible{outline-color:#ffa396}
[data-theme="dark"] #toast{background:#eee5dc;color:#241e1b}
.preview-notice{padding:13px 20px;border-bottom:1px solid #555;color:#cfc5bc;background:#25201e;font-size:13px}
.preview-shell{min-height:0}
.preview-shell .product-grid+.panel{margin-top:22px}
.product-card:not(:has(.product-image)){display:flex}
@media(max-width:760px){.topbar{height:auto;min-height:49px;flex-wrap:wrap;padding-block:10px}.topbar-right{flex-wrap:wrap;gap:8px}}
.product-card-header{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
.product-card-header .product-heading{min-width:0;flex:1}
.product-thumb{display:flex;flex-direction:column;align-items:center;flex:0 0 70px;width:70px;max-width:70px;text-decoration:none;color:inherit;gap:3px}
.product-thumb img{display:block;width:70px;height:70px;object-fit:contain;border-radius:8px;background:#e9e9e9;padding:3px}
.product-thumb small{font-size:10px;line-height:1.3;color:inherit;opacity:.8}
.current-user{font-size:13px;line-height:1.3;max-width:240px;overflow-wrap:anywhere}.topbar-right{flex-wrap:wrap}
.usage-note-footer{margin:12px 0 24px}.btn.usage-note-subtle{background:#fcf2f1;border-color:#e5cbc7;color:#8e4e48;font-weight:400;white-space:normal;text-align:left}[data-theme="dark"] .btn.usage-note-subtle{background:#272323;border-color:#51413e;color:#d3aaa4}.btn.usage-note-subtle:hover{background:#f4e4e1}[data-theme="dark"] .btn.usage-note-subtle:hover{background:#322927}
