@font-face {
  font-family: "Cairo";
  src: url("/cairo-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --brand: #0aa8eb;
  --brand-primary: #0199d8;
  --brand-dark: #1f2937;
  --bg: #f3f5f6;
  --card: #ffffff;
  --surface-2: #f7f9fa;
  --hover: #edf8fc;
  --field-bg: #ffffff;
  --border: #dfe5e8;
  --border-strong: #cbd6dc;
  --text: #1f2937;
  --muted: #6a7282;
  --blue: #007cab;
  --blue-dark: #00658d;
  --blue-text: #006f99;
  --blue-soft: #e9f7fc;
  --blue-border: #98d8ee;
  --primary-fill: #007cab;
  --primary-fill-hover: #00658d;
  --focus-ring: rgb(10 168 235 / 16%);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --green: #16a34a;
  --green-text: #14723a;
  --green-soft: #eaf8ef;
  --green-border: #c8ead3;
  --red: #dc2626;
  --red-text: #b91c1c;
  --red-soft: #fff0f0;
  --red-border: #fecaca;
  --amber: #f59e0b;
  --amber-text: #9a5c00;
  --amber-soft: #fff8e5;
  --amber-border: #fde2a5;
  --neutral-text: #526173;
  --neutral-bg: #eef2f6;
  --neutral-border: #dbe2ea;
  --shadow: 0 2px 10px rgb(31 41 55 / 7%);
  --shadow-lg: 0 10px 30px rgb(31 41 55 / 17%);
  --win-hover: #eef3f5;
}
:root[data-theme="dark"] {
  --brand: #0aa8eb;
  --brand-primary: #0199d8;
  --brand-dark: #101821;
  --bg: #0d141b;
  --card: #16202a;
  --surface-2: #1d2a35;
  --hover: #1b303c;
  --field-bg: #101a23;
  --border: #293845;
  --border-strong: #405361;
  --text: #eef5f7;
  --muted: #9aabb6;
  --blue: #39bbed;
  --blue-dark: #62c9f1;
  --blue-text: #67cff5;
  --blue-soft: #123446;
  --blue-border: #28677f;
  --primary-fill: #007cab;
  --primary-fill-hover: #00658d;
  --focus-ring: rgb(10 168 235 / 24%);
  --green: #34d17f;
  --green-text: #7ee0aa;
  --green-soft: #123023;
  --green-border: #1e4b36;
  --red: #f77;
  --red-text: #ff9d9d;
  --red-soft: #331a1c;
  --red-border: #5c2b2e;
  --amber: #f0b64d;
  --amber-text: #f2c777;
  --amber-soft: #2e2413;
  --amber-border: #4d3d1c;
  --neutral-text: #aab6c6;
  --neutral-bg: #222c39;
  --neutral-border: #313d4c;
  --shadow: 0 2px 10px rgb(0 0 0 / 34%);
  --shadow-lg: 0 10px 30px rgb(0 0 0 / 50%);
  --win-hover: #232e3c;
}
:root[data-theme="vaporwave"] {
  --brand: #38d8f4;
  --brand-primary: #16bfe3;
  --brand-dark: #071923;
  --bg: #06141b;
  --card: rgb(7 27 36 / 86%);
  --surface-2: rgb(11 38 49 / 84%);
  --hover: rgb(16 65 80 / 78%);
  --field-bg: rgb(5 22 30 / 91%);
  --border: #22657a;
  --border-strong: #368ba3;
  --text: #edfafd;
  --muted: #9fbfc8;
  --blue: #45ddf5;
  --blue-dark: #79e8fa;
  --blue-text: #69e4f8;
  --blue-soft: rgb(21 91 108 / 58%);
  --blue-border: #2b8ca3;
  --primary-fill: #087f9b;
  --primary-fill-hover: #0a9abc;
  --focus-ring: rgb(56 216 244 / 30%);
  --green: #4bd5ae;
  --green-text: #86e9ca;
  --green-soft: rgb(17 73 60 / 78%);
  --green-border: #2d6c59;
  --red: #ff7380;
  --red-text: #ffadb4;
  --red-soft: rgb(76 27 34 / 78%);
  --red-border: #82434b;
  --amber: #eab65f;
  --amber-text: #f3d18f;
  --amber-soft: rgb(74 55 24 / 78%);
  --amber-border: #765b31;
  --neutral-text: #b5cbd2;
  --neutral-bg: rgb(23 53 63 / 86%);
  --neutral-border: #315e6c;
  --shadow: 0 3px 14px rgb(0 10 15 / 34%);
  --shadow-lg: 0 14px 38px rgb(0 8 12 / 56%);
  --win-hover: rgb(19 57 69 / 90%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--text); background: var(--bg); font-family: "Cairo", "Segoe UI", Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; }
a { color: var(--blue); }

.studio-app { height: 100dvh; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) 34px; background: var(--bg); }
:root[data-theme="vaporwave"] .studio-app { position: relative; isolation: isolate; overflow: hidden; background: #06141b; }
:root[data-theme="vaporwave"] .studio-app::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(rgb(1 25 34 / 18%), rgb(2 18 25 / 43%)), url("/vaporwave-angel.jpg") center / cover no-repeat;
  filter: blur(5px) saturate(.94) contrast(1.08) hue-rotate(-72deg);
  opacity: .82;
  transform: scale(1.012);
}
:root[data-theme="vaporwave"] .studio-app > * { position: relative; z-index: 1; }
:root[data-theme="vaporwave"] #themeToggle { color: #75e9fb; border-color: #2e8299; background: linear-gradient(145deg, rgb(7 38 49 / 97%), rgb(12 72 87 / 94%)); }

/* Top bar (brand + nav + controls, one row) -------------------------------*/
.topbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 12px; min-height: 60px; padding: 0 14px 0 18px; background: var(--card); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 190px; white-space: nowrap; }
.brand-wordmark { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; line-height: 1; }
.brand-wordmark strong { color: var(--text); font-size: 18px; font-weight: 700; letter-spacing: .035em; }
.brand-wordmark span { color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; display: block; flex: 0 0 auto; border-radius: 8px; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 190px; min-height: 60px; margin-left: auto; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted); }
.icon-btn:hover { color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); }
/* current-user chip */
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.profile-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); }
.profile-trigger:hover { border-color: var(--blue-border); background: var(--blue-soft); }
.profile-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.user-chip .uc-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.user-chip .uc-name svg { width: 16px; height: 16px; color: var(--muted); }
.user-chip .uc-role { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; color: var(--neutral-text); background: var(--neutral-bg); border: 1px solid var(--neutral-border); }
.user-chip .uc-role.admin { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-border); }
.user-chip .uc-role.manager { color: var(--amber-text); background: var(--amber-soft); border-color: var(--amber-border); }
.user-chip .icon-btn { width: 32px; height: 32px; }
/* nav badge (pending approvals) */
.main-nav button .nav-badge {
  position: static;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 5px;
  border: 1px solid color-mix(in srgb, var(--red) 72%, white);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--card);
}
/* login */
.login-wrap { display: grid; place-items: center; min-height: 70vh; }
.login-card { width: min(380px, 92vw); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark { width: 40px; height: 40px; border-radius: 9px; }
.login-brand h1 { margin: 0; }
.login-brand .brand-wordmark strong { font-size: 21px; }
.login-brand .brand-wordmark span { font-size: 17px; }
.login-sub { color: var(--muted); margin: 6px 0 16px; }
.account-screen-title { margin: 18px 0 4px; font-size: 20px; }
.language-toggle {
  min-width: 42px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--cyan);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  cursor: pointer;
}
.language-toggle:hover, .language-toggle:focus-visible { border-color: var(--cyan); outline: none; }
.login-secondary { width: 100%; margin-top: 8px; }

/* Nav (centered within the top bar) ---------------------------------------*/
.main-nav { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 2px; }
.main-nav button { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 94px; padding: 0 9px; border: 0; color: var(--muted); background: transparent; font-weight: 600; transition: color .18s ease, background-color .18s ease; }
.main-nav button::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); opacity: 0; transform: scaleX(.28); transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1); }
.main-nav button:hover { color: var(--blue); background: var(--hover); }
.main-nav button.active { color: var(--blue); }
.main-nav button.active::after { opacity: 1; transform: scaleX(1); }
.main-nav svg { width: 18px; height: 18px; }

main { width: 100%; min-width: 0; min-height: 0; overflow: auto; }
.screen-content { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 42px; }
main.screen-leaving > .screen-content { filter: blur(2px); transition: filter 50ms ease-in; pointer-events: none; }
main.screen-entering > .screen-content { animation: screen-blur-arrival 120ms cubic-bezier(.2,.78,.24,1) both; }
@keyframes screen-blur-arrival {
  from { filter: blur(2px); }
  58% { filter: blur(.5px); }
  to { filter: blur(0); }
}
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 20px; }
.page-heading h1 { margin: 0 0 6px; font-size: 27px; line-height: 1.15; letter-spacing: -.45px; }
.page-heading p { margin: 0; color: var(--blue); font-size: 14px; }

