:root {
  color-scheme: light;
  --auth-wine: #3b090e;
  --auth-wine-dark: #240306;
  --auth-copper: #b96543;
  --auth-cream: #f8f3ee;
  --auth-paper: #fffdfa;
  --auth-text: #2a1715;
  --auth-muted: #765f59;
  --auth-border: #ded0c8;
  --auth-danger: #8f1f2d;
  --auth-success: #246447;
  --auth-warning: #72501c;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--auth-wine-dark); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(185, 101, 67, .26), transparent 34rem),
    linear-gradient(145deg, #260407 0%, #3b090e 58%, #1b0204 100%);
}

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

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-card {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 28px;
  background: var(--auth-cream);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
}

.auth-card-compact { width: min(100%, 480px); }
.auth-card-catalog { width: min(100%, 1120px); }

.auth-logo {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 22px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(36, 3, 6, .22);
}

.kicker {
  margin: 0 0 8px;
  color: var(--auth-copper);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.auth-copy,
.auth-message {
  margin: 14px 0 22px;
  color: var(--auth-muted);
  line-height: 1.52;
}

.auth-form { display: grid; gap: 16px; margin-top: 22px; }

.auth-field { display: grid; gap: 7px; }

.auth-field label {
  color: var(--auth-text);
  font-size: .9rem;
  font-weight: 750;
}

.auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  color: var(--auth-text);
  background: var(--auth-paper);
  outline: none;
}

.auth-field input:focus {
  border-color: var(--auth-copper);
  box-shadow: 0 0 0 3px rgba(185, 101, 67, .16);
}

.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 78px; }

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 62px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  color: var(--auth-wine);
  background: transparent;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 750;
}

.auth-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--auth-text);
  cursor: pointer;
  line-height: 1.4;
}

.auth-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--auth-wine); }

