:root {
  --chimney: #252d37;
  --ash: #d3d9da;
  --harbour: #427390;
  --clay: #b37121;
  --nether: #88150c;
  --white: #ffffff;
  --line: rgba(211, 217, 218, 0.25);
  --glass: rgba(255, 255, 255, 0.1);
  --muted: rgba(211, 217, 218, 0.72);
  --sidebar-bg: #202a34;
  --panel-bg: #303b47;
  --screen-start: #202a34;
  --screen-end: #1e2730;
  --accent-soft: rgba(66, 115, 144, 0.28);
}

:root[data-theme="blue-gray"] {
  --chimney: #252d37;
  --ash: #d3d9da;
  --harbour: #427390;
  --clay: #b37121;
  --nether: #88150c;
  --white: #ffffff;
  --line: rgba(211, 217, 218, 0.25);
  --glass: rgba(255, 255, 255, 0.1);
  --muted: rgba(211, 217, 218, 0.72);
  --sidebar-bg: #202a34;
  --panel-bg: #303b47;
  --screen-start: #202a34;
  --screen-end: #1e2730;
  --accent-soft: rgba(66, 115, 144, 0.28);
  background: var(--chimney);
}

:root[data-theme="warm-sand"] {
  --chimney: #3b332e;
  --ash: #eadfd3;
  --harbour: #b8794f;
  --clay: #d09a4b;
  --nether: #88150c;
  --white: #fffaf4;
  --line: rgba(234, 223, 211, 0.27);
  --glass: rgba(255, 246, 236, 0.1);
  --muted: rgba(234, 223, 211, 0.7);
  --sidebar-bg: #302923;
  --panel-bg: #493d35;
  --screen-start: #332b26;
  --screen-end: #2a2420;
  --accent-soft: rgba(184, 121, 79, 0.3);
  background: var(--chimney);
}

:root[data-theme="forest"] {
  --chimney: #22352f;
  --ash: #d8e5de;
  --harbour: #4f8b74;
  --clay: #b58a4b;
  --nether: #88150c;
  --white: #f6fbf8;
  --line: rgba(216, 229, 222, 0.25);
  --glass: rgba(236, 248, 241, 0.09);
  --muted: rgba(216, 229, 222, 0.7);
  --sidebar-bg: #192a25;
  --panel-bg: #2d443c;
  --screen-start: #1c2e29;
  --screen-end: #172621;
  --accent-soft: rgba(79, 139, 116, 0.3);
  background: var(--chimney);
}

:root[data-theme="cream"] {
  --chimney: #f1e9dc;
  --ash: #514a42;
  --harbour: #9a7758;
  --clay: #b47a3a;
  --nether: #88150c;
  --white: #2f2a25;
  --line: rgba(81, 74, 66, 0.34);
  --glass: #fffaf1;
  --muted: rgba(81, 74, 66, 0.7);
  --sidebar-bg: #e4dacb;
  --panel-bg: #fffaf1;
  --screen-start: #faf6ee;
  --screen-end: #e7dccb;
  --accent-soft: rgba(154, 119, 88, 0.22);
  background: var(--chimney);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 1120px;
  color: var(--ash);
  background: var(--chimney);
  font-family: "Noto Sans", "PingFang SC", system-ui, -apple-system, sans-serif;
}

button, input { font: inherit; }

button { cursor: pointer; }
.ui-icon { display: inline-block; width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.button, .nav-item, .row-action, .copy-code-button, .lane-action, .supplier-filter-chip { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.nav-item .ui-icon { width: 16px; height: 16px; }
.button .ui-icon, .row-action .ui-icon, .lane-action .ui-icon, .copy-code-button .ui-icon { width: 14px; height: 14px; }
button, .lane-item, .supplier-lane, .search-box, .po-field { transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }

button:focus-visible, input:focus-visible, .nav-item:focus-visible {
  outline: 2px solid var(--ash);
  outline-offset: 3px;
}

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 224px;
  min-height: 100vh;
  padding: 28px 20px 24px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(211, 217, 218, 0.1);
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin-bottom: 13px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid rgba(198, 167, 72, .44);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}

.brand-name { color: var(--white); font-size: 16px; font-weight: 700; letter-spacing: 0.03em; }
.brand-subtitle { margin-top: 6px; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.nav-section-label { margin: 38px 0 10px; color: var(--harbour); font-size: 10px; font-weight: 700; letter-spacing: 0.22em; }
.nav-list { display: grid; gap: 8px; }

.nav-item {
  display: block;
  padding: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  text-decoration: none;
}

.nav-item:hover { color: var(--white); background: var(--accent-soft); }
.nav-item.active { color: var(--white); background: var(--harbour); border-color: rgba(211, 217, 218, 0.3); font-weight: 700; }

.sidebar-footnote {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 12px;
  color: var(--muted);
  background: rgba(136, 21, 12, 0.4);
  border: 1px solid rgba(211, 217, 218, 0.16);
  border-radius: 10px;
  font-size: 11px;
}

.sidebar-footnote strong { color: var(--white); font-size: 12px; }

.main-content { flex: 1; padding: 24px; background: var(--chimney); }

.glass-panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px);
}

.topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 64px;
  padding: 14px 20px;
}

.topbar-title { min-width: 220px; color: var(--white); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.topbar-nav { display: flex; gap: 24px; color: var(--muted); font-size: 13px; }
.topbar-nav-active { color: var(--white); font-weight: 700; }
.topbar-meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.mail-connection { display: inline-flex; align-items: center; gap: 8px; color: var(--ash); font-size: 11px; white-space: nowrap; }
.connection-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(136, 21, 12, 0.16); }
.connection-dot.state-disconnected, .connection-dot.state-error { background: #d86f66; box-shadow: 0 0 0 4px rgba(136, 21, 12, 0.18); }
.connection-dot.state-connected { background: #76d99a; box-shadow: 0 0 0 4px rgba(37, 132, 77, 0.18); }
.mail-connection-button { min-height: 30px; padding: 0 10px; font-size: 10px; }
.topbar-employee-accounts { margin: 0; }
.topbar-employee-accounts .employee-account-popover { position: absolute; z-index: 60; top: calc(100% + 8px); right: 20px; width: min(560px, calc(100% - 40px)); max-height: calc(100vh - 110px); overflow-y: auto; overflow-x: hidden; padding: 16px; background: var(--panel-bg); border: 1px solid rgba(211, 217, 218, .24); border-radius: 12px; box-shadow: 0 20px 42px rgba(0, 0, 0, .34); }

@media (max-width: 720px) {
  .topbar-employee-accounts .employee-account-popover { width: calc(100% - 40px); }
}

.hero { margin-top: 16px; padding: 24px; }
.section-heading, .purchase-list-heading, .results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 7px; color: var(--harbour); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--white); font-size: 28px; line-height: 1.15; }
h2 { margin-bottom: 6px; color: var(--white); font-size: 18px; }
.section-subtitle, .invoice-placeholder p { margin: 0; color: var(--muted); font-size: 13px; }

