:root {
  --green: #007d5a;
  --green-dark: #00684c;
  --green-soft: #e8fbf4;
  --panel: #e4e7eb;
  --canvas: #e8e6e5;
  --line: #d8dde5;
  --ink: #081a33;
  --muted: #7d8294;
  --white: #ffffff;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: linear-gradient(90deg, #ffffff 0 72px, var(--canvas) 72px 100%);
  font-family: Arial, Helvetica, sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 210px minmax(520px, 1fr) 344px;
  height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.app-shell.is-login-only {
  grid-template-columns: minmax(320px, 1fr);
  max-width: none;
}

.app-shell.is-matriz {
  grid-template-columns: 210px minmax(620px, 1fr) 280px;
}

.app-shell.is-login-only .sidebar,
.app-shell.is-login-only .bag {
  display: none;
}

.sidebar {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 100vh;
  padding: 14px 8px 54px;
  background: var(--panel);
  border-right: 1px solid #cbd1da;
}

.logo-area {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px 0 14px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 2px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  background: #f9fbfb;
  font-size: 13px;
  font-weight: 800;
}

.logo-area strong {
  color: var(--green-dark);
  font-size: 20px;
}

.logo-area small {
  max-width: 130px;
  color: #3f4a59;
  font-size: 12px;
  line-height: 1.35;
}

.category-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 4px;
  min-height: 0;
  margin-top: 20px;
  overflow-y: auto;
  padding-right: 2px;
}

.category-button {
  width: 100%;
  min-height: 0;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-button.is-active {
  color: #fff;
  background: #07966d;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #034b36;
}

.reseller-access {
  position: fixed;
  left: calc((100vw - min(1440px, 100vw)) / 2 + 14px);
  bottom: 10px;
  z-index: 50;
  width: 182px;
  min-height: 34px;
  margin: 0;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.catalog {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  background: var(--canvas);
  overflow: hidden;
}

.catalog-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  display: block;
  padding: 13px 24px 12px;
  border-bottom: 1px solid var(--line);
}

.search-field input {
  width: 100%;
  height: 38px;
  padding: 0 48px 0 16px;
  border: 1px solid #cfd6e0;
  border-radius: 22px;
  color: var(--ink);
  outline: none;
}

.search-field input:focus,
.city-select select:focus,
.reseller-card input:focus,
.reseller-card textarea:focus,
.checkout-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 125, 90, 0.12);
}

.search-field span {
  position: absolute;
  top: 21px;
  right: 38px;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 24px;
}

.catalog.is-manager .filter-row {
  display: none;
}

