:root {
  --cream: #fff8f4;
  --blush: #f7d9d6;
  --rose: #d98b8b;
  --wine: #7f3d46;
  --sand: #efe6de;
  --charcoal: #32272a;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(84, 48, 52, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Georgia", "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(247, 217, 214, 0.9), transparent 28%),
    radial-gradient(circle at bottom right, rgba(217, 139, 139, 0.18), transparent 24%),
    linear-gradient(180deg, #fffaf6 0%, #fff3ef 100%);
  color: var(--charcoal);
}

.page-shell {
  width: min(1280px, calc(100vw - 24px));
  margin: 0 auto;
  padding:
    calc(24px + env(safe-area-inset-top, 0px))
    env(safe-area-inset-right, 0px)
    calc(40px + env(safe-area-inset-bottom, 0px))
    env(safe-area-inset-left, 0px);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.store-body .store-hero {
  grid-template-columns: 1fr;
}

.hero-copy,
.hero-card,
.panel,
.product-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(127, 61, 70, 0.08);
  box-shadow: var(--shadow);
  animation: storeRiseIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy {
  border-radius: calc(var(--radius-lg) + 8px);
  padding: 28px 30px;
}

.hero-card {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: grid;
  gap: 16px;
  align-content: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(247, 217, 214, 0.78));
  animation-delay: 80ms;
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.hero-brand-card {
  margin: 0;
  flex: 0 0 auto;
  width: 68px;
}

.hero-brand-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68px;
  object-fit: contain;
  border-radius: calc(var(--radius-md) - 2px);
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 8px;
  box-shadow: inset 0 0 0 1px rgba(127, 61, 70, 0.08);
}

.hero-brand-copy {
  min-width: 0;
}

.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.15rem, 4.4vw, 4rem);
  line-height: 0.95;
}

.hero-copy {
  animation-delay: 24ms;
}

.hero-text {
  animation: storeFadeIn 520ms ease both 120ms;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  animation: storeFadeIn 520ms ease both 180ms;
}

.promo-banner {
  animation: storeFadeIn 520ms ease both 220ms;
}

.catalog-section {
  animation: storeRiseIn 500ms cubic-bezier(0.16, 1, 0.3, 1) both 120ms;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--wine);
}

.hero-text,
.section-head p,
.muted,
.cart-row p {
  color: rgba(50, 39, 42, 0.72);
}

.hero-text {
  max-width: 58ch;
}

.hero-stat {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.hero-stat span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wine);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 430px);
  gap: 24px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.section-head p {
  margin: 0;
}

.catalog-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 16px;
}

.search-box {
  display: grid;
  gap: 6px;
  width: min(100%, 420px);
}

.search-box span {
  font-size: 0.92rem;
  color: var(--wine);
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(127, 61, 70, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
  color: var(--charcoal);
  font: inherit;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.chip-btn {
  border: 1px solid rgba(127, 61, 70, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--wine);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.chip-btn.active {
  background: linear-gradient(135deg, var(--wine), #af6464);
  color: var(--white);
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-visual {
  min-height: 136px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  background-size: cover;
  background-position: center;
  background:
    linear-gradient(140deg, rgba(247, 217, 214, 0.9), rgba(255, 255, 255, 0.95)),
    linear-gradient(90deg, rgba(127, 61, 70, 0.06), rgba(127, 61, 70, 0));
}

.product-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--wine);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.product-body {
  padding: 18px;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.product-title-row h3 {
  margin: 0;
  font-size: 1.18rem;
}

.price {
  white-space: nowrap;
  color: var(--wine);
  font-weight: 700;
}

.product-category,
.product-description {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 16px;
  height: fit-content;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 22px;
}

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

.empty-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(247, 217, 214, 0.26);
  text-align: center;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(127, 61, 70, 0.08);
}

.cart-row strong,
.cart-total strong {
  display: block;
}

.cart-row p {
  margin: 4px 0 0;
}

.cart-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cart-controls button,
.secondary-btn,
.primary-btn,
.link-btn {
  border: none;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.cart-controls button:hover,
.secondary-btn:hover,
.primary-btn:hover,
.link-btn:hover {
  transform: translateY(-1px);
}

.chip-btn:hover {
  transform: translateY(-1px);
}

.cart-controls button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(127, 61, 70, 0.08);
  color: var(--charcoal);
}

.cart-controls button:disabled,
.secondary-btn:disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(127, 61, 70, 0.1);
}

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

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(50, 39, 42, 0.72);
}

.checkout-form {
  display: grid;
  gap: 14px;
}

.checkout-form label span,
.payment-methods legend {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid rgba(127, 61, 70, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 14px;
  color: var(--charcoal);
  font: inherit;
}

.payment-methods {
  padding: 0;
  margin: 0;
  border: none;
  display: grid;
  gap: 10px;
}

.radio-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(247, 217, 214, 0.24);
}

.secondary-btn,
.link-btn,
.primary-btn {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-family: inherit;
}

.secondary-btn,
.link-btn {
  background: rgba(127, 61, 70, 0.08);
  color: var(--wine);
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, var(--wine), #af6464);
  color: var(--white);
}

.hidden {
  display: none;
}

.payment-box {
  display: grid;
  gap: 12px;
}

.payment-box h3,
#order-result h2 {
  margin: 0;
}

.qr-image {
  width: min(100%, 280px);
  border-radius: 22px;
  background: var(--white);
  padding: 12px;
  border: 1px solid rgba(127, 61, 70, 0.1);
}

/* KHQR card, matching the invitation platform's checkout.
   Built rather than photographed: the worker captures the EMVCo payload, so
   the code is regenerated crisp and the card is ours to style. The screenshot
   it replaces could come back blank or half-faded, and neither failure showed
   until a customer tried to scan it. */
/* The ABA code stands on its own: no frame, no padding, no border. The panel
   above it already carries the reference, the amount and the status, so a card
   around it only repeated them -- and when the image is ABA's own card, framing
   it produced a card inside a card. */
.qr-image.aba-code {
  width: min(100%, 250px);
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(20, 24, 31, 0.16);
}

.khqr-card {
  width: min(100%, 340px);
  margin: 4px auto 0;
  background: #fff;
  border: 1px solid #dedfdb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(32, 40, 55, 0.16);
  text-align: left;
}

.khqr-card__head {
  height: 58px;
  background: #d9232e;
  color: #fff;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.khqr-card__head strong { font-size: 20px; letter-spacing: 0.04em; }
.khqr-card__head span { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.khqr-card__code {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px;
}

.khqr-card__code img { display: block; width: 100%; height: auto; }

/* The KHQR mark sits over the middle of the code. The image is generated at
   the highest error correction so this cannot cost a scan -- and the shared
   file has no mark on it at all, since this is drawn in CSS. */
.khqr-card__code i {
  position: absolute;
  width: 34px;
  height: 34px;
  background: #d9232e;
  border: 7px solid #fff;
}

.khqr-card__row {
  border-top: 1px solid #ecece9;
  padding: 11px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
}

.khqr-card__row span { color: #676b71; }
.khqr-card__row strong { font-size: 0.78rem; text-align: right; word-break: break-all; }

/* Countdown as a depleting ring against the real deadline: a clock running
   down, not a control to press. */
.khqr-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 0;
}

.khqr-timer svg { display: block; transform: rotate(-90deg); }
.khqr-timer circle { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.khqr-timer .track { stroke: rgba(20, 24, 31, 0.1); }
.khqr-timer .arc {
  stroke: #4db6c4;
  transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
}

.khqr-timer b {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #16305c;
}

.khqr-timer.urgent .arc { stroke: #e0752a; }
.khqr-timer.urgent b { color: #b3541e; }
.khqr-timer.expired .arc { stroke: #c2415c; }
.khqr-timer.expired b { color: #98304a; font-size: 0.86rem; }

/* ABA payment-link session: the code is captured by the worker, so there is a
   real gap before it exists, and a real three-minute clock once it does.

   The wait is the customer's first impression of the payment, so it gets a
   loader shaped like the thing being fetched -- a KHQR card turning in space --
   rather than a spinner that says nothing about what is happening. */
.qr-preparing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 22px 16px 18px;
  color: var(--muted, #6b5b5e);
  font-size: 0.92rem;
  text-align: center;
}

.qr-flip {
  width: 78px;
  height: 112px;
  perspective: 520px;
}

.qr-flip i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  transform-style: preserve-3d;
  animation: qr-flip 2.1s cubic-bezier(.55, .08, .3, .98) infinite;
  /* Front is the red KHQR header over a pale body; the back is its mirror, so
     the card reads as one object turning rather than two images swapping. */
  background:
    linear-gradient(#e02020 0 26%, #ffffff 26% 100%);
  box-shadow: 0 8px 20px rgba(20, 24, 31, 0.16);
  position: relative;
}

.qr-flip i::after {
  /* A suggestion of the code, not a fake one -- it must never be mistaken for
     something scannable. */
  content: "";
  position: absolute;
  inset: 38% 18% 14%;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(20,24,31,.22) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(0deg, rgba(20,24,31,.22) 0 4px, transparent 4px 8px);
}

@keyframes qr-flip {
  0%   { transform: rotateY(0deg)   translateZ(0); }
  55%  { transform: rotateY(180deg) translateZ(0); }
  100% { transform: rotateY(360deg) translateZ(0); }
}

/* Waiting for the bank to confirm: a dot travelling round a tilted ring,
   because something is genuinely in flight -- not a refresh arrow, which
   invites people to press it and makes waiting feel like their job. */
.pay-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--muted, #6b5b5e);
}

.pay-orbit {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  position: relative;
  transform-style: preserve-3d;
  /* Tilt the whole ring rather than squashing it, so the dot passes visibly
     behind and in front. */
  transform: rotateX(62deg);
}

.pay-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(127, 61, 70, 0.18);
}

.pay-orbit span {
  position: absolute;
  inset: 0;
  animation: pay-orbit 1.5s linear infinite;
  transform-style: preserve-3d;
}

.pay-orbit span::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #7f3d46;
  box-shadow: 0 0 8px rgba(127, 61, 70, 0.55);
}

@keyframes pay-orbit {
  from { transform: rotateZ(0deg); }
  to   { transform: rotateZ(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .qr-flip i,
  .pay-orbit span { animation: none; }
  .qr-flip i { transform: rotateY(-18deg); }
}

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

.action-row > * {
  flex: 1 1 180px;
}

.admin-shell {
  width: min(1120px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.admin-grid,
.admin-form,
.admin-products {
  display: grid;
  gap: 18px;
}

.admin-product-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(127, 61, 70, 0.08);
  box-shadow: var(--shadow);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.storefront-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.storefront-editor-card {
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(127, 61, 70, 0.08);
  box-shadow: var(--shadow);
}

.storefront-editor-card .section-head.compact h3 {
  font-size: 1.05rem;
}

.storefront-editor-card .section-head.compact p {
  max-width: 30ch;
}

.editor-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(245, 239, 233, 0.95), rgba(252, 250, 247, 0.98));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.editor-summary strong {
  display: block;
  color: var(--charcoal);
  font-size: 1rem;
  line-height: 1.25;
}

.editor-summary p {
  margin: 0;
  color: rgba(50, 39, 42, 0.68);
  line-height: 1.45;
  max-width: 42ch;
}

.editor-summary-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(47, 93, 80, 0.08);
  color: #35584a;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-summary {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.logo-summary .logo-summary-media {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #faf7f5, #f2eeea);
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.logo-summary .image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-summary p {
  max-width: 28ch;
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-body {
  display: grid;
  gap: 12px;
}

.storefront-editor-card.editor-open .editor-toggle-btn {
  display: none;
}

.storefront-editor-card.editor-open .editor-body {
  animation: adminFadeUp 180ms ease;
}

.storefront-collapsed .editor-body {
  display: none;
}

.editor-collapsed .editor-body {
  display: none;
}

.product-card-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(127, 61, 70, 0.08);
}

.product-edit-body,
.order-edit-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(127, 61, 70, 0.1);
}

.order-edit-panel {
  grid-template-columns: minmax(0, 1fr);
  padding: 16px 16px 14px;
  border-radius: var(--radius-md);
  background: rgba(247, 243, 240, 0.42);
  width: 100%;
}

.admin-body .order-edit-panel {
  grid-column: 1 / -1;
}

.order-edit-panel label {
  display: grid;
  gap: 6px;
  max-width: none;
  width: 100%;
}

.order-edit-panel label span {
  font-weight: 700;
  color: var(--wine);
}

.order-edit-panel .order-status-select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 0.94rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 61, 70, 0.16);
  background: white;
  font: inherit;
}

.order-edit-panel .form-actions {
  margin-top: 4px;
}

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

.admin-card-actions .secondary-btn.compact,
.order-actions-row .secondary-btn.compact,
.form-actions .secondary-btn {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.76rem;
}

.order-edit-panel .form-actions .primary-btn,
.order-edit-panel .form-actions .secondary-btn {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.88rem;
  min-width: 112px;
}

.order-edit-panel .form-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.admin-card-actions .secondary-btn.compact {
  min-width: 84px;
}

.product-card-actions-row .secondary-btn.compact {
  min-width: 84px;
}

.order-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(127, 61, 70, 0.08);
}

.order-actions-row .secondary-btn.compact {
  min-width: 84px;
}

.editor-collapsed {
  display: none;
}

.storefront-reset-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.admin-product-card.editor-open .product-edit-toggle,
.order-card.editor-open .order-edit-toggle {
  display: none;
}

.admin-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 25, 27, 0.42);
  backdrop-filter: blur(4px);
}

.admin-editor-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(127, 61, 70, 0.12);
  box-shadow: 0 28px 72px rgba(34, 25, 27, 0.24);
  animation: adminPanelPop 180ms ease-out;
}

.admin-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(127, 61, 70, 0.1);
}

.admin-editor-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.admin-editor-header p {
  margin: 4px 0 0;
  color: rgba(50, 39, 42, 0.72);
}

.admin-editor-body {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.admin-editor-body .admin-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-editor-body label {
  display: grid;
  gap: 6px;
}

.admin-editor-body .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-editor-body textarea {
  min-height: 120px;
}

.admin-editor-body .full-width {
  grid-column: 1 / -1;
}

.admin-editor-body .form-row {
  gap: 16px;
}

.admin-editor-backdrop {
  animation: adminBackdropFade 180ms ease-out;
}

body.modal-open {
  overflow: hidden;
}

.editor-page-panel {
  padding: 22px;
}

.editor-page-body {
  display: grid;
  gap: 18px;
}

.editor-summary-banner {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(127, 61, 70, 0.12);
  background: rgba(247, 217, 214, 0.22);
}

.editor-summary-banner-visual {
  width: 96px;
  height: 96px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f5f3f0;
  border: 1px solid #e3ddd8;
}

.editor-summary-banner-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-summary-banner-visual span {
  color: #8a817d;
  font-size: 0.82rem;
}

.editor-summary-banner-copy {
  min-width: 0;
}

.editor-summary-banner-copy p {
  margin: 4px 0 0;
  color: rgba(50, 39, 42, 0.72);
}

.editor-page-form {
  display: grid;
  gap: 16px;
}

.editor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.editor-summary-item {
  padding: 12px 14px;
  border: 1px solid rgba(127, 61, 70, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
}

.editor-summary-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(50, 39, 42, 0.58);
}

.editor-summary-item strong {
  display: block;
  font-size: 0.96rem;
  color: var(--charcoal);
  word-break: break-word;
}

.admin-shell input,
.admin-shell textarea,
.admin-shell select {
  width: 100%;
  border: 1px solid rgba(127, 61, 70, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 14px;
  color: var(--charcoal);
  font: inherit;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(247, 217, 214, 0.26);
}

.admin-hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 360px);
}

@media (max-width: 980px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .layout {
    gap: 18px;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(247, 217, 214, 0.75), transparent 36%),
      linear-gradient(180deg, #fffaf6 0%, #fff3ef 100%);
  }

  .page-shell {
    width: 100%;
    padding:
      calc(12px + env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      calc(28px + env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .hero {
    gap: 12px;
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 0.98;
    max-width: 8ch;
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .hero-card {
    gap: 10px;
  }

  .hero-text,
  .section-head p,
  .muted,
  .cart-row p {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .hero-stat {
    padding: 12px 13px;
  }

  .layout {
    gap: 14px;
  }

  .section-head {
    margin-bottom: 14px;
  }

  .section-head h2 {
    font-size: 1.28rem;
  }

  .catalog-toolbar {
    margin-bottom: 12px;
  }

  .search-box {
    width: 100%;
  }

  .search-box input,
  .checkout-form input,
  .checkout-form textarea {
    font-size: 16px;
  }

  .search-box input {
    min-height: 48px;
    padding: 13px 14px;
  }

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    margin-bottom: 14px;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .chip-btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 13px;
    font-size: 0.92rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .product-visual {
    min-height: 122px;
    padding: 14px;
  }

  .product-body {
    padding: 16px;
  }

  .product-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .product-title-row h3 {
    font-size: 1.08rem;
  }

  .product-category,
  .product-description {
    font-size: 0.93rem;
  }

  .cart-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 0 12px;
  }

  .cart-controls {
    justify-content: space-between;
    gap: 12px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(127, 61, 70, 0.06);
  }

  .cart-controls button {
    width: 36px;
    height: 36px;
  }

  .summary-list {
    gap: 8px;
  }

  .checkout-form {
    gap: 12px;
  }

  .checkout-form input,
  .checkout-form textarea {
    min-height: 48px;
    padding: 13px 14px;
  }

  .checkout-form textarea {
    min-height: 96px;
  }

  .payment-methods {
    gap: 8px;
  }

  .radio-card {
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
  }

  .radio-card input {
    margin-top: 3px;
    flex: 0 0 auto;
  }

  .secondary-btn,
  .link-btn,
  .primary-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .qr-image {
    width: min(100%, 238px);
    justify-self: center;
    padding: 10px;
  }

  .action-row {
    flex-direction: column;
  }

  .action-row > * {
    flex: 1 1 auto;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding:
      calc(10px + env(safe-area-inset-top, 0px))
      max(8px, env(safe-area-inset-right, 0px))
      calc(24px + env(safe-area-inset-bottom, 0px))
      max(8px, env(safe-area-inset-left, 0px));
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 16px 14px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 10vw, 2.3rem);
  }

  .eyebrow {
    letter-spacing: 0.18em;
    font-size: 0.74rem;
  }

  .product-body {
    padding: 14px;
  }

  .cart-total {
    margin-top: 12px;
    padding-top: 12px;
  }
}

.hidden {
  display: none !important;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(127, 61, 70, 0.1);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.admin-tab-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-tab-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: rgba(127, 61, 70, 0.04);
  font-weight: 700;
  cursor: pointer;
  color: var(--wine);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn:hover {
  background: rgba(127, 61, 70, 0.08);
}

.tab-btn.active {
  background: var(--wine);
  color: white;
}

.admin-tab-actions .secondary-btn.compact {
  padding: 10px 16px;
  min-height: 42px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success, .badge-paid, .badge-completed { background: #e6f7ed; color: #1a7f37; border: 1px solid rgba(26, 127, 55, 0.2); }
.badge-pending, .badge-payment_pending { background: #fff8c5; color: #9a6700; border: 1px solid rgba(154, 103, 0, 0.2); }
.badge-failed, .badge-cancelled { background: #ffebe9; color: #cf222e; border: 1px solid rgba(207, 34, 46, 0.2); }
.badge-processing { background: #ddf4ff; color: #0969da; border: 1px solid rgba(9, 105, 218, 0.2); }
.badge-shipped { background: #f5f0ff; color: #8250df; border: 1px solid rgba(130, 80, 223, 0.2); }
.badge-neutral { background: #f6f8fa; color: #57606a; border: 1px solid rgba(87, 96, 106, 0.2); }

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 16px;
  background: rgba(255, 255, 255, 0.5);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 61, 70, 0.06);
}

.filter-bar label {
  flex: 1;
}

.filter-bar label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--wine);
}

.filter-bar select {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 61, 70, 0.14);
  background: white;
  font: inherit;
}

/* Order Cards */
.admin-orders-list {
  display: grid;
  gap: 16px;
}

.order-card {
  background: white;
  border: 1px solid rgba(127, 61, 70, 0.1);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(127, 61, 70, 0.04);
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(127, 61, 70, 0.08);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(127, 61, 70, 0.06);
}

.order-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-ref {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--charcoal);
  font-family: "Helvetica", sans-serif;
}

.order-date {
  font-size: 0.85rem;
  color: rgba(50, 39, 42, 0.6);
}

.order-status-badges {
  display: flex;
  gap: 6px;
}

.order-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .order-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.order-customer-info h4, .order-items h4 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wine);
}

.order-customer-info p {
  margin: 6px 0;
  font-size: 1rem;
  line-height: 1.5;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(127, 61, 70, 0.04);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-top: 10px;
  color: rgba(50, 39, 42, 0.7);
}

.order-total-row.final {
  margin-top: 16px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--charcoal);
  border-top: 2px solid rgba(127, 61, 70, 0.1);
  padding-top: 12px;
}

.order-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(247, 217, 214, 0.15);
  padding: 16px;
  border-radius: var(--radius-sm);
}

.action-group {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.status-select {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 61, 70, 0.14);
  background: white;
  font: inherit;
}

.compact {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(50, 39, 42, 0.5);
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(127, 61, 70, 0.14);
  font-style: italic;
}

/* Product Management Enhancements */
.action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-row {
  display: flex;
  gap: 24px;
  margin: 12px 0;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.search-group {
  flex: 2;
}

.filter-group {
  flex: 1;
}

.admin-product-card {
  position: relative;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(127, 61, 70, 0.06);
}

.delete-btn {
  background: rgba(207, 34, 46, 0.08);
  color: #cf222e;
}

.delete-btn:hover {
  background: #cf222e;
  color: white;
}

.image-preview {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #faf7f6;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid rgba(127, 61, 70, 0.06);
}

.badge-neutral {
  background: #f6f8fa;
  color: #57606a;
}

/* Dashboard Styles */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border: 1px solid rgba(127, 61, 70, 0.1);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(127, 61, 70, 0.04);
}

.stat-card span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wine);
  font-weight: 700;
}

.stat-card strong {
  font-size: 2rem;
  color: var(--charcoal);
  font-family: "Helvetica", sans-serif;
}

.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

@media (max-width: 980px) {
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
}

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

.dashboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(127, 61, 70, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 61, 70, 0.04);
}

.dashboard-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-item-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.dashboard-item-meta {
  font-size: 0.8rem;
  color: rgba(50, 39, 42, 0.6);
}

.stock-count {
  font-weight: 800;
  color: #cf222e;
}

.recent-order-item {
  cursor: pointer;
  transition: background 0.2s;
}

.recent-order-item:hover {
  background: rgba(127, 61, 70, 0.06);
}

/* Order Action Enhancements */
.order-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.order-actions .action-group {
  width: 100%;
}

/* Bulk Actions Styles */
.bulk-actions-toolbar {
  background: #fdf2f4;
  border: 1px solid #f7d9d6;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 10px;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(127, 61, 70, 0.12);
}

.selected-count {
  font-weight: 700;
  color: var(--wine);
}

.bulk-action-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.select-all-row {
  margin-bottom: 0;
  padding: 8px 12px;
  background: rgba(127, 61, 70, 0.04);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.order-card-selection {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.order-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  cursor: pointer;
}

.order-card-content {
  flex: 1;
  min-width: 0;
}

/* Logout Button */
.logout-btn {
  background: rgba(207, 34, 46, 0.1);
  color: #cf222e;
  border: 1px solid rgba(207, 34, 46, 0.2);
}

.logout-btn:hover {
  background: #cf222e;
  color: white;
}

/* Checkbox Visibility */
.order-checkbox {
  accent-color: var(--wine);
  transform: scale(1.2);
  margin-right: 12px;
}

.select-all-row input {
  accent-color: var(--wine);
  width: 18px;
  height: 18px;
}

/* Production admin console */
.admin-body {
  min-height: 100vh;
  background: #f7f7f4;
  color: #242124;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-body .admin-console {
  width: min(1560px, calc(100vw - 20px));
  padding: 12px 0 30px;
}

.admin-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e3ddd8;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(36, 33, 36, 0.05);
  position: sticky;
  top: 8px;
  z-index: 30;
  backdrop-filter: blur(14px);
}

.admin-brand,
.admin-topbar-actions,
.admin-card-title-row,
.admin-product-meta {
  display: flex;
  align-items: center;
}

.admin-brand {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2f5d50;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark-image {
  overflow: hidden;
  padding: 0;
  background: linear-gradient(180deg, #f7f2ee, #efe8e1);
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.brand-mark-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-brand strong,
.admin-brand span {
  display: block;
}

.admin-brand strong {
  font-size: 1rem;
}

.admin-brand span {
  margin-top: 2px;
  color: #736a67;
  font-size: 0.86rem;
}

.admin-topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 8px;
  padding: 8px 12px;
  background: #e7f1ed;
  color: #235145;
  border: 1px solid #c7dfd4;
  font-weight: 750;
  font-size: 0.9rem;
}

.admin-body .admin-grid {
  gap: 14px;
}

.admin-body .status-banner {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fdfaf6;
  color: #5d5350;
  border: 1px solid #e7ded6;
  font-size: 0.94rem;
}

.admin-body .panel,
.admin-body .admin-product-card,
.admin-body .order-card,
.admin-body .stat-card,
.admin-body .dashboard-item,
.admin-body .filter-bar,
.admin-body .bulk-actions-toolbar {
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e3ddd8;
  box-shadow: 0 4px 14px rgba(36, 33, 36, 0.04);
}

.admin-body .panel {
  padding: 18px;
}

.admin-login-panel {
  min-height: min(560px, calc(100vh - 130px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 430px);
  gap: 18px;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.login-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(47, 93, 80, 0.94), rgba(89, 122, 107, 0.9)),
    linear-gradient(180deg, #ffffff, #f7f7f4);
  color: #ffffff;
}

.login-copy .admin-pill {
  width: fit-content;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 58ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.login-form-card {
  align-content: center;
  padding: clamp(24px, 4vw, 42px);
}

.admin-submit-btn {
  width: 100%;
}

.admin-body .admin-tabs {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #e3ddd8;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(36, 33, 36, 0.05);
}

.admin-body .tab-btn {
  min-height: 40px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: transparent;
  color: #5d5350;
  padding: 9px 14px;
  font-weight: 750;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.admin-body .tab-btn.active {
  background: #2f5d50;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(47, 93, 80, 0.16);
}

.tab-content:not(.hidden) {
  animation: adminFadeUp 220ms ease-out;
}

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

@keyframes adminPanelPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes adminBackdropFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 14px;
}

.page-title-row h1,
.admin-body .section-head h2,
.admin-body .section-head h3 {
  margin: 0 0 4px;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-title-row h1 {
  font-size: 1.55rem;
}

.admin-body .section-head p,
.admin-body .dashboard-item-meta,
.admin-body .order-date {
  color: #736a67;
}

.admin-body .dashboard-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-body .stat-card {
  padding: 16px;
  gap: 6px;
}

.admin-body .stat-card span {
  color: #736a67;
  letter-spacing: 0.04em;
  font-size: 0.76rem;
}

.admin-body .stat-card strong {
  font-family: inherit;
  color: #242124;
  font-size: 1.72rem;
  letter-spacing: 0;
}

.admin-body .dashboard-secondary-grid {
  gap: 12px;
}

.report-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px)) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e3ddd8;
  border-radius: 8px;
}

.report-filter-bar label {
  display: grid;
  gap: 6px;
}

.report-filter-bar span {
  color: #5d5350;
  font-size: 0.9rem;
  font-weight: 700;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.compare-card {
  border: 1px solid #e3ddd8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(36, 33, 36, 0.04);
  padding: 16px;
}

.compare-card h3 {
  margin: 0;
  font-size: 1rem;
}

.compare-card p {
  margin: 4px 0 0;
  color: #736a67;
  font-size: 0.9rem;
}

.compare-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

/* Premium dashboard refresh */
.admin-body {
  background:
    radial-gradient(circle at top left, rgba(47, 93, 80, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(169, 145, 108, 0.1), transparent 24%),
    linear-gradient(180deg, #fbfaf7 0%, #f2efe9 100%);
}

.admin-body .admin-console {
  width: min(1620px, calc(100vw - 20px));
  padding: 12px 0 36px;
}

.admin-topbar {
  min-height: 74px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 248, 244, 0.96));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: 0 18px 40px rgba(35, 81, 69, 0.08);
}

.admin-body .status-banner {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,246,241,0.94));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: 0 12px 32px rgba(35, 81, 69, 0.06);
}

.admin-body .admin-tabs {
  top: 88px;
  padding: 8px;
  gap: 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,246,242,0.98));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: 0 14px 32px rgba(35, 81, 69, 0.06);
}

.admin-body .tab-btn {
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 16px;
  color: #665f5d;
}

