.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(20, 12, 8, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.sheet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  position: fixed;
  z-index: 1201;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  background: var(--admin-surface, var(--tw-paper, #fff));
  color: var(--admin-text, var(--tw-ink, #1b1511));
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
}
.sheet.is-open {
  transform: none;
}
.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  padding: 8px 10px 0;
  flex: 0 0 auto;
}
.sheet-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: var(--admin-border-strong, var(--tw-line-strong, #d9d0c6));
  transform: translateX(-50%);
}
.sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--admin-surface-soft, var(--tw-paper-2, #f3eee8));
  color: inherit;
  cursor: pointer;
}
.sheet-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.sheet-close:focus-visible {
  outline: 2px solid var(--admin-brand, var(--tw-brand, #ee4d2d));
  outline-offset: 2px;
}
.sheet-body {
  outline: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 18px calc(24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.sheet-body > section,
.sheet-body > div {
  max-width: none !important;
}
.sheet-body .detail-back,
.sheet-body .tw-back {
  display: none !important;
}
.sheet-body .page-heading,
.sheet-body .detail-head {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.sheet-body .tw-orders {
  margin-top: 0 !important;
}
.sheet-loading {
  height: 160px;
  border-radius: 14px;
  background: linear-gradient(90deg, transparent, rgba(128, 128, 128, .12), transparent);
  background-size: 200% 100%;
  animation: sheet-shimmer 1.1s linear infinite;
}
@keyframes sheet-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.sheet-error {
  margin: 24px 0;
  font-size: 14px;
}
body.sheet-locked {
  overflow: hidden;
}
@media (min-width: 761px) {
  .sheet {
    inset: 0 0 0 auto;
    width: min(600px, 100%);
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
  }
  .sheet-handle {
    display: none;
  }
  .sheet-head {
    padding: 14px 16px 0;
  }
  .sheet-body {
    padding: 0 28px 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet,
  .sheet-overlay {
    transition: none;
  }
  .sheet-loading {
    animation: none;
  }
}
.backoffice-shell .sheet-body h1,
.backoffice-shell .sheet-body h2,
.backoffice-shell .sheet-body h3 {
  color: var(--admin-text, var(--text)) !important;
}
.backoffice-shell .sheet-body .page-heading p {
  color: var(--admin-muted, var(--muted)) !important;
}
.backoffice-shell .sheet-body .page-heading h1 {
  font-size: 26px !important;
}
.sheet-body .page-heading,
.sheet-body .detail-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 16px !important;
  padding: 0 0 12px !important;
  border: 0 !important;
}
.sheet-body .detail-hero .detail-thumb:not(:has(img)) {
  display: none;
}
.sheet-body .detail-hero {
  display: block !important;
}
.sheet-body .detail-hero .detail-thumb {
  margin-bottom: 14px;
}
.sheet-body .detail-hero dl {
  width: 100%;
}
.sheet-body .detail-head {
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
}
.sheet-body .detail-head > :last-child {
  flex: 0 0 auto;
}

.st-dialog-scrim {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 20, 16, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: st-scrim-in .16s ease-out;
}
.st-dialog-scrim.is-closing {
  animation: st-scrim-out .14s ease-in forwards;
}
.st-dialog {
  width: min(360px, 100%);
  padding: 24px 22px 18px;
  border-radius: 20px;
  background: var(--admin-surface, var(--tw-paper, #fff));
  color: var(--admin-text, var(--tw-ink, #1b1511));
  text-align: center;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .5);
  animation: st-dialog-in .22s cubic-bezier(.32, .72, 0, 1);
}
.st-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--admin-surface-soft, var(--tw-paper-2, #f3eee8));
  color: var(--tw-ink, #1b1511);
  font-size: 20px;
  font-weight: 700;
}
.st-dialog-icon.is-danger {
  background: color-mix(in srgb, #c83d37 12%, var(--tw-paper, #fff));
  color: #c83d37;
}
.st-dialog h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.st-dialog p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--admin-muted, var(--tw-muted, #6f6259));
}
.st-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.st-dialog-actions:has(> :only-child) {
  grid-template-columns: 1fr;
}
.st-dialog-cancel,
.st-dialog-confirm {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.st-dialog-cancel {
  background: var(--admin-surface-soft, var(--tw-paper-2, #f3eee8));
  color: var(--tw-ink, #1b1511);
}
.st-dialog-confirm {
  background: var(--tw-brand, #ee4d2d);
  color: #fff;
  font-weight: 700;
}
.st-dialog-confirm.is-danger {
  background: #c83d37;
}
@keyframes st-scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-scrim-out { to { opacity: 0; } }
@keyframes st-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .st-dialog-scrim, .st-dialog { animation: none; }
}
.st-dialog-cancel:focus-visible,
.st-dialog-confirm:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .7);
  outline-offset: -4px;
}