.catalog.is-login-only .search-field,
.catalog.is-login-only .filter-row,
.catalog.is-login-only .manager-editing {
  display: none;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.filter-button,
.sort-select select {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
}

.sort-select {
  display: block;
}

.sort-select select {
  min-width: 74px;
  outline: none;
}

.city-select {
  display: grid;
  width: min(100%, 360px);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.city-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.city-select select {
  width: 192px;
  height: 32px;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  outline: none;
  padding: 0 12px;
}

.revenda-contact {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 43px;
  flex: 0 0 43px;
  margin: 0;
  padding: 8px 26px;
  border-top: 1px solid #baf0dc;
  border-bottom: 1px solid #baf0dc;
  background: var(--green-soft);
  overflow: hidden;
}

.welcome {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  height: 16px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.welcome.is-long {
  font-size: 12px;
}

.welcome.is-extra-long {
  font-size: 11px;
}

.message-dots {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.message-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #9bd9c6;
}

.message-dot.is-active {
  width: 9px;
  height: 9px;
  background: var(--green);
}

.catalog.is-manager .message-dots {
  display: none;
}

.catalog.is-login-only .message-dots {
  display: none;
}

.manager-editing {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--green-dark);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.catalog.is-manager .manager-editing {
  display: flex;
}

.manager-editing span {
  flex: 1 1 auto;
  min-width: 0;
}

.manager-import-button,
.manager-orders-button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.manager-import-button {
  border: 1px solid #9adac6;
  color: var(--green-dark);
  background: #edfdf7;
}

.manager-import-button:hover {
  background: #dff8ef;
}

.top-logout {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: #b91c1c;
  background: #fff5f5;
  font-size: 12px;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-content: start;
  gap: 18px;
  min-height: 0;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scrollbar-color: #8b8e95 #d6d6d6;
}

.catalog:not(.is-manager) .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.catalog:not(.is-manager) .product-grid {
  max-height: calc(100vh - 158px);
}

.catalog.is-login-only .product-grid {
  grid-template-columns: minmax(260px, 520px);
  align-content: center;
  justify-content: center;
  max-height: calc(100vh - 55px);
  text-align: center;
}

.catalog.is-manager .product-grid {
  max-height: calc(100vh - 120px);
}

.bag-content.manager-transition {
  animation: panelFadeSlide 0.22s ease both;
}

@keyframes panelFadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.product-grid.manager-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.manager-product {
  gap: 10px;
  padding: 13px;
}

.catalog.is-reseller-order .product-grid.manager-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.catalog.is-reseller-catalog .product-grid.manager-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.product-card {
  overflow: hidden;
  min-height: 264px;
  border-radius: var(--radius);
  background: var(--white);
}

.product-grid.is-list .product-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 150px;
}

.product-media {
  display: grid;
  place-items: center;
  min-height: 128px;
  background: #e9fbf5;
}

.product-box {
  position: relative;
  width: 34px;
  height: 30px;
  transform: rotate(-14deg);
  border-radius: 4px;
  background: linear-gradient(135deg, #f8c069 0 48%, #a97042 49% 100%);
}

.product-box::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 54% 18%, 100% 0, 48% 28%);
  background: #ffd38a;
}

.product-body {
  display: grid;
  grid-template-rows: minmax(38px, auto) auto 1fr;
  gap: 8px;
  min-height: 136px;
  padding: 18px 16px 16px;
}

.product-grid.is-list .product-body {
  min-height: 150px;
}

.manager-product {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.manager-product.is-inactive {
  border-color: #fecaca;
  background: #fff7f7;
}

.catalog.is-reseller-order .manager-product {
  gap: 10px;
  padding: 13px;
}

.catalog.is-reseller-catalog .manager-product {
  gap: 10px;
  padding: 13px;
}

.catalog.is-reseller-order .manager-product strong {
  font-size: 12px;
}

.catalog.is-reseller-catalog .manager-product strong {
  font-size: 12px;
}

.catalog.is-reseller-order .manager-product span {
  font-size: 10px;
}

.catalog.is-reseller-catalog .manager-product span {
  font-size: 10px;
}

.catalog.is-reseller-order .manager-product input {
  height: 30px;
  font-size: 12px;
}

.catalog.is-reseller-catalog .manager-product input {
  height: 30px;
  font-size: 12px;
}

.manager-product strong,
.manager-product span {
  display: block;
}

.manager-product strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.manager-product span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.manager-product label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.manager-product input {
  width: 100%;
  height: 34px;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  padding: 0 10px;
  outline: none;
}

.manager-product input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 125, 90, 0.12);
}

.save-price-button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.save-price-button.is-saved {
  background: #2563eb;
}

.product-status-badge {
  display: inline-grid;
  place-items: center;
  width: max-content;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.product-status-badge.is-active {
  color: #166534;
  background: #dcfce7;
}

.product-status-badge.is-inactive {
  color: #991b1b;
  background: #fee2e2;
}

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

.product-status-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.product-status-button.is-inactive-action {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.product-status-button.is-active-action {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.stepper-control {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.stepper-control button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 18px;
  font-weight: 800;
}

.stepper-control strong {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
}

.reseller-order-add {
  justify-self: end;
}

.manager-product input:disabled {
  color: #94a3b8;
  background: #eef2f7;
  cursor: not-allowed;
}

.manager-placeholder {
  grid-column: 1 / -1;
  max-width: 620px;
  margin: 70px auto 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.manager-placeholder strong {
  display: block;
  color: var(--green-dark);
  font-size: 20px;
  margin-bottom: 8px;
}

.manager-placeholder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.orders-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  align-content: start;
}

.order-board-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.order-board-head strong,
.order-board-head span {
  display: block;
}

.order-board-head strong {
  color: var(--green-dark);
  font-size: 16px;
}

.order-board-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.order-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.order-tabs button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.order-tabs button.is-active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.order-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.order-card.is-done {
  border-color: #bbf7d0;
  background: #f7fff9;
}

.order-card-head,
.order-total,
.order-lines p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-card-head span,
.order-lines span {
  color: var(--muted);
  font-size: 12px;
}

.order-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 11px;
  text-transform: uppercase;
}

.order-lines {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.order-lines p {
  margin: 0;
  font-size: 13px;
}

.separation-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f7;
}

.separation-line:last-child {
  border-bottom: 0;
}

.separation-line strong,
.separation-line span {
  display: block;
}

.separation-line strong {
  color: var(--ink);
  font-size: 13px;
}

.attended-control {
  display: grid;
  grid-template-columns: 28px 58px 28px auto;
  align-items: center;
  gap: 6px;
}

.attended-control button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 15px;
  font-weight: 800;
}

.attended-control input {
  width: 58px;
  height: 30px;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  text-align: center;
}

.attended-control small {
  color: var(--muted);
  font-size: 11px;
}

.order-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 800;
}

