:root {
  color-scheme: light;
  --bg: #f5f2ee;
  --surface: #ffffff;
  --surface-2: #f9faf8;
  --ink: #171717;
  --muted: #6d6b67;
  --line: #e2ded7;
  --accent: #b71234;
  --accent-dark: #8f0d29;
  --good: #18745f;
  --warn: #b86b00;
  --shadow: 0 18px 60px rgba(20, 20, 20, .12);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(183, 18, 52, .08), transparent 28%),
    linear-gradient(315deg, rgba(24, 116, 95, .08), transparent 34%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.main,
.content-grid,
.content-grid > *,
.panel {
  min-width: 0;
}

.guest-shell {
  grid-template-columns: minmax(0, 1fr);
}

.guest-main {
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #171717;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.brand img, .auth-logo {
  display: block;
  width: min(190px, 100%);
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a, .logout {
  border-radius: 8px;
  padding: 12px 14px;
  color: rgba(255,255,255,.76);
}

.nav a.active, .nav a:hover, .logout:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.logout-form { margin-top: auto; }

.logout {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.main {
  min-width: 0;
  padding: 32px;
}

.auth-page {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(360px, .88fr) minmax(460px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.auth-showcase {
  min-height: 720px;
  border-radius: 8px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(15, 14, 13, .92), rgba(15, 14, 13, .52)),
    url("https://krona.ru/upload/resize_cache/webp/iblock/515/o2he4qkvmg274yz2jncpvdq0ztjrq5co.webp") center / cover;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 28px;
  overflow: hidden;
}

.auth-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-topline span {
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  padding: 8px 10px;
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 900;
}

.auth-copy {
  align-self: center;
}

.auth-copy h1 {
  max-width: 660px;
  margin: 16px 0;
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(255,255,255,.82);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.auth-showcase .eyebrow { color: #ffccd6; }

.badge, .status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,.13);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.auth-product-stage {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 12px;
  align-items: stretch;
}

.stage-card {
  min-height: 96px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.stage-card-main {
  grid-row: span 2;
  min-height: 204px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06)),
    rgba(0,0,0,.16);
}

.stage-card span {
  color: rgba(255,255,255,.68);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-card strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.16;
}

.auth-panel, .panel, .application, .metric, .filters, .product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 40px rgba(23, 23, 23, .06);
}

.auth-panel {
  padding: 30px;
  overflow: hidden;
  align-self: start;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.auth-panel-head {
  margin-bottom: 18px;
}

.auth-panel-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.auth-tab {
  border: 0;
  text-align: center;
  border-radius: 6px;
  padding: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(23, 23, 23, .08);
}

.form-section {
  padding-top: 24px;
}

.auth-section[hidden] { display: none; }

.form-section h2, .panel h2, .application h2, .filters h2, .product-card h2 {
  margin: 0 0 16px;
  line-height: 1.15;
}

.registration {
  margin-top: 18px;
  padding: 18px 4px 2px 0;
  border-top: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.form-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}

.form-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.form-block-head span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.form-block-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.stack {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input, select, textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(183, 18, 52, .7);
  box-shadow: 0 0 0 4px rgba(183, 18, 52, .11);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented label { display: block; }
.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.segmented span {
  display: block;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
  color: var(--ink);
}
.segmented input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

body[data-org-type="ooo"] .ip-field,
body[data-org-type="ip"] .ooo-field { display: none; }

.bank-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.bank-details summary {
  cursor: pointer;
  font-weight: 900;
}

.bank-details .grid { margin-top: 14px; }

.primary, .secondary, .danger {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 900;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.primary:hover { background: var(--accent-dark); }

.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.danger {
  color: #fff;
  background: #5f1717;
}

.compact { min-height: 40px; padding: 10px 14px; }
.small { min-height: 36px; padding: 8px 12px; font-size: 13px; }

.alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px;
  font-weight: 800;
}

.alert.error {
  color: #6f071d;
  background: #fff0f3;
  border: 1px solid #ffd1dc;
}

.alert.success {
  color: #145d4d;
  background: #edf8f4;
  border: 1px solid #cbe9df;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.1;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head-row h2 {
  margin: 0;
}

.details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.details div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.details dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-characteristics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}

.catalog-pulse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.catalog-pulse div {
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-2);
}

.catalog-pulse strong {
  display: block;
  font-size: 28px;
}

.catalog-pulse span {
  color: var(--muted);
  font-weight: 700;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.application {
  padding: 20px;
}

.application-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.application h2 {
  margin-top: 10px;
  font-size: 20px;
}

.badge {
  background: #fff0f3;
  color: var(--accent);
}

.status {
  background: #edf7f3;
  color: var(--good);
}

.compact-details div {
  grid-template-columns: 95px minmax(0, 1fr);
  font-size: 14px;
}

.review-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.edit-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.edit-details summary {
  cursor: pointer;
  font-weight: 900;
}

.edit-details form {
  margin-top: 14px;
}

.comments {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.comments p {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--ink);
  line-height: 1.4;
}

.comments strong,
.comments span {
  display: block;
}

.comments span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.inline-comment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.inline-form select {
  width: auto;
  min-width: 120px;
  padding: 8px 10px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.price-list {
  display: grid;
  gap: 10px;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.price-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.catalog-head {
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: linear-gradient(120deg, #fff 0%, #fbfaf8 100%);
  box-shadow: 0 14px 38px rgba(23, 23, 23, .055);
}

.catalog-heading { min-width: 250px; }
.catalog-heading h1 { margin-bottom: 5px; }
.catalog-heading .page-intro { margin: 0; }

.search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(760px, 100%);
}

.search input[name="q"] {
  flex: 1 1 240px;
}

.catalog-search { align-items: flex-end; }

.catalog-search-field {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d7d2ca;
  border-radius: 12px;
  padding: 5px 5px 5px 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 23, 23, .04);
}

.catalog-search-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 62%, #fff);
  box-shadow: 0 0 0 3px rgba(170, 22, 49, .1);
}

.catalog-search-field svg { width: 21px; color: var(--muted); }

.catalog-search-field input {
  min-width: 0;
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.catalog-search-field input:focus { outline: 0; box-shadow: none; }

.catalog-search-options {
  min-height: 22px;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
}

.filters {
  align-self: start;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding: 18px 12px 18px 18px;
}

.filters a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.filters a.active, .filters a:hover {
  color: var(--accent);
}

.filters a.catalog-category-link {
  padding-left: calc(var(--category-depth, 0) * 16px);
}

.catalog-filter-heading {
  margin: 0 6px 12px 0;
  font-size: 19px;
}

.catalog-category-tree {
  display: grid;
  max-height: calc(100vh - 115px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cfc8bd transparent;
}

.catalog-category-group {
  border-bottom: 1px solid var(--line);
}

.filters details.catalog-category-group { margin-top: 0; }

.catalog-category-group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 3px 0;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.catalog-category-group > summary::-webkit-details-marker { display: none; }

.catalog-category-group > summary > a {
  min-width: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink);
  line-height: 1.18;
}

.filters .catalog-category-group > summary > a,
.storefront-categories .catalog-category-group > summary > a { border-bottom: 0; }

.catalog-category-group > summary > a:hover,
.catalog-category-group > summary > a.active {
  background: #f7eef0;
  color: var(--accent);
}

.catalog-category-group > summary small {
  color: var(--muted);
  font-size: 11px;
}

.catalog-category-group > summary svg {
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
}

.catalog-category-group[open] > summary svg { transform: rotate(180deg); }

.catalog-subcategory-list {
  display: grid;
  margin: 0 2px 8px 8px;
  border-left: 2px solid #eee8e2;
  padding: 3px 0 4px 10px;
  background: linear-gradient(90deg, #fcfaf8, transparent);
}

.filters a.catalog-category-all,
.storefront-categories a.catalog-category-all {
  color: var(--ink);
  font-size: 13px;
}

.filters a.catalog-category-root,
.storefront-categories a.catalog-category-root {
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 8px;
}

.filters a.catalog-category-root:hover,
.filters a.catalog-category-root.active,
.storefront-categories a.catalog-category-root:hover,
.storefront-categories a.catalog-category-root.active,
.catalog-category-tree > a:first-child:hover,
.catalog-category-tree > a:first-child.active {
  border-color: transparent;
  background: #f7eef0;
  color: var(--accent);
}

.catalog-mobile-navigation { display: none; }

.catalog-results {
  min-width: 0;
}

.catalog-filter-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(23, 23, 23, .045);
}

.catalog-filter-bar-title {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.catalog-filter-bar-title strong {
  color: var(--ink);
  font-size: 14px;
}

.catalog-filter-bar-title span {
  color: var(--muted);
  font-size: 11px;
}

.catalog-quick-filters {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-filter-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #ddd7cf;
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.quick-filter-chip:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, #ddd7cf);
  color: var(--accent);
  transform: translateY(-1px);
}

.quick-filter-chip > span {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f2efeb;
  color: var(--muted);
  font-size: 13px;
}

.quick-filter-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.quick-filter-chip.active > span {
  background: rgba(255, 255, 255, .19);
  color: #fff;
}

.catalog-clear-filters {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.catalog-results-head {
  min-height: 30px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 11px;
}

.catalog-results-head > span:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.catalog-category-link.has-children,
.storefront-category-link.has-children {
  color: var(--ink);
}

.catalog-category-link i,
.storefront-category-link i {
  margin-right: 7px;
  color: color-mix(in srgb, var(--accent) 65%, var(--muted));
  font-style: normal;
  font-weight: 700;
}

.filters details {
  margin-top: 14px;
}

.filters summary {
  cursor: pointer;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.filter-check {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.filter-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.compact-check {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  white-space: nowrap;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mini-list span {
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.catalog-pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination-page,
.pagination-gap {
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.pagination-page {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.pagination-page:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-page.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  pointer-events: none;
}

.pagination-gap { min-width: 24px; color: var(--muted); }
.pagination-direction.is-disabled { opacity: .42; pointer-events: none; }
.pagination-summary { flex-basis: 100%; color: var(--muted); text-align: center; font-size: 12px; }

@media (max-width: 600px) {
  .catalog-pagination { gap: 8px; padding: 14px 10px; }
  .pagination-direction { flex: 1 1 120px; justify-content: center; }
  .pagination-pages { order: 3; flex-basis: 100%; }
  .pagination-summary { order: 4; }
}

.product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,250,248,.94));
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.product-card:hover {
  border-color: rgba(170, 22, 49, .34);
  box-shadow: 0 18px 48px rgba(23, 23, 23, .1);
  transform: translateY(-2px);
}

.product-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(226, 222, 215, .8);
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.98), rgba(239, 238, 234, .72) 64%),
    linear-gradient(145deg, #f0efed, #fff);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 22px 20px 18px;
  display: block;
}

.product-card-badges {
  position: absolute;
  inset: 8px 8px auto 8px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  pointer-events: none;
}

.product-card-badges span {
  max-width: 100%;
  border-radius: 6px;
  padding: 4px 6px;
  background: rgba(255,255,255,.9);
  color: var(--muted);
  box-shadow: 0 6px 14px rgba(23, 23, 23, .06);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-badges .stock-ok {
  color: var(--good);
  background: #edf8f4;
}

.product-card-badges .stock-empty {
  color: #8b3941;
  background: #fff0f3;
}

.product-card-badges .product-badge,
.detail-badges .product-badge {
  color: #fff;
  background: #30333a;
}

.product-card-badges .product-badge-sale,
.detail-badges .product-badge-sale { background: var(--accent); }
.product-card-badges .product-badge-exclusive,
.detail-badges .product-badge-exclusive { background: #6e5128; }
.product-card-badges .product-badge-new,
.detail-badges .product-badge-new { background: #176d57; }
.product-card-badges .product-badge-hit,
.detail-badges .product-badge-hit { background: #3d4f78; }

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.detail-badges .product-badge {
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.catalog-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.quick-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.quick-filter-chip:hover,
.quick-filter-chip.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.catalog-filter-checks {
  min-width: 0;
  margin: 16px 0 10px;
  border: 0;
  padding: 0;
}

.catalog-filter-checks legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.product-description {
  max-width: 980px;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-line;
}

.product-documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-document {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 14px;
  background: var(--surface-2);
  color: var(--ink);
}

.product-document:hover { border-color: var(--accent); color: var(--accent); }
.product-document span { flex: 0 0 auto; font-size: 18px; }
.product-document strong { overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .product-documents { grid-template-columns: minmax(0, 1fr); }
}


.product-image span {
  color: var(--accent);
  font-size: 30px;
  font-weight: 900;
}

.product-body {
  position: relative;
  z-index: 2;
  min-height: 282px;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  gap: 12px;
}

.product-body small {
  color: var(--muted);
  font-weight: 800;
}

.product-title-wrap {
  min-height: 88px;
}

.product-card h2 {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.product-card h2 a {
  color: var(--ink);
}

.product-subline {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-meta span {
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.product-actions {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.product-price-source {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-price-source span {
  border-radius: 8px;
  padding: 5px 7px;
  background: var(--surface-2);
}

.price-stack,
.detail-price-stack {
  display: grid;
  gap: 8px;
}

.price-stack {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.price-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.price-item.main {
  border-color: rgba(183, 18, 52, .18);
  background: #fff7f8;
}

.price-item.resale {
  border-color: rgba(24, 116, 95, .18);
  background: #f0faf6;
}

.price-item.site {
  border-color: #dfe5ed;
  background: #f5f7fa;
}

.price-stack > .price-item.site {
  grid-column: 1 / -1;
}

.price-item.profit {
  border-color: rgba(184, 107, 0, .2);
  background: #fff8ed;
}

.price-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-value {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
  white-space: nowrap;
}

.checkline {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 8px;
}

.checkline input,
td input[type="checkbox"] {
  width: auto;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.buy-request {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.buy-request input {
  min-height: 36px;
  padding: 8px 10px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vertical-actions {
  align-items: flex-start;
}

.inline-details {
  min-width: 220px;
}

.inline-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.inline-details form {
  min-width: 260px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mode-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 40px rgba(23, 23, 23, .06);
}

.mode-card.active {
  border-color: rgba(183, 18, 52, .26);
  background: #fff7f8;
}

.mode-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-card strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.16;
}

.mode-landing {
  min-height: calc(100vh - 56px);
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 22px;
}

.mode-choice-main {
  min-height: 100vh;
  display: grid;
}

.mode-choice-body {
  background:
    linear-gradient(140deg, rgba(183, 18, 52, .08), transparent 36%),
    linear-gradient(320deg, rgba(24, 116, 95, .1), transparent 38%),
    #f5f2ee;
}

.mode-landing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mode-logo {
  display: flex;
  align-items: center;
}

.mode-logo img {
  display: block;
  width: min(170px, 44vw);
  max-height: 58px;
  object-fit: contain;
}

.mode-landing-head h1 {
  margin: 0;
  max-width: 780px;
  font-size: 42px;
  line-height: 1.08;
}

.mode-landing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mode-entry-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,250,248,.92));
  box-shadow: 0 18px 50px rgba(23, 23, 23, .08);
}

.mode-entry-card:hover {
  border-color: rgba(183, 18, 52, .3);
  transform: translateY(-2px);
}

.mode-entry-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-entry-card strong {
  margin-top: 12px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

.mode-entry-card small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.storefront-entry {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(239,248,245,.9));
}

.mode-cart-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255,255,255,.84);
}

.mode-cart-strip div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mode-cart-strip strong {
  font-size: 28px;
}

.cart-panel {
  padding: 0;
  overflow: hidden;
}

.cart-table {
  min-width: 920px;
}

.cart-product {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.cart-product img,
.storefront-cart-item img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.cart-product strong,
.storefront-cart-copy strong {
  display: block;
  line-height: 1.25;
}

.cart-product small,
.storefront-cart-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.cart-qty-form {
  display: grid;
  grid-template-columns: 92px auto;
  gap: 8px;
  align-items: end;
}

.cart-qty-form input {
  min-height: 36px;
  padding: 8px 10px;
}

.cart-summary {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.cart-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.cart-summary-grid div,
.storefront-cart-total div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.cart-summary-grid span,
.storefront-cart-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-summary-grid strong,
.storefront-cart-total strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.05;
}

.cart-checkout {
  max-width: 680px;
}

.cart-empty {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.invoice-document {
  display: grid;
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
}

.invoice-title-row,
.invoice-parties {
  display: grid;
  gap: 18px;
}

.invoice-title-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.invoice-title-row h2,
.invoice-parties h3,
.invoice-bank h3 {
  margin: 0 0 10px;
}

.invoice-title-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.invoice-parties {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-payment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: stretch;
}

.order-detail-grid {
  align-items: start;
}

.order-timeline {
  display: grid;
  gap: 0;
}

.order-timeline > div {
  display: grid;
  grid-template-columns: 16px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-timeline > div > span {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.order-timeline time,
.order-timeline small {
  color: var(--muted);
  font-size: 12px;
}

.order-timeline small {
  grid-column: 2 / -1;
}

.notice-list {
  display: grid;
}

.notice-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.notice-list span {
  color: var(--muted);
  font-size: 12px;
}

.invoice-parties article,
.invoice-bank,
.invoice-qr {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}

.invoice-qr {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.invoice-qr-code {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.invoice-qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.invoice-qr span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.storefront-invoice-document {
  margin-bottom: 40px;
}

.invoice-table tfoot th {
  color: var(--ink);
  font-size: 16px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 26px;
  background: rgba(255,255,255,.58);
  color: var(--muted);
  font-weight: 800;
}

.product-detail-head {
  align-items: flex-start;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  align-items: start;
}

.product-gallery {
  overflow: hidden;
}

.product-gallery-main {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f0efed, #fff);
}

.gallery-main-button {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-gallery-main img,
.gallery-lightbox img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  padding: 26px;
  display: block;
}

.gallery-nav,
.gallery-lightbox-prev,
.gallery-lightbox-next,
.gallery-lightbox-close {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(23, 23, 23, .72);
  color: #fff;
  cursor: pointer;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  transition: background .16s ease, transform .16s ease;
}

.gallery-nav:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover,
.gallery-lightbox-close:hover {
  background: rgba(170, 22, 49, .86);
  transform: translateY(-1px);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
}

.gallery-nav:hover {
  transform: translateY(calc(-50% - 1px));
}

.gallery-nav-prev {
  left: 14px;
}

.gallery-nav-next {
  right: 14px;
}

.product-gallery-empty {
  min-height: 430px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f0efed, #fff);
  color: var(--accent);
  font-size: 44px;
  font-weight: 900;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.product-thumbs button {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.product-thumbs button.active {
  border-color: rgba(170, 22, 49, .6);
  box-shadow: 0 0 0 3px rgba(170, 22, 49, .12);
}

.product-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  display: block;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 34px 76px;
  background: rgba(10, 10, 10, .88);
}

.gallery-lightbox.active {
  display: grid;
}

.gallery-lightbox img {
  max-width: min(1180px, 92vw);
  max-height: 86vh;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
}

.gallery-lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: fixed;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}

.gallery-lightbox-prev {
  left: 22px;
}

.gallery-lightbox-next {
  right: 22px;
}

.product-buy {
  position: sticky;
  top: 24px;
}

.price-main {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.detail-meta {
  margin-top: 16px;
}

.detail-request {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.product-sections {
  margin-top: 18px;
}

.storefront-body {
  background: #f6f6f4;
}

.storefront-main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.storefront-header {
  min-height: 72px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.storefront-logo {
  min-width: 220px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  box-shadow: 0 12px 32px rgba(23, 23, 23, .06);
}

.storefront-logo img {
  width: 170px;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}

.storefront-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.storefront-search {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  width: min(800px, 100%);
}

.storefront-search input[name="q"] {
  flex: 1 1 260px;
}

.storefront-hero {
  min-height: 190px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  background:
    linear-gradient(105deg, rgba(255,255,255,.98), rgba(255,255,255,.72)),
    url("sigma-b2b-bg.jpg") center right / cover;
  box-shadow: 0 16px 44px rgba(23, 23, 23, .07);
  display: flex;
  align-items: center;
}

.storefront-hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.06;
}

.storefront-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
}

.storefront-categories {
  align-self: start;
  position: sticky;
  top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 23, 23, .05);
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.storefront-filter-panel { margin-top: 10px; }

.storefront-quick-filters {
  grid-column: auto;
  margin-bottom: 0;
}

.storefront-filter-bar { grid-column: 1 / -1; margin-bottom: 0; }
.storefront-image { position: relative; }
.storefront-card-badges { inset: 12px 12px auto; gap: 6px; }
.storefront-card-badges span,
.storefront-card-badges .product-badge {
  border: 1px solid #e9ecf1;
  border-radius: 5px;
  padding: 4px 7px;
  background: #fff;
  color: #788290;
  font-size: 10px;
  font-weight: 600;
  box-shadow: none;
}
.storefront-card-badges .stock-ok { color: #247858; background: #f0f9f3; border-color: #daeee1; }
.storefront-card-badges .stock-empty { color: #788290; background: #f6f7f9; border-color: #e9ecf1; }
.storefront-categories a.storefront-cabinet-link,
.storefront-mobile-navigation > .storefront-cabinet-link {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
}
.storefront-price-pair,
.storefront-detail-prices {
  display: grid;
  gap: 12px;
  width: 100%;
}
.storefront-price-pair small,
.storefront-detail-prices small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.storefront-card-bottom .storefront-site-reference strong,
.storefront-site-reference strong {
  display: block;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.2;
}
.storefront-detail-prices { margin-top: 18px; gap: 18px; }
.storefront-detail-prices .storefront-price { margin-top: 0; }

.storefront-product-section { margin-top: 18px; }

.storefront-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  color: var(--muted);
  font-weight: 800;
}

.storefront-categories a.storefront-category-link {
  padding-left: calc(var(--category-depth, 0) * 14px);
}

.storefront-category-group > summary {
  min-height: 43px;
}

.storefront-categories .catalog-category-tree {
  max-height: calc(100vh - 210px);
}

.storefront-categories .catalog-category-group > summary > a {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink);
}

.storefront-categories .catalog-category-group > summary > a:hover,
.storefront-categories .catalog-category-group > summary > a.active {
  background: #f7eef0;
  color: var(--accent);
}

.storefront-category-link small {
  color: var(--muted);
  font-size: 11px;
}

.storefront-categories a.active,
.storefront-categories a:hover {
  color: var(--accent);
}

.storefront-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
}

.storefront-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 23, 23, .06);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.storefront-card:hover {
  border-color: rgba(183, 18, 52, .24);
  box-shadow: 0 18px 48px rgba(23, 23, 23, .1);
  transform: translateY(-2px);
}

.storefront-image {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(226, 222, 215, .8);
  background: linear-gradient(145deg, #f4f4f2, #fff);
}

.storefront-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  display: block;
}

.storefront-image > span {
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
}

.storefront-card-body {
  position: relative;
  z-index: 2;
  min-height: 190px;
  padding: 15px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 14px;
}

.storefront-card-body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.storefront-card h2 {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.storefront-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.storefront-card-bottom strong {
  font-size: 24px;
  line-height: 1.05;
  white-space: nowrap;
}

.storefront-card-bottom span,
.storefront-availability {
  border-radius: 8px;
  padding: 7px 9px;
  background: #edf8f4;
  color: var(--good);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.storefront-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
  gap: 18px;
  align-items: start;
}

.storefront-buy {
  position: sticky;
  top: 24px;
}

.storefront-buy h1 {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.12;
}

.storefront-price {
  margin-top: 18px;
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
}

.storefront-availability {
  display: inline-flex;
  margin-top: 16px;
}

.storefront-cart-form,
.storefront-detail-cart {
  position: relative;
  z-index: 3;
}

.storefront-cart-form {
  display: flex;
}

.storefront-detail-cart {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.storefront-detail-cart input {
  max-width: 140px;
}

.storefront-cart-shell {
  display: grid;
  gap: 18px;
}

.storefront-cart-head h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.storefront-alert {
  max-width: 960px;
}

.storefront-cart-list {
  display: grid;
  gap: 12px;
}

.storefront-cart-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  background: rgba(255,255,255,.94);
}

.storefront-cart-price {
  min-width: 130px;
  text-align: right;
}

.storefront-cart-price span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.storefront-cart-price strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.storefront-cart-total {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
}

.storefront-cart-total form {
  min-width: 220px;
}

.favorite-toggle {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
}

.favorite-toggle button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  background: rgba(255,255,255,.94);
  color: var(--accent);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(23,23,23,.08);
}

.favorite-toggle button:hover,
.favorite-toggle button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.catalog-action-alert { margin-bottom: 14px; }

.quick-order-panel {
  max-width: 760px;
}

.compact-search {
  width: auto;
}

.favorite-list,
.saved-carts {
  display: grid;
  gap: 0;
}

.favorite-row,
.saved-cart-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.favorite-row {
  grid-template-columns: minmax(260px, 1fr) 90px 130px auto auto;
}

.favorite-product {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.favorite-product img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  object-fit: contain;
  background: #fff;
}

.favorite-product strong,
.favorite-product small,
.saved-cart-row strong,
.saved-cart-row small {
  display: block;
  overflow-wrap: anywhere;
}

.favorite-product small,
.saved-cart-row small {
  margin-top: 5px;
  color: var(--muted);
}

.saved-cart-create {
  margin-top: 18px;
}

.saved-cart-create .inline-form {
  align-items: end;
}

.saved-cart-create label {
  flex: 1 1 280px;
}

.saved-cart-row {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.pricing-preview-form {
  align-items: end;
}

.pricing-preview-form label:first-child {
  flex: 1 1 360px;
}

.pricing-preview-form label:nth-child(2) {
  flex: 1 1 220px;
}

.pricing-preview-result {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(130px, .6fr));
  gap: 10px;
}

.pricing-preview-result > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface-2);
}

.pricing-preview-result span,
.pricing-preview-result small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.pricing-preview-result strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.integration-error {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.password-access-shell {
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
}

.password-access-shell .auth-panel {
  width: min(520px, 100%);
}

.session-list {
  display: grid;
}

.session-list > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.session-list span,
.session-list strong,
.session-list small {
  min-width: 0;
  display: block;
}

.session-list small {
  margin-top: 5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .auth-page,
  .content-grid,
  .kanban {
    grid-template-columns: 1fr;
  }

  .products,
  .storefront-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-showcase {
    min-height: 460px;
  }

  .auth-panel {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 18px;
  }

  .auth-showcase {
    min-height: 360px;
    padding: 26px;
  }

  .auth-copy h1 {
    font-size: 36px;
  }

  .auth-product-stage {
    grid-template-columns: 1fr;
  }

  .stage-card-main {
    grid-row: auto;
    min-height: 116px;
  }

  .grid.two,
  .status-grid,
  .mode-switch,
  .mode-landing-grid,
  .cart-summary-grid,
  .catalog-layout,
  .products,
  .storefront-layout,
  .storefront-products,
  .storefront-cart-total,
  .storefront-detail,
  .product-detail-grid,
  .invoice-parties,
  .invoice-payment-grid {
    grid-template-columns: 1fr;
  }

  .catalog-layout,
  .storefront-layout {
    gap: 14px;
  }

  .favorite-row,
  .saved-cart-row,
  .pricing-preview-result {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .catalog-desktop-sidebar,
  .storefront-desktop-sidebar {
    display: none;
  }

  .catalog-mobile-navigation {
    min-width: 0;
    display: grid;
    grid-column: 1 / -1;
    gap: 7px;
  }

  .catalog-mobile-strip {
    min-width: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .catalog-mobile-strip::-webkit-scrollbar,
  .catalog-quick-filters::-webkit-scrollbar {
    display: none;
  }

  .catalog-mobile-strip a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.12;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .catalog-mobile-strip a.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }

  .catalog-mobile-strip small {
    opacity: .72;
    font-size: 10px;
  }

  .catalog-mobile-children {
    padding-top: 0;
  }

  .catalog-mobile-children a {
    min-height: 36px;
    padding: 7px 11px;
    background: var(--surface-2);
    font-size: 12px;
  }

  .catalog-filter-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .catalog-filter-bar-title {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    white-space: normal;
  }

  .catalog-quick-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .quick-filter-chip {
    flex: 0 0 auto;
  }

  .catalog-clear-filters {
    justify-self: start;
  }

  .catalog-results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .page-head,
  .catalog-head,
  .storefront-header {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-head {
    gap: 18px;
    padding: 18px;
  }

  .catalog-heading {
    min-width: 0;
  }

  .catalog-search-field {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 8px;
    padding-left: 12px;
  }

  .catalog-search-field .primary {
    grid-column: auto;
    width: auto;
  }

  .catalog-search-options {
    justify-content: flex-start;
  }

  .search,
  .storefront-search {
    flex-direction: column;
  }

  .storefront-search input[name="q"] {
    flex: 0 0 auto;
    width: 100%;
  }

  .product-buy,
  .storefront-buy {
    position: static;
  }

  .mode-entry-card {
    min-height: 210px;
  }

  .storefront-cart-item {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .storefront-cart-item > img {
    grid-column: 1;
    grid-row: 1;
  }

  .storefront-cart-copy {
    grid-column: 2;
    min-width: 0;
  }

  .storefront-cart-item .cart-qty-form {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .storefront-cart-price {
    grid-column: 1 / -1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }

  .storefront-cart-price strong { margin-top: 0; }

  .storefront-cart-item > form:last-child {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .product-gallery-main,
  .product-gallery-empty,
  .gallery-main-button {
    min-height: 300px;
  }

  .product-gallery-main img,
  .gallery-main-button img {
    max-height: 300px;
    padding: 18px;
  }

  .product-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-lightbox {
    padding: 60px 14px 24px;
  }

  .gallery-lightbox img {
    max-width: 96vw;
    max-height: 78vh;
    padding: 10px;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    top: auto;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }

  .gallery-lightbox-prev {
    left: calc(50% - 52px);
  }

  .gallery-lightbox-next {
    right: calc(50% - 52px);
  }
}

@media (max-width: 520px) {
  .auth-panel, .panel, .application {
    padding: 16px;
  }

  .guest-main {
    padding: 12px;
  }

  .auth-showcase {
    min-height: 300px;
    padding: 20px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }

  .lead {
    font-size: 16px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .product-detail-actions,
  .product-actions,
  .product-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .price-main {
    font-size: 29px;
  }

  .details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .product-characteristics {
    grid-template-columns: 1fr;
  }

  .catalog-pulse {
    grid-template-columns: 1fr;
  }

  .storefront-hero {
    min-height: 150px;
    padding: 22px;
  }

  .storefront-hero h1,
  .storefront-buy h1 {
    font-size: 30px;
  }

  .storefront-card-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Guest auth pages: Sigma-inspired layout without harsh contrast. */
.guest-body {
  background:
    linear-gradient(135deg, rgba(183, 18, 52, .055), transparent 30%),
    linear-gradient(315deg, rgba(126, 137, 148, .09), transparent 36%),
    #f4f5f6;
}

.guest-main {
  min-height: 100vh;
  padding: 18px;
}

.sigma-login-page,
.register-page {
  width: min(1320px, 100%);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
}

.sigma-guest-header {
  min-height: 68px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sigma-logo-card {
  min-height: 58px;
  min-width: 230px;
  padding: 12px 18px;
  border: 1px solid rgba(210, 214, 219, .95);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(36, 42, 49, .06);
  display: flex;
  align-items: center;
}

.sigma-header-action {
  min-width: 142px;
  color: #343840;
  background: rgba(255, 255, 255, .88);
}

.sigma-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px;
  align-items: stretch;
}

.sigma-hero {
  min-height: 650px;
  border: 1px solid rgba(210, 214, 219, .95);
  border-radius: 8px;
  padding: 42px;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, .99) 0%, rgba(255, 255, 255, .9) 46%, rgba(255, 255, 255, .34) 100%),
    url("sigma-b2b-bg.jpg") center right / cover;
  box-shadow: 0 18px 55px rgba(36, 42, 49, .09);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 28px;
}

.sigma-hero-copy {
  align-self: center;
  max-width: 650px;
}

.sigma-hero h1,
.register-side h1 {
  margin: 12px 0 16px;
  color: #252a31;
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: 0;
}

.sigma-hero .lead {
  max-width: 560px;
  color: #5d626b;
  font-size: 19px;
}

.sigma-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sigma-feature-grid div,
.register-side-list span {
  min-height: 92px;
  border: 1px solid rgba(215, 219, 225, .88);
  border-radius: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 28px rgba(36, 42, 49, .055);
}

.sigma-feature-grid strong {
  display: block;
  color: #252a31;
  font-size: 18px;
  line-height: 1.15;
}

.sigma-feature-grid span {
  display: block;
  margin-top: 8px;
  color: #6a7079;
  font-size: 14px;
  line-height: 1.35;
}

.sigma-auth-card,
.register-card {
  max-height: none;
  overflow: visible;
  padding: 28px;
  border-color: rgba(210, 214, 219, .95);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 55px rgba(36, 42, 49, .09);
}

.sigma-auth-card {
  align-self: stretch;
  justify-content: center;
}

.sigma-auth-card .auth-panel-head h2,
.register-card .auth-panel-head h2 {
  color: #252a31;
}

.auth-bottom-link {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(222, 225, 230, .95);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6a7079;
  font-weight: 800;
}

.auth-bottom-link a {
  color: var(--accent);
}

.register-shell {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.register-side {
  position: sticky;
  top: 18px;
  min-height: 520px;
  border: 1px solid rgba(210, 214, 219, .95);
  border-radius: 8px;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .72)),
    url("sigma-b2b-bg.jpg") center right / cover;
  box-shadow: 0 18px 55px rgba(36, 42, 49, .08);
}

.register-side h1 {
  font-size: 38px;
}

.register-side-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.register-side-list span {
  min-height: 54px;
  display: flex;
  align-items: center;
  color: #343840;
  font-weight: 900;
}

.register-page .form-block {
  border-color: rgba(216, 220, 226, .95);
  background: #fafbfc;
}

.register-page .form-block-head span {
  background: #eef0f3;
  color: var(--accent);
}

.register-page .segmented input:checked + span {
  border-color: rgba(183, 18, 52, .32);
  background: #fff0f3;
  color: var(--accent);
}

.register-page .bank-details {
  border-color: rgba(216, 220, 226, .95);
  background: #fafbfc;
}

@media (max-width: 1080px) {
  .sigma-auth-layout,
  .register-shell {
    grid-template-columns: 1fr;
  }

  .sigma-hero {
    min-height: 460px;
  }

  .register-side {
    position: relative;
    top: auto;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .guest-main {
    padding: 12px;
  }

  .sigma-guest-header {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .sigma-logo-card,
  .sigma-header-action {
    width: 100%;
    min-width: 0;
  }

  .sigma-header-action {
    min-height: 44px;
  }

  .sigma-hero {
    min-height: 390px;
    padding: 24px;
  }

  .sigma-hero h1,
  .register-side h1 {
    font-size: 36px;
  }

  .sigma-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sigma-auth-card,
  .register-card,
  .register-side {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .sigma-hero h1,
  .register-side h1 {
    font-size: 30px;
  }

  .sigma-feature-grid {
    grid-template-columns: 1fr;
  }
}

.storefront-share-create {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 8px;
}

.storefront-share-list {
  display: grid;
  gap: 10px;
}

.storefront-share-row {
  display: grid;
  grid-template-columns: minmax(140px, .45fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.storefront-share-row:first-child { border-top: 0; }

.storefront-share-title {
  min-width: 0;
}

.storefront-share-title strong,
.storefront-share-title span {
  display: block;
  overflow-wrap: anywhere;
}

.storefront-share-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.storefront-share-row input[readonly] {
  color: var(--muted);
  background: var(--surface-2);
}

.storefront-share-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.storefront-share-actions form { margin: 0; }

.storefront-link-unavailable {
  min-height: calc(100vh - 48px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}

.storefront-link-unavailable img {
  width: min(220px, 70vw);
  height: auto;
}

.storefront-link-unavailable h1,
.storefront-link-unavailable p { margin: 0; }

.storefront-link-unavailable h1 { font-size: 32px; }
.storefront-link-unavailable p { color: var(--muted); }

@media (max-width: 980px) {
  .storefront-share-row {
    grid-template-columns: minmax(140px, .45fr) minmax(0, 1.4fr);
  }

  .storefront-share-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 700px) {
  .storefront-share-panel .panel-head-row,
  .storefront-share-create,
  .storefront-share-row {
    grid-template-columns: 1fr;
  }

  .storefront-share-panel .panel-head-row {
    display: grid;
    align-items: stretch;
  }

  .storefront-share-create { width: 100%; }

  .storefront-share-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .storefront-share-actions form,
  .storefront-share-actions button,
  .storefront-share-actions a { width: 100%; }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .print-hide,
  .page-head .product-detail-actions {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .invoice-document {
    max-width: none;
    border: 0;
    box-shadow: none;
  }
}

/* Client proposals */
.catalog-proposal-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  margin-top: 10px;
}

.catalog-purchase-actions {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
}

.catalog-purchase-actions .buy-request { margin: 0; }

.proposal-add-form {
  position: relative;
  z-index: 3;
  margin: 0;
}

.proposal-add-form button { width: 100%; }
.detail-proposal-add { margin-top: 9px; }

.proposal-list {
  display: grid;
  gap: 10px;
}

.proposal-list-item {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, .94);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, .5fr) auto;
  align-items: center;
  gap: 22px;
  box-shadow: 0 10px 32px rgba(23, 23, 23, .05);
}

.proposal-list-item:hover {
  border-color: rgba(183, 18, 52, .35);
  box-shadow: 0 16px 40px rgba(23, 23, 23, .08);
}

.proposal-list-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.proposal-list-main,
.proposal-list-metrics,
.proposal-list-actions {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.proposal-list-main,
.proposal-list-metrics { pointer-events: none; }

.proposal-list-actions { z-index: 3; }

.proposal-list-main h2 {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.proposal-list-main p {
  margin: 5px 0 0;
  color: var(--muted);
}

.proposal-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.proposal-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 5px 9px;
  background: #ececea;
  color: #4f504f;
  font-size: 12px;
  font-weight: 850;
}

.proposal-status.draft { background: #fff0d6; color: #865000; }
.proposal-status.published { background: #dcf3e9; color: #12624e; }
.proposal-status.revoked { background: #f1e9eb; color: #7a3342; }

.proposal-list-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.proposal-list-metrics div {
  min-width: 0;
  border-left: 2px solid var(--line);
  padding-left: 12px;
}

.proposal-list-metrics span,
.proposal-list-metrics strong {
  display: block;
}

.proposal-list-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.proposal-list-metrics strong {
  margin-top: 4px;
  font-size: 18px;
  white-space: nowrap;
}

.proposal-list-actions,
.proposal-head-actions,
.proposal-footer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.proposal-empty { min-height: 180px; }

.proposal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.proposal-comment { grid-column: 1 / -1; }

.proposal-add-panel {
  margin: 14px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.proposal-add-panel form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px auto;
  gap: 8px;
}

.proposal-published-bar {
  margin-bottom: 14px;
  border: 1px solid #cce7de;
  border-radius: 8px;
  padding: 13px;
  background: #f3fbf8;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr);
  align-items: center;
  gap: 16px;
}

.proposal-published-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.proposal-published-bar strong {
  font-size: 13px;
  white-space: nowrap;
}

.proposal-share-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
}

.proposal-share-tools input {
  min-width: 0;
  background: #fff;
}

.proposal-recipient-summary { margin-bottom: 14px; }
.proposal-recipient-summary .details { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.proposal-items {
  display: grid;
  gap: 9px;
}

.proposal-item {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 82px minmax(190px, 1.2fr) minmax(135px, .58fr) minmax(215px, .78fr) minmax(155px, .62fr) auto;
  align-items: center;
  gap: 14px;
}

.proposal-item.is-error {
  border-color: #cc5d73;
  box-shadow: 0 0 0 2px rgba(183, 18, 52, .08);
}

.proposal-item-image {
  width: 82px;
  height: 82px;
  border-radius: 6px;
  background: #f6f6f4;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.proposal-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.proposal-item-product { min-width: 0; }
.proposal-item-product small,
.proposal-item-product span,
.proposal-item-price span,
.proposal-item-price small,
.proposal-item-result span,
.proposal-item-result small,
.proposal-item-quantity span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.proposal-item-product h2 {
  margin: 5px 0;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.proposal-item-price strong,
.proposal-item-result strong,
.proposal-item-quantity strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
  white-space: nowrap;
}

.proposal-item-result strong { color: var(--accent); }

.proposal-item-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 7px;
  align-items: end;
}

.proposal-item-edit label {
  min-width: 0;
  font-size: 11px;
}

.proposal-item-edit input {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
}

.proposal-item-edit button { grid-column: 1 / -1; }
.proposal-item-delete { margin: 0; }

.proposal-total-bar {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  margin-top: 14px;
  border: 1px solid #d8d8d4;
  border-radius: 8px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 38px rgba(23, 23, 23, .13);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  backdrop-filter: blur(8px);
}

.proposal-total-bar div {
  border-left: 2px solid var(--line);
  padding-left: 12px;
}

.proposal-total-bar span,
.proposal-total-bar strong { display: block; }
.proposal-total-bar span { color: var(--muted); font-size: 11px; font-weight: 750; }
.proposal-total-bar strong { margin-top: 3px; font-size: 20px; white-space: nowrap; }
.proposal-total-bar div:last-child strong { color: var(--good); }

.proposal-footer-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.proposal-footer-actions form { margin: 0; }

.margin-rule-create { margin-bottom: 20px; }
.margin-rule-create > button { justify-self: start; }
.margin-rules-table input { min-width: 90px; }
.margin-rules-table td:nth-child(2) input { min-width: 180px; }

.storefront-proposal-quantity {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.storefront-hero > div > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 750;
}

@media (max-width: 1260px) {
  .proposal-item {
    grid-template-columns: 76px minmax(190px, 1fr) repeat(2, minmax(145px, .65fr));
  }

  .proposal-item-image { width: 76px; height: 76px; }
  .proposal-item-edit { grid-column: 2 / 4; }
  .proposal-item-result { grid-column: 4; grid-row: 1 / 3; }
  .proposal-item-delete { grid-column: 4; justify-self: end; }
  .proposal-item-quantity { grid-column: 3; }
}

@media (max-width: 900px) {
  .proposal-list-item { grid-template-columns: minmax(0, 1fr) auto; }
  .proposal-list-metrics { grid-column: 1; }
  .proposal-list-actions { grid-column: 2; grid-row: 1 / 3; flex-direction: column; align-items: stretch; }
  .proposal-published-bar { grid-template-columns: 1fr; }
  .proposal-recipient-summary .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proposal-item { grid-template-columns: 76px minmax(180px, 1fr) minmax(145px, .7fr); }
  .proposal-item-price { grid-column: 3; }
  .proposal-item-edit { grid-column: 2 / 4; }
  .proposal-item-result { grid-column: 2 / 3; grid-row: auto; }
  .proposal-item-delete { grid-column: 3; }
  .proposal-item-quantity { grid-column: 3; }
}

@media (max-width: 650px) {
  .proposal-head { align-items: stretch; }
  .proposal-head-actions { width: 100%; }
  .proposal-head-actions > * { flex: 1; text-align: center; }
  .proposal-form-grid,
  .proposal-recipient-summary .details { grid-template-columns: 1fr; }
  .proposal-comment { grid-column: auto; }
  .proposal-add-panel { grid-template-columns: 1fr; }
  .proposal-add-panel form { grid-template-columns: minmax(0, 1fr) 84px; }
  .proposal-add-panel form button { grid-column: 1 / -1; }
  .proposal-share-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proposal-share-tools input { grid-column: 1 / -1; }
  .proposal-list-item { grid-template-columns: 1fr; gap: 14px; }
  .proposal-list-metrics,
  .proposal-list-actions { grid-column: auto; grid-row: auto; }
  .proposal-list-actions { flex-direction: row; }
  .proposal-list-actions > * { flex: 1; text-align: center; }
  .proposal-item { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .proposal-item-image { width: 72px; height: 72px; }
  .proposal-item-price,
  .proposal-item-edit,
  .proposal-item-result,
  .proposal-item-delete,
  .proposal-item-quantity { grid-column: 1 / -1; grid-row: auto; }
  .proposal-item-price,
  .proposal-item-result,
  .proposal-item-quantity { border-top: 1px solid var(--line); padding-top: 10px; }
  .proposal-item-delete,
  .proposal-item-delete button { width: 100%; }
  .proposal-total-bar { position: relative; bottom: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proposal-footer-actions { display: grid; grid-template-columns: 1fr; }
  .proposal-footer-actions form,
  .proposal-footer-actions button { width: 100%; }
}
  padding: 2px;
  border-radius: 6px;