.admin-body .tab-btn.active {
  background: linear-gradient(180deg, #35584a, #27473c);
  box-shadow: 0 12px 24px rgba(47, 93, 80, 0.22);
}

.admin-body .panel,
.admin-body .admin-product-card,
.admin-body .order-card,
.admin-body .stat-card,
.admin-body .dashboard-item,
.admin-body .filter-bar,
.admin-body .bulk-actions-toolbar,
.admin-body .report-card,
.admin-body .storefront-editor-card,
.admin-login-panel,
.admin-body .compare-card {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(251,248,244,0.98));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: 0 12px 30px rgba(35, 81, 69, 0.06);
}

.admin-body .panel {
  padding: 20px;
}

.admin-body .dashboard-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-body .stat-card {
  padding: 18px 18px 20px;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,244,239,0.98)),
    linear-gradient(135deg, rgba(74, 102, 86, 0.03), rgba(168, 92, 92, 0.03));
}

.admin-body .stat-card strong {
  font-size: 1.9rem;
}

.admin-body .dashboard-secondary-grid {
  gap: 14px;
}

.admin-body .section-head p,
.admin-body .dashboard-item-meta,
.admin-body .order-date {
  color: #726b68;
}

.report-filter-bar {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,247,242,0.96));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: 0 10px 24px rgba(35, 81, 69, 0.06);
}

.report-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.report-filter-bar .primary-btn.compact,
.report-filter-bar .secondary-btn.compact {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 0.86rem;
  border-radius: 12px;
}

.report-actions .secondary-btn.compact {
  min-width: 120px;
}

.report-filter-bar .primary-btn.compact {
  min-width: 132px;
}

.report-filter-bar label input {
  min-height: 42px;
  border-radius: 12px;
}

.report-grid {
  gap: 14px;
}

.report-card {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(251,248,244,0.98));
  border: 1px solid rgba(35, 81, 69, 0.08);
  box-shadow: 0 12px 30px rgba(35, 81, 69, 0.06);
  padding: 18px;
}

.comparison-grid {
  gap: 14px;
}

.compare-card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,245,240,0.98)),
    linear-gradient(135deg, rgba(74, 102, 86, 0.03), rgba(168, 92, 92, 0.02));
}

.compare-card h3 {
  font-size: 1.05rem;
}

.compare-card-grid {
  gap: 12px;
}

.admin-body .dashboard-item {
  padding: 14px 14px 13px;
}

.admin-body .dashboard-item:hover,
.admin-body .report-card:hover,
.admin-body .compare-card:hover {
  box-shadow: 0 16px 36px rgba(35, 81, 69, 0.09);
}

.compare-metric {
  border-radius: 8px;
  background: #fbfaf8;
  border: 1px solid #eee8e3;
  padding: 12px;
}

.compare-metric span {
  display: block;
  color: #736a67;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.compare-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  color: var(--charcoal);
}

.compare-metric small {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.trend-positive {
  color: #1a7f37;
}

.trend-negative {
  color: #cf222e;
}

.trend-neutral {
  color: #736a67;
}

.admin-users-layout {
  display: grid;
  gap: 16px;
}

.admin-users-list {
  display: grid;
  gap: 12px;
}

.admin-user-card {
  border: 1px solid #e3ddd8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(36, 33, 36, 0.04);
  padding: 16px;
}

.admin-user-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-user-card h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-user-card p,
.admin-user-meta {
  margin: 4px 0 0;
  color: #736a67;
  font-size: 0.9rem;
}

.admin-user-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-user-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.admin-role-pill {
  background: rgba(247, 243, 240, 0.92);
  color: #5d5350;
}

.report-card {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e3ddd8;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(36, 33, 36, 0.04);
}

.wide-report-card {
  grid-column: 1 / -1;
}

.chart-shell {
  min-height: 210px;
}

.donut-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #eee8e3;
}

.donut-chart span {
  position: relative;
  z-index: 1;
  color: #242124;
  font-weight: 850;
  font-size: 1.55rem;
}

.chart-legend,
.report-list,
.bar-chart {
  display: grid;
  gap: 8px;
}

.legend-row,
.report-list-row,
.bar-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.legend-row {
  grid-template-columns: 12px minmax(0, 1fr) auto;
}

.legend-row i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-row span,
.report-list-row small,
.bar-row span {
  color: #736a67;
}

.legend-row strong,
.report-list-row em,
.bar-row strong {
  color: #242124;
  font-style: normal;
  font-weight: 750;
}

.bar-row {
  grid-template-columns: 110px minmax(120px, 1fr) 110px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1eeeb;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f5d50, #8fb4a4);
}

.report-list-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 10px;
  border: 1px solid #eee8e3;
  border-radius: 8px;
  background: #fffdfb;
}

.report-list-row > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f1ed;
  color: #235145;
  font-weight: 800;
}

.report-list-row strong,
.report-list-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-empty {
  min-height: 160px;
  padding: 20px;
}

.admin-body .dashboard-item {
  width: 100%;
  text-align: left;
  padding: 12px;
}

.admin-body button.dashboard-item {
  cursor: pointer;
  font: inherit;
}

.admin-body .dashboard-item:hover {
  border-color: #d3c7c1;
}

.admin-body .badge {
  border-radius: 8px;
  padding: 5px 9px;
  letter-spacing: 0.04em;
}

.admin-body .filter-bar {
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  background: #fbfaf8;
  gap: 12px;
}

.admin-body .filter-bar label span,
.admin-body .checkout-form label span,
.admin-body .admin-shell label span {
  color: #5d5350;
  letter-spacing: 0;
}

.admin-body input,
.admin-body textarea,
.admin-body select,
.admin-body .status-select {
  min-height: 44px;
  border-radius: 8px;
  background: #ffffff;
  border-color: #d9d0ca;
  color: #242124;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.admin-body input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: #2f5d50;
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
  outline: 2px solid rgba(47, 93, 80, 0.24);
  border-color: #2f5d50;
  box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.08);
}

.admin-body .primary-btn,
.admin-body .secondary-btn,
.admin-body .link-btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.admin-body .primary-btn {
  background: #2f5d50;
  color: #ffffff;
  border: 1px solid #2f5d50;
}

.admin-body .secondary-btn,
.admin-body .link-btn {
  background: #f1eeeb;
  color: #3f3734;
  border: 1px solid #ddd5cf;
}

.admin-body .primary-btn:hover {
  background: #274d43;
  border-color: #274d43;
  box-shadow: 0 10px 22px rgba(47, 93, 80, 0.18);
}

.admin-body .secondary-btn:hover,
.admin-body .link-btn:hover {
  background: #e9e4df;
  color: #3f3734;
  box-shadow: 0 8px 18px rgba(36, 33, 36, 0.08);
}

.admin-body .primary-btn:focus-visible,
.admin-body .secondary-btn:focus-visible,
.admin-body .link-btn:focus-visible,
.admin-body .tab-btn:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible {
  outline: 2px solid rgba(47, 93, 80, 0.34);
  outline-offset: 2px;
}

.admin-body .primary-btn:active,
.admin-body .secondary-btn:active,
.admin-body .link-btn:active,
.admin-body .tab-btn:active {
  transform: translateY(1px) scale(0.99);
}

.admin-body .logout-btn {
  background: #fff5f3;
  border-color: #f2c8c1;
  color: #a23c32;
}

.admin-body .delete-btn {
  background: #fff5f3;
  border: 1px solid #f2c8c1;
  color: #a23c32;
}

.admin-body .action-header {
  margin-bottom: 12px;
  align-items: end;
}

.admin-body .admin-products {
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 12px;
}

.admin-body .admin-product-card {
  padding: 14px;
  gap: 14px;
}

.admin-body .panel,
.admin-body .admin-product-card,
.admin-body .order-card,
.admin-body .stat-card,
.admin-body .dashboard-item,
.admin-body .filter-bar,
.admin-body .bulk-actions-toolbar,
.admin-body .report-card,
.admin-body .storefront-editor-card,
.admin-login-panel {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.admin-body .panel:hover,
.admin-body .admin-product-card:hover,
.admin-body .order-card:hover,
.admin-body .stat-card:hover,
.admin-body .dashboard-item:hover,
.admin-body .filter-bar:hover,
.admin-body .bulk-actions-toolbar:hover,
.admin-body .report-card:hover,
.admin-body .storefront-editor-card:hover,
.admin-login-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(36, 33, 36, 0.07);
}

.admin-product-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.product-select-cell {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(127, 61, 70, 0.12);
}

.product-select-cell input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.admin-product-card:has(.product-checkbox:checked) {
  border-color: #2f5d50;
  box-shadow: 0 0 0 2px rgba(47, 93, 80, 0.12);
}

.admin-product-image {
  width: 96px;
  height: 96px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f2efec;
  border: 1px solid #e3ddd8;
  border-radius: 8px;
}

#tab-products .filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(420px, 3fr) auto;
  align-items: end;
}

#tab-products .filter-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(132px, 1fr));
  gap: 10px;
}

#tab-products .filter-actions {
  align-self: end;
}

@media (max-width: 900px) {
  #tab-products .filter-bar {
    grid-template-columns: 1fr;
  }

  #tab-products .filter-group {
    grid-template-columns: 1fr;
  }
}

.admin-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-product-image span {
  color: #8a817d;
  font-size: 0.82rem;
}

.admin-card-title-row {
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.admin-card-title-row h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.admin-product-summary p {
  margin: 4px 0 0;
  color: #736a67;
}

.admin-product-meta {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.admin-product-meta span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 8px;
  background: #f5f3f0;
  color: #5d5350;
  font-size: 0.82rem;
  font-weight: 650;
}

.variant-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(127, 61, 70, 0.12);
  background: rgba(247, 243, 240, 0.55);
}

.product-gallery-editor {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(47, 81, 65, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

.gallery-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.gallery-upload-btn {
  white-space: nowrap;
}

.gallery-upload-input {
  display: none;
}

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

.gallery-editor-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(86px, auto);
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(127, 61, 70, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.gallery-editor-row label,
.gallery-editor-row input {
  min-width: 0;
}

.gallery-editor-preview {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid rgba(127, 61, 70, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: rgba(50, 39, 42, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.gallery-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variant-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.variant-editor-head .compact {
  flex: 0 0 auto;
  min-width: 92px;
}

.variant-editor-head strong {
  display: block;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.variant-editor-head p {
  margin: 4px 0 0;
  color: rgba(50, 39, 42, 0.68);
  font-size: 0.84rem;
}

.variant-editor-list {
  display: grid;
  gap: 12px;
}

.variant-editor-empty {
  padding: 14px;
  border-radius: 8px;
  border: 1px dashed rgba(127, 61, 70, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(50, 39, 42, 0.68);
  font-size: 0.9rem;
}

.variant-row {
  display: grid;
  grid-template-columns:
    minmax(132px, 0.9fr)
    minmax(170px, 1.15fr)
    minmax(120px, 0.82fr)
    minmax(142px, 0.92fr)
    minmax(120px, 0.82fr)
    minmax(82px, max-content)
    minmax(92px, max-content);
  column-gap: 12px;
  row-gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(127, 61, 70, 0.1);
  background: rgba(255, 255, 255, 0.86);
}

.variant-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.variant-row input {
  width: 100%;
}

.variant-row label span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--wine);
}

.variant-row .checkbox-row {
  display: flex;
  align-items: center;
  align-self: end;
  justify-content: center;
  gap: 8px;
  height: 44px;
  margin: 0;
  white-space: nowrap;
}

.variant-row .checkbox-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.variant-row .variant-remove-btn {
  align-self: end;
  min-height: 44px;
  min-width: 92px;
}

.storefront-editor-grid .storefront-editor-card {
  min-height: 0;
  height: auto;
  align-self: start;
}

.storefront-editor-card.storefront-collapsed {
  padding-bottom: 16px;
}

.admin-body .card-actions,
.admin-body .order-actions {
  border-top: 1px solid #eee8e3;
  background: #fbfaf8;
  border-radius: 8px;
}

.admin-body .destructive-actions {
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 12px;
}

.admin-body .product-card-actions-row {
  border-top: 1px solid #eee8e3;
  background: #fbfaf8;
  border-radius: 8px;
}

.admin-body .order-card {
  padding: 16px;
}

.admin-body .order-card-selection {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-body .order-card-content {
  min-width: 0;
}

.admin-body .order-checkbox {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: #2f5d50;
  transform: none;
  justify-self: center;
}

.admin-body .order-card:hover {
  transform: none;
  border-color: #d3c7c1;
  box-shadow: 0 6px 18px rgba(36, 33, 36, 0.06);
}

.admin-body .order-header {
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom-color: #eee8e3;
}

.admin-body .order-ref {
  font-family: inherit;
  font-size: 1.06rem;
}

.admin-body .order-status-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-body .order-body {
  grid-template-columns: minmax(320px, 1.1fr) minmax(300px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.admin-body .order-section {
  min-width: 0;
  border: 1px solid #eee8e3;
  border-radius: 8px;
  padding: 12px;
  background: #fffdfb;
}

.admin-body .order-customer-info h4,
.admin-body .order-items h4 {
  color: #5d5350;
  margin-bottom: 10px;
}

.admin-body .order-customer-info p {
  margin: 5px 0;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.detail-row span {
  color: #736a67;
  font-size: 0.88rem;
}

.detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.detail-row-block strong {
  line-height: 1.35;
}

.map-link {
  width: fit-content;
  display: inline-flex;
  margin-top: 8px;
  border-radius: 8px;
  padding: 7px 10px;
  background: #e7f1ed;
  color: #235145;
  border: 1px solid #c7dfd4;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.map-link:hover {
  background: #dbe9e3;
}

.admin-body .order-item-row,
.admin-body .order-total-row.final {
  border-color: #eee8e3;
}

.admin-body .order-item-row {
  gap: 12px;
}

.admin-body .order-item-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-body .order-item-row strong,
.admin-body .order-total-row span:last-child {
  white-space: nowrap;
}

.admin-body .order-actions {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.admin-body .order-actions .action-group {
  width: auto;
  min-width: 0;
}

.admin-body .order-actions .action-group:first-child {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
}

.admin-body .order-actions .action-group:last-child {
  justify-content: end;
}

.admin-body .bulk-actions-toolbar {
  top: 64px;
  background: #fffaf6;
  border-color: #e2d4ca;
}

.admin-body .empty-state {
  min-height: 84px;
  border-radius: 8px;
  background: #fbfaf8;
  border: 1px dashed #d9d0ca;
  font-style: normal;
}

@media (max-width: 860px) {
  .admin-body .admin-products,
  .admin-body .order-body,
  .report-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .admin-body .filter-bar,
  .report-filter-bar,
  .admin-body .action-header,
  .admin-login-panel,
  .admin-body .order-header,
  .admin-body .bulk-actions-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-login-panel {
    grid-template-columns: 1fr;
  }

  .admin-body .admin-tabs {
    overflow-x: auto;
  }

  .admin-body .order-actions {
    grid-template-columns: 1fr;
  }

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

  .admin-body .order-actions .action-group:last-child {
    justify-content: stretch;
  }

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

  .admin-user-card-head {
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .admin-body .admin-console {
    width: min(100%, calc(100vw - 20px));
    padding-top: 10px;
  }

  .admin-topbar,
  .admin-product-summary {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    display: grid;
  }

  .admin-product-summary {
    display: grid;
  }

  .admin-product-image {
    width: 100%;
    height: 150px;
  }

  .admin-topbar-actions,
  .admin-card-title-row,
  .admin-body .order-status-badges {
    justify-content: flex-start;
  }

  .admin-body .order-card {
    padding: 12px;
  }

  .admin-body .order-card-selection {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }

  .admin-body .order-header,
  .admin-body .order-actions .action-group:first-child {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

/* Admin UX enhancements */
.admin-store-link {
  text-decoration: none;
}

.admin-body .status-banner {
  gap: 10px;
}

.admin-body .status-banner::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: #6b7280;
  box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.12);
}

.admin-body .status-banner.is-info {
  color: #334155;
  border-color: #d8dee8;
}

.admin-body .status-banner.is-info::before {
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.admin-body .status-banner.is-loading {
  color: #7c4f0f;
  border-color: #f3d7a5;
}

.admin-body .status-banner.is-loading::before {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.16);
}

.admin-body .status-banner.is-success {
  color: #235145;
  border-color: #bed8cd;
}

.admin-body .status-banner.is-success::before {
  background: #2f7d62;
  box-shadow: 0 0 0 4px rgba(47, 125, 98, 0.14);
}

.admin-body .status-banner.is-error {
  color: #9f2f27;
  border-color: #efc3bd;
}

.admin-body .status-banner.is-error::before {
  background: #c24136;
  box-shadow: 0 0 0 4px rgba(194, 65, 54, 0.14);
}

.tab-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
}

.admin-body .tab-btn:not(.active) .tab-count {
  background: #f1e9e2;
  color: #5d5350;
}

.list-summary-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #6f6763;
  font-size: 0.9rem;
}

.quick-filter-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-body .filter-bar .quick-filter-group .secondary-btn.compact {
  min-height: 36px;
  padding: 8px 12px;
}

.admin-body .panel:hover,
.admin-body .filter-bar:hover,
.admin-body .bulk-actions-toolbar:hover,
.admin-body .report-card:hover,
.admin-body .storefront-editor-card:hover,
.admin-login-panel:hover {
  transform: none;
}

.admin-body .stat-card {
  position: relative;
  overflow: hidden;
}

.admin-body .stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d7c9bf;
}

.admin-body .stat-revenue-card::before {
  background: #2f7d62;
}

.admin-body .stat-orders-card::before,
.admin-body .stat-products-card::before {
  background: #6f8f9a;
}

.admin-body .stat-pending-card::before,
.admin-body .stat-stock-card::before {
  background: #d97706;
}

.admin-body .stat-processing-card::before,
.admin-body .stat-payment-card::before {
  background: #7b6f9b;
}

.admin-body .stock-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 800;
  position: static;
  min-height: 0;
  border: 0;
}

.admin-body .stock-pill.stock-ok {
  background: #e7f1ed;
  color: #235145;
}

.admin-body .stock-pill.stock-low {
  background: #fff5db;
  color: #96580a;
}

.admin-body .stock-pill.stock-out {
  background: #fff0ee;
  color: #a23c32;
}

.admin-body .admin-product-card {
  border-left-width: 4px;
}

.admin-body .admin-product-card.stock-ok {
  border-left-color: #9ecab8;
}

.admin-body .admin-product-card.stock-low {
  border-left-color: #d97706;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,250,240,0.98));
}

.admin-body .admin-product-card.stock-out {
  border-left-color: #c24136;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,246,245,0.98));
}

.admin-body .order-card {
  border-left-width: 4px;
}

.admin-body .order-card.needs-action {
  border-left-color: #d97706;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,250,240,0.98));
}

.admin-body .order-card.is-paid:not(.needs-action) {
  border-left-color: #2f7d62;
}

@media (max-width: 860px) {
  .list-summary-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-filter-group {
    justify-content: flex-start;
  }
}

/* Professional admin action placement */
.admin-body .admin-topbar-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 12px;
}

.admin-topbar-status,
.admin-topbar-controls,
.section-actions,
.filter-actions,
.card-action-row,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-topbar-status,
.admin-topbar-controls,
.section-actions,
.filter-actions {
  justify-content: flex-end;
}

.admin-body .admin-tabs {
  justify-content: flex-start;
}

.admin-body .admin-tab-list {
  width: 100%;
}

.page-title-row,
.admin-body .action-header {
  align-items: center;
}

.section-actions {
  margin-left: auto;
}

.admin-body .section-actions .primary-btn.compact,
.admin-body .section-actions .secondary-btn.compact,
.admin-body .filter-actions .primary-btn.compact,
.admin-body .filter-actions .secondary-btn.compact {
  min-width: 112px;
}

.report-filter-bar {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
}

.admin-body .filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) auto;
  align-items: end;
}

#tab-orders .filter-bar {
  grid-template-columns: minmax(260px, 2fr) minmax(120px, auto) minmax(180px, 1fr) repeat(2, minmax(170px, 1fr)) auto;
}

.filter-actions {
  align-self: end;
}

.list-summary-row {
  margin: 0 0 12px;
  padding: 0 2px;
}

.admin-body .form-actions {
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eee8e3;
}

.admin-body .form-actions .primary-btn,
.admin-body .form-actions .secondary-btn {
  min-width: 116px;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.form-action-spacer,
.card-action-spacer {
  flex: 1 1 auto;
}

.admin-body .product-card-actions-row,
.admin-body .order-actions-row,
.admin-body .admin-card-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-top: 1px solid #eee8e3;
  border-radius: 8px;
  background: #fbfaf8;
}

.admin-body .product-card-actions-row .secondary-btn.compact,
.admin-body .order-actions-row .secondary-btn.compact,
.admin-body .admin-card-actions .secondary-btn.compact {
  min-width: 104px;
}

.admin-body .delete-btn {
  border-color: #edc5bf;
  background: #fff7f5;
}

.admin-body .delete-btn:hover {
  border-color: #c24136;
  background: #c24136;
  color: #ffffff;
}

.admin-body .deactivate-product-btn {
  border-color: #cfd8d3;
  background: #f7fbf8;
  color: #1f4d3f;
}

.admin-body .deactivate-product-btn:hover {
  border-color: #2f5d50;
  background: #e8f2ee;
  color: #17382f;
}

.admin-body .order-pin-reset-result {
  display: grid;
  gap: 6px;
  margin: 0 12px 12px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.admin-body .order-pin-reset-result.hidden {
  display: none;
}

.admin-body .order-pin-reset-result span {
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-body .order-pin-reset-result strong {
  font-size: 1.45rem;
  letter-spacing: 0.08em;
}

.admin-body .order-pin-reset-result p {
  margin: 0;
  color: #9a3412;
  font-size: 0.86rem;
  line-height: 1.4;
}

.admin-body .bulk-actions-toolbar {
  gap: 12px;
}

.admin-body .bulk-action-controls {
  margin-left: auto;
}

@media (max-width: 980px) {
  .admin-body .admin-topbar-actions,
  .report-filter-bar,
  .admin-body .filter-bar,
  #tab-orders .filter-bar {
    grid-template-columns: 1fr;
  }

  .admin-topbar-status,
  .admin-topbar-controls,
  .section-actions,
  .filter-actions,
  .admin-body .bulk-action-controls {
    justify-content: flex-start;
  }

  .section-actions {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .admin-topbar-controls > *,
  .section-actions > *,
  .filter-actions > *,
  .admin-body .form-actions > button,
  .admin-body .product-card-actions-row > button,
  .admin-body .order-actions-row > button,
  .admin-body .admin-card-actions > button {
    flex: 1 1 100%;
  }

  .form-action-spacer,
  .card-action-spacer {
    display: none;
  }
}

/* Customer storefront */
.store-body {
  --store-bg: #f2f7fc;
  --store-surface: #ffffff;
  --store-surface-soft: #f7fafd;
  --store-border: #dde7f0;
  --store-border-strong: #cfdcec;
  --store-text: #101828;
  --store-muted: #667085;
  --store-primary: #235145;
  --store-primary-dark: #173b32;
  --store-accent: #a94d5c;
  --store-warning: #a15c07;
  --store-danger: #b42318;
  --store-shadow: 0 12px 32px rgba(22, 63, 84, 0.08);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(98, 160, 214, 0.2), transparent 26%),
    radial-gradient(circle at 85% 12%, rgba(148, 142, 224, 0.35), transparent 22%),
    linear-gradient(180deg, #f6fafd 0%, #eef2f9 100%);
  color: var(--store-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.store-body.modal-open {
  overflow: hidden;
}

.store-body .page-shell {
  width: min(1440px, calc(100vw - 32px));
  padding:
    calc(18px + env(safe-area-inset-top, 0px))
    env(safe-area-inset-right, 0px)
    calc(36px + env(safe-area-inset-bottom, 0px))
    env(safe-area-inset-left, 0px);
}

.store-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 18px;
}

.store-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--store-text);
  text-decoration: none;
  font-weight: 800;
}

.store-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--store-primary);
  color: #ffffff;
  font-size: 0.82rem;
}

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

.store-pill,
.stock-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid #c7dfd4;
  background: #e7f1ed;
  color: var(--store-primary);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 750;
}

.store-body .hero {
  margin-bottom: 26px;
}

.store-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  padding: 28px 28px 24px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 245, 248, 0.96) 52%, rgba(238, 247, 243, 0.95) 100%);
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.05);
}

.store-body .hero-copy,
.store-body .panel,
.store-body .product-card {
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface);
  box-shadow: none;
  backdrop-filter: none;
}

.store-body .hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

.store-body .hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.04;
}