.order-actions {
  display: flex;
  justify-content: end;
}

.order-actions button {
  min-width: 170px;
  padding: 0 14px;
}

.reseller-mini-bag {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.reseller-mini-bag strong {
  color: var(--ink);
  font-size: 13px;
}

.reseller-mini-bag small {
  color: var(--muted);
}

.reseller-mini-bag p,
.reseller-mini-bag div {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(68px, auto);
  gap: 8px;
  margin: 0;
  font-size: 12px;
}

.reseller-mini-bag p span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reseller-mini-bag p b {
  white-space: nowrap;
  text-align: right;
}

.mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.mini-stepper button {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.mini-stepper em {
  min-width: 14px;
  font-style: normal;
  text-align: center;
}

.reseller-mini-bag div {
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto);
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 800;
}

.reseller-mini-bag > button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.reseller-mini-bag > button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-body h3 {
  margin: 0;
  color: #001b3a;
  font-size: 13px;
  line-height: 1.35;
}

.product-unit {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
}

.product-unit::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 3px;
  background: linear-gradient(135deg, #f8c069 0 50%, #a97042 51% 100%);
  transform: rotate(-20deg);
}

.product-buy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.product-price {
  color: var(--green);
  font-size: 13px;
}

.add-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #2b7756;
  font-size: 24px;
  line-height: 1;
}

.bag {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 0;
  background: var(--white);
  border-left: 1px solid var(--line);
}

.bag-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
}

.bag-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #233246;
}

.bag-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bag-icon .icon-store {
  display: none;
}

.bag-icon.is-store .icon-bag {
  display: none;
}

.bag-icon.is-store .icon-store {
  display: block;
}

.bag-content {
  overflow-y: auto;
  min-height: 0;
  padding: 28px 16px 92px;
}

.empty-bag {
  margin: 22px 0 0;
  color: #9a90a9;
  text-align: center;
  font-size: 14px;
}

.bag-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #eef0f3;
}

.bag-item h4 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.3;
}

.bag-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.revenda-list-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 0 12px;
}

.order-badge {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  font-size: 11px;
  font-weight: 800;
}

.logout-button {
  width: 100%;
  min-height: 36px;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: #b91c1c;
  background: #fff5f5;
  font-size: 13px;
  font-weight: 800;
}

.revenda-list-button.is-active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.secondary-panel-button {
  color: var(--green-dark);
  background: #eefbf5;
  border-color: #baf0dc;
}

.revenda-panel-title {
  margin: 4px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.catalog-videira {
  font-weight: 800;
}

.bulk-revendas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--green-dark);
  font-weight: 800;
}

.cascade-arrow {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
}

.bulk-check-panel {
  overflow: hidden;
  margin: -2px 0 10px;
  padding: 8px 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  transform-origin: top;
  animation: cascadeOpen 0.22s ease both;
}

@keyframes cascadeOpen {
  from {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px) scaleY(0.96);
  }
  to {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.bulk-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 32px;
  margin-bottom: 6px;
  padding: 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.bulk-check input {
  order: 2;
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--green);
  cursor: pointer;
}