.search-row { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 24px; }
.search-box { display: flex; flex: none; width: 100%; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: rgba(211, 217, 218, 0.14); border: 1px solid rgba(211, 217, 218, 0.32); border-radius: 12px; backdrop-filter: blur(20px); }
.search-box:focus-within { background: rgba(66, 115, 144, 0.22); border-color: rgba(211, 217, 218, 0.62); box-shadow: 0 0 0 4px rgba(66, 115, 144, 0.14); }
.search-icon { color: var(--ash); font-size: 22px; line-height: 1; }
.search-box input { width: 100%; color: var(--white); background: transparent; border: 0; outline: 0; }
.search-box input::placeholder { color: var(--muted); }
.search-hint { color: var(--muted); font-size: 12px; }
.search-scope-toggle { display: inline-flex; align-items: center; gap: 3px; min-height: 48px; padding: 4px; background: rgba(211, 217, 218, 0.08); border: 1px solid rgba(211, 217, 218, 0.2); border-radius: 12px; }
.search-scope-button { min-height: 38px; padding: 0 14px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 800; white-space: nowrap; transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease; }
.search-scope-button:hover { color: var(--white); background: rgba(66, 115, 144, 0.2); }
.search-scope-button.is-active { color: var(--white); background: rgba(66, 115, 144, 0.68); border-color: rgba(211, 217, 218, 0.5); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16); }
.search-scope-button:focus-visible { outline: 2px solid var(--ash); outline-offset: 2px; }

.button { min-height: 36px; padding: 0 15px; color: var(--white); border: 1px solid rgba(211, 217, 218, 0.28); border-radius: 8px; font-size: 12px; font-weight: 700; }
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(0.98); }
.blue-button { height: 48px; background: var(--harbour); }
.clay-button { background: var(--clay); }
.quiet-button { background: rgba(211, 217, 218, 0.16); color: var(--muted); }
.mode-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 12px; border-radius: 14px; color: var(--white); font-size: 11px; font-weight: 700; white-space: nowrap; }
.mode-pill.blue { background: var(--harbour); }
.mode-pill.clay { background: var(--clay); }

.results-heading { align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(211, 217, 218, 0.14); }
.results-heading-copy { min-width: 0; }
.results-heading span { color: var(--muted); font-size: 12px; }
.result-count { padding: 6px 10px; color: var(--ash) !important; background: rgba(211, 217, 218, 0.1); border: 1px solid rgba(211, 217, 218, 0.18); border-radius: 8px; }
.supplier-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.supplier-filter-label { color: var(--muted) !important; font-size: 11px !important; font-weight: 700; letter-spacing: 0.04em; }
.supplier-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.supplier-filter-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; color: var(--ash); background: rgba(211, 217, 218, 0.1); border: 1px solid rgba(211, 217, 218, 0.22); border-radius: 999px; font-size: 11px; font-weight: 700; transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease; }
.supplier-filter-chip:hover { color: var(--white); background: rgba(66, 115, 144, 0.28); border-color: rgba(211, 217, 218, 0.45); transform: translateY(-1px); }
.supplier-filter-chip.is-active { color: var(--white); background: rgba(66, 115, 144, 0.58); border-color: rgba(211, 217, 218, 0.6); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16); }
.supplier-filter-brand { display: inline-flex; align-items: center; justify-content: center; width: 74px; height: 24px; overflow: hidden; padding: 2px 6px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)); border: 1px solid rgba(211, 217, 218, 0.24); border-radius: 7px; }
.supplier-filter-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.supplier-filter-brand-c img { transform: scale(1.16); }
.supplier-filter-brand-m img { transform: scale(1.06); }
.supplier-filter-brand-b img { transform: scale(1.08); }
.supplier-filter-fallback { color: var(--white); font-size: 10px; font-weight: 800; }