.store-body .eyebrow {
  margin: 0;
  color: var(--store-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.store-body .hero-text,
.store-body .section-head p,
.store-body .muted,
.store-body .cart-row p {
  color: var(--store-muted);
}

.store-body .hero-text {
  max-width: 620px;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.48;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid var(--store-border-strong);
  background: rgba(255, 255, 255, 0.86);
  color: var(--store-primary);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 750;
}

.store-pill {
  border-color: #c7dfd4;
  background: #eef7f3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-utility-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.hero-utility-actions .store-action-btn {
  min-height: 42px;
  min-width: 42px;
  padding-inline: 0;
  font-size: 0.84rem;
  font-weight: 650;
  border-color: rgba(127, 61, 70, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.hero-utility-actions .icon-action-btn {
  position: relative;
  width: 42px;
  min-width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.hero-actions .hero-cta-btn {
  min-height: 46px;
  padding-inline: 18px;
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-actions .hero-cta-icon-btn {
  min-width: 46px;
  width: 46px;
  padding-inline: 0;
  display: inline-grid;
  place-items: center;
}

.hero-actions .hero-cta-icon-btn .store-action-icon {
  width: 20px;
  height: 20px;
}

.hero-utility-actions .icon-action-btn::after,
.hero-actions .hero-cta-icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(49, 37, 41, 0.96);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  box-shadow: 0 10px 24px rgba(32, 24, 27, 0.2);
  z-index: 3;
}

.hero-utility-actions .icon-action-btn::before,
.hero-actions .hero-cta-icon-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 1px);
  transform: translateX(-50%) translateY(4px);
  border: 6px solid transparent;
  border-top-color: rgba(49, 37, 41, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  pointer-events: none;
  z-index: 2;
}

.hero-utility-actions .icon-action-btn:hover::after,
.hero-utility-actions .icon-action-btn:hover::before,
.hero-utility-actions .icon-action-btn:focus-visible::after,
.hero-utility-actions .icon-action-btn:focus-visible::before,
.hero-actions .hero-cta-icon-btn:hover::after,
.hero-actions .hero-cta-icon-btn:hover::before,
.hero-actions .hero-cta-icon-btn:focus-visible::after,
.hero-actions .hero-cta-icon-btn:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.hero-utility-actions .language-switch {
  margin-left: 4px;
  justify-self: auto;
}

.store-action-icon {
  width: 18px;
  height: 18px;
  color: var(--store-primary);
}

.cart-icon-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(127, 61, 70, 0.22);
}

.floating-cart-btn {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 94;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: #2f5141;
  color: #ffffff;
  box-shadow:
    0 12px 28px rgba(47, 81, 65, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.floating-cart-btn .store-action-icon {
  width: 26px;
  height: 26px;
  color: #ffffff;
}

.floating-cart-btn:hover,
.floating-cart-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 16px 34px rgba(47, 81, 65, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.7);
}

.floating-cart-btn .cart-icon-badge {
  top: -2px;
  right: -2px;
}

.store-body.modal-open .floating-cart-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.94);
}

.commerce-methods {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

.commerce-methods legend {
  margin-bottom: 8px;
  font-size: 0.94rem;
  font-weight: 750;
  color: var(--charcoal);
}

@media (max-width: 640px) {
  .floating-cart-btn {
    display: none;
  }
}

@media (min-width: 768px) {
  .floating-cart-btn {
    right: 28px;
    bottom: 32px;
    width: 68px;
    height: 68px;
  }
}

@media (min-width: 1440px) {
  .floating-cart-btn {
    right: 36px;
    bottom: 36px;
  }
}

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

.promo-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid #dbe7e1;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbf9 0%, #ffffff 58%, #fff8ef 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.promo-banner > div {
  min-width: 0;
}

.promo-banner h2 {
  margin: 6px 0 5px;
  color: #0f172a;
  font-size: 1.12rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.promo-banner p {
  margin: 0;
  color: var(--store-muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.promo-ticker {
  width: 100%;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(47, 93, 80, 0.1);
  background: rgba(255, 255, 255, 0.86);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.promo-ticker-track {
  display: inline-flex;
  gap: 14px;
  width: max-content;
  min-width: max-content;
  padding: 8px 10px;
  white-space: nowrap;
  color: var(--store-primary);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  animation: promo-ticker-scroll 18s linear infinite;
}

.promo-ticker-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.promo-ticker-note {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 250, 247, 0.95);
  border: 1px solid rgba(47, 93, 80, 0.12);
  color: var(--store-primary);
  flex: 0 0 auto;
  white-space: nowrap;
}

.promo-ticker-note-0 {
  background: rgba(241, 250, 247, 0.98);
  color: #2f5d50;
}

.promo-ticker-note-1 {
  background: rgba(253, 245, 235, 0.98);
  color: #996000;
}

.promo-ticker-note-2 {
  background: rgba(248, 240, 250, 0.98);
  color: #6e4aa1;
}

.promo-ticker-note-3 {
  background: rgba(255, 243, 240, 0.98);
  color: #9d4b55;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e5f1eb;
  color: var(--store-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.store-body .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.store-info-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin-top: 22px;
}

.info-panel {
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 20px;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.05);
}

.info-copy {
  margin: 0;
  color: var(--store-muted);
  line-height: 1.6;
}

.info-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.info-points span {
  border: 1px solid var(--store-border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--store-surface-soft);
  color: #344054;
  font-size: 0.85rem;
  font-weight: 700;
}

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

.support-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.support-actions[hidden] {
  display: none;
}

.support-summary {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #c7dfd4;
  background: #eef7f3;
  color: var(--store-primary);
  font-weight: 650;
  line-height: 1.5;
}

.support-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
}

.support-row span {
  color: var(--store-muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.support-row strong {
  color: var(--store-text);
  text-align: right;
  overflow-wrap: anywhere;
}

.support-value-link {
  color: inherit;
  text-decoration: none;
}

.support-value-link:hover {
  text-decoration: underline;
}

.support-action-btn {
  gap: 0;
  justify-content: center;
  padding-inline: 0;
  min-height: 48px;
  min-width: 48px;
  width: 100%;
}

.support-action-btn span {
  white-space: nowrap;
}

.support-action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.support-action-btn.icon-action-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.support-action-btn.icon-action-btn .support-action-icon {
  width: 20px;
  height: 20px;
}

.store-utility-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.store-utility-copy {
  display: grid;
  gap: 4px;
}

.store-utility-copy strong {
  color: var(--store-text);
  font-size: 0.95rem;
}

.store-utility-copy span {
  color: var(--store-muted);
  font-size: 0.84rem;
}

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

.store-action-btn {
  min-height: 34px;
  padding-inline: 12px;
}

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

.filter-combo {
  position: relative;
  padding: 0;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.filter-combo[open] {
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.filter-combo-trigger {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px 11px;
  cursor: pointer;
}

.filter-combo-trigger::-webkit-details-marker {
  display: none;
}

.filter-combo-trigger strong {
  color: var(--store-text);
  font-size: 0.94rem;
  line-height: 1.1;
}

.filter-combo-trigger em {
  color: var(--store-muted);
  font-style: normal;
  font-size: 0.8rem;
  line-height: 1.1;
  margin-left: auto;
}

.filter-combo-trigger i {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--store-muted);
  border-bottom: 2px solid var(--store-muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.filter-combo[open] .filter-combo-trigger i {
  transform: rotate(-135deg);
}

.filter-combo-menu {
  border-top: 1px solid var(--store-border);
  padding: 12px 14px 14px;
}

.filter-combo-menu .filter-group-head {
  margin-bottom: 10px;
}

.checkbox-filter-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.filter-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
  color: var(--store-text);
  cursor: pointer;
}

.filter-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.filter-choice span {
  min-width: 0;
  font-weight: 700;
}

.filter-choice em {
  font-style: normal;
  color: var(--store-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-action-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.panel-step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.quick-actions-panel {
  display: grid;
  gap: 12px;
}

.quick-actions-list {
  display: grid;
  gap: 8px;
}

.quick-actions-note {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.86rem;
}

.store-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  padding: 18px;
  animation: storeDrawerBackdropIn 180ms ease-out;
}

.store-drawer.hidden {
  display: none;
}

.store-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 17, 24, 0.45);
  backdrop-filter: blur(2px);
}

.store-drawer-card {
  position: relative;
  z-index: 1;
  width: min(442px, 100%);
  height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(191, 205, 198, 0.92);
  border-radius: 24px 0 0 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96));
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.18);
  animation: storeDrawerSlideIn 220ms cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
}

.store-drawer-card > * {
  animation: storeFadeIn 320ms ease both;
}

.store-drawer-card > *:nth-child(1) { animation-delay: 20ms; }
.store-drawer-card > *:nth-child(2) { animation-delay: 70ms; }
.store-drawer-card > *:nth-child(3) { animation-delay: 120ms; }
.store-drawer-card > *:nth-child(4) { animation-delay: 170ms; }
.store-drawer-card > *:nth-child(5) { animation-delay: 220ms; }
.store-drawer-card > *:nth-child(6) { animation-delay: 270ms; }
.store-drawer-card > *:nth-child(7) { animation-delay: 320ms; }

.store-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.store-drawer-head h2 {
  margin: 4px 0 0;
  color: var(--store-text);
  font-size: 1.35rem;
}

.store-drawer-body {
  display: grid;
  gap: 12px;
  align-content: start;
}

.nested-panel {
  margin-top: 0;
}

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

.store-body .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.store-body .section-head.compact {
  align-items: center;
  margin-bottom: 14px;
}

.store-body .section-head h2 {
  margin: 4px 0 0;
  color: var(--store-text);
  font-size: 1.28rem;
  line-height: 1.2;
}

.store-body .catalog-toolbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin: 2px 0 18px;
  align-items: stretch;
}

.store-body .search-box,
.store-body .filter-combo {
  width: 100%;
}

.store-body .search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.store-body .filter-combo {
  height: 50px;
  min-height: 50px;
  align-self: stretch;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.store-body .filter-combo[open] {
  z-index: 30;
  height: 50px;
  min-height: 50px;
  background: #ffffff;
}

.store-body .filter-combo-trigger {
  height: 48px;
  min-height: 48px;
  padding: 0 12px;
}

.store-body .search-box strong,
.store-body .checkout-form label span,
.store-body .payment-methods legend {
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
}

.store-body .search-box strong {
  flex: 0 0 auto;
}

.store-body .filter-combo-trigger strong {
  flex: 0 0 auto;
}

.store-body .filter-combo-trigger em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-body .filter-combo-trigger i {
  flex: 0 0 auto;
}

.store-body .search-box input,
.store-body .filter-select,
.store-body .checkout-form input,
.store-body .checkout-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--store-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--store-text);
  padding: 11px 12px;
  font: inherit;
  outline: none;
}

.store-body .search-box input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0;
  min-height: 0;
  background: transparent;
}

.store-body .search-box input:focus,
.store-body .filter-select:focus,
.store-body .checkout-form input:focus,
.store-body .checkout-form textarea:focus {
  border-color: var(--store-primary);
  box-shadow: 0 0 0 3px rgba(35, 81, 69, 0.12);
}

.store-body .search-box:focus-within,
.store-body .filter-combo:focus-within {
  border-color: var(--store-primary);
  box-shadow: 0 0 0 3px rgba(35, 81, 69, 0.12);
  background: #ffffff;
}

.store-body .search-box input:focus,
.store-body .filter-combo:focus-within .filter-combo-trigger {
  box-shadow: none;
}

.store-body .filter-combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  max-height: min(320px, 48vh);
  overflow: auto;
  border: 1px solid var(--store-border);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 22px 48px rgba(16, 24, 40, 0.16);
}

.store-body .catalog-toolbar:has(.filter-combo[open]) {
  margin-bottom: 18px;
}

.delivery-address-field {
  display: grid;
  gap: 8px;
}

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

.delivery-map-btn {
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 46px;
}

.delivery-map-btn .support-action-icon {
  width: 18px;
  height: 18px;
}

.delivery-quote-note {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(47, 81, 65, 0.12);
  border-radius: 10px;
  background: rgba(241, 248, 245, 0.9);
  color: var(--store-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.delivery-quote-note.pending {
  border-color: rgba(47, 81, 65, 0.2);
  background: rgba(233, 244, 239, 0.95);
  color: var(--store-primary);
}

.delivery-quote-note.error {
  border-color: rgba(220, 38, 38, 0.16);
  background: rgba(254, 242, 242, 0.92);
  color: #b42318;
}

.store-body .filter-select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--store-primary) 50%),
    linear-gradient(135deg, var(--store-primary) 50%, transparent 50%),
    linear-gradient(to right, #ffffff, #ffffff);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px,
    100% 0;
  background-size: 6px 6px, 6px 6px, 2.5em 100%;
  background-repeat: no-repeat;
  padding-right: 42px;
  margin-bottom: 18px;
}

.filter-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 8px;
}

.filter-group-head span {
  color: #344054;
  font-size: 0.86rem;
  font-weight: 750;
}

.filter-group-head p {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.84rem;
}

.store-body .chip-btn {
  min-height: 36px;
  border: 1px solid var(--store-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.store-body .chip-btn.active {
  border-color: var(--store-primary);
  background: var(--store-primary);
  color: #ffffff;
}

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

@media (min-width: 768px) {
  .store-body .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .store-body .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .store-body .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.store-body .product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  border-radius: 20px;
  border: 1px solid rgba(47, 81, 65, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 251, 0.96));
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.075);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  animation: storeCardRise 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 420px 560px;
  will-change: auto;
}

.store-body .product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(47, 81, 65, 0.22), rgba(115, 102, 190, 0.16), rgba(237, 138, 70, 0.16));
  opacity: 0.24;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 180ms ease, filter 180ms ease;
}

.store-body .product-card:hover::before,
.store-body .product-card:focus-visible::before {
  opacity: 0.52;
}

.store-body .product-card:nth-child(2n) {
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.08);
}

.store-body .product-card:nth-child(3n) {
  border-color: rgba(237, 138, 70, 0.12);
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.08);
}

.store-body .product-card:nth-child(4n) {
  border-color: rgba(138, 92, 246, 0.12);
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.08);
}

.store-body .product-card:nth-child(12n + 1) { animation-delay: 20ms; }
.store-body .product-card:nth-child(12n + 2) { animation-delay: 60ms; }
.store-body .product-card:nth-child(12n + 3) { animation-delay: 100ms; }
.store-body .product-card:nth-child(12n + 4) { animation-delay: 140ms; }
.store-body .product-card:nth-child(12n + 5) { animation-delay: 180ms; }
.store-body .product-card:nth-child(12n + 6) { animation-delay: 220ms; }
.store-body .product-card:nth-child(12n + 7) { animation-delay: 260ms; }
.store-body .product-card:nth-child(12n + 8) { animation-delay: 300ms; }
.store-body .product-card:nth-child(12n + 9) { animation-delay: 340ms; }
.store-body .product-card:nth-child(12n + 10) { animation-delay: 380ms; }
.store-body .product-card:nth-child(12n + 11) { animation-delay: 420ms; }
.store-body .product-card:nth-child(12n + 12) { animation-delay: 460ms; }

.store-body .product-card:hover,
.store-body .product-card:focus-visible {
  border-color: rgba(47, 81, 65, 0.16);
  box-shadow: 0 22px 42px rgba(16, 24, 40, 0.13);
  transform: translateY(-4px);
}

.store-body .product-card:focus-visible {
  outline: 3px solid rgba(35, 81, 69, 0.2);
  outline-offset: 2px;
}

.store-body .product-visual {
  position: relative;
  aspect-ratio: 1 / 1.08;
  min-height: 0;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.52), transparent 28%),
    linear-gradient(145deg, rgba(238, 242, 255, 0.98), rgba(234, 235, 255, 0.98) 54%, rgba(228, 225, 252, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 220ms ease, filter 220ms ease;
}

.store-body .product-visual.has-gallery {
  background-image:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.52), transparent 28%),
    linear-gradient(145deg, rgba(238, 242, 255, 0.98), rgba(234, 235, 255, 0.98) 54%, rgba(228, 225, 252, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44);
}

.product-visual-slide {
  position: absolute;
  inset: 8px;
  border-radius: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: translateX(18px) scale(1.02);
  animation: productImageSlide 9s infinite;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.13);
  will-change: opacity, transform;
}

.product-gallery-count {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.68);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.product-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.product-gallery-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  animation: productGalleryDot 9s infinite;
}

@keyframes productImageSlide {
  0%, 28% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  36%, 100% {
    opacity: 0;
    transform: translateX(-18px) scale(1.015);
  }
}

@keyframes productGalleryDot {
  0%, 28% {
    width: 16px;
    background: #ffffff;
  }
  36%, 100% {
    width: 6px;
    background: rgba(255, 255, 255, 0.55);
  }
}

.store-body .product-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.24) 42%, transparent 70%);
  opacity: 0;
  transform: translateX(-34%);
  transition: opacity 180ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.store-body .product-card:hover .product-visual,
.store-body .product-card:focus-visible .product-visual {
  transform: scale(1.015);
  filter: saturate(1.04);
}

.store-body .product-card:hover .product-visual::after,
.store-body .product-card:focus-visible .product-visual::after {
  opacity: 1;
  transform: translateX(34%);
}

.store-body .product-card:nth-child(2n) .product-visual {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.48), transparent 28%),
    linear-gradient(145deg, rgba(251, 242, 237, 0.98), rgba(250, 231, 221, 0.98) 54%, rgba(250, 223, 208, 0.98));
}

.store-body .product-card:nth-child(3n) .product-visual {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.45), transparent 28%),
    linear-gradient(145deg, rgba(238, 244, 240, 0.98), rgba(230, 240, 233, 0.98) 54%, rgba(219, 233, 225, 0.98));
}

.store-body .product-card:nth-child(4n) .product-visual {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.48), transparent 28%),
    linear-gradient(145deg, rgba(244, 238, 255, 0.98), rgba(237, 229, 255, 0.98) 54%, rgba(226, 218, 252, 0.98));
}

.product-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(115, 102, 190, 0.3);
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.08rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.store-body .product-badge {
  max-width: calc(100% - 96px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #444c65;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.stock-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  border-color: #c7dfd4;
  background: rgba(231, 241, 237, 0.94);
}

.stock-pill.low-stock {
  border-color: #fedf89;
  background: #fffaeb;
  color: var(--store-warning);
}

.stock-pill.out-stock {
  border-color: #fecdca;
  background: #fef3f2;
  color: var(--store-danger);
}

.store-body .product-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  padding: 14px 14px 16px;
  background: #ffffff;
}

.product-rating {
  display: none;
}

.product-rating-stars {
  flex: 0 0 auto;
  color: #b88a2d;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.product-rating strong {
  min-width: 0;
  color: #596275;
  font-weight: 700;
}

.product-promo-line,
.promo-pill {
  display: none;
}

.hero-utility-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  justify-items: stretch;
}

.language-switch {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0;
  padding: 2px;
  border: 1px solid rgba(47, 81, 65, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.05);
  justify-self: center;
}

.language-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #344054;
  font: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
}

.language-chip.active {
  background: linear-gradient(180deg, #2f5141, #284438);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 81, 65, 0.16);
}

.social-links-section {
  display: grid;
  gap: 6px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.social-link {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(47, 81, 65, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: #2f5141;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.social-link svg {
  width: 22px;
  height: 22px;
}

.social-link-facebook {
  color: #1877f2;
}

.social-link-tiktok {
  color: #111111;
}

.social-link-instagram {
  color: #c13584;
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 93;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(47, 81, 65, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(18px);
}

.bottom-nav-item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #344054;
  padding: 8px 6px 6px;
  font: inherit;
  cursor: pointer;
  min-width: 0;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  text-decoration: none;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  color: inherit;
}

.bottom-nav-item span {
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.15;
}

.bottom-nav-item.active {
  color: #2f5141;
  background: #ecfdf5;
  box-shadow: 0 8px 18px rgba(47, 81, 65, 0.12);
}

.bottom-nav-item .cart-icon-badge {
  top: -4px;
  right: 8px;
}

.bottom-nav-item:active {
  transform: translateY(1px);
}

.store-body .page-shell {
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.product-brand {
  margin: 0;
  min-height: 1.3em;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.3;
  text-transform: uppercase;
}

.store-body .product-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.store-body .product-title-row h3 {
  min-width: 0;
  margin: 0;
  color: #202433;
  font-size: 1.08rem;
  line-height: 1.22;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: calc(1.28em * 2);
}

.store-body .price {
  color: #2f5141;
  font-weight: 900;
  font-size: 1.18rem;
  line-height: 1;
}

.price-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
  align-items: end;
  align-self: start;
  min-width: 74px;
}

.store-body .promo-percent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(115, 102, 190, 0.12), rgba(47, 81, 65, 0.1));
  color: #6d48a8;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.store-body .compare-price {
  display: block;
  color: #667085;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.store-body .product-category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  margin: 2px 0 0;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.store-body .product-description {
  display: -webkit-box;
  margin: 2px 0 0;
  color: #475467;
  font-size: 0.8rem;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 2px;
  margin-top: auto;
}

.store-body .secondary-btn,
.store-body .link-btn,
.store-body .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.store-body .secondary-btn.view-product {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #ffffff;
  color: #3d4a5e;
  box-shadow: none;
}

.store-body .primary-btn.add-to-cart {
  background: #5f5a97;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(95, 90, 151, 0.22);
}

.store-body .primary-btn {
  border: 1px solid var(--store-primary);
  background: var(--store-primary);
  color: #ffffff;
}

.store-body .primary-btn:hover {
  background: var(--store-primary-dark);
}

.store-body .secondary-btn,
.store-body .link-btn {
  border: 1px solid var(--store-border-strong);
  background: #ffffff;
  color: var(--store-primary);
}

.store-body .secondary-btn:hover,
.store-body .link-btn:hover {
  border-color: #b8c8c1;
  background: #f3f8f6;
}

.store-body .primary-btn:disabled,
.store-body .secondary-btn:disabled {
  border-color: var(--store-border);
  background: #f2f4f7;
  color: #98a2b3;
  opacity: 1;
}

.store-body .sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 16px;
}

.store-body .panel {
  padding: 16px;
  align-content: start;
}

.store-body .empty-state {
  min-height: 56px;
  border: 1px dashed var(--store-border-strong);
  border-radius: 8px;
  background: var(--store-surface-soft);
  color: var(--store-muted);
  font-style: normal;
  padding: 12px 14px;
}

.store-body .cart-items {
  display: grid;
  gap: 10px;
}

.store-body .cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(191, 205, 198, 0.8);
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfdfc, #f7faf8);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
}

.cart-item-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.cart-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eef7f3;
  background-size: cover;
  background-position: center;
  color: var(--store-primary);
  font-weight: 850;
}

.store-body .cart-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--store-text);
  font-size: 0.94rem;
}

.store-body .cart-row p {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--store-muted);
}

.store-body .cart-controls {
  display: inline-grid;
  grid-template-columns: 32px minmax(24px, auto) 32px;
  align-items: center;
  gap: 6px;
}

.store-body .cart-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--store-border-strong);
  border-radius: 10px;
  background: #ffffff;
  color: var(--store-text);
  font-weight: 850;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.04);
}

.store-body .summary-list {
  gap: 8px;
  margin-top: 12px;
}

.store-body .summary-row,
.store-body .cart-total {
  color: var(--store-muted);
}

.store-body .cart-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--store-border);
}

.store-body .cart-total strong {
  color: var(--store-text);
  font-size: 1.06rem;
}

.cart-panel .summary-list,
.cart-panel .panel-step-actions {
  position: sticky;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff);
}

.cart-panel .summary-list {
  bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  padding-top: 10px;
}

.cart-panel .panel-step-actions {
  bottom: env(safe-area-inset-bottom, 0px);
  margin-top: 8px;
  padding-top: 8px;
}

.cart-panel .panel-step-actions .primary-btn {
  width: 100%;
}

.store-body .checkout-form {
  gap: 12px;
}

.store-body .checkout-form textarea {
  min-height: 92px;
  resize: vertical;
}

.store-body .checkout-form > .primary-btn {
  align-self: start;
}

.store-body .payment-methods {
  gap: 8px;
}

.store-body .checkout-payment-methods {
  gap: 8px;
}

.store-body .payment-method-list {
  display: grid;
  gap: 8px;
}

.store-body .radio-card {
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
  padding: 11px 12px;
}

.store-body .radio-card input {
  width: auto;
  min-height: 0;
  accent-color: var(--store-primary);
}

.payment-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
}

.payment-summary span {
  color: var(--store-muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.payment-summary strong {
  color: var(--store-text);
  font-size: 1rem;
}

.payment-summary p {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.9rem;
}

.location-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 112;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.location-picker-modal.hidden {
  display: none;
}

.location-picker-card {
  position: relative;
  width: min(680px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(191, 205, 198, 0.95);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 248, 0.98));
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.22);
  backdrop-filter: blur(16px);
}

.location-picker-map-shell {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--store-border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 249, 0.96), rgba(255, 255, 255, 0.99));
}

.location-picker-map-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.location-picker-map-head strong {
  color: var(--store-text);
  font-size: 0.92rem;
  font-weight: 850;
}

.location-picker-map-head p {
  margin: 4px 0 0;
  color: var(--store-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.location-picker-map {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--store-border-strong);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(47, 81, 65, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(236, 242, 239, 0.98), rgba(248, 250, 249, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.location-picker-map::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(47, 81, 65, 0.18);
  box-shadow: 0 0 0 10px rgba(47, 81, 65, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.5;
}

.location-picker-marker-icon {
  background: transparent;
  border: 0;
}

.location-picker-marker-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #2f5141;
  box-shadow: 0 0 0 5px rgba(47, 81, 65, 0.14), 0 12px 24px rgba(47, 81, 65, 0.28);
}

.location-picker-marker-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
}

.location-picker-map-tooltip {
  border: 1px solid rgba(47, 81, 65, 0.12) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #344054 !important;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.16) !important;
}

.location-picker-head h2 {
  margin: 4px 0 0;
  color: var(--store-text);
  font-size: 1.35rem;
  line-height: 1.15;
}

.location-picker-head p {
  margin: 0;
  color: var(--store-muted);
}

.location-picker-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.location-picker-search label {
  display: grid;
  gap: 6px;
}

.location-picker-search label span {
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
}

.location-picker-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--store-border-strong);
  border-radius: 10px;
  background: #ffffff;
  padding: 11px 12px;
  color: var(--store-text);
  font: inherit;
}

.location-picker-status {
  margin: 0;
}

.location-picker-results {
  display: grid;
  gap: 10px;
}

.location-picker-empty {
  padding: 14px;
  border: 1px dashed var(--store-border-strong);
  border-radius: 12px;
  background: var(--store-surface-soft);
  color: var(--store-muted);
}

.location-picker-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--store-border);
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  color: var(--store-text);
}

.location-picker-result strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.location-picker-result span {
  color: var(--store-muted);
  font-size: 0.8rem;
}

.location-picker-result.selected {
  border-color: var(--store-primary);
  background: linear-gradient(180deg, #eef8f4, #ffffff);
  box-shadow: 0 0 0 3px rgba(35, 81, 69, 0.08);
}

.location-picker-selection {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--store-border);
  border-radius: 12px;
  background: var(--store-surface-soft);
}

.location-picker-selection span {
  color: var(--store-muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.location-picker-selection strong {
  color: var(--store-text);
  font-size: 0.98rem;
}

.location-picker-selection p {
  margin: 0;
  color: var(--store-muted);
  line-height: 1.45;
}

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

.payment-panel-shell {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  animation: storeFadeIn 240ms ease both;
}

.payment-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.payment-panel-head h3 {
  margin: 4px 0 0;
  color: var(--store-text);
  font-size: 1.03rem;
  line-height: 1.2;
}

.payment-panel-amount {
  white-space: nowrap;
  color: var(--store-primary);
  font-size: 1.02rem;
  font-weight: 850;
}

.payment-panel-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.payment-panel-summary div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
}

.payment-panel-summary span {
  color: var(--store-muted);
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
}

.payment-panel-summary strong {
  color: var(--store-text);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.payment-panel-qr {
  width: min(100%, 260px);
  justify-self: center;
}

.payment-panel-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.payment-panel-actions > * {
  min-width: 0;
}

.payment-panel-actions .secondary-btn,
.payment-panel-actions .link-btn {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
}

@keyframes storeDrawerBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes storeDrawerSlideIn {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

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

@keyframes storeFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes storeCardRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes storeModalRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes variantSelectedPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(35, 81, 69, 0.08);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(35, 81, 69, 0.15), 0 10px 22px rgba(16, 24, 40, 0.08);
  }
}

@keyframes variantChipFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

.track-result {
  margin-top: 12px;
  animation: storeFadeIn 240ms ease both;
}

.track-lookup-card {
  padding: 14px;
  border: 1px solid rgba(35, 81, 69, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 246, 0.96));
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
}

.tracking-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(35, 81, 69, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 249, 0.97));
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.09);
}

.tracking-card-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.tracking-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(35, 81, 69, 0.09), rgba(127, 61, 70, 0.06));
}

.tracking-card-head > div:first-child {
  display: grid;
  gap: 5px;
}

.tracking-card-head strong {
  color: var(--store-text);
  font-size: 1.04rem;
}

.tracking-card-head p {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.84rem;
}

.tracking-card-status {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
  min-width: 112px;
}

.tracking-card-status span {
  color: var(--store-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tracking-card-status strong {
  color: var(--store-primary);
  font-size: 1rem;
}

.tracking-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 0 4px;
}

.tracking-progress::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(35, 81, 69, 0.18), rgba(35, 81, 69, 0.08));
}

.tracking-progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  padding-top: 2px;
}

.tracking-progress-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #d7dde3;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.82);
}

.tracking-progress-step.done .tracking-progress-dot {
  background: var(--store-primary);
}

.tracking-progress-step.active .tracking-progress-dot {
  background: var(--wine);
  box-shadow: 0 0 0 5px rgba(127, 61, 70, 0.12);
}

.tracking-progress-step strong {
  color: var(--store-text);
  font-size: 0.78rem;
  line-height: 1.15;
}

.tracking-progress-step em {
  color: var(--store-muted);
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1.25;
}

.tracking-journey {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.tracking-journey-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.tracking-journey-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #dfe6e1;
  color: var(--store-primary);
  font-size: 0.78rem;
  font-weight: 850;
}

.tracking-journey-item.done .tracking-journey-marker {
  background: #e7f1eb;
  color: var(--store-primary);
}

.tracking-journey-item.active .tracking-journey-marker {
  background: var(--wine);
  color: var(--white);
}

.tracking-journey-body {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--store-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.045);
}

.tracking-journey-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.tracking-journey-head strong {
  color: var(--store-text);
  font-size: 0.92rem;
}

.tracking-journey-head span {
  color: var(--store-muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.tracking-journey-body p {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.track-result-head {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.track-result-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  border: 1px solid #c7dfd4;
  background: #eef7f3;
  color: var(--store-primary);
  font-size: 0.76rem;
  font-weight: 800;
}

.track-result-head strong {
  color: var(--store-text);
  font-size: 1rem;
}

.track-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.track-result-grid div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--store-border);
  border-radius: 12px;
  background: #ffffff;
}

.tracking-address-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(35, 81, 69, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 246, 0.88));
}

.tracking-address-card.locked {
  border-color: rgba(152, 162, 179, 0.28);
  background: rgba(248, 250, 252, 0.92);
}

.tracking-address-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.tracking-address-head span {
  display: block;
  color: var(--store-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tracking-address-head strong {
  display: block;
  margin-top: 2px;
  color: var(--store-text);
  font-size: 0.92rem;
}

.tracking-address-card textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--store-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--store-text);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.45;
}

.tracking-address-card textarea:disabled {
  color: var(--store-muted);
  background: rgba(248, 250, 252, 0.9);
}

