:root {
  --navy: #0b1f2a;
  --navy-2: #123241;
  --teal: #16a99a;
  --teal-dark: #087c73;
  --mint: #dff8f3;
  --ink: #15252c;
  --muted: #66757c;
  --line: #dce5e8;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --warning: #b66018;
  --shadow: 0 18px 48px rgba(13, 40, 51, .09);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-family: "DM Sans", sans-serif; font-size: 16px; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar { height: 72px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; color: white; background: var(--navy); }
.brand { display: flex; gap: 12px; align-items: center; color: white; text-decoration: none; font-family: Manrope, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--teal); border: 1px solid #31505e; border-radius: 11px; background: #102b38; }
.brand-mark svg { width: 24px; height: 24px; }
.topbar-meta { display: flex; align-items: center; gap: 22px; }
.status { font-size: 14px; color: #c1d1d7; display: flex; align-items: center; gap: 8px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #4ee4a7; box-shadow: 0 0 0 4px rgba(78, 228, 167, .12); }
.icon-button { width: 40px; height: 40px; border: 1px solid #38525e; border-radius: 10px; display: grid; place-items: center; color: inherit; background: transparent; }
.icon-button:hover { background: rgba(255,255,255,.08); }
main { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 64px; }
.intro { margin-bottom: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--teal-dark); font-size: 12px; line-height: 1.3; font-weight: 800; letter-spacing: .13em; }
h1, h2, h3 { margin: 0; font-family: Manrope, sans-serif; letter-spacing: -.035em; }
h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.08; }
.intro > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 17px; }
.search-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
form { display: grid; grid-template-columns: 1fr 1.35fr 1fr 1fr 1fr auto; gap: 14px; align-items: end; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.input-wrap { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #becbd0; border-radius: 11px; color: #718088; background: #fff; transition: border .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(22,169,154,.12); }
.input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.input-wrap input::placeholder { color: #98a5aa; }
.or { padding-bottom: 13px; color: #8d9ba1; font-size: 14px; }
.primary, .secondary { min-height: 50px; border-radius: 11px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; }
.primary { border: 1px solid var(--teal); color: white; background: var(--teal); box-shadow: 0 8px 20px rgba(22,169,154,.20); }
.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.primary:disabled { cursor: wait; opacity: .75; }
.button-spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.5); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }
.secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.search-actions { display: flex; justify-content: space-between; margin-top: 14px; }
.search-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.text-button { padding: 0; border: 0; color: var(--teal-dark); background: transparent; font-size: 13px; font-weight: 700; }
.search-status { margin: 14px 0 0; padding: 11px 13px; border-radius: 9px; color: #315860; background: #edf7f6; font-size: 14px; }
.search-status.error { color: #923c2c; background: #fff0ec; }
.results { margin-top: 42px; }
.results-heading { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.results-heading h2 { font-size: clamp(24px, 3vw, 30px); }
.count { padding: 6px 11px; border-radius: 999px; color: #33505c; background: #e5edef; font-size: 13px; font-weight: 700; white-space: nowrap; }
.table-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(13,40,51,.05); }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 18px; text-align: left; color: #66777e; background: #edf3f4; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
td { padding: 17px 18px; border-top: 1px solid #e5ebed; font-size: 14px; }
tbody tr { transition: background .18s; }
tbody tr:hover { background: #f6fbfa; }
.code { font-family: Manrope, sans-serif; font-weight: 700; color: #1c3b47; }
.description { font-weight: 600; }
.stock { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.stock.low { color: var(--warning); }
.stock.low::before { background: #e78a34; }
.price { font-weight: 700; white-space: nowrap; }
.view-button { width: 38px; height: 38px; margin-left: auto; display: grid; place-items: center; border: 1px solid #bcdcd7; border-radius: 10px; color: var(--teal-dark); background: #f1fbf9; }
.view-button:hover { color: white; border-color: var(--teal); background: var(--teal); }
.card-grid { display: none; }
.empty-state { padding: 56px 20px; text-align: center; border: 1px dashed #bccbd0; border-radius: 16px; background: white; }
.empty-state span { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--teal-dark); border-radius: 15px; background: var(--mint); }
.empty-state span svg { width: 25px; height: 25px; }
.empty-state h3 { font-size: 21px; }
.empty-state p { margin: 6px 0 20px; color: var(--muted); }
footer { min-height: 80px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #82939a; border-top: 1px solid #dce5e8; font-size: 13px; }
footer span:first-child { color: #36505b; font-family: Manrope, sans-serif; font-weight: 800; }
dialog { width: min(520px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 24px 80px rgba(1,20,28,.3); }
dialog::backdrop { background: rgba(6,25,34,.64); backdrop-filter: blur(3px); }
.dialog-head { padding: 24px 24px 18px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-head h2 { font-size: 25px; }
.dialog-head .icon-button { color: #50646d; border-color: var(--line); flex: none; }
.dialog-code { margin: 0 24px; padding: 11px 14px; border-radius: 10px; color: #16564f; background: var(--mint); font-family: Manrope, sans-serif; font-weight: 800; }
dl { margin: 18px 24px 24px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
dl div { padding: 14px; }
dl div:nth-child(even) { border-left: 1px solid var(--line); }
dl div:nth-child(n+3) { border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
dd { margin: 4px 0 0; font-weight: 700; }
.full { width: calc(100% - 48px); margin: 0 24px 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(22,169,154,.35); outline-offset: 2px; }

.warehouse-view { min-height: 620px; }
.back-button { margin-bottom: 28px; padding: 0; display: inline-flex; align-items: center; gap: 8px; border: 0; color: var(--teal-dark); background: transparent; font-weight: 700; }
.warehouse-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.warehouse-hero h1 { font-size: clamp(32px, 4vw, 46px); }
.warehouse-hero > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.article-code-badge { padding: 10px 14px; border: 1px solid #b6ded8; border-radius: 10px; color: #126b62; background: var(--mint); font-family: Manrope, sans-serif; font-weight: 800; white-space: nowrap; }
.warehouse-instructions { margin-bottom: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 10px; border: 1px solid #cde6e2; border-radius: 12px; color: #32545a; background: #effaf8; font-size: 14px; }
.warehouse-instructions span { color: var(--teal-dark); display: grid; place-items: center; }
.warehouse-instructions.loading { color: #315860; }
.warehouse-instructions.error { color: #923c2c; border-color: #f0c7bd; background: #fff0ec; }
.warehouse-table-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(13,40,51,.05); }
.warehouse-card-grid { display: none; }
.select-warehouse { min-height: 40px; padding: 0 16px; border: 1px solid #acd7d1; border-radius: 9px; color: var(--teal-dark); background: #f0faf8; font-weight: 700; }
.select-warehouse:hover, .select-warehouse[aria-pressed="true"] { color: white; border-color: var(--teal); background: var(--teal); }
.select-warehouse.pending { cursor: not-allowed; opacity: .58; }
.price-panel { margin-top: 24px; padding: 24px; border: 1px solid #bddfd9; border-radius: 16px; background: white; box-shadow: var(--shadow); scroll-margin-top: 24px; }
.price-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.price-panel-head h2 { font-size: 25px; }
.price-options { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.price-option { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfb; }
.price-option.featured { color: white; border-color: var(--navy-2); background: var(--navy-2); }
.price-option span { display: block; color: var(--muted); font-size: 13px; }
.price-option.featured span { color: #b8d0d8; }
.price-option .price-number { margin-top: 6px; display: block; font-family: Manrope, sans-serif; font-size: 22px; letter-spacing: -.03em; }
.price-option .price-value { margin-top: 14px; display: block; color: var(--navy); font-family: Manrope, sans-serif; font-size: clamp(26px, 2.3vw, 34px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.price-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.price-empty { grid-column: 1 / -1; padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #f8fbfb; }
.price-empty.error { color: #923c2c; border-color: #f0c7bd; background: #fff0ec; }
.access-denied { min-height: 60vh; display: grid; place-items: center; align-content: center; padding: 48px 24px; text-align: center; }
.access-denied[hidden] { display: none; }
.access-denied-icon { width: 64px; height: 64px; margin-bottom: 18px; display: grid; place-items: center; color: var(--teal-dark); border: 1px solid #b6ded8; border-radius: 18px; background: var(--mint); }
.access-denied-icon svg { width: 30px; height: 30px; }
.access-denied h1 { margin-top: 8px; font-size: clamp(28px, 4vw, 42px); }
.access-denied > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

@media (max-width: 800px) {
  main { width: min(100% - 28px, 680px); padding-top: 36px; }
  form { grid-template-columns: 1fr 1fr; }
  .primary { grid-column: 1 / -1; }
  .table-shell { display: none; }
  .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .item-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 24px rgba(13,40,51,.05); }
  .item-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
  .item-card .code { font-size: 12px; }
  .item-card h3 { margin-top: 6px; font-family: "DM Sans", sans-serif; font-size: 16px; letter-spacing: 0; }
  .item-card .category { margin: 5px 0 18px; color: var(--muted); font-size: 13px; }
  .item-card-foot { padding-top: 14px; display: flex; justify-content: space-between; align-items: end; gap: 10px; border-top: 1px solid #e7edef; }
  .item-card-foot small { display: block; color: var(--muted); font-size: 12px; }
  .item-card-foot strong { display: block; margin-top: 2px; }
  .round-view { width: 38px; height: 38px; display: grid; place-items: center; color: var(--teal-dark); border: 1px solid #bcdcd7; border-radius: 10px; background: #f1fbf9; }
  .warehouse-table-shell { display: none; }
  .warehouse-card-grid { display: grid; gap: 12px; }
  .warehouse-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
  .warehouse-card-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
  .warehouse-card h3 { margin-top: 5px; font-family: "DM Sans", sans-serif; font-size: 17px; letter-spacing: 0; }
  .warehouse-card .stock { margin: 15px 0; }
  .warehouse-card .select-warehouse { width: 100%; }
  .price-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .topbar { height: 64px; padding: 0 16px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 35px; height: 35px; }
  .status { display: none; }
  main { width: calc(100% - 24px); padding-top: 28px; }
  .intro { margin-bottom: 22px; }
  .intro > p:last-child { font-size: 16px; }
  .search-card { padding: 18px; border-radius: 15px; }
  form { grid-template-columns: 1fr; }
  .primary { grid-column: auto; }
  .search-actions { align-items: start; gap: 12px; }
  .search-actions p { max-width: 210px; }
  .results { margin-top: 34px; }
  .card-grid { grid-template-columns: 1fr; }
  .warehouse-hero { align-items: start; flex-direction: column; }
  .warehouse-instructions { align-items: start; }
  .price-panel { padding: 18px; }
  .price-panel-head { align-items: start; flex-direction: column; gap: 10px; }
  .price-options { grid-template-columns: 1fr; }
  footer { min-height: 72px; padding: 18px; flex-direction: column; align-items: start; gap: 3px; }
  dl { grid-template-columns: 1fr; }
  dl div:nth-child(even) { border-left: 0; }
  dl div + div { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@keyframes spin { to { transform: rotate(360deg); } }
