:root {
  color-scheme: light;
  --ink: #101011;
  --muted: #777774;
  --line: #dededa;
  --soft-line: #ebebe7;
  --paper: #ffffff;
  --canvas: #f2f2ef;
  --dark: #111112;
  --dark-2: #1b1b1c;
  --danger: #a43b33;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(16, 16, 17, 0.06);
  --sidebar-rail-width: 72px;
  --sidebar-expanded-width: 250px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(calc(100% - var(--sidebar-rail-width)), 1440px);
  min-height: 100dvh;
  margin: 0 auto 0 max(var(--sidebar-rail-width), calc((100% - 1440px + var(--sidebar-rail-width)) / 2));
  padding: 23.87px clamp(23.87px, 3vw, 52.08px) 30.38px;
  transition: width .28s ease, margin-left .28s ease;
}
body.sidebar-expanded .app-shell {
  width: min(calc(100% - var(--sidebar-expanded-width)), 1440px);
  margin-left: max(var(--sidebar-expanded-width), calc((100% - 1440px + var(--sidebar-expanded-width)) / 2));
}

.topbar {
  height: 60px;
  display: grid;
  grid-template-columns: 170px minmax(320px, 640px) 52px 150px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.store-info { min-width: 0; display: flex; align-items: center; }
.store-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.store-info strong { overflow: hidden; color: #a0a09b; font-size: 14.3px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.store-info span { overflow: hidden; color: #a0a09b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.store-clock { color: #a0a09b; font-size: 16.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.client-search-wrap, .product-search-wrap { position: relative; z-index: 10; }
.client-search { min-height: 46px; gap: 10px; padding: 0 14.11px; }
.search-field {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.84);
  padding: 0 16.27px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.search-field:focus-within { background: #fff; border-color: #aaa; box-shadow: 0 0 0 4px rgba(0,0,0,.035); }
.search-field svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15.4px; color: var(--ink); }
.search-field input::placeholder { color: #8c8c88; }
.search-field kbd { padding: 4.34px 7.59px; border: 1px solid #ddd; border-radius: 6px; background: #f5f5f3; color: #888; font-family: inherit; font-size: 12.1px; }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  padding: 7.59px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
  backdrop-filter: blur(20px);
}
.search-results.open { display: block; }
.result-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10.85px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.result-item:hover, .result-item:focus-visible { background: #f1f1ee; outline: 0; }
.result-avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12.1px; }
.result-copy { display: flex; flex-direction: column; min-width: 0; }
.result-copy strong { font-size: 14.3px; font-weight: 600; }
.result-copy span { margin-top: 3px; color: var(--muted); font-size: 12.1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-price { margin-left: auto; font-size: 14.3px; font-weight: 600; }
.empty-result { margin: 0; padding: 15.19px; color: var(--muted); text-align: center; font-size: 14.3px; }
.result-section-title { padding: 8.68px 10.85px 6.51px; color: #999; font-size: 8.8px; font-weight: 700; letter-spacing: 1.35px; }
.client-results .result-item + .result-item { border-top: 1px solid var(--soft-line); border-radius: 0; }
.client-results .result-item:last-child { border-radius: 0 0 10px 10px; }

.seller-button { justify-self: end; display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 6.51px 0; color: #a0a09b; text-align: left; cursor: pointer; }
.seller-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12.1px; }
.seller-button .seller-avatar { background: var(--ink); color: #fff; }
.seller-button > span:nth-child(2) { display: flex; flex-direction: column; color: #777774; font-size: 14.3px; font-weight: 600; }
.seller-button small { color: #a0a09b; font-size: 11px; font-weight: 400; margin-bottom: 2px; }
.seller-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.customer-card-wrap {
  position: relative;
  margin: 16px 0 18px;
}
.customer-card {
  min-height: 104px;
  padding: 17.36px 21.7px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.customer-main { min-width: 0; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 9.9px; font-weight: 700; letter-spacing: 1.8px; }
.customer-main h1 { margin: 0; font-family: var(--font-sans); font-size: 25.3px; font-weight: 400; line-height: 1.05; }
.customer-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.customer-contact { margin: 5px 0 0; color: var(--muted); font-size: 11.55px; }
.customer-details-flip { min-width: 0; grid-column: span 2; perspective: 900px; }
.customer-details-flip-inner { min-height: 82px; position: relative; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2,.7,.25,1); }
.customer-details-flip.is-flipped .customer-details-flip-inner { transform: rotateY(180deg); }
.customer-details-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; border: 1px solid #f0f0ee; border-radius: 14px; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.customer-details-back { transform: rotateY(180deg); }
.customer-details-flip.is-flipped .customer-details-front,
.customer-details-flip:not(.is-flipped) .customer-details-back { visibility: hidden; }
.customer-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-metrics div { min-width: 0; padding: 0 13.02px; display: flex; flex-direction: column; border-left: 1px solid var(--soft-line); }
.customer-metrics span { color: #a0a09b; font-size: 11px; }
.customer-metrics strong { margin-top: 7px; color: #a0a09b; font-size: 12.1px; font-weight: 600; }
.customer-articles-button { display: flex; align-items: center; justify-content: center; gap: 5px; align-self: center; margin: 6px auto 0; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.customer-articles-button:hover { color: var(--ink); }
.customer-articles-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.customer-details-back .customer-articles-button svg { transform: rotate(180deg); }
.status-tag { display: inline-flex; align-items: center; margin: 0; padding: 2.77px 7.38px; border: 1px solid transparent; border-radius: 999px; font-size: 9.08px; font-weight: 600; line-height: 1.2; }
.status-vip { border-color: #e2d2a7; background: #f8f4e9; color: #806b37; }
.status-subscriber { border-color: #bfd9ca; background: #eff6f1; color: #4b745b; }
.status-partner { border-color: #cec5e2; background: #f4f1f8; color: #695887; }
.status-client,
.status-empty { border-color: #d7d7d1; background: #f5f5f2; color: #666660; }
.customer-favorites-wrap { min-width: 0; }
.customer-favorites-heading { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9.9px; text-align: center; }
.customer-favorites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.favorite-card { min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 7px; padding: 3.25px 4.34px; border: 0; border-radius: 0; background: transparent; }
.favorite-card svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #c4c4bf; stroke-width: 1.4; }
.favorite-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.favorite-name { overflow: hidden; color: #777774; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.favorite-size { color: #a0a09b; font-size: 8.8px; white-space: nowrap; }
.favorites-empty { grid-column: 1 / -1; min-height: 52px; display: flex; align-items: center; padding: 0 10.85px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.clear-customer-button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; z-index: 1; }
.clear-customer-button svg { width: 13px; height: 13px; }
.customer-card.is-empty .customer-main, .customer-card.is-empty .customer-details-flip { opacity: .35; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(340px, .88fr); gap: 18px; align-items: stretch; }
.products-panel, .checkout-panel { border-radius: var(--radius-lg); }
.products-panel { min-width: 0; padding: 19.53px 21.7px 15.19px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.product-search-wrap { z-index: 9; }
.product-search {
  min-height: 42px;
  gap: 9px;
  padding: 0 13.02px;
  border-color: #e8e8e4;
  border-radius: 12px;
  background: #fff;
}
.product-search svg { width: 16px; height: 16px; color: #777; }
.product-search input { font-size: 12.1px; }
.product-search input::placeholder { color: #c8c8c4; }
.product-search:focus-within { border-color: #c8c8c2; background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.025); }

.table-heading { min-height: 56px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.table-heading .eyebrow { margin-bottom: 3px; }
.table-heading h2, .dark-heading h2 { margin: 0; font-family: inherit; font-size: 25.3px; font-weight: 400; }
.table-heading > span { display: flex; align-items: baseline; gap: 5px; color: var(--muted); }
.table-heading > span strong { color: var(--ink); font-family: inherit; font-size: 18.7px; font-weight: 400; }
.table-heading > span small { font-size: 11px; }

.cart-list { min-height: 238px; }
.cart-row {
  min-height: 59.5px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, 82px) minmax(58px, 76px) 24px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--soft-line);
}
.product-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-thumb { width: 40px; height: 48px; position: relative; display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 8px; background: var(--thumb, #eee); }
.product-thumb::before { content: ""; position: absolute; width: 20px; height: 30px; border: 1px solid rgba(0,0,0,.13); border-radius: 7px 7px 3px 3px; background: rgba(255,255,255,.55); transform: rotate(-6deg); }
.product-thumb::after { content: ""; position: absolute; top: 7px; width: 8px; height: 4px; border-bottom: 1px solid rgba(0,0,0,.25); }
.product-copy { display: flex; flex-direction: column; min-width: 0; }
.product-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.3px; font-weight: 600; }
.product-copy span { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9.9px; }
.quantity-control { width: 100%; max-width: 82px; height: 30px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; border: 1px solid #e5e5e1; border-radius: 9px; overflow: hidden; background: #fafaf8; }
.quantity-control button { height: 100%; border: 0; background: transparent; color: #aaa; cursor: pointer; font-size: 15.4px; font-weight: 300; transition: color .15s ease, background .15s ease; }
.quantity-control button:hover { background: #f0f0ed; color: var(--ink); }
.quantity-control span { text-align: center; color: #555; font-size: 12.1px; }
.row-price { font-size: 13.2px; font-weight: 700; text-align: right; white-space: nowrap; transition: color .18s ease; }
.row-price.quantity-1 { color: #111111; }
.row-price.quantity-2 { color: #d89400; }
.row-price.quantity-3 { color: #ed5a22; }
.row-price.quantity-4 { color: #dc2626; }
.row-price.quantity-5 { color: #8f1d1d; }
.remove-item { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: #aaa; cursor: pointer; }
.remove-item:hover { color: var(--danger); }
.remove-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.empty-cart { min-height: 238px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.empty-cart div { max-width: 280px; }
.empty-cart strong { display: block; margin-bottom: 8px; color: var(--ink); font-family: inherit; font-size: 22px; font-weight: 400; }
.empty-cart span { font-size: 13.2px; line-height: 1.5; }

.cart-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; }
.cart-footer p { margin: 0; color: var(--muted); font-size: 12.1px; }
.text-button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; font-size: 12.1px; cursor: pointer; }
.text-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.danger { color: var(--danger); }

.checkout-panel { overflow: hidden; display: flex; flex-direction: column; background: var(--dark); color: #fff; box-shadow: 0 16px 36px rgba(0,0,0,.16); }
.category-section { padding: 19.53px 23.87px 13.02px; }
.dark-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.dark-heading .eyebrow { color: #828282; }
.dark-heading h2 { color: #fff; }
.category-grid { min-height: 52px; margin-top: 8px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
.category-card { min-width: 0; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 0; background: transparent; color: #fff; }
.category-card svg { width: 19.2px; height: 19.2px; fill: currentColor; stroke: none; }
.category-card span { max-width: 100%; max-height: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 1.08px; color: #fff; font-size: 8.8px; font-weight: 600; opacity: 0; transition: max-height .3s ease, opacity .2s ease; }
.category-card:hover span { max-height: 1.5em; opacity: 1; }
.category-card strong { color: #aaa; font-size: 9.35px; font-weight: 400; line-height: 1; }
.category-empty { grid-column: 1 / -1; display: grid; place-items: center; color: #777; font-size: 12.1px; }
.quick-actions { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  .category-card span { transition: none; }
}

.summary-section { margin: 0 22px; padding: 17.36px 0 13.02px; border-top: 1px solid #343435; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 10px; color: #a7a7a7; font-size: 12.1px; }
.summary-line[hidden] { display: none; }
.summary-line strong { color: #fff; font-weight: 500; }
.summary-line.discount strong { color: #a9d2b4; }
.summary-line.tax { margin-bottom: 0; }
.summary-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 13.02px; border-top: 1px solid #343435; }
.summary-total span { font-family: var(--font-sans); font-size: 24.2px; }
.summary-total strong { font-family: var(--font-sans); font-size: 30.8px; font-weight: 400; }

.payment-section { padding: 13.02px 23.87px 19.53px; }
.payment-section .eyebrow { color: #828282; }
.payment-section .checkout-button { margin-top: 0; }
.ticket-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ticket-action { min-width: 0; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 13.02px; border: 1px solid #39393a; border-radius: 11px; background: transparent; color: #fff; text-align: left; cursor: pointer; }
.ticket-action:hover { background: #1c1c1d; border-color: #515153; }
.ticket-action svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; }
.ticket-action span { display: flex; flex-direction: column; min-width: 0; }
.ticket-action strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.38px; font-weight: 600; }
.ticket-action small { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #777; font-size: 10.31px; }
.ticket-action-danger { border-color: #39393a; background: transparent; color: #d8b9b3; }
.ticket-action-danger:hover { border-color: #515153; background: #252020; color: #e4cbc6; }
.ticket-action:disabled { opacity: .32; cursor: not-allowed; }
.checkout-button { width: 100%; height: 58px; margin-top: 12px; display: grid; grid-template-columns: 1fr 20px; align-items: center; gap: 10px; padding: 0 19.53px; border: 0; border-radius: 13px; background: #fff; color: #111; cursor: pointer; text-align: left; }
.checkout-button span { font-size: 15.4px; font-weight: 700; }
.checkout-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.checkout-button:disabled { opacity: .32; cursor: not-allowed; }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 26.04px; background: rgba(15,15,15,.46); backdrop-filter: blur(12px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(420px, 100%); position: relative; padding: 36.89px; border-radius: 24px; background: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.26); text-align: center; }
.modal.checkout-modal { width: min(760px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 30.38px 36.89px 32.55px; }
.modal.checkout-modal > .success-icon,
.modal.checkout-modal > .eyebrow,
.modal.checkout-modal > #modalTitle,
.modal.checkout-modal > #modalMessage { display: none; }
.modal-close { position: absolute; top: 15px; right: 15px; }
.success-icon { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; }
.success-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.modal h2 { margin: 0; font-family: inherit; font-size: 29.7px; font-weight: 400; }
.modal > p:not(.eyebrow) { margin: 12px 0 22px; color: var(--muted); font-size: 13.2px; }
.receipt-preview { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 17.36px; border-radius: 13px; background: #f3f3f0; text-align: left; font-size: 13.2px; }
.receipt-preview[hidden] { display: none; }
.receipt-preview span { color: var(--muted); }
.receipt-preview strong { text-align: right; }
.checkout-review { display: grid; grid-template-columns: minmax(0, .675fr) minmax(230px, 1.325fr); gap: 22px; margin-top: 0; text-align: left; }
.checkout-review[hidden] { display: none; }
.mini-receipt { min-width: 0; height: 330px; display: flex; flex-direction: column; padding: 2.17px 8.68px 0 0; border: 0; border-radius: 0; background: transparent; }
.mini-receipt-heading { display: flex; align-items: baseline; justify-content: flex-end; padding-bottom: 13.02px; border-bottom: 1px dashed #c9c9c4; }
.mini-receipt-heading strong { font-family: inherit; font-size: 16.5px; font-weight: 400; }
.mini-receipt-heading span { color: #999; font-size: 7.7px; font-weight: 700; letter-spacing: 1.2px; }
.mini-receipt-items { min-height: 0; flex: 1; overflow-y: auto; padding: 4.34px 8.68px 4.34px 0; scrollbar-width: thin; scrollbar-color: #c8c8c3 transparent; }
.mini-receipt-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 8.68px 0; border-bottom: 1px dotted #d6d6d1; }
.mini-receipt-item:last-child { border-bottom: 0; }
.mini-receipt-item div { min-width: 0; display: flex; flex-direction: column; }
.mini-receipt-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mini-receipt-item small { margin-top: 3px; color: #999; font-size: 8.8px; }
.mini-receipt-item > span { align-self: center; font-size: 11px; font-weight: 600; }
.mini-receipt-totals { flex: none; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-top: 13.02px; border-top: 1px dashed #c9c9c4; color: #777; font-size: 9.9px; }
.mini-receipt-totals strong { color: var(--ink); text-align: right; font-size: 11px; }
.mini-receipt-totals .mini-total-label { color: #777; font-family: inherit; font-size: 9.9px; }
.mini-receipt-totals .mini-total { font-family: inherit; font-size: 11px; font-weight: 700; }
.gift-card-button { grid-column: 1 / -1; width: 100%; height: 36px; margin-top: 4px; border: 1px solid var(--ink); border-radius: 9px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 600; cursor: pointer; }
.gift-card-button:active { background: #f3f3f0; }
.checkout-payment { height: 330px; display: flex; flex-direction: column; padding: 41.23px 0 0 23.87px; border: 0; border-left: 1px solid var(--soft-line); border-radius: 0; }
.checkout-amount-due { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--ink); }
.checkout-amount-due span { font-size: 14.3px; font-weight: 600; }
.checkout-amount-due strong { font-size: 27.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.checkout-payment .eyebrow { margin-bottom: 12px; font-size: 8.8px; }
.modal-payment-grid { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.modal-payment { min-width: 0; width: 100%; min-height: 0; flex: 1; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 17.36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #777; cursor: pointer; }
.modal-payment[hidden] { display: none; }
.modal-payment svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.modal-payment span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.3px; font-weight: 600; }
.modal-payment.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.mixed-payment-fields { width: 100%; min-height: 0; flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mixed-payment-fields[hidden] { display: none; }
.mixed-payment-card { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7.59px; border: 1px solid #343435; border-radius: 10px; background: #111112; color: #d8d8d6; font-size: 11px; font-weight: 600; }
.mixed-payment-input-wrap { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #d8d8d6; }
.mixed-payment-input-wrap input { width: 100%; min-width: 0; height: 30px; padding: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 15.4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-primary, .modal-secondary { height: 50px; flex: 1; border-radius: 12px; font-size: 13.2px; font-weight: 600; cursor: pointer; }
.modal-primary { border: 0; background: var(--ink); color: #fff; }
.modal-primary.is-danger { background: var(--danger); }
.modal-secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.modal-secondary[hidden] { display: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sidebar-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(17,17,18,.34);
  cursor: pointer;
  opacity: 0;
  transition: opacity .25s ease;
}
.sidebar-backdrop[hidden] { display: none; }
.sidebar-backdrop.is-open { opacity: 1; }
.sidebar {
  width: var(--sidebar-rail-width);
  height: 100dvh;
  position: fixed;
  z-index: 51;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 23.87px 10.85px 17.36px;
  border-right: 1px solid rgba(16,16,17,.06);
  background: rgba(255,255,255,.94);
  box-shadow: 8px 0 28px rgba(16,16,17,.045);
  transition: width .28s cubic-bezier(.2,.75,.25,1);
}
.sidebar-header { min-height: 52px; display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 20px; }
.sidebar-brand { min-width: 0; display: flex; align-items: center; gap: 11px; overflow: hidden; }
.sidebar-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 12px; background: var(--ink); color: #fff; font-family: Georgia, serif; font-size: 25.3px; }
.sidebar-header .brand-name, .sidebar-header .brand-tagline { display: none; }
.sidebar-toggle { width: 28px; height: 28px; position: absolute; right: -24px; top: 12px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #555; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.sidebar-toggle:hover { color: var(--ink); border-color: #bdbdb7; }
.sidebar-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .25s ease; }
.sidebar-nav { display: flex; flex-direction: column; gap: 7px; padding-top: 0; }
.sidebar-link { min-width: 0; height: 46px; display: flex; align-items: center; justify-content: center; gap: 13px; overflow: hidden; padding: 0 10.85px; border-radius: 11px; color: #777774; font-size: 14.3px; text-decoration: none; white-space: nowrap; transition: background .18s ease, color .18s ease, padding .2s ease; }
.sidebar-link svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sidebar-link span { display: none; opacity: 0; }
.sidebar-link:hover { background: #f5f5f2; color: var(--ink); }
.sidebar-link.is-active { background: #f1f1ee; color: var(--ink); font-weight: 600; }
.sidebar-footer { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: auto; padding-top: 13.02px; border-top: 1px solid var(--soft-line); overflow: hidden; }
.sidebar-footer .seller-avatar { width: 32px; height: 32px; }
.sidebar-seller-copy { display: none; flex-direction: column; color: var(--ink); font-size: 13.2px; font-weight: 600; white-space: nowrap; }
.sidebar-seller-copy small { margin-bottom: 2px; color: var(--muted); font-size: 9.9px; font-weight: 400; }
body.sidebar-expanded .sidebar { width: var(--sidebar-expanded-width); padding-right: 15.19px; padding-left: 15.19px; }
body.sidebar-expanded .sidebar-header { justify-content: flex-start; padding-left: 2.17px; }
body.sidebar-expanded .sidebar-header .brand-name { display: block; font-size: 19.8px; }
body.sidebar-expanded .sidebar-header .brand-tagline { display: block; margin-top: 5px; padding-left: 2.17px; font-size: 7.7px; letter-spacing: 3px; }
body.sidebar-expanded .sidebar-toggle { right: -28px; }
body.sidebar-expanded .sidebar-toggle svg { transform: rotate(180deg); }
body.sidebar-expanded .sidebar-link { justify-content: flex-start; padding: 0 13.02px; }
body.sidebar-expanded .sidebar-link span { display: inline; opacity: 1; }
body.sidebar-expanded .sidebar-seller-copy { display: flex; }
body.sidebar-expanded .sidebar-footer { justify-content: flex-start; padding-left: 4.34px; }
body.sidebar-expanded .sidebar-backdrop.is-open { opacity: 1; }
body.sidebar-open { overflow: hidden; }

@media (max-width: 1100px) {
  .app-shell { padding: 17.36px 21.7px 23.87px; }
  .topbar { grid-template-columns: 150px minmax(260px, 1fr) 48px 145px; gap: 16px; }
  .customer-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-metrics div { padding: 0 11.93px; }
  .customer-contact { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace { grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr); }
  .cart-row { grid-template-columns: minmax(0, 1fr) minmax(70px, 82px) minmax(58px, 76px) 24px; gap: 6px; }
}

@media (max-width: 850px), (orientation: portrait) {
  .app-shell, body.sidebar-expanded .app-shell { width: calc(100% - 56px); margin: 0 0 0 56px; padding: 17.36px; }
  .topbar { height: auto; grid-template-columns: minmax(0, 1fr) auto auto; }
  .store-info { grid-row: 1; grid-column: 1; }
  .store-info { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .store-clock { grid-row: 1; grid-column: 2; }
  .client-search-wrap { grid-row: 2; grid-column: 1 / -1; }
  .seller-button { grid-row: 1; grid-column: 3; }
  .sidebar { width: 56px; padding: 17.36px 6.51px 13.02px; }
  body.sidebar-expanded .sidebar { width: min(250px, calc(100vw - 56px)); }
  body.sidebar-expanded .sidebar-backdrop.is-open { position: fixed; }
  body.sidebar-expanded .sidebar { box-shadow: 12px 0 34px rgba(0,0,0,.14); }
  .sidebar-header { min-height: 44px; margin-bottom: 14px; }
  .sidebar-brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 22px; }
  .sidebar-toggle { width: 24px; height: 24px; right: -20px; top: 10px; }
  body.sidebar-expanded .sidebar-toggle { right: -22px; }
  .sidebar-link { height: 42px; padding: 0 7.59px; }
  .sidebar-link svg { width: 19px; height: 19px; }
  .seller-button > span:nth-child(2) { display: none; }
  .customer-card { grid-template-columns: 1fr; align-items: flex-start; }
  .customer-main { width: 100%; }
  .customer-details-flip { width: 100%; grid-column: 1; }
  .customer-metrics { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 0; }
  .customer-favorites-wrap { width: 100%; padding-right: 0; }
  .workspace { grid-template-columns: 1fr; }
  .checkout-panel { min-height: 0; }
  .checkout-review { grid-template-columns: 1fr; }
  .checkout-payment { height: 300px; padding: 41.23px 0 0; border-left: 0; border-top: 1px solid var(--soft-line); }
}

@media (max-width: 620px) {
  .app-shell, body.sidebar-expanded .app-shell { width: calc(100% - 56px); margin-left: 56px; padding: 13.02px 10.85px 21.7px; }
  .customer-card { padding: 21.7px; }
  .customer-main { min-width: 0; }
  .customer-contact { max-width: 220px; }
  .customer-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 0; }
  .customer-metrics div { padding: 0; border-left: 0; }
  .customer-favorites { gap: 5px; }
  .favorite-card { gap: 5px; padding: 6.51px; }
  .favorite-card svg { width: 16px; height: 16px; }
  .cart-row { grid-template-columns: 1fr 80px 24px; padding: 9.22px 0; }
  .quantity-control { grid-column: 2; grid-row: 1; width: 80px; }
  .row-price { grid-column: 2; grid-row: 2; }
  .remove-item { grid-column: 3; grid-row: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .customer-details-flip-inner { transition: none; }
}
