:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #e8f1f7;
  background: #080e18;
  color-scheme: dark;
  --navy: #080e18;
  --ink: #e8f1f7;
  --muted: #a2b6c9;
  --line: #adcef023;
  --accent: #88e8f0;
  --field: #0a1421;
  --surface: #101a286b;
  --glass: linear-gradient(145deg, #a9e6ff0c, transparent 42%), linear-gradient(180deg, #152436d9, #101a29ed);
  --accent-glass: radial-gradient(ellipse at 14% 0%, #aff6ff27, transparent 63%),
    linear-gradient(123deg, transparent 63%, #b7efff16 77%, #b7efff0b 78%, transparent 88%),
    linear-gradient(175deg, #204456, #123343 54%, #102933);
  --hero-refraction: linear-gradient(124deg, transparent 65%, #91dafa11 72%, #c8f7ff30 75%, #9ebcff0d 76%, transparent 83%);
  --surface-shadow: inset 0 1px 0 #d3f1ff16, inset 0 -1px 0 #02070d6b, 0 10px 30px #0004;
  --button-shadow: inset 0 1px 0 #d3f2ff22, inset 0 -1px 0 #03090f80, 0 4px 12px #02060c6b;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
input, select, textarea, button { min-width: 0; }
button, select { cursor: pointer; }
a { color: #8ddbea; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); line-height: 1.12; letter-spacing: -.04em; overflow-wrap: anywhere; }
h2 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -.015em; overflow-wrap: anywhere; }
p { line-height: 1.55; }
small { display: block; font-size: .875rem; color: var(--muted); line-height: 1.4; }
button, .button-link, input:not([type=checkbox]):not([type=radio]), textarea, select {
  border: 1px solid #94c3ec43;
  border-radius: .67rem;
  color: var(--ink);
  background-color: var(--field);
  min-height: 2.65rem;
  padding: .58rem .8rem;
}
button, .button-link {
  font-weight: 650;
  background: linear-gradient(176deg, #263a4a, #162636 54%, #131f2f);
  box-shadow: var(--button-shadow);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, border-color 140ms ease;
}
button:not(:disabled):hover, .button-link:hover { filter: brightness(1.17); border-color: #8ce0eb8c; }
:is(button:not(:disabled), .button-link):active { transform: translateY(1px); box-shadow: inset 0 1px 4px #0008; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid #9bf1f9; outline-offset: 3px; }
input:not([type=checkbox]):not([type=radio]), textarea, select { box-shadow: inset 0 2px 7px #0006, 0 1px 0 #b2e3ff0b; }
input:focus, textarea:focus, select:focus { border-color: #77d1df; }
input::placeholder { color: #91a5b9; }
input:is([type=checkbox],[type=radio]) { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
textarea { resize: vertical; }
select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, #a4bfce 50%), linear-gradient(135deg, #a4bfce 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
:is(button, .button-link).primary { background: var(--accent-glass); border-color: #68c8d99c; color: #d7fdff; box-shadow: inset 0 1px 0 #c1fbff50, inset 0 -1px 0 #77eff42e, 0 0 18px #4ae5f021, 0 4px 12px #02070e90; }
:is(button, .button-link).primary:active { box-shadow: inset 0 2px 6px #02070c99, 0 0 12px #4ae5f024; }
button.danger { color: #ffacba; }
button.danger.solid { border-color: #ee91a975; background: linear-gradient(175deg, #643448, #382033); color: #ffe4eb; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: radial-gradient(ellipse at 0 0, #16445472, transparent 45%), linear-gradient(165deg, #101c2bef, #090f1bec); color: var(--ink); display: flex; flex-direction: column; align-self: start; padding: 1.6rem 1.05rem; position: sticky; top: 0; min-height: 100vh; box-shadow: inset -1px 0 0 #9fd8f52b, 5px 0 24px #02060c66; }
.brand { font-size: 1rem; font-weight: 750; line-height: 1.2; display: flex; align-items: center; gap: .8rem; letter-spacing: -.02em; }
.sidebar .brand { padding: .25rem .46rem; }
.brand-mark { display: block; width: 2.625rem; height: 2.625rem; flex: 0 0 2.625rem; filter: drop-shadow(0 0 8px #50daef40); }
.sidebar nav { display: grid; gap: .35rem; margin-top: 2.3rem; }
.sidebar a, .sidebar button { border-radius: .75rem; text-decoration: none; color: #d2e1ed; padding: .7rem .85rem; text-align: left; white-space: nowrap; }
.sidebar a:hover, .sidebar button:hover { background: #9de9f51b; color: #f3feff; }
.sidebar a[aria-current] { background: linear-gradient(140deg, #24576baf, #162b3d9c); color: #d7fdff; font-weight: 700; box-shadow: inset 2px 0 0 #73e4f2, inset 0 1px 0 #a4e6ff32, 0 0 14px #57e5ef12; }
.sidebar button { background: transparent; border-color: transparent; margin-top: auto; box-shadow: none; }
.sidebar button:active { box-shadow: none; }
.sidebar :focus-visible { outline-color: #a2edf7; }
.sidebar-account { display: grid; gap: .2rem; margin-top: auto; }
.sidebar-identity { padding: .55rem .85rem; overflow-wrap: anywhere; }
.sidebar-identity small { color: #bbcad9; }
.workspace { width: min(100%, 1410px); margin: 0 auto; padding: clamp(1rem, 4vw, 3.4rem); min-width: 0; }
.shell { background: radial-gradient(ellipse at 51% -4rem, #15505e78, transparent 43rem), radial-gradient(ellipse at 112% 22rem, #40357454, transparent 47rem); }
.page-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.5rem; }
.page-head p { margin-top: .48rem; color: var(--muted); overflow-wrap: anywhere; }
.page-head button { flex-shrink: 0; }
.workshop-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 24%);
  align-items: center;
  min-height: 8.5rem;
  padding: clamp(1rem, 2.5vw, 1.7rem);
  border: 1px solid #a9ebff4a;
  border-radius: 1rem;
  color: #fff;
  background: var(--hero-refraction), radial-gradient(ellipse at 37% -28%, #80e9ff39, transparent 57%),
    linear-gradient(90deg, #101f2c 39%, #101e2ed9 62%, #12233524),
    #101e2a url("/workshop-bench.jpg") right 49% / 52% auto no-repeat;
  box-shadow: inset 0 1px 0 #c0f7ff4d, inset 0 -1px 0 #54c9e238, 0 12px 32px #01060b90;
}
.workshop-head p { color: #bfceda; }
.panel, .metric { background: var(--glass), var(--surface); border: 1px solid var(--line); border-radius: .9rem; box-shadow: var(--surface-shadow); backdrop-filter: blur(12px) saturate(125%); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.15rem; }
.metric {
  display: flex; flex-direction: column; justify-content: space-between; gap: .65rem; padding: .95rem 1rem; min-width: 0;
  background: radial-gradient(ellipse at 100% 0, var(--metric-light, #96c9f021), transparent 69%), var(--glass), var(--surface);
  border-top-color: var(--metric-edge, var(--line));
}
.metric span { color: #bccee0; font-size: .875rem; font-weight: 550; line-height: 1.35; }
.metric strong { color: var(--metric-value, var(--ink)); font-size: clamp(1.25rem, 2.6vw, 2.05rem); font-weight: 730; font-variant-numeric: tabular-nums; letter-spacing: -.037em; overflow-wrap: anywhere; }
.metric.sky { --metric-light: #4dbdf232; --metric-edge: #73c9fa77; --metric-value: #cdf1ff; }
.metric.amber { --metric-light: #d893452b; --metric-edge: #f4bd7070; --metric-value: #ffe1ae; }
.metric.accent { --metric-light: #46d1be40; --metric-edge: #78ead595; --metric-value: #aaf4e9; }
.metric.violet { --metric-light: #9871e130; --metric-edge: #b09bea6b; --metric-value: #e2d5ff; }
.toolbar { display: flex; flex-wrap: wrap; gap: .65rem; padding: .9rem; }
.toolbar input { flex: 1 1 16rem; }
.toolbar select { flex: 0 1 auto; }
.device-grid, .stock-grid { display: grid; align-items: center; gap: .85rem; padding: .78rem 1rem; }
.device-grid { grid-template-columns: minmax(0, 2fr) minmax(8rem, 1fr) minmax(5.5rem, .65fr) minmax(5rem, .6fr); }
.stock-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
.table-labels { background: linear-gradient(#45667d25, #23415429); border-block-start: 1px solid var(--line); color: #b1c4d6; font-size: .875rem; font-weight: 650; }
.device-row, .stock-row, .line-row { color: inherit; text-decoration: none; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.device-row:last-child, .stock-row:last-child { border-radius: 0 0 .9rem .9rem; }
.device-row:hover, .stock-row:hover, .line-row:hover { background: linear-gradient(100deg, #5ad1e118, #599fe309); }
.device-row:focus-visible, .stock-row:focus-visible, .line-row:focus-visible { outline-offset: -3px; }
.device-row strong, .stock-row strong, .line-row strong { font-size: .98rem; }
.identity { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.component-summary { display: flex; flex-wrap: wrap; gap: .28rem .35rem; margin-top: .36rem; }
.component-summary > span { padding: .15rem .35rem; border-radius: .35rem; background: #80bde013; color: #bfd0df; font-size: .875rem; line-height: 1.3; }
.item-icon {
  --icon-tone: 186 206 225;
  background: linear-gradient(145deg, rgb(var(--icon-tone) / .2), rgb(var(--icon-tone) / .035) 78%), #101b2a;
  color: rgb(var(--icon-tone));
  border: 1px solid rgb(var(--icon-tone) / .38);
  box-shadow: inset 0 1px 0 rgb(var(--icon-tone) / .18);
  border-radius: .66rem;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center; flex: 0 0 auto;
}
.item-icon svg { width: 1.35rem; height: 1.35rem; }
.item-icon.tower { --icon-tone: 117 231 235; }
.item-icon.laptop { --icon-tone: 201 174 255; }
.item-icon.printer { --icon-tone: 255 192 112; }
.item-icon.monitor { --icon-tone: 138 181 255; }
.item-icon.peripheral { --icon-tone: 255 157 202; }
.device-heading { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.device-heading .item-icon { width: 3rem; height: 3rem; }
.device-heading .item-icon svg { width: 1.65rem; height: 1.65rem; }
:is(.pill, .stage) { --status-tone: 190 207 225; --status-ink: #d1dfed; }
:is(.pill, .stage).blue { --status-tone: 113 192 253; --status-ink: #bce6ff; }
:is(.pill, .stage).violet { --status-tone: 183 150 252; --status-ink: #e1ccff; }
:is(.pill, .stage).amber { --status-tone: 244 176 91; --status-ink: #ffd8a5; }
:is(.pill, .stage).teal { --status-tone: 99 223 203; --status-ink: #aaf5e8; }
:is(.pill, .stage).green { --status-tone: 165 222 110; --status-ink: #d2f8ac; }
:is(.pill, .stage).rose { --status-tone: 245 132 177; --status-ink: #ffc4db; }
.pill {
  display: inline-flex; align-items: center; border-radius: 999px; padding: .26rem .55rem;
  font-size: .875rem; line-height: 1.25; font-weight: 650; color: var(--status-ink);
  background: linear-gradient(155deg, rgb(var(--status-tone) / .19), rgb(var(--status-tone) / .075));
  border: 1px solid rgb(var(--status-tone) / .39);
  box-shadow: inset 0 1px 0 rgb(var(--status-tone) / .12);
}
.row-status { display: flex; align-items: flex-start; gap: .25rem; flex-direction: column; }
.number { font-variant-numeric: tabular-nums; }
.mobile-label { display: none; }
.tag-row, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.stock-summary, .section { padding: 1rem 1.1rem; margin-bottom: 1rem; min-width: 0; }
.stock-summary h2 { margin-bottom: .7rem; }
.stock-summary h2 span, .section h2 span { color: var(--accent); margin-left: .3rem; }
.empty { color: var(--muted); padding: .65rem 0; }
.catalog .empty { padding: 1rem; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.back, .back-links { display: inline-flex; margin-bottom: .85rem; font-weight: 650; text-underline-offset: .2em; }
.back-links { gap: .85rem; }
.overview > * + * { margin-top: .8rem; }
.workflow { display: grid; gap: .6rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.stages { display: flex; flex-wrap: wrap; align-items: stretch; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.stages > li { display: flex; }
.stage, button.stage {
  display: flex; align-items: center; font-weight: 650; font-size: .9rem; min-height: 2.5rem;
  border: 1px solid rgb(var(--status-tone) / .29); border-radius: .62rem; padding: .42rem .68rem;
  color: var(--status-ink); background: linear-gradient(rgb(var(--status-tone) / .10), rgb(var(--status-tone) / .04));
}
button.stage:disabled { opacity: .6; box-shadow: none; cursor: not-allowed; }
.stage.current {
  background: linear-gradient(145deg, rgb(var(--status-tone) / .28), rgb(var(--status-tone) / .09));
  border-color: rgb(var(--status-tone) / .55);
  box-shadow: inset 0 1px 0 rgb(var(--status-tone) / .23), 0 0 14px rgb(var(--status-tone) / .1);
}
.stage.current::before { content: ""; width: .46rem; height: .46rem; margin-right: .46rem; border-radius: 50%; background: var(--status-ink); box-shadow: 0 0 8px rgb(var(--status-tone) / .67); flex: none; }
.waiting-toggle:has(input:checked), .workflow-hint { color: #ffc4db; }
.waiting-toggle input { accent-color: #f389b1; }
.workflow-hint { margin-top: -.25rem; font-size: .875rem; }
.workflow-hint .pill { width: fit-content; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.specs { display: flex; gap: 1rem 2.8rem; flex-wrap: wrap; overflow-wrap: anywhere; }
.specs dt { color: var(--muted); font-size: .875rem; margin-bottom: .2rem; }
.specs dd { font-size: 1.15rem; font-weight: 650; }
.specs dd small { font-weight: 400; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.muted-text { margin: .35rem 0 .65rem; color: var(--muted); }
.line-row { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .65rem .25rem; }
.line-row > :last-child:not(:first-child) { text-align: right; }
.account-panel .specs { margin-bottom: 1rem; }
.user-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .65fr) minmax(0, 1.05fr); align-items: center; gap: .75rem; padding: .85rem 0; overflow-wrap: anywhere; }
.user-row .actions { justify-content: end; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.timeline { padding: 0; margin: .55rem 0 0; list-style: none; }
.timeline li { padding: .65rem 0 .65rem .75rem; border-left: 2px solid #76c9e851; overflow-wrap: anywhere; }
.timeline li > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem .65rem; }
.timeline li a { display: inline-block; margin-top: .2rem; }
.task-list { margin: 0 0 .65rem; padding: 0; list-style: none; }
.task-list li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; border-bottom: 1px solid var(--line); padding: .25rem 0; }
.task-list input:checked + span { text-decoration: line-through; color: var(--muted); }
.delete-item { flex: 0 0 auto; min-height: 2.45rem; border: 0; background: transparent; box-shadow: none; font-size: .875rem; }
.delete-item:not(:disabled):hover { background: #ea739e21; }
.delete-item:not(:disabled):active { box-shadow: none; }
.timeline li > .comment-meta { align-items: center; }
.check { display: flex; align-items: center; gap: .65rem; min-height: 2rem; overflow-wrap: anywhere; }
.inline-form { display: flex; flex-wrap: wrap; align-items: start; gap: .5rem; }
.inline-form input { flex: 1 1 11rem; }
.inline-form .form-error { flex-basis: 100%; }
.comment-form { display: grid; justify-items: start; gap: .5rem; }
.comment-form label { width: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: .65rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.photo-grid:empty { display: none; }
.photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .55rem; border: 1px solid var(--line); }
label:not(.check) { display: grid; gap: .32rem; font-size: .9rem; font-weight: 650; min-width: 0; }
label input, label textarea, label select { font-size: 1rem; font-weight: 400; width: 100%; }
label input:is([type=checkbox],[type=radio]) { width: 1.1rem; }
dialog { width: min(540px, calc(100% - 1.1rem)); max-height: calc(100dvh - 1.1rem); padding: 0; border: 1px solid #9ed8f463; border-radius: 1rem; color: var(--ink); background: var(--glass), #101a28; box-shadow: inset 0 1px 0 #c8f0ff36, 0 0 0 1px #020b15, 0 20px 65px #000b; }
dialog::backdrop { background: #030812a3; backdrop-filter: blur(6px); }
dialog form { display: flex; flex-direction: column; max-height: inherit; }
dialog header, dialog footer { display: flex; justify-content: space-between; align-items: center; gap: .55rem; padding: .7rem .95rem; }
dialog header { border-bottom: 1px solid var(--line); background: linear-gradient(#7cb9dd21, #37658712); }
dialog footer { justify-content: end; border-top: 1px solid var(--line); padding-bottom: .9rem; background: #08111c47; }
dialog .close { width: 2.4rem; min-height: 2.4rem; padding: 0; font-size: 1.4rem; flex: 0 0 auto; }
.dialog-fields { overflow: auto; display: grid; gap: .75rem; padding: .9rem .95rem; }
.dialog-fields p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.form-error { color: #ffadb8; font-weight: 600; }
dialog .form-error { padding: .4rem .95rem; }
.intake-parts:empty { display: none; }
.intake-parts { display: grid; gap: .65rem; }
.intake-part { margin: 0; min-width: 0; padding: .6rem; border: 1px solid var(--line); border-radius: .6rem; display: grid; gap: .55rem; }
.intake-part legend { color: var(--muted); font-size: .875rem; }
.loading, .login { min-height: 100vh; display: grid; place-items: center; padding: 1.15rem; }
.login { background: radial-gradient(ellipse at 26% 21%, #17556b73, transparent 52%), radial-gradient(ellipse at 84% 83%, #37286966, transparent 49%), var(--navy); }
.login-layout { width: min(100%, 865px); display: grid; grid-template-columns: 1.08fr minmax(0, .92fr); border: 1px solid #a2e7fd5c; border-radius: 1.1rem; overflow: hidden; box-shadow: 0 0 24px #66d8f01a, 0 24px 60px #0008; }
.login-art { position: relative; min-height: 24rem; background: #172735; }
.login-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 74% center; }
.login-art::after { position: absolute; inset: 0; content: ""; background: linear-gradient(125deg, #55e6ff20, transparent 43%, #0f203b23 70%, #447ddb25); pointer-events: none; }
.login-card { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(1.1rem, 6vw, 2.3rem); background: var(--glass), #13202d; box-shadow: inset 0 1px 0 #c5eeff31, inset 1px 0 0 #97d4f425; }
.login-card h1 { margin: 1.4rem 0 1rem; font-size: 1.8rem; }
.login-card form { display: grid; gap: .8rem; }
#notice:not(:empty) { position: fixed; z-index: 2; bottom: 1.25rem; right: 1.25rem; max-width: calc(100% - 2.5rem); border: 1px solid #75bbc965; border-radius: .75rem; padding: .7rem .85rem; background: var(--glass), #10212a; color: #def8fc; box-shadow: var(--surface-shadow); }
.print-controls, .invoice-form { display: flex; align-items: end; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.invoice-form { margin-bottom: 0; }
.label-sizes { display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding: .35rem .7rem; margin: 0; border: 1px solid var(--line); border-radius: .55rem; background: var(--glass), var(--surface); }
.label-sizes legend { font-size: .875rem; font-weight: 650; }
.print-preview { background: #0a1420; border: 1px solid var(--line); border-radius: .75rem; padding: clamp(.55rem, 3vw, 1.35rem); }
.thermal-label { display: flex; align-items: center; justify-content: space-between; width: 58mm; height: 40mm; padding: 2.4mm; background: #fff; color: #000; overflow: hidden; overflow-wrap: anywhere; font: 9pt/1.22 "Segoe UI", system-ui, sans-serif; }
.thermal-label.small { width: 30mm; height: 20mm; padding: 1mm; font-size: 5.8pt; }
.label-copy { display: grid; gap: .9mm; width: 30mm; }
.small .label-copy { gap: .42mm; width: 13.8mm; }
.label-qr { flex: none; width: 22mm; height: 22mm; }
.small .label-qr { width: 14mm; height: 14mm; }
.label-code { font-size: 13.5pt; line-height: 1.22; }
.small .label-code { font-size: 8pt; }
.label-model, .label-serial { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.label-model { font-weight: 700; }
.label-serial { font-size: 7pt; }
.small .label-serial { font-size: 4.9pt; }
.label-copy:has(.label-serial) .label-model { -webkit-line-clamp: 2; }
.invoice { max-width: 184mm; margin: 0 auto; padding: clamp(.75rem, 3vw, 1.5rem); background: white; color: #182638; overflow-wrap: anywhere; }
.invoice-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .5rem 1rem; border-bottom: 1px solid #a4b2bd; padding-bottom: .8rem; }
.invoice-head h1 { font-size: clamp(1.28rem, 3vw, 1.8rem); letter-spacing: -.025em; }
.invoice-head p { margin-top: .25rem; }
.invoice-device { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; margin: .8rem 0 1.2rem; }
.invoice-device dt { color: #46596b; font-size: .875rem; }
.invoice-device dd { font-weight: 650; }
.invoice-parts { width: 100%; table-layout: fixed; text-align: left; border-collapse: collapse; margin-top: .5rem; }
.invoice-parts th, .invoice-parts td { padding: .42rem .25rem; border-bottom: 1px solid #a4b2bd; vertical-align: top; font-size: .875rem; }
.invoice-parts th:nth-child(1) { width: 30%; }
.invoice-parts th:nth-child(3) { width: 30%; }

@page workshop-label-wide { size: 58mm 40mm; margin: 0; }
@page workshop-label-small { size: 30mm 20mm; margin: 0; }
@page workshop-invoice { size: A4; margin: 14mm; }

@media print {
  :root:has(.print-preview) { color-scheme: light; background: white; }
  body:has(.thermal-label) { page: workshop-label-wide; }
  body:has(.thermal-label.small) { page: workshop-label-small; }
  body:has(.invoice) { page: workshop-invoice; }
  body:has(.print-preview) { min-width: 0; background: white; }
  body:has(.print-preview) :is(.sidebar, .no-print, #notice) { display: none; }
  body:has(.print-preview) .shell { display: block; min-height: 0; background: none; }
  body:has(.print-preview) .workspace, .print-preview, .invoice { width: auto; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: white; }
  .thermal-label { break-inside: avoid; }
  .thermal-label, .invoice { color-scheme: light; }
  .invoice-head h1 { font-size: 20pt; }
  .invoice-parts thead { display: table-header-group; }
  .invoice-parts tr { break-inside: avoid; }
}

@media (max-width: 1080px) {
  .shell { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace { padding: 1.4rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .device-grid { grid-template-columns: minmax(0, 1.7fr) minmax(7.5rem, 1fr) minmax(4.6rem, .65fr) minmax(4.4rem, .6fr); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; min-height: auto; padding: .75rem .85rem .45rem; display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
  .sidebar .brand { padding: 0; gap: .5rem; font-size: .86rem; white-space: nowrap; }
  .sidebar nav { margin: 0; grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar nav.with-users { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sidebar nav a { text-align: center; padding-inline: .18rem; font-size: .9rem; }
  .sidebar-account { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; grid-column: 2; grid-row: 1; margin: 0; gap: 0; }
  .sidebar-account :is(a, button) { padding: .45rem .35rem; font-size: .84rem; }
  .sidebar-account .sign-out { margin: 0; }
  .sidebar-identity { display: none; }
  .workspace { padding: 1rem .8rem; }
  .page-head { flex-wrap: wrap; margin-bottom: 1rem; }
  .workshop-head {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    min-height: 8.5rem;
    background: var(--hero-refraction), radial-gradient(ellipse at 20% -20%, #76ecff32, transparent 60%),
      linear-gradient(90deg, #101f2c 10%, #101e2ef0 42%, #101e2e81),
      #101e2a url("/workshop-bench.jpg") right 48% / auto 150% no-repeat;
  }
  .login-layout { width: min(100%, 425px); grid-template-columns: minmax(0, 1fr); }
  .login-art { min-height: 0; aspect-ratio: 2.55; }
  .login-art img { object-position: 74% 46%; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .metric { padding: .7rem; }
  .metric strong { font-size: 1.28rem; }
  .section, .stock-summary { padding: .85rem; }
}
@media (max-width: 545px) {
  .user-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; }
  .user-row .actions { grid-column: 1 / -1; justify-content: start; }
  .table-labels { display: none; }
  .toolbar input { flex-basis: 100%; }
  .toolbar select { flex: 1 1 7rem; }
  .device-grid, .stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .65rem; padding: .65rem .85rem; }
  .device-row .identity, .device-row .row-status, .stock-row > :first-child { grid-column: 1 / -1; }
  .device-row .identity { align-items: start; }
  .device-row .item-icon { width: 2.2rem; height: 2.2rem; }
  .device-heading { align-items: start; }
  .row-status { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .mobile-label { display: block; color: var(--muted); font-size: .875rem; }
  .stock-row .serial { align-self: start; text-align: end; }
  .section-head .actions button { flex: 1 1 auto; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  button, .button-link { transition: none; }
  :is(button:not(:disabled), .button-link):active { transform: none; }
}