.results-table { display: grid; gap: 8px; margin-top: 14px; }
.results-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; padding: 8px 0 2px; }
.pagination-button { min-width: 72px; min-height: 30px; padding: 0 10px; color: var(--ash); background: rgba(211, 217, 218, 0.1); border: 1px solid rgba(211, 217, 218, 0.24); border-radius: 8px; font-size: 11px; font-weight: 700; }
.pagination-button:hover:not(:disabled), .pagination-button:focus-visible:not(:disabled) { color: var(--white); background: rgba(66, 115, 144, 0.36); border-color: rgba(211, 217, 218, 0.5); }
.pagination-button:disabled { cursor: not-allowed; opacity: 0.38; }
.pagination-status { min-width: 72px; color: var(--muted); font-size: 11px; text-align: center; }
.result-row { display: grid; grid-template-columns: minmax(200px, 2.25fr) minmax(74px, 0.8fr) minmax(130px, 1.2fr) minmax(78px, 0.7fr) minmax(100px, 1fr) minmax(78px, 0.75fr) 150px; align-items: center; min-height: 46px; padding: 0 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(211, 217, 218, 0.2); border-radius: 10px; backdrop-filter: blur(18px); }
.result-row.header { min-height: 34px; color: var(--muted); background: rgba(211, 217, 218, 0.1); font-size: 11px; font-weight: 700; }
.result-row:not(.header) { color: var(--ash); font-size: 13px; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; transform-origin: center; }
.result-row:not(.header):hover, .result-row:not(.header):focus-within { z-index: 1; background: rgba(66, 115, 144, 0.28); border-color: rgba(211, 217, 218, 0.48); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), inset 3px 0 0 var(--harbour); transform: translateY(-2px) scale(1.008); }
.result-row.featured { background: rgba(255, 255, 255, 0.08); }
.result-row.is-added { padding-top: 3px; padding-bottom: 3px; background: rgba(179, 113, 33, 0.3); border-color: rgba(211, 217, 218, 0.26); box-shadow: 0 8px 18px rgba(179, 113, 33, 0.12); }
.result-row:not(.header).is-added { background: rgba(179, 113, 33, 0.3); border-color: rgba(211, 217, 218, 0.26); box-shadow: 0 8px 18px rgba(179, 113, 33, 0.12); }
.result-row.is-online { min-height: 42px; padding-top: 5px; padding-bottom: 5px; background: rgba(66, 115, 144, .13); }
.result-row.is-online .result-product-name, .result-row.is-online .result-price, .result-row.is-online .product-code { color: var(--white); }
.result-row.is-online .result-product-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.result-row.is-online .result-muted { color: rgba(211, 217, 218, .56); font-size: 11px; }
.result-row.is-online .result-spec { color: var(--ash); font-weight: 700; }
.result-row.is-online .result-price { font-size: 14px; }
.online-source-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; color: #d9f0c9; background: rgba(95, 153, 53, .18); border: 1px solid rgba(129, 190, 86, .35); border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.supplier-cell { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.supplier-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-logo { display: inline-grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; overflow: hidden; color: var(--white); background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(255, 255, 255, 0.42); border-radius: 8px; box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.supplier-logo-large { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 13px; }
.supplier-logo img { width: 100%; height: 100%; object-fit: contain; }
.supplier-logo-c img { width: 88%; height: 72%; }
.supplier-logo-m img { width: 100%; height: 100%; object-fit: cover; }
.supplier-logo-b img { width: 92%; height: 92%; }
.supplier-logo-fallback { color: var(--chimney); font-size: 11px; font-weight: 800; }
.supplier-wordmark { position: relative; display: inline-flex; align-items: center; justify-content: center; justify-self: end; width: 148px; height: 42px; flex: 0 0 148px; overflow: hidden; padding: 4px 10px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)); border: 1px solid rgba(211, 217, 218, 0.3); border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 18px rgba(0, 0, 0, 0.16); }
.supplier-wordmark img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
.supplier-wordmark-c img { width: 100%; height: 100%; transform: scale(1.16); }
.supplier-wordmark-m img { width: 100%; height: 100%; object-fit: contain; object-position: center; transform: scale(1.06); }
.supplier-wordmark-b img { width: 100%; height: 100%; transform: scale(1.08); }
.supplier-wordmark-fallback { position: relative; z-index: 1; color: var(--chimney); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; }
.result-row strong { color: var(--white); }
.recommendation-badge { display: inline-flex; align-items: center; min-height: 20px; margin-left: 9px; padding: 0 7px; color: #ffe4a9; background: rgba(179, 113, 33, 0.3); border: 1px solid rgba(255, 220, 161, 0.72); border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; vertical-align: middle; white-space: nowrap; }
.purchase-count { color: var(--ash); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-alert-badge { display: inline-block; margin-left: 5px; padding: 3px 6px; border: 1px solid currentColor; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: 0.02em; vertical-align: middle; }
.price-date { display: block; margin-top: 4px; color: rgba(242, 245, 250, 0.58); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.02em; }
.price-change-up { color: #b8f2ce; background: rgba(37, 132, 77, 0.28); border-color: rgba(184, 242, 206, 0.46); }
.price-change-down { color: #ffd5cf; background: rgba(136, 21, 12, 0.6); border-color: rgba(255, 213, 207, 0.42); }
.row-action { min-height: 30px; color: var(--white); background: rgba(66, 115, 144, 0.82); border: 1px solid rgba(211, 217, 218, 0.26); border-radius: 7px; font-size: 11px; font-weight: 700; transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.row-action:hover { background: rgba(66, 115, 144, 1); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2); transform: translateY(-1px); }
.row-action:active { transform: translateY(0) scale(0.97); }
.row-action.added { background: rgba(179, 113, 33, 0.88); border-color: rgba(255, 220, 161, 0.42); }
.product-code { color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.row-quantity-controls { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.row-quantity { min-width: 68px; color: #ffe0a6; font-size: 10px; font-weight: 800; text-align: center; }

.purchase-list-section { margin-top: 22px; }
.purchase-list-heading { align-items: center; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.supplier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.supplier-lane { position: relative; z-index: 0; min-height: 420px; padding: 18px; border: 1px solid rgba(211, 217, 218, 0.3); border-radius: 16px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); backdrop-filter: blur(24px); transform-origin: center top; transition: transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1), border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease, filter 220ms ease; }
.supplier-lane { background: rgba(37, 45, 55, 0.58); }
.supplier-lane.c { background: linear-gradient(180deg, rgba(125, 174, 198, 0.34) 0%, rgba(66, 115, 144, 0.3) 42%, rgba(37, 45, 55, 0.58) 82%); border-top-color: rgba(157, 198, 215, 0.68); }
.supplier-lane.m { background: linear-gradient(180deg, rgba(66, 115, 144, 0.3) 0%, rgba(55, 95, 117, 0.28) 34%, rgba(127, 157, 171, 0.24) 66%, rgba(37, 45, 55, 0.58) 82%); border-top-color: rgba(127, 168, 185, 0.62); }
.supplier-lane.b { background: linear-gradient(180deg, rgba(55, 95, 117, 0.28) 0%, rgba(104, 139, 152, 0.26) 34%, rgba(191, 201, 205, 0.22) 68%, rgba(37, 45, 55, 0.58) 82%); border-top-color: rgba(191, 210, 218, 0.62); }
.supplier-grid:has(.supplier-lane:hover) .supplier-lane:not(:hover), .supplier-grid:has(.supplier-lane:focus-within) .supplier-lane:not(:focus-within) { opacity: 0.72; filter: saturate(0.78); }
.supplier-lane:hover, .supplier-lane:focus-within { z-index: 2; border-color: rgba(211, 217, 218, 0.62); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(211, 217, 218, 0.12); transform: translateY(-6px) scale(1.025); }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(211, 217, 218, 0.24); border-radius: 9px; }
.lane-title { display: grid; grid-template-columns: minmax(0, 1fr) 148px; align-items: center; gap: 14px; width: 100%; min-width: 0; }
.lane-head h3 { margin: 0; color: var(--white); font-size: 16px; }
.po-field { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px; background: rgba(136, 21, 12, 0.26); border: 1px solid rgba(255, 213, 207, 0.3); border-radius: 9px; }
.po-field label { color: #ffd5cf; font-size: 12px; font-weight: 800; }
.po-field input { min-width: 0; flex: 1; padding: 5px 8px; color: #ffd5cf; background: rgba(136, 21, 12, 0.2); border: 1px solid rgba(255, 213, 207, 0.3); border-radius: 6px; outline: 0; font-size: 11px; }
.po-field:focus-within { background: rgba(136, 21, 12, 0.36); border-color: rgba(255, 213, 207, 0.62); box-shadow: 0 0 0 3px rgba(136, 21, 12, 0.18); }
.po-field input::placeholder { color: rgba(255, 213, 207, 0.7); }
.lane-items { display: grid; gap: 6px; margin-top: 8px; }
.lane-item { padding: 7px 8px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(211, 217, 218, 0.22); border-radius: 8px; backdrop-filter: blur(20px); }
.lane-item:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(211, 217, 218, 0.4); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(0, 0, 0, 0.16); }
.lane-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lane-item-name { min-width: 0; color: var(--white); font-size: 11px; line-height: 1.25; font-weight: 700; }
.lane-item-quantity { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; }
.quantity { padding: 2px 6px; color: var(--white); background: rgba(211, 217, 218, 0.18); border-radius: 10px; font-size: 10px; line-height: 1.2; }
.lane-item-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.lane-item-code { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.copy-code-button { min-height: 22px; padding: 0 7px; color: var(--ash); background: rgba(211, 217, 218, 0.12); border: 1px solid rgba(211, 217, 218, 0.24); border-radius: 999px; font-size: 10px; font-weight: 700; transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease; }
.copy-code-button:hover { color: var(--white); background: rgba(66, 115, 144, 0.42); border-color: rgba(211, 217, 218, 0.5); transform: translateY(-1px); }
.copy-code-button.is-copied { color: #b8f2ce; background: rgba(37, 132, 77, 0.28); border-color: rgba(184, 242, 206, 0.46); }
.lane-item-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 8px; }
.mini-action { width: 20px; height: 19px; padding: 0; color: var(--ash); background: rgba(211, 217, 218, 0.1); border: 1px solid rgba(211, 217, 218, 0.2); border-radius: 5px; font-size: 13px; line-height: 16px; }
.mini-action:hover { background: rgba(66, 115, 144, 0.45); }
.mini-action:active { transform: scale(0.92); }
.lane-action { width: 100%; margin-top: 12px; background: rgba(66, 115, 144, 0.88); }
.supplier-lane.b .lane-action:not(.lane-action-disabled) { background: rgba(66, 115, 144, 0.88); }
.lane-action-stack { display: grid; gap: 8px; margin-top: 12px; }
.lane-action-stack .lane-action { margin-top: 0; text-align: center; text-decoration: none; }
.lane-action-disabled, .lane-action-disabled:hover, .lane-action-disabled:active { color: rgba(211, 217, 218, 0.62); background: rgba(211, 217, 218, 0.1); border-color: rgba(211, 217, 218, 0.2); cursor: not-allowed; filter: none; opacity: 0.78; transform: none; }
.supplier-lane.b .lane-action-disabled, .supplier-lane.b .lane-action-disabled:hover, .supplier-lane.b .lane-action-disabled:active { color: rgba(211, 217, 218, 0.62); background: rgba(211, 217, 218, 0.1); border-color: rgba(211, 217, 218, 0.2); cursor: not-allowed; filter: none; opacity: 0.78; transform: none; }
.send-order-button:disabled, .send-order-button:disabled:hover, .send-order-button:disabled:active { color: rgba(211, 217, 218, 0.62); background: rgba(211, 217, 218, 0.1); border-color: rgba(211, 217, 218, 0.2); cursor: not-allowed; filter: none; opacity: 0.78; transform: none; }
.po-field-error { display: block; margin-top: 6px; color: #ffd5cf; font-size: 11px; font-weight: 700; }
.po-field input.is-missing { animation: po-field-flash 420ms ease-in-out 3; border-color: #ffd5cf; box-shadow: 0 0 0 4px rgba(216, 111, 102, 0.22); }
@keyframes po-field-flash { 0%, 100% { background: rgba(136, 21, 12, 0.2); } 50% { background: rgba(136, 21, 12, 0.58); } }
.order-output { margin-top: 16px; padding: 16px 18px; background: rgba(37, 45, 55, 0.62); }
.order-output-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.order-output-actions { display: flex; align-items: center; gap: 8px; }
.order-output-head h3 { margin: 4px 0 0; color: var(--white); font-size: 15px; }
.order-output-warning { margin-top: 12px; padding: 9px 11px; color: #ffd5cf; background: rgba(136, 21, 12, 0.35); border: 1px solid rgba(255, 213, 207, 0.2); border-radius: 8px; font-size: 12px; }
.brakes-cart-progress { margin-top: 14px; padding: 14px; border: 1px solid rgba(211, 217, 218, 0.14); border-radius: 11px; background: rgba(0, 0, 0, 0.16); }
.brakes-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ash); font-size: 12px; }
.brakes-progress-heading strong { color: var(--white); font-size: 13px; }
.brakes-cart-progress progress { width: 100%; height: 9px; margin: 11px 0 8px; overflow: hidden; border: 0; border-radius: 999px; background: rgba(211, 217, 218, 0.14); }
.brakes-cart-progress progress::-webkit-progress-bar { background: rgba(211, 217, 218, 0.14); border-radius: 999px; }
.brakes-cart-progress progress::-webkit-progress-value { background: linear-gradient(90deg, var(--harbour-blue), #63a6c9); border-radius: 999px; transition: width 240ms ease; }
.brakes-cart-progress progress::-moz-progress-bar { background: linear-gradient(90deg, var(--harbour-blue), #63a6c9); border-radius: 999px; }
.brakes-progress-detail { color: rgba(211, 217, 218, 0.72); font-size: 11px; }
.brakes-failure-list { margin: 10px 0 0; padding: 9px 10px 9px 26px; color: #ffd5cf; background: rgba(136, 21, 12, 0.24); border-radius: 8px; font-size: 11px; }
.order-output-content { max-height: 260px; overflow: auto; margin: 12px 0 0; padding: 13px; color: var(--ash); background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(211, 217, 218, 0.14); border-radius: 9px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

.invoice-placeholder { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 18px 20px; }
.invoice-import-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 420px; }
.invoice-file-name { max-width: 230px; overflow: hidden; color: var(--ash); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-history-summary { margin-top: 8px !important; color: var(--harbour) !important; font-size: 12px !important; font-weight: 700; }
.import-status { padding: 6px 9px; color: var(--ash); background: rgba(66, 115, 144, 0.22); border: 1px solid rgba(66, 115, 144, 0.4); border-radius: 999px; font-size: 11px; }
.invoice-import-list { display: grid; flex-basis: 100%; gap: 8px; margin-top: 2px; }
.invoice-import-item { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 14px; padding: 9px 11px; color: var(--ash); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(211, 217, 218, 0.14); border-radius: 9px; font-size: 11px; }
.invoice-import-item strong { overflow: hidden; color: var(--white); text-overflow: ellipsis; white-space: nowrap; }
.invoice-import-item span { color: var(--muted); }
.import-item-status { color: var(--clay) !important; }

.startup-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--harbour) 28%, transparent), transparent 35%),
    linear-gradient(145deg, var(--screen-start), var(--chimney) 58%, var(--screen-end));
}
.startup-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--white);
  text-align: center;
}
.startup-brand-mark {
  width: min(228px, 66vw);
  height: auto;
  margin: 0 0 12px;
  padding: 15px 20px;
  border-radius: 22px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .22);
}
.startup-brand h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(26px, 7vw, 38px);
  letter-spacing: -.02em;
}
.startup-loader {
  position: relative;
  width: 112px;
  height: 3px;
  margin-top: 24px;
  overflow: hidden;
  background: var(--line);
  border-radius: 999px;
}
.startup-loader::after {
  position: absolute;
  inset: 0;
  width: 45%;
  content: "";
  background: var(--harbour);
  border-radius: inherit;
  animation: startup-progress 1s ease-in-out infinite;
}
@keyframes startup-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(245%); }
}
@media (prefers-reduced-motion: reduce) {
  .startup-loader::after { width: 100%; animation: none; }
}

.auth-screen {
  min-height: 100vh;
  padding: clamp(28px, 6vh, 72px) clamp(24px, 6vw, 88px);
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--harbour) 36%, transparent), transparent 34%),
    radial-gradient(circle at 84% 74%, rgba(136, 21, 12, .2), transparent 30%),
    linear-gradient(145deg, var(--screen-start), var(--chimney) 58%, var(--screen-end));
}
.auth-layout { width: min(680px, 100%); margin: 0 auto; }
.auth-card { padding: clamp(34px, 5vw, 60px); }
.auth-brand-panel { display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: linear-gradient(145deg, rgba(66, 115, 144, .38), rgba(255, 255, 255, .07) 58%, rgba(37, 45, 55, .32)); }
.auth-brand-mark { width: 46px; height: 46px; margin-bottom: 34px; border-radius: 14px; font-size: 19px; }
.auth-brand-panel h1 { max-width: 560px; margin-bottom: 16px; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.035em; line-height: 1.05; }
.auth-brand-copy { max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.role-preview-list { display: grid; gap: 10px; margin-top: 48px; }
.role-preview { padding: 14px 16px; background: rgba(37, 45, 55, .38); border: 1px solid rgba(211, 217, 218, .18); border-radius: 12px; }
.role-preview div { display: grid; gap: 3px; }
.role-preview strong { color: var(--white); font-size: 13px; }
.role-preview div span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.auth-card { display: flex; flex-direction: column; justify-content: center; min-height: 620px; background: rgba(255, 255, 255, .1); }
.auth-card-heading { margin-bottom: 5px; }
.auth-logo { display: block; width: 116px; height: auto; margin: 0 0 22px; padding: 8px 10px; object-fit: contain; background: #fffaf1; border: 1px solid rgba(198, 167, 72, .42); border-radius: 15px; box-shadow: 0 12px 28px rgba(0, 0, 0, .16); }
.auth-card-heading h1 { font-size: 30px; }
.theme-switcher { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.theme-switcher-label { margin-right: 2px; color: var(--muted); font-size: 11px; font-weight: 700; }
.language-switcher { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .055); }
.language-switcher-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.language-choice-group { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.language-choice { min-width: 78px; padding: 8px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; transition: color .18s ease, background .18s ease, transform .18s ease; }
.language-choice:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.language-choice.is-active { color: #fff; background: var(--harbour); box-shadow: 0 7px 16px rgba(42, 113, 151, .24); }
.theme-choice { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; color: var(--muted); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 10px; font-size: 11px; font-weight: 800; }
.theme-choice:hover { color: var(--white); border-color: color-mix(in srgb, var(--harbour) 72%, var(--ash)); transform: translateY(-1px); }
.theme-choice.is-active { color: var(--white); background: var(--accent-soft); border-color: color-mix(in srgb, var(--harbour) 74%, var(--ash)); box-shadow: 0 7px 16px rgba(0, 0, 0, .18); }
.theme-swatch { width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid rgba(255, 255, 255, .42); border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.theme-swatch-blue { background: #427390; }
.theme-swatch-sand { background: #b8794f; }
.theme-swatch-forest { background: #4f8b74; }
.theme-swatch-cream { background: #f1e9dc; border-color: rgba(81, 74, 66, .35); }
.auth-form { display: grid; gap: 16px; margin-top: 25px; }
.auth-form label, .employee-form-grid label, .employee-manual-label, .admin-match-field { display: grid; gap: 7px; color: var(--ash); font-size: 12px; font-weight: 700; }
.auth-form .auth-remember { display: grid; grid-template-columns: 20px auto 1fr; align-items: center; gap: 8px; min-height: 28px; cursor: pointer; }
.auth-form .auth-remember input { width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: var(--harbour); }
.auth-form .auth-remember small { justify-self: end; color: var(--muted); font-size: 11px; font-weight: 600; }
.auth-form input, .employee-app input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 0 13px; color: var(--white); background: rgba(211, 217, 218, .1); border: 1px solid rgba(211, 217, 218, .26); border-radius: 10px; outline: 0; }
.auth-form input::placeholder, .employee-app input::placeholder { color: rgba(211, 217, 218, .5); }
.auth-form input:focus, .employee-app input:focus { background: rgba(66, 115, 144, .2); border-color: rgba(211, 217, 218, .58); box-shadow: 0 0 0 4px rgba(66, 115, 144, .14); }
.auth-submit { width: 100%; justify-content: space-between; margin-top: 3px; padding: 0 17px; }
.auth-card-foot { display: flex; align-items: center; gap: 9px; margin-top: 26px; padding-top: 18px; color: var(--muted); border-top: 1px solid rgba(211, 217, 218, .14); font-size: 11px; }
.auth-error { color: #ffb5b5; margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.auth-error.is-success { color: #a9e7c1; }
.auth-note { color: var(--ash); font-size: .92rem; }
.employee-app { min-height: 100vh; padding: 24px; background: linear-gradient(145deg, var(--screen-start), var(--chimney) 58%, var(--screen-end)); }
.employee-topbar, .employee-notebook { width: min(1120px, 100%); margin: 0 auto; }
.employee-topbar { position: relative; z-index: 40; display: flex; align-items: center; gap: 22px; min-height: 68px; padding: 12px 16px; overflow: visible; }
.employee-brand { display: flex; align-items: center; gap: 11px; min-width: 230px; }
.employee-brand .brand-mark { margin: 0; }
.employee-brand > div:last-child { display: grid; gap: 3px; }
.employee-brand strong { color: var(--white); font-size: 13px; letter-spacing: .04em; }
.employee-brand span { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.role-account { display: inline-flex; align-items: center; gap: 11px; margin-left: auto; }
.role-account > div { display: grid; gap: 2px; text-align: right; }
.role-account span { color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.role-account strong { color: var(--white); font-size: 11px; }
.role-pill { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; color: var(--white) !important; background: rgba(66, 115, 144, .52); border: 1px solid rgba(211, 217, 218, .26); border-radius: 999px; font-size: 9px !important; font-weight: 800; letter-spacing: .04em !important; white-space: nowrap; }
.admin-role-account { margin-left: auto; }
.employee-notebook { margin-top: 16px; padding: clamp(24px, 4vw, 42px); }
.employee-head, .employee-form-grid, .admin-request-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.employee-head { align-items: flex-start; }
.employee-head-actions { display: flex; align-items: flex-start; gap: 10px; }
.notebook-status { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; color: var(--muted); background: rgba(211, 217, 218, .08); border: 1px solid rgba(211, 217, 218, .16); border-radius: 999px; font-size: 10px; white-space: nowrap; }
.employee-form-grid { margin: 28px 0 14px; align-items: stretch; padding: 18px; background: rgba(37, 45, 55, .38); border: 1px solid rgba(211, 217, 218, .14); border-radius: 14px; }
.employee-form-grid > label:first-child { flex: 1; }
.employee-form-grid > label { grid-template-rows: auto 46px auto; align-content: start; }
.employee-form-grid .search-box { width: 100%; height: 46px; }
.employee-form-grid .search-box input, .employee-form-grid .search-box input:focus { min-height: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.employee-form-grid input { height: 46px; min-height: 46px; }
.employee-form-grid small { min-height: 14px; color: var(--muted); font-size: 10px; line-height: 14px; }
.employee-submit { min-width: 170px; margin-top: 14px; }
.list-title { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 22px; border-top: 1px solid rgba(211, 217, 218, .14); }
.employee-product-results, .employee-request-list-wrap, .admin-employee-request-list { display: grid; gap: 8px; margin: 14px 0 20px; }
.employee-request-date-group { display: grid; gap: 8px; }
.employee-request-date-group + .employee-request-date-group { margin-top: 18px; }
.employee-request-date-title { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0 14px 2px; color: var(--ash); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.employee-request-date-title::after { content: ""; height: 1px; flex: 1; background: rgba(211, 217, 218, .16); }
.employee-request-date-items { display: grid; gap: 8px; min-width: 0; }
.employee-request-load-more { display: flex; justify-content: center; padding-top: 4px; }
.employee-request-load-more .button { min-width: 150px; }
.employee-product-option, .admin-match-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid rgba(180, 202, 220, .28); border-radius: 12px; background: rgba(68, 90, 107, .32); color: inherit; }
.employee-product-select { display: grid; flex: 1; gap: 5px; min-width: 0; padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.employee-product-select:hover { color: var(--white); }
.employee-add-product { flex: 0 0 auto; min-height: 32px; padding: 0 10px; }
.employee-product-option.is-selected { border-color: #e4b85c; background: rgba(228, 184, 92, .18); }
.employee-product-copy { display: grid; gap: 5px; }
.selected-check { align-self: center; color: #ffe0a6 !important; font-weight: 800; white-space: nowrap; }
.employee-selected-product { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; margin: 0 0 14px; padding: 12px 14px; color: var(--white); background: rgba(179, 113, 33, .2); border: 1px solid rgba(255, 220, 161, .45); border-radius: 12px; }
.employee-selected-product span { color: var(--ash); font-size: .88rem; }
.employee-selected-actions { display: flex; grid-column: 2; grid-row: 1 / span 2; gap: 7px; align-items: center; }
.employee-product-option span, .employee-request-row span, .admin-request-row span, .employee-empty { color: var(--ash); font-size: .9rem; }
.employee-request-card { border-radius: 12px; background: rgba(36, 50, 63, .55); border: 1px solid rgba(211, 217, 218, .12); }
.employee-request-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(104px, 118px) minmax(78px, 92px) minmax(128px, 142px); align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(36, 50, 63, .55); }
.admin-request-row { padding: 12px 14px; border-radius: 12px; background: rgba(36, 50, 63, .55); }
.employee-request-info, .employee-request-row > div:first-child, .admin-request-row > div:first-child { display: grid; min-width: 0; gap: 5px; }
.employee-request-info strong, .employee-request-info span { overflow-wrap: anywhere; }
.employee-request-state { justify-self: start; line-height: 1.3; white-space: nowrap; }
.employee-request-state-wide { grid-column: 3 / 5; justify-self: end; max-width: 100%; text-align: right; white-space: normal; }
.employee-request-actions { display: flex; width: 100%; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: nowrap; }
.employee-request-actions .button { flex: 0 0 auto; min-width: max-content; padding-inline: 9px; white-space: nowrap; }
.request-package-quantity { display: inline-flex; align-items: center; gap: 5px; color: #ffe0a6 !important; font-weight: 800; white-space: nowrap; }
.request-pending { color: #ffd29b !important; }
.employee-request-edit { display: grid; grid-template-columns: 130px minmax(180px, 1fr) auto auto; align-items: end; gap: 8px; padding: 0 14px 14px; }
.employee-request-edit label { display: grid; gap: 5px; color: var(--ash); font-size: .82rem; }
.employee-request-edit input { min-height: 36px; }
.employee-request-edit .auth-error { grid-column: 1 / -1; }
.danger-button { color: #ffd5cf; border-color: rgba(255, 181, 181, .35); background: rgba(136, 21, 12, .32); }
.admin-request-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr); align-items: center; border: 1px solid rgba(211, 217, 218, .14); }
.admin-request-row > div:first-child { display: grid; gap: 5px; }
.admin-request-message { margin: 14px 0 0; padding: 9px 12px; color: #a9e7c1; background: rgba(37, 132, 77, .16); border: 1px solid rgba(169, 231, 193, .25); border-radius: 9px; font-size: .85rem; }
.admin-request-message.is-error { color: #ffb5b5; background: rgba(136, 21, 12, .22); border-color: rgba(255, 181, 181, .26); }
.request-status { color: #a9e7c1 !important; }
.request-rejected { color: #ffb5b5 !important; }
.admin-match-field { min-width: 220px; }
.admin-match-block { min-width: 280px; }
.admin-match-results { display: grid; gap: 5px; margin-top: 6px; }
.admin-match-option { padding: 8px 10px; font-size: .85rem; }
.admin-request-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.admin-reject-details { position: relative; color: var(--ash); font-size: 11px; }
.admin-reject-details summary { min-height: 30px; padding: 7px 10px; cursor: pointer; color: #ffd5cf; background: rgba(136, 21, 12, .22); border: 1px solid rgba(255, 181, 181, .28); border-radius: 7px; font-weight: 700; list-style: none; }
.admin-reject-details summary::-webkit-details-marker { display: none; }
.admin-reject-controls { display: flex; align-items: center; gap: 7px; position: absolute; z-index: 10; top: 36px; right: 0; min-width: 245px; padding: 10px; background: var(--panel-bg); border: 1px solid rgba(255, 181, 181, .28); border-radius: 9px; box-shadow: 0 16px 30px rgba(0, 0, 0, .28); }
.admin-reject-controls select { min-height: 32px; min-width: 145px; padding: 0 7px; color: var(--ash); background: rgba(211, 217, 218, .1); border: 1px solid rgba(211, 217, 218, .24); border-radius: 6px; }
.employee-requests-panel { margin-top: 16px; padding: 24px; }
.employee-requests-panel .section-heading { align-items: center; margin-bottom: 14px; }
.employee-requests-panel .heading-actions { display: flex; align-items: center; gap: 8px; }
.employee-requests-panel .admin-employee-request-list { margin: 14px 0 0; }
.employee-requests-panel .admin-request-row { min-height: 76px; padding: 14px 16px; background: rgba(36, 50, 63, .58); border-color: rgba(211, 217, 218, .18); }
.employee-account-details { color: var(--ash); }
.employee-account-details summary { display: inline-flex; align-items: center; min-height: 36px; padding: 0 15px; cursor: pointer; color: var(--white); background: rgba(211, 217, 218, .16); border: 1px solid rgba(211, 217, 218, .28); border-radius: 8px; font-size: 12px; font-weight: 700; list-style: none; }
.employee-account-details summary::-webkit-details-marker { display: none; }
.employee-account-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 2px; padding-bottom: 14px; border-bottom: 1px solid rgba(211, 217, 218, .14); }
.employee-account-form input { width: 100%; min-width: 0; }
.employee-account-form #new-employee-password { grid-column: 1 / -1; }
.employee-account-form .button { grid-column: 1 / -1; min-width: 0; white-space: nowrap; }
.employee-account-list { display: grid; gap: 8px; margin-top: 14px; }
.employee-account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 13px 14px; background: rgba(36, 50, 63, .55); border: 1px solid rgba(211, 217, 218, .14); border-radius: 10px; }
.employee-account-row > div { display: grid; grid-column: 1 / -1; gap: 4px; }
.employee-account-row > input { width: 100%; min-width: 0; }
.employee-account-row > .button { min-height: 38px; padding-inline: 12px; white-space: nowrap; }
.employee-account-row span { color: var(--muted); font-size: .78rem; }
.password-details { color: var(--ash); font-size: 11px; }
.password-details summary { min-height: 36px; padding: 10px 12px; cursor: pointer; color: var(--ash); background: rgba(211, 217, 218, .12); border: 1px solid rgba(211, 217, 218, .24); border-radius: 8px; font-weight: 700; list-style: none; }
.password-details summary::-webkit-details-marker { display: none; }
.password-form { display: grid; gap: 8px; margin-top: 8px; padding: 12px; background: var(--panel-bg); border: 1px solid rgba(211, 217, 218, .2); border-radius: 10px; }
.password-form input { min-height: 36px; padding: 0 10px; color: var(--white); background: rgba(211, 217, 218, .1); border: 1px solid rgba(211, 217, 218, .24); border-radius: 7px; }
.topbar-password { position: static; }
.topbar-password .password-form { position: absolute; z-index: 60; top: calc(100% + 8px); right: 20px; width: 260px; box-shadow: 0 18px 36px rgba(0, 0, 0, .3); }
.employee-topbar .password-details { position: static; }
.employee-topbar .password-form { position: absolute; z-index: 70; top: calc(100% + 8px); right: 16px; width: min(280px, calc(100% - 32px)); margin-top: 0; box-shadow: 0 18px 36px rgba(0, 0, 0, .34); }
.supplier-lane.just-updated { border-color: rgba(255, 220, 161, .8); box-shadow: 0 0 0 4px rgba(179, 113, 33, .2), 0 18px 40px rgba(0, 0, 0, .24); }

:root[data-theme="cream"] .glass-panel {
  background: #ffffff;
  border-color: rgba(81, 74, 66, .34);
  box-shadow: 0 16px 34px rgba(90, 70, 48, .14);
  backdrop-filter: none;
}
:root[data-theme="cream"] .auth-card,
:root[data-theme="cream"] .employee-topbar,
:root[data-theme="cream"] .employee-notebook,
:root[data-theme="cream"] .topbar,
:root[data-theme="cream"] .hero,
:root[data-theme="cream"] .employee-requests-panel {
  background: #fffaf1;
}
:root[data-theme="cream"] .supplier-lane {
  background: #f7efe3;
  border-color: rgba(81, 74, 66, .32);
  box-shadow: 0 18px 40px rgba(90, 70, 48, .12);
  backdrop-filter: none;
}
:root[data-theme="cream"] .supplier-lane.c { background: linear-gradient(180deg, #e8d8c2, #f8f0e5 62%); }
:root[data-theme="cream"] .supplier-lane.m { background: linear-gradient(180deg, #eee1cf, #faf3e8 62%); }
:root[data-theme="cream"] .supplier-lane.b { background: linear-gradient(180deg, #f3e9da, #fcf7ee 62%); }
:root[data-theme="cream"] .auth-form input {
  color: #322c26;
  background: #eee4d5;
  border-color: rgba(81, 74, 66, .38);
}
:root[data-theme="cream"] .employee-app input {
  color: #322c26;
  background: #eee4d5;
  border-color: rgba(81, 74, 66, .38);
}
:root[data-theme="cream"] .auth-form input::placeholder,
:root[data-theme="cream"] .employee-app input::placeholder,
:root[data-theme="cream"] .search-box input::placeholder {
  color: rgba(81, 74, 66, .62);
}
:root[data-theme="cream"] .search-box {
  color: #322c26;
  background: #eee4d5;
  border-color: rgba(81, 74, 66, .38);
  backdrop-filter: none;
}
:root[data-theme="cream"] .search-box input { color: #322c26; }
:root[data-theme="cream"] .search-box:focus-within,
:root[data-theme="cream"] .auth-form input:focus,
:root[data-theme="cream"] .employee-app input:focus {
  background: #fffdf8;
  border-color: #6f6255;
  box-shadow: 0 0 0 4px rgba(154, 119, 88, .18);
}
:root[data-theme="cream"] .result-row {
  background: #f6eee2;
  border-color: rgba(81, 74, 66, .3);
  backdrop-filter: none;
}
:root[data-theme="cream"] .result-row:not(.header):hover,
:root[data-theme="cream"] .result-row:not(.header):focus-within { background: #eadccc; }
:root[data-theme="cream"] .lane-item {
  background: #fffaf2;
  border-color: rgba(81, 74, 66, .28);
  backdrop-filter: none;
}
:root[data-theme="cream"] .employee-product-option {
  background: #f5ecdf;
  border-color: rgba(81, 74, 66, .3);
}
:root[data-theme="cream"] .employee-request-card,
:root[data-theme="cream"] .employee-request-row,
:root[data-theme="cream"] .admin-request-row {
  background: #f5ecdf;
  border-color: rgba(81, 74, 66, .28);
}
:root[data-theme="cream"] .employee-request-card .employee-request-row { background: transparent; }

@media (max-width: 760px) {
  .theme-switcher { flex-wrap: wrap; }
  html, body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  input, select, textarea {
    font-size: 16px !important;
  }
  .app-shell { flex-direction: column; width: 100%; max-width: 100vw; min-width: 0; overflow-x: hidden; }
  .sidebar {
    position: static;
    width: 100%;
    min-height: 0;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 14px max(14px, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid rgba(211, 217, 218, 0.12);
  }
  .sidebar .brand-mark { margin-bottom: 8px; }
  .sidebar .nav-section-label { margin: 16px 0 8px; }
  .sidebar .nav-list { display: flex; flex-wrap: wrap; }
  .sidebar .nav-item { min-height: 44px; padding: 10px 14px; }
  .sidebar-footnote { display: none; }
  .main-content {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    overflow-x: hidden;
  }
  .topbar {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
    padding: 12px;
    overflow: visible;
  }
  .topbar-title { grid-column: 1 / -1; min-width: 0; }
  .topbar .mail-connection {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
  }
  .topbar .mail-connection-button { min-height: 44px; }
  .topbar-employee-accounts,
  .topbar-password { min-width: 0; }
  .topbar-employee-accounts summary,
  .topbar-password summary,
  .topbar > [data-logout] {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }
  .topbar-meta { grid-column: 1 / -1; margin-left: 0; }
  .topbar-nav { grid-column: 1 / -1; order: initial; }
  .topbar-employee-accounts .employee-account-popover {
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: min(60dvh, 520px);
    overflow-x: hidden;
  }
  .topbar-password .password-form {
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: min(60dvh, 420px);
    overflow-x: hidden;
    overflow-y: auto;
  }
  .hero { padding: 18px 14px; }
  .hero h1 { font-size: 25px; }
  .search-scope-toggle { width: 100%; }
  .search-scope-button { flex: 1 1 0; min-width: 0; white-space: normal; }
  .section-heading, .purchase-list-heading, .results-heading { gap: 12px; }
  .supplier-grid, .results-table, .result-row, .supplier-lane, .lane-item { min-width: 0; }
  .language-switcher { align-items: stretch; flex-direction: column; }
  .auth-form .auth-remember { grid-template-columns: 20px 1fr; }
  .auth-form .auth-remember small { grid-column: 2; justify-self: start; }
  .language-choice-group { display: flex; }
  .language-choice { flex: 1; }
  .auth-screen {
    width: 100%;
    max-width: 100vw;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    overflow-x: hidden;
  }
  .employee-app {
    width: 100%;
    max-width: 100vw;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    overflow-x: hidden;
  }
  .auth-layout { grid-template-columns: 1fr; min-height: 0; }
  .auth-brand-panel { min-height: 330px; padding: 28px; }
  .auth-brand-panel h1 { font-size: 34px; }
  .auth-card { min-height: 480px; padding: 28px; }
  .employee-topbar { width: 100%; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .employee-brand { flex: 1 1 180px; min-width: 0; }
  .employee-brand .brand-mark { width: 36px; height: 36px; }
  .employee-head-actions { margin-left: auto; gap: 6px; }
  .employee-head-actions .quiet-button, .employee-head-actions summary { min-height: 44px; padding: 0 11px; display: inline-flex; align-items: center; }
  .role-account { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .role-account > div { text-align: left; }
  .employee-notebook { width: 100%; margin-top: 10px; padding: 18px 14px; overflow: hidden; }
  .employee-head { gap: 12px; }
  .employee-head h1 { font-size: 25px; }
  .notebook-status { align-self: flex-start; justify-self: start; }
  .employee-form-grid { margin: 20px 0 12px; padding: 12px; }
  .employee-form-grid, .employee-head, .employee-request-card, .employee-request-edit { display: grid; width: 100%; min-width: 0; }
  .employee-requests-panel { padding: 18px 14px; }
  .employee-requests-panel .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }
  .employee-requests-panel .heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .employee-requests-panel .heading-actions .button {
    min-height: 44px;
    flex: 1 1 120px;
  }
  .admin-request-row {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }
  .employee-requests-panel .admin-request-row { padding: 13px; }
  .admin-request-row > div:first-child { min-width: 0; }
  .admin-request-row > div:first-child strong,
  .admin-request-row > div:first-child span { overflow-wrap: anywhere; }
  .admin-request-actions {
    width: 100%;
    min-width: 0;
    justify-content: stretch;
    align-items: stretch;
    flex-wrap: wrap;
  }
  .admin-request-actions .button {
    min-height: 44px;
    flex: 1 1 150px;
  }
  .admin-match-block,
  .admin-match-field {
    width: 100%;
    min-width: 0;
  }
  .admin-match-field input { width: 100%; min-width: 0; }
  .admin-reject-details { width: 100%; }
  .admin-reject-details summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
  .admin-reject-controls {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    flex-direction: column;
    align-items: stretch;
  }
  .admin-reject-controls select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .admin-reject-controls .button {
    width: 100%;
    min-height: 44px;
  }
  .topbar-employee-accounts .employee-account-popover { overflow-x: hidden; }
  .employee-account-form { display: grid; grid-template-columns: minmax(0, 1fr); }
  .employee-account-form #new-employee-password,
  .employee-account-form .button { grid-column: 1; }
  .employee-account-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .employee-account-row > div:first-child,
  .employee-account-row > input { grid-column: 1 / -1; }
  .employee-account-row > .button { width: 100%; min-width: 0; }
  .employee-account-row input { width: 100%; min-width: 0; }
  .employee-account-row .quiet-button { min-width: 44px; min-height: 44px; }
  .employee-request-card { display: grid; }
  .employee-product-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
  .employee-product-copy { min-width: 0; }
  .employee-product-copy strong, .employee-product-copy span { overflow-wrap: anywhere; }
  .employee-add-product { min-height: 44px; }
  .employee-selected-product { grid-template-columns: 1fr; }
  .employee-selected-actions { grid-column: 1; grid-row: auto; flex-wrap: wrap; }
  .employee-submit { width: 100%; min-height: 48px; }
  .employee-request-list-wrap { min-width: 0; }
  .employee-request-date-group, .employee-request-date-items { width: 100%; min-width: 0; }
  .employee-request-row { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 13px; }
  .employee-request-row, .employee-request-card { width: 100%; min-width: 0; }
  .employee-request-info { min-width: 0; }
  .employee-request-row strong, .employee-request-row span { overflow-wrap: anywhere; }
  .request-package-quantity { justify-self: start; min-width: 0; }
  .request-package-quantity .mini-action { min-width: 44px; min-height: 44px; }
  .employee-request-state, .employee-request-state-wide { grid-column: auto; justify-self: start; text-align: left; white-space: normal; }
  .employee-request-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .employee-request-actions .button { min-height: 44px; flex: 1 1 104px; white-space: nowrap; }
  .employee-request-edit { grid-template-columns: 1fr; padding: 0 13px 13px; }
  .employee-request-edit .button { min-height: 44px; }
  .employee-topbar .password-form { right: 10px; width: calc(100% - 20px); }
}

@media (hover: none), (pointer: coarse) {
  .supplier-grid:has(.supplier-lane:hover) .supplier-lane:not(:hover),
  .supplier-grid:has(.supplier-lane:focus-within) .supplier-lane:not(:focus-within) {
    opacity: 1;
    filter: none;
  }
  .result-row:not(.header):hover,
  .result-row:not(.header):focus-within,
  .supplier-lane:hover,
  .supplier-lane:focus-within,
  .lane-item:hover,
  .button:hover,
  .row-action:hover,
  .supplier-filter-chip:hover,
  .copy-code-button:hover,
  .theme-choice:hover {
    transform: none;
  }
}

@media (max-width: 1000px) {
  .auth-screen { padding: 20px; }
  .auth-layout { width: min(680px, 100%); }
  .auth-card { min-height: 500px; }
}

@media (max-width: 1250px) {
  body { min-width: 0; }
  .sidebar { width: 192px; }
  .main-content { padding: 16px; }
  .supplier-grid { grid-template-columns: 1fr; }
  .invoice-placeholder { align-items: flex-start; flex-direction: column; }
  .invoice-import-actions { justify-content: flex-start; min-width: 0; }
  .invoice-import-item { grid-template-columns: 1fr; gap: 4px; }
  .admin-role-account { display: none; }
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; width: 100%; min-width: 0; overflow: visible; }
  .topbar-title { min-width: 0; }
  .topbar-nav { order: 3; flex-basis: 100%; }
  .topbar-meta { margin-left: 0; }
  .search-row { flex-wrap: wrap; }
  .search-hint { flex-basis: 100%; }
  .supplier-filter-row { align-items: flex-start; flex-direction: column; }
  .result-row.header { display: none; }
  .result-row:not(.header) { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; min-height: 0; padding: 14px; }
  .result-row:not(.header) > strong:first-child { grid-column: 1 / -1; }
  .result-row:not(.header) > .supplier-cell { grid-column: 1; }
  .result-row:not(.header) > .row-action, .result-row:not(.header) > .row-quantity-controls { grid-column: 2; grid-row: 3 / span 2; align-self: center; }
  .result-row:not(.header) > .product-code { grid-column: 1; }
  .result-row:not(.header) > strong:not(:first-child) { grid-column: 2; grid-row: 2; text-align: right; align-self: start; }
  .result-row:not(.header) > span:not(.supplier-cell):not(.product-code):not(.row-quantity-controls) { grid-column: 1; }
  .result-row.is-online { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; padding: 10px 12px; }
  .result-row.is-online > .result-product-name { grid-column: 1 / -1; }
  .result-row.is-online > .result-spec { grid-column: 1; grid-row: 2; }
  .result-row.is-online > .result-price { grid-column: 2; grid-row: 2; text-align: right; }
  .result-row.is-online > .product-code { grid-column: 1; grid-row: 3; color: var(--muted); font-size: 11px; }
  .result-row.is-online > .row-action, .result-row.is-online > .row-quantity-controls { grid-column: 3; grid-row: 2 / span 2; align-self: center; }
  .result-row.is-online > .supplier-cell, .result-row.is-online > .purchase-count { display: none; }
  .supplier-cell { min-width: 0; }
  .supplier-cell span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lane-title { grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; }
  .supplier-wordmark { width: 132px; flex-basis: 132px; }
}

@media (max-width: 760px) {
  .sidebar { width: 100%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  button, .lane-item, .supplier-lane, .search-box, .po-field, .result-row:not(.header), .row-action, .mini-action { transition: none; }
  .result-row:not(.header):hover, .result-row:not(.header):focus-within { transform: none; }
  .lane-item:hover, .button:hover, .supplier-lane:hover, .supplier-lane:focus-within { transform: none; }
}