.auth-primary,
.auth-link {
  min-height: 48px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.auth-primary {
  border: 1px solid var(--auth-wine);
  color: white;
  background: var(--auth-wine);
  box-shadow: 0 10px 22px rgba(59, 9, 14, .2);
}

.auth-primary:hover { background: #501018; }
.auth-primary:disabled { cursor: wait; opacity: .64; }

.auth-link {
  border: 0;
  color: var(--auth-copper);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-alert {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: .9rem;
  line-height: 1.45;
}

.auth-alert-info { color: #315b73; border-color: #b9d4e2; background: #edf7fb; }
.auth-alert-success { color: var(--auth-success); border-color: #b8d9c9; background: #eef8f2; }
.auth-alert-warning { color: var(--auth-warning); border-color: #e2cfa8; background: #fff8e8; }
.auth-alert-danger { color: var(--auth-danger); border-color: #e4b8be; background: #fff0f2; }
.auth-alert[hidden] { display: none; }

.auth-help {
  margin: 14px 0 0;
  color: var(--auth-muted);
  font-size: .84rem;
  line-height: 1.45;
}

.auth-build {
  margin: 24px 0 0;
  color: var(--auth-muted);
  font-size: .72rem;
  opacity: .8;
  text-align: center;
}

.auth-profile {
  display: grid;
  gap: 10px;
  margin: 24px 0 18px;
}

.auth-profile > div {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: var(--auth-paper);
}

.auth-profile span { color: var(--auth-muted); font-size: .78rem; }
.auth-profile strong { overflow-wrap: anywhere; }

.auth-push {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 15px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: var(--auth-paper);
}

.auth-push strong { display: block; font-size: .92rem; }
.auth-push p { margin: 4px 0 0; color: var(--auth-muted); font-size: .82rem; line-height: 1.4; }
.auth-push .auth-primary { min-height: 42px; padding: 8px 14px; }
.auth-push[data-state='active'] { border-color: #b8d9c9; background: #eef8f2; }
.auth-push[data-state='blocked'],
.auth-push[data-state='error'] { border-color: #e2cfa8; background: #fff8e8; }

@media (max-width: 560px) {
  .auth-push { grid-template-columns: 1fr; }
  .auth-push .auth-primary { width: 100%; }
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 18px;
}

.catalog-item {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  background: var(--auth-paper);
}

.catalog-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 4px;
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #eee7e1;
}

.catalog-image > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.catalog-image.is-empty { display: grid; place-items: center; align-content: center; gap: 8px; color: var(--auth-muted); background: linear-gradient(145deg,#f8f3ee,#eee4dc); }
.catalog-image.is-empty img { width: 58px; height: 58px; border-radius: 14px; opacity: .55; }
.catalog-image.is-empty span { font-size: .75rem; font-weight: 750; }

.catalog-item > span { color: var(--auth-muted); font-size: .8rem; line-height: 1.4; }
.catalog-item > strong:not(.catalog-price) { font-size: 1.06rem; overflow-wrap: anywhere; }
.catalog-item p { margin: 0; color: var(--auth-text); font-size: .9rem; line-height: 1.45; }
.catalog-item .catalog-note { color: var(--auth-warning); }
.catalog-item.is-temporarily-unavailable { border-color: #d6b277; background: #fffaf1; }
.catalog-item .catalog-stock-status {
  justify-self: start;
  padding: 6px 10px;
  border: 1px solid #d6b277;
  border-radius: 999px;
  color: #6d4700;
  background: #fff1cf;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.2;
}
.catalog-item .catalog-price { align-self: end; margin-top: auto; padding-top: 3px; color: var(--auth-wine); font-size: 1.18rem; }

@media (max-width: 860px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .auth-shell { align-items: start; padding: 14px 10px; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
  .auth-logo { width: 88px; height: 88px; border-radius: 20px; }
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.admin-shell { align-items: start; padding: 24px 14px; }
.admin-card { width: min(100%, 1180px); }
.admin-header { display: flex; align-items: center; gap: 20px; }
.admin-header .auth-copy { margin-bottom: 0; }
.admin-logo { flex: 0 0 auto; margin: 0; }
.admin-account-bar, .admin-section-heading, .admin-actions, .admin-check-grid { display: flex; align-items: center; gap: 12px; }
.admin-account-bar, .admin-section-heading { justify-content: space-between; margin: 24px 0 16px; }
.admin-account-bar > div, .admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-account-bar button, .admin-actions button, .admin-record > button, .admin-subrecord button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--auth-border); border-radius: 10px; color: var(--auth-wine); background: var(--auth-paper); cursor: pointer; font-weight: 750; }
.admin-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 22px 0; }
.admin-nav button { min-height: 46px; padding: 8px 10px; border: 1px solid var(--auth-border); border-radius: 12px; color: var(--auth-text); background: var(--auth-paper); cursor: pointer; font-weight: 750; }
.admin-nav button.is-active { border-color: var(--auth-wine); color: white; background: var(--auth-wine); }
.admin-content h2, .admin-content h3 { margin: 0; }
.admin-content p { color: var(--auth-muted); }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,.9fr); gap: 18px; align-items: start; }
.admin-grid-products { grid-template-columns: minmax(280px,.72fr) minmax(420px,1.28fr); }
.admin-grid-products > .admin-list { max-height: clamp(420px,calc(100vh - 340px),720px); overflow-y: auto; overscroll-behavior: contain; align-content: start; padding-right: 6px; scrollbar-gutter: stable; }
.admin-grid-products > .admin-editor { position: static; align-self: start; scroll-margin-top: 12px; }
.admin-list, .admin-editor { display: grid; gap: 12px; }
.admin-editor { position: sticky; top: 12px; padding: 18px; border: 1px solid var(--auth-border); border-radius: 16px; background: rgba(255,253,250,.72); }
.admin-record, .admin-catalog-row { padding: 15px; border: 1px solid var(--auth-border); border-radius: 15px; background: var(--auth-paper); }
.admin-record { display: grid; gap: 10px; }
.admin-record-compact { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.admin-product-record { grid-template-columns: 72px minmax(0,1fr) auto; }
.admin-product-thumbnail { width: 72px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--auth-border); border-radius: 10px; object-fit: cover; background: #eee7e1; }
.admin-product-thumbnail.is-empty { color: var(--auth-muted); font-size: .72rem; font-weight: 800; }
.admin-record h3 { margin-top: 7px; }
.admin-record p { margin: 5px 0 0; font-size: .88rem; }
.admin-subrecord { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--auth-border); }
.admin-subrecord div, .admin-catalog-title { display: grid; gap: 3px; }
.admin-subrecord span, .admin-catalog-title span:last-child { color: var(--auth-muted); font-size: .82rem; }
.admin-status { display: inline-flex; width: fit-content; padding: 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.admin-status.is-active { color: var(--auth-success); background: #e3f4ea; }
.admin-status.is-inactive { color: var(--auth-muted); background: #eee8e3; }
.auth-field select, .auth-field textarea, .admin-catalog-fields input:not([type="checkbox"]) { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--auth-border); border-radius: 12px; color: var(--auth-text); background: var(--auth-paper); outline: none; font: inherit; }
.auth-field textarea { resize: vertical; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.admin-check-grid { flex-wrap: wrap; align-items: start; }
.admin-check-grid .auth-check { flex: 1 1 180px; }
.admin-product-photo { display: grid; grid-template-columns: minmax(180px,240px) 1fr; gap: 16px; align-items: start; padding: 14px; border: 1px solid var(--auth-border); border-radius: 15px; background: #fbf7f3; }
.admin-product-photo-preview { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--auth-border); border-radius: 12px; background: #eee7e1; }
.admin-product-photo-preview > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.admin-product-photo-empty { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--auth-muted); }
.admin-product-photo-empty img { width: 64px; height: 64px; border-radius: 14px; opacity: .5; }
.admin-product-photo-empty span { font-size: .78rem; font-weight: 750; }
.admin-product-photo > div:last-child { display: grid; justify-items: start; gap: 8px; }
.admin-product-photo p { margin: 0; font-size: .85rem; line-height: 1.45; }
.admin-product-photo input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.admin-product-photo-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 14px; border: 1px solid var(--auth-wine); border-radius: 11px; color: white; background: var(--auth-wine); cursor: pointer; font-weight: 800; }
.admin-product-photo-button:hover { background: #501018; }
.admin-product-photo input[type="file"]:focus + .admin-product-photo-button { outline: 3px solid rgba(185,101,67,.24); outline-offset: 2px; }
.admin-inline-button { width: auto; min-width: 150px; padding: 8px 14px; }
.admin-customer-picker { max-width: 520px; margin-bottom: 14px; }
.admin-catalog-row { display: grid; gap: 14px; margin-top: 18px; border-color: #d9cbc0; box-shadow: 0 5px 16px rgba(59, 9, 14, .06); }
.admin-catalog-row[hidden] { display: none; }
.admin-catalog-tools { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,360px); align-items: end; gap: 12px; margin: 12px 0 14px; }
.admin-catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.admin-catalog-filter { min-height: 40px; padding: 8px 13px; border: 1px solid var(--auth-border); border-radius: 999px; color: var(--auth-text); background: var(--auth-paper); cursor: pointer; font-weight: 750; }
.admin-catalog-filter strong { color: var(--auth-wine); }
.admin-catalog-filter.is-active { border-color: var(--auth-wine); color: white; background: var(--auth-wine); }
.admin-catalog-filter.is-active strong { color: white; }
.admin-catalog-title { gap: 6px; padding-bottom: 2px; }
.admin-catalog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-catalog-heading > strong { color: var(--auth-text); font-size: 1.18rem; line-height: 1.25; overflow-wrap: anywhere; }
.admin-catalog-heading .admin-status { flex: 0 0 auto; margin-top: 1px; }
.admin-catalog-sku { color: var(--auth-muted); font-size: .82rem; line-height: 1.35; }
.admin-catalog-search { display: grid; gap: 5px; color: var(--auth-muted); font-size: .8rem; }
.admin-catalog-search input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--auth-border); border-radius: 12px; color: var(--auth-text); background: var(--auth-paper); outline: none; font: inherit; }
.admin-catalog-search input:focus { border-color: var(--auth-wine); box-shadow: 0 0 0 3px rgba(122,20,32,.12); }
.admin-catalog-inactive { margin: 0; }
.admin-price-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; margin: 0; padding: 14px; border: 1px solid var(--auth-border); border-radius: 13px; background: #fbf7f3; }
.admin-price-choice legend { padding: 0 6px; color: var(--auth-text); font-size: .84rem; font-weight: 800; }
.admin-price-option { display: flex; align-items: center; gap: 9px; min-height: 42px; color: var(--auth-text); cursor: pointer; line-height: 1.35; }
.admin-price-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--auth-wine); }
.admin-price-option strong { color: var(--auth-wine); }
.admin-price-custom { display: grid; grid-column: 2; width: min(100%, 320px); gap: 5px; color: var(--auth-muted); font-size: .8rem; }
.admin-price-custom input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--auth-border); border-radius: 12px; color: var(--auth-text); background: var(--auth-paper); outline: none; font: inherit; }
.admin-price-custom input:disabled { color: var(--auth-muted); background: #eee8e3; cursor: not-allowed; opacity: .72; }
.admin-catalog-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; gap: 12px; }
.admin-catalog-fields > label:not(.admin-availability) { display: grid; gap: 5px; color: var(--auth-muted); font-size: .8rem; }
.admin-catalog-fields .admin-availability { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 4px; color: var(--auth-text); font-size: .9rem; white-space: nowrap; }
.admin-catalog-fields .admin-availability input { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; }

.product-image-editor-open { overflow: hidden; }
.product-image-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(24,2,4,.78); }
.product-image-dialog { width: min(100%,780px); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; border: 1px solid rgba(255,255,255,.5); border-radius: 22px; background: var(--auth-cream); box-shadow: 0 28px 70px rgba(0,0,0,.45); }
.product-image-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.product-image-dialog h2 { margin: 0; }
.product-image-dialog header button { width: 42px; height: 42px; border: 1px solid var(--auth-border); border-radius: 50%; color: var(--auth-wine); background: var(--auth-paper); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.product-image-stage { width: 100%; margin-top: 14px; overflow: hidden; border: 2px solid white; border-radius: 15px; background: #1b1312; box-shadow: 0 0 0 1px var(--auth-border); }
.product-image-canvas { width: 100%; aspect-ratio: 4 / 3; display: block; cursor: grab; touch-action: none; }
.product-image-canvas.is-dragging { cursor: grabbing; }
.product-image-zoom { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-top: 16px; color: var(--auth-text); font-weight: 750; }
.product-image-zoom input { width: 100%; accent-color: var(--auth-wine); }
.product-image-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.product-image-actions button { min-height: 44px; padding: 9px 15px; border: 1px solid var(--auth-border); border-radius: 11px; cursor: pointer; font-weight: 800; }
.product-image-actions .auth-primary { border-color: var(--auth-wine); }
@media (max-width: 860px) { .admin-nav { grid-template-columns: repeat(2,minmax(0,1fr)); } .admin-grid, .admin-grid-products { grid-template-columns: 1fr; } .admin-editor { position: static; } .admin-grid-products > .admin-list { max-height: none; overflow: visible; overscroll-behavior: auto; padding-right: 0; scrollbar-gutter: auto; } }
@media (max-width: 560px) { .admin-header { align-items: flex-start; } .admin-account-bar, .admin-section-heading { align-items: flex-start; flex-direction: column; } .admin-nav, .admin-form-grid, .admin-price-choice, .admin-product-photo { grid-template-columns: 1fr; } .admin-price-custom { grid-column: 1; width: 100%; } .admin-price-custom input, .admin-catalog-fields input:not([type="checkbox"]) { font-size: 18px; font-weight: 600; } .admin-catalog-tools { grid-template-columns: 1fr; } .admin-catalog-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); } .admin-catalog-filter { min-width: 0; padding: 7px 4px; font-size: .78rem; line-height: 1.2; } .admin-catalog-search input { font-size: 16px; } .admin-catalog-heading { gap: 10px; } .admin-catalog-heading > strong { font-size: 1.1rem; } .admin-catalog-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } .admin-catalog-fields .admin-availability { grid-column: 1 / -1; justify-self: start; } .admin-record-compact { grid-template-columns: 1fr; } .admin-product-record { grid-template-columns: 64px minmax(0,1fr); } .admin-product-record > button { grid-column: 1 / -1; } .admin-product-thumbnail { width: 64px; } .admin-inline-button { width: 100%; } .product-image-modal { padding: 8px; } .product-image-dialog { max-height: calc(100vh - 16px); padding: 17px; border-radius: 18px; } .product-image-actions { display: grid; grid-template-columns: 1fr; } .product-image-actions .auth-primary { grid-row: 1; } }

/* ORDERS-01B */
.orders-shell { align-items: start; padding: 24px 14px; }
.orders-card { width: min(100%, 1240px); }
.orders-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.orders-logo { flex: 0 0 auto; width: 88px; height: 88px; margin: 0; border-radius: 20px; }
.orders-header .auth-copy { max-width: 780px; margin-bottom: 0; }
.orders-toolbar, .orders-footer-actions, .orders-submit-actions { display: flex; align-items: center; gap: 10px; }
.orders-toolbar { justify-content: space-between; margin: 22px 0 16px; }
.orders-toolbar > div { color: var(--auth-muted); }
.orders-toolbar > div strong { margin-right: 5px; color: var(--auth-wine); font-size: 1.55rem; }
.orders-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.orders-toolbar > .orders-toolbar-actions strong { display: inline-grid; place-items: center; min-width: 22px; min-height: 22px; margin: 0 0 0 3px; padding: 1px 6px; border-radius: 999px; color: white; background: var(--auth-wine); font-size: .73rem; }
.orders-notifications { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.orders-new { width: auto; min-width: 180px; padding: 9px 18px; }
.orders-history { display: grid; gap: 16px; }
.orders-history-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--auth-border); border-radius: 18px; background: var(--auth-paper); box-shadow: 0 7px 20px rgba(59,9,14,.06); }
.orders-history-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.orders-history-card h2, .orders-history-card h3 { margin: 0; }
.orders-history-card header h2 { margin-top: 7px; font-size: 1.24rem; }
.orders-history-card header p { margin: 4px 0 0; color: var(--auth-muted); font-size: .88rem; }
.orders-history-card > header > strong { color: var(--auth-wine); font-size: 1.25rem; white-space: nowrap; }
.orders-status { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; color: #315b73; background: #e7f3f8; font-size: .75rem; font-weight: 800; }
.orders-status-pendiente_especial, .orders-status-pendiente_especial_actualizado { color: var(--auth-warning); background: #fff0cf; }
.orders-status-confirmado, .orders-status-confirmado_parcialmente, .orders-status-recepcionado, .orders-status-entregado { color: var(--auth-success); background: #e3f4ea; }
.orders-status-rechazado, .orders-status-cancelado { color: var(--auth-danger); background: #ffe8ec; }
.orders-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.orders-summary-grid > span { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; color: var(--auth-muted); background: #f8f2ed; font-size: .77rem; }
.orders-summary-grid strong { color: var(--auth-text); font-size: .92rem; }
.orders-production-commitment { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid rgba(200,121,27,.34); border-radius: 13px; background: #fff8e8; }
.orders-production-commitment > div { display: grid; gap: 3px; min-width: 0; }
.orders-production-commitment span { color: #8a4f10; font-size: .76rem; font-weight: 750; }
.orders-production-commitment strong { color: var(--auth-text); font-size: 1rem; }
.orders-production-commitment button { flex: 0 0 auto; }
.orders-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--auth-copper); color: var(--auth-muted); background: #fbf6f1; line-height: 1.45; }
.orders-history-card details { padding-top: 4px; border-top: 1px solid var(--auth-border); }
.orders-history-card summary { padding: 10px 0 3px; color: var(--auth-wine); cursor: pointer; font-weight: 800; }
.orders-history-card details h3 { margin-top: 16px; font-size: .96rem; }
.orders-item-list, .orders-event-list { display: grid; gap: 8px; margin: 9px 0 0; padding: 0; list-style: none; }
.orders-item-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 11px 12px; border: 1px solid var(--auth-border); border-radius: 12px; }
.orders-item-list li > div { display: grid; gap: 2px; }
.orders-item-list span, .orders-event-list span { color: var(--auth-muted); font-size: .8rem; }
.orders-item-list p, .orders-event-list p { grid-column: 1 / -1; margin: 3px 0 0; color: var(--auth-muted); font-size: .84rem; }
.orders-confirmed-line { color: var(--auth-success) !important; font-weight: 800; }
.orders-ready-line { color: #8a4f10 !important; font-weight: 800; }
.orders-item-amounts { align-content: start; justify-items: end; }
.orders-item-amounts > span { color: var(--auth-success); font-weight: 800; }
.orders-item-amounts > .orders-ready-amount { color: #8a4f10; }
.orders-ready-reason { padding: 8px 10px; border-left: 3px solid #c8791b; background: #fff8e8; }
.orders-event-list { position: relative; }
.orders-event-list li { display: grid; gap: 2px; padding: 9px 12px 9px 18px; border-left: 3px solid var(--auth-copper); background: #fbf7f3; }
.orders-version-snapshot { margin-top: 6px; padding: 0; border: 0; }
.orders-version-snapshot summary { padding: 5px 0; color: var(--auth-wine); font-size: .8rem; }
.orders-version-snapshot ul { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.orders-version-snapshot ul li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; border: 1px solid var(--auth-border); border-radius: 8px; background: white; }
.orders-version-snapshot ul strong { font-size: .78rem; white-space: nowrap; }
.orders-secondary { min-height: 42px; padding: 8px 14px; border: 1px solid var(--auth-border); border-radius: 11px; color: var(--auth-wine); background: var(--auth-paper); cursor: pointer; font-weight: 800; }
.orders-secondary:hover { border-color: var(--auth-wine); }
.orders-secondary:disabled { cursor: not-allowed; opacity: .55; }
.orders-history-card > .orders-secondary { justify-self: start; }
.orders-footer-actions { flex-wrap: wrap; justify-content: flex-end; margin-top: 22px; }
.orders-footer-actions > button { width: auto; min-width: 170px; padding: 8px 15px; }
.orders-composer { display: grid; gap: 24px; margin-top: 20px; }
.orders-composer > section { padding: 18px; border: 1px solid var(--auth-border); border-radius: 18px; background: rgba(255,253,250,.78); }
.orders-location { max-width: 600px; }
.orders-fixed-location { display: grid; gap: 3px; padding: 13px 15px; border: 1px solid var(--auth-border); border-radius: 14px; background: var(--auth-paper); }
.orders-fixed-location span { color: var(--auth-muted); font-size: .8rem; }
.orders-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.orders-section-heading h2 { margin: 0; font-size: 1.25rem; }
.orders-section-heading p { margin: 5px 0 0; color: var(--auth-muted); font-size: .88rem; }
.orders-search { display: grid; width: min(100%, 330px); gap: 5px; color: var(--auth-muted); font-size: .8rem; }
.orders-search input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--auth-border); border-radius: 12px; color: var(--auth-text); background: var(--auth-paper); outline: none; }
.orders-search input:focus { border-color: var(--auth-copper); box-shadow: 0 0 0 3px rgba(185,101,67,.15); }
.orders-products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; max-height: 480px; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; }
.orders-product { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 11px; align-items: start; padding: 11px; border: 1px solid var(--auth-border); border-radius: 14px; background: var(--auth-paper); }
.orders-product[hidden] { display: none; }
.orders-product > img, .orders-product-placeholder { width: 76px; aspect-ratio: 4 / 3; border: 1px solid var(--auth-border); border-radius: 10px; object-fit: cover; background: #eee7e1; }
.orders-product-placeholder { display: grid; place-items: center; color: var(--auth-muted); font-size: .68rem; font-weight: 750; text-align: center; }
.orders-product > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.orders-product span, .orders-product small { color: var(--auth-muted); font-size: .74rem; line-height: 1.3; }
.orders-product strong { overflow-wrap: anywhere; }
.orders-product em, .orders-cart-row em { color: var(--auth-warning); font-size: .75rem; font-style: normal; font-weight: 800; }
.orders-product .orders-secondary { grid-column: 1 / -1; min-height: 38px; }
.orders-product .orders-secondary[aria-pressed="true"] { border-color: var(--auth-success); color: var(--auth-success); background: #e3f4ea; }
.orders-product.is-unavailable { border-color: #dfc38c; background: #fffaf0; }
.orders-cart { display: grid; gap: 12px; }
.orders-cart-row { display: grid; gap: 13px; padding: 15px; border: 1px solid var(--auth-border); border-radius: 15px; background: var(--auth-paper); }
.orders-cart-row > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.orders-cart-row h3 { margin: 3px 0 0; }
.orders-cart-row header span { color: var(--auth-muted); font-size: .76rem; }
.orders-cart-row header button { min-height: 34px; padding: 6px 9px; border: 0; color: var(--auth-danger); background: transparent; cursor: pointer; font-weight: 800; }
.orders-cart-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.orders-cart-controls label { display: grid; align-content: start; gap: 5px; color: var(--auth-muted); font-size: .79rem; }
.orders-cart-controls input, .orders-cart-controls textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--auth-border); border-radius: 11px; color: var(--auth-text); background: white; outline: none; }
.orders-cart-controls input:focus, .orders-cart-controls textarea:focus { border-color: var(--auth-copper); box-shadow: 0 0 0 3px rgba(185,101,67,.14); }
.orders-cart-controls small { color: var(--auth-muted); line-height: 1.3; }
.orders-item-note { grid-column: 1 / -1; }
.orders-line-total { justify-self: end; color: var(--auth-wine); font-size: 1.08rem; }
.orders-final { display: grid; gap: 16px; }
.orders-grand-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border-radius: 14px; color: white; background: var(--auth-wine); }
.orders-grand-total strong { font-size: 1.45rem; }
.orders-submit-actions { justify-content: flex-end; }
.orders-submit-actions button { width: auto; min-width: 190px; padding: 9px 18px; }

@media (max-width: 980px) {
  .orders-products { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .orders-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .orders-cart-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .orders-shell { padding: 10px 7px; }
  .orders-card { padding: 20px 15px; }
  .orders-header { align-items: flex-start; gap: 12px; }
  .orders-logo { width: 64px; height: 64px; border-radius: 15px; }
  .orders-header h1 { font-size: 2rem; }
  .orders-toolbar, .orders-section-heading { align-items: stretch; flex-direction: column; }
  .orders-new, .orders-search { width: 100%; }
  .orders-history-card > header { flex-direction: column; }
  .orders-products { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .orders-cart-controls { grid-template-columns: 1fr; }
  .orders-item-note { grid-column: 1; }
  .orders-cart-controls input { font-size: 18px; font-weight: 650; }
  .orders-item-list li { grid-template-columns: 1fr; }
  .orders-item-list p { grid-column: 1; }
  .orders-footer-actions, .orders-submit-actions { display: grid; grid-template-columns: 1fr; }
  .orders-footer-actions > button, .orders-submit-actions button { width: 100%; min-width: 0; }
  .orders-submit-actions .auth-primary { grid-row: 1; }
}

/* ORDERS-01A · experiencia de pedido recuperada */
.orders-composer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin: -8px 0 16px; }
.orders-composer-nav button { width: auto; }
.orders-fixed-location small { color: var(--auth-muted); }
.orders-catalog-panel { padding: 18px; border: 1px solid var(--auth-border); border-radius: 18px; background: rgba(255,253,250,.82); }
.orders-category-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 14px; }
.orders-category-filter { min-height: 36px; padding: 6px 12px; border: 1px solid var(--auth-border); border-radius: 999px; color: var(--auth-wine); background: var(--auth-paper); cursor: pointer; font-size: .82rem; font-weight: 800; }
.orders-category-filter[aria-pressed="true"] { border-color: var(--auth-wine); color: white; background: var(--auth-wine); }
.orders-products { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; max-height: none; padding: 0; overflow: visible; }
.orders-product { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 7px 22px rgba(59,9,14,.07); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.orders-product:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(59,9,14,.11); }
.orders-product.is-in-cart { border-color: #6ba982; box-shadow: 0 0 0 2px rgba(73,139,97,.12), 0 10px 25px rgba(59,9,14,.09); }
.orders-product-media { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--auth-border); background: #eee7e1; }
.orders-product-media > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.orders-product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; border: 0; border-radius: 0; }
.orders-product-placeholder img { width: 54px; height: 54px; border-radius: 12px; opacity: .72; }
.orders-product-placeholder span { color: var(--auth-muted); font-size: .72rem; font-weight: 750; }
.orders-product-body { display: grid; align-content: start; gap: 6px; flex: 1; padding: 14px 14px 12px; }
.orders-product-category { width: fit-content; padding: 3px 7px; border-radius: 999px; color: white !important; background: var(--auth-wine); font-size: .68rem !important; font-weight: 800; }
.orders-product-name { color: var(--auth-text); font-size: 1.08rem; line-height: 1.2; }
.orders-product-body > small { font-size: .76rem; }
.orders-product-body > p { margin: 2px 0 0; color: var(--auth-muted); font-size: .78rem; line-height: 1.38; }
.orders-product-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.orders-product-badges span { padding: 3px 7px; border: 1px solid var(--auth-border); border-radius: 999px; color: var(--auth-wine); background: #fbf6f1; font-size: .68rem; font-weight: 800; }
.orders-in-cart { width: fit-content; padding: 5px 8px; border: 1px solid #afd7be; border-radius: 999px; color: #23653d !important; background: #e6f6ec; font-size: .72rem !important; font-weight: 850; }
.orders-product-price { margin-top: 2px; color: var(--auth-wine); font-size: 1.28rem; }
.orders-catalog-note { padding: 7px 8px; border-left: 3px solid var(--auth-copper); color: var(--auth-muted); background: #fbf5ef; }
.orders-product-actions { display: grid; grid-template-columns: 1fr 1.12fr; gap: 7px; padding: 0 12px 12px; }
.orders-product-actions button, .orders-product .orders-secondary, .orders-product .auth-primary { grid-column: auto; width: 100%; min-width: 0; min-height: 40px; padding: 7px 9px; font-size: .79rem; }
.orders-product-actions .auth-primary:disabled { cursor: not-allowed; opacity: .55; }
.orders-composer { padding-bottom: 84px; }
.orders-cart-dock { position: fixed; z-index: 30; left: 50%; bottom: 10px; width: min(calc(100% - 28px),720px); transform: translateX(-50%); }
.orders-cart-dock-inner, .orders-cart-empty { border: 1px solid rgba(185,101,67,.35); border-radius: 20px; background: rgba(255,253,250,.97); box-shadow: 0 18px 45px rgba(39,2,6,.24); backdrop-filter: blur(12px); }
.orders-cart-dock-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px 12px 18px; }
.orders-cart-dock-inner > div { display: grid; gap: 2px; }
.orders-cart-dock-inner > div strong { color: var(--auth-text); }
.orders-cart-dock-inner > div span { color: var(--auth-muted); font-size: .78rem; }
.orders-cart-dock-inner .auth-primary { width: auto; min-width: 175px; padding: 9px 18px; }
.orders-cart-empty { padding: 12px 16px; color: var(--auth-muted); text-align: center; }
.orders-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.orders-history-card > .orders-card-actions { justify-self: start; }

.orders-total-comparison { display: flex; flex-wrap: wrap; gap: 8px; }
.orders-total-comparison > span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; color: var(--auth-muted); background: #f8f2ed; font-size: .78rem; }
.orders-total-comparison > span:last-child { color: #23653d; background: #e6f6ec; }
.orders-total-comparison > span:nth-child(3) { color: #8a4f10; background: #fff0d7; }
.orders-state-actions { display: grid; gap: 9px; margin-top: 18px; padding: 16px; border: 1px solid rgba(185,101,67,.38); border-radius: 15px; background: #fff8f0; }
.orders-state-actions h3 { margin: 0 !important; color: var(--auth-text); }
.orders-state-actions p { margin: 0; color: var(--auth-muted); font-size: .82rem; line-height: 1.4; }
.orders-state-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.orders-state-actions button { width: auto; min-width: 160px; min-height: 42px; padding: 8px 14px; }
.orders-discount-action { display: grid; gap: 8px; margin-top: 14px; padding: 14px; border: 1px solid rgba(73,139,97,.42); border-radius: 14px; background: #eff9f2; }
.orders-discount-action h3, .orders-discount-action p { margin: 0 !important; }
.orders-discount-action p, .orders-discount-note { color: var(--auth-muted); font-size: .82rem; line-height: 1.45; }
.orders-discount-action button { justify-self: start; width: auto; }
.orders-discount-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--auth-success); background: #eff9f2; }
.orders-discount-dialog { width: min(100%,650px); }
.orders-discount-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.orders-financial-breakdown { display: grid; gap: 7px; margin-top: 15px; padding: 14px 16px; border: 1px solid var(--auth-border); border-radius: 14px; background: var(--auth-paper); }
.orders-financial-breakdown > span { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--auth-muted); }
.orders-financial-breakdown > span strong { color: var(--auth-text); white-space: nowrap; }
.orders-financial-breakdown > small { color: var(--auth-success); font-weight: 750; }
.orders-financial-breakdown > .is-discount, .orders-financial-breakdown > .is-discount strong { color: var(--auth-success); }
.orders-financial-breakdown > .is-total { margin-top: 4px; padding-top: 10px; border-top: 2px solid var(--auth-border); color: var(--auth-text); font-size: 1.08rem; font-weight: 850; }
.orders-financial-breakdown > .is-total strong { color: var(--auth-wine); font-size: 1.28rem; }
.orders-financial-breakdown.is-compact { margin-top: 10px; padding: 10px 12px; font-size: .8rem; }
.orders-financial-breakdown.is-compact > .is-total strong { font-size: 1rem; }
.orders-financial-stages { display: grid; gap: 2px; overflow-x: auto; border: 1px solid var(--auth-border); border-radius: 13px; background: var(--auth-border); }
.orders-financial-stage { display: grid; grid-template-columns: 1.05fr repeat(4,minmax(105px,1fr)); gap: 8px; min-width: 610px; padding: 8px 10px; background: var(--auth-paper); font-size: .76rem; }
.orders-financial-stage > span { color: var(--auth-muted); text-align: right; }
.orders-financial-stage.is-heading { color: var(--auth-muted); background: #f7f1ec; font-size: .7rem; text-transform: uppercase; }
.orders-financial-stage.is-heading > span { font-weight: 800; }

.orders-modal-open { overflow: hidden; }
.orders-modal-layer { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(25,2,5,.78); }
.orders-modal-dialog { position: relative; width: min(100%,680px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 24px; overflow-y: auto; border: 1px solid rgba(255,255,255,.55); border-radius: 24px; background: var(--auth-cream); box-shadow: 0 30px 80px rgba(0,0,0,.48); }
.orders-modal-dialog h2 { margin: 0 48px 8px 0; color: var(--auth-text); font-size: 1.75rem; }
.orders-modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border: 1px solid var(--auth-border); border-radius: 50%; color: var(--auth-wine); background: var(--auth-paper); cursor: pointer; font-size: 1.45rem; line-height: 1; }
.orders-modal-description { margin: 0 0 16px; color: var(--auth-muted); line-height: 1.5; }
.orders-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.orders-modal-actions button { width: auto; min-width: 150px; min-height: 44px; padding: 9px 16px; }
.orders-commitment-time-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: stretch; }
.orders-commitment-time-row input { min-width: 0; }
.orders-commitment-time-row button { min-width: 92px; }
.orders-commitment-preview { margin: 10px 0 0; padding: 10px 12px; border-radius: 11px; color: #8a4f10; background: #fff8e8; font-weight: 800; }
.orders-danger-button, .orders-danger-link { border: 0; color: #8b1b2d; background: #fde8eb; cursor: pointer; font-weight: 800; }
.orders-danger-button { border-radius: 11px; }
.orders-danger-link { min-height: 36px; padding: 6px 9px; border-radius: 9px; }
.orders-editor-dialog { width: min(100%,760px); }
.orders-editor-dialog .orders-cart-controls { margin-top: 16px; }
.orders-editor-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 13px 15px; border-radius: 13px; color: white; background: var(--auth-wine); }
.orders-editor-total strong { font-size: 1.25rem; }
.orders-product-sheet { display: grid; grid-template-columns: minmax(220px,.9fr) minmax(0,1.1fr); gap: 20px; margin-top: 16px; }
.orders-product-sheet > img, .orders-product-sheet > .orders-product-placeholder { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--auth-border); border-radius: 16px; object-fit: cover; overflow: hidden; }
.orders-product-sheet > div:last-child { display: grid; align-content: start; gap: 10px; }
.orders-product-sheet > div > span { color: var(--auth-muted); font-size: .8rem; }
.orders-product-sheet > div > strong { color: var(--auth-wine); font-size: 1.5rem; }
.orders-product-sheet p { margin: 0; color: var(--auth-muted); line-height: 1.5; }
.orders-product-sheet dl { display: grid; gap: 7px; margin: 0; }
.orders-product-sheet dl div { display: grid; grid-template-columns: 105px 1fr; gap: 8px; padding-top: 7px; border-top: 1px solid var(--auth-border); }
.orders-product-sheet dt { color: var(--auth-muted); font-size: .78rem; }
.orders-product-sheet dd { margin: 0; font-weight: 750; }
.orders-confirm-dialog { width: min(100%,520px); }

.orders-notifications-dialog { width: min(100%,620px); }
.orders-notification-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.orders-notification-list li { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid var(--auth-border); border-radius: 14px; background: var(--auth-paper); }
.orders-notification-list li.is-unread { border-color: rgba(185,101,67,.65); box-shadow: inset 4px 0 0 var(--auth-copper); }
.orders-notification-list span { color: var(--auth-muted); font-size: .76rem; }
.orders-notification-list p { margin: 0; color: var(--auth-muted); line-height: 1.45; }
.orders-notification-list button { justify-self: start; width: auto; margin-top: 3px; }
.orders-notification-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.orders-notification-actions button { margin-top: 0; }

.orders-partial-dialog { display: grid; grid-template-rows: minmax(0,1fr) auto; width: min(100%,900px); padding: 0; overflow: hidden; }
.orders-partial-scroll { min-height: 0; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.orders-partial-save-note { margin: -4px 0 16px; padding: 10px 12px; border-left: 3px solid var(--auth-copper); color: var(--auth-muted); background: #fff8f0; font-size: .82rem; line-height: 1.4; }
.orders-partial-actions { margin: 0; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--auth-border); background: var(--auth-cream); box-shadow: 0 -8px 22px rgba(59,9,14,.08); }
.orders-partial-actions [data-state-message] { flex: 1 0 100%; margin: 0; }
.orders-partial-list { display: grid; gap: 12px; }
.orders-partial-item { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--auth-border); border-radius: 15px; background: var(--auth-paper); }
.orders-partial-item > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.orders-partial-item > header > div { display: grid; gap: 3px; }
.orders-partial-item > header span { color: var(--auth-muted); font-size: .78rem; }
.orders-partial-item > header > strong { color: var(--auth-wine); white-space: nowrap; }
.orders-partial-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.orders-partial-fields label { display: grid; align-content: start; gap: 5px; color: var(--auth-muted); font-size: .78rem; }
.orders-partial-fields input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--auth-border); border-radius: 10px; color: var(--auth-text); background: white; outline: none; }
.orders-partial-fields input:focus { border-color: var(--auth-copper); box-shadow: 0 0 0 3px rgba(185,101,67,.14); }
.orders-partial-fields small { color: var(--auth-muted); line-height: 1.3; }
.orders-partial-line-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--auth-border); color: var(--auth-muted); font-size: .82rem; }
.orders-partial-line-total strong { color: var(--auth-wine); font-size: 1rem; }
.orders-partial-reason { margin-top: 16px; }
.orders-ready-item.has-difference { border-color: rgba(200,121,27,.65); box-shadow: inset 4px 0 0 #c8791b; }
.orders-ready-reason-field { margin: 0; }
.orders-ready-reason-field textarea { min-height: 72px; }
.orders-recovery-action { display: grid; gap: 8px; margin-top: 14px; padding: 14px; border: 1px solid rgba(200,121,27,.42); border-radius: 14px; background: #fff8e8; }
.orders-recovery-action h3, .orders-recovery-action p { margin: 0 !important; }
.orders-recovery-action p, .orders-related-order { color: var(--auth-muted); font-size: .82rem; line-height: 1.4; }
.orders-recovery-action button { justify-self: start; width: auto; }
.orders-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.orders-recovery-preview { display: grid; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.orders-recovery-preview li { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--auth-border); border-radius: 12px; background: var(--auth-paper); }
.orders-recovery-preview span, .orders-recovery-price { color: var(--auth-muted); font-size: .78rem; }
.orders-recovery-banner { display: grid; gap: 3px; }

.orders-review-dialog { width: min(100%,820px); }
.orders-review-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.orders-review-meta > span { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; color: var(--auth-muted); background: #f7f1ec; font-size: .75rem; }
.orders-review-meta strong { color: var(--auth-text); font-size: .88rem; }
.orders-review-list { display: grid; gap: 9px; }
.orders-review-recovery-resolution { display: grid; gap: 9px; margin: 14px 0 0; padding: 13px; border: 1px solid rgba(200,121,27,.42); border-radius: 14px; background: #fff8e8; }
.orders-review-recovery-resolution legend { padding: 0 5px; color: var(--auth-text); font-weight: 850; }
.orders-review-recovery-resolution p { margin: 0; color: var(--auth-muted); font-size: .8rem; line-height: 1.4; }
.orders-review-recovery-resolution label { display: flex; gap: 9px; align-items: flex-start; color: var(--auth-text); font-size: .83rem; line-height: 1.35; }
.orders-review-recovery-resolution input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--auth-wine); }
.orders-review-item { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px 12px; align-items: start; padding: 12px; border: 1px solid var(--auth-border); border-radius: 14px; background: var(--auth-paper); }
.orders-review-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: white; background: var(--auth-wine); font-weight: 850; }
.orders-review-item > div:nth-child(2) { display: grid; gap: 3px; }
.orders-review-item > div:nth-child(2) > span, .orders-review-item p { color: var(--auth-muted); font-size: .78rem; }
.orders-review-item p { margin: 3px 0 0; }
.orders-review-item em { color: var(--auth-warning); font-size: .76rem; font-style: normal; font-weight: 800; }
.orders-review-item > strong { color: var(--auth-wine); white-space: nowrap; }
.orders-review-item-actions { display: flex; gap: 6px; margin-top: 5px; }
.orders-review-item-actions button { width: auto; min-width: 0; min-height: 34px; padding: 5px 9px; font-size: .75rem; }
.orders-review-notes { margin-top: 14px; }
.orders-review-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 13px 0; border-top: 2px solid var(--auth-border); border-bottom: 1px solid var(--auth-border); font-size: 1.35rem; font-weight: 850; }
.orders-review-total strong { color: var(--auth-wine); font-size: 1.65rem; }

.orders-receipt-dialog { width: min(100%,980px); padding: 18px; background: white; }
.orders-receipt { padding: 18px 24px 8px; color: #191616; background: white; }
.orders-receipt-brand { display: grid; justify-items: center; gap: 7px; padding: 4px 0 22px; border-bottom: 1px solid #ded8d4; text-align: center; }
.orders-receipt-brand img { width: 96px; height: 96px; border-radius: 20px; }
.orders-receipt-brand h2 { margin: 0; color: #111; font-size: 2.35rem; }
.orders-receipt-brand > strong, .orders-receipt-brand p { color: #765f57; }
.orders-receipt-brand p { margin: 2px 0 0; font-size: .86rem; }
.orders-receipt-summary { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; margin: 18px 0; padding: 18px 20px; border: 1px solid #e8e0db; border-radius: 18px; background: #fbf8f5; }
.orders-receipt-summary h3 { margin: 0 0 8px; font-size: 1.18rem; }
.orders-receipt-summary p { margin: 4px 0; color: #6f5a53; }
.orders-receipt-lines { border-top: 1px solid #e5dfdc; }
.orders-receipt-line { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid #e5dfdc; }
.orders-receipt-line > span { font-size: 1.05rem; font-weight: 850; }
.orders-receipt-line > div { display: grid; gap: 3px; }
.orders-receipt-line > div strong { font-size: 1.05rem; }
.orders-receipt-line small { color: #765f57; line-height: 1.4; }
.orders-receipt-line > strong { font-size: 1.05rem; white-space: nowrap; }
.orders-receipt-line.is-packaging { padding-left: 0; background: #fff7eb; }
.orders-receipt-note { padding: 12px 14px; border-left: 3px solid var(--auth-copper); color: #765f57; background: #fbf8f5; }
.orders-receipt-requested-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0 6px; color: #765f57; font-size: 1rem; }
.orders-receipt-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 2px solid #dcd5d1; border-bottom: 1px solid #e5dfdc; font-size: 2rem; font-weight: 900; }
.orders-receipt-movement { display: grid; gap: 5px; padding: 18px 0 10px; }
.orders-receipt-movement p { margin: 0; color: #6f5a53; font-size: .82rem; }
.orders-receipt footer { padding-top: 10px; color: #765f57; font-size: .76rem; }

@media (max-width: 760px) {
  .orders-review-meta { grid-template-columns: 1fr; }
  .orders-product-sheet { grid-template-columns: 1fr; }
  .orders-receipt-summary { grid-template-columns: 1fr; gap: 8px; }
  .orders-partial-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .orders-composer-nav { display: grid; grid-template-columns: 1fr; }
  .orders-composer-nav button { width: 100%; }
  .orders-toolbar-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .orders-toolbar-actions button { width: 100%; }
  .orders-catalog-panel { padding: 12px; }
  .orders-products { grid-template-columns: 1fr; }
  .orders-product:hover { transform: none; }
  .orders-product-body { padding: 13px; }
  .orders-cart-dock { bottom: 6px; }
  .orders-cart-dock-inner { align-items: stretch; flex-direction: column; gap: 9px; padding: 12px; }
  .orders-cart-dock-inner .auth-primary { width: 100%; min-width: 0; }
  .orders-modal-layer { padding: 6px; }
  .orders-modal-dialog { max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); padding: 19px 14px; border-radius: 18px; }
  .orders-modal-dialog h2 { font-size: 1.45rem; }
  .orders-modal-actions { display: grid; grid-template-columns: 1fr; }
  .orders-modal-actions button { width: 100%; min-width: 0; }
  .orders-state-actions > div { display: grid; grid-template-columns: 1fr; }
  .orders-state-actions button { width: 100%; min-width: 0; }
  .orders-discount-fields { grid-template-columns: 1fr; }
  .orders-discount-action button { width: 100%; }
  .orders-item-amounts { justify-items: start; }
  .orders-partial-item > header { flex-direction: column; }
  .orders-partial-fields { grid-template-columns: 1fr; }
  .orders-partial-dialog { padding: 0; }
  .orders-partial-scroll { padding: 19px 14px; }
  .orders-partial-actions { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .orders-recovery-action button, .orders-notification-actions button { width: 100%; }
  .orders-review-actions .auth-primary { grid-row: 1; }
  .orders-review-item { grid-template-columns: 28px minmax(0,1fr); }
  .orders-review-item > strong { grid-column: 2; }
  .orders-review-item-actions { flex-wrap: wrap; }
  .orders-receipt-dialog { padding: 8px; }
  .orders-receipt { padding: 12px 10px 4px; }
  .orders-receipt-brand img { width: 78px; height: 78px; }
  .orders-receipt-brand h2 { font-size: 1.8rem; }
  .orders-receipt-brand p { font-size: .72rem; }
  .orders-receipt-summary { padding: 14px; }
  .orders-receipt-line { grid-template-columns: 28px minmax(0,1fr); gap: 8px; }
  .orders-receipt-line > strong { grid-column: 2; }
  .orders-receipt-total { font-size: 1.55rem; }
}

@media print {
  body { background: white !important; }
  body > * { visibility: hidden !important; }
  #orders-modal-layer, #orders-modal-layer * { visibility: visible !important; }
  #orders-modal-layer { position: absolute; inset: 0; display: block; padding: 0; background: white; }
  .orders-receipt-dialog { width: 100%; max-height: none; padding: 0; overflow: visible; border: 0; box-shadow: none; }
  .orders-modal-close, .orders-receipt-actions { display: none !important; }
  .orders-receipt { padding: 14mm 12mm; }
}


/* ADMIN-RULES-01 · Reglas operativas de pedidos */
.admin-rules-form { display: grid; gap: 18px; max-width: 920px; }
.admin-rules-time-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.admin-rules-days { display: grid; gap: 7px; overflow-x: auto; }
.admin-rules-day { display: grid; grid-template-columns: minmax(110px,1.1fr) minmax(125px,1fr) minmax(125px,1fr) minmax(125px,1fr); gap: 10px; align-items: center; min-width: 590px; padding: 10px 12px; border: 1px solid var(--auth-border); border-radius: 12px; background: var(--auth-paper); }
.admin-rules-day-heading { color: var(--auth-muted); background: #f7f1ec; font-size: .75rem; text-transform: uppercase; }
.admin-rules-day label:not(.auth-check) { display: grid; gap: 4px; color: var(--auth-muted); font-size: .74rem; }
.admin-rules-day input[type="number"] { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--auth-border); border-radius: 9px; background: white; }
.admin-rules-special { margin: 0; }

@media (max-width: 720px) {
  .admin-rules-time-grid { grid-template-columns: 1fr; }
}


@media (max-width: 620px) {
  .orders-production-commitment { align-items: stretch; flex-direction: column; }
  .orders-production-commitment button { width: 100%; }
  .orders-commitment-time-row { grid-template-columns: minmax(0,1fr) 92px; }
}

/* CALENDAR-01 · Feriados y excepciones */
.admin-calendar { display: grid; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--auth-border); }
.admin-calendar-new {
  display: grid;
  grid-template-columns: 150px minmax(260px,1fr) 150px 112px 76px 150px;
  gap: 10px;
  align-items: end;
}
.admin-calendar-new > * { min-width: 0; }
.admin-calendar-new .auth-field { min-width: 0; }
.admin-calendar-new .auth-field input,
.admin-calendar-new .auth-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.admin-calendar-new .auth-field select {
  min-height: 50px;
  padding: 11px 14px;
  border-radius: 14px;
}
.admin-calendar-list { display: grid; gap: 9px; }
.admin-calendar-row {
  display: grid;
  grid-template-columns: 145px minmax(200px,1fr) 135px 145px 122px 76px 50px;
  gap: 9px;
  align-items: end;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--auth-border);
  border-radius: 13px;
  background: var(--auth-paper);
}
.admin-calendar-row > label:not(.auth-check) { display: grid; gap: 4px; min-width: 0; color: var(--auth-muted); font-size: .72rem; }
.admin-calendar-row input[type="date"],
.admin-calendar-row input[type="text"],
.admin-calendar-row input:not([type]),
.admin-calendar-row select { width: 100%; min-width: 0; min-height: 42px; padding: 8px 9px; border: 1px solid var(--auth-border); border-radius: 9px; background: white; }
.admin-calendar-row .admin-actions { flex-wrap: nowrap; margin: 0; }
.admin-calendar-actions { align-self: end; min-width: 0; }
.admin-calendar-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
  align-self: center;
}
.admin-calendar-check input { flex: 0 0 auto; }
.admin-calendar-check span { white-space: nowrap; }
.admin-calendar-actions + .admin-calendar-check {
  box-sizing: border-box;
  padding-left: 10px;
}
.admin-calendar-save-status { min-width: 0; color: var(--auth-muted); font-size: .72rem; align-self: center; white-space: nowrap; }

@media (max-width: 1180px) {
  .admin-calendar-new {
    grid-template-columns: 150px minmax(220px,1fr) 150px 112px 76px;
  }
  .admin-calendar-new > button { grid-column: 4 / 6; }
  .admin-calendar-row {
    grid-template-columns: 145px minmax(190px,1fr) 135px 145px;
  }
  .admin-calendar-row .admin-calendar-actions { grid-column: 4; }
  .admin-calendar-row .admin-calendar-check:nth-of-type(4) { grid-column: 2; }
  .admin-calendar-row .admin-calendar-check:nth-of-type(5) { grid-column: 3; }
  .admin-calendar-save-status { grid-column: 4; justify-self: end; }
}

@media (max-width: 760px) {
  .admin-calendar-new { grid-template-columns: 1fr; }
  .admin-calendar-new > button { grid-column: 1; width: 100%; }
  .admin-calendar-new .admin-calendar-check { grid-column: 1; }

  .admin-calendar-row {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    padding: 14px;
    align-items: stretch;
  }
  .admin-calendar-row > label:not(.auth-check) {
    grid-column: 1 / -1;
  }
  .admin-calendar-row input[type="date"],
  .admin-calendar-row input[type="text"],
  .admin-calendar-row input:not([type]),
  .admin-calendar-row select {
    min-height: 48px;
    font-size: 16px;
  }
  .admin-calendar-row .admin-calendar-actions {
    grid-column: 1 / -1;
  }
  .admin-calendar-row .admin-calendar-actions .admin-inline-button {
    width: 100%;
  }
  .admin-calendar-row .admin-calendar-check:nth-of-type(4) {
    grid-column: 1;
    padding-left: 0;
  }
  .admin-calendar-row .admin-calendar-check:nth-of-type(5) {
    grid-column: 2;
    padding-left: 0;
  }
  .admin-calendar-row .admin-calendar-check {
    min-height: 44px;
    align-self: center;
  }
  .admin-calendar-save-status {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 16px;
  }
}

