:root {
  --bg: #e7e0d4;
  --ink: #27303a;
  --muted: #65707c;
  --brand: #223142;
  --brand-dark: #18202b;
  --accent: #91a2b5;
  --danger: #a95342;
  --warning: #9a6c27;
  --ok: #526a78;
  --card: #fbfcfd;
  --border: #d6dee7;
  --shadow: 0 12px 26px rgba(32, 41, 52, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  line-height: 1.45;
  font-family: "IBM Plex Sans", "Segoe UI", "Manrope", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 50% 100%, rgba(31, 44, 58, 0.14), rgba(31, 44, 58, 0) 30%),
    radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 100% 50%, rgba(125, 140, 156, 0.18), rgba(125, 140, 156, 0) 34%),
    linear-gradient(180deg, #f1f3f6 0%, #ebeff3 52%, #dde4ea 100%);
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 840px;
  margin: 0 auto;
  padding: 54px 0 18px;
  padding-bottom: 110px;
}

.catalog-page {
  max-width: none;
  width: fit-content;
  min-width: 0;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  background: rgba(242, 245, 247, 0.96);
  border: 1px solid #d3dbe4;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 6px 14px rgba(42, 53, 66, 0.09);
}

.top-nav:not(.app-header) {
  display: none !important;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(320px, 470px) minmax(150px, 1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 0;
  min-height: 54px;
  padding: 6px 16px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(105deg, rgba(17, 24, 34, 0) 0%, rgba(17, 24, 34, 0) 58%, rgba(208, 217, 226, 0.64) 100%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 12px,
      rgba(255, 255, 255, 0) 12px,
      rgba(255, 255, 255, 0) 24px
    ),
    #151d28;
  box-shadow: 0 4px 16px rgba(17, 24, 34, 0.24);
}

.app-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 78% 50%, rgba(220, 228, 236, 0.24), rgba(220, 228, 236, 0) 28%);
  pointer-events: none;
}

.brand-logos {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  min-width: 260px;
  height: 44px;
  color: #fff;
  text-decoration: none;
}

.brand-logos:hover {
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  letter-spacing: 0;
}

