:root {
  font-family: "DM Sans", sans-serif;
  color: #20251f;
  background: #f5f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #20251f;
  --muted: #8b918a;
  --green: #2c684b;
  --green-dark: #20543b;
  --line: #e9ece7;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.15%;
  background: #fff;
  border-bottom: 1px solid #eef0ed;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -1.1px;
  text-decoration: none;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-family: Manrope, sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -2px;
  padding: 0 3px 3px 0;
}

.store-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px 7px 7px;
  border: 1px solid #e9ece7;
  border-radius: 11px;
  background: white;
  font-size: 13px;
  font-weight: 600;
}

.account-button {
  margin-left: 10px;
}

.store-avatar {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef3ee;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.store-chevron {
  margin-left: 3px;
  color: #858c84;
}

.icon-button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.store-switcher[hidden] {
  display: none;
}

.workspace {
  width: min(1340px, 100%);
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 32px;
  margin: 0 auto;
  padding: 42px 5.15% 48px;
}

.subscription-gate {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  overflow: hidden;
  padding: clamp(38px, 8vw, 112px) clamp(28px, 9vw, 142px);
  background:
    radial-gradient(ellipse at 82% 28%, #d9e8d9 0, #d9e8d900 32%),
    radial-gradient(ellipse at 12% 90%, #eee7d7 0, #eee7d700 38%),
    linear-gradient(135deg, #f8faf6 0%, #f1f5ef 55%, #f8f7f1 100%);
}

.subscription-gate::before,
.subscription-gate::after {
  position: absolute;
  z-index: 0;
  border: 1px solid #2c684b12;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.subscription-gate::before {
  width: min(64vw, 700px);
  aspect-ratio: 1;
  right: -9%;
  top: 8%;
}

.subscription-gate::after {
  width: min(45vw, 500px);
  aspect-ratio: 1;
  right: -2%;
  top: 18%;
}

.subscription-gate > div:not(.welcome-visual),
.gate-action {
  position: relative;
  z-index: 2;
}

.subscription-gate > div:not(.welcome-visual) {
  max-width: min(600px, 48%);
}

.subscription-gate .eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.subscription-gate h1 {
  max-width: 580px;
  margin: 0 0 16px;
  font-family: Manrope, sans-serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1.06;
}

.subscription-gate p:not(.eyebrow) {
  max-width: 440px;
  margin: 0;
  color: #778076;
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.6;
}

.gate-action {
  flex: 0 0 auto;
  min-width: 150px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 26px #2c684b24;
  cursor: pointer;
}

.gate-action:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.gate-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.gate-action::after {
  content: "→";
  font-size: 18px;
  transition: transform 180ms ease;
}

.gate-action:hover {
  box-shadow: 0 16px 32px #2c684b35;
}

.gate-action:hover::after {
  transform: translateX(4px);
}

.gate-action:active {
  transform: translateY(1px) scale(.98);
}

.gate-action:focus-visible {
  outline: 3px solid #83a98f;
  outline-offset: 4px;
}

.welcome-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: welcome-visual-in 900ms cubic-bezier(.2, .75, .25, 1) both;
}

.welcome-orbit {
  position: absolute;
  top: 50%;
  right: -6%;
  width: min(88vw, 1100px);
  aspect-ratio: 1;
  border: 1px solid #2c684b16;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: welcome-orbit 28s linear infinite;
}

.welcome-orbit::before,
.welcome-orbit::after {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #9db9a2;
  box-shadow: 0 0 0 7px #9db9a21c;
  content: "";
}

.welcome-orbit::before {
  top: 15%;
  left: 18%;
}

.welcome-orbit::after {
  right: 6%;
  bottom: 26%;
  width: 7px;
  height: 7px;
}

.produce-float {
  position: absolute;
  z-index: 0;
  display: grid;
  width: clamp(58px, 6.2vw, 94px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #e5ece3;
  border-radius: 26px;
  background: #ffffffed;
  box-shadow: 0 12px 28px #304b3218;
  font-size: clamp(34px, 4vw, 52px);
  animation: produce-drift 5s ease-in-out infinite;
  will-change: transform, translate;
}

.produce-carrot {
  top: 15%;
  left: 54%;
  rotate: 10deg;
}

.produce-greens {
  top: 72%;
  right: 9%;
  animation-delay: -1.1s;
}

.produce-milk {
  bottom: 13%;
  left: 18%;
  animation-delay: -2.2s;
}

.produce-cheese {
  right: 8%;
  bottom: 25%;
  rotate: 8deg;
  animation-delay: -.6s;
}

.produce-tomato {
  top: 64%;
  left: 50%;
  animation-delay: -1.7s;
}

.produce-fruit {
  bottom: 12%;
  right: 34%;
  animation-delay: -1.4s;
}

.produce-rice {
  top: 17%;
  right: 11%;
  animation-delay: -2.8s;
}

.produce-beans {
  top: 43%;
  left: 44%;
  animation-delay: -.9s;
}

.produce-daal {
  right: 19%;
  bottom: 8%;
  animation-delay: -2.4s;
}

.counter-preview {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(30px, 5vw, 76px);
  width: min(42vw, 610px);
  padding: 24px;
  border: 1px solid #e7ece5;
  border-radius: 22px;
  background: #ffffffed;
  box-shadow: 0 30px 70px #304b321c, 0 5px 15px #304b320d;
  transform: translateY(-50%) rotate(-3deg);
  animation: preview-float 6s ease-in-out infinite;
}

.preview-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #758076;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.preview-mark {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 8px;
  background: #eaf1eb;
  color: var(--green);
  font-family: Manrope, sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -1px;
}

.preview-menu {
  margin-left: auto;
  color: #a7afa6;
  letter-spacing: 2px;
}

.preview-greeting {
  margin: 17px 0 12px;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.preview-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid #edf0eb;
}

.preview-items {
  overflow: hidden;
  border: 1px solid #edf0eb;
  border-radius: 13px;
  background: #fff;
}

.preview-product-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 11px;
  background: #f2e9df;
  font-size: 16px;
}

.preview-product strong,
.preview-product small,
.preview-float strong,
.preview-float small {
  display: block;
}

.preview-product strong {
  font-size: 10px;
}

.preview-product > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.preview-product small,
.preview-float small {
  margin-top: 3px;
  color: #8b938a;
  font-size: 8px;
}

.preview-product .preview-price {
  margin-left: auto;
  font-size: 10px;
}

.preview-checkout {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
}

.preview-checkout b {
  margin-left: 7px;
  font-size: 14px;
}

.preview-float {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  bottom: 12%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px 13px 12px;
  border: 1px solid #e8eee7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 36px #304b321a;
  animation: preview-bob 4.5s ease-in-out infinite;
}

.preview-float-check {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #e9f3e9;
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
}

.preview-float strong {
  font-size: 10px;
}

.subscription-gate.is-locked .welcome-visual {
  display: none;
}

@keyframes welcome-visual-in {
  from {
    opacity: 0;
    translate: 0 14px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes welcome-orbit {
  to {
    rotate: 360deg;
  }
}

@keyframes preview-float {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes preview-bob {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@keyframes produce-drift {
  0%, 100% {
    translate: 0 0;
    scale: 1;
  }
  50% {
    translate: 0 -10px;
    scale: 1.04;
  }
}

.subscription-gate.is-locked {
  min-height: unset;
  margin: 18px auto 0;
  padding: 18px 5.15%;
  background: linear-gradient(110deg, #eef4ed, #fafaf6);
}

.subscription-gate.is-locked::before,
.subscription-gate.is-locked::after {
  display: none;
}

.subscription-gate.is-locked > div {
  max-width: 780px;
}

.subscription-gate.is-locked .eyebrow {
  margin-bottom: 5px;
  font-size: 9px;
}

.subscription-gate.is-locked h1 {
  margin-bottom: 4px;
  font-size: clamp(19px, 2.5vw, 25px);
  letter-spacing: -.7px;
}

.subscription-gate.is-locked p:not(.eyebrow) {
  font-size: 12px;
}

.subscription-gate.is-locked .gate-action {
  min-height: 42px;
  font-size: 12px;
}

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

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}

.eyebrow {
  margin: 0 0 9px;
  color: #9ba199;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Manrope, sans-serif;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(22px, 2.3vw, 29px);
  font-weight: 700;
  letter-spacing: -1.3px;
}

.subtitle {
  margin: 0;
  color: #818780;
  font-size: 13px;
}

.orders-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e6eae4;
  border-radius: 10px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}

.orders-button:hover,
.icon-button:hover {
  border-color: #c2d2c5;
}

.orders-button:active {
  transform: scale(.98);
}

.orders-icon {
  color: var(--green);
  font-size: 15px;
}

.sales-count {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 10px;
  background: #eff4ef;
  color: var(--green);
  font-size: 10px;
  text-align: center;
}

.search-box {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid #e5e9e3;
  border-radius: 10px;
  background: #fff;
}

.search-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1.7px solid #9ba29a;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.7px;
  background: #9ba29a;
  content: "";
  transform: rotate(48deg);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.search-box input::placeholder {
  color: #a2a8a1;
}

.search-box kbd {
  flex: 0 0 auto;
  padding: 4px 6px;
  border: 1px solid #edf0eb;
  border-radius: 5px;
  color: #a3a9a2;
  font: 10px "DM Sans", sans-serif;
}

.category-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 20px 0 25px;
  padding: 1px 0 3px;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-button {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid #e6eae4;
  border-radius: 8px;
  background: white;
  color: #7e857d;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: 150ms ease;
}

.category-button.active,
.category-button:hover {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 13px;
}

.section-label h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.section-label span {
  color: #9ba199;
  font-size: 11px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manage-catalog-button {
  padding: 5px 9px;
  border: 1px solid #e4e9e2;
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.manage-catalog-button:hover {
  border-color: #bfd0c1;
  background: #f8faf7;
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e9ece7;
  border-radius: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #cad9cc;
  box-shadow: 0 8px 22px #263d2a0c;
}

.product-card:active {
  transform: scale(.985);
}

.product-art {
  height: 115px;
  display: grid;
  place-items: center;
  background: var(--product-bg);
}

.product-art span {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 22px;
  background: #ffffff99;
  font-size: 34px;
  filter: drop-shadow(0 4px 6px #23341b12);
}

.product-details {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  padding: 12px 12px 13px;
}

.product-name {
  overflow: hidden;
  margin: 0 0 5px;
  color: #343a33;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category {
  margin: 0;
  color: #9aa097;
  font-size: 9px;
}

.product-price {
  flex: 0 0 auto;
  color: #263b2d;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.no-products {
  grid-column: 1 / -1;
  padding: 40px 10px;
  color: #8b918a;
  font-size: 12px;
  text-align: center;
}

.cart-panel {
  position: sticky;
  top: 20px;
  height: calc(100vh - 112px);
  min-height: 500px;
  max-height: 760px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e7ebe5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px #263d2a08;
}

.cart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 17px;
  border-bottom: 1px solid #edf0eb;
}

.cart-heading .eyebrow {
  margin-bottom: 6px;
}

.cart-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.5px;
}

#cart-item-count {
  color: #9ca39b;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
}

.text-button {
  padding: 5px;
  border: 0;
  background: none;
  color: #899087;
  font-size: 11px;
  cursor: pointer;
}

.text-button:hover {
  color: #a3483f;
}

.cart-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.empty-cart {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  text-align: center;
}

.empty-cart-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 19px;
  background: #f3f6f2;
  color: #97aa99;
}

.empty-cart-icon svg {
  width: 39px;
  height: 39px;
}

.empty-cart strong {
  margin-bottom: 6px;
  font-size: 12px;
}

.empty-cart span {
  color: #959c94;
  font-size: 10px;
}

.cart-lines {
  padding: 4px 20px;
}

.cart-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f2ef;
}

.cart-line-art {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--product-bg);
  font-size: 21px;
}

.cart-line-name {
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-line-price {
  margin: 0;
  color: #8c938b;
  font-size: 10px;
}

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

.quantity-control button {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid #e8ece6;
  border-radius: 7px;
  background: white;
  color: #4a544a;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.quantity-control button:hover {
  border-color: #c1d3c4;
  color: var(--green);
}

.quantity-control span {
  min-width: 10px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.checkout-area {
  padding: 15px 20px 18px;
  border-top: 1px solid #edf0eb;
  background: #fff;
}

.subtotal-row,
.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subtotal-row {
  margin-bottom: 12px;
  color: #878e86;
  font-size: 11px;
}

.subtotal-row strong {
  color: #525a51;
  font-weight: 600;
}

.tax-summary {
  display: grid;
  gap: 7px;
  margin: -3px 0 12px;
  color: #858d83;
  font-size: 10px;
}

.tax-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tax-summary-row strong {
  color: #525a51;
  font-weight: 600;
}

.tax-setup-notice {
  gap: 7px;
  color: #748174;
  font-size: 11px;
}

.tax-setup-notice strong {
  color: #344a38;
}

.total-row {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
}

.total-row strong {
  font-family: Manrope, sans-serif;
  font-size: 19px;
  letter-spacing: -.5px;
}

.checkout-button {
  width: 100%;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.checkout-button:enabled:hover {
  background: var(--green-dark);
}

.checkout-button:enabled:active {
  transform: scale(.99);
}

.checkout-button:disabled {
  background: #b3c4b6;
  cursor: not-allowed;
}

.checkout-button span:last-child {
  font-size: 13px;
}

.secure-note {
  margin: 12px 0 0;
  color: #a0a69e;
  font-size: 9px;
  text-align: center;
}

.secure-note span {
  margin-right: 3px;
  color: #829e85;
}

.payment-dialog,
.sales-dialog,
.catalog-dialog,
.invoice-dialog {
  width: min(420px, calc(100% - 28px));
  padding: 28px;
  border: 1px solid #e6ebe4;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 80px #17271d29;
}

.payment-dialog,
#billing-dialog {
  max-height: min(820px, calc(100dvh - 30px));
  overflow-y: auto;
}

.payment-dialog::backdrop,
.sales-dialog::backdrop,
.catalog-dialog::backdrop,
.invoice-dialog::backdrop {
  background: #19251d70;
  backdrop-filter: blur(3px);
}

.payment-dialog form {
  position: relative;
}

.dialog-close {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #edf0eb;
  border-radius: 8px;
  background: #fff;
  color: #818880;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.payment-dialog .dialog-close {
  position: absolute;
  top: -9px;
  right: -8px;
}

.payment-dialog h2,
.sales-dialog h2,
.account-dialog h2 {
  max-width: 290px;
  margin: 0 0 5px;
  font-size: 21px;
  letter-spacing: -.8px;
}

.account-dialog {
  width: min(440px, calc(100% - 28px));
}

.invoice-dialog {
  width: min(820px, calc(100% - 28px));
}

.sales-dialog {
  width: min(1060px, calc(100% - 32px));
  max-height: min(900px, calc(100dvh - 32px));
  overflow-y: auto;
}

.sales-report-filters {
  display: grid;
  grid-template-columns: minmax(190px, 2fr) repeat(2, minmax(130px, 1fr)) repeat(2, minmax(145px, 1fr));
  align-items: end;
  gap: 12px;
  margin: 18px 0;
  padding: 15px;
  border: 1px solid #e9ede7;
  border-radius: 12px;
  background: #fafcf9;
}

.sales-report-filters label {
  display: grid;
  gap: 6px;
  color: #687168;
  font-size: 10px;
  font-weight: 600;
}

.sales-report-filters input,
.sales-report-filters select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #e3e9e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.sales-report-filters .secondary-action {
  min-height: 38px;
  border-color: #263d2e;
  background: #263d2e;
  color: #fff;
  white-space: nowrap;
}

.sales-report-filters .secondary-action:hover:not(:disabled) {
  border-color: #182b20;
  background: #182b20;
}

.sales-report-filters .secondary-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.sales-report-summary {
  margin: 0 0 14px;
  color: #58665a;
  font-size: 12px;
  line-height: 1.6;
}

.invoice-actions > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.invoice-content {
  max-height: min(68vh, 700px);
  overflow: auto;
  color: #30372f;
}

.invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid #e9ede7;
  border-bottom: 1px solid #e9ede7;
}

.invoice-party h3 {
  margin: 0 0 9px;
  color: #788174;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.invoice-party strong {
  font-size: 13px;
}

.invoice-party p {
  margin: 5px 0 0;
  color: #697267;
  font-size: 11px;
  line-height: 1.5;
}

.invoice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 13px 0;
  color: #697267;
  font-size: 10px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.invoice-table th,
.invoice-table td {
  padding: 9px 7px;
  border-bottom: 1px solid #edf0eb;
  text-align: right;
  white-space: nowrap;
}

.invoice-table th:first-child,
.invoice-table td:first-child {
  text-align: left;
  white-space: normal;
}

.invoice-table th {
  background: #f7f9f6;
  color: #5f695e;
  font-size: 9px;
}

.invoice-totals {
  display: grid;
  justify-items: end;
  gap: 8px;
  padding: 16px 4px;
  font-size: 11px;
}

.invoice-totals strong {
  padding-top: 10px;
  border-top: 1px solid #dfe5dd;
  color: var(--green-dark);
  font-size: 15px;
}

.invoice-disclaimer {
  margin-top: 12px;
  color: #91988f;
  font-size: 9px;
}

.invoice-signature {
  width: 200px;
  margin: 32px 0 8px auto;
  padding-top: 8px;
  border-top: 1px solid #cfd7cc;
  color: #697267;
  font-size: 10px;
  text-align: center;
}

.subscription-dialog {
  max-height: min(760px, calc(100dvh - 30px));
  overflow-y: auto;
}

.subscription-plans {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.subscription-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 14px;
  padding: 14px;
  border: 1px solid #e7ece5;
  border-radius: 11px;
  background: #fbfcfa;
}

.subscription-plan h3 {
  margin: 0;
  font-size: 13px;
}

.subscription-plan strong {
  color: var(--green);
  font-size: 19px;
}

.subscription-plan > span {
  grid-column: 1;
  color: #818a80;
  font-size: 10px;
}

.subscription-plan .add-product-button {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 112px;
  padding: 0 10px;
}

.subscription-plan .add-product-button:disabled {
  background: #aeb8ae;
  cursor: not-allowed;
}

.cancel-subscription-button {
  width: 100%;
  margin: 0 0 10px;
}

.subscription-product-lock {
  align-self: center;
  padding: 28px 12px;
  border: 1px dashed #dce5da;
  border-radius: 12px;
  background: #fbfcfa;
  color: #758075;
  font-size: 13px;
  text-align: center;
}

.subscription-cart-lock {
  min-height: 130px;
  justify-content: center;
  border: 1px dashed #dce5da;
  border-radius: 12px;
  background: #fbfcfa;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0 0 17px;
  padding: 4px;
  border-radius: 9px;
  background: #f2f5f1;
}

.auth-tab {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7b8479;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  background: white;
  color: var(--green);
  box-shadow: 0 1px 4px #28372a12;
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-form label {
  display: grid;
  gap: 6px;
  color: #646d63;
  font-size: 10px;
  font-weight: 600;
}

.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  min-height: 39px;
  padding: 9px 10px;
  border: 1px solid #e3e9e1;
  border-radius: 7px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  resize: vertical;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus {
  border-color: #8dae95;
  box-shadow: 0 0 0 3px #2c684b14;
}

.account-form input:disabled {
  background: #f5f7f4;
  color: #90988e;
}

.billing-checkbox {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}

.billing-checkbox input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.account-form input::placeholder,
.account-form textarea::placeholder {
  color: #aab0a9;
}

.form-footnote {
  margin: 0;
  color: #99a096;
  font-size: 9px;
  line-height: 1.5;
}

.form-error {
  min-height: 0;
  margin: 0;
  color: #a7463e;
  font-size: 10px;
  line-height: 1.4;
}

.form-error:empty {
  display: none;
}

.account-actions {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.secondary-action,
.logout-button {
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid #e5eae3;
  border-radius: 8px;
  background: #fff;
  color: #39443a;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.disconnect-button {
  width: 100%;
  margin-top: 10px;
}

.optional-label {
  color: #939b91;
  font-weight: 400;
}

.secondary-action:hover,
.logout-button:hover {
  border-color: #bfd0c1;
  background: #fafcfa;
}

.logout-button {
  color: #a34c43;
}

.refund-warning {
  margin: 0;
  color: #996a39;
  font-size: 9px;
  line-height: 1.5;
}

.refund-submit-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #9f493e;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.refund-submit-button:hover {
  background: #863b32;
}

.refund-description {
  margin: -7px 0 17px;
  color: #818a80;
  font-size: 10px;
  line-height: 1.5;
}

.ticket-list {
  max-height: 160px;
  overflow-y: auto;
  margin-top: 14px;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 2px;
  border-top: 1px solid #eff1ee;
}

.ticket-row strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-row span {
  color: #929990;
  font-size: 9px;
}

.sale-controls {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.refund-button {
  padding: 5px 8px;
  border: 1px solid #e8d6d3;
  border-radius: 7px;
  background: #fffaf9;
  color: #a04b40;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.refund-button:hover {
  border-color: #d7b6b1;
  background: #fff4f1;
}

.cancel-order-button {
  padding: 5px 8px;
  border: 1px solid #e2e8e0;
  border-radius: 7px;
  background: white;
  color: #687168;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.cancel-order-button:hover {
  border-color: #cbd4ca;
  background: #f7f9f6;
}

.dialog-total {
  margin: 9px 0 20px;
  color: var(--green);
  font-family: Manrope, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
}

.checkout-customer {
  display: grid;
  gap: 10px;
  max-height: min(36vh, 260px);
  overflow-y: auto;
  margin-bottom: 17px;
  padding: 12px;
  border: 1px solid #edf0eb;
  border-radius: 10px;
  background: #fafcf9;
}

.checkout-customer label {
  display: grid;
  gap: 5px;
  color: #697266;
  font-size: 10px;
  font-weight: 600;
}

.checkout-customer input,
.checkout-customer select {
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid #e3e9e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}

.tax-checkout-summary {
  margin: 0;
  color: #657764;
  font-size: 10px;
  line-height: 1.5;
}

.payment-options {
  display: grid;
  gap: 9px;
}

.payment-option {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e9ede7;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.payment-option:hover {
  border-color: #b8cfbc;
  background: #fbfdfb;
}

.payment-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 17px;
  font-weight: 700;
}

.upi-symbol {
  background: #eef3fa;
  color: #41678c;
}

.cash-symbol {
  background: #edf5ec;
  color: #47734c;
}

.card-symbol {
  background: #f7f0e9;
  color: #947248;
}

.payment-option strong,
.payment-option small {
  display: block;
}

.payment-option strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.payment-option small {
  color: #929990;
  font-size: 10px;
}

.payment-arrow {
  color: #a2aaa1;
  font-size: 14px;
}

.dialog-footnote,
.sales-footnote {
  margin: 17px 0 0;
  color: #9ba199;
  font-size: 9px;
  line-height: 1.5;
}

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

.catalog-dialog {
  width: min(480px, calc(100% - 28px));
}

.product-form {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #e9ede7;
  border-radius: 11px;
  background: #fafcf9;
}

.product-form label {
  display: grid;
  gap: 6px;
  color: #646d63;
  font-size: 10px;
  font-weight: 600;
}

.product-form input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e3e9e1;
  border-radius: 7px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 11px;
}

.product-form select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e3e9e1;
  border-radius: 7px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 11px;
}

.product-form input:focus {
  border-color: #8dae95;
  box-shadow: 0 0 0 3px #2c684b14;
}

.product-form input::placeholder {
  color: #aab0a9;
}

.product-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}

.add-product-button {
  min-height: 39px;
  border: 0;
  border-radius: 7px;
  background: var(--green);
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.add-product-button:hover {
  background: var(--green-dark);
}

.catalog-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 13px;
}

.catalog-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid #eff1ee;
}

.catalog-product-info {
  min-width: 0;
}

.catalog-product-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.catalog-tax-button {
  padding: 5px 7px;
  border: 1px solid #dfe9df;
  border-radius: 6px;
  background: #f5f9f4;
  color: var(--green);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.catalog-tax-button:hover {
  border-color: #b9cfbc;
  background: #edf5ed;
}

.catalog-product-name {
  overflow: hidden;
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-product-meta {
  margin: 0;
  color: #929990;
  font-size: 9px;
}

.remove-product-button {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: #fbf1ef;
  color: #a5574b;
  font-size: 9px;
  cursor: pointer;
}

.remove-product-button:hover {
  background: #f7e5e1;
}

.sales-dialog-heading .eyebrow {
  margin-bottom: 7px;
}

.sales-dialog h2 {
  margin-bottom: 0;
}

.sales-list {
  max-height: min(58vh, 580px);
  overflow-y: auto;
}

.sales-empty {
  padding: 28px 10px;
  border: 1px dashed #e2e8e0;
  border-radius: 10px;
  color: #899187;
  font-size: 11px;
  text-align: center;
}

.sale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #eff1ee;
}

.sale-row:last-child {
  border-bottom: 0;
}

.sale-reference {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
}

.sale-meta {
  margin: 0;
  color: #91988f;
  font-size: 10px;
}

.sale-customer {
  margin: 5px 0 0;
  color: #687168;
  font-size: 10px;
}

.sale-amount {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 3;
  right: 24px;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border: 1px solid #315e43;
  border-radius: 10px;
  background: #243d2e;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (min-width: 1450px) {
  .workspace {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    padding-right: 3.5%;
    padding-left: 3.5%;
  }

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

  .product-art {
    height: 105px;
  }
}

@media (max-width: 760px) {
  body {
    background: #fff;
  }

  .topbar {
    position: sticky;
    z-index: 2;
    top: 0;
    height: calc(60px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 18px 0;
  }

  .subscription-gate {
    min-height: calc(100dvh - 60px - env(safe-area-inset-top));
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    padding: 48px 22px calc(318px + env(safe-area-inset-bottom));
  }

  .subscription-gate > div:not(.welcome-visual) {
    max-width: 100%;
  }

  .subscription-gate h1 {
    max-width: 520px;
    font-size: clamp(38px, 9vw, 54px);
    letter-spacing: -2.5px;
  }

  .produce-float {
    width: 56px;
    border-radius: 16px;
    font-size: 34px;
    opacity: .42;
  }

  .produce-carrot {
    top: 9%;
    right: 8%;
    left: auto;
  }

  .produce-greens {
    top: 54%;
    right: 2%;
  }

  .produce-cheese {
    top: 68%;
    right: 2%;
  }

  .produce-milk {
    bottom: 7%;
    left: 5%;
  }

  .produce-tomato {
    top: 48%;
    left: 5%;
  }

  .produce-fruit {
    right: 5%;
    bottom: 30%;
  }

  .produce-rice {
    top: 35%;
    right: 5%;
  }

  .produce-beans {
    top: 63%;
    left: 4%;
  }

  .produce-daal {
    right: 5%;
    bottom: 9%;
  }

  .counter-preview {
    top: auto;
    right: 22px;
    bottom: 18px;
    left: 22px;
    width: auto;
    max-width: 440px;
    margin-inline: auto;
    padding: 12px;
    border-radius: 17px;
    transform: rotate(-1deg);
  }

  .preview-greeting {
    margin: 9px 0 7px;
    font-size: 12px;
  }

  .preview-product {
    gap: 7px;
    padding: 4px 7px;
  }

  .preview-product-icon {
    width: 25px;
    height: 25px;
    font-size: 14px;
  }

  .preview-product strong {
    font-size: 9px;
    white-space: nowrap;
  }

  .preview-product small {
    display: none;
  }

  .preview-checkout {
    margin-top: 7px;
    padding: 8px;
    font-size: 9px;
  }

  .preview-float {
    right: -4%;
    bottom: 1%;
    gap: 7px;
    padding: 9px 11px 9px 8px;
  }

  .preview-float-check {
    width: 25px;
    height: 25px;
  }

  .preview-float strong {
    font-size: 9px;
  }

  .preview-float small {
    font-size: 8px;
  }

  .preview-float {
    display: none;
  }

  .sales-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    padding: 18px;
  }

  .sales-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 11px;
  }

  .sales-report-filters label:first-child,
  .sales-report-filters .secondary-action {
    grid-column: 1 / -1;
  }

  .sales-report-filters .secondary-action {
    justify-content: center;
  }

  .sales-report-summary {
    font-size: 11px;
  }

  .sale-row {
    align-items: flex-start;
    gap: 8px;
  }

  .sale-controls {
    flex-shrink: 0;
  }

  .invoice-parties {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .invoice-table {
    min-width: 600px;
  }

  .invoice-actions .secondary-action {
    padding: 8px;
  }

  .subscription-gate::before {
    width: 92vw;
    right: -34%;
    top: 17%;
  }

  .subscription-gate::after {
    width: 65vw;
    right: -20%;
    top: 25%;
  }

  .subscription-gate h1 {
    font-size: clamp(39px, 11vw, 60px);
    letter-spacing: -2px;
  }

  .subscription-gate.is-locked {
    min-height: unset;
    align-items: stretch;
    gap: 14px;
    margin: 12px 14px 0;
    padding: 16px;
  }

  .subscription-gate.is-locked h1 {
    font-size: 20px;
  }

  .subscription-gate.is-locked .gate-action {
    width: 100%;
  }

  .brand {
    font-size: 19px;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
  }

  .store-switcher {
    margin-left: auto;
    margin-right: 10px;
    padding: 5px 8px 5px 5px;
    font-size: 11px;
  }

  .account-button {
    margin-left: 0;
    padding: 8px;
    font-size: 10px;
  }

  .store-avatar {
    width: 25px;
    height: 25px;
  }

  .install-button {
    padding: 8px;
    font-size: 10px;
  }

  .install-button[hidden] {
    display: none;
  }

  .workspace {
    min-height: unset;
    display: flex;
    flex-direction: column;
    gap: 21px;
    padding: 26px 18px calc(18px + env(safe-area-inset-bottom));
  }

  .page-heading {
    margin-bottom: 20px;
  }

  .page-heading .eyebrow {
    margin-bottom: 7px;
  }

  .page-heading h1 {
    max-width: 250px;
    font-size: 23px;
  }

  .subtitle {
    max-width: 220px;
    font-size: 11px;
  }

  .orders-button {
    gap: 6px;
    padding: 9px;
    font-size: 11px;
  }

  .search-box {
    height: 44px;
  }

  .search-box kbd {
    display: none;
  }

  .category-list {
    margin: 16px -18px 20px;
    padding: 1px 18px 4px;
  }

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

  .product-art {
    height: clamp(95px, 29vw, 132px);
  }

  .product-art span {
    width: 60px;
    height: 60px;
    font-size: 31px;
  }

  .product-details {
    padding: 10px 10px 11px;
  }

  .cart-panel {
    position: static;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-radius: 12px;
    box-shadow: none;
  }

  .cart-heading {
    padding: 16px;
  }

  .cart-heading .eyebrow {
    font-size: 8px;
  }

  .cart-content {
    max-height: 280px;
  }

  .empty-cart {
    min-height: 177px;
  }

  .cart-lines {
    padding: 3px 16px;
  }

  .checkout-area {
    padding: 14px 16px 15px;
    border-radius: 0 0 12px 12px;
  }

  .toast {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body.printing-invoice * {
    visibility: hidden !important;
  }

  body.printing-invoice #invoice-dialog,
  body.printing-invoice #invoice-dialog * {
    visibility: visible !important;
  }

  body.printing-invoice #invoice-dialog {
    position: fixed;
    inset: 0;
    display: block;
    width: 100%;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  body.printing-invoice .invoice-actions {
    display: none;
  }

  body.printing-invoice .invoice-content {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 370px) {
  .store-name {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace {
    padding-right: 13px;
    padding-left: 13px;
  }

  .category-list {
    margin-right: -13px;
    margin-left: -13px;
    padding-right: 13px;
    padding-left: 13px;
  }
}