.tracking-address-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.tracking-address-actions p {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.track-result-grid span {
  color: var(--store-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.track-result-grid strong {
  color: var(--store-text);
}

.track-result-note {
  margin-bottom: 10px;
  color: var(--store-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.track-result-items {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-result-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
}

.track-result-items span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.track-result-items strong {
  white-space: nowrap;
  color: var(--store-primary);
}

.track-otp-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(74, 102, 86, 0.2);
  border-radius: 8px;
  background: rgba(74, 102, 86, 0.06);
}

.track-otp-card.hidden {
  display: none;
}

.track-otp-card label {
  display: grid;
  gap: 6px;
}

.track-otp-card input {
  width: 100%;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.pin-manage-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(74, 102, 86, 0.16);
  border-radius: 8px;
  background: rgba(74, 102, 86, 0.05);
}

.pin-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pin-manage-head span,
.pin-manage-card p {
  margin: 0;
  color: var(--store-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.pin-manage-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pin-manage-controls input {
  width: 100%;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.access-pin-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(183, 73, 48, 0.28);
  border-radius: 8px;
  background: rgba(183, 73, 48, 0.08);
  color: #5d2518;
}

.access-pin-card span {
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.access-pin-card strong {
  font-size: 1.55rem;
  line-height: 1;
}

.access-pin-card p {
  margin: 0;
  color: #8a321f;
  font-size: 0.86rem;
  line-height: 1.4;
}

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

.my-order-item {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(35, 81, 69, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 249, 0.94));
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.my-order-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.my-order-meta strong {
  color: var(--store-text);
}

.my-order-meta span {
  color: var(--store-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

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

.my-order-grid div {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--store-surface-soft);
}

.my-order-grid span {
  color: var(--store-muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.my-order-grid strong {
  color: var(--store-text);
  font-size: 0.9rem;
}

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

.store-body .payment-box {
  gap: 10px;
}

.store-body .qr-image {
  width: min(100%, 260px);
  border: 1px solid var(--store-border);
  border-radius: 8px;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(25, 31, 42, 0.5);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.product-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  width: min(1060px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: linear-gradient(90deg, #fbfaf8 0%, #ffffff 48%);
  box-shadow: 0 28px 90px rgba(16, 24, 40, 0.22);
  animation: storeModalRise 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.product-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--store-border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--store-text);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.product-detail-visual {
  position: relative;
  min-height: 560px;
  padding: 10px;
  background-color: #fbfaf8;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 34%, rgba(248, 237, 233, 0.74) 35% 55%, transparent 56%),
    linear-gradient(145deg, #fff7f4 0%, #f7f2ec 52%, #eef7f3 100%);
  background-repeat: no-repeat;
  background-size: 92% auto;
  background-position: center;
  border-right: 1px solid var(--store-border);
}

.product-detail-visual.has-gallery {
  touch-action: pan-y;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(35, 81, 69, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--store-text);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

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

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

.product-detail-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.product-detail-gallery-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.28);
  cursor: pointer;
}

.product-detail-gallery-dots button.active {
  width: 22px;
  background: var(--store-primary);
}

.product-detail-content {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: calc(100svh - 40px);
  overflow: hidden;
  padding: 30px 32px 28px;
}

.product-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.product-detail-head h2 {
  min-width: 0;
  margin: 0;
  color: var(--store-text);
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.product-detail-head strong {
  color: var(--store-primary);
  font-size: 1.3rem;
}

.product-detail-price-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.product-detail-price-stack del {
  color: #98a2b3;
  font-size: 0.92rem;
  font-weight: 650;
}

@keyframes promo-ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.product-detail-description {
  margin: 0;
  max-height: clamp(180px, 30vh, 280px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 16px;
  border: 1px solid var(--store-border);
  border-radius: 14px;
  background: #fbfcfb;
  color: #475467;
  line-height: 1.58;
  font-size: 0.98rem;
  -webkit-overflow-scrolling: touch;
}

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

.product-detail-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: #fbfcfb;
}

.product-detail-list dt {
  color: var(--store-muted);
  font-weight: 750;
}

.product-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--store-text);
  overflow-wrap: anywhere;
  font-weight: 750;
}

.product-detail-variants {
  display: grid;
  gap: 10px;
}

.variant-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--store-text);
  cursor: pointer;
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease, background 170ms ease;
  animation: variantOptionIn 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.variant-option-label {
  min-width: 0;
  flex: 1 1 auto;
}

.variant-option-price {
  display: grid;
  gap: 2px;
  justify-items: end;
  margin-left: auto;
  color: var(--store-primary);
  line-height: 1.1;
  text-align: right;
}

.variant-option-price strong {
  font-size: 0.94rem;
  font-weight: 900;
}

.variant-option-price del {
  color: #98a2b3;
  font-size: 0.76rem;
  font-weight: 700;
}

.variant-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--store-primary);
}

.variant-option.selected {
  border-color: var(--store-primary);
  background: linear-gradient(180deg, #f5faf7, #ffffff);
  box-shadow: 0 0 0 3px rgba(35, 81, 69, 0.08);
  animation: variantSelectedPulse 2.4s ease-in-out infinite;
}

.variant-option:not(.disabled):hover,
.variant-option:not(.disabled):focus-within {
  border-color: rgba(35, 81, 69, 0.36);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.09);
  transform: translateY(-1px);
}

.variant-option.disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.variant-option-label {
  font-weight: 750;
}

.product-detail-quantity {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.product-detail-quantity > span {
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 42px minmax(56px, 72px) 42px;
  justify-content: start;
  align-items: center;
  gap: 8px;
}

.quantity-stepper button {
  min-height: 42px;
  border: 1px solid var(--store-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--store-text);
  font-size: 1.15rem;
  font-weight: 800;
}

.quantity-stepper strong {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  background: var(--store-surface-soft);
  color: var(--store-text);
  font-size: 0.98rem;
}

.product-detail-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, auto);
  gap: 10px;
  margin-top: 2px;
  padding-top: 4px;
}

.product-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.product-variant-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(127, 61, 70, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.055);
  animation: variantChipFloat 4.6s ease-in-out infinite;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.product-variant-chip:nth-child(2n) {
  animation-delay: 360ms;
}

.product-variant-chip:nth-child(3n) {
  animation-delay: 720ms;
}

.product-variant-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.09);
}

.product-variant-chip strong {
  font-size: 0.82rem;
  color: var(--store-text);
}

.product-variant-chip em {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--store-primary);
}

.product-variant-chip del {
  font-size: 0.75rem;
  color: #98a2b3;
}

.product-variant-chip-more {
  justify-content: center;
  color: var(--store-muted);
  font-weight: 700;
  background: rgba(239, 244, 241, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-card,
  .panel,
  .product-card,
  .hero-text,
  .hero-actions,
  .promo-banner,
  .catalog-section,
  .store-drawer,
  .store-drawer-card,
  .payment-panel-shell,
  .track-result,
  .product-modal-card,
  .store-body .product-card,
  .variant-option,
  .product-variant-chip {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 641px) {
  .bottom-nav {
    display: none;
  }

  .hero-utility-stack {
    justify-items: start;
    gap: 10px;
    margin-top: 10px;
  }

  .language-switch {
    justify-self: start;
  }

  .social-links {
    justify-content: flex-start;
  }

  .store-body .hero-copy {
    padding: 18px 20px 20px;
  }

  .store-body .hero-text {
    max-width: 56ch;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .social-links-section {
    gap: 8px;
  }

  .hero-actions {
    margin-top: 0;
  }
}

@media (max-width: 980px) {
  .store-hero,
  .store-body .layout,
  .store-info-grid,
  .product-modal-card {
    grid-template-columns: 1fr;
  }

  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-utility-bar,
  .store-drawer-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-utility-actions {
    justify-content: flex-start;
  }

  .hero-top-row {
    flex-direction: column;
  }

  .hero-utility-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .store-body .sidebar {
    position: static;
  }

  .product-detail-visual {
    min-height: 390px;
    border-right: 0;
    border-bottom: 1px solid var(--store-border);
  }

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

  .variant-row .checkbox-row {
    justify-content: flex-start;
    height: auto;
    min-height: 44px;
  }

  .variant-row .variant-remove-btn {
    width: 100%;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .variant-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .variant-row .checkbox-row {
    grid-column: 4;
  }

  .variant-row .variant-remove-btn {
    grid-column: 5;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .store-body {
    background: var(--store-bg);
  }

  .store-body .page-shell {
    width: 100%;
    padding:
      calc(10px + env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      calc(104px + env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .store-topbar,
  .store-topbar-actions,
  .store-body .section-head,
  .hero-actions,
  .product-card-actions,
  .product-detail-actions {
    align-items: stretch;
  }

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

  .store-topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .store-topbar-actions {
    justify-content: space-between;
  }

  .hero-utility-actions [data-open-store-panel] {
    display: none;
  }

  .store-body .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .store-body .catalog-toolbar:has(.filter-combo[open]) {
    margin-bottom: 16px;
  }

  .store-body .filter-combo[open] {
    height: auto;
    min-height: 50px;
  }

  .store-body .filter-combo-menu {
    position: static;
    max-height: 220px;
    margin-top: 0;
    border-inline: 0;
    border-bottom: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
  }

  .store-body .store-cart-link {
    width: auto;
  }

  .store-hero {
    gap: 14px;
    padding: 18px;
  }

  .store-body .hero h1 {
    font-size: 2rem;
    max-width: none;
  }

  .store-body .hero-card,
  .store-body .panel {
    padding: 14px;
  }

  .social-links {
    gap: 10px;
  }

  .social-link {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .store-drawer {
    padding: 8px;
  }

  .store-drawer-card {
    width: 100%;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
    padding: 14px 14px calc(132px + env(safe-area-inset-bottom, 0px));
  }

  .checkbox-filter-list {
    max-height: 180px;
  }

  .store-body .section-head,
  .store-body .catalog-toolbar,
  .product-detail-head,
  .product-detail-actions,
  .support-row {
    grid-template-columns: 1fr;
  }

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

  .support-row {
    display: grid;
  }

  .store-body .catalog-toolbar {
    display: grid;
  }

  .payment-panel-summary,
  .payment-panel-actions {
    grid-template-columns: 1fr;
  }

  .tracking-progress {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 0;
  }

  .tracking-progress::before {
    display: none;
  }

  .tracking-progress-step {
    grid-template-columns: 18px 1fr;
    justify-items: start;
    text-align: left;
    gap: 10px;
    padding: 0;
  }

  .tracking-progress-step strong,
  .tracking-progress-step em {
    grid-column: 2;
  }

  .tracking-journey-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-body .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .store-body .filter-row::-webkit-scrollbar {
    display: none;
  }

  .store-body .chip-btn {
    flex: 0 0 auto;
  }

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

  .store-body .product-card {
    border-radius: 18px;
  }

  .store-body .product-visual {
    padding: 5px;
    aspect-ratio: 1 / 1;
  }

  .store-body .product-body {
    gap: 6px;
    padding: 10px 10px 12px;
  }

  .store-body .product-title-row {
    gap: 8px;
  }

  .store-body .product-title-row h3 {
    font-size: 1rem;
    line-height: 1.18;
    min-height: calc(1.18em * 2);
  }

  .store-body .price {
    font-size: 1.08rem;
  }

  .product-brand {
    font-size: 0.68rem;
  }

  .product-rating,
  .product-promo-line {
    display: none;
  }

  .promo-pill {
    display: none;
  }

  .store-body .product-category {
    display: inline-flex;
    max-width: 100%;
    min-height: 22px;
    padding: 3px 8px;
    font-size: 0.62rem;
  }

  .store-body .product-description {
    display: none;
  }

  .store-body .cart-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .store-body .cart-controls {
    width: 100%;
    grid-template-columns: 40px 1fr 40px;
  }

  .store-body .cart-controls button {
    width: 40px;
    height: 40px;
  }

  .store-body .product-card-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin-top: 0;
  }

  .store-body .product-card-actions .secondary-btn,
  .store-body .product-card-actions .primary-btn {
    min-height: 36px;
  }

  .store-body .secondary-btn,
  .store-body .link-btn,
  .store-body .primary-btn {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  .product-modal {
    align-items: end;
    padding: 10px;
  }

  .product-modal-card {
    display: grid;
    grid-template-rows: minmax(250px, 44svh) minmax(0, 1fr);
    width: 100%;
    height: calc(100svh - 20px);
    max-height: calc(100dvh - 20px);
    max-height: calc(100svh - 20px);
    overflow: hidden;
  }

  .product-detail-visual {
    position: relative;
    overflow: hidden;
    min-height: 290px;
    padding: 16px;
    background-size: contain;
    background-position: center 54%;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.72),
      0 16px 34px rgba(47, 81, 65, 0.14),
      0 6px 16px rgba(47, 81, 65, 0.08);
    transform: perspective(900px) rotateX(1deg);
  }

  .product-detail-visual::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 16px;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.9), transparent 38%),
      radial-gradient(circle at 50% 70%, rgba(47, 81, 65, 0.12), transparent 42%);
    mix-blend-mode: soft-light;
  }

  .product-detail-visual::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 12px;
    height: 22px;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(47, 81, 65, 0.28), transparent 70%);
    filter: blur(8px);
    pointer-events: none;
  }

  .product-detail-content {
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 10px;
    padding: 12px 14px 14px;
    -webkit-overflow-scrolling: touch;
  }

  .product-detail-description {
    max-height: clamp(220px, 44svh, 540px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 18px;
    border: 1px solid rgba(74, 102, 86, 0.18);
    border-radius: 14px;
    background: #fbfcfb;
    color: var(--store-text);
    font-size: 0.97rem;
    line-height: 1.58;
  }

  .product-detail-list div:nth-child(3) {
    display: none;
  }

  .product-detail-visual {
    background-size: contain !important;
    background-position: center 50% !important;
  }

  .product-detail-list div {
    gap: 2px;
  }

  .delivery-address-actions {
    flex-wrap: nowrap;
  }

  .delivery-map-btn {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
  }

  .location-picker-modal {
    padding: 10px;
    align-items: end;
  }

  .location-picker-card {
    width: 100%;
    max-height: calc(100svh - 20px);
    padding: 14px;
    border-radius: 18px;
  }

  .location-picker-map-shell {
    padding: 10px;
  }

  .location-picker-map {
    min-height: 240px;
  }

  .location-picker-search {
    grid-template-columns: 1fr;
  }

  .location-picker-actions {
    grid-template-columns: 1fr;
  }

  .store-body .checkout-form > .primary-btn {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    box-shadow: 0 14px 28px rgba(47, 81, 65, 0.18);
  }

  .store-info-grid {
    gap: 14px;
  }

  .track-otp-card,
  .my-order-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .store-body {
    --mobile-card-radius: 14px;
  }

  .store-body .page-shell {
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .store-hero {
    padding: 14px;
    border-radius: 18px;
  }

  .hero-top-row {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
  }

  .hero-brand-row {
    justify-content: center;
  }

  .hero-utility-stack {
    width: 100%;
    justify-items: center;
    margin-top: 0;
  }

  .hero-brand-row {
    gap: 10px;
    align-items: center;
  }

  .hero-brand-card {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .store-body .hero h1 {
    font-size: 1.55rem;
    line-height: 1.06;
  }

  .hero-copy .eyebrow,
  .store-body .section-head p,
  .promo-banner p {
    font-size: 0.82rem;
    line-height: 1.42;
  }

  .language-switch {
    width: 100%;
    max-width: 260px;
    justify-self: center;
    border-radius: 12px;
  }

  .language-chip {
    flex: 1 1 0;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.76rem;
  }

  .promo-banner {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
    gap: 12px;
    overflow: hidden;
  }

  .promo-banner h2 {
    font-size: 1rem;
  }

  .promo-banner .primary-btn,
  .promo-banner .secondary-btn,
  .promo-banner .link-btn {
    width: 100%;
    min-height: 44px;
  }

  .promo-ticker {
    border-radius: 10px;
    max-width: 100%;
    margin-top: 9px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  }

  .promo-ticker-track {
    gap: 8px;
    padding: 7px 6px;
    font-size: 0.68rem;
    animation-duration: 24s;
  }

  .promo-ticker-group {
    gap: 8px;
  }

  .promo-ticker-note {
    min-height: 22px;
    padding: 3px 8px;
    max-width: 76vw;
  }

  .store-body .catalog-toolbar,
  .quick-actions-panel,
  .filter-group {
    gap: 10px;
  }

  .store-body .chip-btn {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .store-body .product-grid {
    gap: 8px;
  }

  .store-body .product-card {
    border-radius: var(--mobile-card-radius);
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.07);
    contain-intrinsic-size: 360px 520px;
  }

  .store-body .product-card::before {
    opacity: 0.18;
  }

  .store-body .product-card:hover,
  .store-body .product-card:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.09);
  }

  .store-body .product-visual {
    padding: 4px;
    aspect-ratio: 1 / 0.94;
  }

  .stock-pill {
    top: 7px;
    right: 7px;
    max-width: calc(100% - 14px);
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
  }

  .store-body .product-body {
    gap: 5px;
    padding: 8px 8px 9px;
  }

  .product-brand {
    min-height: 1.15em;
    font-size: 0.62rem;
    line-height: 1.15;
  }

  .store-body .product-title-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .store-body .product-title-row h3 {
    min-height: calc(1.2em * 2);
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .price-stack {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    gap: 6px;
  }

  .store-body .price {
    font-size: 0.98rem;
  }

  .store-body .compare-price {
    font-size: 0.68rem;
  }

  .store-body .promo-percent {
    min-height: 19px;
    padding: 2px 6px;
    font-size: 0.58rem;
  }

  .store-body .product-category {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .store-body .product-card-actions {
    grid-template-columns: minmax(0, 1fr) minmax(38px, auto);
    gap: 5px;
  }

  .store-body .product-card-actions .secondary-btn,
  .store-body .product-card-actions .primary-btn {
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .store-body .secondary-btn,
  .store-body .link-btn,
  .store-body .primary-btn {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 3px;
    padding: 7px;
    border-radius: 18px;
  }

  .bottom-nav-item {
    gap: 2px;
    padding: 6px 3px 5px;
    border-radius: 12px;
  }

  .bottom-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .bottom-nav-item span {
    font-size: 0.64rem;
    line-height: 1.05;
  }

  .store-drawer-card {
    height: calc(100svh - 12px);
    max-height: calc(100svh - 12px);
    padding: 12px 12px calc(104px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }

  .store-drawer-head {
    gap: 10px;
    padding-bottom: 8px;
  }

  .store-drawer-head h2 {
    font-size: 1.06rem;
    line-height: 1.14;
  }

  .store-body .panel {
    padding: 12px;
    border-radius: 12px;
  }

  .store-body .checkout-form {
    gap: 10px;
  }

  .store-body .checkout-form input,
  .store-body .checkout-form textarea,
  .location-picker-search input,
  .track-otp-card input {
    min-height: 42px;
    border-radius: 9px;
    padding: 10px 11px;
    font-size: 0.9rem;
  }

  .store-body .checkout-form textarea {
    min-height: 104px;
  }

  .delivery-address-actions {
    gap: 7px;
  }

  .delivery-map-btn {
    min-height: 40px;
  }

  .store-body .cart-row {
    padding: 10px;
    border-radius: 12px;
  }

  .cart-item-main {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .cart-thumb {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .store-body .cart-row strong {
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .store-body .cart-row p {
    font-size: 0.78rem;
  }

  .store-body .cart-controls {
    grid-template-columns: 36px 1fr 36px;
  }

  .store-body .cart-controls button {
    width: 36px;
    height: 36px;
  }

  .product-modal {
    padding: 8px;
  }

  .product-modal-card {
    grid-template-rows: minmax(210px, 36svh) minmax(0, 1fr);
    height: calc(100svh - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 14px;
  }

  .product-modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .product-detail-visual {
    min-height: 220px;
    padding: 12px;
  }

  .product-detail-content {
    gap: 9px;
    padding: 11px 12px 12px;
  }

  .product-detail-head h2 {
    font-size: 1.18rem;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .product-detail-head strong {
    font-size: 1.02rem;
  }

  .product-detail-description {
    max-height: clamp(260px, 48svh, 560px);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .product-detail-list {
    gap: 8px;
  }

  .product-detail-list div {
    padding: 9px 10px;
  }

  .product-detail-actions {
    gap: 8px;
  }

  .location-picker-card {
    gap: 11px;
    padding: 12px;
    border-radius: 14px;
  }

  .location-picker-head h2 {
    font-size: 1.14rem;
  }

  .location-picker-head p,
  .location-picker-map-head p,
  .location-picker-selection p {
    font-size: 0.82rem;
  }

  .location-picker-map-shell {
    border-radius: 12px;
  }

  .location-picker-map {
    min-height: 270px;
    border-radius: 10px;
  }

  .payment-panel-shell,
  .tracking-card,
  .track-lookup-card,
  .track-otp-card {
    border-radius: 12px;
  }

  .payment-panel-head {
    display: grid;
    gap: 6px;
  }

  .payment-panel-amount {
    justify-self: start;
  }

  .track-result-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tracking-card {
    padding: 12px;
  }

  .tracking-card-head {
    display: grid;
    gap: 8px;
  }

  .tracking-card-status {
    justify-items: start;
    text-align: left;
  }

  .tracking-address-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tracking-address-actions .secondary-btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .store-body .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .store-body .product-body {
    padding: 7px;
  }

  .store-body .product-title-row h3 {
    font-size: 0.8rem;
  }

  .store-body .price {
    font-size: 0.9rem;
  }

  .store-body .product-card-actions .secondary-btn,
  .store-body .product-card-actions .primary-btn {
    min-height: 32px;
    padding: 5px 6px;
    font-size: 0.68rem;
  }

  .bottom-nav-item span {
    font-size: 0.58rem;
  }
}

/* Mobile storefront polish using Tailwind-style spacing, radius, and type scales. */
@media (max-width: 640px) {
  .store-drawer {
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  }

  .store-drawer-card {
    width: 100%;
    height: calc(100svh - 22px);
    max-height: calc(100svh - 22px);
    gap: 12px;
    padding: 14px 12px calc(96px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
  }

  .store-drawer-head {
    position: sticky;
    top: -14px;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 10px;
    align-items: start;
    margin: -2px -2px 0;
    padding: 4px 2px 10px;
    background: linear-gradient(180deg, #ffffff 82%, rgba(255, 255, 255, 0));
  }

  .store-drawer-head .eyebrow {
    color: #b4455d;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.1;
  }

  .store-drawer-head h2 {
    margin-top: 3px;
    font-size: 1.2rem;
    line-height: 1.1;
  }

  .store-drawer-head [data-close-store-panel] {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
    font-size: 0;
  }

  .store-drawer-head [data-close-store-panel]::before {
    content: "x";
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
  }

  .store-body .panel {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  .store-body .section-head.compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .store-body .section-head.compact h2 {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .store-body .section-head.compact p {
    max-width: 34ch;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .store-body .cart-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
    border: 1px solid #dfe7e2;
    border-radius: 14px;
    background: #fbfdfc;
    box-shadow: none;
  }

  .cart-item-main {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .cart-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .store-body .cart-row strong {
    font-size: 0.96rem;
    line-height: 1.18;
  }

  .store-body .cart-row p {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .store-body .cart-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: #f4f4f3;
  }

  .store-body .cart-controls button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border-color: #d1d5db;
    background: #ffffff;
    font-size: 1rem;
  }

  .cart-panel .summary-list {
    bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    margin-top: 8px;
    padding: 10px 0 6px;
  }

  .cart-panel .panel-step-actions {
    bottom: env(safe-area-inset-bottom, 0px);
    margin-top: 0;
    padding: 6px 0 0;
  }

  .store-body .cart-controls span {
    display: grid;
    place-items: center;
    min-width: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 750;
  }

  .summary-list {
    gap: 7px;
  }

  .summary-row,
  .store-body .cart-total {
    font-size: 1rem;
  }

  .store-body .cart-total strong {
    font-size: 1.14rem;
  }

  .panel-step-actions {
    margin-top: 10px;
  }

  .track-lookup-card {
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #fbfdfc;
  }

  .track-lookup-card label {
    gap: 6px;
  }

  .track-lookup-card label span,
  .store-body .checkout-form label span {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.2;
  }

  .store-body .checkout-form input,
  .store-body .checkout-form textarea,
  .store-body .checkout-form select,
  .track-lookup-card input {
    min-height: 46px;
    border-color: #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .track-result.empty-state {
    min-height: auto;
    padding: 14px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .tracking-card {
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
  }

  .product-modal {
    display: flex;
    align-items: flex-end;
    padding: 8px;
  }

  .product-modal-card {
    width: 100%;
    height: min(92svh, 820px);
    max-height: min(92svh, 820px);
    grid-template-rows: minmax(260px, 42svh) minmax(0, 1fr);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.3);
  }

  .product-detail-visual {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    background-size: cover !important;
    background-position: center !important;
  }

  .product-detail-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
  }

  .product-detail-brand {
    font-size: 0.76rem;
  }

  .product-detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
  }

  .product-detail-head h2 {
    font-size: 1.2rem;
    line-height: 1.14;
    letter-spacing: 0;
  }

  .product-detail-price-stack {
    gap: 3px;
    min-width: 76px;
  }

  .product-detail-price-stack strong,
  .product-detail-head strong {
    font-size: 1.06rem;
    line-height: 1.1;
  }

  .product-detail-price-stack del {
    font-size: 0.82rem;
  }

  .product-detail-description {
    flex: 0 0 auto;
    max-height: none;
    min-height: 96px;
    overflow: visible;
    padding: 12px 14px;
    border-color: #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.58;
    white-space: normal;
    overflow-wrap: anywhere;
  }

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

  .product-detail-list div {
    min-width: 0;
    padding: 11px;
    border-color: #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
  }

  .product-detail-list dt {
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .product-detail-list dd {
    font-size: 0.98rem;
    line-height: 1.18;
  }

  .variant-option {
    min-height: 48px;
    border-radius: 14px;
    gap: 9px;
  }

  .variant-option-price strong {
    font-size: 0.88rem;
  }

  .variant-option-price del {
    font-size: 0.7rem;
  }

  .product-detail-quantity {
    gap: 8px;
    margin-top: 4px;
  }

  .quantity-stepper {
    grid-template-columns: 44px minmax(70px, 86px) 44px;
  }

  .quantity-stepper button,
  .quantity-stepper strong {
    min-height: 44px;
    border-radius: 12px;
  }

  .product-detail-actions {
    position: sticky;
    bottom: -14px;
    z-index: 2;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 2px -14px -14px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .product-detail-actions .primary-btn,
  .product-detail-actions .secondary-btn {
    min-height: 46px;
    border-radius: 14px;
    font-size: 0.92rem;
  }

  .bottom-nav {
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  }

  .bottom-nav-item.active {
    background: #ecfdf5;
  }
}

/* Tailwind-inspired admin dashboard refresh */
.admin-body {
  --admin-bg: #f4f6fb;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f8f9fd;
  --admin-border: #e5e7f0;
  --admin-text: #172033;
  --admin-muted: #687386;
  --admin-primary: #6c63ff;
  --admin-primary-dark: #5148de;
  --admin-blue: #64a8ff;
  --admin-green: #34c782;
  --admin-amber: #f5a524;
  --admin-rose: #ef6f83;
  --admin-shadow: 0 18px 46px rgba(27, 38, 74, 0.08);
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-body .admin-console {
  width: min(1380px, calc(100vw - 36px));
  padding: 22px 0 42px;
}

.admin-topbar {
  min-height: 58px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(27, 38, 74, 0.07);
  backdrop-filter: blur(16px);
}

.brand-mark,
.admin-sidebar-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--admin-primary), #8d82ff);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(108, 99, 255, 0.22);
}

.admin-brand strong,
.admin-sidebar-brand strong {
  color: var(--admin-text);
  font-weight: 800;
}

.admin-brand span,
.admin-sidebar-brand span,
.admin-body .section-head p,
.admin-body .dashboard-item-meta,
.admin-body .order-date {
  color: var(--admin-muted);
}

.admin-pill {
  min-height: 32px;
  border-radius: 8px;
  background: #eef7f2;
  border-color: #cce9dc;
  color: #15845b;
  font-size: 0.82rem;
}

.admin-role-pill {
  background: #f1f2ff;
  border-color: #dedcff;
  color: var(--admin-primary-dark);
}

.admin-body .status-banner {
  min-height: 38px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  box-shadow: 0 10px 28px rgba(27, 38, 74, 0.05);
}

#admin-app.admin-workspace:not(.hidden) {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#admin-app.admin-workspace > .tab-content:not(.hidden) {
  min-width: 0;
}

.admin-body .admin-tabs {
  position: sticky;
  top: 88px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 112px);
  margin: 0;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-sidebar-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand span {
  display: block;
  min-width: 0;
}

.admin-sidebar-brand strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.admin-sidebar-brand span {
  margin-top: 2px;
  font-size: 0.78rem;
}

.admin-nav-label {
  display: block;
  margin-top: 6px;
  color: #9aa3b4;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-body .admin-tab-list {
  display: grid;
  gap: 6px;
  width: 100%;
}

.admin-body .tab-btn {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  color: #4c586d;
  text-align: left;
}

.tab-glyph {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f3fa;
  color: #7b8497;
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-body .tab-btn.active {
  background: #f3f2ff;
  color: var(--admin-primary-dark);
  box-shadow: none;
}

.admin-body .tab-btn.active .tab-glyph {
  background: var(--admin-primary);
  color: #ffffff;
}

.admin-sidebar-card {
  margin-top: auto;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7f8ff, #eef7ff);
  border: 1px solid #e1e5ff;
}

.admin-sidebar-card span {
  display: block;
  color: #7d8798;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-sidebar-card strong {
  display: block;
  margin-top: 5px;
  color: var(--admin-text);
  font-size: 0.92rem;
}

.admin-sidebar-card p {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: 0.78rem;
}

.page-title-row,
.admin-body .action-header {
  margin: 0 0 14px;
  align-items: center;
}

.page-title-row h1 {
  font-size: 1.55rem;
  font-weight: 850;
}

.admin-body .section-head h2,
.admin-body .section-head h3 {
  color: var(--admin-text);
  font-weight: 820;
}

.admin-body .panel,
.admin-body .admin-product-card,
.admin-body .order-card,
.admin-body .stat-card,
.admin-body .dashboard-item,
.admin-body .filter-bar,
.admin-body .bulk-actions-toolbar,
.admin-body .report-card,
.admin-body .storefront-editor-card,
.admin-login-panel,
.admin-body .compare-card {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: 0 10px 30px rgba(27, 38, 74, 0.05);
}

.admin-body .panel {
  padding: 18px;
}

.report-filter-bar,
.admin-body .filter-bar {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: 0 10px 28px rgba(27, 38, 74, 0.04);
}

.report-filter-bar {
  grid-template-columns: repeat(2, minmax(190px, 220px)) auto;
  margin-bottom: 14px;
  padding: 12px;
}

.dashboard-date-filter {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(300px, 1.1fr) minmax(340px, 1.25fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
}

.date-filter-query {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #d9deeb;
  border-radius: 8px;
  background: #fbfcff;
}

.date-filter-label {
  color: #8a94a6;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-filter-summary {
  min-width: 0;
  color: var(--admin-text);
  font-size: 0.9rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-range-group {
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.quick-range-group::-webkit-scrollbar {
  display: none;
}

.quick-range-btn {
  min-height: 38px;
  flex: 0 0 auto;
  border: 1px solid #d9deeb;
  border-radius: 8px;
  background: #ffffff;
  color: #4c586d;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.quick-range-btn:hover {
  border-color: #c9d0df;
  background: #f7f8fc;
}

.quick-range-btn.active {
  border-color: var(--admin-primary);
  background: #f3f2ff;
  color: var(--admin-primary-dark);
  box-shadow: inset 0 0 0 1px rgba(108, 99, 255, 0.16);
}

.absolute-date-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.absolute-date-grid label {
  display: grid;
  gap: 5px;
}

.absolute-date-grid input {
  width: 100%;
}

.date-filter-actions {
  align-self: end;
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.admin-body input,
.admin-body textarea,
.admin-body select,
.admin-body .status-select {
  border-color: #d9deeb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--admin-text);
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
  border-color: var(--admin-primary);
  outline: 2px solid rgba(108, 99, 255, 0.18);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.08);
}

.admin-body .primary-btn {
  border: 1px solid #171d2d;
  border-radius: 8px;
  background: #171d2d;
  color: #ffffff;
}

.admin-body .secondary-btn,
.admin-body .link-btn {
  border: 1px solid #d9deeb;
  border-radius: 8px;
  background: #ffffff;
  color: #30394c;
}

.admin-body .primary-btn:hover {
  border-color: #0e1423;
  background: #0e1423;
  box-shadow: 0 12px 24px rgba(23, 29, 45, 0.18);
}

.admin-body .secondary-btn:hover,
.admin-body .link-btn:hover {
  border-color: #c9d0df;
  background: #f7f8fc;
}

.admin-body .dashboard-stats-grid {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-body .stat-card {
  --accent: var(--admin-primary);
  min-height: 142px;
  position: relative;
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 16px;
  box-shadow: inset 0 3px 0 var(--accent), 0 12px 30px rgba(27, 38, 74, 0.05);
}

.admin-body .stat-card::before {
  display: none;
}

.admin-body .stat-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -42px auto;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-body .stat-card .stat-card-head span {
  color: var(--admin-muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-card-head em {
  border-radius: 999px;
  padding: 3px 7px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}

.admin-body .stat-card strong {
  color: var(--admin-text);
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 850;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.stat-sparkline {
  position: relative;
  z-index: 1;
  height: 42px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  margin-top: auto;
}

.stat-sparkline i {
  width: 100%;
  min-width: 8px;
  height: var(--h);
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, white), color-mix(in srgb, var(--accent) 42%, white));
  opacity: 0.9;
}

.stat-sparkline.blue,
.stat-orders-card {
  --accent: var(--admin-blue);
}

.stat-sparkline.amber,
.stat-pending-card {
  --accent: var(--admin-amber);
}

.stat-sparkline.violet,
.stat-processing-card {
  --accent: var(--admin-primary);
}

.stat-sparkline.teal,
.stat-products-card {
  --accent: var(--admin-green);
}

.stat-sparkline.rose,
.stat-stock-card {
  --accent: var(--admin-rose);
}

.stat-sparkline.slate,
.stat-payment-card {
  --accent: #7d8aa1;
}

.admin-body .dashboard-secondary-grid {
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.45fr);
  gap: 14px;
}

.admin-body .dashboard-list {
  gap: 10px;
}

.admin-body .dashboard-item {
  min-height: 58px;
  border-color: #eef1f7;
  background: var(--admin-surface-soft);
}

.admin-body .dashboard-item:hover {
  border-color: #dce2ee;
  background: #ffffff;
}

.stock-count {
  color: var(--admin-rose);
}

.report-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.report-card {
  min-height: 280px;
  padding: 16px;
}

.report-card:nth-child(1),
.report-card:nth-child(2),
.wide-report-card,
.report-card:nth-child(4) {
  grid-column: span 2;
}

.chart-shell {
  min-height: 214px;
}

.donut-layout {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
}

.donut-chart {
  width: 150px;
  height: 150px;
}

.donut-chart::after {
  inset: 31px;
  border-color: #eef1f7;
}

.legend-row i {
  border-radius: 999px;
}

.bar-row {
  grid-template-columns: 92px minmax(130px, 1fr) 110px;
}

.bar-track {
  height: 10px;
  background: #edf1f8;
}

.bar-track i {
  background: linear-gradient(90deg, var(--admin-primary), var(--admin-blue));
}

.report-list-row {
  border-color: #eef1f7;
  background: var(--admin-surface-soft);
}

.report-list-row > span {
  background: #f1f2ff;
  color: var(--admin-primary-dark);
}

.compare-panel {
  margin-top: 14px;
}

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

.compare-card {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.trend-positive {
  color: #15845b;
}

.trend-negative {
  color: #c24136;
}

.trend-neutral {
  color: var(--admin-muted);
}

.tab-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef1f8;
  color: #5c667a;
}

.admin-body .tab-btn.active .tab-count {
  background: #ffffff;
  color: var(--admin-primary-dark);
}

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

.admin-body .admin-product-card.stock-ok,
.admin-body .order-card.is-paid:not(.needs-action) {
  border-left-color: var(--admin-green);
}

.admin-body .admin-product-card.stock-low,
.admin-body .order-card.needs-action {
  border-left-color: var(--admin-amber);
}

.admin-body .admin-product-card.stock-out {
  border-left-color: var(--admin-rose);
}

@media (max-width: 1160px) {
  #admin-app.admin-workspace:not(.hidden) {
    grid-template-columns: 1fr;
  }

  .admin-body .admin-tabs {
    position: static;
    min-height: 0;
  }

  .admin-body .admin-tab-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .admin-body .admin-tab-list::-webkit-scrollbar {
    display: none;
  }

  .admin-body .tab-btn {
    width: auto;
    min-width: 158px;
  }

  .admin-sidebar-card {
    display: none;
  }

  .admin-body .dashboard-stats-grid,
  .comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-date-filter {
    grid-template-columns: 1fr;
  }

  .date-filter-query {
    min-height: 48px;
  }

  .quick-range-group {
    margin: 0 -2px;
    padding-bottom: 4px;
  }
}

@media (max-width: 760px) {
  .admin-body .admin-console {
    width: min(100% - 18px, 1380px);
    padding-top: 10px;
  }

  .admin-topbar,
  .page-title-row,
  .admin-body .action-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-body .admin-topbar-actions,
  .admin-topbar-status,
  .admin-topbar-controls,
  .section-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-body .dashboard-stats-grid,
  .admin-body .dashboard-secondary-grid,
  .report-grid,
  .comparison-grid,
  .report-filter-bar,
  .admin-body .filter-bar,
  #tab-orders .filter-bar {
    grid-template-columns: 1fr;
  }

  .report-card:nth-child(1),
  .report-card:nth-child(2),
  .wide-report-card,
  .report-card:nth-child(4) {
    grid-column: auto;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

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

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

  .date-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .date-filter-actions > button {
    width: 100%;
    min-height: 44px;
  }

  .quick-range-btn {
    min-height: 42px;
    padding: 9px 12px;
  }
}

/* Mobile order management: keep high-frequency controls compact and scannable. */
@media (max-width: 640px) {
  body.admin-body #tab-orders > .panel {
    padding: 16px 12px;
  }

  body.admin-body #tab-orders .action-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
  }

  body.admin-body #tab-orders .action-header .section-head {
    min-width: 0;
  }

  body.admin-body #tab-orders .action-header .section-head h2 {
    font-size: clamp(1.65rem, 8vw, 2rem);
    line-height: 1.05;
  }

  body.admin-body #tab-orders .action-header .section-head p {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
  }

  body.admin-body #tab-orders .section-actions {
    width: auto;
  }

  body.admin-body #tab-orders .section-actions > #refresh-orders-btn {
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 13px;
  }

  body.admin-body #tab-orders .filter-bar {
    grid-template-columns: 1fr !important;
    gap: 12px 10px;
    padding: 14px;
    border-radius: 14px;
  }

  body.admin-body #tab-orders .search-group,
  body.admin-body #tab-orders .filter-group:not(.order-date-filter),
  body.admin-body #tab-orders .filter-actions {
    grid-column: 1 / -1;
  }

  body.admin-body #tab-orders .order-date-filter-from {
    grid-column: 1;
  }

  body.admin-body #tab-orders .order-date-filter-to {
    grid-column: 2;
  }

  body.admin-body #tab-orders .filter-bar label {
    gap: 6px;
  }

  body.admin-body #tab-orders .filter-bar label > span:not(.checkbox-row span) {
    font-size: 0.8rem;
  }

  body.admin-body #tab-orders .filter-bar input:not([type="checkbox"]),
  body.admin-body #tab-orders .filter-bar select {
    height: 48px;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 16px;
  }

  body.admin-body #tab-orders .select-all-row {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
  }

  body.admin-body #tab-orders .select-all-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  body.admin-body #tab-orders .filter-actions > #clear-order-filters-btn {
    min-height: 42px;
  }

  body.admin-body #tab-orders .list-summary-row {
    gap: 10px;
    margin-top: 14px;
  }

  body.admin-body #tab-orders #order-result-summary {
    font-size: 0.9rem;
  }

  body.admin-body #tab-orders .quick-filter-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.admin-body #tab-orders .quick-filter-group .secondary-btn {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  body.admin-body #tab-orders .admin-orders-list .empty-state {
    min-height: 150px;
    padding: 28px 16px;
  }
}

@media (max-width: 390px) {
  body.admin-body #tab-orders .action-header {
    grid-template-columns: 1fr;
  }

  body.admin-body #tab-orders .section-actions,
  body.admin-body #tab-orders .section-actions > #refresh-orders-btn {
    width: 100%;
  }
}

/* Quiet admin polish: reduce visual noise and improve mobile scanning */
.admin-body {
  --admin-bg: #f6f7fb;
  --admin-shadow: 0 10px 28px rgba(27, 38, 74, 0.06);
}

.admin-topbar {
  min-height: 56px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 38, 74, 0.06);
}

.brand-mark,
.admin-sidebar-mark {
  box-shadow: none;
}

.admin-body .status-banner {
  min-height: 30px;
  margin: -6px 0 18px;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #4c586d;
  font-size: 0.84rem;
}

.admin-body .status-banner::before {
  width: 8px;
  height: 8px;
}

.admin-body .status-banner.is-success,
.admin-body .status-banner.is-info,
.admin-body .status-banner.is-loading {
  background: transparent;
  border-color: transparent;
}

.admin-body .admin-tabs,
.admin-body .panel,
.admin-body .admin-product-card,
.admin-body .order-card,
.admin-body .stat-card,
.admin-body .dashboard-item,
.admin-body .filter-bar,
.admin-body .bulk-actions-toolbar,
.admin-body .report-card,
.admin-body .storefront-editor-card,
.admin-login-panel,
.admin-body .compare-card {
  box-shadow: 0 8px 22px rgba(27, 38, 74, 0.045);
}

.admin-body .admin-tabs {
  gap: 12px;
}

.admin-body .tab-btn {
  min-height: 40px;
}

.admin-sidebar-card {
  background: #f7f8fc;
  border-color: #e6eaf3;
}

.page-title-row {
  margin-bottom: 22px;
}

.dashboard-date-filter {
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.45fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.dashboard-date-filter .absolute-date-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
  border-top: 1px solid #eef1f7;
}

.date-filter-query {
  min-height: 46px;
  background: #ffffff;
}

.quick-range-group {
  padding: 0;
}

.quick-range-btn {
  min-height: 36px;
  padding: 7px 10px;
  background: #f8f9fd;
}

.date-filter-actions {
  justify-content: flex-end;
}

.date-filter-actions .primary-btn.compact,
.date-filter-actions .secondary-btn.compact {
  min-height: 40px;
}

.admin-body .dashboard-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.admin-body .stat-card {
  min-height: 118px;
  align-content: start;
  padding: 16px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 8px 22px rgba(27, 38, 74, 0.045);
}

.admin-body .stat-card::after {
  display: none;
}

.stat-sparkline {
  display: none;
}

.stat-card-head em {
  background: #f5f6fb;
  color: #5c667a;
}

.admin-body .stat-card strong {
  margin-top: 8px;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
}

.admin-body .dashboard-secondary-grid,
.report-grid,
.comparison-grid {
  gap: 16px;
}

.admin-body .dashboard-item {
  background: #ffffff;
}

#tab-storefront .panel {
  max-width: 1180px;
}

#tab-storefront .storefront-editor-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  align-items: start;
  gap: 16px;
}