.brand-logo-svg {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.brand-logo-go-svg {
  width: 72px;
  height: 38px;
}

.brand-logo-almo-svg {
  width: 166px;
  height: 38px;
}

.go-logo-text {
  fill: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
}

.go-logo-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.go-logo-sub {
  fill: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 4px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.almo-logo-text {
  fill: #ff4a12;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 27px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -1.4px;
}

.almo-logo-leaf {
  fill: none;
  stroke: #61a60e;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.header-search {
  position: relative;
  width: 100%;
}

.header-search input,
.header-search-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 34px;
  border-radius: 999px;
  padding: 8px 44px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: #fffefb;
  color: #18202b;
}

.header-search-link:hover {
  text-decoration: none;
}

.header-search-placeholder {
  color: #7b7f86;
  font-size: 0.86rem;
}

.header-search-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  color: #18202b;
  font-size: 1.7rem;
  line-height: 1;
  transform: translateY(-52%);
  pointer-events: none;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.header-spacer {
  min-height: 34px;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1010;
  min-width: 210px;
  border: 1px solid #d3dbe4;
  border-radius: 8px;
  background: #fffefb;
  color: #28313d;
  box-shadow: 0 8px 18px rgba(23, 31, 42, 0.14);
  padding: 10px 12px;
}

[hidden],
.dropdown-menu[hidden] {
  display: none !important;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu a,
.menu-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 8px 9px;
  background: transparent;
  color: #28313d;
  text-align: left;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.profile-menu a:hover,
.menu-button:hover {
  background: #edf2f7;
  text-decoration: none;
}

.profile-menu-user {
  display: block;
  max-width: 260px;
  padding: 5px 9px 8px;
  color: #68717c;
  font-size: 0.78rem;
  border-bottom: 1px solid #e5e8ed;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.header-icon-btn {
  min-width: 48px;
  min-height: 40px;
  flex-direction: column;
  gap: 2px;
  color: #f5f7fb;
}

.header-icon-label {
  font-size: 0.62rem;
  line-height: 1;
  text-transform: uppercase;
}

.cart-widget {
  display: inline-flex;
  min-width: 62px;
  min-height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #f5f7fb;
  text-decoration: none;
}

.cart-widget:hover {
  text-decoration: none;
}

.cart-total {
  max-width: 86px;
  overflow: hidden;
  color: #f5f7fb;
  font-size: 0.72rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-user,
.icon-cart,
.icon-search,
.icon-filter,
.icon-sort,
.icon-refresh,
.icon-clear-cart {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.icon-user {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-cart {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-search {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-clear-cart {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='m19 6-1 14H6L5 6'/%3E%3Cpath d='M10 11v5'/%3E%3Cpath d='M14 11v5'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-filter {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' x2='14' y1='4' y2='4'/%3E%3Cline x1='10' x2='3' y1='4' y2='4'/%3E%3Cline x1='21' x2='12' y1='12' y2='12'/%3E%3Cline x1='8' x2='3' y1='12' y2='12'/%3E%3Cline x1='21' x2='16' y1='20' y2='20'/%3E%3Cline x1='12' x2='3' y1='20' y2='20'/%3E%3Cline x1='14' x2='14' y1='2' y2='6'/%3E%3Cline x1='8' x2='8' y1='10' y2='14'/%3E%3Cline x1='16' x2='16' y1='18' y2='22'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-sort {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 16 4 4 4-4'/%3E%3Cpath d='M7 20V4'/%3E%3Cpath d='M11 4h10'/%3E%3Cpath d='M11 8h7'/%3E%3Cpath d='M11 12h4'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-sort.is-asc {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 8 4-4 4 4'/%3E%3Cpath d='M7 4v16'/%3E%3Cpath d='M11 4h10'/%3E%3Cpath d='M11 8h7'/%3E%3Cpath d='M11 12h4'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-sort.is-desc {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 16 4 4 4-4'/%3E%3Cpath d='M7 20V4'/%3E%3Cpath d='M11 4h10'/%3E%3Cpath d='M11 8h7'/%3E%3Cpath d='M11 12h4'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-refresh {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-15-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 15 6.7l3-2.7'/%3E%3Cpath d='M21 21v-5h-5'/%3E%3C/g%3E%3C/svg%3E");
}

.brand {
  font-weight: 800;
  color: #3f5232;
  letter-spacing: 0.02em;
}

.hero {
  background:
    linear-gradient(125deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0) 45%),
    linear-gradient(120deg, #18202b 0%, #2e3744 58%, #5c6470 100%);
  color: #fffbf3;
  border-radius: calc(var(--radius) + 6px);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -30% -38% -10%;
  height: 140px;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0,
    rgba(255, 255, 255, 0.1) 12px,
    rgba(255, 255, 255, 0.02) 12px,
    rgba(255, 255, 255, 0.02) 24px
  );
  transform: rotate(-1deg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: -35% auto auto 66%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 222, 174, 0.4);
  filter: blur(18px);
}

.hero h1 {
  margin: 0;
  font-size: 1.56rem;
  letter-spacing: 0.01em;
}

.hero p {
  margin: 8px 0 0;
  color: rgba(245, 251, 255, 0.93);
  max-width: 900px;
}

.hero-metrics {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.83rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.catalog-state {
  display: none;
}

.inner-hero {
  display: none;
}

.inner-hero h1 {
  font-size: 1.2rem;
}

.inner-hero p {
  margin-top: 4px;
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 0;
}

.catalog-page .grid {
  display: inline-grid;
  grid-template-columns: minmax(0, max-content);
  width: fit-content;
  margin: 0 auto;
}

.span-2 {
  grid-column: span 2;
}

.catalog-page .span-2 {
  grid-column: 1;
}

.card {
  background: rgba(253, 254, 255, 0.96);
  border: 0;
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.07);
  padding: 12px;
  animation: card-in 0.28s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: none;
}

.card.compact {
  min-height: 190px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card h2 {
  margin: 0 0 10px 0;
  font-size: 1.12rem;
  color: #25313d;
}

.card h3 {
  margin: 18px 0 10px;
}

.muted {
  color: var(--muted);
}

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

.field + .row,
.legal-box + form .row {
  margin-top: 12px;
}

.row.center {
  align-items: center;
}

.toolbar-row {
  margin-top: 12px;
  align-items: center;
}

.filters-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr);
  gap: 9px;
}

.filter-title {
  margin-bottom: 5px;
  color: #465363;
  font-size: 0.78rem;
  font-weight: 500;
}

.compact-checkbox-list {
  gap: 4px;
  min-height: 0;
}

.compact-checkbox-list label {
  align-items: center;
  display: flex;
  gap: 6px;
  color: #465363;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.field.full {
  width: 100%;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d4dde6;
  background: #fbfcfe;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.96rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #93a5b7;
  box-shadow: 0 0 0 3px rgba(147, 165, 183, 0.18);
}

input[type="checkbox"] {
  width: auto;
}

.btn {
  min-height: 34px;
  border: 1px solid #223142;
  background: #223142;
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.btn:hover {
  background: #2f3d4d;
  border-color: #2f3d4d;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: #384656;
  border-color: #384656;
}

.btn.flat {
  background: #eef2f7;
  color: #30404f;
  border: 1px solid #d3dbe4;
}

.small-btn {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.admin-users-pagination {
  margin-bottom: 8px;
  align-items: end;
}

.admin-users-pagination .field {
  min-width: 150px;
}

.admin-users-page-info {
  padding-bottom: 6px;
  color: #695d4c;
  font-size: 0.88rem;
}

.admin-table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-table-actions .btn {
  min-height: 28px;
  padding: 6px 9px;
  font-size: 0.78rem;
  border-radius: 5px;
}

.admin-table-actions .btn.flat {
  background: #edf2f7;
  color: #3e4754;
  border-color: #d3dde7;
}

.admin-table-actions .btn.flat:hover {
  background: #e4ecf4;
  border-color: #c4d0dc;
}

.admin-page-nav {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 0.8rem;
}

.admin-page-nav:disabled {
  opacity: 0.5;
}

.admin-edit-actions {
  gap: 8px;
}

.price-card {
  overflow: visible;
  min-height: calc(100vh - 54px);
}

.catalog-page .price-card {
  width: fit-content;
  max-width: none;
}

.price-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.catalog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-icon-btn,
.action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #334150;
  background: transparent;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.tool-icon-btn:hover,
.action-icon-btn:hover {
  background: #e6ecf3;
  color: #18202b;
  transform: translateY(-1px);
}

.action-icon-btn {
  color: #2f3640;
  border: 0;
}

.filters-menu {
  width: min(150px, calc(100vw - 34px));
  top: calc(100% + 8px);
}

.filter-reset-btn {
  width: 100%;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #223142;
  color: #fff;
  font-size: 0.76rem;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #30404f;
}

#sort-cycle-btn {
  display: none !important;
}

.sort-control select {
  width: auto;
  min-width: 0;
  max-width: 190px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 0.84rem;
}

.alert {
  border-radius: 12px;
  padding: 11px 12px;
  margin: 8px 0;
  font-size: 0.93rem;
  white-space: pre-line;
}

.alert.error {
  background: #f9e5e2;
  border: 1px solid #f0c6bf;
  color: #8a2d22;
}

.alert.ok {
  background: #edf2f6;
  border: 1px solid #d1d9e2;
  color: #293541;
}

.alert.warn {
  background: #eef4fa;
  border: 1px solid #d0dbe7;
  color: #44556f;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #d3dbe4;
  border-radius: 0;
  background: #fbfdff;
}

.fit-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.catalog-page .fit-table-wrap {
  width: fit-content;
  max-width: none;
}

.fit-table-wrap::-webkit-scrollbar {
  display: none;
}

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

.fit-table {
  width: max-content;
  min-width: 100%;
}

.fit-table th,
.fit-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.responsive-table {
  min-width: 900px;
}

.catalog-table {
  table-layout: auto;
  width: max-content;
  min-width: max-content;
  margin: 0;
}

.catalog-table .product-name-text {
  min-width: 0;
}

.catalog-table .product-name-cell {
  min-width: 0;
}

.all-prices-list {
  display: grid;
  gap: 4px;
  min-width: 180px;
  font-size: 0.82rem;
}

.all-prices-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  white-space: nowrap;
}

.all-prices-list strong {
  color: #223142;
  font-weight: 700;
}

th,
td {
  padding: 7px 8px;
  border-bottom: 1px solid #dde4ea;
  border-right: 1px solid #dde4ea;
  vertical-align: top;
  text-align: left;
  font-size: 0.78rem;
}

th {
  background: #e1e7ee;
  color: #30404f;
  font-size: 0.72rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

td.right,
th.right {
  text-align: right;
}

.catalog-table th:nth-child(2),
.catalog-table td:nth-child(2) {
  width: 44px;
  min-width: 44px;
  padding-left: 2px;
  padding-right: 2px;
  vertical-align: middle;
  text-align: center;
}

.catalog-table th:nth-child(3),
.catalog-table td:nth-child(3) {
  width: 58px;
  min-width: 58px;
  padding-left: 2px;
  padding-right: 2px;
  vertical-align: middle;
  text-align: center;
}

.catalog-table td:nth-child(2),
.catalog-table td:nth-child(3) {
  font-size: 0.76rem;
  font-weight: 600;
}

.catalog-table td {
  vertical-align: middle;
}

.catalog-table th:nth-child(2),
.catalog-table th:nth-child(3),
.catalog-table td.right:nth-child(2),
.catalog-table td.right:nth-child(3),
.catalog-table td:nth-child(5) {
  vertical-align: middle;
  text-align: center;
}

.catalog-table td:nth-child(5) {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.product-name-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 350px;
}

.catalog-table .qty-picker {
  display: inline-flex;
  margin: 0 auto;
  flex-wrap: nowrap;
  justify-content: center;
}

.catalog-table .qty-input {
  min-width: 48px;
  width: 54px;
}

.orders-table td:nth-child(5) {
  line-height: 1.35;
}

.product-name-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.product-name-title {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.product-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf2f7;
  border: 1px solid #d4dde7;
  flex: 0 0 34px;
}

.product-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8f8167;
  font-size: 0.55rem;
  font-weight: 600;
}

.product-article {
  color: #7c6b50;
  font-size: 0.62rem;
}

.product-barcode-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: 3px;
  white-space: nowrap;
}

.product-barcode-label {
  font-size: 0.62rem;
  line-height: 1.2;
  color: #8a96a6;
}

.product-barcode-copy {
  padding: 0;
  border: 0;
  background: transparent;
  color: #5e6f86;
  font: inherit;
  cursor: copy;
  white-space: nowrap;
}

.product-barcode-copy:hover {
  color: #334150;
}

.product-barcode-value {
  display: inline-block;
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.product-barcode-copy.is-copied .product-barcode-value {
  color: #3b5d86;
  font-weight: 700;
}

.product-barcode-status {
  color: #2f8a3e;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

tr:hover td {
  background: #edf2f7;
}

.out-of-stock-row td {
  color: #7f8892;
  background: #f5f7fa;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-new,
.status-queued_export {
  background: #eee8dd;
  color: #7a6246;
}

.status-exported {
  background: #edf2f6;
  color: #293541;
}

.status-export_failed {
  background: #fae6e3;
  color: #a33f31;
}

.status-default {
  background: #ece7e0;
  color: #5d5d58;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 600;
  background: #edf2f6;
  color: #30404f;
  border: 1px solid #d1d9e2;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.admin-area.hidden {
  display: none !important;
}

.login-shell {
  max-width: 560px;
  margin: 36px auto;
}

.legal-box {
  border: 1px dashed #c7d3df;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f7fafc;
  font-size: 0.9rem;
}

.small {
  font-size: 0.86rem;
}

.loading-row td {
  color: #7d725f;
}

.empty-row td {
  text-align: center;
  color: #7d725f;
}

.pagination-bar {
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pagination-left,
.pagination-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size-select {
  width: auto;
  min-width: 64px;
  padding: 5px 8px;
}

.qty-picker {
  display: inline-flex;
  align-items: center;
  gap: 0;
  justify-content: flex-end;
}

.qty-step-btn {
  width: 28px;
  height: 24px;
  border: 0;
  background: #eef5fb;
  color: #1f2937;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.qty-step-btn:hover {
  border-color: #9cb9d4;
  background: #dbeaf7;
  color: #0f172a;
  transform: translateY(-1px);
}

.qty-step-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qty-input {
  width: 38px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: #eef5fb;
  text-align: center;
  font-weight: 600;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.qty-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.page-arrow-btn {
  min-width: 28px;
  height: 28px;
  padding: 4px 7px;
  font-weight: 800;
}

.order-summary-panel {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
}

.order-summary-item {
  border: 1px solid #d4dce7;
  border-radius: 4px;
  background: #f7f9fc;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-summary-item span {
  font-size: 0.8rem;
  color: #786a53;
}

.order-summary-item strong {
  font-size: 1.08rem;
  color: #3f382b;
}

.cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 9999;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #c9d3df;
  background: rgba(247, 249, 252, 0.98);
  box-shadow: 0 10px 24px rgba(52, 67, 92, 0.18);
}

.cookie-consent__text {
  font-size: 0.9rem;
  color: #46576d;
}

.cookie-consent__text a {
  font-weight: 600;
}

.cookie-consent__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.scroll-top-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 9px,
      rgba(255, 255, 255, 0) 9px,
      rgba(255, 255, 255, 0) 18px
    ),
    #18202b;
  color: #fff;
  font-size: 0;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(18, 24, 34, 0.28);
  transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.scroll-top-btn::before {
  content: "\2191";
  font-size: 1.35rem;
  line-height: 1;
}

.scroll-top-btn:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background-color: #2e3744;
  transform: translateY(-2px);
}

.scroll-top-btn.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .app-header {
    grid-template-columns: minmax(190px, 1fr) minmax(260px, 470px) minmax(120px, 1fr);
  }

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

  .span-2 {
    grid-column: span 1;
  }

  .filters-grid {
    grid-template-columns: minmax(190px, 1fr);
  }
}

@media (max-width: 760px) {
  .page {
    padding: 100px 8px 12px;
    padding-bottom: 118px;
  }

  .app-header {
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    padding: 8px 10px 8px;
  }

  .brand-logos {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 0;
    gap: 8px;
  }

  .brand-logo-go {
    font-size: 1.2rem;
  }

  .brand-logo-almo {
    font-size: 0.95rem;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .header-search input,
  .header-search-link {
    height: 42px;
    font-size: 0.95rem;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-content: flex-end;
    gap: 6px;
  }

  .header-icon-label {
    display: none;
  }

  .header-icon-btn,
  .cart-widget {
    min-height: 40px;
  }

  .cart-widget {
    min-width: 48px;
    padding: 0 10px;
    justify-content: center;
  }

  .price-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .catalog-actions,
  .sort-control,
  .sort-control select {
    width: 100%;
  }

  .catalog-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .filter-dropdown {
    width: 40px;
  }

  .sort-control {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
  }

  .toolbar-row {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    align-self: center;
    justify-self: auto;
    gap: 6px;
    margin-left: 0;
  }

  .sort-menu-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 6px 8px;
    font-size: 0.76rem;
  }

  .tool-icon-btn,
  .action-icon-btn {
    width: 40px;
    height: 40px;
  }

  .btn {
    min-height: 40px;
    padding: 9px 12px;
  }

  .btn.flat,
  .small-btn,
  .page-arrow-btn {
    min-height: 38px;
  }

  input,
  select,
  textarea {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 1rem;
  }

  .hero h1 {
    font-size: 1rem;
    line-height: 1.2;
  }

  .hero {
    padding: 12px 12px;
  }

  .card {
    padding: 9px;
  }

  .hero-metrics {
    gap: 6px;
  }

  .hero-pill {
    font-size: 0.74rem;
    padding: 4px 8px;
  }

  .login-shell {
    max-width: 100%;
    margin: 12px auto 14px;
  }

  .login-shell.page {
    padding-top: 14px;
    padding-bottom: 84px;
  }

  .login-shell .hero {
    padding: 14px 12px;
    margin-bottom: 10px;
  }

  .login-shell .hero h1 {
    font-size: 1.12rem;
  }

  .login-shell .card {
    padding: 12px;
  }

  .login-shell .row {
    gap: 10px;
  }

  .login-shell .row .btn {
    width: 100%;
  }

  .login-shell .footer-links {
    display: grid;
    gap: 6px;
    align-items: start;
    font-size: 0.95rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  .fit-table-wrap {
    border-radius: 12px;
    overflow: visible;
  }

  .responsive-table {
    width: 100%;
    min-width: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: block;
  }

  .catalog-page .responsive-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-bottom: 8px;
    border: 1px solid #dce3ea;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 14px rgba(31, 44, 58, 0.045);
  }

  .catalog-page .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid #edf1f5;
    padding: 7px 9px;
    text-align: left;
  }

  .catalog-page .responsive-table td:last-child {
    border-bottom: 0;
  }

  .catalog-page .responsive-table td::before {
    content: attr(data-label);
    flex: 0 0 34%;
    max-width: 34%;
    color: #6d7784;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
  }

  .catalog-page .responsive-table td.right {
    text-align: left;
  }

  .catalog-page .responsive-table td[data-label="Наименование"] {
    grid-column: 1 / -1;
    align-items: flex-start;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .catalog-page .responsive-table td[data-label="Наименование"]::before {
    display: none;
  }

  .catalog-page .responsive-table td[data-label="Наименование"] .product-name-cell {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    gap: 8px;
  }

  .catalog-page .responsive-table td[data-label="Наименование"] .product-name-title {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .catalog-page .responsive-table td[data-label="Наименование"] .product-article {
    font-size: 0.68rem;
  }

  .catalog-page .responsive-table td[data-label="Наименование"] .product-barcode-row {
    display: none;
  }

  .catalog-page .responsive-table td[data-label="Наименование"] .product-thumb {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .catalog-page .responsive-table td[data-label="Доступно"],
  .catalog-page .responsive-table td[data-label="Цена с НДС, BYN"] {
    display: flex;
    padding: 3px 10px 3px 52px;
    border-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .catalog-page .responsive-table td[data-label="Доступно"]::before,
  .catalog-page .responsive-table td[data-label="Цена с НДС, BYN"]::before {
    display: inline;
    content: attr(data-label) ": ";
    flex: none;
    max-width: none;
    color: #6d7784;
    font-size: 0.68rem;
    font-weight: 700;
  }

  .catalog-page .responsive-table td[data-label="Доступно"],
  .catalog-page .responsive-table td[data-label="Цена с НДС, BYN"] {
    white-space: nowrap;
  }

  .catalog-page .responsive-table td[data-label="Доступно"] {
    grid-column: 1;
    padding-top: 6px;
  }

  .catalog-page .responsive-table td[data-label="Цена с НДС, BYN"] {
    grid-column: 2;
    padding-bottom: 6px;
  }

  .catalog-page .responsive-table td[data-label="Заказать, шт."] {
    grid-column: 1 / -1;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-page .responsive-table td[data-label="Заказать, шт."]::before {
    display: none;
  }

  .catalog-page .responsive-table td[data-label="Заказать, шт."] .qty-picker {
    width: auto;
    display: grid;
    grid-template-columns: 34px 54px 34px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    gap: 0;
  }

  .catalog-page .responsive-table td[data-label="Заказать, шт."] .qty-step-btn {
    width: 34px;
    height: 34px;
  }

  .catalog-page .responsive-table td[data-label="Заказать, шт."] .qty-input {
    width: 54px;
    min-width: 54px;
    height: 34px;
  }

  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .pagination-left,
  .pagination-right {
    width: 100%;
  }

  .pagination-right {
    justify-content: space-between;
  }

  .pagination-left .page-size-select {
    width: 100%;
  }

  .page-arrow-btn {
    flex: 1;
  }

  .order-summary-panel {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-users-pagination {
    align-items: stretch;
  }

  .admin-users-pagination .field,
  .admin-users-pagination .pagination-left,
  .admin-users-pagination .pagination-right {
    width: 100%;
  }

  .admin-users-pagination .pagination-left {
    justify-content: stretch;
  }

  .admin-users-page-info {
    width: 100%;
  }

  .admin-edit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-edit-actions .btn {
    width: 100%;
  }

  .cookie-consent {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 9px 10px;
  }
}
.sort-dropdown {
.sort-dropdown {
  position: relative;
}

.sort-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 206px;
  max-width: 260px;
}

.sort-menu-btn:hover {
  background: #eef4fb;
  border-color: #b8c5d5;
}

.sort-menu-label {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sort-menu {
  left: 0;
  right: auto;
  transform: none;
  top: calc(100% + 6px);
  width: 198px;
  min-width: 198px;
  max-width: min(240px, calc(100vw - 24px));
  padding: 8px 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sort-menu label {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  color: #4b5563;
  line-height: 1.25;
  white-space: nowrap;
}

.sort-menu label:hover {
  background: #eef4fb;
}

.sort-menu input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #2f6fd6;
}