.bulk-check span {
  order: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.revenda-separator {
  height: 1px;
  margin: 12px 0;
  background: var(--line);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.bag-footer {
  position: sticky;
  bottom: 0;
  z-index: 50;
  width: auto;
  display: none;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.08);
}

.bag.has-items .bag-footer {
  display: grid;
}

.bag-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.checkout-button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.reseller-dialog,
.checkout-dialog,
.import-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.import-dialog {
  width: min(780px, calc(100vw - 28px));
}

.reseller-dialog::backdrop,
.checkout-dialog::backdrop,
.import-dialog::backdrop {
  background: rgba(3, 7, 18, 0.36);
}

.reseller-card,
.checkout-card,
.import-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.checkout-card,
.import-card {
  max-height: min(760px, calc(100vh - 32px));
  overflow-y: auto;
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-heading p,
.dialog-heading h2 {
  margin: 0;
}

.dialog-heading p {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-heading h2 {
  margin-top: 4px;
  font-size: 24px;
}

.close-dialog {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--ink);
  font-size: 22px;
}

.reseller-dialog.is-required-login .close-dialog {
  display: none;
}

.reseller-card label,
.checkout-card label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.reseller-card input,
.reseller-card textarea,
.checkout-card input {
  width: 100%;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  outline: none;
  padding: 10px 12px;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 14px;
}

.checkout-card input:disabled {
  color: #334155;
  background: #eef2f7;
  border-color: #d8dde5;
}

.reseller-card textarea {
  resize: vertical;
}

.dialog-action,
.secondary-action {
  min-height: 40px;
  border-radius: var(--radius);
  font-weight: 800;
}

.dialog-action {
  border: 0;
  color: #fff;
  background: var(--green);
}

.dialog-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.dialog-actions,
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-items {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.confirm-line,
.confirm-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.confirm-line span {
  color: var(--muted);
}

.confirm-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 800;
}

.import-mode-control {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.import-mode-control label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.import-mode-control select {
  min-height: 34px;
  border: 1px solid #cfd6e0;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-weight: 700;
  padding: 0 10px;
}

.import-mode-control p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.import-summary span {
  padding: 7px 10px;
  border-radius: var(--radius);
  background: #f1f5f9;
}

.import-summary .is-ok {
  color: #166534;
  background: #dcfce7;
}

.import-summary .is-warning {
  color: #92400e;
  background: #fef3c7;
}

.import-alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 700;
}

.import-preview-list {
  display: grid;
  gap: 8px;
  max-height: min(430px, 52vh);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.import-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
}

.import-row.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.import-row.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.import-row strong,
.import-row span,
.import-row small {
  display: block;
}

.import-row strong {
  color: var(--ink);
  font-size: 13px;
}

.import-row span {
  margin-top: 3px;
  color: #475569;
  font-size: 12px;
}

.import-row small {
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
}

.alias-select,
.sheet-row-select,
.manual-cost-input,
.manual-sale-input {
  width: min(100%, 360px);
  min-height: 34px;
  margin-top: 9px;
  border: 1px solid #facc15;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  padding: 0 9px;
}

.manual-cost-input {
  border-color: #f59e0b;
  background: #fff;
}

.manual-sale-input {
  border-color: #22c55e;
  background: #fff;
}

.import-row.is-ok .alias-select {
  border-color: #86efac;
  background: #f7fff9;
}

.import-row.is-ok .manual-cost-input {
  border-color: #86efac;
}

.sheet-row-select {
  border-color: #f59e0b;
  background: #fffbeb;
}

.import-status {
  align-self: start;
  min-width: 118px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.import-row.is-ok .import-status {
  color: #166534;
  background: #bbf7d0;
}

.import-row.is-warning .import-status {
  color: #92400e;
  background: #fde68a;
}

.form-error,
.cep-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

.form-error {
  color: #991b1b;
  background: #fee2e2;
}

.cep-status {
  color: #075985;
  background: #e0f2fe;
}

.cep-status.is-error {
  color: #991b1b;
  background: #fee2e2;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .bag {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 88vw);
    box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
    max-height: none;
    overflow: visible;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding-bottom: 10px;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .reseller-access {
    position: static;
    width: 100%;
  }

  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .city-select,
  .city-select select,
  .city-controls,
  .revenda-contact {
    width: 100%;
  }

  .city-controls {
    align-items: stretch;
    flex-direction: column;
  }

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

  .bag {
    position: static;
    width: auto;
    min-height: 260px;
  }

  .bag-footer {
    position: static;
    width: 100%;
  }
}