#tab-storefront .storefront-editor-card {
  padding: 18px;
  box-shadow: 0 8px 22px rgba(27, 38, 74, 0.045);
}

#tab-storefront .editor-header {
  align-items: flex-start;
  gap: 12px;
}

#tab-storefront .editor-summary {
  background: #fbfcff;
  border-color: #edf0f7;
}

#tab-storefront .editor-body {
  gap: 10px;
}

#tab-storefront .editor-body label span,
#tab-storefront .checkbox-row span {
  font-size: 0.82rem;
}

#tab-storefront .editor-body input,
#tab-storefront .editor-body textarea {
  min-height: 40px;
  font-size: 0.88rem;
}

#tab-storefront .editor-body textarea {
  min-height: 96px;
  resize: vertical;
}

#tab-storefront .form-actions {
  padding-top: 12px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .dashboard-date-filter {
    grid-template-columns: 1fr;
  }

  .dashboard-date-filter .absolute-date-grid {
    grid-column: auto;
  }

  #tab-storefront .storefront-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-body .admin-console {
    width: min(100% - 14px, 1380px);
  }

  .admin-topbar {
    gap: 10px;
  }

  .admin-topbar-status,
  .admin-topbar-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .admin-topbar-controls > *,
  .admin-topbar-status > * {
    width: 100%;
    justify-content: center;
  }

  .page-title-row {
    margin-bottom: 14px;
  }

  .dashboard-date-filter .absolute-date-grid,
  .date-filter-actions {
    grid-template-columns: 1fr;
  }

  .quick-range-group {
    margin-right: -8px;
    padding-bottom: 3px;
  }

  .quick-range-btn {
    min-width: 74px;
  }

  .admin-body .stat-card {
    min-height: 104px;
  }
}

/* Single-trigger date filter and overlay storefront editing */
.dashboard-date-filter {
  position: relative;
  display: block;
  width: min(100%, 420px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.date-filter-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid #d9deeb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--admin-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(27, 38, 74, 0.045);
}

.date-filter-trigger:hover,
.dashboard-date-filter.is-open .date-filter-trigger {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.date-filter-trigger > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.date-filter-caret {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #f4f6fb;
  color: #687386;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-date-filter.is-open .date-filter-caret {
  transform: rotate(180deg);
}

.date-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 45;
  width: min(640px, calc(100vw - 34px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9deeb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(27, 38, 74, 0.16);
}

.date-filter-popover .quick-range-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}

.date-filter-popover .quick-range-btn {
  min-width: 0;
  min-height: 40px;
}

.date-filter-popover .absolute-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #eef1f7;
}

.date-filter-popover .date-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

#tab-storefront .storefront-editor-card .editor-body {
  display: none !important;
}

#tab-storefront .storefront-editor-card {
  min-height: 0;
}

.storefront-overlay-form {
  gap: 14px;
}

.storefront-overlay-form .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 6px -20px -20px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #eef1f7;
  backdrop-filter: blur(10px);
}

.storefront-overlay-form .muted.compact-empty {
  min-height: 0;
  padding: 10px;
}

@media (max-width: 760px) {
  .dashboard-date-filter {
    width: 100%;
  }

  .date-filter-popover {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(78vh, 560px);
    overflow: auto;
  }

  .date-filter-popover .quick-range-group,
  .date-filter-popover .absolute-date-grid,
  .date-filter-popover .date-filter-actions {
    grid-template-columns: 1fr;
  }

  .date-filter-popover .date-filter-actions {
    display: grid;
  }

  .storefront-overlay-form .form-actions {
    margin-inline: -14px;
    padding-inline: 14px;
  }
}

/* Full-width manager dashboard polish */
.admin-body .admin-console {
  width: calc(100vw - 32px);
  max-width: none;
  padding: 18px 0 42px;
}

.admin-body .admin-grid {
  gap: 18px;
}

#admin-app.admin-workspace:not(.hidden) {
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 20px;
}

#tab-dashboard {
  min-width: 0;
}

.page-title-row {
  margin: 2px 0 14px;
}

.dashboard-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.dashboard-toolbar .dashboard-date-filter {
  flex: 0 1 460px;
  width: min(100%, 460px);
}

.dashboard-export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.dashboard-export-actions .secondary-btn.compact {
  min-height: 42px;
  min-width: 118px;
  background: #ffffff;
}

.admin-body .dashboard-stats-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}

.admin-body .stat-card {
  min-height: 112px;
  padding: 15px 16px;
}

.admin-body .stat-card strong {
  margin-top: 6px;
}

.admin-body .dashboard-secondary-grid {
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.35fr);
  gap: 16px;
}

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

.admin-body .panel,
.admin-body .report-card,
.admin-body .compare-card {
  box-shadow: 0 8px 22px rgba(27, 38, 74, 0.04);
}

@media (max-width: 1280px) {
  .admin-body .dashboard-stats-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

  .admin-body .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .admin-body .admin-console {
    width: calc(100vw - 20px);
  }

  #admin-app.admin-workspace:not(.hidden) {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar {
    flex-direction: column;
  }

  .dashboard-toolbar .dashboard-date-filter,
  .dashboard-export-actions {
    width: 100%;
  }

  .dashboard-export-actions {
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .admin-body .admin-console {
    width: calc(100vw - 12px);
    padding-top: 8px;
  }

  .admin-body .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-export-actions .secondary-btn.compact {
    width: 100%;
    min-width: 0;
  }
}

/* Sidebar cleanup: remove unused bottom card spacing */
.admin-body .admin-tabs {
  min-height: auto;
  align-self: start;
}

.admin-sidebar-card {
  display: none !important;
}

.admin-body .admin-tab-list {
  margin-top: 2px;
}

@media (min-width: 981px) {
  .admin-body .admin-tabs {
    max-height: calc(100vh - 112px);
  }
}

/* Clean manager UI pass */
.admin-body {
  --manager-bg: #f6f7f9;
  --manager-surface: #ffffff;
  --manager-border: #e5e7eb;
  --manager-border-strong: #d7dce3;
  --manager-text: #111827;
  --manager-muted: #667085;
  --manager-soft: #f2f4f7;
  --manager-accent: #2563eb;
  --manager-accent-soft: #eff6ff;
  --manager-success: #087443;
  background: var(--manager-bg);
  color: var(--manager-text);
}

.admin-body .admin-console {
  width: 100%;
  padding: 0;
}

.admin-body .admin-grid {
  gap: 0;
}

.admin-topbar {
  top: 0;
  min-height: 64px;
  margin: 0;
  padding: 10px 24px;
  border: 0;
  border-bottom: 1px solid var(--manager-border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

.brand-mark,
.admin-sidebar-mark {
  background: #111827;
  box-shadow: none;
}

.admin-brand strong,
.admin-sidebar-brand strong,
.page-title-row h1,
.admin-body .section-head h2,
.admin-body .section-head h3 {
  color: var(--manager-text);
}

.admin-brand span,
.admin-sidebar-brand span,
.admin-body .section-head p,
.admin-body .dashboard-item-meta,
.admin-body .order-date {
  color: var(--manager-muted);
}

.admin-pill {
  min-height: 32px;
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--manager-success);
}

.admin-role-pill {
  border-color: #dbeafe;
  background: var(--manager-accent-soft);
  color: #1d4ed8;
}

.admin-body .status-banner {
  min-height: 32px;
  margin: 0;
  padding: 6px 24px;
  border: 0;
  border-bottom: 1px solid var(--manager-border);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

#admin-app.admin-workspace:not(.hidden) {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.admin-body .admin-tabs {
  top: 97px;
  min-height: calc(100vh - 97px);
  max-height: none;
  padding: 20px 16px;
  border: 0;
  border-right: 1px solid var(--manager-border);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.admin-sidebar-brand {
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--manager-border);
}

.admin-nav-label {
  margin: 8px 4px 0;
  color: #98a2b3;
}

.admin-body .admin-tab-list {
  gap: 4px;
  margin-top: 0;
}

.admin-body .tab-btn {
  min-height: 40px;
  border-radius: 6px;
  color: #475467;
  background: transparent;
  box-shadow: none;
}

.tab-glyph {
  background: var(--manager-soft);
  color: #667085;
}

.admin-body .tab-btn.active {
  background: var(--manager-accent-soft);
  color: #1d4ed8;
  box-shadow: none;
}

.admin-body .tab-btn.active .tab-glyph {
  background: var(--manager-accent);
}

.tab-count {
  background: var(--manager-soft);
  color: #475467;
}

#admin-app.admin-workspace > .tab-content:not(.hidden) {
  padding: 24px;
}

.page-title-row {
  margin: 0 0 14px;
}

.page-title-row h1 {
  font-size: 1.45rem;
}

.dashboard-toolbar {
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--manager-border);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-toolbar .dashboard-date-filter {
  width: min(100%, 420px);
}

.date-filter-trigger {
  min-height: 42px;
  border-color: var(--manager-border-strong);
  box-shadow: none;
}

.date-filter-trigger:hover,
.dashboard-date-filter.is-open .date-filter-trigger {
  border-color: var(--manager-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.date-filter-caret {
  background: var(--manager-soft);
}

.date-filter-popover {
  border-color: var(--manager-border);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.14);
}

.quick-range-btn.active {
  border-color: var(--manager-accent);
  background: var(--manager-accent-soft);
  color: #1d4ed8;
}

.dashboard-export-actions .secondary-btn.compact,
.admin-body .secondary-btn,
.admin-body .link-btn {
  border-color: var(--manager-border-strong);
  background: #ffffff;
  color: #344054;
  box-shadow: none;
}

.admin-body .primary-btn {
  border-color: #111827;
  background: #111827;
}

.admin-body .dashboard-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.admin-body .stat-card {
  min-height: 106px;
  padding: 16px;
  border: 1px solid var(--manager-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.admin-body .stat-card::before,
.admin-body .stat-card::after {
  display: none;
}

.admin-body .stat-card .stat-card-head span {
  color: #667085;
  font-size: 0.72rem;
}

.stat-card-head em {
  background: var(--manager-soft);
  color: #475467;
}

.admin-body .stat-card strong {
  margin-top: 8px;
  color: var(--manager-text);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.admin-body .panel,
.admin-body .admin-product-card,
.admin-body .order-card,
.admin-body .dashboard-item,
.admin-body .report-card,
.admin-body .compare-card,
.admin-body .storefront-editor-card,
.admin-login-panel {
  border-color: var(--manager-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.admin-body .panel {
  padding: 20px;
}

.admin-body .dashboard-secondary-grid {
  grid-template-columns: minmax(340px, 0.9fr) minmax(520px, 1.35fr);
  gap: 16px;
}

.admin-body .dashboard-item {
  min-height: 56px;
  background: #ffffff;
}

.admin-body .dashboard-item:hover,
.admin-body .report-card:hover,
.admin-body .compare-card:hover,
.admin-body .panel:hover,
.admin-body .admin-product-card:hover,
.admin-body .order-card:hover,
.admin-body .storefront-editor-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--manager-border-strong);
}

.report-grid {
  gap: 16px;
}

.report-card {
  min-height: 260px;
}

#tab-storefront .panel {
  max-width: none;
}

#tab-storefront .storefront-editor-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 980px) {
  .admin-topbar {
    padding: 10px 12px;
  }

  .admin-body .status-banner {
    padding-inline: 12px;
  }

  #admin-app.admin-workspace:not(.hidden) {
    grid-template-columns: 1fr;
  }

  .admin-body .admin-tabs {
    position: static;
    min-height: 0;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--manager-border);
  }

  .admin-sidebar-brand {
    border-bottom: 0;
  }

  #admin-app.admin-workspace > .tab-content:not(.hidden) {
    padding: 16px 12px 24px;
  }

  .admin-body .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-topbar-status,
  .admin-topbar-controls {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar {
    padding: 10px;
  }
}

/* Topbar report menu and sidebar label cleanup */
.admin-nav-label {
  display: none !important;
}

.admin-topbar-controls {
  position: relative;
}

.admin-report-menu {
  position: relative;
  display: inline-flex;
}

.report-menu-toggle {
  min-width: 92px;
}

.admin-report-menu.is-open .report-menu-toggle {
  border-color: var(--manager-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.report-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 55;
  min-width: 178px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--manager-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.14);
}

.report-menu-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344054;
  padding: 8px 10px;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.report-menu-item:hover,
.report-menu-item:focus-visible {
  background: var(--manager-accent-soft);
  color: #1d4ed8;
  outline: none;
}

.dashboard-export-actions {
  display: none !important;
}

@media (max-width: 640px) {
  .admin-report-menu {
    width: 100%;
  }

  .report-menu-toggle {
    width: 100%;
    justify-content: center;
  }

  .report-menu-list {
    left: 0;
    right: auto;
    width: 100%;
  }
}