/* Cards -------------------------------------------------------------------*/
.card { background: var(--card); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.padded { padding: 18px 20px; }
.card-title { display: flex; align-items: center; gap: 9px; min-height: 27px; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.card-title h2 { margin: 0; font-size: 16px; letter-spacing: -.15px; }
.card-title-icon { color: var(--blue); display: grid; place-items: center; }
.card-title-icon svg { width: 18px; height: 18px; }
.card-title-trailing { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }

/* Buttons -----------------------------------------------------------------*/
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 6px; border: 1px solid var(--blue-border); background: var(--card); color: var(--blue); font-weight: 700; padding: 8px 15px; }
.button:hover { border-color: var(--blue); background: var(--blue-soft); }
.button.primary { color: #fff; background: var(--primary-fill); border-color: var(--primary-fill); box-shadow: 0 1px 2px rgb(31 41 55 / 12%); }
.button.primary:hover { background: var(--primary-fill-hover); border-color: var(--primary-fill-hover); }
.drawer-foot .button.primary:disabled { opacity: 1; color: var(--muted); background: var(--neutral-bg); border-color: var(--neutral-border); }
.drawer-foot .button.primary:disabled:hover { color: var(--muted); background: var(--neutral-bg); border-color: var(--neutral-border); }
.button.danger-outline { color: var(--red-text); border-color: var(--red-border); background: var(--card); }
.button.danger-outline:hover { background: var(--red-soft); border-color: var(--red); }
.button.quiet { color: var(--muted); border-color: transparent; background: transparent; }
.button.quiet:hover { background: var(--hover); color: var(--blue); }
.button.small { min-height: 31px; padding: 5px 11px; font-size: 12px; }
.button svg { width: 16px; height: 16px; }
.button:disabled { opacity: .55; cursor: not-allowed; }

/* Badges ------------------------------------------------------------------*/
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 4px 9px; border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 800; letter-spacing: .02em; color: var(--green-text); background: var(--green-soft); border: 1px solid var(--green-border); }
.badge.danger { color: var(--red-text); background: var(--red-soft); border-color: var(--red-border); }
.badge.warning { color: var(--amber-text); background: var(--amber-soft); border-color: var(--amber-border); }
.badge.info { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-border); }
.badge.neutral { color: var(--neutral-text); background: var(--neutral-bg); border-color: var(--neutral-border); }
.event-badges { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
/* Per activity-type colours (Transfer In vs Out are deliberately distinct) */
.badge.t-receive  { color: #15803d; background: rgba(22,163,74,.13);  border-color: rgba(22,163,74,.34); }
.badge.t-sale     { color: #7c3aed; background: rgba(124,58,237,.13); border-color: rgba(124,58,237,.38); }
.badge.t-return   { color: #0d9488; background: rgba(13,148,136,.14); border-color: rgba(13,148,136,.34); }
.badge.t-movein   { color: #2563eb; background: rgba(37,99,235,.13);  border-color: rgba(37,99,235,.34); }
.badge.t-moveout  { color: #ea580c; background: rgba(234,88,12,.13);  border-color: rgba(234,88,12,.35); }
.badge.t-warranty { color: #b45309; background: rgba(217,119,6,.14);  border-color: rgba(217,119,6,.34); }
.badge.t-discard  { color: #dc2626; background: rgba(220,38,38,.12);  border-color: rgba(220,38,38,.33); }
.badge.t-adjust   { color: #64748b; background: rgba(100,116,139,.14);border-color: rgba(100,116,139,.32); }
.badge.t-assemble { color: #4f46e5; background: rgba(79,70,229,.13);  border-color: rgba(79,70,229,.35); }
.badge.t-unpack   { color: #9333ea; background: rgba(147,51,234,.12); border-color: rgba(147,51,234,.34); }
.badge.t-other    { color: var(--neutral-text); background: var(--neutral-bg); border-color: var(--neutral-border); }
.badge.k-kit      { color: #7c3aed; background: rgba(124,58,237,.14); border-color: rgba(124,58,237,.4); }
.badge.k-bag      { color: #0e7490; background: rgba(6,182,212,.13); border-color: rgba(6,182,212,.4); }
.badge.k-roll     { color: #047857; background: rgba(16,185,129,.13); border-color: rgba(16,185,129,.4); }
.badge.k-product  { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-border); }
.badge.k-material { color: var(--amber-text); background: var(--amber-soft); border-color: var(--amber-border); }
:root[data-theme="dark"] .badge.t-receive  { color: #5edb98; }
:root[data-theme="dark"] .badge.t-sale     { color: #b794f6; }
:root[data-theme="dark"] .badge.t-return   { color: #4fd1c5; }
:root[data-theme="dark"] .badge.t-movein   { color: #7aa9f8; }
:root[data-theme="dark"] .badge.t-moveout  { color: #fb9a5b; }
:root[data-theme="dark"] .badge.t-warranty { color: #f0b96a; }
:root[data-theme="dark"] .badge.t-discard  { color: #ff9d9d; }
:root[data-theme="dark"] .badge.t-adjust   { color: #a3b1c2; }
:root[data-theme="dark"] .badge.t-assemble { color: #9aa2f5; }
:root[data-theme="dark"] .badge.t-unpack   { color: #c99af0; }
:root[data-theme="dark"] .badge.k-kit      { color: #c99af0; }
:root[data-theme="dark"] .badge.k-bag      { color: #67e8f9; }
:root[data-theme="dark"] .badge.k-roll     { color: #6ee7b7; }
.status-dot { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgb(22 163 74 / 14%); }
.status-dot.danger { background: var(--red); box-shadow: 0 0 0 3px rgb(220 38 38 / 14%); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 0 3px rgb(245 158 11 / 14%); }

/* Combo (custom dropdown / combobox) --------------------------------------*/
.combo { position: relative; }
.combo-control { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 0 8px 0 11px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); text-align: left; }
button.combo-control { cursor: pointer; }
.combo.open .combo-control { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.combo.disabled { opacity: .55; }
.combo.disabled .combo-control { cursor: not-allowed; background: var(--surface-2); }
.combo-input { flex: 1; min-width: 0; height: 34px; border: 0; outline: none; background: transparent; color: var(--text); font-weight: 500; }
.combo-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.combo.placeholder .combo-label { color: var(--muted); }
.combo-chev { color: var(--muted); display: grid; place-items: center; transition: transform .15s ease; }
.combo-chev svg { width: 16px; height: 16px; transform: rotate(90deg); }
.combo.open .combo-chev { transform: rotate(180deg); }
.combo-panel { position: absolute; z-index: 60; top: calc(100% + 5px); left: 0; right: 0; max-height: 280px; overflow: auto; padding: 5px; background: var(--card); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg); }
.combo-opt { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.combo-opt .co-label { font-weight: 600; }
.combo-opt .co-sub { margin-left: auto; color: var(--muted); font-size: 11px; }
.combo-opt.hi, .combo-opt:hover { background: var(--hover); }
.combo-opt.sel { color: var(--blue); }
.combo-create { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--blue); font-weight: 700; border-top: 1px solid var(--border); margin-top: 3px; }
.combo-create:hover { background: var(--blue-soft); }
.combo-create svg { width: 15px; height: 15px; }
.combo-empty { padding: 12px 10px; color: var(--muted); text-align: center; }

/* KPI tiles ---------------------------------------------------------------*/
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tiles > div { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.tiles .m-icon { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 10px; }
.tiles .m-icon svg { width: 22px; height: 22px; }
.tiles .m-icon.mat { color: var(--amber-text); background: var(--amber-soft); }
.tiles .m-icon.warn { color: var(--amber-text); background: var(--amber-soft); }
.tiles span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.tiles strong { margin-top: 3px; font-size: 25px; letter-spacing: -.5px; }
.tiles small { color: var(--muted); font-weight: 700; font-size: 12px; }

/* Dashboard ---------------------------------------------------------------*/
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; align-items: start; }
.dash-wide { grid-column: 1 / -1; }
.stock-list { display: grid; gap: 2px; max-height: 460px; overflow: auto; }
.stock-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.stock-row:last-child { border-bottom: 0; }
.stock-row .lead { display: grid; gap: 2px; min-width: 0; }
.stock-row .lead strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-row .lead .sub { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-row .qty { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 16px; text-align: right; }
.stock-row .qty small { display: block; color: var(--muted); font-weight: 700; font-size: 10px; }
.qty.low { color: var(--red); }
.section-count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.validation-empty-dashboard { min-height: 112px; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px; }
.validation-empty-dashboard > svg { width: 42px; height: 42px; padding: 9px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); border-radius: 10px; }
.validation-empty-dashboard h2 { margin: 0 0 5px; font-size: 18px; }
.validation-empty-dashboard p { margin: 0; color: var(--muted); }

/* Administrator spreadsheet-validation workspace -------------------------*/
.validation-screen { width: min(1580px, calc(100% - 36px)); }
.validation-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.validation-kpis.validation-kpis-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.validation-kpis > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.validation-kpi-action { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 13px 16px; color: inherit; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.validation-kpi-action small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-weight: 700; }
.validation-kpi-action:hover, .validation-kpi-action.ready { border-color: var(--blue-border); background: var(--blue-soft); }
.validation-kpi-action.ready strong { color: var(--blue); }
.validation-kpis span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.validation-kpis strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.validation-kpis strong.warn { color: var(--amber-text); }
.validation-kpis strong.good { color: var(--green-text); }
.validation-layout { display: grid; grid-template-columns: 350px minmax(650px, 1fr); gap: 14px; align-items: start; }
.validation-queue { position: sticky; top: 14px; height: calc(100dvh - 202px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.validation-tools { display: grid; gap: 9px; padding: 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.validation-office-filter { display: grid; gap: 5px; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.validation-office-filter select { color: var(--text); font-size: 13px; font-weight: 800; text-transform: none; }
.validation-tools .search-box { min-width: 0; }
.search-box { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--muted); }
.search-box svg { flex: 0 0 auto; width: 16px; height: 16px; }
.search-box input { flex: 1; min-width: 0; height: 34px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; font-weight: 500; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.validation-tools select { height: 36px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.validation-list { overflow: auto; }
.validation-rack-group { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 7px 11px; color: var(--text); background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: 0 2px 5px rgb(0 0 0 / 5%); }
.validation-rack-group span { color: var(--blue); font-size: 12px; font-weight: 900; }
.validation-rack-group b { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.validation-list-item { width: 100%; min-height: 67px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--card); text-align: left; }
.validation-list-item:hover { background: var(--hover); }
.validation-list-item.active { background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
.validation-submission { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; padding: 9px 11px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); border-radius: 6px; }
.validation-submission > svg { flex: 0 0 auto; width: 18px; height: 18px; }
.validation-submission span { display: grid; gap: 2px; }
.validation-submission small { color: var(--muted); }
.vli-location { color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.vli-main { min-width: 0; display: grid; gap: 3px; }
.vli-main strong, .vli-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vli-main small { color: var(--muted); }
.vli-side { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 6px; }
.vli-side b { font-size: 16px; font-variant-numeric: tabular-nums; }
.vli-side .badge { font-size: 9px; padding: 3px 5px; min-width: 0; }
.vli-side i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--amber); font-size: 11px; font-weight: 900; font-style: normal; }
.validation-detail { padding: 20px; min-height: 620px; }
.validation-product-head { display: grid; grid-template-columns: 144px 1fr; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.validation-product-head h2 { margin: 3px 0 5px; font-size: 27px; letter-spacing: -.4px; }
.validation-product-head p { margin: 0 0 10px; color: var(--muted); }
.validation-eyebrow { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.validation-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.validation-photo-stack { width: 144px; display: grid; gap: 6px; }
.validation-photo-stack > small { color: var(--muted); font-size: 9px; line-height: 1.3; text-align: center; }
.photo-capture-guidance { color: var(--muted); font-size: 9px; line-height: 1.35; text-align: center; }
.validation-photo { width: 144px; height: 122px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; }
.validation-photo:hover, .validation-photo:focus-visible, .validation-photo.drag { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); outline: 0; }
.validation-photo img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; }
.validation-photo-ph { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 700; }
.validation-photo-ph svg { width: 26px; height: 26px; }
.validation-photo-upload { width: 100%; justify-content: center; }
.validation-reference { display: flex; align-items: center; gap: 11px; margin: 14px 0; padding: 10px 12px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); border-radius: 7px; }
.validation-reference > div { display: grid; gap: 2px; }
.validation-reference span { color: var(--muted); font-size: 11px; }
.validation-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 18px 0 9px; }
.validation-section-title h3 { margin: 0; font-size: 15px; }
.validation-section-title span { color: var(--muted); font-size: 11px; }
.validation-locations { display: grid; gap: 8px; }
.validation-location { display: grid; grid-template-columns: 46px minmax(210px, 1fr) 150px; align-items: center; gap: 9px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); }
.validation-location.excluded { opacity: .58; background: var(--surface-2); }
.validation-include { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.validation-include input { width: 18px; height: 18px; accent-color: var(--blue); }
.validation-path { display: grid; gap: 3px; min-width: 0; }
.validation-path strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.validation-path small { color: var(--muted); }
.validation-qty { display: grid; gap: 4px; }
.validation-qty span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.validation-qty > input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); text-align: right; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.validation-qty .number-stepper { width: 100%; }
.validation-entry-actions { display:grid;gap:6px;margin-top:7px; }
.validation-entry-actions .badge { width:max-content;max-width:100%; }
.validation-entry-actions .button { width:100%;justify-content:center;white-space:normal; }
.validation-row-note { grid-column: 2 / -1; min-width: 0; display: grid; gap: 4px; padding-top: 7px; border-top: 1px solid var(--border); }
.validation-row-note b { display: flex; align-items: flex-start; gap: 5px; color: var(--amber-text); font-size: 11px; }
.validation-row-note b svg { flex: 0 0 auto; width: 14px; height: 14px; }
.validation-row-note span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.validation-row-classification { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); align-items: end; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.validation-row-classification select,
.validation-row-classification input:not([type="checkbox"]) { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.validation-row-kit { min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); }
.validation-row-kit input { width: 18px; height: 18px; accent-color: var(--blue); }
.validation-row-kit span { display: grid; gap: 1px; }
.validation-row-kit small { color: var(--muted); font-size: 10px; }
.validation-location-kit { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--blue-border); border-radius: 7px; background: var(--blue-soft); }
.validation-location-kit.hidden { display: none; }
.validation-location-kit .validation-section-title { margin-top: 0; }
.validation-location-component-row { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); align-items: end; gap: 9px; margin-bottom: 9px; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); }
.validation-location-component-row input { width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.validation-location-component-row > button { justify-self: start; }
.validation-per-location-help { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--blue-border); border-radius: 7px; color: var(--blue); background: var(--blue-soft); }
.validation-per-location-help > svg { flex: 0 0 auto; width: 20px; height: 20px; }
.validation-per-location-help > span { display: grid; gap: 2px; }
.validation-per-location-help small { color: var(--muted); }
.validation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.validation-fields select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.validation-kit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.validation-kit input { width: 18px; height: 18px; accent-color: var(--blue); }
.validation-kit span { display: grid; gap: 2px; }
.validation-kit small { color: var(--muted); }
.validation-components { grid-column: 1 / -1; margin-top: 14px; padding: 14px; border: 1px solid var(--blue-border); border-radius: 8px; background: var(--blue-soft); }
.validation-components.hidden { display: none; }
.validation-components .validation-section-title { margin-top: 0; }
.validation-component-row { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); align-items: end; gap: 10px; margin-bottom: 9px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.validation-component-row > .field:first-child { grid-column: span 2; }
.validation-component-row > .field:nth-child(8) { grid-column: span 2; }
.validation-component-row input:not(.stepper-input) { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.empty.compact { padding: 10px 0; }
.validation-note textarea { width: 100%; resize: vertical; }
.validation-actions { display: grid; grid-template-columns: auto auto auto auto 1fr auto; align-items: center; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.validation-actions kbd { margin-left: 4px; padding: 2px 5px; border-radius: 4px; color: inherit; background: rgb(255 255 255 / 18%); font: 10px Consolas, monospace; }

/* Thumbnails --------------------------------------------------------------*/
.thumb { width: 40px; height: 40px; padding: 3px; border-radius: 7px; border: 1px solid var(--border); object-fit: contain; object-position: 50% 50%; background: var(--surface-2); display: block; }
.thumb.lg { width: 46px; height: 46px; }
.thumb-ph { width: 40px; height: 40px; border-radius: 7px; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 800; }
.thumb-ph.lg { width: 46px; height: 46px; }
.thumb-ph svg { width: 17px; height: 17px; }

/* Tables ------------------------------------------------------------------*/
.table-frame { overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
/* drag-to-resize column handles (widths persist in localStorage) */
.data-table.data-table { /* keep specificity for fixed layout set inline */ }
.col-resizer { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 3; user-select: none; }
.col-resizer::after { content: ""; position: absolute; top: 6px; bottom: 6px; right: 4px; width: 2px; border-radius: 2px; background: transparent; }
.col-resizer:hover::after { background: var(--blue-border); }
body.col-resizing { cursor: col-resize !important; user-select: none; }
body.col-resizing * { cursor: col-resize !important; }
/* with fixed layout active, keep cell content from spilling into neighbours */
.data-table[style*="fixed"] td { overflow: hidden; }
.data-table[style*="fixed"] td.notes, .data-table[style*="fixed"] td .loc-primary { text-overflow: ellipsis; }
.data-table { width: 100%; min-width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { position: sticky; top: 0; height: 38px; padding: 8px 13px; text-align: left; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.sort-button { width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: inherit; }
.sort-button i { margin-left: auto; color: var(--muted); font-size: 12px; font-style: normal; opacity: .48; }
.sort-button:hover, .sort-button.active { color: var(--blue); }
.sort-button:hover i, .sort-button.active i { color: var(--blue); opacity: 1; }
.data-table th.num .sort-button { justify-content: flex-end; }
.data-table th.num .sort-button i { margin-left: 2px; }
.data-table td { height: 44px; padding: 9px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--hover); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .mono { font-family: Consolas, monospace; font-weight: 700; }
.data-table .path { color: var(--muted); white-space: nowrap; }
.data-table .muted { color: var(--muted); }
.data-table .notes { color: var(--muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table td.thumb-cell { width: 60px; }
/* SKU cell: sized to fit ~90% of ids; the long tail truncates with an ellipsis */
.data-table td.sku-cell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sku-cell .link { display: inline; }
/* Location cell */
.data-table td.loc-cell { white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 600; }
.loc-cell .loc-primary { color: var(--text); }
.loc-cell .loc-more { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); cursor: help; }
.stock-data-table { min-width: 100%; }
.stock-data-table .stock-on-hand { vertical-align: middle; }
.stock-data-table .sku-with-thumb { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; }
.stock-data-table .sku-with-thumb .thumb,
.stock-data-table .sku-with-thumb .thumb-ph { width: 34px; height: 34px; }
.stock-data-table .sku-with-thumb .link { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stock-data-table .sku-with-thumb > span { min-width: 0; display: grid; justify-items: start; gap: 5px; }
.validation-stock-badge { display: inline-flex; align-items: center; gap: 4px; width: max-content; max-width: 100%; white-space: normal; line-height: 1.1; font-family: var(--font-ui); }
.validation-stock-badge svg { width: 12px; height: 12px; flex: 0 0 auto; }
.pending-validation-row { background: color-mix(in srgb, var(--amber) 6%, transparent); }
.validation-stock-note { margin: 0 0 14px; }
.mobile-stock-identity .validation-stock-badge,.shelf-item .validation-stock-badge { margin-top: 5px; }
.stock-data-table td.loc-cell { min-width: 0; white-space: normal; line-height: 1.35; }
.stock-data-table .loc-summary { min-width: 0; display: flex; align-items: center; gap: 5px; }
.stock-data-table .loc-primary { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.data-table.stock-data-table[style*="fixed"] td .loc-primary { overflow: visible; text-overflow: clip; white-space: normal; }
.stock-data-table .loc-more { flex: 0 0 auto; margin-left: 0; }
.stock-data-table .stock-details-cell { min-width: 0; max-width: none; vertical-align: top; }
.stock-detail-chips { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.stock-detail-chips .stock-detail-chip { width: auto; max-width: 100%; display: inline-flex; align-items: baseline; }
.stock-detail-chips .stock-detail-chip.compact { flex: 0 1 auto; }
.stock-detail-chips .stock-detail-chip.compact .detail-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-detail-chips .stock-detail-chip.long { flex: 1 0 100%; width: 100%; display: grid; }
.stock-detail-chips .stock-detail-chip.long .detail-value { -webkit-line-clamp: 2; }
.stock-detail-chips .detail-more { flex: 0 0 auto; padding: 3px 1px; }
.activity-row-click { cursor: pointer; }
.activity-row-click:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.activity-data-table .activity-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-data-table .activity-reference { color: var(--muted); line-height: 1.35; }
.activity-data-table .activity-reference-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.activity-data-table th, .activity-data-table td { padding-left: 8px; padding-right: 8px; }
.reference-link { color: var(--blue); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.reference-link:hover, .reference-link:focus-visible { color: var(--blue-dark); }
.activity-data-table .row-action { text-align: center; }
.mobile-stock-list, .mobile-activity-list { display: grid; gap: 9px; padding: 9px; }
.mobile-stock-card { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(82px, max-content) minmax(0, 1fr); gap: 8px 11px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); text-align: left; box-shadow: var(--shadow); }
.mobile-stock-card:active, .mobile-stock-card:focus-visible { border-color: var(--blue); background: var(--blue-soft); outline: none; }
.mobile-stock-quantity { grid-row: 1 / span 2; display: grid; align-content: center; justify-items: center; min-width: 0; padding: 8px 4px; border-right: 1px solid var(--border); }
.mobile-stock-quantity strong { max-width: 100%; font-size: clamp(16px, 5vw, 19px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mobile-stock-quantity.low strong { color: var(--red-text); }
.mobile-stock-quantity small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.mobile-stock-identity { min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 9px; }
.mobile-stock-identity .thumb, .mobile-stock-identity .thumb-ph { width: 36px; height: 36px; }
.mobile-stock-identity > span { min-width: 0; display: grid; gap: 2px; }
.mobile-stock-identity strong { overflow: hidden; color: var(--blue-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-stock-identity small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-stock-meta { min-width: 0; display: flex; align-items: center; gap: 7px; }
.mobile-stock-location { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mobile-stock-locked { grid-column: 2; color: var(--blue-text); font-size: 9px; font-weight: 750; }
.mobile-activity-card { min-width: 0; display: grid; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); box-shadow: var(--shadow); }
.mobile-activity-card:focus-visible { border-color: var(--blue); outline: none; }
.mobile-activity-top, .mobile-activity-item, .mobile-activity-foot { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mobile-activity-top > span { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mobile-activity-top > strong { flex: 0 0 auto; font-size: 17px; font-variant-numeric: tabular-nums; }
.mobile-activity-item .product-preview-link { min-width: 0; font-size: 13px; }
.mobile-activity-item time { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.mobile-activity-location { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.mobile-activity-location svg { flex: 0 0 auto; width: 14px; height: 14px; }
.mobile-activity-location span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-activity-reference { padding: 8px 9px; overflow-wrap: anywhere; border-radius: 6px; color: var(--muted); background: var(--surface-2); font-size: 10px; line-height: 1.35; }
.mobile-activity-foot { padding-top: 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.mobile-activity-foot .mini-btn { min-height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; }
.change-pos { color: var(--green); font-weight: 800; }
.change-neg { color: var(--red); font-weight: 800; }
.row-click { cursor: pointer; }
.row-click:hover .link { color: var(--blue-dark); }
.product-preview-link { max-width: 100%; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.product-preview-link:hover, .product-preview-link:focus-visible { color: var(--blue-dark); text-decoration: underline; }
.link { color: var(--blue); font-weight: 700; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Filter bar --------------------------------------------------------------*/
.filter-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 15px; padding: 12px 14px; }
.filter-card .grow { flex: 1; min-width: 180px; }
.filter-card .combo { min-width: 170px; }
.stock-filter-controls,.stock-search-row { display: contents; }
.phone-stock-filter-toggle { display: none; }
.search-field { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.search-field svg { color: var(--muted); width: 16px; }
.search-field input { flex: 1; height: 34px; border: 0; padding: 0; outline: none; background: transparent; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.check-option { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; padding: 0 6px; }
input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; min-height: 0; accent-color: var(--blue); }

/* Muted, slim scrollbars instead of the default chunky white ones ----------*/
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--card); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
.result-count { color: var(--muted); font-size: 12px; font-weight: 700; padding: 0 6px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--neutral-bg); border-radius: 8px; }
.seg button { min-height: 30px; padding: 5px 14px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; }
.seg button.active { color: var(--blue); background: var(--card); border-color: var(--blue-border); box-shadow: var(--shadow); }

/* Location tree -----------------------------------------------------------*/
.location-plan-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.location-plan-toolbar > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.location-plan-toolbar .seg { padding: 3px; }
.location-plan-toolbar .seg button { min-width: 104px; }
.location-map-section { display: grid; grid-template-columns: minmax(620px, 1.55fr) minmax(300px, .75fr); gap: 14px; margin-bottom: 16px; align-items: start; }
.office-map-card { padding: 14px; }
.office-map-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 11px; }
.office-map-title > div:first-child { display: grid; gap: 3px; }
.office-map-title strong { font-size: 16px; }
.office-map-title span { color: var(--muted); font-size: 11px; }
.map-legend { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.map-legend i:nth-of-type(2) { margin-left: 7px; background: var(--green); }
.map-legend i:only-of-type { margin-left: 0; background: var(--green); }
.office-map { position: relative; width: 100%; aspect-ratio: 1000 / 1295; overflow: hidden; border: 0; border-radius: 4px; background: #fff; color: #172033; }
.office-map-reference { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.office-map-reference-dark { display: none; }
.office-map-logo { position: absolute; left: 7.2%; top: 2.9%; width: 19.8%; height: 3.5%; object-fit: contain; pointer-events: none; z-index: 2; }
:root[data-theme="dark"] .office-map { background: #0f1722; color: #e7edf6; }
:root[data-theme="dark"] .office-map-reference-light { display: none; }
:root[data-theme="dark"] .office-map-reference-dark { display: block; }
:root[data-theme="dark"] .office-map-logo { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
:root[data-theme="vaporwave"] .office-map {
  background: #071923;
  color: #e1fbff;
  border: 1px solid rgb(63 220 245 / 58%);
  box-shadow: inset 0 0 0 1px rgb(63 220 245 / 12%), 0 0 24px rgb(19 187 216 / 14%);
}
:root[data-theme="vaporwave"] .office-map-reference-light { display: none; }
:root[data-theme="vaporwave"] .office-map-reference-dark { display: block; }
:root[data-theme="vaporwave"] .office-map-logo { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
:root[data-theme="vaporwave"] .office-map-card,
:root[data-theme="vaporwave"] .map-location-detail { border-color: rgb(63 220 245 / 32%); background: rgb(4 25 34 / 88%); }
:root[data-theme="vaporwave"] .office-map-title strong,
:root[data-theme="vaporwave"] .map-detail-head h2 { color: #e1fbff; }
:root[data-theme="vaporwave"] .office-map-title span,
:root[data-theme="vaporwave"] .map-location-detail > p { color: #9bc8d1; }
.office-map-slot { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%); z-index: 3; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0; border: 2px solid transparent; border-radius: 999px; background: transparent; color: transparent; font-size: clamp(9px, 1.05vw, 15px); font-weight: 900; }
.office-map-slot.zone-a { color: #ff3b3b; }.office-map-slot.zone-b { color: #14a8e8; }.office-map-slot.zone-c { color: #ffd449; }.office-map-slot.zone-d { color: #78d447; }.office-map-slot.zone-e { color: #f357bd; }.office-map-slot.zone-f { color: #ff7d24; }.office-map-slot.zone-g { color: #8851ed; }
.office-map-slot.zone-w { color: #ff7d24; }
.office-map-slot span { opacity: 0; }
.office-map-slot.has-data { box-shadow: none; }
.office-map-slot.has-data:not(.has-issues)::before { content: ""; position: absolute; right: -2px; top: -3px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.office-map-slot.has-issues { box-shadow: none; }
.office-map-slot.selected { border-color: #fff8bd; outline: 4px solid #ffd84d; background: rgb(255 216 77 / 30%); transform: scale(1.08); z-index: 6; animation: selected-map-rack-pulse 1.45s ease-in-out infinite; }
.office-map-slot.map-circle-slot.selected { border-color: transparent; outline: 0; background: transparent; transform: none; animation: none; }
.office-map-slot.map-circle-slot.selected::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(100% + 4px); aspect-ratio: 1; border: 4px solid #ffd84d; border-radius: 50%; background: rgb(255 216 77 / 30%); box-shadow: inset 0 0 0 2px #fff8bd, 0 0 18px rgb(255 216 77 / 78%); transform: translate(-50%, -50%); animation: selected-map-rack-circle-pulse 1.45s ease-in-out infinite; pointer-events: none; }
@keyframes selected-map-rack-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 216 77 / 58%), 0 0 18px rgb(255 216 77 / 58%); } 50% { box-shadow: 0 0 0 10px rgb(255 216 77 / 0%), 0 0 30px rgb(255 216 77 / 92%); } }
@keyframes selected-map-rack-circle-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: inset 0 0 0 2px #fff8bd, 0 0 16px rgb(255 216 77 / 72%); } 50% { transform: translate(-50%, -50%) scale(1.16); box-shadow: inset 0 0 0 2px #fff8bd, 0 0 30px rgb(255 216 77); } }
.office-map-slot b { position: absolute; right: -4px; top: -5px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; color: #111; background: var(--amber); box-shadow: 0 1px 4px rgba(0,0,0,.45); font-size: 9px; }
.office-map-slot.map-circle-slot b { z-index: 1; }
.office-map-placeholder { min-height: 520px; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 42px; border: 1px dashed var(--border-strong); border-radius: 7px; background: linear-gradient(145deg, var(--surface-2), var(--card)); text-align: center; }
.office-map-placeholder .placeholder-building { width: 68px; height: 68px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); border-radius: 17px; }
.office-map-placeholder .placeholder-building svg { width: 34px; height: 34px; }
.office-map-placeholder h3 { margin: 5px 0 0; font-size: 20px; }
.office-map-placeholder p { max-width: 500px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.placeholder-stats { display: flex; gap: 9px; margin-top: 10px; }
.placeholder-stats span { min-width: 105px; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.placeholder-stats b { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.machine { position: absolute; z-index: 1; display: grid; place-items: center; background: #c3c7cc; color: #20242a; border-radius: 3px; font-size: 9px; text-align: center; }
.m-paste{left:55%;top:20%;width:17%;height:4%}.m-inspect{left:58%;top:27%;width:11%;height:3%}.m-place{left:55%;top:33%;width:20%;height:5%}.m-oven{left:56%;top:42%;width:18%;height:13%}.m-table1{left:61%;top:59%;width:7%;height:10%;writing-mode:vertical-rl}.m-table2{left:61%;top:70%;width:7%;height:10%;writing-mode:vertical-rl}
.room { position: absolute; z-index: 1; display: grid; place-items: center; border: 2px solid #111; background: rgba(255,255,255,.72); font-size: 10px; text-align: center; }
.r-computer{left:25%;top:81%;width:18%;height:11%}.r-air{left:25%;top:92%;width:18%;height:7%}
.map-exit { position: absolute; z-index: 1; color: #ff3030; font-weight: 900; }.exit-left{left:7%;top:33%}.exit-bottom{left:61%;top:92%}
.shipping { position: absolute; right: 2%; bottom: 2%; height: 13%; padding: 6px; border-radius: 18px; background: #c3c7cc; writing-mode: vertical-rl; font-size: 10px; }
.map-location-detail { position: sticky; top: 14px; align-self: start; height: fit-content; min-height: 420px; padding: 16px; }
.map-detail-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.map-detail-head > div { display: grid; gap: 2px; }.map-detail-head span:first-child { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }.map-detail-head h2 { margin: 0; font-size: 27px; }
.map-location-detail > p { color: var(--muted); font-size: 12px; line-height: 1.4; }
.map-confidence { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 700; }
.map-confidence.confirmed { color: var(--green-text); background: var(--green-soft); border-color: var(--green-border); }
.map-confidence.estimated { color: var(--amber-text); background: var(--amber-soft); border-color: var(--amber-border); }
.map-unplaced-note { display: grid; gap: 4px; margin-top: 12px; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.map-unplaced-note strong { color: var(--text); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.map-issue-list { display: grid; gap: 6px; max-height: 620px; overflow: auto; }
.map-issue-list > button { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); text-align: left; }
.map-issue-list > button:hover { border-color: var(--blue); background: var(--blue-soft); }.map-issue-list > button > span:first-child { min-width: 0; display: grid; gap: 2px; }.map-issue-list strong,.map-issue-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.map-issue-list small { color: var(--muted); }
.map-reference-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px dashed var(--blue-border); border-radius: 7px; background: var(--blue-soft); }
.map-reference-row > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.map-reference-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); border: 1px solid var(--blue-border); border-radius: 7px; background: var(--card); }
.map-reference-icon svg { width: 16px; height: 16px; }
.location-reference-symbol { width: 38px; height: 38px; border-style: dashed; border-radius: 10px; background: linear-gradient(145deg, var(--blue-soft), var(--card)); }
.location-reference-symbol svg { width: 21px; height: 21px; }
.location-reference-directory { display: grid; gap: 14px; padding: 17px; }
.location-reference-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.location-reference-head > div { display: grid; gap: 4px; }
.location-reference-head > div > span { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.location-reference-head h2 { margin: 0; font-size: 20px; }
.location-reference-head p { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.location-reference-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(310px,1fr)); gap: 8px; }
.location-reference-entry { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.location-reference-entry > div { min-width: 0; display: grid; gap: 3px; }
.location-reference-entry strong,.location-reference-entry p,.location-reference-entry small { overflow-wrap: anywhere; }
.location-reference-entry p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.location-reference-entry small { color: var(--blue); font-size: 10px; font-weight: 750; }
.loc-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.loc-toolbar .result-count { margin-left: auto; }
.location-manager { display: grid; gap: 10px; margin-top: 4px; }
.loc-manager-toolbar { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.loc-manager-heading { min-width: 0; display: grid; gap: 2px; margin-right: 5px; }
.loc-manager-heading > span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.loc-manager-heading > strong { color: var(--text); font-size: 16px; line-height: 1.15; }
.loc-manager-toolbar .result-count { margin-left: auto; }
.tree-structure-tools { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 8px; }
.button.danger-text { color: var(--red-text); }
.button.danger-text:hover { color: #fff; background: var(--red); border-color: var(--red); }
.tree-office > .tree-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tree-office .office-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 8px; }
.tree-office .tree-head strong { font-size: 16px; }
.tree-head .loc-actions { margin-left: auto; }
.tree-head .count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; }
/* racks laid out in short multi-column tiles, not one long column */
.rack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 4px; align-items: start; }
.tree-rack { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.tree-rack > summary { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; list-style: none; background: var(--surface-2); }
.tree-rack > summary::-webkit-details-marker { display: none; }
.tree-rack > summary .chev { color: var(--muted); transition: transform .15s ease; display: grid; }
.tree-rack[open] > summary .chev { transform: rotate(90deg); }
.tree-rack > summary .count { margin-left: auto; }
.tree-rack > summary .rack-actions { display: inline-flex; gap: 4px; }
.shelf-tools { padding: 8px 14px 2px 34px; }
.shelf-name-list { display: grid; }
.shelf-block { border-top: 1px solid var(--border); }
.shelf-head { display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 34px; color: var(--muted); font-weight: 700; font-size: 12px; background: var(--card); }
.shelf-head .sh-actions { display: inline-flex; gap: 4px; }
.shelf-head .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.rack-level-label { padding: 8px 14px 3px 40px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--border); }
/* Location name chips (more prominent than the action buttons) */
.loc-chip { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 7px; font-weight: 800; letter-spacing: .01em; border: 1px solid var(--blue-border); background: var(--blue-soft); color: var(--blue); }
.loc-chip.office-chip { font-size: 15px; padding: 5px 13px; }
.loc-chip.rack-chip { font-size: 13px; }
.loc-chip.shelf-chip { font-size: 12px; color: var(--text); background: var(--neutral-bg); border-color: var(--neutral-border); }
.inline-rename { display: inline-flex; align-items: center; gap: 5px; }
.inline-rename input { height: 30px; border: 1px solid var(--blue); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 0 9px; font-weight: 700; outline: none; }
.mini-btn.mini-icon:not(.danger):hover { color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); }
.shelf-items { display: grid; gap: 1px; padding: 2px 14px 8px 40px; }
.shelf-item { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; }
.shelf-item:last-child { border-bottom: 0; }
.shelf-item:hover .mono { color: var(--blue); }
.shelf-item > span:nth-child(2) { min-width: 0; display: grid; gap: 1px; }
.shelf-item .mono { font-family: Consolas, monospace; font-weight: 700; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-item small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-item .q { font-weight: 800; font-variant-numeric: tabular-nums; }
.shelf-item .q small { display: block; text-align: right; font-weight: 600; }
.shelf-item .mini { width: 26px; height: 26px; padding: 2px; border-radius: 5px; object-fit: contain; object-position: 50% 50%; border: 1px solid var(--border); background: var(--surface-2); }
.shelf-item .mini-ph { width: 26px; height: 26px; border-radius: 5px; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); }
.shelf-item .mini-ph svg { width: 13px; height: 13px; }
.shelf-empty { padding: 10px 14px 12px 40px; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .loc-manager-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .loc-manager-heading { width: 100%; }
  .loc-manager-toolbar .result-count { margin-left: 0; }
}

/* Record form -------------------------------------------------------------*/
.form-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 17px; align-items: start; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .02em; margin-bottom: 14px; }
.field.tight { margin-bottom: 0; }
.field > span { text-transform: uppercase; }
.field input:not([type="checkbox"]):not(.combo-input):not(.stepper-input), .field textarea { width: 100%; min-height: 38px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 8px 11px; outline: none; font-size: 13px; font-weight: 500; letter-spacing: normal; }
.field textarea { resize: vertical; min-height: 68px; }
.field input:not(.combo-input):not(.stepper-input):focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.preview-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); margin-bottom: 10px; }
.preview-line span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.preview-line strong { font-size: 14px; }
.info-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 4px; padding: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; line-height: 1.45; font-size: 12px; }
.info-note svg { flex: 0 0 auto; color: var(--blue); width: 17px; }
.info-note.danger { color: var(--red-text); background: var(--red-soft); border-color: var(--red-border); }
.info-note.danger svg { color: var(--red); }
.kit-change-list { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.kit-change-list .mono { font-family: Consolas, monospace; font-weight: 700; }
.kit-mode-choices { display: grid; gap: 10px; }
.kit-mode { text-align: left; display: grid; gap: 5px; padding: 13px 14px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--field-bg); color: var(--text); }
.kit-mode:hover { border-color: var(--blue); background: var(--blue-soft); }
.kit-mode .km-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.kit-mode .km-title svg { width: 17px; height: 17px; color: var(--blue); }
.kit-mode .km-desc { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.button.danger-btn { color: #fff; background: var(--red); border-color: var(--red); }
.button.danger-btn:hover { background: var(--red-text); border-color: var(--red-text); }
.button.danger-btn:disabled { opacity: .5; }
.new-flag { color: var(--blue); font-weight: 700; font-size: 11px; text-transform: none; }

/* Complete database save states ------------------------------------------*/
.backups-page { max-width: 1120px; }
.backup-create-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .7fr); gap: 24px; align-items: center; }
.backup-create-copy { min-width: 0; display: flex; align-items: flex-start; gap: 14px; }
.backup-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); }
.backup-icon svg { width: 21px; height: 21px; }
.backup-create-copy h2 { margin: 1px 0 5px; font-size: 17px; }
.backup-create-copy p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.backup-create-actions { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.backup-create-actions .button { white-space: nowrap; }
.backup-action-buttons { display: flex; gap: 8px; }
.backup-scope-note { display: flex; align-items: center; gap: 8px; margin: 11px 2px 16px; color: var(--muted); font-size: 11px; }
.backup-scope-note svg { width: 15px; height: 15px; color: var(--blue); }
.backup-list-card { overflow: hidden; }
.backup-list-card .panel-title { display: flex; align-items: center; gap: 9px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.backup-list-card .panel-title h2 { margin: 0; font-size: 16px; }
.backup-list { display: grid; }
.backup-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-top: 1px solid var(--border); }
.backup-row:first-child { border-top: 0; }
.backup-row-main { min-width: 0; display: grid; gap: 7px; }
.backup-row-heading { min-width: 0; display: flex; align-items: center; gap: 8px; }
.backup-row-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.backup-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 11px; }
.backup-meta span { display: inline-flex; align-items: center; gap: 5px; }
.backup-meta svg { width: 13px; height: 13px; }
.backup-id { max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.backup-row-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.backup-list .empty-state { padding: 42px 18px; }
.backup-restore-selection { display: grid; gap: 5px; margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.backup-restore-selection span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.backup-restore-selection code { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.backup-restore-card .err-detail { margin-top: 12px; }

@media (max-width: 780px) {
  .backup-create-card { grid-template-columns: 1fr; }
  .backup-create-actions { grid-template-columns: 1fr; }
  .backup-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .backup-row { align-items: flex-start; flex-direction: column; }
  .backup-row-actions { width: 100%; }
  .backup-row-actions .button { flex: 1; }
}

/* Edit drawer -------------------------------------------------------------*/
.drawer-overlay { position: fixed; inset: 0; z-index: 40; background: rgb(15 23 42 / 42%); display: flex; justify-content: flex-end; animation: fade-in .15s ease; }
.drawer-overlay.center { align-items: center; justify-content: center; }
.modal-card { width: min(560px, 94vw); max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; animation: fade-in .18s ease; }
.modal-card.wide { width: min(680px, 94vw); }
.modal-body { padding: 18px; overflow: auto; }
.collection-movement-card .modal-body { overflow-x: hidden; }
.collection-location-grid,
.collection-location-grid > *,
.collection-location-grid .field,
.collection-location-grid .combo,
.collection-location-grid .combo-control { min-width: 0; max-width: 100%; }
.profile-password-card { width: min(560px, 94vw); }
.profile-identity { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.profile-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); }
.profile-avatar svg { width: 21px; height: 21px; }
.profile-identity-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.profile-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity span { color: var(--muted); font-size: 12px; }
.profile-identity-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.profile-password-toggle.active { color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); }
.profile-sign-out { flex: 0 0 auto; }
.profile-password-section { padding-top: 2px; }
.profile-password-section[hidden], .profile-password-actions[hidden] { display: none; }
.profile-preferences { display: grid; gap: 13px; margin: 0 0 18px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.profile-preferences-heading { display: grid; gap: 3px; }
.profile-preferences-heading strong { font-size: 15px; }
.profile-preferences-heading span { color: var(--muted); font-size: 12px; }
.profile-preferences-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-choice-group { min-width: 0; display: grid; gap: 6px; }
.profile-choice-group > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.profile-choice-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-choice-buttons button { min-width: 0; padding-inline: 8px; }
.profile-password-heading { display: grid; gap: 3px; margin-bottom: 14px; }
.profile-password-heading strong { font-size: 15px; }
.profile-password-heading span, .profile-password-help { color: var(--muted); font-size: 12px; line-height: 1.4; }
.profile-password-help { margin: 9px 0 0; }
.profile-password-error { margin-top: 12px; padding: 9px 11px; color: var(--red-text); background: var(--red-soft); border: 1px solid var(--red-border); border-radius: 7px; font-size: 12px; font-weight: 700; }
.profile-training-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px; border: 1px solid var(--blue-border); border-radius: 9px; background: var(--blue-soft); }
.profile-training-copy { min-width: 0; display: grid; gap: 3px; }
.profile-training-copy strong { font-size: 15px; }
.profile-training-copy span { color: var(--muted); font-size: 12px; }
.profile-training-switch { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--blue-border); }
@media (max-width: 460px) {
  .profile-identity { align-items: stretch; flex-wrap: wrap; }
  .profile-identity-copy { align-self: center; }
  .profile-identity-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .profile-identity-actions .button { min-width: 0; justify-content: center; }
  .profile-preferences-grid, .profile-choice-row { grid-template-columns: 1fr; }
}
.recovery-card { width: min(940px, 96vw); }
.recovery-body { padding: 16px; }
.recovery-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 14px; align-items: start; }
.recovery-section { min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.recovery-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.recovery-section-head h3 { margin: 0 0 3px; font-size: 15px; }
.recovery-section-head p { max-width: 560px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.reset-request-list { display: grid; gap: 8px; }
.reset-request-card { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.reset-request-person { min-width: 0; display: grid; gap: 2px; }
.reset-request-person strong, .reset-request-person span, .reset-request-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reset-request-person span { color: var(--muted); font-size: 11px; }
.reset-request-person small { color: var(--muted); font-size: 10px; }
.reset-request-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.generated-link { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--blue-border); border-radius: 8px; background: var(--blue-soft); }
.generated-link textarea { width: 100%; min-height: 98px; resize: vertical; padding: 10px; border: 1px solid var(--border-strong); border-radius: 7px; color: var(--text); background: var(--field-bg); font-size: 12px; line-height: 1.45; }
.generated-link small, .recovery-empty { color: var(--muted); font-size: 11px; }
.recovery-empty { padding: 20px 12px; border: 1px dashed var(--border-strong); border-radius: 8px; text-align: center; }
.temporary-password-section form { display: grid; }
.recovery-submit { width: 100%; margin-top: 14px; }
.user-security-state { color: var(--muted); font-size: 12px; }
.approval-actions { white-space: nowrap; }
@keyframes fade-in { from { opacity: 0; } }
.drawer { width: min(480px, 94vw); height: 100%; min-height: 0; background: var(--bg); box-shadow: -10px 0 34px rgb(0 0 0 / 30%); display: flex; flex-direction: column; animation: slide-in .2s ease; }
.drawer.product-drawer { width: min(760px, calc(100vw - 24px)); max-width: 100%; max-height: 100dvh; }
.product-overview { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 14px; align-items: stretch; }
.product-media { min-width: 0; display: grid; gap: 9px; align-content: start; }
.product-drawer .product-overview .photo-frame { height: clamp(230px, 36dvh, 380px); aspect-ratio: auto; }
.product-priority { min-width: 0; display: grid; gap: 10px; align-content: start; }
.product-summary-card,
.product-detail-card,
.product-datasheet-overview,
.product-content-overview,
.product-inventory-overview,
.product-activity-overview { min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.product-overview-title,
.product-secondary-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--text); font-size: 11px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.product-overview-title small,
.product-secondary-heading small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.product-overview-description { margin: 9px 0 11px; color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.product-identity-list,
.product-detail-list { margin: 0; display: grid; }
.product-identity-list > div,
.product-detail-list > div { min-width: 0; display: grid; grid-template-columns: minmax(105px, .82fr) minmax(0, 1.18fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.product-identity-list dt,
.product-detail-list dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.product-identity-list dd,
.product-detail-list dd { min-width: 0; margin: 0; color: var(--text); font-size: 12px; font-weight: 720; overflow-wrap: anywhere; }
.product-detail-list { max-height: clamp(145px, 24dvh, 265px); overflow: auto; scrollbar-width: thin; }
.product-detail-empty { padding: 14px; border: 1px dashed var(--border-strong); border-radius: 7px; color: var(--muted); font-size: 12px; text-align: center; }
.product-facts-card { align-self: stretch; }
.product-facts-card .product-overview-description { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.product-content-overview,
.product-datasheet-overview,
.product-inventory-overview,
.product-activity-overview { display: grid; gap: 11px; }
.product-datasheet-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.product-datasheet-row { min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--blue-border); border-radius: 8px; background: linear-gradient(145deg, var(--blue-soft), var(--surface-2)); color: var(--text); text-align: left; }
.product-datasheet-row:hover { border-color: var(--blue); background: var(--blue-soft); }
.product-datasheet-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--blue-text); background: var(--card); border: 1px solid var(--blue-border); }
.product-datasheet-icon svg { width: 18px; height: 18px; }
.product-datasheet-copy { min-width: 0; display: grid; gap: 3px; }
.product-datasheet-copy strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-datasheet-copy small { color: var(--muted); font-size: 9px; font-weight: 700; }
.product-datasheet-action { display: inline-flex; align-items: center; gap: 2px; color: var(--blue-text); font-size: 10px; font-weight: 800; }
.product-datasheet-action svg { width: 13px; height: 13px; }
.datasheet-viewer-overlay { z-index: 88; padding: 18px; background: rgb(3 10 20 / 78%); backdrop-filter: blur(3px); }
.datasheet-viewer-card { width: min(1120px, 98vw); height: min(94dvh, 920px); min-height: 560px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--blue-border); border-radius: 13px; background: var(--bg); box-shadow: var(--shadow-lg); }
.datasheet-viewer-head { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--border); background: var(--card); }
.datasheet-viewer-brand { display: flex; align-items: center; gap: 8px; padding-right: 15px; border-right: 1px solid var(--border); }
.datasheet-viewer-brand img { width: 34px; height: 34px; }
.datasheet-viewer-brand span { display: grid; }
.datasheet-viewer-brand strong { font-size: 12px; letter-spacing: .02em; }
.datasheet-viewer-brand small { color: var(--blue-text); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.datasheet-viewer-title { min-width: 0; display: grid; gap: 3px; }
.datasheet-viewer-title strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.datasheet-viewer-title span { color: var(--muted); font-size: 10px; }
.datasheet-viewer-head .closer { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 7px; color: var(--muted); background: var(--neutral-bg); }
.datasheet-viewer-head .closer svg { width: 18px; height: 18px; }
.datasheet-viewer-body { min-height: 0; padding: 10px; background: #20252d; }
.datasheet-viewer-body iframe { width: 100%; height: 100%; display: block; border: 0; border-radius: 7px; background: #fff; }
.datasheet-viewer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; border-top: 1px solid var(--border); background: var(--card); }
.datasheet-viewer-foot > span { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.datasheet-viewer-foot svg { width: 15px; height: 15px; }
.product-secondary-heading > div { min-width: 0; display: grid; gap: 3px; }
.product-content-list { display: grid; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.product-content-row { min-width: 0; display: grid; grid-template-columns: 34px minmax(145px, .9fr) minmax(165px, 1.1fr) 72px; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; }
.product-content-row:last-child { border-bottom: 0; }
.product-content-row:hover { background: var(--blue-soft); }
.product-content-main { min-width: 0; display: grid; gap: 2px; }
.product-content-main strong,
.product-content-main small,
.product-content-main em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-content-main strong { font-size: 12px; }
.product-content-main small { color: var(--muted); font-size: 10px; }
.product-content-main em { color: var(--blue-text); font-size: 9px; font-style: normal; }
.product-content-specs { min-width: 0; display: flex; flex-wrap: wrap; gap: 3px; }
.product-content-specs i { max-width: 100%; padding: 2px 5px; border: 1px solid var(--blue-border); border-radius: 999px; color: var(--blue-text); background: var(--blue-soft); font-size: 9px; font-style: normal; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-content-quantity { display: grid; justify-items: end; gap: 1px; }
.product-content-quantity strong { font-size: 16px; }
.product-content-quantity small { color: var(--muted); font-size: 9px; text-align: right; }
.product-inventory-overview .stat-inline { padding: 9px 11px; gap: 18px; }
.product-inventory-overview .stat-inline strong { font-size: 16px; }
.product-activity-list { display: grid; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.product-activity-row { display: grid; grid-template-columns: 112px auto 44px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.product-activity-row:last-child { border-bottom: 0; }
.product-activity-when { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.product-activity-row > strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.product-activity-row > strong.positive { color: var(--green-text); }
.product-activity-row > strong.negative { color: var(--red-text); }
.product-activity-path { min-width: 0; overflow: hidden; color: var(--text); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.product-activity-row > small { grid-column: 4; min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-editor { border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; background: var(--card); }
.product-editor > summary { display: grid; grid-template-columns: 20px minmax(0, 1fr) 18px; align-items: center; gap: 9px; padding: 12px 14px; color: var(--text); cursor: pointer; list-style: none; }
.product-editor > summary::-webkit-details-marker { display: none; }
.product-editor > summary:hover { background: var(--surface-2); }
.product-editor > summary > svg:first-child { color: var(--blue); }
.product-editor > summary > svg { width: 17px; height: 17px; }
.product-editor > summary > svg:last-child { color: var(--muted); transition: transform .16s ease; }
.product-editor[open] > summary > svg:last-child { transform: rotate(180deg); }
.product-editor > summary span { min-width: 0; display: grid; gap: 2px; }
.product-editor > summary strong { font-size: 13px; }
.product-editor > summary small { color: var(--muted); font-size: 10px; font-weight: 600; }
.product-editor-body { padding: 0 14px 14px; border-top: 1px solid var(--border); }
.product-drawer.read-only .drawer-head .badge { display: inline-flex; margin-top: 7px; }
.product-drawer.read-only .product-summary-card,
.product-drawer.read-only .product-detail-card,
.product-drawer.read-only .product-datasheet-overview,
.product-drawer.read-only .product-content-overview,
.product-drawer.read-only .product-inventory-overview,
.product-drawer.read-only .product-activity-overview { padding: 0; border: 0; background: transparent; }
.product-drawer.read-only .product-priority { gap: 13px; }
.product-drawer.read-only .product-overview-description { margin: 8px 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.product-drawer.read-only .product-identity-list,
.product-drawer.read-only .product-detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.product-drawer.read-only .product-identity-list > div,
.product-drawer.read-only .product-detail-list > div { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.product-drawer.read-only .product-identity-list dt,
.product-drawer.read-only .product-detail-list dt { color: var(--blue-text); }
.product-drawer.read-only .product-identity-list dd,
.product-drawer.read-only .product-detail-list dd { font-size: 13px; line-height: 1.35; }
.product-drawer.read-only .product-detail-list { margin-top: 8px; max-height: clamp(150px, 25dvh, 275px); padding-right: 2px; }
.product-drawer.read-only .product-content-list { margin-top: 1px; }
.product-drawer.read-only .product-content-row { background: var(--card); }
.product-drawer.read-only .product-content-row:hover { background: var(--surface-2); }
.product-drawer.read-only .product-inventory-overview { gap: 9px; }
.product-drawer.read-only .product-inventory-overview .stat-inline { padding: 0; border: 0; background: transparent; gap: 8px; }
.product-drawer.read-only .product-inventory-overview .stat-inline > div { flex: 1 1 120px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.product-drawer.read-only .product-inventory-overview > .field { padding: 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.product-drawer.read-only .product-inventory-overview > .field > span { color: var(--blue-text); }
.product-drawer.read-only .product-inventory-overview #dWhere { margin-top: 8px; }
.product-drawer.read-only .where-list { border-color: var(--border-strong); }
.product-drawer.read-only .where-row { background: var(--card); }
.product-drawer.read-only .combo.disabled { opacity: 1; }
.product-drawer.read-only .combo.disabled .combo-control,
.product-drawer.read-only input:disabled,
.product-drawer.read-only textarea:disabled,
.product-drawer.read-only select:disabled { opacity: 1; color: var(--text); background: var(--surface-2); cursor: default; -webkit-text-fill-color: var(--text); }
.product-drawer.read-only input[type="checkbox"]:disabled { opacity: .75; }
@keyframes slide-in { from { transform: translateX(24px); opacity: .4; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--card); border-bottom: 1px solid var(--border); }
.drawer-head > div { min-width: 0; }
.drawer-head h2 { margin: 0; font-size: 17px; }
.product-drawer .drawer-head h2 { overflow-wrap: anywhere; }
.drawer-head .mono { font-family: Consolas, monospace; color: var(--muted); font-size: 12px; }
.drawer-head .product-spec-summary { display: block; margin-top: 3px; color: var(--blue-text); font-size: 11px; font-weight: 750; }
.drawer-head .closer { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 7px; background: var(--neutral-bg); color: var(--muted); display: grid; place-items: center; }
.drawer-head .closer:hover { background: var(--border); }
.drawer-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.drawer-head-actions .closer { margin-left: 0; }
.product-copy-link { min-height: 34px; white-space: nowrap; }

/* Read-only activity document preview + paper output ----------------------*/
.activity-preview-card { width: min(880px, 96vw); max-height: 95vh; }
.activity-preview-body { padding: 20px; background: var(--surface-2); }
.activity-print-document { width: 100%; min-height: 900px; padding: 34px 38px; color: #172033; background: #fff; border: 1px solid #d8dee8; box-shadow: 0 4px 18px rgb(15 23 42 / 10%); font-family: "Segoe UI", Arial, sans-serif; }
.activity-print-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid #172033; }
.activity-print-brand { display: flex; flex: 1 1 auto; min-width: 0; min-height: 48px; align-items: center; gap: 18px; }
.activity-print-brand > div { min-width: 0; }
.activity-print-brand img { flex: 0 0 auto; width: 130px; height: auto; aspect-ratio: 500 / 74; object-fit: contain; object-position: left center; }
.activity-print-brand span, .activity-print-number span { display: block; color: #667085; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.activity-print-brand h1 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.activity-print-number { flex: 0 0 32%; min-width: 100px; max-width: 32%; text-align: right; }
.activity-print-number strong { display: block; margin-top: 3px; color: #007cab; font-size: 18px; overflow-wrap: anywhere; }
.activity-print-summary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; margin: 22px 0; padding: 16px 18px; border-left: 5px solid #0199d8; background: #e9f7fc; }
.activity-print-summary > span { grid-row: 1 / 3; padding: 5px 9px; color: #1746a2; background: #dbe8ff; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.activity-print-summary strong { font-size: 19px; }
.activity-print-summary small { color: #526173; }
.activity-print-section { margin-top: 22px; }
.activity-print-section > h2 { margin: 0 0 10px; padding-bottom: 6px; color: #344054; border-bottom: 1px solid #d8dee8; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.activity-print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 24px; margin: 0; }
.activity-print-grid > div { min-width: 0; }
.activity-print-grid > div.wide { grid-column: 1 / -1; }
.activity-print-grid dt { margin-bottom: 3px; color: #667085; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.activity-print-grid dd { margin: 0; color: #172033; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.activity-print-grid dd.mono { font-family: Consolas, "Courier New", monospace; }
.activity-print-reference p { min-height: 60px; margin: 0; padding: 12px 14px; border: 1px solid #d8dee8; background: #fafbfc; white-space: pre-wrap; line-height: 1.5; }
.activity-print-allocations table { width: 100%; border-collapse: collapse; font-size: 12px; }
.activity-print-allocations th { padding: 7px 9px; color: #667085; background: #f2f4f7; border: 1px solid #d8dee8; font-size: 9px; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.activity-print-allocations th:last-child, .activity-print-allocations td:last-child { width: 32%; text-align: right; }
.activity-print-allocations td { padding: 8px 9px; color: #172033; border: 1px solid #d8dee8; font-weight: 650; }
.activity-print-components table { width: 100%; border-collapse: collapse; font-size: 11px; }
.activity-print-components th, .activity-print-components td { padding: 7px 8px; border: 1px solid #d8dee8; text-align: left; vertical-align: top; }
.activity-print-components th { color: #667085; background: #f2f4f7; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.activity-print-components th:last-child, .activity-print-components td:last-child { width: 12%; text-align: right; }
.activity-print-access { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 11px 14px; border: 1px solid #d8dee8; background: #fafbfc; }
.activity-print-access h2 { margin: 0 0 4px; color: #344054; font-size: 12px; text-transform: uppercase; }
.activity-print-access p { margin: 0; color: #344054; font-size: 11px; }
.activity-print-access small { display: block; max-width: 590px; margin-top: 4px; color: #667085; font-size: 7px; overflow-wrap: anywhere; }
.activity-print-access img { flex: 0 0 auto; width: 78px; height: 78px; image-rendering: crisp-edges; }
.activity-print-signoff { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; margin-top: 54px; }
.activity-print-signoff > div { height: 34px; border-top: 1px solid #667085; }
.activity-print-signoff span { display: block; padding-top: 5px; color: #667085; font-size: 10px; font-weight: 700; }
.activity-print-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 10px; color: #667085; border-top: 1px solid #d8dee8; font-size: 9px; }
.activity-preview-btn { white-space: nowrap; }
.activity-print-column { width: 112px; min-width: 112px; text-align: center !important; }
.activity-data-table .activity-print-column { right: 0; z-index: 4; box-shadow: -1px 0 0 var(--border); }
.activity-data-table .row-action { position: sticky; right: 0; z-index: 2; width: 112px; min-width: 112px; padding-left: 5px; padding-right: 5px; background: var(--card); box-shadow: -1px 0 0 var(--border); }
.activity-data-table tbody tr:hover .row-action { background: var(--hover); }
.activity-print-link { min-width: 88px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 8px; color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); font-size: 10px; font-weight: 850; white-space: nowrap; }
.activity-print-link:hover { color: #fff; border-color: var(--primary-fill); background: var(--primary-fill); }
.activity-print-link svg { width: 14px; height: 14px; }
.product-print-link { white-space: nowrap; }
.product-print-document .activity-print-footer { margin-top: auto; }
.product-print-identity-layout.has-photo { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: stretch; gap: 22px; margin-top: 22px; }
.product-print-identity-layout.has-photo .activity-print-section { margin-top: 0; }
.product-print-photo { min-width: 0; min-height: 190px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; margin: 0; padding: 12px; border: 1px solid #d8dee8; background: #fafbfc; break-inside: avoid; page-break-inside: avoid; }
.product-print-photo img { width: 100%; height: 160px; object-fit: contain; object-position: center; }
.product-print-photo figcaption { color: #667085; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.product-label-document h1 { font-size: 9.5pt; }
.product-label-document .activity-label-change { font-size: 6.8pt; }
.activity-format-switch { display: flex; align-items: center; gap: 5px; margin-right: auto; }
.activity-format-switch .active { color: var(--blue-text); border-color: var(--blue); background: var(--blue-bg); }
.activity-label-document { display: none; box-sizing: border-box; width: 3in; height: 2in; padding: .12in; color: #172033; background: #fff; font-family: "Segoe UI", Arial, sans-serif; }
.activity-label-document header { display: flex; min-height: .22in; align-items: center; justify-content: space-between; gap: .08in; padding-bottom: .055in; border-bottom: 1.5px solid #172033; }
.activity-label-document header img { flex: 0 0 auto; width: .62in; height: auto; aspect-ratio: 500 / 74; object-fit: contain; object-position: left center; }
.activity-label-document header div { min-width: 0; text-align: right; }
.activity-label-document header span { display: block; color: #667085; font-size: 5.5pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.activity-label-document header strong { display: block; max-width: 1.85in; color: #007cab; font-size: 7pt; line-height: 1.05; overflow-wrap: anywhere; }
.activity-label-document main { display: grid; grid-template-columns: minmax(0, 1fr) .74in; gap: .09in; padding-top: .07in; }
.activity-label-document main > section { min-width: 0; }
.activity-label-type { display: inline-block; padding: .025in .055in; color: #1746a2; background: #dbe8ff; border-radius: 999px; font-size: 5.5pt; font-weight: 800; text-transform: uppercase; }
.activity-label-document h1 { margin: .035in 0 0; font: 800 11pt/1 Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.activity-label-change { display: block; margin-top: .025in; font-size: 7.5pt; }
.activity-label-document dl { display: grid; grid-template-columns: 1fr 1fr; gap: .025in .08in; margin: .05in 0 0; }
.activity-label-document dl div { min-width: 0; }
.activity-label-document dl .wide { grid-column: 1 / -1; }
.activity-label-document dt { color: #667085; font-size: 5pt; font-weight: 800; text-transform: uppercase; }
.activity-label-document dd { margin: 0; font-size: 6.2pt; font-weight: 650; line-height: 1.08; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-label-components { margin-top: .04in; padding-top: .035in; border-top: 1px solid #d8dee8; }
.activity-label-components span { display: block; color: #667085; font-size: 5pt; font-weight: 800; text-transform: uppercase; }
.activity-label-components strong { display: -webkit-box; margin-top: .012in; font: 600 5.5pt/1.12 Consolas, "Courier New", monospace; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.activity-label-document aside { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; border-left: 1px solid #d8dee8; }
.activity-label-document aside img { width: .68in; height: .68in; }
.activity-label-document aside strong { margin-top: .025in; font-size: 5.5pt; line-height: 1.05; text-align: center; }
.activity-preview-card.label-mode { width: min(590px, 96vw); }
.activity-preview-card.label-mode .activity-print-document { display: none; }
.activity-preview-card.label-mode .activity-label-document { display: grid; margin: 20px auto; box-shadow: 0 4px 18px rgb(15 23 42 / 18%); }
.data-table td.row-action { width: 1%; white-space: nowrap; }

@media print {
  /*
   * Give the browser a complete physical Letter page.  Using a printable-area
   * percentage here made Chrome scale the modal a second time in the native
   * print dialog.  The document now owns its margins, so preview and paper use
   * the same geometry regardless of the printer's default margin setting.
   */
  @page { size: 8.5in 11in; margin: 0; }
  html, body {
    width: 8.5in !important;
    min-width: 0 !important;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: #fff !important;
  }
  .studio-app, body > .drawer-overlay:not(.activity-preview-overlay), body > .toast,
  .activity-preview-head, .activity-preview-actions { display: none !important; }
  .activity-preview-overlay {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 8.5in !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    animation: none !important;
    transform: none !important;
    background: #fff !important;
  }
  .activity-preview-card {
    display: block !important;
    width: 8.5in !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none;
    margin: 0 !important;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none !important;
    transform: none !important;
    background: #fff;
  }
  .activity-preview-body {
    width: 8.5in !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0;
    overflow: visible;
    background: #fff;
  }
  .activity-print-document {
    display: flex;
    flex-direction: column;
    width: 8.5in !important;
    min-width: 0 !important;
    min-height: 11in;
    margin: 0 !important;
    padding: .46in .52in .42in !important;
    overflow: hidden;
    border: 0;
    box-shadow: none;
    font-size: 9.5pt;
    line-height: 1.3;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .activity-print-header { gap: .28in; padding: 0 0 .17in; }
  .activity-print-brand { min-width: 0; min-height: .44in; flex: 1 1 auto; gap: .16in; }
  .activity-print-brand img { flex: 0 0 auto; width: 1.22in; height: auto; }
  .activity-print-brand span, .activity-print-number span { font-size: 7.5pt; }
  .activity-print-brand h1 { margin-top: .035in; font-size: 16.5pt; line-height: 1.08; }
  .activity-print-number {
    flex: 0 0 32%;
    min-width: 1.25in;
    max-width: 32%;
  }
  .activity-print-number strong {
    font-size: 13.5pt;
    line-height: 1.08;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .activity-print-summary {
    gap: .04in .16in; margin: .18in 0 .03in; padding: .14in .17in;
    border-left-width: 5px;
  }
  .activity-print-summary > span { padding: .045in .09in; font-size: 7.5pt; }
  .activity-print-summary strong { font-size: 14pt; }
  .activity-print-summary small { font-size: 8.5pt; }
  .activity-print-section { margin-top: .18in; break-inside: avoid; page-break-inside: avoid; }
  .activity-print-section > h2 { margin-bottom: .085in; padding-bottom: .05in; font-size: 9pt; }
  .activity-print-grid { gap: .1in .3in; }
  .activity-print-grid dt { margin-bottom: .025in; font-size: 7.5pt; }
  .activity-print-grid dd { font-size: 9.5pt; line-height: 1.25; }
  .activity-print-reference p { min-height: .58in; padding: .11in .14in; font-size: 9.5pt; }
  .activity-print-allocations table { font-size: 9pt; }
  .activity-print-allocations th { padding: .06in .09in; font-size: 7.25pt; }
  .activity-print-allocations td { padding: .065in .09in; }
  .activity-print-components table { font-size: 8.5pt; }
  .activity-print-components th { padding: .055in .07in; font-size: 7pt; }
  .activity-print-components td { padding: .06in .07in; }
  .activity-print-access { gap: .16in; margin-top: .16in; padding: .08in .12in; break-inside: avoid; page-break-inside: avoid; }
  .activity-print-access h2 { font-size: 8.5pt; }
  .activity-print-access p { font-size: 8pt; }
  .activity-print-access small { max-width: 5.7in; font-size: 5.5pt; }
  .activity-print-access img { width: .7in; height: .7in; }
  .activity-print-signoff {
    gap: .48in; margin-top: auto; padding-top: .58in;
    break-inside: avoid; page-break-inside: avoid;
  }
  .activity-print-signoff > div { height: .36in; }
  .activity-print-signoff span { padding-top: .05in; font-size: 7.5pt; }
  .activity-print-footer { margin-top: .15in; padding-top: .08in; font-size: 7pt; }
  .activity-print-footer > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .activity-print-footer > span:last-child { text-align: right; }
  .product-print-identity-layout.has-photo { grid-template-columns: 1.5in minmax(0, 1fr); gap: .22in; margin-top: .18in; break-inside: avoid; page-break-inside: avoid; }
  .product-print-photo { min-height: 1.5in; padding: .08in; }
  .product-print-photo img { height: 1.25in; }
  .product-print-photo figcaption { font-size: 6pt; }

  /* EMSYS operational reports may span more than one page. */
  .activity-preview-body.report-preview-body { padding: 0; }
  .report-page-stack { display: block !important; }
  .report-print-document.report-print-page {
    display: flex !important;
    min-height: 11in;
    height: 11in;
    padding: .42in .46in !important;
    overflow: hidden !important;
    font-size: 8.5pt;
    break-after: page;
    page-break-after: always;
  }
  .report-print-document.report-print-page:last-child { break-after: auto; page-break-after: auto; }
  .report-page-content { flex: 1 1 0; min-height: 0; overflow: hidden !important; }
  .report-print-document .activity-print-header { break-inside: avoid; page-break-inside: avoid; }
  .report-print-scope { gap: .07in .22in; margin: .14in 0; padding: .09in .12in; break-inside: avoid; page-break-inside: avoid; }
  .report-print-scope span { font-size: 6.75pt; }
  .report-print-scope strong { font-size: 8.25pt; }
  .report-print-metrics { gap: .07in; margin: .12in 0; break-inside: avoid; page-break-inside: avoid; }
  .report-print-metrics > div { padding: .08in .09in; border-top-width: 3px; }
  .report-print-metrics span { font-size: 6.25pt; }
  .report-print-metrics strong { margin-top: .02in; font-size: 11.5pt; }
  .report-print-metrics small { font-size: 6.25pt; }
  .report-print-insight { margin: .1in 0; padding: .08in .1in; font-size: 7.5pt; break-inside: avoid; page-break-inside: avoid; }
  .report-print-filters { gap: .06in; margin: 0 0 .1in; break-inside: avoid; page-break-inside: avoid; }
  .report-print-filters > div { padding: .055in .07in; }
  .report-print-filters span { font-size: 5.8pt; }
  .report-print-filters strong { font-size: 7pt; }
  .report-continuation { margin: .1in 0 .07in; padding-bottom: .05in; }
  .report-print-table { overflow: visible; }
  .report-print-table table { font-size: 7.25pt; }
  .report-print-table thead { display: table-header-group; }
  .report-print-table tr { break-inside: avoid; page-break-inside: avoid; }
  .report-print-table th { padding: .05in .06in; font-size: 5.9pt; }
  .report-print-table td { padding: .05in .06in; }
  .report-print-truncation { font-size: 6.5pt; }
  .report-print-footer { flex: 0 0 auto; margin-top: .08in; padding-top: .06in; font-size: 6.5pt; break-inside: avoid; page-break-inside: avoid; }
  .report-print-document .restock-report-groups { gap: .14in; }
  .report-print-document .restock-report-priority { overflow: visible; border-color: #d8dee8; border-radius: 0; background: #fff; break-inside: auto; page-break-inside: auto; }
  .report-print-document .restock-report-priority.urgent { border-top-color: #d92d20; }
  .report-print-document .restock-report-priority.soon { border-top-color: #dc8b12; }
  .report-print-document .restock-report-priority-head { padding: .08in .1in; border-bottom-color: #d8dee8; background: #f8fafc; break-inside: avoid; page-break-inside: avoid; }
  .report-print-document .restock-report-priority-head h3 { color: #172033; font-size: 9pt; }
  .report-print-document .restock-report-priority-head > strong,
  .report-print-document .restock-report-category-head > span { height: .2in; min-width: .2in; color: #526173; background: #e8ecf2; font-size: 6.5pt; }
  .report-print-document .restock-report-category { margin: .09in .1in; overflow: visible; border-color: #d8dee8; border-radius: 0; background: #fff; break-inside: auto; page-break-inside: auto; }
  .report-print-document .restock-report-category-head { padding: .06in .08in; border-bottom-color: #d8dee8; background: #f2f4f7; break-inside: avoid; page-break-inside: avoid; }
  .report-print-document .restock-report-category-head h4 { color: #087aa8; font-size: 7pt; }
  .report-print-document .restock-report-table tbody { break-inside: auto; page-break-inside: auto; }
  .report-print-document .restock-report-table td strong.mono { color: #087aa8; font-size: 7.25pt; }
  .report-print-document .restock-report-table td small { color: #667085; font-size: 6.25pt; }
  .report-print-document .restock-report-empty { color: #667085; }
}

/* The compact activity label must not inherit the Letter-sized print canvas. */
@media print {
  html.activity-label-print,
  html.activity-label-print body {
    width: 3in !important;
    height: 2in !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html.activity-label-print .activity-preview-overlay {
    position: static !important;
    display: block !important;
    width: 3in !important;
    height: 2in !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  html.activity-label-print .activity-preview-card {
    display: block !important;
    width: 3in !important;
    height: 2in !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html.activity-label-print .activity-preview-body {
    display: block !important;
    width: 3in !important;
    height: 2in !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html.activity-label-print .activity-print-document { display: none !important; }
  html.activity-label-print .activity-label-document {
    display: grid !important;
    width: 3in !important;
    height: 2in !important;
    margin: 0 !important;
    padding: .12in !important;
    overflow: hidden !important;
    box-shadow: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
.drawer-body { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; padding: 18px; display: grid; align-content: start; grid-auto-rows: max-content; gap: 14px; overscroll-behavior: contain; }
.product-drawer .drawer-body { overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.product-drawer .drawer-body > *,
.product-drawer .row-2 > *,
.product-drawer .row-3 > *,
.product-drawer .field,
.product-drawer .combo,
.product-drawer .name-row,
.product-drawer .spec-panel { min-width: 0; max-width: 100%; }
.photo-frame { position: relative; width: 100%; aspect-ratio: 1.13 / 1; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--card); display: grid; place-items: center; }
.product-drawer .photo-frame { height: clamp(300px, 48vh, 500px); aspect-ratio: auto; }
.photo-frame > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: clamp(16px, 5%, 36px); object-fit: contain; object-position: 50% 50%; }
.photo-frame embed, .photo-frame iframe { width: 100%; height: 100%; border: 0; }
.photo-frame .ph { display: grid; place-items: center; gap: 8px; color: var(--muted); }
.photo-frame .ph svg { width: 40px; height: 40px; }
.photo-frame.dropzone { cursor: pointer; }
.photo-frame.dropzone .drop-hint { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px; font-size: 12px; font-weight: 600; color: #fff; background: rgb(15 23 42 / 55%); opacity: 0; transition: opacity .14s ease; }
.photo-frame.dropzone .drop-hint svg { width: 15px; height: 15px; }
.photo-frame.dropzone:hover .drop-hint { opacity: 1; }
.photo-frame.dropzone.drag { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.photo-frame.dropzone.drag .drop-hint { opacity: 1; background: var(--primary-fill); }
.photo-tools { display: flex; gap: 10px; }
.photo-tools .button { flex: 1; }
.product-photo-viewer.has-photo { cursor: zoom-in; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.product-photo-viewer.has-photo:hover { border-color: var(--blue); background: var(--surface-2); box-shadow: 0 0 0 3px var(--focus-ring); }
.product-photo-viewer.has-photo:focus-visible { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }

/* Product photography ----------------------------------------------------*/
.product-image-overlay,
.product-photo-editor-overlay { z-index: 70; padding: clamp(10px, 2vw, 24px); background: rgb(5 12 22 / 82%); backdrop-filter: blur(7px); }
.product-image-lightbox { width: min(1180px, 96vw); max-height: calc(100dvh - 28px); display: grid; grid-template-rows: auto minmax(220px, 1fr) auto; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg); box-shadow: 0 24px 80px rgb(0 0 0 / 52%); }
.product-image-lightbox-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px 13px 20px; border-bottom: 1px solid var(--border); background: var(--card); }
.product-image-lightbox-head > div { min-width: 0; display: grid; gap: 2px; }
.product-image-lightbox-head > div:first-child { flex: 1 1 auto; }
.product-image-lightbox-head .product-image-lightbox-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
@media (max-width: 560px) {
  .product-image-lightbox-head { flex-wrap: wrap; gap: 10px; }
  .product-image-lightbox-head > div:first-child { flex-basis: 100%; }
  .product-image-lightbox-head .product-image-lightbox-actions { margin-left: auto; }
}
.product-image-lightbox-head .closer { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface-2); }
.product-image-lightbox-head .closer:hover { color: var(--text); border-color: var(--border-strong); background: var(--neutral-bg); }
.product-image-lightbox-head .closer svg { width: 18px; height: 18px; }
.product-image-lightbox-head .eyebrow { color: var(--blue-text); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.product-image-lightbox-head h2 { min-width: 0; margin: 0; overflow: hidden; color: var(--text); font-family: var(--mono); font-size: clamp(17px, 2vw, 23px); text-overflow: ellipsis; white-space: nowrap; }
.product-image-lightbox-head p { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-image-lightbox-stage { min-height: 0; display: grid; place-items: center; padding: clamp(14px, 3vw, 34px); overflow: hidden; background: radial-gradient(circle at 50% 45%, var(--surface-2), var(--bg) 68%); }
.product-image-lightbox-stage img { display: block; width: 100%; height: 100%; max-height: 68dvh; object-fit: contain; object-position: 50% 50%; }
.product-image-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border-strong); background: var(--card); }
.product-image-facts > div { min-width: 0; display: grid; align-content: center; gap: 3px; padding: 12px 16px; border-right: 1px solid var(--border); }
.product-image-facts > div:last-child { border-right: 0; }
.product-image-facts span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.product-image-facts strong { min-width: 0; overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.product-photo-editor-overlay { z-index: 75; }
.product-photo-editor-card { width: min(900px, 96vw); max-height: calc(100dvh - 28px); }
.product-photo-editor-body { min-height: 0; display: grid; grid-template-columns: minmax(280px, 1.18fr) minmax(260px, .82fr); grid-template-rows: minmax(270px, 1fr) auto; gap: 14px; padding: 16px; overflow: auto; }
.product-photo-preview { min-width: 0; min-height: 300px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: radial-gradient(circle at 50% 45%, var(--surface-2), var(--card) 70%); }
.product-photo-preview img,
.product-photo-preview embed { display: block; width: 100%; height: 100%; max-height: 58dvh; padding: clamp(12px, 3%, 24px); border: 0; object-fit: contain; object-position: 50% 50%; }
.product-photo-preview embed { padding: 0; }
.product-photo-preview .ph { display: grid; place-items: center; gap: 8px; color: var(--muted); }
.product-photo-preview .ph svg { width: 46px; height: 46px; }
.product-photo-selection { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-content: center; gap: 9px 11px; padding: 18px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--text); outline: 0; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.product-photo-selection:focus-visible,
.product-photo-selection.drag { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px var(--focus-ring); }
.product-photo-selection-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--blue-border); border-radius: 9px; color: var(--blue-text); background: var(--blue-soft); }
.product-photo-selection-icon svg { width: 21px; height: 21px; }
.product-photo-selection > div:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.product-photo-selection strong { font-size: 14px; }
.product-photo-selection span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.product-photo-selection .button { grid-column: 1 / -1; margin-top: 8px; justify-content: center; }
.product-photo-pending { grid-column: 1 / -1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--card); font-size: 11px; }
.product-photo-pending .status-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.product-photo-pending.ready { color: var(--text); border-color: var(--blue-border); background: var(--blue-soft); }
.product-photo-pending.ready .status-dot { background: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.product-photo-pending strong { font-weight: 800; }
.product-photo-editor-card .button.primary.busy { opacity: .72; cursor: wait; }

/* Required photo + secure phone-camera handoff --------------------------- */
.required-photo-card { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: stretch; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(135deg, var(--surface-2), var(--card)); }
.required-photo-preview { min-height: 104px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: radial-gradient(circle at 50% 45%, var(--surface-2), var(--card) 72%); }
.required-photo-preview img { display: block; width: 100%; height: 104px; padding: 8px; object-fit: contain; }
.required-photo-placeholder { display: grid; place-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.required-photo-placeholder svg { width: 26px; height: 26px; color: var(--blue-text); }
.required-photo-copy { position: relative; min-width: 0; display: grid; align-content: center; gap: 7px; }
.required-photo-title { display: flex; align-items: center; gap: 8px; font-weight: 850; }
.required-chip { padding: 3px 7px; border: 1px solid var(--blue-border); border-radius: 999px; color: var(--blue-text); background: var(--blue-soft); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.required-photo-copy > p { margin: 0; color: var(--muted); font-size: 11px; }
.required-photo-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.required-photo-actions .button { min-width: 116px; justify-content: center; }
.required-photo-actions .phone-photo-button { border-color: var(--blue-border); color: var(--blue-text); background: var(--blue-soft); }
.required-photo-status { display: flex; align-items: center; gap: 7px; min-height: 18px; color: var(--muted); font-size: 10px; font-weight: 700; }
.required-photo-status.ready { color: var(--green-text); }
.required-photo-status.ready .status-dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.required-photo-status.connected { color: var(--blue-text); }
.required-photo-status.working .status-dot { background: var(--blue); animation: photo-status-pulse 1s ease-in-out infinite; }
.required-photo-status.error { color: var(--red-text); }
.required-photo-status.error .status-dot { background: var(--red); }
@keyframes photo-status-pulse { 50% { opacity: .35; transform: scale(.72); } }
.phone-photo-bubble { position: absolute; z-index: 24; right: 0; bottom: calc(100% + 12px); width: 238px; display: grid; justify-items: center; gap: 7px; padding: 16px; overflow: hidden; border: 1px solid var(--blue-border); border-radius: 15px; color: var(--text); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 20px 52px rgb(0 0 0 / 32%), 0 0 0 1px rgb(255 255 255 / 3%); backdrop-filter: blur(18px); transform-origin: 80% 100%; animation: phone-bubble-in .18s ease-out; }
.phone-photo-bubble[hidden] { display: none; }
.phone-photo-bubble::after { content: ""; position: absolute; right: 34px; bottom: -7px; width: 13px; height: 13px; border-right: 1px solid var(--blue-border); border-bottom: 1px solid var(--blue-border); background: var(--card); transform: rotate(45deg); }
.phone-photo-bubble-glow { position: absolute; inset: -45% 5% auto; height: 120px; border-radius: 50%; background: var(--blue); opacity: .12; filter: blur(30px); pointer-events: none; }
.phone-photo-bubble .eyebrow { color: var(--blue-text); font-size: 9px; letter-spacing: .1em; }
.phone-photo-bubble > strong { font-size: 13px; }
.phone-photo-bubble > small { color: var(--muted); font-size: 9px; }
.phone-photo-bubble-close { position: absolute; z-index: 2; top: 8px; right: 8px; width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.phone-photo-bubble-close:hover { color: var(--text); background: var(--surface-2); }
.phone-photo-bubble-close svg { width: 14px; height: 14px; }
.phone-photo-qr { width: 150px; height: 150px; display: grid; place-items: center; padding: 9px; border-radius: 11px; background: #fff; box-shadow: 0 8px 26px rgb(0 0 0 / 22%); }
.phone-photo-qr img { display: block; width: 100%; height: 100%; }
@keyframes phone-bubble-in { from { opacity: 0; transform: translateY(6px) scale(.96); } }

.phone-capture-shell { min-height: calc(100dvh - 92px); display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 12%, var(--blue-soft), transparent 40%); }
.phone-capture-card { width: min(100%, 430px); display: grid; justify-items: stretch; gap: 11px; padding: 18px; border: 1px solid var(--border); border-radius: 20px; background: color-mix(in srgb, var(--card) 96%, transparent); box-shadow: 0 22px 70px rgb(0 0 0 / 28%); }
.phone-capture-card .eyebrow { justify-self: center; color: var(--blue-text); font-size: 9px; letter-spacing: .12em; }
.phone-capture-card h1 { margin: 0; text-align: center; font-size: clamp(24px, 7vw, 31px); }
.phone-capture-card > p { margin: -4px auto 2px; max-width: 310px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.5; }
.phone-capture-mark { justify-self: center; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--blue-border); border-radius: 15px; color: var(--blue-text); background: var(--blue-soft); box-shadow: 0 0 32px color-mix(in srgb, var(--blue) 20%, transparent); }
.phone-capture-mark svg { width: 25px; height: 25px; }
.phone-capture-preview { position: relative; min-height: min(44dvh, 390px); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: radial-gradient(circle at 50% 45%, var(--surface-2), var(--card)); }
.phone-capture-preview > div { display: grid; justify-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 750; }
.phone-capture-preview > div svg { width: 38px; height: 38px; color: var(--blue-text); }
.phone-capture-preview img { display: block; width: 100%; height: min(44dvh, 390px); padding: 10px; object-fit: contain; }
.phone-capture-preview.complete { border-color: color-mix(in srgb, var(--green) 60%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent); }
.phone-capture-main, .phone-capture-send { width: 100%; min-height: 48px; justify-content: center; }
.phone-capture-library { width: 100%; justify-content: center; }
.phone-capture-status { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 24px; color: var(--muted); font-size: 10px; font-weight: 700; }
.phone-capture-status.complete { color: var(--green-text); }
.phone-capture-status.complete .status-dot { background: var(--green); }
@media (max-width: 760px) {
  .required-photo-card { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .required-photo-preview, .required-photo-preview img { min-height: 86px; height: 86px; }
  .required-photo-actions .button { flex: 1 1 112px; min-width: 0; }
  .phone-photo-bubble { position: fixed; inset: auto 12px 88px; width: auto; max-width: 330px; margin-inline: auto; }
  .phone-photo-bubble::after { display: none; }
  .phone-capture-shell { min-height: calc(100dvh - 68px); padding: 8px; }
  .phone-capture-card { padding: 14px; border-radius: 17px; }
}
.drawer-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; background: var(--card); border-top: 1px solid var(--border); }
.stat-inline { display: flex; flex-wrap: wrap; gap: 22px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.stat-inline > div { display: grid; gap: 2px; }
.stat-inline span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.stat-inline strong { font-size: 18px; }

/* DB error screen ---------------------------------------------------------*/
.db-error { max-width: 640px; margin: 6vh auto; }
.db-error .card { padding: 30px 32px; }
.db-error .big-icon { width: 60px; height: 60px; display: grid; place-items: center; color: var(--red-text); background: var(--red-soft); border: 1px solid var(--red-border); border-radius: 14px; margin-bottom: 18px; }
.db-error .big-icon svg { width: 30px; height: 30px; }
.db-error h1 { margin: 0 0 8px; font-size: 23px; }
.db-error p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.db-error .target { display: grid; gap: 6px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 18px; font-size: 13px; }
.db-error .target code { font-family: Consolas, monospace; color: var(--text); }
.db-error .target .k { color: var(--muted); }
.db-error ol { margin: 0 0 20px; padding-left: 20px; color: var(--text); line-height: 1.7; }
.db-error ol code { font-family: Consolas, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
.db-error .err-detail { font-family: Consolas, monospace; font-size: 12px; color: var(--red-text); background: var(--red-soft); border: 1px solid var(--red-border); border-radius: 7px; padding: 11px 13px; margin-bottom: 18px; word-break: break-word; }

/* Dashboard: record card + 70/30 split ------------------------------------*/
.record-card { margin-bottom: 17px; }
.record-activity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.record-activity-head .card-title { align-self: center; margin: 0; padding: 0; border: 0; }
.record-activity-tools { display: grid; gap: 6px; }
.record-activity-tools > span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.record-activity-tools .button-row { display: grid; grid-template-columns: repeat(2, minmax(190px, auto)); gap: 10px; }
.record-activity-tools .button { justify-content: center; min-height: 42px; }
.record-grid { display: grid; grid-template-columns: minmax(320px, 1.7fr) minmax(230px, 1fr) minmax(125px, .45fr); gap: 13px; }
.record-grid.locs { grid-template-columns: 1fr 1fr 1fr; }
.record-foot { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.record-foot .pv { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-foot .pv b { color: var(--text); }
.record-foot .pv .delta.pos { color: var(--green); font-weight: 800; }
.record-foot .pv .delta.neg { color: var(--red); font-weight: 800; }
.record-foot .allocation-warning { color: var(--amber-text); font-weight: 750; }
.record-recovery { margin-top: 14px; padding: 14px; border: 1px solid var(--amber-border); border-radius: 9px; background: var(--amber-soft); color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.record-recovery p { margin: 0 0 10px; line-height: 1.5; }
.record-recovery p:last-child { margin-bottom: 0; }
.record-recovery ul { padding-left: 20px; margin: 0 0 12px; }
.record-recovery .button { margin: 0 8px 8px 0; white-space: normal; }
.source-allocation { margin-top: 13px; padding: 14px; border: 1px solid var(--blue-border); border-radius: 9px; background: var(--surface-2); }
.source-allocation-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.source-allocation-head h3 { margin: 0 0 3px; font-size: 14px; }
.source-allocation-head p { margin: 0; color: var(--muted); font-size: 11.5px; }
.allocation-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.allocation-status { padding: 5px 9px; color: var(--amber-text); background: var(--amber-soft); border: 1px solid var(--amber-border); border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.allocation-status.complete { color: var(--green-text); background: var(--green-soft); border-color: var(--green-border); }
.allocation-list { max-height: 260px; overflow: auto; }
.allocation-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 110px; align-items: center; gap: 12px; min-height: 52px; padding: 7px 3px; border-bottom: 1px solid var(--border); }
.allocation-row:last-child { border-bottom: 0; }
.allocation-check { width: 20px; height: 20px; display: grid; place-items: center; color: transparent; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--field-bg); }
.allocation-check.selected { color: #fff; border-color: var(--primary-fill); background: var(--primary-fill); }
.allocation-check svg { width: 14px; height: 14px; stroke-width: 2.5; }
.allocation-path { min-width: 0; display: grid; gap: 2px; }
.allocation-path strong { overflow: hidden; color: var(--text); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.allocation-path small { color: var(--muted); font-size: 10.5px; }
.allocation-row .number-stepper { width: 110px; justify-self: end; }
.allocation-footer { display: flex; gap: 9px; padding-top: 10px; border-top: 1px solid var(--border); }
.allocation-empty { padding: 22px; color: var(--muted); text-align: center; font-size: 12px; }
@media (max-width: 820px) {
  .source-allocation-head { align-items: flex-start; flex-direction: column; }
  .allocation-actions { width: 100%; justify-content: space-between; }
}
.qty-wrap { display: flex; gap: 10px; align-items: center; }
.number-stepper { display: grid; grid-template-columns: 27px minmax(42px, 1fr) 27px; width: 96px; max-width: 100%; height: 38px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); }
.number-stepper button { display: grid; place-items: center; border: 0; background: var(--surface-2); color: var(--muted); font-size: 15px; font-weight: 800; }
.number-stepper button:first-child { border-right: 1px solid var(--border); }
.number-stepper button:last-child { border-left: 1px solid var(--border); }
.number-stepper button:hover { color: var(--blue); background: var(--blue-soft); }
.number-stepper:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.number-stepper input { width: 100%; min-width: 0; height: 36px; padding: 0 4px; border: 0; outline: 0; background: transparent; color: var(--text); text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.number-stepper:has(input:disabled) { opacity: .55; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.version-entry { padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.version-switch { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.version-switch > input { position: absolute; opacity: 0; pointer-events: none; }
.version-switch > span:last-child { display: grid; gap: 2px; }
.version-switch strong { color: var(--text); font-size: 13px; }
.version-switch small { color: var(--muted); font-size: 11px; }
.switch-track { position: relative; flex: 0 0 auto; width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); transition: .16s ease; }
.switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 32%); transition: .16s ease; }
.version-switch > input:checked + .switch-track { background: var(--blue); }
.version-switch > input:checked + .switch-track::after { transform: translateX(16px); }
.version-switch > input:focus-visible + .switch-track { outline: 3px solid var(--blue-soft); }
.version-fields { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
.version-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.version-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid var(--blue-border); border-radius: 999px; color: var(--text); background: var(--blue-soft); font-size: 11px; white-space: nowrap; }
.version-chip b { color: var(--blue); font-size: 9px; letter-spacing: .04em; }

.dash-2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr); gap: 17px; align-items: start; }
.restock-col { display: grid; align-content: start; gap: 17px; min-height: 0; }
.restock-group { min-height: 0; }
.restock-col.is-constrained { align-content: stretch; }
.restock-col.is-constrained .restock-group { display: flex; flex-direction: column; overflow: hidden; }
.restock-col.is-constrained .restock-list { flex: 1; min-height: 0; overflow: auto; }
.restock-group .rg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 800; font-size: 13px; }
.restock-group .rg-head .tag { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.rg-urgent .rg-head { color: var(--red-text); }
.rg-urgent .rg-head .tag { background: var(--red-soft); border: 1px solid var(--red-border); color: var(--red-text); }
.rg-soon .rg-head { color: var(--amber-text); }
.rg-soon .rg-head .tag { background: var(--amber-soft); border: 1px solid var(--amber-border); color: var(--amber-text); }
.restock-list { display: grid; gap: 1px; max-height: none; overflow: visible; }
.restock-item { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 2px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.restock-item:last-child { border-bottom: 0; }
.restock-item:hover { background: var(--hover); }
.restock-item .mono { font-family: Consolas, monospace; font-weight: 700; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.restock-item .sub { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.restock-item .q { font-weight: 800; font-variant-numeric: tabular-nums; }
.restock-item.u .q { color: var(--red); }
.restock-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.mini2 { width: 28px; height: 28px; padding: 2px; border-radius: 6px; object-fit: contain; object-position: 50% 50%; border: 1px solid var(--border); background: var(--surface-2); }
.mini2-ph { width: 28px; height: 28px; border-radius: 6px; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); }
.mini2-ph svg { width: 14px; height: 14px; }

/* Locations management -----------------------------------------------------*/
.loc-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.loc-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--muted); font-weight: 700; font-size: 12px; }
.mini-btn:hover { color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); }
.mini-btn.danger:hover { color: var(--red-text); border-color: var(--red-border); background: var(--red-soft); }
.mini-btn svg { width: 14px; height: 14px; }
.mini-icon { width: 30px; height: 30px; padding: 0; justify-content: center; }
.inline-add { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.inline-add input { flex: 1; height: 34px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 0 10px; outline: none; }
.inline-add input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.shelf-head .sh-actions { margin-left: 10px; display: inline-flex; gap: 4px; }
.rack-actions { margin-left: 8px; display: inline-flex; gap: 4px; }

/* Where-is-it list in the product drawer ----------------------------------*/
.where-list { display: grid; gap: 1px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.where-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--card); border-bottom: 1px solid var(--border); }
.where-row:last-child { border-bottom: 0; }
.where-row .path { color: var(--text); font-size: 13px; }
.where-row .q { font-weight: 800; font-variant-numeric: tabular-nums; }
.where-row .q.boxed { color: var(--blue); font-size: 11px; }
.where-office-summary { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; color: var(--muted); font-size: 10px; }
.where-office-summary strong { color: var(--blue-text); font-size: 11px; }
.where-office-summary span { min-width: 0; overflow-wrap: anywhere; }
.where-more-details { margin-top: 7px; }
.where-more-details > summary {
  width: 100%; padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 6px; background: transparent; color: var(--blue); cursor: pointer; list-style: none; font-size: 12px; font-weight: 750;
}
.where-more-details > summary::-webkit-details-marker { display: none; }
.where-more-details > summary:hover { background: var(--blue-soft); }
.where-more-details > summary svg { width: 14px; height: 14px; transition: transform .16s ease; }
.where-more-details[open] > summary svg { transform: rotate(180deg); }
.where-list-more { margin-top: 7px; }
.where-empty { padding: 12px; color: var(--muted); text-align: center; font-size: 12px; }
.stock-breakdown { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }

/* Reorder + bill of materials in drawer ------------------------------------*/
.reorder-row { display: flex; align-items: center; gap: 10px; }
.reorder-row > input { width: 90px; }
.reorder-row .number-stepper { width: 96px; }
.reorder-row .unit { color: var(--muted); font-size: 12px; font-weight: 600; }
.price-input { position: relative; display: flex; align-items: center; }
.price-input .cur {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
/* Match the generic field selector's input guards, then add .price-input so
   the currency spacing wins the cascade without using !important. */
.field .price-input input:not([type="checkbox"]):not(.combo-input):not(.stepper-input) {
  width: 100%;
  padding-left: 30px;
  font-variant-numeric: tabular-nums;
}
.price-input:focus-within .cur { color: var(--blue); }
.name-row { display: flex; gap: 8px; align-items: center; }
.name-row input { flex: 1; min-width: 0; }
.name-row .button.small { flex: 0 0 auto; white-space: nowrap; }
.fam-note { margin: 2px 0 9px; padding: 7px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); }
/* Transfer: From / To side-by-side blocks */
#locTransfer { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.xfer-side { padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.xfer-side .record-grid.locs { grid-template-columns: 1fr 1fr 1fr; }
.xfer-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.xfer-head svg { width: 16px; height: 16px; }
.xfer-head.from { color: var(--amber-text); }
.xfer-head.to { color: var(--green-text); }
@media (max-width: 1180px) { #locTransfer { grid-template-columns: 1fr; } }
/* report filters + rankings + receivings */
.report-page-heading { align-items: flex-end; }
.report-eyebrow { margin: 0 0 3px; color: var(--blue-text); font-size: 10px; font-weight: 850; letter-spacing: .085em; text-transform: uppercase; }
.report-readonly { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--blue-border); border-radius: 999px; color: var(--blue-text); background: var(--blue-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.report-tabs-card { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding: 10px 12px; }
.report-tabs-card .seg { width: 100%; max-width: 620px; }
.report-tabs-card .seg button { flex: 1; }
.report-tab-help { max-width: 570px; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: right; }
.report-workspace { overflow: hidden; }
.report-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 70px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.report-view-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.report-view-identity .card-title-icon { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--blue-border); border-radius: 7px; background: var(--blue-soft); }
.report-view-identity .card-title-icon svg { width: 17px; height: 17px; }
.report-sheet-head h2 { margin: 0; color: var(--text); font-size: 16px; letter-spacing: -.15px; }
.report-sheet-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.report-sheet-code { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: var(--surface-2); font-size: 10px; font-weight: 700; }
.report-builder { padding: 13px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.report-builder-title { display: none; }
.report-config-grid { margin: 0; }
.report-config-grid .search-field { min-width: min(420px, 100%); }
.report-config-grid .report-generate { min-height: 38px; }
.report-config-grid .report-generate svg { width: 15px; height: 15px; }
.report-output { padding: 16px 20px 20px; }
.report-loading { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-metric { position: relative; min-width: 0; display: grid; align-content: start; gap: 4px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); }
.report-metric::before { content: ""; position: absolute; top: 12px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.report-metric.warning::before { background: var(--amber); }
.report-metric.positive::before { background: var(--green); }
.report-metric > span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.report-metric > strong { min-width: 0; overflow: hidden; color: var(--text); font-size: clamp(17px, 1.8vw, 22px); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.report-metric > small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-insight { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 12px 0; padding: 10px 0 12px; border-bottom: 1px solid var(--border); }
.report-insight > div:first-child { min-width: 0; }
.report-insight > div:first-child > span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.report-insight strong { display: block; min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.report-insight p { max-width: 800px; margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.report-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.report-actions .button svg { width: 14px; height: 14px; }
.report-table-frame { margin-top: 0; }
.report-table-frame .data-table { min-width: 940px; }
.report-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 2px 0; color: var(--muted); font-size: 11px; }
.report-pagination > div { display: flex; align-items: center; gap: 10px; }
.report-pagination strong { min-width: 88px; color: var(--text); font-size: 11px; text-align: center; }
.report-pagination .button { min-height: 32px; padding: 0 12px; }
.report-product-cell { min-width: 0; display: grid; gap: 2px; }
.report-product-cell strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-product-cell small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-position { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); background: var(--neutral-bg); font-size: 9px; font-weight: 800; white-space: nowrap; }
.report-position.low, .report-position.out { color: var(--red-text); border-color: var(--red-border); background: var(--red-soft); }
.report-position.healthy { color: var(--green-text); border-color: var(--green-border); background: var(--green-soft); }
.report-subsection { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.report-subsection .card-title { margin-bottom: 7px; }
.report-subsection .card-title > div { display: grid; gap: 2px; }
.report-subsection .card-title h2 { font-size: 13px; }
.report-subsection .card-title small { color: var(--muted); font-size: 9px; }
.report-preview-card { width: min(1180px, 96vw); }
.report-preview-body { padding: 18px; }
.report-page-stack { display: grid; justify-items: center; gap: 22px; }
.report-print-page {
  box-sizing: border-box;
  width: 8.5in;
  height: 11in;
  min-height: 11in;
  display: flex;
  flex-direction: column;
  padding: .42in .46in .36in;
  overflow: hidden;
}
.report-page-content { flex: 1 1 0; min-height: 0; overflow: hidden; }
.report-continuation { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px; margin: 12px 0 9px; padding-bottom: 7px; border-bottom: 1px solid #d8dee8; }
.report-continuation span { color: #087aa8; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.report-continuation strong { overflow: hidden; color: #526173; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-print-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 7px; margin: 0 0 12px; }
.report-print-filters > div { min-width: 0; padding: 7px 9px; border: 1px solid #d8dee8; background: #fafbfc; }
.report-print-filters span { display: block; color: #667085; font-size: 7px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.report-print-filters strong { display: block; margin-top: 2px; overflow-wrap: anywhere; color: #172033; font-size: 9px; }
.report-generation-overlay { z-index: 1200; backdrop-filter: blur(8px); }
.report-generation-card {
  position: relative;
  width: min(620px, 92vw);
  overflow: hidden;
  padding: 26px;
  border-color: var(--blue-border);
  background:
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 34%),
    linear-gradient(145deg, var(--card), var(--surface-2));
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%), 0 0 0 1px color-mix(in srgb, var(--blue) 18%, transparent);
}
.report-generation-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--blue), var(--cyan, var(--blue)), transparent); }
.report-generation-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: #526173; background: #e9f7fc; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.report-generation-brand img { flex: 0 0 auto; width: 72px; height: auto; object-fit: contain; object-position: left center; }
.report-generation-visual { position: relative; width: 76px; height: 76px; display: grid; place-items: center; margin: 26px auto 20px; border: 1px solid var(--blue-border); border-radius: 20px; color: var(--blue-text); background: var(--blue-soft); box-shadow: inset 0 0 28px color-mix(in srgb, var(--blue) 10%, transparent), 0 0 30px color-mix(in srgb, var(--blue) 12%, transparent); }
.report-generation-visual > svg { width: 30px; height: 30px; }
.report-generation-orbit { position: absolute; inset: -8px; border: 1px solid color-mix(in srgb, var(--blue) 48%, transparent); border-top-color: var(--blue); border-radius: 24px; animation: report-generation-spin 1.4s linear infinite; }
.report-generation-copy { text-align: center; }
.report-generation-kicker { display: block; margin-bottom: 6px; color: var(--blue-text); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.report-generation-copy h2 { margin: 0; color: var(--text); font-size: 21px; letter-spacing: -.25px; }
.report-generation-copy p { min-height: 18px; margin: 8px 0 14px; color: var(--muted); font-size: 12px; }
.report-generation-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 7px; margin: 0 0 16px; }
.report-generation-filters > div { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: color-mix(in srgb, var(--field-bg) 88%, transparent); }
.report-generation-filters dt { margin: 0 0 2px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.report-generation-filters dd { margin: 0; overflow: hidden; color: var(--text); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.report-generation-progress { height: 8px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--field-bg); }
.report-generation-progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan, var(--blue))); box-shadow: 0 0 14px color-mix(in srgb, var(--blue) 60%, transparent); }
.report-generation-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 9px; color: var(--muted); font-size: 9px; }
.report-generation-meta strong { color: var(--blue-text); font-size: 10px; font-variant-numeric: tabular-nums; }
.report-generation-card.is-complete .report-generation-orbit { border-color: var(--green); animation: none; }
.report-generation-card.is-complete .report-generation-visual { color: var(--green-text); border-color: var(--green-border); background: var(--green-soft); }
@keyframes report-generation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .report-generation-orbit { animation: none; } }
.report-print-document { min-height: 820px; }
.report-print-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 16px 0; padding: 11px 13px; border: 1px solid #d8dee8; background: #f8fafc; }
.report-print-scope > div { min-width: 0; }
.report-print-scope span { display: block; color: #667085; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.report-print-scope strong { display: block; margin-top: 2px; overflow-wrap: anywhere; color: #172033; font-size: 11px; }
.report-print-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.report-print-metrics > div { min-width: 0; padding: 10px 11px; border: 1px solid #d8dee8; border-top: 3px solid #0199d8; background: #fff; }
.report-print-metrics span { display: block; color: #667085; font-size: 8px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.report-print-metrics strong { display: block; margin-top: 3px; overflow: hidden; color: #172033; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.report-print-metrics small { display: block; margin-top: 2px; overflow: hidden; color: #667085; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.report-print-insight { margin: 12px 0; padding: 10px 12px; border-left: 4px solid #0199d8; color: #344054; background: #e9f7fc; font-size: 10px; font-weight: 650; line-height: 1.45; }
.report-print-table { overflow: hidden; border: 1px solid #d8dee8; }
.report-print-table table { width: 100%; table-layout: fixed; border-collapse: collapse; color: #172033; font-size: 9px; }
.report-print-table th { padding: 7px 8px; color: #526173; border-bottom: 1px solid #d8dee8; background: #f2f4f7; font-size: 7px; font-weight: 850; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.report-print-table td { padding: 6px 8px; border-bottom: 1px solid #e8ecf2; overflow-wrap: anywhere; vertical-align: top; }
.report-print-table td.report-multiline { white-space: pre-line; }
.report-print-table tr:last-child td { border-bottom: 0; }
.report-print-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.report-print-truncation { margin: 8px 0 0; color: #667085; font-size: 8px; }
.report-print-footer { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 20px; margin-top: 12px; padding-top: 8px; color: #667085; border-top: 1px solid #d8dee8; font-size: 8px; }
.report-print-footer > span:nth-child(2) { text-align: center; }
.report-print-footer > span:last-child { text-align: right; white-space: nowrap; }
.restock-report-controls { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; }
.restock-exclude-switch { min-height: 38px; padding: 0 2px; }
.restock-excluded-count { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.restock-report-groups { display: grid; gap: 18px; }
.restock-report-priority { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.restock-report-priority.urgent { border-top: 3px solid var(--red); }
.restock-report-priority.soon { border-top: 3px solid var(--amber); }
.restock-report-priority-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--border); }
.restock-report-priority-head > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.restock-report-priority-head svg { width: 16px; height: 16px; color: var(--blue-text); }
.restock-report-priority.urgent .restock-report-priority-head svg { color: var(--red-text); }
.restock-report-priority-head h3 { margin: 0; font-size: 14px; }
.restock-report-priority-head > strong, .restock-report-category-head > span { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 22px; padding: 0 7px; border-radius: 999px; color: var(--muted); background: var(--neutral-bg); font-size: 10px; font-weight: 850; }
.restock-report-category { margin: 0 14px 14px; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--card); }
.restock-report-category:first-of-type { margin-top: 14px; }
.restock-report-category-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.restock-report-category-head h4 { margin: 0; color: var(--blue-text); font-size: 11px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.restock-compact-list { display: grid; }
.restock-compact-row { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--card); color: var(--text); text-align: left; }
.restock-compact-row:last-child { border-bottom: 0; }
.restock-compact-row:hover, .restock-compact-row:focus-visible { background: var(--hover); outline: 0; }
.restock-compact-row:focus-visible { box-shadow: inset 3px 0 var(--blue); }
.restock-compact-row > span:first-child { min-width: 0; display: grid; gap: 2px; }
.restock-report-item { min-width: 0; display: grid; gap: 3px; }
.restock-report-item-head { min-width: 0; display: flex; align-items: center; gap: 8px; }
.restock-report-item-head .mono { min-width: 0; }
.restock-report-item-head em { flex: 0 0 auto; padding: 2px 6px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); font-size: 8px; font-style: normal; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.restock-report-description { color: var(--muted); font-size: 10px; line-height: 1.4; white-space: pre-line; }
.restock-compact-row .mono { overflow: hidden; color: var(--blue-text); font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.restock-compact-row > span:first-child small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.restock-compact-quantity { min-width: 74px; display: grid; justify-items: end; gap: 1px; }
.restock-compact-quantity small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.restock-compact-quantity strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.restock-compact-quantity > span { color: var(--muted); font-size: 8px; }
.restock-report-table { border: 0; border-radius: 0; }
.restock-report-table table { table-layout: auto; }
.restock-report-table th:first-child { width: 80%; }
.restock-report-table tbody tr[data-product-preview] { cursor: pointer; }
.restock-report-table tbody tr[data-product-preview]:hover { background: var(--hover); }
.restock-report-table td strong.mono { display: block; color: var(--blue-text); font-family: var(--mono); font-size: 11px; }
.restock-report-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.restock-report-empty { padding: 22px 15px; color: var(--muted); font-size: 11px; text-align: center; }
.report-print-document .restock-report-priority { border-color: #d8dee8; background: #fff; }
.report-print-document .restock-report-priority-head { border-bottom-color: #d8dee8; background: #f8fafc; }
.report-print-document .restock-report-priority-head h3 { color: #172033; }
.report-print-document .restock-report-priority-head > strong,
.report-print-document .restock-report-category-head > span { color: #526173; background: #e8ecf2; }
.report-print-document .restock-report-category { border-color: #d8dee8; background: #fff; }
.report-print-document .restock-report-category-head { border-bottom-color: #d8dee8; background: #f2f4f7; }
.report-print-document .restock-report-category-head h4 { color: #087aa8; }
.report-print-document .restock-report-table td strong.mono { color: #087aa8; }
.report-print-document .restock-report-table td small,
.report-print-document .restock-report-empty { color: #667085; }
.report-print-document .restock-report-item-head em { color: #526173; border-color: #cfd6e1; }
.report-print-document .restock-report-description { color: #526173; font-size: 6.5pt; line-height: 1.35; }
.restock-exclusion-modal { width: min(760px, 94vw); }
.restock-exclusion-modal .search-field { width: 100%; }
.restock-exclusion-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 1px; }
.restock-exclusion-summary strong { color: var(--muted); font-size: 10px; }
.restock-exclusion-list { display: grid; max-height: min(54vh, 520px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.restock-exclusion-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.restock-exclusion-row:last-child { border-bottom: 0; }
.restock-exclusion-row:hover { background: var(--hover); }
.restock-exclusion-row input { width: 16px; height: 16px; accent-color: var(--blue); }
.restock-exclusion-row > span { min-width: 0; display: grid; gap: 2px; }
.restock-exclusion-row .mono { overflow: hidden; font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.restock-exclusion-row small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.restock-exclusion-meta { justify-items: end; text-align: right; }
.restock-exclusion-meta strong { color: var(--blue-text); font-size: 9px; text-transform: uppercase; }
.rep-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.report-builder .rep-filters { margin-bottom: 0; }
.rep-filters .rf { display: grid; gap: 5px; }
.rep-filters .rf > span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rep-filters .rf input[type="date"] { height: 38px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 0 10px; }
.rep-filters .rf .combo { min-width: 170px; }
.rep-filters .result-count { margin-left: auto; }
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .rank-grid { grid-template-columns: 1fr; } }
.rank-list { display: grid; gap: 4px; }
.rank-row { display: grid; grid-template-columns: 26px minmax(0,1fr) 90px auto; align-items: center; gap: 12px; padding: 7px 4px; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .rk-num { color: var(--muted); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.rank-row .rk-name { display: grid; min-width: 0; }
.rank-row .rk-name .mono { font-family: Consolas, monospace; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rk-name .rk-sub { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rk-bar { height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.rank-row .rk-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.rank-row .rk-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-row .rk-val .rk-rev { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.rc-summary { display: flex; gap: 30px; margin-bottom: 16px; }
.rc-summary .rc-stat { display: grid; gap: 3px; }
.rc-summary .rc-stat > span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rc-summary .rc-stat > strong { font-size: 22px; }
.ranking-config .rf .combo { min-width: 150px; }
.arrivals-config .search-field { flex: 1 1 340px; }
.data-table tfoot .rep-total td { border-top: 2px solid var(--border-strong); font-weight: 800; background: var(--surface-2); }
.data-table tfoot .rep-total td:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.spec-panel { padding: 12px; border: 1px solid var(--blue-border); border-radius: 8px; background: var(--blue-soft); }
.spec-panel-title { margin-bottom: 10px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.spec-panel .hint { margin: 9px 0 0; }
.structured-detail-list { display: grid; gap: 7px; margin-bottom: 8px; }
.structured-detail-list:empty { margin-bottom: 0; }
.structured-detail-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, .7fr) minmax(0, 1.4fr) 34px; gap: 7px; align-items: center; }
.structured-detail-row select,
.structured-detail-row input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 0 9px; outline: none; font: inherit; font-size: 12px; }
.structured-detail-row select:focus,
.structured-detail-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.structured-detail-row .detail-custom-key[hidden] { display: none; }
.structured-detail-row .detail-custom-key[hidden] + .detail-value { grid-column: 2 / 4; }
.structured-detail-row .rm { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--muted); }
.structured-detail-row .rm:hover { color: var(--red-text); border-color: var(--red-border); background: var(--red-soft); }
.structured-detail-row .rm svg { width: 14px; height: 14px; }
.structured-detail-add { margin-top: 8px; }
.details-cell { min-width: 360px; max-width: 500px; }
.detail-chips { width: 100%; min-width: 0; display: grid; gap: 4px; align-items: start; }
.detail-chip { width: 100%; max-width: 100%; min-width: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; gap: 6px; padding: 3px 7px; border: 1px solid var(--blue-border); border-radius: 7px; background: var(--blue-soft); color: var(--text); font-size: 10px; line-height: 1.25; overflow: hidden; }
.detail-chip b { color: var(--blue); font-size: 9px; line-height: 1.4; text-transform: uppercase; white-space: nowrap; }
.detail-value { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.detail-more { justify-self: start; color: var(--muted); font-size: 10px; font-weight: 800; }
.stock-data-table .stock-detail-chips { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.report-details-cell { min-width: 220px; max-width: 360px; }
.report-details-summary { width: 100%; min-width: 0; display: grid; gap: 3px; padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: left; }
.report-details-summary:hover, .report-details-summary:focus-visible { border-color: var(--blue-border); background: var(--blue-soft); outline: 0; }
.report-detail-line { min-width: 0; display: grid; grid-template-columns: minmax(76px, auto) minmax(0, 1fr); align-items: baseline; gap: 7px; font-size: 11px; }
.report-detail-line b { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .035em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.report-detail-line span { min-width: 0; overflow: hidden; color: var(--text); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.report-details-more { margin-top: 1px; color: var(--blue); font-size: 10px; font-weight: 800; }
.report-details-dialog { width: min(620px, 94vw); }
.report-details-list { display: grid; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.report-details-list > div { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(0, 1.25fr); gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--border); }
.report-details-list > div:last-child { border-bottom: 0; }
.report-details-list > div:nth-child(odd) { background: var(--surface-2); }
.report-details-list span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.report-details-list strong { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1050px) {
  .report-tabs-card { align-items: flex-start; flex-direction: column; }
  .report-tab-help { max-width: none; text-align: left; }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-insight { align-items: flex-start; flex-direction: column; }
  .report-actions { justify-content: flex-start; }
}
@media (max-width: 680px) {
  .report-tabs-card { padding: 8px; }
  .report-tabs-card .seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .report-sheet-head { align-items: flex-start; padding: 14px; }
  .report-sheet-code { margin-top: 3px; }
  .report-builder, .report-output { padding-left: 14px; padding-right: 14px; }
  .report-metrics { grid-template-columns: minmax(0, 1fr); }
  .report-config-grid .rf, .report-config-grid .search-field, .report-config-grid .button { width: 100%; }
  .report-config-grid .rf .combo { width: 100%; }
  .report-print-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .restock-report-controls { align-items: stretch; flex-direction: column; }
  .restock-excluded-count { margin-left: 0; }
  .restock-report-controls .button { width: 100%; }
  .restock-report-category { margin-left: 8px; margin-right: 8px; }
  .restock-report-table { overflow-x: auto; }
  .restock-report-table table { min-width: 620px; }
  .restock-exclusion-row { grid-template-columns: auto minmax(0, 1fr); }
  .restock-exclusion-meta { grid-column: 2; justify-items: start; text-align: left; }
}
.comp-list { display: grid; gap: 8px; }
.comp-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 32px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.comp-row .qty > input { width: 100%; height: 38px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 0 10px; outline: none; text-align: center; }
.comp-row .rm { height: 34px; width: 32px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--muted); }
.comp-row .rm:hover { color: var(--red-text); border-color: var(--red-border); background: var(--red-soft); }
.comp-row .rm svg { width: 14px; height: 14px; }
.comp-specs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-top: 2px; }
.comp-new-photo { grid-column: 1 / -1; }
.comp-new-photo[hidden] { display: none; }
.comp-new-photo .required-photo-card { grid-template-columns: 84px minmax(0, 1fr); }
.comp-new-photo .required-photo-preview { min-height: 84px; }
.comp-alias { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; padding: 7px 9px; border: 1px solid var(--blue-border); border-radius: 6px; background: var(--blue-soft); }
.comp-alias span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.comp-alias strong { color: var(--blue-text); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.comp-specs label { display: grid; gap: 4px; min-width: 0; }
.comp-specs label > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.comp-specs input { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); padding: 0 8px; outline: none; font-size: 12px; }
.comp-specs input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.comp-specs .comp-notes { grid-column: 1 / -1; }
.comp-onhand { font-size: 10px; color: var(--muted); grid-column: 1 / -1; margin-top: -3px; }
.comp-onhand.low { color: var(--red-text); }
.restock-item .req { color: var(--blue); font-size: 10px; font-weight: 700; }
.restock-item .target { color: var(--muted); font-size: 10px; font-weight: 700; display: block; }

@media (max-height: 800px) {
  .product-drawer .product-overview .photo-frame { height: clamp(200px, 31dvh, 280px); }
  .product-detail-list { max-height: clamp(120px, 20dvh, 190px); }
  .product-summary-card, .product-detail-card, .product-content-overview, .product-inventory-overview { padding: 10px; }
  .product-overview-description { margin: 6px 0 8px; line-height: 1.38; }
  .product-identity-list > div, .product-detail-list > div { padding: 5px 0; }
}

/* Role-aware Training Center ---------------------------------------------*/
.training-screen { width: min(1180px, calc(100% - 48px)); }
.training-hero { margin: -24px -24px 30px; padding: 38px 24px 34px; color: #fff; background: linear-gradient(135deg, #005f87 0%, #007eae 50%, #0aa8eb 100%); border-radius: 0 0 18px 18px; box-shadow: 0 10px 26px rgb(0 89 127 / 18%); }
.training-eyebrow { display: block; margin-bottom: 6px; color: #c8f0ff; font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.training-hero h1 { margin: 0 0 20px; font-size: 34px; line-height: 1.15; letter-spacing: -.65px; }
.training-search { width: min(760px, 100%); min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 15px; color: #526173; background: #fff; border: 1px solid rgb(255 255 255 / 65%); border-radius: 10px; box-shadow: 0 5px 18px rgb(0 37 54 / 22%); }
.training-search:focus-within { box-shadow: 0 0 0 4px rgb(255 255 255 / 25%), 0 5px 18px rgb(0 37 54 / 22%); }
.training-search svg { flex: 0 0 auto; width: 21px; height: 21px; color: #007cab; }
.training-search input { flex: 1; min-width: 0; height: 50px; padding: 0; border: 0; outline: 0; color: #1f2937; background: transparent; font-size: 16px; font-weight: 600; }
.training-search input::placeholder { color: #768492; opacity: 1; }
.training-search kbd { min-width: 24px; padding: 2px 7px; color: #687583; background: #eef2f4; border: 1px solid #d4dde1; border-radius: 5px; font: 700 12px var(--mono); text-align: center; }
.training-role-line { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: #e5f7ff; font-size: 12px; font-weight: 650; }
.training-role-line .badge { min-width: 0; }
.training-popular, .training-topics { margin-bottom: 28px; }
.training-popular > h2, .training-topics > h2, .training-results-heading h2 { margin: 0 0 13px; font-size: 19px; }
.training-popular-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.training-popular-grid .training-result { border: 1px solid var(--border); border-radius: 9px; background: var(--card); box-shadow: var(--shadow); }
.training-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.training-category { width: 100%; min-height: 112px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 17px; color: var(--text); text-align: left; }
.training-category:hover { border-color: var(--blue-border); background: var(--hover); transform: translateY(-1px); }
.training-category > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.training-category strong { font-size: 16px; }
.training-category small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.training-category em { color: var(--blue); font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.training-category > svg { width: 18px; color: var(--muted); }
.training-category-icon, .training-article-icon { display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-border); border-radius: 10px; }
.training-category-icon { width: 46px; height: 46px; }
.training-category-icon svg { width: 23px; height: 23px; }
.training-contact { display: flex; align-items: center; gap: 13px; margin-top: 22px; padding: 15px 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.training-contact-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); background: var(--blue-soft); border-radius: 9px; }
.training-contact > div { min-width: 0; display: grid; gap: 2px; }
.training-contact strong { font-size: 14px; }
.training-contact span:not(.training-contact-icon) { color: var(--muted); font-size: 11px; }
.training-contact .button { margin-left: auto; flex: 0 0 auto; }
.training-results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.training-results-heading h2 { margin-bottom: 3px; }
.training-results-heading p { margin: 0; color: var(--muted); }
.training-results { overflow: hidden; }
.training-result { width: 100%; min-height: 68px; display: flex; align-items: center; gap: 16px; padding: 13px 17px; border: 0; border-bottom: 1px solid var(--border); color: var(--text); background: transparent; text-align: left; }
.training-result:last-child { border-bottom: 0; }
.training-result:hover { color: var(--blue); background: var(--hover); }
.training-result > span { flex: 1; min-width: 0; display: grid; gap: 3px; }
.training-result strong { font-size: 14px; }
.training-result small { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.training-result > svg { flex: 0 0 auto; width: 17px; color: var(--muted); }
.training-section-head { margin-bottom: 15px; }
.training-section-head > div { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 13px; margin-top: 9px; }
.training-section-head .training-category-icon { grid-row: span 2; width: 48px; height: 48px; }
.training-section-head h2 { margin: 0; font-size: 23px; }
.training-section-head p { grid-column: 2; margin: -7px 0 0; color: var(--muted); }
.training-article { max-width: 860px; margin: 0 auto; overflow: hidden; }
.training-back { margin: 13px 15px 0; }
.training-article-head { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; padding: 17px 28px 22px; border-bottom: 1px solid var(--border); }
.training-article-icon { width: 58px; height: 58px; }
.training-article-icon svg { width: 28px; height: 28px; }
.training-article-head > div { min-width: 0; }
.training-article-head span { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.training-article-head h2 { margin: 2px 0 5px; font-size: 25px; line-height: 1.2; }
.training-article-head p { margin: 0; color: var(--muted); line-height: 1.45; }
.training-steps { margin: 0; padding: 24px 32px 24px 66px; counter-reset: training-step; }
.training-steps li { position: relative; min-height: 42px; padding: 2px 0 17px 12px; color: var(--text); line-height: 1.55; }
.training-steps li::marker { color: var(--blue); font-weight: 900; }
.training-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 28px 24px; padding: 12px 14px; color: var(--amber-text); background: var(--amber-soft); border: 1px solid var(--amber-border); border-radius: 8px; line-height: 1.45; }
.training-note svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }
.training-windows-download { margin: 0 28px 24px; overflow: hidden; border: 1px solid var(--blue-border); border-radius: 12px; background: var(--surface-2); }
.training-download-copy { padding: 22px; background: linear-gradient(135deg, var(--blue-soft), var(--card)); }
.training-download-kicker { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.training-download-copy h3 { margin: 5px 0 7px; font-size: 22px; }
.training-download-status,.training-download-disclaimer { margin: 0; color: var(--muted); line-height: 1.45; }
.training-download-actions[hidden] { display: none; }
.training-download-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.training-download-disclaimer { margin-top: 14px; font-size: 11px; }
.training-article .training-contact { margin: 0; border-width: 1px 0 0; border-radius: 0; padding: 17px 28px; }

@media (max-width: 900px) {
  .training-popular-grid, .training-category-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .location-reference-head { align-items: stretch; flex-direction: column; }
  .location-reference-head > .badge { align-self: flex-start; }
  .location-reference-grid { grid-template-columns: minmax(0, 1fr); }
  .location-reference-entry { grid-template-columns: auto minmax(0, 1fr); }
  .location-reference-entry > .badge { grid-column: 2; justify-self: start; }
  .map-reference-row { grid-template-columns: auto minmax(0, 1fr); }
  .map-reference-row > .badge { grid-column: 2; justify-self: start; }
  .drawer.product-drawer { width: calc(100vw - 12px); }
  .product-drawer .drawer-head { padding: 14px; }
  .product-drawer .drawer-body { padding: 14px; }
  .product-drawer .drawer-foot { padding: 12px 14px; }
  .product-overview { grid-template-columns: minmax(0, 1fr); }
  .product-drawer .product-overview .photo-frame { height: clamp(235px, 38dvh, 360px); }
  .product-detail-list { max-height: none; }
  .product-drawer.read-only .product-identity-list,
  .product-drawer.read-only .product-detail-list { grid-template-columns: minmax(0, 1fr); max-height: none; }
  .product-content-row { grid-template-columns: 34px minmax(0, 1fr) 64px; }
  .product-content-specs { grid-column: 2 / -1; }
  .product-activity-row { grid-template-columns: minmax(90px, 1fr) auto 42px; }
  .product-activity-path { grid-column: 1 / -1; }
  .product-activity-row > small { grid-column: 1 / -1; }
  .product-drawer .row-2,
  .product-drawer .row-3 { grid-template-columns: minmax(0, 1fr); }
  .product-drawer .comp-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-drawer .comp-specs .comp-notes { grid-column: 1 / -1; }
  .structured-detail-row { grid-template-columns: 1fr 34px; }
  .structured-detail-row select, .structured-detail-row .detail-custom-key, .structured-detail-row .detail-value { grid-column: 1; }
  .structured-detail-row .rm { grid-column: 2; grid-row: 1; }
  .structured-detail-row .detail-custom-key[hidden] + .detail-value { grid-column: 1; }
  .product-image-overlay,
  .product-photo-editor-overlay { padding: 6px; }
  .product-image-lightbox { width: 100%; max-height: calc(100dvh - 12px); }
  .product-image-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-image-facts > div:nth-child(2) { border-right: 0; }
  .product-image-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .product-photo-editor-card { width: 100%; max-height: calc(100dvh - 12px); }
  .product-photo-editor-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(250px, 48dvh) auto auto; }
  .product-photo-selection { min-height: 180px; }
  .product-datasheet-list { grid-template-columns: minmax(0, 1fr); }
  .datasheet-viewer-overlay { padding: 6px; }
  .datasheet-viewer-card { width: 100%; height: calc(100dvh - 12px); min-height: 0; }
  .datasheet-viewer-head { gap: 8px; padding: 9px; }
  .datasheet-viewer-brand { padding-right: 8px; }
  .datasheet-viewer-brand span,
  .datasheet-viewer-foot > span { display: none; }
  .datasheet-viewer-body { padding: 5px; }
  .datasheet-viewer-foot { justify-content: flex-end; padding: 8px 9px; }
}

@media (max-width: 460px) {
  .product-drawer .comp-row { grid-template-columns: minmax(0, 1fr) 86px 32px; }
  .product-drawer .comp-specs { grid-template-columns: minmax(0, 1fr); }
  .product-drawer .comp-specs .comp-notes { grid-column: 1; }
}

/* Footer chips ------------------------------------------------------------*/
.foot-chip { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 700; }
.foot-chip:hover { border-color: var(--blue-border); color: var(--blue); background: var(--blue-soft); }
.foot-chip svg { width: 13px; height: 13px; }
.foot-chip.warn { border-color: var(--amber-border); background: var(--amber-soft); color: var(--amber-text); }
.foot-chip.warn:hover { border-color: var(--amber); }
.foot-chip.urgent { border-color: var(--red-border); background: var(--red-soft); color: var(--red-text); }
.foot-chip .mono { font-family: Consolas, monospace; }
.foot-grow { flex: 1; }

/* Status bar + toast ------------------------------------------------------*/
.status-bar { display: flex; align-items: center; gap: 12px; padding: 0 18px; color: var(--muted); background: var(--card); border-top: 1px solid var(--border); font-size: 12px; }
.status-bar > span { display: inline-flex; align-items: center; gap: 8px; }
.status-bar #statMsg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-bar > i { width: 1px; height: 17px; background: var(--border); }
.toast { position: fixed; right: 24px; bottom: 50px; z-index: 50; display: flex; align-items: center; gap: 10px; max-width: 460px; padding: 12px 16px; color: var(--green-text); background: var(--card); border: 1px solid var(--green-border); border-radius: 8px; box-shadow: var(--shadow-lg); font-weight: 700; animation: toast-in .18s ease-out; }
.toast.err { color: var(--red-text); border-color: var(--red-border); }
.toast.warn { color: var(--amber-text); border-color: var(--amber-border); }

/* Delayed contextual help --------------------------------------------------*/
.context-help-tooltip {
  position: fixed;
  z-index: 120;
  width: max-content;
  max-width: min(340px, calc(100vw - 20px));
  padding: 8px 11px;
  border: 1px solid var(--blue-border);
  border-radius: 7px;
  color: var(--text);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: none;
  animation: context-help-in .12s ease-out;
}
@keyframes context-help-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.loading { padding: 60px; text-align: center; color: var(--muted); }

@media (max-width: 1240px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-2 { grid-template-columns: minmax(0, 1fr); }
  .record-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(100px, .45fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .loc-grid, .form-grid { grid-template-columns: 1fr; }
  .location-map-section { grid-template-columns: 1fr; }
  .map-location-detail { position: static; min-height: 0; }
}

/* Keep account controls reachable at desktop scaling and restored sizes. */
@media screen and (min-width: 761px) and (max-width: 1700px) {
  .main-nav { order: 3; flex-basis: 100%; min-height: 46px; }
  .main-nav button { min-height: 46px; }
}

@media (max-width: 760px) {
  .recovery-grid { grid-template-columns: 1fr; }
  .reset-request-card { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav button,.main-nav button::after { transition: none; }
  main.screen-leaving > .screen-content { filter: none; transition: none; }
  main.screen-entering > .screen-content { animation: none; }
  .office-map-slot.selected,
  .office-map-slot.map-circle-slot.selected::after { animation: none; }
}

.phone-location-browser { display: none; }
.phone-location-page-copy { display: none; }
.phone-stock-sort { display: none; }
.phone-location-browser.show-without-map { display: block; }
.phone-location-controls { padding: 16px; margin-bottom: 14px; }
.phone-location-controls .card-title { justify-content: space-between; gap: 10px; }
.phone-location-controls h2 { margin: 0; font-size: 17px; }
.phone-location-selectors { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.phone-location-selectors select,.phone-stock-sort select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; }
.phone-location-office-field,.phone-location-rack-field { margin-bottom: 14px; }
.phone-location-office-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 4px; padding: 4px; border-radius: 9px; background: var(--neutral-bg); }
.phone-location-office-choice { min-width: 0; min-height: 46px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 750; text-align: center; }
.phone-location-office-choice:hover,.phone-location-office-choice:focus-visible { color: var(--blue-text); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.phone-location-office-choice.active { border-color: var(--blue-border); background: var(--card); color: var(--blue-text); box-shadow: var(--shadow); }
.phone-location-rack-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.phone-location-rack-choice { min-width: 0; min-height: 58px; display: grid; align-content: center; gap: 3px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--field-bg); color: var(--text); text-align: left; }
.phone-location-rack-choice strong { overflow-wrap: anywhere; font-size: 14px; }
.phone-location-rack-choice small { display: flex; flex-wrap: wrap; gap: 1px 3px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.phone-location-rack-choice:hover,.phone-location-rack-choice:focus-visible { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.phone-location-rack-choice.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-text); box-shadow: inset 3px 0 0 var(--blue); }
.phone-location-rack-choice.active small { color: var(--blue-text); }
.phone-location-rack-empty { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--muted); text-align: center; }
.phone-location-context { margin: 14px 0 8px; font-weight: 750; overflow-wrap: anywhere; }
.phone-location-notice { padding: 10px; background: var(--amber-soft); color: var(--text); border: 1px solid var(--border); border-radius: 6px; }
.phone-location-group { margin-bottom: 12px; overflow: hidden; }
.phone-location-group.focused { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow); }
.phone-location-group > h3 { margin: 0; padding: 12px; border-bottom: 1px solid var(--border); font-size: 15px; overflow-wrap: anywhere; }
.phone-location-group > .hint { padding: 0 12px; }
.phone-location-item { display: grid; grid-template-columns: 44px minmax(0,1fr) minmax(74px,24%); gap: 10px; width: 100%; min-height: 72px; padding: 12px; border: 0; border-bottom: 1px solid var(--border); text-align: left; color: var(--text); background: var(--card); }
button.phone-location-item:hover { background: var(--hover); }
.phone-location-item:last-child { border-bottom: 0; }
.phone-location-item > img,.phone-location-photo { width: 44px; height: 44px; object-fit: contain; display: grid; place-items: center; }
.phone-location-photo { color: var(--muted); background: var(--surface-2); border-radius: 6px; }
.phone-location-photo svg { width: 24px; height: 24px; }
.phone-location-identity { display: grid; align-content: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.phone-location-identity > span,.phone-location-identity small { font-size: 12px; }
.phone-location-identity .badge { justify-self: start; white-space: normal; }
.phone-location-quantity { display: grid; align-content: center; gap: 4px; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.phone-location-quantity small { font-size: 10px; color: var(--muted); }
.phone-location-quantity strong { font-size: 16px; }
.phone-location-quantity strong span { display: block; font-size: 11px; font-weight: 500; }
.location-management { margin-top: 18px; }
.location-management > summary { padding: 12px 0; font-weight: 750; cursor: pointer; }

/* Phone layout ------------------------------------------------------------
 * The server and routes stay identical; the viewport selects a touch-first
 * shell so a shared product, location, or activity URL opens the same record.
 */
@media screen and (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { min-width: 0; overscroll-behavior: none; }
  button, input, select, textarea { font-size: 16px; }

  .studio-app {
    width: 100%;
    min-width: 0;
    grid-template-rows: calc(54px + env(safe-area-inset-top)) minmax(0, 1fr);
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .topbar { min-height: 0; flex-wrap: nowrap; gap: 5px; padding: env(safe-area-inset-top) 8px 0 10px; background: color-mix(in srgb, var(--card) 94%, var(--blue) 6%); box-shadow: 0 1px 0 var(--border); }
  .brand { min-width: 0; flex: 1 1 auto; gap: 7px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-wordmark { display: grid; gap: 2px; align-content: center; }
  .brand-wordmark strong { font-size: 15px; letter-spacing: .075em; }
  .brand-wordmark span { display: block; font-size: 7px; font-weight: 750; letter-spacing: .25em; text-transform: uppercase; }
  .topbar-right { min-width: 0; min-height: 0; flex: 0 0 auto; gap: 3px; }
  .profile-trigger { width: 34px; min-height: 34px; justify-content: center; padding: 0; }
  .user-chip { gap: 3px; }
  .user-chip .uc-name { font-size: 0; }
  .user-chip .uc-name svg { width: 18px; height: 18px; }
  .user-chip .uc-role { display: none; }
  .user-chip .icon-btn, .topbar-right > .icon-btn { width: 34px; height: 34px; }
  .language-toggle { min-width: 36px; height: 34px; padding: 0 7px; }

  .main-nav {
    flex-wrap: nowrap;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    height: calc(64px + env(safe-area-inset-bottom));
    justify-content: stretch;
    gap: 0;
    padding: 0 5px env(safe-area-inset-bottom);
    overflow-x: hidden;
    overflow-y: hidden;
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgb(0 0 0 / 12%);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav button {
    flex: 1 1 25%;
    width: 25%;
    min-width: 0;
    min-height: 63px;
    flex-direction: column;
    gap: 2px;
    padding: 7px 4px 5px;
    font-size: 10px;
    line-height: 1.1;
  }
  .main-nav button::after { left: 13px; right: 13px; top: 0; bottom: auto; border-radius: 0 0 3px 3px; }
  .main-nav svg { width: 21px; height: 21px; }
  .main-nav button .nav-badge { position: absolute; top: 5px; right: 8px; margin: 0; box-shadow: 0 0 0 2px var(--card); }

  main { width: 100%; padding-bottom: 8px; overscroll-behavior-y: contain; }
  .status-bar { display: none; }
  /* Keep wide phone-mode screens focused without reducing space on normal phones. */
  .screen-content, .validation-screen { width: min(640px, calc(100% - 20px)); padding: 15px 0 24px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 13px; margin-bottom: 14px; }
  .page-heading h1 { margin-bottom: 3px; font-size: 23px; }
  .page-heading p { font-size: 12.5px; line-height: 1.4; }
  .page-heading .button-row { width: 100%; display: grid; grid-template-columns: 1fr; gap: 8px; }
  .page-heading .button { width: 100%; min-height: 44px; }
  .card { border-radius: 14px; }
  .screen-content > .page-heading { padding: 0 2px; }
  .screen-content > .page-heading p { color: var(--muted); }
  .phone-location-browser { display: block; }
  .desktop-location-page-copy { display: none; }
  .phone-location-page-copy { display: inline; }
  .stock-filter-card { display: grid; gap: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .stock-search-row { order: 1; display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 8px; }
  .stock-search-row .search-field { min-width: 0; min-height: 46px; border-radius: 12px; background: var(--card); }
  .phone-stock-filter-toggle { display: grid; width: 46px; height: 46px; border-radius: 12px; color: var(--blue-text); }
  .stock-filter-card .result-count { order: 2; padding: 7px 4px 0; color: var(--muted); }
  .stock-filter-controls { order: 3; display: block; margin-top: 9px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
  .stock-filter-card[data-phone-filters-open="false"] .stock-filter-controls { display: none; }
  .stock-filter-controls .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .stock-filter-controls .seg button { min-width: 0; min-height: 38px; padding: 6px 4px; white-space: normal; }
  .phone-stock-sort { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
  .phone-stock-sort select { min-width: 0; min-height: 44px; width: 100%; }
  .phone-stock-sort .field { margin: 0; }
  .desktop-location-browser,.location-management.read-only { display: none; }
  .phone-location-selectors { grid-template-columns: minmax(0,1fr); }
  .phone-location-controls { padding: 14px; border-color: var(--border-strong); }
  .phone-location-office-picker { gap: 6px; padding: 5px; border-radius: 12px; }
  .phone-location-office-choice { min-height: 48px; border-radius: 9px; }
  .phone-location-rack-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .phone-location-rack-choice { min-height: 66px; padding: 10px 12px; border-radius: 11px; }
  .phone-location-group { overflow: hidden; border-color: var(--border-strong); }
  .phone-location-group > h3 { color: var(--blue-text); background: color-mix(in srgb, var(--surface-2) 86%, var(--blue) 14%); }
  .phone-location-item { grid-template-columns: 64px minmax(0, 1fr) minmax(76px, 25%); gap: 10px; min-height: 92px; padding: 12px; }
  .phone-location-item > img,.phone-location-photo { width: 64px; height: 64px; padding: 5px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
  .phone-location-identity > strong { color: var(--blue-text); }
  .phone-location-quantity strong { font-size: 18px; }
  .padded { padding: 14px; }
  .card-title { margin-bottom: 12px; }
  .button { min-height: 42px; }
  .mini-btn { min-height: 36px; }

  .record-grid, .record-grid.locs, .row-2, .row-3, .form-grid, .dash-2, .loc-grid,
  .location-map-section, .report-config-grid, .validation-layout, .validation-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .record-grid { gap: 11px; }
  .record-activity-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .record-activity-head .card-title { align-self: auto; }
  .record-activity-tools .button-row { grid-template-columns: minmax(0, 1fr); }
  .record-activity-tools .button { width: 100%; }
  .record-foot { align-items: stretch; flex-wrap: wrap; margin-top: 12px; }
  .record-foot .pv { flex-basis: 100%; white-space: normal; line-height: 1.4; }
  .record-foot .button { flex: 1; }
  .qty-wrap { justify-content: space-between; }
  .number-stepper { width: 126px; height: 42px; grid-template-columns: 34px minmax(48px, 1fr) 34px; }
  .number-stepper input { height: 40px; }
  .source-allocation { padding: 11px; }
  .allocation-row { grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 10px 0; }
  .allocation-row .number-stepper { grid-column: 2; justify-self: stretch; width: 132px; }
  .allocation-path strong { white-space: normal; overflow-wrap: anywhere; }
  .allocation-footer { flex-wrap: wrap; }

  .filter-card, .loc-toolbar, .loc-manager-toolbar, .report-tabs-card, .rep-filters {
    align-items: stretch;
    flex-direction: column;
  }
  .filter-card > *, .filter-card .grow, .filter-card .combo, .rep-filters > *, .rep-filters .rf .combo { width: 100%; min-width: 0; }
  .filter-card .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-card .seg button { min-width: 0; padding-left: 5px; padding-right: 5px; white-space: normal; }
  .location-plan-toolbar .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { min-height: 44px; }
  .table-frame { max-width: 100%; -webkit-overflow-scrolling: touch; }
  .table-frame:has(.mobile-stock-list), .table-frame:has(.mobile-activity-list) { overflow: visible; border: 0; background: transparent; }
  .col-resizer { display: none; }
  .data-table { font-size: 12px; }
  .data-table th { height: 36px; padding: 7px 10px; font-size: 9px; }
  .data-table td { height: 46px; padding: 8px 10px; }
  .table-frame::after { content: ""; display: block; width: 1px; height: 1px; }

  .mobile-stock-list { gap: 12px; padding: 10px 0 0; }
  .mobile-stock-card { min-height: 168px; grid-template-columns: minmax(0, 1.65fr) minmax(96px, .9fr); align-items: stretch; gap: 12px; padding: 14px; overflow: hidden; border-color: var(--border-strong); border-radius: 16px; background: var(--card); box-shadow: 0 8px 24px rgb(8 28 43 / 10%); }
  .mobile-stock-copy { min-width: 0; display: grid; align-content: center; gap: 9px; }
  .mobile-stock-quantity { display: grid; justify-items: start; align-content: start; gap: 2px; min-width: 0; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .mobile-stock-quantity > span { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
  .mobile-stock-quantity strong { max-width: 100%; color: var(--text); font-size: clamp(21px, 7vw, 30px); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .mobile-stock-quantity em { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--blue-border); border-radius: 999px; color: var(--blue-text); background: var(--blue-soft); font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
  .mobile-stock-quantity small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-stock-identity { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .mobile-stock-identity > strong { overflow-wrap: anywhere; color: var(--blue-text); font-size: 15px; line-height: 1.25; }
  .mobile-stock-identity > span { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
  .mobile-stock-identity > small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .mobile-stock-location { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: visible; color: var(--muted); font-size: 10px; font-weight: 650; white-space: normal; }
  .mobile-stock-location svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--blue-text); }
  .mobile-stock-location span { min-width: 0; overflow-wrap: anywhere; }
  .mobile-stock-locked { grid-column: auto; color: var(--muted); font-size: 9px; line-height: 1.35; }
  .mobile-stock-visual { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 5px; }
  .mobile-stock-photo { width: 100%; height: 100%; max-height: 146px; min-height: 118px; display: grid; place-items: center; padding: 8px; object-fit: contain; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
  .mobile-stock-photo-placeholder { color: var(--muted); }
  .mobile-stock-photo-placeholder svg { width: 34px; height: 34px; }
  .mobile-stock-chevron { display: grid; place-items: center; color: var(--muted); }
  .mobile-stock-chevron svg { width: 18px; height: 18px; }

  .mobile-activity-list { gap: 11px; padding: 0; }
  .mobile-activity-card { gap: 10px; padding: 14px; border-color: var(--border-strong); border-radius: 14px; background: var(--card); box-shadow: 0 7px 22px rgb(8 28 43 / 9%); }
  .mobile-activity-top { padding-bottom: 9px; border-bottom: 1px solid var(--border); }
  .mobile-activity-top > strong { font-size: 22px; }
  .mobile-activity-item .product-preview-link { color: var(--blue-text); font-size: 14px; font-weight: 850; overflow-wrap: anywhere; text-align: left; }
  .mobile-activity-location { font-size: 11px; }
  .mobile-activity-reference { border: 1px solid var(--border); border-radius: 9px; }
  .mobile-activity-foot { min-height: 38px; }

  .record-card,.dash-2 > .card,.restock-group { border-color: var(--border-strong); box-shadow: 0 7px 22px rgb(8 28 43 / 8%); }
  .dash-2 { gap: 13px; }
  .dash-2 > .card { padding: 14px; }
  .restock-group { padding: 14px; }
  .restock-item { min-height: 54px; padding: 8px 2px; }

  :root[data-theme="dark"] .mobile-stock-card,
  :root[data-theme="dark"] .mobile-activity-card,
  :root[data-theme="dark"] .phone-location-controls,
  :root[data-theme="dark"] .phone-location-group { background: linear-gradient(145deg, color-mix(in srgb, var(--card) 94%, var(--blue) 6%), var(--card)); }

  .office-map-card { padding: 8px; }
  .office-map-title { align-items: flex-start; flex-direction: column; }
  .office-map-placeholder { min-height: 260px; padding: 24px 16px; }
  .map-location-detail { position: static; min-height: 0; padding: 13px; }
  .rack-grid { grid-template-columns: minmax(0, 1fr); }
  .shelf-tools, .shelf-head, .shelf-items, .shelf-empty { padding-left: 14px; }

  .validation-kpis, .validation-kpis.validation-kpis-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .validation-kpis > div { align-items: flex-start; flex-direction: column; }
  .validation-queue { position: static; height: min(42dvh, 390px); }
  .validation-detail { min-height: 0; padding: 14px; }
  .validation-product-head { grid-template-columns: minmax(0, 1fr); }
  .validation-photo-stack, .validation-photo { width: 100%; }
  .validation-photo { height: 210px; }
  .validation-location { grid-template-columns: 40px minmax(0, 1fr); }
  .validation-qty { grid-column: 2; }
  .validation-row-note { grid-column: 1 / -1; }
  .validation-row-classification, .validation-location-component-row, .validation-component-row { grid-template-columns: minmax(0, 1fr); }
  .validation-component-row > .field:first-child, .validation-component-row > .field:nth-child(8) { grid-column: 1; }
  .validation-actions { grid-template-columns: 1fr 1fr; }
  .validation-actions .button { width: 100%; }

  .drawer-overlay, .drawer-overlay.center { align-items: stretch; justify-content: stretch; padding: 0; }
  .drawer, .drawer.product-drawer, .modal-card, .modal-card.wide, .activity-preview-card,
  .activity-preview-card.label-mode, .product-print-preview-card, .report-preview-card {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .drawer-head { min-height: 58px; padding: 11px 12px; }
  .drawer-head-actions { gap: 5px; }
  .drawer-head-actions .button { min-width: 0; padding: 7px 9px; }
  .product-drawer .drawer-head-actions .button span { display: none; }
  .product-drawer .drawer-head-actions .button { width: 38px; height: 38px; padding: 0; }
  .drawer-body, .modal-body { padding: 13px; }
  .drawer-foot { flex-wrap: wrap; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .drawer-foot .button { flex: 1 1 auto; }
  .product-overview { grid-template-columns: minmax(0, 1fr); }
  .product-drawer .product-overview .photo-frame { height: min(42dvh, 330px); }

  .activity-preview-body, .report-preview-body { padding: 0; }
  .activity-print-document { min-height: 0; padding: 18px 14px; border: 0; box-shadow: none; }
  .activity-print-header { align-items: stretch; flex-direction: column; gap: 12px; }
  .activity-print-brand img { width: 100px; height: auto; }
  .activity-print-number { min-width: 0; max-width: none; text-align: left; }
  .activity-print-summary { grid-template-columns: minmax(0, 1fr); }
  .activity-print-summary > span { grid-row: auto; justify-self: start; }
  .product-print-identity-layout.has-photo { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
  .product-print-photo { min-height: 180px; }
  .activity-print-grid { grid-template-columns: minmax(0, 1fr); }
  .activity-print-grid > div.wide { grid-column: 1; }
  .activity-print-allocations, .activity-print-components { overflow-x: auto; }
  .activity-print-components table { min-width: 600px; }
  .activity-print-access { align-items: flex-start; flex-direction: column; }
  .activity-print-signoff { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .activity-print-footer { align-items: flex-start; flex-direction: column; }
  .activity-preview-actions { align-items: stretch; flex-direction: column; }
  .activity-format-switch { width: 100%; margin: 0; }
  .activity-format-switch .button { flex: 1; }

  .training-hero { padding: 25px 16px; }
  .training-hero h1 { font-size: 27px; }
  .training-article-head { grid-template-columns: 44px minmax(0, 1fr); gap: 11px; padding: 14px 16px 18px; }
  .training-article-icon { width: 44px; height: 44px; }
  .training-article-head h2 { font-size: 21px; }
  .training-steps { padding: 18px 22px 18px 42px; }
  .training-note { margin: 0 14px 18px; }
  .training-windows-download { margin: 0 14px 18px; }
  .training-download-copy { padding: 17px; }
  .training-download-actions .button { width: 100%; justify-content: center; }
  .training-article .training-contact { padding: 15px 16px; }

  .toast { left: 10px; right: 10px; bottom: calc(74px + env(safe-area-inset-bottom)); max-width: none; }
  .context-help-tooltip { display: none !important; }
  .loading { padding: 35px 16px; }
}
.assigned-recount-screen{max-width:1500px}
.assigned-recount-tools{padding:14px 16px}
.assigned-recount-tools .search-box{width:100%}
.assigned-recount-group{margin-top:18px;overflow:hidden}
.assigned-recount-group .section-head{display:flex;align-items:center;justify-content:space-between;padding:22px 24px;border-bottom:1px solid var(--border)}
.assigned-recount-group .section-head h2{margin:0 0 4px}
.assigned-recount-group .section-head p{margin:0;color:var(--muted)}
.assigned-recount-list{display:grid}
.assigned-recount-item{display:grid;grid-template-columns:64px minmax(220px,1fr) 170px 120px minmax(190px,auto);gap:18px;align-items:center;padding:18px 24px;border-bottom:1px solid var(--border)}
.assigned-recount-item:last-child{border-bottom:0}
.assigned-recount-item.complete{background:color-mix(in srgb,var(--good) 6%,transparent)}
.assigned-recount-photo{width:56px;height:56px;border:1px solid var(--border);border-radius:12px;display:grid;place-items:center;overflow:hidden;color:var(--muted)}
.assigned-recount-photo img{width:100%;height:100%;object-fit:contain}
.assigned-recount-copy{display:grid;gap:3px;min-width:0}
.assigned-recount-copy small{color:var(--accent);font-weight:800;text-transform:uppercase}
.assigned-recount-copy strong,.assigned-recount-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.assigned-recount-copy span,.assigned-recount-baseline span{color:var(--muted)}
.assigned-recount-baseline{display:grid;gap:4px}
.assigned-recount-quantity input{font-size:20px;font-weight:800;text-align:center}
.assigned-recount-copy .badge{width:max-content;margin-top:3px}
.assigned-recount-actions{display:grid;gap:7px}
.assigned-recount-actions .button{justify-content:center}
.assigned-recount-editor{width:min(920px,calc(100vw - 32px));max-height:calc(100vh - 32px)}
.assigned-recount-editor .modal-body{overflow:auto}
.assigned-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:16px}
.assigned-editor-components{border:1px solid var(--border);border-radius:12px;margin:4px 0 16px;overflow:hidden}
.assigned-editor-components .section-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border)}
.assigned-editor-components .section-head h3,.assigned-editor-components .section-head p{margin:0}
.assigned-editor-components .section-head p{color:var(--muted);font-size:12px;margin-top:3px}
.assigned-component-row{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;gap:10px;align-items:end;padding:12px 16px;border-bottom:1px solid var(--border)}
.assigned-component-row:last-child{border-bottom:0}
@media(max-width:760px){
  .assigned-recount-group .section-head{align-items:flex-start;padding:18px}
  .assigned-recount-item{grid-template-columns:52px 1fr;padding:16px;gap:12px}
  .assigned-recount-photo{width:48px;height:48px}
  .assigned-recount-quantity,.assigned-recount-baseline,.assigned-recount-actions{grid-column:1/-1}
  .assigned-recount-baseline{grid-template-columns:1fr auto}
  .assigned-editor-grid,.assigned-component-row{grid-template-columns:1fr}
}