/* Phone admin ergonomics */
@media (max-width: 720px) {
  html,
  body.admin-body {
    width: 100%;
    overflow-x: hidden;
  }

  .admin-body .admin-console {
    width: 100%;
    padding: 0;
  }

  .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .admin-brand {
    width: 100%;
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
  }

  .admin-brand strong {
    font-size: 0.95rem;
  }

  .admin-brand span {
    font-size: 0.78rem;
  }

  .admin-body .admin-topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-topbar-status,
  .admin-topbar-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-topbar-status > *,
  .admin-topbar-controls > *,
  .admin-report-menu,
  .report-menu-toggle {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .admin-pill,
  .admin-body .primary-btn,
  .admin-body .secondary-btn,
  .admin-body .link-btn {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 0.84rem;
  }

  .report-menu-list {
    left: 0;
    right: 0;
    width: 100%;
  }

  .admin-body .status-banner {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  #admin-app.admin-workspace:not(.hidden) {
    grid-template-columns: 1fr;
  }

  .admin-body .admin-tabs {
    position: sticky;
    top: 150px;
    z-index: 45;
    padding: 8px 10px;
    overflow: hidden;
    background: #ffffff;
  }

  .admin-sidebar-brand {
    display: none;
  }

  .admin-body .admin-tab-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 2px;
    scrollbar-width: none;
  }

  .admin-body .admin-tab-list::-webkit-scrollbar {
    display: none;
  }

  .admin-body .tab-btn {
    min-width: max-content;
    width: auto;
    grid-template-columns: 28px auto auto;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .tab-glyph {
    width: 26px;
    height: 26px;
  }

  #admin-app.admin-workspace > .tab-content:not(.hidden) {
    padding: 14px 10px 24px;
  }

  .page-title-row,
  .admin-body .action-header {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
  }

  .page-title-row h1 {
    font-size: 1.28rem;
  }

  .admin-body .section-head p {
    font-size: 0.86rem;
  }

  .dashboard-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .dashboard-toolbar .dashboard-date-filter,
  .date-filter-trigger {
    width: 100%;
  }

  .date-filter-trigger {
    min-height: 44px;
  }

  .date-filter-popover {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(78dvh, 560px);
    overflow: auto;
    padding: 12px;
  }

  .date-filter-popover .quick-range-group,
  .date-filter-popover .absolute-date-grid,
  .date-filter-popover .date-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .date-filter-popover .quick-range-btn,
  .date-filter-popover .date-filter-actions > button {
    min-height: 42px;
    width: 100%;
  }

  .admin-body .dashboard-stats-grid,
  .admin-body .dashboard-secondary-grid,
  .report-grid,
  .comparison-grid,
  .admin-users-layout,
  .admin-form-grid,
  #tab-storefront .storefront-editor-grid,
  .storefront-editor-grid,
  .order-body {
    grid-template-columns: 1fr !important;
  }

  .admin-body .stat-card {
    min-height: 94px;
    padding: 14px;
  }

  .admin-body .stat-card strong {
    font-size: 1.55rem;
  }

  .admin-body .panel,
  .admin-body .report-card,
  .admin-body .compare-card,
  .admin-body .admin-product-card,
  .admin-body .order-card,
  .admin-body .storefront-editor-card {
    padding: 14px;
  }

  .admin-body .filter-bar,
  #tab-orders .filter-bar,
  .report-filter-bar {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 10px;
    align-items: stretch !important;
  }

  .admin-body .filter-bar label,
  .admin-body .filter-bar input,
  .admin-body .filter-bar select,
  .admin-body .admin-shell label,
  .admin-body .admin-shell input,
  .admin-body .admin-shell textarea,
  .admin-body .admin-shell select {
    width: 100%;
  }

  .section-actions,
  .filter-actions,
  .form-actions,
  .admin-body .product-card-actions-row,
  .admin-body .order-actions-row,
  .admin-body .admin-card-actions,
  .admin-body .order-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .section-actions > *,
  .filter-actions > *,
  .form-actions > *,
  .admin-body .product-card-actions-row > *,
  .admin-body .order-actions-row > *,
  .admin-body .admin-card-actions > *,
  .admin-body .order-actions button,
  .admin-body .order-actions select {
    width: 100%;
    min-width: 0;
  }

  .list-summary-row {
    display: grid;
    gap: 8px;
  }

  .quick-filter-group {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .dashboard-item,
  .admin-body .order-header,
  .admin-card-title-row,
  .admin-product-summary {
    align-items: flex-start;
    gap: 8px;
  }

  .admin-body .dashboard-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-body .badge,
  .stock-count {
    justify-self: start;
  }

  .bar-row,
  .report-list-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .admin-editor-overlay {
    align-items: stretch;
    place-items: stretch;
    padding: 0;
  }

  .admin-editor-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 14px;
  }

  .admin-editor-header {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: -14px -14px 12px;
    padding: 14px;
    background: #ffffff;
  }

  .admin-editor-header h2 {
    font-size: 1.08rem;
  }

  .admin-editor-body .admin-form-grid,
  .gallery-editor-row,
  .variant-row,
  .compare-card-grid {
    grid-template-columns: 1fr !important;
  }

  .product-gallery-editor {
    padding: 12px;
  }

  .variant-editor-head,
  .gallery-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .gallery-editor-actions > * {
    width: 100%;
  }

  .gallery-editor-preview {
    width: 100%;
    height: auto;
    min-height: 140px;
  }

  .editor-summary-banner {
    grid-template-columns: 1fr;
  }

  .editor-summary-banner-visual {
    width: 100%;
    min-height: 160px;
  }

  .storefront-overlay-form .form-actions {
    position: sticky;
    bottom: -14px;
    margin: 8px -14px -14px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 420px) {
  .admin-topbar-status,
  .admin-topbar-controls {
    grid-template-columns: 1fr;
  }

  .admin-body .tab-btn {
    min-width: auto;
  }

  .admin-body .tab-btn > span:not(.tab-glyph):not(.tab-count) {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Cruip Mosaic-inspired admin finish */
body.admin-body {
  --cruip-bg: #f3f4f6;
  --cruip-panel: #ffffff;
  --cruip-panel-soft: #f9fafb;
  --cruip-border: #e5e7eb;
  --cruip-border-strong: #d1d5db;
  --cruip-text: #111827;
  --cruip-muted: #6b7280;
  --cruip-muted-strong: #4b5563;
  --cruip-violet: #8470ff;
  --cruip-violet-dark: #755ff8;
  --cruip-blue: #67bfff;
  --cruip-green: #3ec972;
  --cruip-red: #ff5656;
  --cruip-yellow: #f0bb33;
  --cruip-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 1px rgb(0 0 0 / 0.02);
  min-height: 100vh;
  background: var(--cruip-bg);
  color: var(--cruip-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-body *,
body.admin-body *::before,
body.admin-body *::after {
  letter-spacing: 0;
}

body.admin-body .admin-console {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  background: var(--cruip-bg);
}

body.admin-body .admin-grid {
  gap: 0;
}

body.admin-body.admin-authenticated .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  min-height: 64px;
  margin: 0 0 0 256px;
  padding: 10px 24px;
  border: 0;
  border-bottom: 1px solid var(--cruip-border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

body.admin-body.admin-authenticated .admin-topbar .admin-brand {
  display: none;
}

body.admin-body.admin-authenticated .admin-topbar-actions {
  width: 100%;
  justify-content: flex-end;
}

body.admin-body .admin-topbar-status,
body.admin-body .admin-topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.admin-body .admin-pill {
  min-height: 32px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

body.admin-body .admin-role-pill {
  border-color: #e6e1ff;
  background: #f1eeff;
  color: var(--cruip-violet-dark);
}

body.admin-body.admin-authenticated .status-banner {
  min-height: 34px;
  margin: 0 0 0 256px;
  padding: 7px 24px;
  border: 0;
  border-bottom: 1px solid var(--cruip-border);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  color: var(--cruip-muted-strong);
  font-size: 0.82rem;
}

body.admin-body.admin-authenticated #admin-app.admin-workspace:not(.hidden) {
  display: block;
  min-height: calc(100vh - 98px);
  margin-left: 256px;
}

body.admin-body.admin-authenticated .admin-tabs {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: 256px;
  min-height: 100dvh;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid var(--cruip-border);
  border-radius: 0 18px 18px 0;
  background: #ffffff;
  box-shadow: var(--cruip-shadow);
}

body.admin-body .admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 4px 16px;
  border-bottom: 1px solid var(--cruip-border);
}

body.admin-body .admin-sidebar-mark,
body.admin-body .brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--cruip-violet);
  color: #ffffff;
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 800;
}

body.admin-body .admin-brand-logo,
body.admin-body .admin-sidebar-logo {
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  padding: 3px;
}

body.admin-body .admin-sidebar-brand strong,
body.admin-body .admin-brand strong {
  display: block;
  color: var(--cruip-text);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
}

body.admin-body .admin-sidebar-brand span:not(.admin-sidebar-mark),
body.admin-body .admin-brand span:not(.brand-mark) {
  color: var(--cruip-muted);
  font-size: 0.78rem;
}

body.admin-body .admin-nav-label {
  display: block !important;
  margin: -6px 4px -12px;
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.admin-body .admin-tab-list {
  display: grid;
  gap: 4px;
  width: 100%;
}

body.admin-body .tab-btn {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cruip-muted-strong);
  padding: 7px 8px;
  text-align: left;
  box-shadow: none;
}

body.admin-body .tab-btn:hover {
  background: #f9fafb;
  color: var(--cruip-text);
}

body.admin-body .tab-btn.active {
  background: #f1eeff;
  color: var(--cruip-violet-dark);
  box-shadow: none;
}

body.admin-body .tab-glyph {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f3f4f6;
  color: #9ca3af;
}

body.admin-body .tab-glyph svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body.admin-body .tab-btn.active .tab-glyph {
  background: var(--cruip-violet);
  color: #ffffff;
}

body.admin-body .tab-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--cruip-muted);
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 800;
}

body.admin-body .tab-btn.active .tab-count {
  background: #ffffff;
  color: var(--cruip-violet-dark);
}

body.admin-body.admin-authenticated #admin-app.admin-workspace > .tab-content:not(.hidden) {
  max-width: 1680px;
  min-width: 0;
  margin: 0 auto;
  padding: 28px 32px 44px;
}

body.admin-body .page-title-row,
body.admin-body .action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}

body.admin-body .page-title-row h1,
body.admin-body .section-head h2 {
  margin: 0;
  color: var(--cruip-text);
  font-size: clamp(1.55rem, 1.9vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
}

body.admin-body .section-head h3 {
  color: var(--cruip-text);
  font-weight: 800;
}

body.admin-body .section-head p,
body.admin-body .dashboard-item-meta,
body.admin-body .order-date,
body.admin-body .muted {
  color: var(--cruip-muted);
}

body.admin-body .dashboard-toolbar,
body.admin-body .panel,
body.admin-body .admin-product-card,
body.admin-body .order-card,
body.admin-body .dashboard-item,
body.admin-body .report-card,
body.admin-body .compare-card,
body.admin-body .storefront-editor-card,
body.admin-body .filter-bar,
body.admin-body .bulk-actions-toolbar,
body.admin-body .admin-users-list,
body.admin-body .login-form-card {
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: var(--cruip-panel);
  box-shadow: var(--cruip-shadow);
}

body.admin-body .panel,
body.admin-body .report-card,
body.admin-body .compare-card {
  padding: 20px;
}

body.admin-body .dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px;
}

body.admin-body .date-filter-trigger,
body.admin-body input,
body.admin-body textarea,
body.admin-body select,
body.admin-body .status-select {
  border: 1px solid var(--cruip-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--cruip-text);
  box-shadow: none;
}

body.admin-body input:focus,
body.admin-body textarea:focus,
body.admin-body select:focus,
body.admin-body .date-filter-trigger:hover,
body.admin-body .dashboard-date-filter.is-open .date-filter-trigger {
  border-color: var(--cruip-violet);
  outline: none;
  box-shadow: 0 0 0 3px rgb(132 112 255 / 0.16);
}

body.admin-body .primary-btn {
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  box-shadow: none;
}

body.admin-body .secondary-btn,
body.admin-body .link-btn {
  border: 1px solid var(--cruip-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  box-shadow: none;
}

body.admin-body .primary-btn:hover {
  border-color: #030712;
  background: #030712;
  box-shadow: 0 8px 20px rgb(17 24 39 / 0.14);
}

body.admin-body .secondary-btn:hover,
body.admin-body .link-btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  color: #374151;
  transform: none;
}

body.admin-body .dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 16px;
}

body.admin-body .stat-card {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: var(--cruip-panel);
  box-shadow: var(--cruip-shadow);
}

body.admin-body .stat-card::before,
body.admin-body .stat-card::after,
body.admin-body .stat-sparkline {
  display: none;
}

body.admin-body .stat-card-head span {
  color: var(--cruip-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.admin-body .stat-card-head em {
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--cruip-muted-strong);
  padding: 3px 8px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

body.admin-body .stat-card strong {
  margin-top: 6px;
  color: var(--cruip-text);
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.05;
}

body.admin-body .stat-revenue-card {
  border-top: 3px solid var(--cruip-green);
}

body.admin-body .stat-orders-card {
  border-top: 3px solid var(--cruip-blue);
}

body.admin-body .stat-pending-card {
  border-top: 3px solid var(--cruip-yellow);
}

body.admin-body .stat-processing-card {
  border-top: 3px solid var(--cruip-violet);
}

body.admin-body .stat-products-card {
  border-top: 3px solid #3ec972;
}

body.admin-body .stat-stock-card {
  border-top: 3px solid var(--cruip-red);
}

body.admin-body .stat-payment-card {
  border-top: 3px solid #9ca3af;
}

body.admin-body .dashboard-secondary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(500px, 1.35fr);
  gap: 16px;
  margin-bottom: 16px;
}

body.admin-body .dashboard-item,
body.admin-body .report-list-row {
  border-color: var(--cruip-border);
  background: #ffffff;
}

body.admin-body .report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

body.admin-body .report-card {
  min-height: 260px;
}

body.admin-body .report-card:nth-child(1),
body.admin-body .report-card:nth-child(2),
body.admin-body .wide-report-card,
body.admin-body .report-card:nth-child(4) {
  grid-column: span 2;
}

body.admin-body .chart-shell {
  min-height: 210px;
}

body.admin-body .bar-track {
  background: #f3f4f6;
}

body.admin-body .bar-track i {
  background: linear-gradient(90deg, var(--cruip-violet), var(--cruip-blue));
}

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

body.admin-body .compare-panel {
  margin-top: 16px;
}

body.admin-body .admin-products,
body.admin-body .admin-orders-list {
  gap: 14px;
}

body.admin-body .admin-products {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

body.admin-body #tab-products .filter-bar {
  gap: 10px;
  padding: 10px;
  border-color: #eadfdb;
  background: #fffdfb;
}

body.admin-body #tab-products .filter-bar input,
body.admin-body #tab-products .filter-bar select {
  min-height: 36px;
  border-color: #d9d2cf;
  background: #ffffff;
}

body.admin-body #tab-products .filter-actions .secondary-btn.compact {
  min-height: 36px;
  min-width: 96px;
  padding: 7px 12px;
}

body.admin-body .admin-product-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: start;
  gap: 10px;
  min-height: 230px;
  padding: 10px;
  border-left-width: 1px;
  border-color: #eadfdb;
  background: #fffdfb;
}

body.admin-body .admin-product-card.stock-ok,
body.admin-body .admin-product-card.stock-low,
body.admin-body .admin-product-card.stock-out {
  border-left-color: #eadfdb;
  background: #fffdfb;
}

body.admin-body .admin-product-card:has(.product-checkbox:checked) {
  border-color: #d9879a;
  background: #fff8f9;
  box-shadow: 0 0 0 2px rgb(217 135 154 / 0.16);
}

body.admin-body .admin-product-summary {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

body.admin-body .product-select-cell {
  top: 10px;
  left: 10px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border-color: #e7d4d8;
  background: rgb(255 255 255 / 0.92);
}

body.admin-body .product-select-cell input {
  width: 15px;
  height: 15px;
}

body.admin-body .admin-product-image {
  width: 76px;
  height: 76px;
  border-radius: 7px;
  border-color: #e9ded9;
  background: #f8f1ee;
}

body.admin-body .admin-card-title-row {
  gap: 6px;
}

body.admin-body .admin-card-title-row h2 {
  font-size: 0.92rem;
  line-height: 1.16;
}

body.admin-body .admin-product-summary p {
  margin-top: 3px;
  font-size: 0.82rem;
  line-height: 1.2;
}

body.admin-body .admin-product-meta {
  gap: 4px;
  margin-top: 8px;
}

body.admin-body .admin-product-meta span {
  min-height: 21px;
  border-radius: 7px;
  padding: 3px 7px;
  background: #f4efec;
  color: #5f5551;
  font-size: 0.72rem;
  line-height: 1;
}

body.admin-body .admin-product-meta .stock-pill.stock-ok {
  background: #eaf6f0;
  color: #23604d;
}

body.admin-body .admin-product-meta .stock-pill.stock-low {
  background: #fff3df;
  color: #9a5a0a;
}

body.admin-body .admin-product-meta .stock-pill.stock-out {
  background: #fff0ef;
  color: #a33d35;
}

body.admin-body .product-card-actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-self: end;
  margin-top: 0;
  padding: 8px;
  border-color: #efe5e0;
  background: #fffaf7;
}

body.admin-body .product-card-actions-row .card-action-spacer {
  display: none;
}

body.admin-body .product-card-actions-row .secondary-btn.compact {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  justify-content: center;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 0.76rem;
  line-height: 1;
}

body.admin-body .product-card-actions-row .product-edit-toggle {
  border-color: #cfd6df;
  background: #ffffff;
  color: #253044;
}

body.admin-body .product-card-actions-row .product-edit-toggle:hover {
  border-color: #9aa7b7;
  background: #f8fafc;
  color: #253044;
}

body.admin-body .product-card-actions-row .deactivate-product-btn {
  border-color: #d8d4ce;
  background: #f8f6f3;
  color: #4b4540;
}

body.admin-body .product-card-actions-row .deactivate-product-btn:hover {
  border-color: #b9afa7;
  background: #eee9e4;
  color: #2f2925;
}

body.admin-body .product-card-actions-row .delete-product-btn {
  border-color: #efc8c3;
  background: #fff8f7;
  color: #9f3f37;
}

body.admin-body .product-card-actions-row .delete-product-btn:hover {
  border-color: #c24136;
  background: #c24136;
  color: #ffffff;
}

body.admin-body .admin-product-card,
body.admin-body .order-card,
body.admin-body .storefront-editor-card {
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

body.admin-body .admin-product-card:hover,
body.admin-body .order-card:hover,
body.admin-body .storefront-editor-card:hover,
body.admin-body .report-card:hover,
body.admin-body .compare-card:hover {
  border-color: var(--cruip-border-strong);
  box-shadow: 0 8px 24px rgb(17 24 39 / 0.06);
  transform: none;
}

body.admin-body:not(.admin-authenticated) .admin-topbar {
  border: 0;
  border-bottom: 1px solid var(--cruip-border);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

body.admin-body:not(.admin-authenticated) .admin-grid {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

body.admin-body:not(.admin-authenticated) .admin-login-panel {
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgb(17 24 39 / 0.08);
}

@media (max-width: 1180px) {
  body.admin-body .dashboard-secondary-grid,
  body.admin-body .comparison-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 980px) {
  body.admin-body.admin-authenticated .admin-topbar,
  body.admin-body.admin-authenticated .status-banner,
  body.admin-body.admin-authenticated #admin-app.admin-workspace:not(.hidden) {
    margin-left: 0;
  }

  body.admin-body.admin-authenticated .admin-topbar {
    padding: 10px 12px;
  }

  body.admin-body.admin-authenticated .admin-topbar .admin-brand {
    display: flex;
  }

  body.admin-body.admin-authenticated .admin-topbar-actions {
    width: auto;
  }

  body.admin-body.admin-authenticated .admin-tabs {
    position: static;
    inset: auto;
    top: auto;
    width: 100%;
    min-height: 0;
    display: block;
    padding: 10px 12px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--cruip-border);
    border-radius: 0;
    box-shadow: none;
  }

  body.admin-body .admin-sidebar-brand,
  body.admin-body .admin-nav-label {
    display: none !important;
  }

  body.admin-body .admin-tab-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body.admin-body .admin-tab-list::-webkit-scrollbar {
    display: none;
  }

  body.admin-body .tab-btn {
    width: auto;
    min-width: max-content;
    grid-template-columns: 28px auto auto;
    white-space: nowrap;
  }

  body.admin-body.admin-authenticated #admin-app.admin-workspace > .tab-content:not(.hidden) {
    padding: 18px 12px 30px;
  }

  body.admin-body .dashboard-toolbar,
  body.admin-body .page-title-row,
  body.admin-body .action-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-body .dashboard-toolbar .dashboard-date-filter {
    width: 100%;
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  body.admin-body .admin-topbar-status,
  body.admin-body .admin-topbar-controls,
  body.admin-body .admin-topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.admin-body .admin-topbar-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-body .admin-topbar-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.admin-body .admin-topbar-controls > *,
  body.admin-body .admin-topbar-status > *,
  body.admin-body .admin-report-menu,
  body.admin-body .report-menu-toggle {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  body.admin-body .dashboard-stats-grid,
  body.admin-body .dashboard-secondary-grid,
  body.admin-body .report-grid,
  body.admin-body .comparison-grid,
  body.admin-body .admin-users-layout,
  body.admin-body .admin-form-grid,
  body.admin-body #tab-storefront .storefront-editor-grid,
  body.admin-body .storefront-editor-grid {
    grid-template-columns: 1fr !important;
  }

  body.admin-body .report-card:nth-child(1),
  body.admin-body .report-card:nth-child(2),
  body.admin-body .wide-report-card,
  body.admin-body .report-card:nth-child(4) {
    grid-column: auto;
  }

  body.admin-body .panel,
  body.admin-body .report-card,
  body.admin-body .compare-card,
  body.admin-body .admin-product-card,
  body.admin-body .order-card,
  body.admin-body .storefront-editor-card {
    padding: 14px;
  }

  body.admin-body .date-filter-popover {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(78dvh, 560px);
    overflow: auto;
  }

  body.admin-body:not(.admin-authenticated) .admin-grid {
    width: min(100% - 20px, 1120px);
    padding: 18px 0;
  }
}

@media (max-width: 520px) {
  body.admin-body .admin-topbar-status,
  body.admin-body .admin-topbar-controls {
    grid-template-columns: 1fr;
  }

  body.admin-body .tab-btn > span:not(.tab-glyph):not(.tab-count) {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Clean beauty finish for the Storefront Settings panel. */
body.admin-body #tab-storefront .panel:first-child {
  overflow: hidden;
  border-color: #eadde4;
  background:
    linear-gradient(180deg, #ffffff 0%, #fffafb 58%, #f8fbf8 100%);
  box-shadow: 0 18px 44px rgb(135 83 99 / 0.08);
}

body.admin-body #tab-storefront .panel:first-child > .section-head.compact {
  max-width: 720px;
  padding-bottom: 18px;
}

body.admin-body #tab-storefront .panel:first-child > .section-head.compact h2 {
  color: #171923;
  font-size: clamp(1.65rem, 2.1vw, 2rem);
  letter-spacing: 0;
}

body.admin-body #tab-storefront .panel:first-child > .section-head.compact p {
  color: #667085;
  font-size: 0.94rem;
}

body.admin-body #tab-storefront .panel:first-child .storefront-editor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.admin-body #tab-storefront .panel:first-child .storefront-editor-card {
  position: relative;
  min-height: 254px;
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: hidden;
  padding: 20px;
  border-color: #eadde4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.94);
  box-shadow: 0 12px 30px rgb(135 83 99 / 0.065);
}

body.admin-body #tab-storefront .panel:first-child .storefront-editor-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #e8a5b6, #d8c096 48%, #94b8a8);
}

body.admin-body #tab-storefront .panel:first-child .storefront-editor-card:hover {
  border-color: #dfc8d2;
  box-shadow: 0 16px 34px rgb(135 83 99 / 0.1);
}

body.admin-body #tab-storefront .panel:first-child .editor-header {
  align-items: flex-start;
}

body.admin-body #tab-storefront .panel:first-child .editor-header h3 {
  color: #1d1f2c;
  font-size: 1rem;
  line-height: 1.25;
}

body.admin-body #tab-storefront .panel:first-child .editor-header p {
  max-width: 28ch;
  color: #667085;
  font-size: 0.88rem;
  line-height: 1.35;
}

body.admin-body #tab-storefront .panel:first-child .editor-toggle-btn {
  min-height: 38px;
  border-color: #dfd7dd;
  background: #ffffff;
  color: #344054;
  box-shadow: 0 4px 12px rgb(52 64 84 / 0.05);
}

body.admin-body #tab-storefront .panel:first-child .editor-toggle-btn:hover {
  border-color: #d9aab9;
  background: #fff7fa;
  color: #8b4058;
}

body.admin-body #tab-storefront .panel:first-child .editor-summary {
  min-height: 128px;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-color: #eee3e8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #fffafb 0%, #ffffff 54%, #f6faf7 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9);
}

body.admin-body #tab-storefront .panel:first-child .editor-summary-label {
  padding: 4px 9px;
  background: #edf5ef;
  color: #496457;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

body.admin-body #tab-storefront .panel:first-child .editor-summary strong {
  color: #202231;
  font-size: 0.96rem;
}

body.admin-body #tab-storefront .panel:first-child .editor-summary p {
  display: -webkit-box;
  overflow: hidden;
  color: #667085;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

body.admin-body #tab-storefront .panel:first-child .logo-summary {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

body.admin-body #tab-storefront .panel:first-child .logo-summary .logo-summary-media {
  width: 74px;
  height: 74px;
  border-color: #eadde4;
  border-radius: 8px;
  background:
    linear-gradient(145deg, #fff7fa, #ffffff 56%, #f3f8f5);
}

body.admin-body #tab-storefront .panel:first-child .logo-summary .image-preview {
  object-fit: contain;
  padding: 6px;
}

body.admin-body #tab-storefront .panel:first-child .logo-summary p {
  max-width: none;
}

@media (max-width: 1240px) {
  body.admin-body #tab-storefront .panel:first-child .storefront-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.admin-body #tab-storefront .panel:first-child {
    padding: 16px;
  }

  body.admin-body #tab-storefront .panel:first-child .storefront-editor-grid {
    grid-template-columns: 1fr;
  }

  body.admin-body #tab-storefront .panel:first-child .storefront-editor-card {
    min-height: 0;
  }
}

body.admin-body .badge-unassigned {
  background: #fff8c5;
  color: #9a6700;
  border: 1px solid rgba(154, 103, 0, 0.2);
}

body.admin-body .badge-assigned {
  background: #ddf4ff;
  color: #0969da;
  border: 1px solid rgba(9, 105, 218, 0.2);
}

body.admin-body .badge-resolved {
  background: #e6f7ed;
  color: #1a7f37;
  border: 1px solid rgba(26, 127, 55, 0.2);
}

body.admin-body .badge-closed {
  background: #f6f8fa;
  color: #57606a;
  border: 1px solid rgba(87, 96, 106, 0.2);
}

body.admin-body .support-inbox-panel {
  display: grid;
  grid-template-columns: 190px minmax(320px, 0.9fr) minmax(420px, 1.4fr);
  gap: 16px;
  min-height: 680px;
  padding: 16px;
}

body.admin-body .support-channel-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.admin-body .support-channel-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.admin-body .support-channel-tabs .active {
  border-color: var(--cruip-violet);
  background: #f1eeff;
  color: var(--cruip-violet-dark);
}

body.admin-body .support-channel-count {
  margin-left: 0;
}

body.admin-body .support-filter-column,
body.admin-body .support-case-column,
body.admin-body .support-conversation-column {
  min-width: 0;
}

body.admin-body .support-channel-pill {
  width: fit-content;
  margin-bottom: 14px;
}

body.admin-body .support-filter-list,
body.admin-body .support-case-list,
body.admin-body .support-conversation-panel,
body.admin-body .support-message-history {
  display: grid;
  gap: 10px;
}

body.admin-body .support-filter-btn {
  width: 100%;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--cruip-muted-strong);
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.admin-body .support-filter-btn.active,
body.admin-body .support-filter-btn:hover {
  border-color: var(--cruip-violet);
  background: #f1eeff;
  color: var(--cruip-violet-dark);
}

body.admin-body .support-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px auto;
  gap: 8px;
  margin-bottom: 12px;
}

body.admin-body .support-case-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

body.admin-body .support-case-card {
  display: grid;
  gap: 9px;
  width: 100%;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  color: var(--cruip-text);
  text-align: left;
  cursor: pointer;
}

body.admin-body .support-case-card.active,
body.admin-body .support-case-card:hover {
  border-color: var(--cruip-violet);
  box-shadow: 0 8px 20px rgb(17 24 39 / 0.06);
}

body.admin-body .support-case-card.active {
  box-shadow: inset 3px 0 0 var(--cruip-violet), 0 8px 20px rgb(17 24 39 / 0.06);
}

body.admin-body .support-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--cruip-violet-dark);
  font-weight: 900;
}

body.admin-body .support-case-head,
body.admin-body .support-case-meta,
body.admin-body .support-conversation-header,
body.admin-body .support-message-meta,
body.admin-body .support-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.admin-body .support-case-head,
body.admin-body .support-conversation-header,
body.admin-body .support-message-meta {
  justify-content: space-between;
}

body.admin-body .support-case-head strong,
body.admin-body .support-conversation-header strong,
body.admin-body .support-message-meta strong {
  display: block;
  color: var(--cruip-text);
  font-weight: 800;
}

body.admin-body .support-case-head span,
body.admin-body .support-case-meta,
body.admin-body .support-conversation-header span,
body.admin-body .support-message-meta time,
body.admin-body .support-reply-lock {
  color: var(--cruip-muted);
  font-size: 0.82rem;
}

body.admin-body .support-case-card p,
body.admin-body .support-message p {
  margin: 0;
  color: var(--cruip-muted-strong);
  line-height: 1.45;
}

body.admin-body .support-attachment {
  margin-top: 10px;
}

body.admin-body .support-attachment audio {
  display: block;
  width: min(320px, 100%);
}

body.admin-body .support-image-attachment {
  display: grid;
  gap: 8px;
  width: min(320px, 100%);
  text-decoration: none;
  color: inherit;
}

body.admin-body .support-image-attachment img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--cruip-border);
  background: #f8fafc;
}

body.admin-body .support-image-attachment span,
body.admin-body .support-file-attachment span:last-child {
  color: var(--cruip-muted);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body.admin-body .support-file-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 100%);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

body.admin-body .support-file-attachment svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

body.admin-body .support-case-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

body.admin-body .support-unread-badge {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  padding: 0 8px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

body.admin-body .support-conversation-panel {
  height: 100%;
  align-content: start;
}

body.admin-body .support-customer-info {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #f9fafb;
  padding: 12px;
}

body.admin-body .support-customer-info span {
  color: var(--cruip-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.admin-body .support-customer-info strong {
  min-width: 0;
  color: var(--cruip-text);
  overflow-wrap: anywhere;
}

body.admin-body .support-message-history {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #f9fafb;
  padding: 12px;
}

body.admin-body .support-message {
  width: fit-content;
  max-width: min(72ch, 84%);
  border: 1px solid var(--cruip-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

body.admin-body .support-message-customer {
  justify-self: start;
}

body.admin-body .support-message-staff {
  justify-self: end;
  border-color: rgba(9, 105, 218, 0.22);
  background: #f5fbff;
}

body.admin-body .support-message.is-retracted {
  opacity: 0.72;
  background: #f8fafc;
  border-style: dashed;
}

body.admin-body .support-message-internal_note {
  justify-self: center;
  border-style: dashed;
  background: #fffdf3;
}

body.admin-body .support-message-retract {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--cruip-violet-dark);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

body.admin-body .support-message-retracted-note {
  color: var(--cruip-muted);
  font-size: 0.84rem;
  font-style: italic;
}

body.admin-body .support-message-voice,
body.admin-body .support-message-audio {
  padding: 0;
  border: 0;
  background: transparent;
}

body.admin-body .support-audio-player {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  min-width: min(320px, 100%);
  border-radius: 22px;
  padding: 10px 12px 10px 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03), inset 0 0 0 1px rgba(16, 24, 40, 0.05);
}

body.admin-body .support-message-staff .support-audio-player {
  background: linear-gradient(180deg, #d6f5d0 0%, #c8efc0 100%);
}

body.admin-body .support-message-customer .support-audio-player {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body.admin-body .support-audio-player.is-playing {
  box-shadow: inset 0 0 0 1px rgba(9, 105, 218, 0.14);
}

body.admin-body .support-audio-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #2f7de1;
  color: #ffffff;
  padding: 0;
  flex: 0 0 auto;
}

body.admin-body .support-message-customer .support-audio-toggle {
  background: #2f7de1;
  color: #ffffff;
}

body.admin-body .support-message-staff .support-audio-toggle {
  background: #ffffff;
  color: #2f7d32;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 50, 0.18);
}

body.admin-body .support-audio-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

body.admin-body .support-audio-toggle-icon-pause {
  display: none;
}

body.admin-body .support-audio-player.is-playing .support-audio-toggle-icon-play {
  display: none;
}

body.admin-body .support-audio-player.is-playing .support-audio-toggle-icon-pause {
  display: inline-flex;
}

body.admin-body .support-audio-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
  padding-right: 4px;
}

body.admin-body .support-audio-bar {
  width: 2px;
  border-radius: 999px;
  background: rgba(68, 94, 135, 0.42);
  flex: 0 0 auto;
}

body.admin-body .support-message-staff .support-audio-bar {
  background: rgba(39, 92, 50, 0.48);
}

body.admin-body .support-audio-duration {
  color: rgba(16, 24, 40, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  align-self: end;
  padding-bottom: 1px;
}

body.admin-body .support-message-staff .support-audio-duration {
  color: rgba(16, 24, 40, 0.68);
}

body.admin-body .support-attachment {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

body.admin-body .support-attachment-meta {
  display: grid;
  gap: 2px;
  color: var(--cruip-muted);
}

body.admin-body .support-attachment-meta span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.admin-body .support-attachment-meta strong {
  color: var(--cruip-text);
  font-size: 0.9rem;
}

body.admin-body .support-attachment audio {
  width: min(280px, 100%);
  max-width: 100%;
}

body.admin-body .support-attachment button[data-support-attachment] {
  justify-self: start;
  min-width: 180px;
  border-color: rgba(59, 130, 246, 0.22);
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: #17315f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

body.admin-body .support-attachment button[data-support-attachment]:not(:disabled):hover {
  background: linear-gradient(180deg, #eff6ff 0%, #e3f0ff 100%);
}

body.admin-body .support-reply-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.admin-body .support-reply-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.admin-body .support-reply-file {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

body.admin-body .support-reply-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

body.admin-body .support-reply-file .is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

body.admin-body .support-reply-file-name {
  color: var(--cruip-muted);
  font-size: 0.82rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.admin-body .support-attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 12px;
}

body.admin-body .support-attachment-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

body.admin-body .support-voice-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-color: rgba(52, 168, 83, 0.18);
  background: #34a853;
  color: #ffffff;
  border-radius: 999px;
  padding: 0;
  flex: 0 0 auto;
}

body.admin-body .support-voice-btn:not(:disabled):hover {
  background: #2f9750;
}

body.admin-body .support-voice-btn.is-recording {
  border-color: rgba(220, 38, 38, 0.25);
  background: #ef4444;
  color: #ffffff;
}

body.admin-body .support-voice-btn.is-recording:not(:disabled):hover {
  background: #dc2626;
}

body.admin-body .support-voice-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

body.admin-body .support-note-form,
body.admin-body .support-reply-form {
  display: grid;
  gap: 10px;
}

body.admin-body .support-reply-form {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--cruip-border);
  background: #ffffff;
  padding-top: 10px;
}

body.admin-body .support-actions {
  flex-wrap: wrap;
}

body.admin-body .support-staff-select {
  display: grid;
  gap: 4px;
  min-width: min(100%, 220px);
}

body.admin-body .support-staff-select span {
  color: var(--cruip-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Final mobile order override; intentionally last among admin rules. */
@media (max-width: 640px) {
  body.admin-body #tab-orders > .panel { padding: 16px 12px; }
  body.admin-body #tab-orders .action-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
  }
  body.admin-body #tab-orders .action-header .section-head { min-width: 0; }
  body.admin-body #tab-orders .action-header .section-head h2 {
    font-size: clamp(1.65rem, 8vw, 2rem);
    line-height: 1.05;
  }
  body.admin-body #tab-orders .action-header .section-head p {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
  }
  body.admin-body #tab-orders .section-actions { width: auto; }
  body.admin-body #tab-orders .section-actions > #refresh-orders-btn {
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 13px;
  }
  body.admin-body #tab-orders .filter-bar {
    grid-template-columns: 1fr !important;
    gap: 12px 10px;
    padding: 14px;
    border-radius: 14px;
  }
  body.admin-body #tab-orders .search-group,
  body.admin-body #tab-orders .filter-group:not(.order-date-filter),
  body.admin-body #tab-orders .filter-actions { grid-column: 1 / -1; }
  body.admin-body #tab-orders .order-date-filter-from,
  body.admin-body #tab-orders .order-date-filter-to { grid-column: 1 / -1; min-width: 0; }
  body.admin-body #tab-orders .filter-bar label { gap: 6px; }
  body.admin-body #tab-orders .filter-bar label > span { font-size: 0.8rem; }
  body.admin-body #tab-orders .filter-bar input:not([type="checkbox"]),
  body.admin-body #tab-orders .filter-bar select {
    height: 48px !important;
    min-height: 48px !important;
    padding: 10px 12px;
    font-size: 16px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  body.admin-body #tab-orders input[type="datetime-local"] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
  }
  body.admin-body #tab-orders input[type="datetime-local"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
  }
  body.admin-body #tab-orders .select-all-row {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
  }
  body.admin-body #tab-orders .select-all-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
  body.admin-body #tab-orders .filter-actions > #clear-order-filters-btn { min-height: 42px; }
  body.admin-body #tab-orders .list-summary-row {
    gap: 10px;
    margin-top: 14px;
  }
  body.admin-body #tab-orders #order-result-summary { font-size: 0.9rem; }
  body.admin-body #tab-orders .quick-filter-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  body.admin-body #tab-orders .quick-filter-group .secondary-btn {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 0.78rem;
  }
  body.admin-body #tab-orders .admin-orders-list .empty-state {
    min-height: 150px;
    padding: 28px 16px;
  }
}

@media (max-width: 390px) {
  body.admin-body #tab-orders .action-header { grid-template-columns: 1fr; }
  body.admin-body #tab-orders .section-actions,
  body.admin-body #tab-orders .section-actions > #refresh-orders-btn { width: 100%; }
}

@media (max-width: 1280px) {
  body.admin-body .support-inbox-panel {
    grid-template-columns: 180px minmax(260px, 1fr);
  }

  body.admin-body .support-conversation-column {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.admin-body .support-inbox-panel,
  body.admin-body .support-search-row {
    grid-template-columns: 1fr;
  }

  body.admin-body .support-case-list,
  body.admin-body .support-message-history {
    max-height: none;
  }
}

/* ============ Two-Factor Authentication (Users page) ============ */
.twofa-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg, 24px);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(108, 99, 255, 0.10), transparent 55%),
    var(--admin-surface);
  box-shadow: var(--admin-shadow);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  margin-bottom: 1.25rem;
  animation: twofaPanelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes twofaPanelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.twofa-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.twofa-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.35);
  flex: none;
}
.twofa-icon svg { width: 24px; height: 24px; fill: currentColor; }
.twofa-head-text { flex: 1 1 auto; min-width: 180px; }
.twofa-head-text h2 { margin: 0; font-size: 1.15rem; color: var(--admin-text); }
.twofa-head-text p { margin: 0.15rem 0 0; color: var(--admin-muted); font-size: 0.9rem; }

.twofa-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.3s ease, color 0.3s ease;
}
.twofa-status-pill .twofa-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
}
.twofa-status-pill.is-on { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.twofa-status-pill.is-on .twofa-dot { animation: twofaPulse 1.8s ease-out infinite; }
.twofa-status-pill.is-off { background: rgba(104, 115, 134, 0.14); color: var(--admin-muted); }
@keyframes twofaPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.twofa-state { margin-top: 1.15rem; }
.twofa-animate-in { animation: twofaFadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes twofaFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.twofa-lead { color: var(--admin-muted); max-width: 46ch; margin: 0 0 1rem; line-height: 1.55; }
.twofa-note {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.22);
}
.twofa-note svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #d97706; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.twofa-note strong { display: block; color: var(--admin-text); font-size: 0.95rem; }
.twofa-note p { margin: 0.2rem 0 0; color: var(--admin-muted); font-size: 0.86rem; line-height: 1.5; max-width: 56ch; }

/* Buttons */
.twofa-btn {
  --twofa-btn-bg: var(--admin-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}
.twofa-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.twofa-btn:active { transform: translateY(1px) scale(0.99); }
.twofa-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.35); }
.twofa-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
  box-shadow: 0 10px 22px rgba(108, 99, 255, 0.32);
}
.twofa-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(108, 99, 255, 0.42); }
.twofa-btn-primary svg { transition: transform 0.2s ease; }
.twofa-btn-primary:hover svg { transform: translateX(3px); }
.twofa-btn-primary.is-loading { opacity: 0.7; pointer-events: none; }
.twofa-btn-ghost { color: var(--admin-muted); background: transparent; border-color: var(--admin-border); }
.twofa-btn-ghost:hover { background: var(--admin-surface-soft); color: var(--admin-text); }
.twofa-btn-danger { color: #fff; background: #ef4444; box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28); }
.twofa-btn-danger:hover { transform: translateY(-1px); background: #dc2626; }
.twofa-btn-danger-ghost { color: #dc2626; background: transparent; border-color: rgba(239, 68, 68, 0.4); }
.twofa-btn-danger-ghost:hover { background: rgba(239, 68, 68, 0.08); }

/* Setup steps */
.twofa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.twofa-steps > li { display: flex; gap: 0.85rem; }
.twofa-step-no {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 0.85rem; font-weight: 700;
  color: var(--admin-primary);
  background: rgba(108, 99, 255, 0.12);
}
.twofa-step-body strong { display: block; color: var(--admin-text); font-size: 0.98rem; }
.twofa-step-body p { margin: 0.15rem 0 0.65rem; color: var(--admin-muted); font-size: 0.86rem; }

.twofa-qr-wrap {
  display: inline-block;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--admin-border);
  box-shadow: 0 10px 30px rgba(27, 38, 74, 0.10);
  animation: twofaQrPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes twofaQrPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.twofa-qr-wrap img { display: block; border-radius: 8px; }

.twofa-secret-chip {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  border: 1px dashed var(--admin-border);
  background: var(--admin-surface-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.twofa-secret-chip:hover { border-color: var(--admin-primary); }
.twofa-secret-chip code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, monospace;
  font-size: 0.85rem; letter-spacing: 1px; color: var(--admin-text);
}
.twofa-copy-hint {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  color: var(--admin-primary); letter-spacing: 0.04em;
}
.twofa-secret-chip.is-copied .twofa-copy-hint { color: #16a34a; }

/* Code inputs */
.twofa-code-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.twofa-code-row[hidden] { display: none; }
.twofa-state[hidden] { display: none; }
.twofa-code-row input {
  width: 168px;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.twofa-code-row input::placeholder { letter-spacing: 0.4em; color: var(--admin-muted); opacity: 0.5; }
.twofa-code-row input:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
}
.twofa-shake { animation: twofaShake 0.4s ease; border-color: #ef4444 !important; }
@keyframes twofaShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ON banner */
.twofa-on-banner {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.10);
  color: #15803d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.twofa-on-banner svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Per-user 2FA badges in the list */
.badge-2fa-on {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(34, 197, 94, 0.14); color: #16a34a;
}
.badge-2fa-on .badge-2fa-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-2fa-off { background: rgba(104, 115, 134, 0.12); color: var(--admin-muted); }
.badge-you { background: rgba(108, 99, 255, 0.14); color: var(--admin-primary); font-size: 0.66rem; vertical-align: middle; }

@media (prefers-reduced-motion: reduce) {
  .twofa-panel, .twofa-animate-in, .twofa-qr-wrap, .twofa-status-pill.is-on .twofa-dot { animation: none; }
  .twofa-btn { transition: none; }
}

/* =====================================================================
   MODERN POLISH LAYER  (additive; animations, hover, depth, micro-UX)
   Scoped to body.admin-body / body.store-body so the two surfaces stay
   independent. Everything here is decoration only — no layout changes.
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {

  /* ---------- Shared entrance keyframes ---------- */
  @keyframes uiFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes uiFadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes uiPopIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
  @keyframes uiBarGrow { from { transform: scaleY(0.15); opacity: 0.4; } to { transform: scaleY(1); opacity: 1; } }

  /* =================================================================
     ADMIN
     ================================================================= */

  /* Page/tab entrance: the active tab content eases in on switch. */
  body.admin-body .tab-content:not(.hidden) {
    animation: uiFadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  /* Panels: gentle lift + deeper shadow on hover. */
  body.admin-body .panel {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  body.admin-body .panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px rgba(27, 38, 74, 0.12);
  }

  /* Stat cards: staggered rise, hover lift, animated accent + sparkline. */
  body.admin-body .dashboard-stats-grid .stat-card {
    animation: uiFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  body.admin-body .dashboard-stats-grid .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(27, 38, 74, 0.14);
  }
  body.admin-body .dashboard-stats-grid .stat-card:nth-child(1) { animation-delay: 0.02s; }
  body.admin-body .dashboard-stats-grid .stat-card:nth-child(2) { animation-delay: 0.07s; }
  body.admin-body .dashboard-stats-grid .stat-card:nth-child(3) { animation-delay: 0.12s; }
  body.admin-body .dashboard-stats-grid .stat-card:nth-child(4) { animation-delay: 0.17s; }
  body.admin-body .dashboard-stats-grid .stat-card:nth-child(5) { animation-delay: 0.22s; }
  body.admin-body .dashboard-stats-grid .stat-card:nth-child(6) { animation-delay: 0.27s; }
  body.admin-body .stat-sparkline i {
    transform-origin: bottom;
    animation: uiBarGrow 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  body.admin-body .stat-sparkline i:nth-child(odd) { animation-delay: 0.15s; }
  body.admin-body .stat-sparkline i:nth-child(even) { animation-delay: 0.25s; }

  /* List/detail cards lift on hover. */
  body.admin-body .admin-user-card,
  body.admin-body .admin-orders-list > *,
  body.admin-body .admin-products-grid > * {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  body.admin-body .admin-user-card:hover,
  body.admin-body .admin-orders-list > *:hover,
  body.admin-body .admin-products-grid > *:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(27, 38, 74, 0.10);
  }

  /* Sidebar tabs: smooth hover slide + active accent. */
  body.admin-body .tab-btn {
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }
  body.admin-body .tab-btn:hover { transform: translateX(2px); }
  body.admin-body .tab-btn.active { position: relative; }

  /* Buttons: shadow lift, crisp active press, focus ring. */
  body.admin-body .primary-btn,
  body.admin-body .secondary-btn {
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, filter 0.2s ease;
  }
  body.admin-body .primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.20); }
  body.admin-body .primary-btn:active,
  body.admin-body .secondary-btn:active { transform: translateY(0) scale(0.98); }
  body.admin-body .secondary-btn:hover { transform: translateY(-1px); }
  body.admin-body .primary-btn:focus-visible,
  body.admin-body .secondary-btn:focus-visible {
    outline: none; box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.35);
  }

  /* Inputs: focus ring in the admin accent. */
  body.admin-body .admin-form input:focus,
  body.admin-body .admin-form select:focus,
  body.admin-body .admin-form textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.16);
  }

  /* Status banner slides in. */
  body.admin-body #admin-status { transition: background 0.3s ease; }

  /* =================================================================
     STOREFRONT
     ================================================================= */

  /* Product cards: hover lift + image zoom + shadow bloom. */
  body.store-body .product-card { transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease; }
  body.store-body .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 54px rgba(127, 61, 70, 0.16);
  }
  body.store-body .product-visual { overflow: hidden; }
  body.store-body .product-visual img,
  body.store-body .product-visual-slide {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.store-body .product-card:hover .product-visual img,
  body.store-body .product-card:hover .product-visual-slide { transform: scale(1.06); }

  /* Staggered reveal across the grid's first row of cards. */
  body.store-body .product-card:nth-child(1) { animation-delay: 0.02s; }
  body.store-body .product-card:nth-child(2) { animation-delay: 0.08s; }
  body.store-body .product-card:nth-child(3) { animation-delay: 0.14s; }
  body.store-body .product-card:nth-child(4) { animation-delay: 0.20s; }
  body.store-body .product-card:nth-child(5) { animation-delay: 0.26s; }
  body.store-body .product-card:nth-child(6) { animation-delay: 0.32s; }

  /* Filter toolbar: hover/focus polish. */
  body.store-body .filter-combo-trigger,
  body.store-body .filter-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  }
  body.store-body .filter-combo-trigger:hover,
  body.store-body .filter-select:hover { transform: translateY(-1px); }
  body.store-body .catalog-toolbar input:focus,
  body.store-body .filter-combo-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 61, 70, 0.16);
  }

  /* Floating cart: soft breathing shadow + hover pop. */
  body.store-body .floating-cart-btn {
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    animation: uiCartFloat 3.4s ease-in-out infinite;
  }
  @keyframes uiCartFloat {
    0%, 100% { box-shadow: 0 12px 30px rgba(127, 61, 70, 0.30); }
    50% { box-shadow: 0 16px 40px rgba(127, 61, 70, 0.42); }
  }
  body.store-body .floating-cart-btn:hover { transform: scale(1.08) translateY(-2px); }
  body.store-body .floating-cart-btn:active { transform: scale(0.96); }

  /* Bottom nav: springy active state + tap feedback. */
  body.store-body .bottom-nav-item { transition: transform 0.18s ease, color 0.2s ease; }
  body.store-body .bottom-nav-item:active { transform: scale(0.9); }
  body.store-body .bottom-nav-item.active { animation: uiPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }

  /* Hero utility buttons: hover lift. */
  body.store-body .icon-action-btn { transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease; }
  body.store-body .icon-action-btn:hover { transform: translateY(-2px); }

  /* Drawer panels ease in when opened. */
  body.store-body .store-drawer:not(.hidden) .store-drawer-card {
    animation: uiSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes uiSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
}

/* Modern thin scrollbars on both surfaces (harmless when unsupported). */
body.admin-body *, body.store-body * { scrollbar-width: thin; }
body.admin-body *::-webkit-scrollbar, body.store-body *::-webkit-scrollbar { width: 10px; height: 10px; }
body.admin-body *::-webkit-scrollbar-thumb, body.store-body *::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 140, 0.35); border-radius: 999px; border: 2px solid transparent; background-clip: content-box;
}
body.admin-body *::-webkit-scrollbar-thumb:hover, body.store-body *::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 140, 0.55); background-clip: content-box;
}

/* =====================================================================
   ADMIN — PHONE LAYOUT (<= 720px)
   Reclaims the ~480px of header + menu chrome that sat above content on a
   phone: a compact sticky header, a native-style bottom tab bar, two-column
   stats, and denser order cards. Prefixed with body.admin-body so it wins
   over the older breakpoint rules earlier in this file.
   ===================================================================== */
@media (max-width: 720px) {
  body.admin-body { --admin-bottom-nav: 64px; }

  /* ---- Header: one compact block instead of five stacked bars ----
     It scrolls away with the page: the bottom tab bar carries navigation,
     so pinning the header too would permanently cover content. */
  body.admin-body .admin-topbar {
    position: relative;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 14px;
    min-height: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--admin-border);
  }
  body.admin-body .admin-brand { flex: 1 1 auto; min-width: 0; gap: 10px; }
  body.admin-body .admin-brand .brand-mark { width: 32px; height: 32px; font-size: 0.72rem; }
  body.admin-body .admin-brand strong { font-size: 0.98rem; }
  body.admin-body .admin-brand span:not(.brand-mark) { font-size: 0.72rem; }
  body.admin-body .admin-topbar-actions {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
  }
  body.admin-body .admin-topbar-status,
  body.admin-body .admin-topbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: auto;
    grid-template-columns: none;
  }
  body.admin-body .admin-topbar-controls { margin-left: auto; }
  body.admin-body .admin-topbar-status > *,
  body.admin-body .admin-topbar-controls > *,
  body.admin-body.admin-authenticated .admin-topbar-controls > *,
  body.admin-body .admin-topbar-controls .secondary-btn,
  body.admin-body .admin-topbar-controls .report-menu-toggle {
    width: auto;
    min-width: 0;
    min-height: 32px;
    padding: 6px 11px;
    font-size: 0.76rem;
    line-height: 1.1;
    border-radius: 999px;
    white-space: nowrap;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  body.admin-body .report-menu-list { right: 0; left: auto; min-width: 150px; z-index: 50; }

  /* Status banner: a slim line, not a block. */
  body.admin-body #admin-status { padding: 6px 14px; font-size: 0.78rem; min-height: 0; }

  /* ---- Bottom tab bar ---- */
  /* Same specificity as the desktop sidebar rule (fixed, 256px, full height)
     and later in the file, so this wins on phones. */
  body.admin-body .admin-tabs,
  body.admin-body.admin-authenticated .admin-tabs {
    position: fixed;
    inset: auto 0 0 0;
    left: 0; right: 0; bottom: 0;
    top: auto;
    min-height: 0;
    flex-direction: row;
    gap: 0;
    overflow-y: visible;
    z-index: 45;
    width: auto;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid var(--admin-border);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 -8px 24px rgba(27, 38, 74, 0.08);
    overflow: visible;
  }
  body.admin-body .admin-sidebar-brand,
  body.admin-body .admin-nav-label { display: none !important; }
  body.admin-body .admin-tab-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }
  body.admin-body .tab-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    width: auto;
    padding: 6px 2px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--admin-muted);
    box-shadow: none;
    transform: none;
  }
  body.admin-body .tab-btn:hover { transform: none; }
  body.admin-body .tab-btn > span:not(.tab-glyph):not(.tab-count) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.admin-body .tab-btn .tab-glyph {
    display: grid;
    place-items: center;
    width: 30px;
    height: 26px;
    margin: 0;
    border-radius: 999px;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, width 0.25s ease;
  }
  body.admin-body .tab-btn .tab-glyph svg { width: 19px; height: 19px; }
  body.admin-body .tab-btn.active { color: var(--admin-primary); background: transparent; }
  body.admin-body .tab-btn.active .tab-glyph {
    width: 46px;
    background: rgba(108, 99, 255, 0.14);
    color: var(--admin-primary);
  }
  body.admin-body .tab-btn .tab-count {
    position: absolute;
    top: 2px;
    left: calc(50% + 8px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    margin: 0;
    border-radius: 999px;
    font-size: 0.6rem;
    line-height: 17px;
    text-align: center;
    background: var(--admin-primary);
    color: #fff;
    box-shadow: 0 0 0 2px #fff;
  }


  body.admin-body.admin-authenticated #admin-app.admin-workspace:not(.hidden) { margin-left: 0; min-height: 0; }

  /* Keep content clear of the fixed bar. */
  body.admin-body.admin-authenticated .admin-console,
  body.admin-body.admin-authenticated .admin-grid { padding-bottom: calc(var(--admin-bottom-nav) + 18px + env(safe-area-inset-bottom, 0px)); }

  /* ---- Page rhythm ---- */
  body.admin-body .panel { padding: 16px; border-radius: 18px; }
  body.admin-body .page-title-row { margin-bottom: 10px; }
  body.admin-body .page-title-row h1,
  body.admin-body .tab-content > .panel > .section-head h1,
  body.admin-body .tab-content .section-head h1 { font-size: 1.45rem; line-height: 1.2; }
  body.admin-body .section-head h2 { font-size: 1.15rem; }
  body.admin-body .section-head p { font-size: 0.84rem; }

  /* ---- List pages: title + action on one line, filters in two columns ---- */
  body.admin-body .action-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  body.admin-body .action-header .section-head { flex: 1 1 60%; min-width: 0; }
  body.admin-body .action-header .section-actions {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    display: flex;
    gap: 8px;
  }
  body.admin-body .action-header .section-actions > * { flex: 0 0 auto; width: auto; min-height: 38px; }
  body.admin-body .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }
  body.admin-body .filter-bar > * { min-width: 0; margin: 0; }
  body.admin-body .filter-bar .search-group,
  body.admin-body .filter-bar .filter-actions { grid-column: 1 / -1; }
  body.admin-body .filter-bar input,
  body.admin-body .filter-bar select { width: 100%; min-width: 0; }
  body.admin-body .filter-bar input[type="datetime-local"],
  body.admin-body .filter-bar input[type="date"] { font-size: 0.8rem; padding-left: 8px; padding-right: 6px; }
  body.admin-body .filter-bar label,
  body.admin-body .filter-bar .filter-group > span { font-size: 0.74rem; }
  body.admin-body .filter-actions { display: flex; gap: 8px; }
  body.admin-body .filter-actions > * { flex: 1 1 0; }
  body.admin-body .list-summary-row { gap: 8px; }

  /* ---- Dashboard stats: two columns ---- */
  /* An earlier 720px layer forces 1fr !important here. */
  body.admin-body .dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  body.admin-body .dashboard-stats-grid .stat-card { padding: 12px 12px 10px; min-height: 0; }
  body.admin-body .stat-card-head { flex-wrap: wrap; gap: 4px; }
  body.admin-body .stat-card-head span { font-size: 0.64rem; letter-spacing: 0.04em; }
  body.admin-body .stat-card-head em { font-size: 0.6rem; padding: 2px 6px; }
  body.admin-body .dashboard-stats-grid .stat-card strong { font-size: 1.35rem; }
  body.admin-body .stat-sparkline { height: 22px; margin-top: 6px; }

  /* ---- Order cards: denser, two-column details and actions ---- */
  body.admin-body .order-card { padding: 12px; }
  body.admin-body .order-card-selection { gap: 10px; }
  body.admin-body .order-header { gap: 6px; padding-bottom: 10px; }
  body.admin-body .order-body { gap: 10px; }
  body.admin-body .order-section { padding: 12px; }
  body.admin-body .order-customer-info .detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
  body.admin-body .order-customer-info .detail-row { min-width: 0; }
  body.admin-body .order-customer-info .detail-row strong,
  body.admin-body .order-customer-info .detail-row span { overflow-wrap: anywhere; }
  body.admin-body .order-customer-info .detail-row-block { grid-column: 1 / -1; }
  body.admin-body .order-actions-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }
  body.admin-body .order-actions-row .card-action-spacer { display: none; }
  body.admin-body .order-actions-row > button:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }

  /* Comfortable tap targets for list actions. */
  body.admin-body .card-action-row .secondary-btn,
  body.admin-body .card-action-row .primary-btn,
  body.admin-body .order-actions-row button {
    min-height: 40px;
    width: 100%;
    justify-content: center;
  }

  /* User cards: badges wrap under the name. */
  body.admin-body .admin-user-card-head { flex-wrap: wrap; gap: 8px; }
  body.admin-body .admin-user-badges { flex-wrap: wrap; gap: 6px; }
  body.admin-body .admin-user-card .card-action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
  }
  body.admin-body .admin-user-card .card-action-spacer { display: none; }

  /* 2FA panel: stack the pill under the title; full-width code row. */
  body.admin-body .twofa-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 12px;
  }
  body.admin-body .twofa-icon { width: 40px; height: 40px; border-radius: 12px; }
  body.admin-body .twofa-head-text { min-width: 0; }
  body.admin-body .twofa-head-text h2 { font-size: 1.05rem; }
  body.admin-body .twofa-head-text p { font-size: 0.8rem; }
  body.admin-body .twofa-status-pill { grid-column: 2; justify-self: start; }
  body.admin-body .twofa-code-row input { flex: 1 1 100%; width: 100%; }
  body.admin-body .twofa-code-row .twofa-btn { flex: 1 1 0; }

  /* ---- Login: lead with the form, not the marketing block ---- */
  body.admin-body .admin-login-panel { padding: 14px; gap: 0; }
  body.admin-body .admin-login-panel .login-copy { display: none; }
  body.admin-body .admin-login-panel { min-height: 0 !important; }
  body.admin-body .login-form-card {
    padding: 20px 18px;
    min-height: 0 !important;
    justify-content: flex-start !important;
    gap: 14px;
  }
  body.admin-body .login-form-card .section-head { padding: 0; margin: 0 0 4px; }
}

/* Touch screens: no sticky hover-lift after a tap. */
@media (hover: none) {
  body.admin-body .panel:hover,
  body.admin-body .dashboard-stats-grid .stat-card:hover,
  body.admin-body .admin-user-card:hover,
  body.admin-body .admin-orders-list > *:hover,
  body.admin-body .admin-products-grid > *:hover,
  body.admin-body .primary-btn:hover,
  body.admin-body .secondary-btn:hover {
    transform: none;
  }
}

/* Zero counts: admin.js sets [hidden] on a tab count of 0, but an older
   display rule kept showing "0". Honour the attribute everywhere. */
body.admin-body .tab-count[hidden] { display: none !important; }

/* Phone overrides for the list pages. Earlier layers pin these to one column
   with ID selectors and !important, so match them here, later in the file. */
@media (max-width: 720px) {
  body.admin-body #tab-orders .action-header,
  body.admin-body #tab-products .action-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start;
    gap: 10px;
    margin-bottom: 12px;
  }
  body.admin-body #tab-orders .section-actions,
  body.admin-body #tab-products .section-actions {
    width: auto !important;
    margin: 0 !important;
  }
  body.admin-body #tab-orders .section-actions > *,
  body.admin-body #tab-products .section-actions > * {
    width: auto !important;
    flex: 0 0 auto !important;
    min-height: 38px;
    padding: 8px 14px;
  }
  body.admin-body #tab-orders .action-header .section-head h2,
  body.admin-body #tab-products .action-header .section-head h2,
  body.admin-body .action-header .section-head h2,
  body.admin-body .page-title-row .section-head h1,
  body.admin-body .page-title-row .section-head h2 {
    font-size: 1.45rem !important;
    line-height: 1.15;
  }
  body.admin-body #tab-orders .filter-bar,
  body.admin-body #tab-products .filter-bar,
  body.admin-body .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  body.admin-body #tab-orders .filter-bar > *,
  body.admin-body #tab-products .filter-bar > * { grid-column: auto !important; min-width: 0; }
  body.admin-body #tab-orders .filter-bar .search-group,
  body.admin-body #tab-orders .filter-bar .filter-actions,
  body.admin-body #tab-products .filter-bar .search-group,
  body.admin-body #tab-products .filter-bar .filter-actions { grid-column: 1 / -1 !important; }
}
@media (max-width: 720px) {
  /* Products keeps Category / Brand / Stock inside one filter group. */
  body.admin-body #tab-products .filter-bar > .filter-group {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: auto !important;
    align-items: end !important;
  }
  body.admin-body #tab-products .filter-bar > .filter-group > * { min-width: 0; }
  body.admin-body #tab-products .filter-bar > .filter-group select { font-size: 0.8rem; padding-left: 8px; }
}

/* =====================================================================
   ADMIN — PHONE CLEAN PASS (<= 720px)
   One card level, one left edge, one control language. Removes the
   card-inside-card nesting, the 20px title indent, the 47px checkbox gutter
   in order cards, and turns the permanent status row into a toast.
   ===================================================================== */
@media (max-width: 720px) {
  body.admin-body {
    --m-gutter: 14px;
    --m-radius: 16px;
    --m-line: #eceef4;
    --m-card-shadow: 0 1px 2px rgba(23, 32, 51, 0.04), 0 6px 18px rgba(23, 32, 51, 0.05);
  }
  body.admin-body .admin-grid { padding-left: 0; padding-right: 0; }
  body.admin-body.admin-authenticated .admin-console { width: 100% !important; }

  /* ---------- Header: brand + role on one line, actions as an even row ---------- */
  body.admin-body .admin-topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 10px;
    padding: 12px var(--m-gutter) 12px;
    border-bottom: 1px solid var(--m-line);
    background: #fff;
    backdrop-filter: none;
  }
  body.admin-body .admin-topbar-actions,
  body.admin-body .admin-topbar-status { display: contents !important; }
  body.admin-body #payment-mode-pill { display: none !important; }
  body.admin-body .admin-brand { grid-column: 1; grid-row: 1; }
  body.admin-body .admin-role-pill {
    grid-column: 2; grid-row: 1;
    padding: 5px 10px !important;
    min-height: 0 !important;
    font-size: 0.72rem !important;
    border-radius: 999px !important;
  }
  body.admin-body .admin-topbar-controls,
  body.admin-body.admin-authenticated .admin-topbar-controls {
    grid-column: 1 / -1; grid-row: 2;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 0 !important;
  }
  body.admin-body .admin-topbar-controls > .hidden { display: none !important; }
  body.admin-body .admin-topbar-controls > *,
  body.admin-body.admin-authenticated .admin-topbar-controls > *,
  body.admin-body .admin-topbar-controls .secondary-btn,
  body.admin-body .admin-topbar-controls .report-menu-toggle {
    width: 100% !important;
    min-height: 38px !important;
    padding: 8px 6px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    background: #f6f7fb !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: var(--admin-text) !important;
  }
  body.admin-body .admin-report-menu { width: 100%; }
  body.admin-body .report-menu-list { left: 0 !important; right: auto !important; top: calc(100% + 6px); }
  body.admin-body .logout-btn { color: #b42318 !important; }
  body.admin-body:not(.admin-authenticated) .admin-topbar-controls { display: none !important; }

  /* ---------- Status: a toast, not a permanent row ---------- */
  body.admin-body #admin-status {
    position: fixed;
    left: 50%;
    bottom: calc(var(--admin-bottom-nav, 64px) + 16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 44;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 9px 16px;
    border-radius: 999px;
    border: 0;
    background: #172033;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(23, 32, 51, 0.25);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  body.admin-body:not(.admin-authenticated) #admin-status { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  body.admin-body #admin-status::before { display: none; }
  body.admin-body #admin-status.is-error { background: #b42318; }
  body.admin-body #admin-status.is-faded {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  /* ---------- Page structure: title on the canvas, one card level ---------- */
  body.admin-body .tab-content { padding: 16px var(--m-gutter) 0; }
  body.admin-body #tab-orders > .panel,
  body.admin-body #tab-products > .panel,
  body.admin-body #tab-support > .panel:first-of-type:not(.support-inbox-panel) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  body.admin-body .tab-content .section-head,
  body.admin-body .tab-content .section-head.compact { padding: 0 !important; margin: 0; }
  body.admin-body .page-title-row,
  body.admin-body #tab-orders .action-header,
  body.admin-body #tab-products .action-header { margin: 0 0 14px !important; padding: 0 !important; }
  body.admin-body .tab-content .section-head h1,
  body.admin-body .tab-content .action-header .section-head h2,
  body.admin-body #tab-orders .action-header .section-head h2,
  body.admin-body #tab-products .action-header .section-head h2 {
    font-size: 1.4rem !important;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 4px;
  }
  body.admin-body .tab-content .section-head p { font-size: 0.82rem; color: var(--admin-muted); margin: 0; line-height: 1.45; }
  body.admin-body #tab-orders .section-actions > *,
  body.admin-body #tab-products .section-actions > * {
    min-height: 34px !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-size: 0.8rem !important;
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    box-shadow: none !important;
  }

  /* Remaining panels share the same card language. */
  body.admin-body .tab-content .panel:not(.twofa-panel) {
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    box-shadow: var(--m-card-shadow);
  }
  body.admin-body .tab-content .panel:hover { transform: none; box-shadow: var(--m-card-shadow); }

  /* ---------- Filters: a single card, one control style ---------- */
  body.admin-body #tab-orders .filter-bar,
  body.admin-body #tab-products .filter-bar {
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-card-shadow) !important;
    padding: 14px !important;
    gap: 12px 10px !important;
    margin: 0 0 14px !important;
  }
  body.admin-body .filter-bar input,
  body.admin-body .filter-bar select {
    min-height: 42px;
    border-radius: 11px;
    border: 1px solid #e3e6ee;
    background: #fbfbfd;
    font-size: 0.86rem;
  }
  body.admin-body .filter-bar label > span:first-child,
  body.admin-body .filter-bar .filter-group > span,
  body.admin-body .filter-bar .search-group > label > span {
    font-size: 0.7rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
  }
  /* "Select All" as a plain checkbox, aligned with the status select. */
  body.admin-body #tab-orders .filter-bar > :nth-child(2) {
    align-self: end;
    min-height: 42px;
    display: flex;
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
  }
  body.admin-body #tab-orders .filter-bar > :nth-child(2) * { background: transparent !important; border-color: transparent; }
  body.admin-body #tab-orders .filter-bar > :nth-child(2) label { padding: 0 !important; gap: 8px; font-size: 0.86rem; }
  /* Dates need the full width to show day and time without clipping. */
  body.admin-body #tab-orders .filter-bar .order-date-filter-from,
  body.admin-body #tab-orders .filter-bar .order-date-filter-to { grid-column: 1 / -1 !important; }
  body.admin-body #tab-orders .filter-bar input[type="datetime-local"] { font-size: 0.86rem; padding-left: 12px; }
  body.admin-body .filter-actions > * {
    min-height: 40px !important;
    border-radius: 11px !important;
    background: transparent !important;
    border: 1px dashed #d9dce6 !important;
    color: var(--admin-muted) !important;
    box-shadow: none !important;
  }

  /* Result line + quick filters as chips. */
  body.admin-body .list-summary-row {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 12px !important;
    padding: 0 !important;
  }
  body.admin-body .list-summary-row > span { font-size: 0.8rem; color: var(--admin-muted); }
  body.admin-body .quick-filter-group { display: flex !important; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  body.admin-body .quick-filter-group::-webkit-scrollbar { display: none; }
  body.admin-body .quick-filter-group > * {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 34px !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 0.8rem !important;
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    box-shadow: none !important;
  }
  body.admin-body .quick-filter-group > .active,
  body.admin-body .quick-filter-group > [aria-pressed="true"] {
    background: var(--admin-text) !important;
    color: #fff !important;
    border-color: var(--admin-text) !important;
  }

  /* ---------- Order card: flat sections, checkbox in the header ---------- */
  body.admin-body .order-card {
    position: relative;
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-card-shadow) !important;
    padding: 14px !important;
    margin-bottom: 12px;
    overflow: hidden;
  }
  body.admin-body .order-card.needs-action::before {
    content: "";
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #f59e0b;
  }
  body.admin-body .order-card-selection { display: block !important; position: relative; }
  body.admin-body .order-card-selection > .order-checkbox {
    position: absolute;
    top: 3px; left: 0;
    width: 18px; height: 18px;
    margin: 0;
  }
  body.admin-body .order-header { padding: 0 0 12px 30px !important; border-bottom: 0 !important; }
  body.admin-body .order-header h3,
  body.admin-body .order-header strong:first-child { font-size: 0.98rem; letter-spacing: -0.01em; overflow-wrap: anywhere; }
  body.admin-body .order-body { display: block !important; }
  body.admin-body .order-section {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--m-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 12px 0 !important;
    margin: 0 !important;
  }
  body.admin-body .order-section h4 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--admin-muted);
    margin: 0 0 8px;
  }
  body.admin-body .order-customer-info .detail-row > :first-child { font-size: 0.72rem; color: var(--admin-muted); }
  body.admin-body .order-customer-info .detail-row > :last-child { font-size: 0.9rem; font-weight: 600; }
  body.admin-body .order-item-row { font-size: 0.88rem; }
  body.admin-body .order-total-row { font-size: 0.84rem; }
  body.admin-body .order-total-row.final { font-size: 1rem; padding-top: 8px; }
  body.admin-body .order-actions-row {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--m-line) !important;
    border-radius: 0 !important;
    padding: 12px 0 0 !important;
    margin: 0 !important;
  }

  /* ---------- Product card: checkbox as a chip on the image ---------- */
  body.admin-body .admin-product-card {
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-card-shadow) !important;
    padding: 14px !important;
  }
  body.admin-body .admin-product-summary { position: relative; }
  body.admin-body .product-select-cell {
    position: absolute !important;
    top: 6px; left: 6px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    margin: 0 !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(23, 32, 51, 0.15);
  }
  body.admin-body .admin-product-image { border-radius: 12px; }
  body.admin-body .product-card-actions-row {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--m-line) !important;
    border-radius: 0 !important;
    padding: 12px 0 0 !important;
    margin-top: 12px !important;
  }

  /* ---------- User card: flat actions ---------- */
  body.admin-body .admin-user-card {
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: none !important;
    padding: 14px !important;
  }
  body.admin-body .admin-user-card .card-action-row {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--m-line) !important;
    border-radius: 0 !important;
    padding: 12px 0 0 !important;
    margin-top: 10px !important;
  }
  body.admin-body .admin-user-meta { font-size: 0.78rem; color: var(--admin-muted); }

  /* ---------- One button language inside cards ---------- */
  body.admin-body .card-action-row .secondary-btn,
  body.admin-body .order-actions-row button {
    min-height: 40px !important;
    border-radius: 11px !important;
    font-size: 0.82rem !important;
    font-weight: 600;
    background: #f6f7fb !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: var(--admin-text) !important;
  }
  body.admin-body .card-action-row .delete-btn {
    background: #fef3f2 !important;
    color: #b42318 !important;
  }

  /* ---------- Dashboard stats: label, badge, value — same shape every card ---------- */
  body.admin-body .dashboard-stats-grid .stat-card {
    border: 1px solid var(--m-line) !important;
    border-radius: 14px !important;
    box-shadow: var(--m-card-shadow) !important;
    padding: 12px !important;
  }
  body.admin-body .stat-card-head {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  body.admin-body .stat-card-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  body.admin-body .stat-card-head em { order: 2; }
  body.admin-body .dashboard-stats-grid .stat-card strong { margin-top: 6px; display: block; }
  body.admin-body .dashboard-date-filter { margin: 0 0 12px !important; }

  /* ---------- Bottom bar badges: one colour ---------- */
  body.admin-body .tab-btn .tab-count,
  body.admin-body .tab-btn:not(.active) .tab-count {
    background: var(--admin-primary) !important;
    color: #fff !important;
    border: 0 !important;
  }
}
@media (max-width: 720px) {
  /* The Report button sits in a wrapper; style the button, not both. */
  body.admin-body .admin-topbar-controls > .admin-report-menu,
  body.admin-body.admin-authenticated .admin-topbar-controls > .admin-report-menu {
    background: transparent !important;
    padding: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    display: block !important;
  }
  body.admin-body .admin-report-menu > .report-menu-toggle { width: 100% !important; }
}
@media (max-width: 720px) {
  body.admin-body #dashboard-date-filter,
  body.admin-body .dashboard-date-filter {
    margin: 0 0 12px !important;
    width: 100% !important;
    max-width: none !important;
  }
  body.admin-body .dashboard-date-filter .date-filter-trigger {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--m-line);
    background: #fff;
    box-shadow: var(--m-card-shadow);
  }
}
@media (max-width: 720px) {
  /* Primary page actions (Add Product) keep their filled look. */
  body.admin-body #tab-orders .section-actions > .primary-btn,
  body.admin-body #tab-products .section-actions > .primary-btn {
    background: var(--admin-text) !important;
    color: #fff !important;
    border-color: var(--admin-text) !important;
  }
  /* Product cards size to content; the desktop grid pinned 230px. */
  body.admin-body .admin-product-card { min-height: 0 !important; gap: 0 !important; }
  body.admin-body .admin-product-summary { align-items: start; }
}
@media (max-width: 720px) {
  /* List wrappers don't draw their own box around the cards. */
  body.admin-body .admin-users-list,
  body.admin-body .admin-orders-list,
  body.admin-body .admin-products-grid,
  body.admin-body #admin-products {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  body.admin-body .admin-users-list { display: grid; gap: 10px; margin-top: 14px; }

  /* Forms: same label and field language as the filter cards. */
  body.admin-body .tab-content .admin-form label:not(.checkbox-row) > span:first-child {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
  }
  body.admin-body .tab-content .admin-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  body.admin-body .tab-content .admin-form select,
  body.admin-body .tab-content .admin-form textarea {
    min-height: 42px;
    border-radius: 11px;
    border: 1px solid #e3e6ee;
    background: #fbfbfd;
    font-size: 0.9rem;
  }
  body.admin-body .tab-content .admin-form-grid { gap: 12px; }
  body.admin-body .tab-content .form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--m-line);
  }
  body.admin-body .tab-content .form-actions > .form-action-spacer { display: none; }
  body.admin-body .tab-content .form-actions > button {
    width: 100% !important;
    min-height: 42px !important;
    border-radius: 11px !important;
    font-size: 0.86rem !important;
  }
  body.admin-body .tab-content .form-actions > button:only-of-type { grid-column: 1 / -1; }
  body.admin-body .tab-content .form-actions > .secondary-btn {
    background: #f6f7fb !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
  }
}
@media (max-width: 720px) {
  /* Titles inside a card still need room before the content. */
  body.admin-body .tab-content .panel > .section-head,
  body.admin-body .tab-content .panel > .section-head.compact { margin-bottom: 16px !important; }
  body.admin-body .tab-content .panel > .section-head h2 { font-size: 1.1rem !important; margin: 0 0 2px; }
}
@media (max-width: 720px) {
  /* Support channel switch as a segmented control. */
  body.admin-body .support-channel-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    padding: 4px !important;
    margin: 0 0 14px !important;
    background: #eceef4 !important;
    border-radius: 13px !important;
  }
  body.admin-body .support-channel-tabs > button {
    width: 100% !important;
    min-height: 36px !important;
    padding: 6px 8px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--admin-muted) !important;
    font-size: 0.84rem !important;
    font-weight: 600;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  body.admin-body .support-channel-tabs > button.active {
    background: #fff !important;
    color: var(--admin-text) !important;
    box-shadow: 0 1px 3px rgba(23, 32, 51, 0.12) !important;
  }
  body.admin-body .support-channel-tabs .support-channel-count[hidden],
  body.admin-body .support-channel-tabs .tab-count:empty { display: none !important; }
  body.admin-body #tab-support .page-title-row { display: block !important; }
}
@media (max-width: 720px) {
  body.admin-body .support-channel-tabs { margin-top: 12px !important; }
  /* Support inbox filters: one scrollable chip row instead of 7 stacked bars. */
  body.admin-body .support-filter-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto;
    padding: 2px 2px 6px !important;
    margin: 0 -2px !important;
    scrollbar-width: none;
  }
  body.admin-body .support-filter-list::-webkit-scrollbar { display: none; }
  body.admin-body .support-filter-list > * {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 34px !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 0.8rem !important;
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    box-shadow: none !important;
    color: var(--admin-text) !important;
    white-space: nowrap;
  }
  body.admin-body .support-filter-list > .active,
  body.admin-body .support-filter-list > [aria-pressed="true"] {
    background: var(--admin-text) !important;
    color: #fff !important;
    border-color: var(--admin-text) !important;
  }
}
@media (max-width: 720px) {
  /* Storefront settings: section cards straight on the canvas. */
  body.admin-body #tab-storefront > .panel:has(.storefront-editor-grid) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  body.admin-body #tab-storefront > .panel:has(.storefront-editor-grid) > .section-head h2 {
    font-size: 1.4rem !important;
    letter-spacing: -0.02em;
  }
  body.admin-body .storefront-editor-grid { display: grid !important; gap: 12px !important; }
  body.admin-body .storefront-editor-card {
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    border-image: none !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-card-shadow) !important;
    padding: 14px !important;
  }
  body.admin-body .storefront-editor-card::before,
  body.admin-body .storefront-editor-card::after { display: none !important; }
  body.admin-body .storefront-editor-card .editor-header {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  body.admin-body .storefront-editor-card .editor-header .section-head { flex: 1 1 auto; min-width: 0; margin: 0 !important; }
  body.admin-body .storefront-editor-card .editor-header h3 { font-size: 1rem; margin: 0 0 2px; }
  body.admin-body .storefront-editor-card .editor-header p { font-size: 0.8rem; color: var(--admin-muted); margin: 0; }
  body.admin-body .storefront-editor-card .editor-toggle-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 64px;
    min-height: 34px !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
    font-size: 0.8rem !important;
    background: #f6f7fb !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
  }
  body.admin-body .storefront-editor-card .editor-summary {
    background: #f7f8fb !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 12px !important;
    margin: 0 !important;
  }
  body.admin-body .storefront-editor-card .editor-summary-label {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }
  body.admin-body .storefront-editor-card .editor-summary p { font-size: 0.86rem; line-height: 1.5; }
}
@media (max-width: 720px) {
  /* Edit pop-up as a bottom sheet: solid, sized to content, actions pinned. */
  body.admin-body .admin-editor-overlay {
    background: rgba(23, 32, 51, 0.42) !important;
    padding: 0 !important;
    align-items: end !important;
    justify-items: stretch !important;
  }
  body.admin-body .admin-editor-panel {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 28px) !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 22px 22px 0 0 !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 0 -16px 44px rgba(23, 32, 51, 0.22) !important;
    animation: uiSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  body.admin-body .admin-editor-header {
    position: relative;
    flex: 0 0 auto;
    padding: 20px 16px 12px !important;
    border-bottom: 1px solid var(--m-line) !important;
    background: #fff !important;
  }
  body.admin-body .admin-editor-header::before {
    content: "";
    position: absolute;
    top: 8px; left: 50%;
    width: 38px; height: 4px;
    margin-left: -19px;
    border-radius: 999px;
    background: #d9dce6;
  }
  body.admin-body .admin-editor-header h2 { font-size: 1.05rem !important; margin: 0 0 2px; }
  body.admin-body .admin-editor-header p { font-size: 0.8rem !important; color: var(--admin-muted); margin: 0; }
  body.admin-body .admin-editor-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px 0 !important;
    background: #fff !important;
  }
  body.admin-body .admin-editor-body .editor-summary-banner {
    background: #f7f8fb !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 12px !important;
    margin: 0 0 14px !important;
  }
  body.admin-body .admin-editor-panel .admin-form label:not(.checkbox-row) > span:first-child {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
  }
  body.admin-body .admin-editor-panel .admin-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  body.admin-body .admin-editor-panel .admin-form select,
  body.admin-body .admin-editor-panel .admin-form textarea {
    min-height: 42px;
    border-radius: 11px;
    border: 1px solid #e3e6ee;
    background: #fbfbfd;
    font-size: 0.92rem;
    font-family: inherit;
    padding: 10px 12px;
  }
  body.admin-body .admin-editor-panel .admin-form textarea { min-height: 96px; line-height: 1.5; }
  body.admin-body .admin-editor-panel .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px -16px 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff !important;
    border-top: 1px solid var(--m-line);
  }
  body.admin-body .admin-editor-panel .form-actions > .form-action-spacer { display: none; }
  body.admin-body .admin-editor-panel .form-actions > button {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 600;
  }
  body.admin-body .admin-editor-panel .form-actions > .secondary-btn {
    background: #f6f7fb !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
  }
}
@media (max-width: 720px) {
  /* The signed-in header rule made it sticky at z-index 70, above the edit
     sheet (60). On phones it scrolls with the page and sits under overlays. */
  body.admin-body.admin-authenticated .admin-topbar {
    position: relative !important;
    top: auto !important;
    z-index: 30 !important;
  }
}

/* =====================================================================
   STOREFRONT — ABA CHECKOUT → PAYMENT → SUCCESS
   Ported from the digital-invitation CheckoutFlow (payment-screen, aba-card,
   merchant rows, waiting status, payment-success), in KSN's wine/cream.
   ===================================================================== */
@keyframes payRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes payPop { from { opacity: 0; transform: scale(0.85); } 60% { transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }
@keyframes paySpin { to { transform: rotate(360deg); } }
@keyframes payDraw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

body.store-body .pay-screen,
body.store-body .payment-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 6px 2px 4px;
  animation: payRise 0.55s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
body.store-body .pay-overline {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}
body.store-body .pay-title {
  margin: 6px 0 4px;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--charcoal), var(--wine) 70%, #b0705a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.store-body .pay-lead {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #7a6a6c;
}

/* The bank's own card is the hero. */
body.store-body .aba-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
  width: 100%;
}
body.store-body .aba-card {
  display: block;
  width: min(100%, 260px);
  height: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(84, 48, 52, 0.18);
  animation: payRise 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
body.store-body .aba-card.is-khqr { padding: 14px; border: 1px solid #f0e4df; }
body.store-body .aba-preparing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 22px 18px;
  width: min(100%, 260px);
  border-radius: 18px;
  border: 1px dashed #e8d6d1;
  background: var(--cream);
  color: #7a6a6c;
  font-size: 0.86rem;
  text-align: left;
}
body.store-body .aba-countdown {
  margin: 0;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  color: #7a6a6c;
}
body.store-body .aba-countdown b { color: var(--charcoal); font-weight: 700; }
body.store-body .aba-countdown.urgent,
body.store-body .aba-countdown.urgent b { color: #b3541e; }
body.store-body .aba-countdown.expired,
body.store-body .aba-countdown.expired b { color: #98304a; }
body.store-body .aba-countdown.expired > span { display: none; }

/* Receipt rows under the card. */
body.store-body .pay-receipt {
  width: 100%;
  max-width: 340px;
  margin: 0 0 16px;
  border: 1px solid #f0e4df;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  text-align: left;
}
body.store-body .merchant-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  font-size: 0.82rem;
}
body.store-body .merchant-row + .merchant-row { border-top: 1px solid #f4ebe7; }
body.store-body .merchant-row span { color: #8a7a7c; }
body.store-body .merchant-row strong { color: var(--charcoal); text-align: right; overflow-wrap: anywhere; }
body.store-body .merchant-row.total { background: var(--cream); }
body.store-body .merchant-row.total strong { font-size: 1.05rem; color: var(--wine); }

body.store-body .pay-screen .access-pin-card { width: 100%; max-width: 340px; margin: 0 0 16px; }

/* "I've paid — check now" + the waiting line. */
body.store-body .pay-check-now {
  width: 100%;
  max-width: 340px;
  min-height: 48px;
  border-radius: 14px;
  font-size: 0.95rem;
  box-shadow: 0 12px 26px rgba(127, 61, 70, 0.25);
}
body.store-body .pay-check-now:disabled { opacity: 0.7; cursor: progress; }
body.store-body .check-note {
  margin: 10px auto 0;
  max-width: 320px;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #9a8b8d;
}
body.store-body .waiting-status {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin: 16px 0 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--cream);
  text-align: left;
}
body.store-body .waiting-status p { margin: 0; }
body.store-body .waiting-status strong { display: block; font-size: 0.84rem; color: var(--charcoal); }
body.store-body .waiting-status small { display: block; margin-top: 2px; font-size: 0.74rem; color: #8a7a7c; }
body.store-body .pay-spinner {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(127, 61, 70, 0.18);
  border-top-color: var(--wine);
  animation: paySpin 0.9s linear infinite;
}
body.store-body .pay-screen .payment-panel-actions { width: 100%; max-width: 340px; justify-content: center; margin-top: 8px; }
body.store-body .pay-screen .payment-panel-actions:empty { display: none; }
body.store-body .pay-screen .payment-panel-actions .secondary-btn { width: 100%; }
body.store-body .pay-screen .qr-ended { width: min(100%, 260px); }
body.store-body .pay-terminal-note { max-width: 320px; }

/* Success. */
body.store-body .payment-success { padding-top: 22px; }
body.store-body .pay-success-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e9f7ee;
  color: #1f8a4c;
  box-shadow: 0 0 0 9px rgba(31, 138, 76, 0.09);
  animation: payPop 0.7s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
body.store-body .pay-success-mark svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  animation: payDraw 0.5s 0.35s ease-out both;
}
body.store-body .payment-success .pay-receipt { margin-top: 18px; }
body.store-body .pay-success-actions {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 340px;
}
body.store-body .pay-success-actions > * { width: 100%; min-height: 46px; border-radius: 14px; }

/* Checkout: the invitation's "encrypted" caption under the button. */
body.store-body .secure-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.74rem;
  color: #9a8b8d;
}
body.store-body .secure-caption::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2Zm2 0h6V7a3 3 0 0 0-6 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2Zm2 0h6V7a3 3 0 0 0-6 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.store-body .checkout-form .payment-summary {
  border-radius: 16px;
  background: linear-gradient(160deg, #3a1d23, var(--wine) 60%, #a5596a 140%);
  color: #fff;
  padding: 14px 16px;
}
body.store-body .checkout-form .payment-summary span,
body.store-body .checkout-form .payment-summary p { color: rgba(255, 255, 255, 0.72); }
body.store-body .checkout-form .payment-summary strong { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  body.store-body .pay-screen, body.store-body .payment-success, body.store-body .aba-card,
  body.store-body .pay-success-mark, body.store-body .pay-success-mark svg, body.store-body .pay-spinner { animation: none; }
  body.store-body .pay-success-mark svg { stroke-dasharray: none; }
}
/* The new screens carry their own heading; drop the panel's generic one. */
body.store-body #payment-panel:has(.pay-screen, .payment-success) > .section-head { display: none; }
