:root {
  --font-ui: "Instrument Sans", system-ui, sans-serif;
  color-scheme: light;
  --ink: #24211e;
  --paper: #ffffff;
  --line: #d8d1c6;
  --muted: #60574e;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--font-ui); }
a { color: inherit; }
header, footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(5%, calc((100% - 75rem)/2)); }
header { border-bottom: 1px solid var(--line); }
nav { display: flex; gap: clamp(.75rem, 3vw, 2rem); }
nav a, .wordmark, .card { text-decoration: none; }
nav a:hover, .card:hover h3 { text-decoration: underline; }
.wordmark { font: 1.9rem var(--font-ui); letter-spacing: .2em; }
main { width: min(90%, 75rem); margin: auto; min-height: 70vh; padding-bottom: 4rem; }
.intro { padding: clamp(3rem, 8vw, 7rem) 0 3rem; }
.eyebrow { font-size: .72rem; letter-spacing: .19em; font-weight: 650; }
h1, h2, h3 { font-family: var(--font-ui); font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); margin: .4em 0 .25em; text-wrap: balance; }
h2 { font-size: 1.9rem; margin: 0; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.65rem); margin: .35em 0; }
.section-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: 1.2rem 0; }
.section-line span, .caption { font-size: .8rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 3vw, 2rem); }
.photo { background: #ded7cc url('decants.png') no-repeat; background-size: 300% auto; aspect-ratio: 4/5; margin-bottom: .85rem; }
.photo-0 { background-position: left center; }
.photo-1 { background-position: center; }
.photo-2 { background-position: right center; }
.card p { margin: .25rem 0; }
#ficha, .admin { padding-top: 2rem; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 6vw, 5rem); margin-top: 1.5rem; }
.details { align-self: center; }
.details h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
fieldset { padding: 0; margin: 1.5rem 0 1rem; border: 0; }
.sizes { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.sizes label { padding: .6rem .8rem; border: 1px solid var(--line); cursor: pointer; }
.sizes label:has(:checked) { border-color: var(--ink); }
output { font-size: 1.6rem; }
form { display: grid; gap: .6rem; margin-top: 1.5rem; }
input, button, select, textarea { font: inherit; }
form input, button { padding: .7rem; border: 1px solid var(--line); }
button { color: var(--paper); background: var(--ink); cursor: pointer; margin-top: .5rem; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
  .detail .photo { aspect-ratio: 1; }
}
[hidden] { display: none !important; }
form textarea { font: inherit; padding: .7rem; border: 1px solid var(--line); resize: vertical; }
nav { flex-wrap: wrap; }
.brands-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.brands-table caption { text-align: left; font: 1.6rem var(--font-ui); margin-bottom: .8rem; }
.brands-table th, .brands-table td { padding: .7rem; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.perfume-table th:first-child { width: 5rem; }
:is(#brand-options, #inventory-options) { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); max-height: 12rem; overflow-y: auto; }
:is(#brand-options, #inventory-options) button { width: 100%; margin: 0; border: 0; color: var(--ink); background: var(--paper); text-align: left; }
:is(#brand-options, #inventory-options) button:hover, :is(#brand-options, #inventory-options) button:focus-visible { background: #ece6dc; }

.perfume-table img { display: block; object-fit: contain; }
.perfume-fields { display: grid; gap: .75rem; }
.perfume-fields label { display: block; margin-bottom: .3rem; }
.perfume-fields input { width: 100%; }
#perfume-use { width: 100%; border: 1px solid var(--line); color: var(--ink); background: var(--paper); font: inherit; }
.brand-anchor { position: relative; }
:is(#brand-options, #inventory-options) { position: absolute; top: 100%; inset-inline: 0; z-index: 2; background: var(--paper); box-shadow: 0 .4rem 1rem #24211e24; }
#paste-image:focus { border-color: #395e50; background: #edf3ef; outline: 2px solid #395e50; outline-offset: 2px; }
#price-per-ml { background: #f0ece5; }
@media (min-width: 641px) {
  .perfume-identity { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .85fr); }
  .perfume-pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.perfume-table img { width: 38.5px; height: 50px; }
.brands-table tbody tr { cursor: pointer; }
.brands-table tbody tr:hover, .brands-table tbody tr:focus-within { background: #f0ece5; }
.edit-perfume, .edit-brand { margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
#perfume-list-status:empty, #draft:empty { display: none; }
.dModal { --modal-padding-top: 1.5rem; --modal-padding-inline: 1.5rem; width: min(42rem, calc(100% - 2rem)); height: fit-content; max-height: calc(100dvh - 2rem); margin: auto; overflow: auto; overscroll-behavior: contain; padding: var(--modal-padding-top) var(--modal-padding-inline) 1.5rem; border: 1px solid var(--line); border-radius: .4rem; box-shadow: 0 6px 18px #24211e26; color: var(--ink); background: var(--paper); }
.dModal::backdrop { background: #24211e66; }
.dModal-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dModal-header, .dModal-title { padding-inline-end: 1.85rem; }
.dModal-close-anchor {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  height: 0;
  margin-inline-end: calc(.35rem - var(--modal-padding-inline));
}
.dModal-close {
  position: absolute;
  inset-block-start: calc(.35rem - var(--modal-padding-top));
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}
.dModal-close:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.dModal-close:disabled { opacity: .55; cursor: default; }

.sale-estimates { margin: .5rem 0; }
.presentation-card { min-width: 0; margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: .3rem; }
.presentation-card legend { padding: 0 .35rem; font-weight: 600; }
.presentation-values { display: grid; gap: .55rem; margin: 0 0 .75rem; min-width: 0; }
.presentation-values input[readonly],
.presentation-values input:disabled:not([type="checkbox"]) { background: #f0ece5; color: var(--ink); opacity: 1; }
.presentation-card.presentation-disabled { background: #e6e0d7; box-shadow: inset 0 0 0 100vmax #24211e0d; }
.presentation-disabled .presentation-values { opacity: .7; }
.presentation-card .presentation-toggle { display: flex; align-items: center; gap: .4rem; margin: 0; }
.presentation-toggle input { width: auto; margin: 0; }

.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
#settings-menu { position: relative; }
#settings-menu summary { cursor: pointer; padding: .5rem .75rem; border: 1px solid var(--line); }
.settings-options { position: absolute; right: 0; z-index: 2; min-width: 12rem; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 4px 12px #24211e20; }
.settings-options button { width: 100%; margin: 0; text-align: left; }
.presentation-setting { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.presentation-setting input { width: 100%; }

.wordmark { font-size: clamp(1.25rem, 3.5vw, 1.9rem); letter-spacing: .035em; }
@media (max-width: 640px) {
  header { flex-wrap: wrap; }
}

.perfume-dialog-actions { display: flex; align-items: center; gap: .35rem; }
#save-perfume { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin: 0; padding: 0; border-radius: .3rem; }
#save-perfume:disabled { opacity: .5; cursor: default; }
.perfume-stock-values { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .15rem 0 0; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.perfume-stock-values dt { font-size: .8rem; color: var(--muted); }
.perfume-stock-values dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#perfume-stock-status:empty { display: none; }
#perfume-dialog form { gap: .4rem; margin-top: .8rem; }
#perfume-dialog .perfume-fields, #perfume-dialog .presentation-values { gap: .4rem; }
#perfume-dialog .perfume-fields label { margin-bottom: .15rem; }
#perfume-dialog form input:not([type="checkbox"]), #perfume-use { padding: .4rem .55rem; }
#perfume-dialog :is(#perfume-brand, #perfume-use) { height: calc(1.55em + .8rem + 2px); }
#perfume-dialog .presentation-card { padding: .55rem; }
#perfume-dialog form p { margin: .2rem 0; }
.accord-color-fields { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.accord-color-fields input[type="color"] { width: 3rem; height: 2.7rem; padding: .2rem; }
.accord-color-fields button { margin: 0; }
.accord-swatch { display: inline-block; width: 1rem; height: 1rem; margin-right: .5rem; border: 1px solid var(--line); vertical-align: middle; }

.perfume-photo { min-width: 0; margin: 0; }
.perfume-photo-grid { display: grid; grid-template-columns: 77px repeat(2, minmax(0, 1fr)); grid-auto-rows: 100px; gap: .5rem; }
.perfume-photo-slot { width: 77px; height: 100px; }
#existing-supermini { display: block; width: 100%; height: 100%; object-fit: contain; }
#no-perfume-photo, #paste-image, #browse-photo { display: grid; place-items: center; text-align: center; }
#no-perfume-photo { height: 100%; padding: .25rem; border: 1px dashed var(--muted); font-size: .8rem; }
#browse-photo { align-content: center; gap: .35rem; margin: 0; background: var(--paper); color: var(--ink); }
#paste-image { position: relative; min-width: 0; overflow: hidden; border: 1px dashed var(--muted); cursor: text; }
#photo-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
#paste-photo-label { padding: .25rem; font-size: .85rem; }

.perfume-table-scroll { overflow-x: auto; }
#reportes { padding-top: 2rem; }
#statistics-status:empty { display: none; }
.statistics-table { font-size: .875rem; line-height: 1.35; }
.statistics-table :is(th, td) { padding: .35rem .45rem; }
.statistics-table th { max-width: 7rem; vertical-align: bottom; }
.statistics-table :is(th, td):nth-child(n+3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.statistics-table td:nth-child(n+3) { white-space: nowrap; }
.statistics-table :is(th, td):nth-child(2) { min-width: 9rem; }
.statistics-table tbody tr { cursor: default; }
.statistics-table img { display: block; object-fit: contain; }
.perfume-table .perfume-sale-price { text-align: right; white-space: nowrap; }

.perfume-list-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: 1rem; }
.perfume-list-filter :is(select, input) { font: inherit; color: var(--ink); background: var(--paper); padding: .4rem .6rem; border: 1px solid var(--line); max-width: 100%; }
.perfume-table th, .perfume-table td { padding-inline: .85rem; }
.perfume-table .perfume-notes { min-width: 10rem; }

.perfume-table #new-perfume {
  position: relative;
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.perfume-table #new-perfume::before,
.perfume-table #new-perfume::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .85rem;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.perfume-table #new-perfume::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.fragantica-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; }
#fragantica-synced { color: #395e50; font-size: .85rem; font-weight: 600; }

.fragantica-label { align-items: center; }
#perfume-accord-bar { position: relative; display: flex; flex: 1 1 4rem; min-width: 0; height: 20px; overflow: hidden; border-radius: .25rem; }
#perfume-accord-bar .accord-segment { flex-shrink: 0; min-width: 0; }
.accord-transition { position: absolute; inset-block: 0; pointer-events: none; }

.perfume-table .perfume-state-cell { width: 2.5rem; padding-inline: .35rem; text-align: center; }
.perfume-state { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; color: #fff; background: #72777c; font-size: .95rem; line-height: 1; }
.perfume-state.synced { background: #397054; }
.perfume-state.inactive { background: #86524f; }

.presentation-card { position: relative; }
.presentation-card > legend { max-width: calc(100% - 2rem); overflow-wrap: anywhere; }
.perfume-fields .presentation-enabled {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: .6rem;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #397054;
}
#photo-status:empty { display: none; }

.presentation-value-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  column-gap: .4rem;
}
.presentation-value-row > label:first-child { grid-column: 1 / -1; white-space: nowrap; }
.presentation-value-row > input { min-width: 0; font-variant-numeric: tabular-nums; }
.presentation-card .presentation-value-row .presentation-toggle {
  margin: 0;
  font-size: .8rem;
  white-space: nowrap;
}
@media (min-width: 641px) {
  #perfume-dialog { width: min(50rem, calc(100% - 2rem)); }
}

#inventarios { padding-top: 2rem; }
#inventory-picker { max-width: 36rem; }
#inventory-search, #inventory-entry input:not([type="checkbox"]) { width: 100%; padding: .55rem; border: 1px solid var(--line); }
.inventory-search-control { position: relative; }
#inventory-search { min-height: 44px; padding-inline-end: 48px; }
#inventory-search::-webkit-search-cancel-button { display: none; }
#clear-inventory-search {
  position: absolute;
  inset: 0 0 0 auto;
  width: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
#clear-inventory-search:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
#inventory-picker label, #inventory-entry label { display: block; margin-bottom: .3rem; }
#inventory-options button { display: grid; grid-template-columns: 25px minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: .65rem; padding: .35rem .6rem; overflow-wrap: anywhere; }
#inventory-options img { display: block; width: 25px; height: 32px; object-fit: contain; }
.inventory-summary { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-block: 1px solid var(--line); }
#inventory-photo { width: 88px; height: 114px; object-fit: contain; }
.inventory-facts { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.inventory-facts dt { color: var(--muted); }
.inventory-facts dd { margin: 0; font-weight: 600; }
#add-inventory { margin-top: 1rem; }

.inventory-entry-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#inventory-entry .inventory-override { margin: .75rem 0; }
#inventory-effective[readonly] { background: #f0ece5; }

.inventory-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.inventory-lot { margin: .75rem 0 .75rem clamp(.5rem, 4vw, 2rem); padding: .85rem; border: 1px solid var(--line); border-radius: .3rem; overflow-wrap: anywhere; }
.inventory-lot h3 { margin: 0; }
.inventory-lot progress {
  display: block;
  appearance: none;
  width: 100%;
  height: .65rem;
  border: 0;
  border-radius: .35rem;
  overflow: hidden;
  background: var(--stock-track);
  color: var(--stock-color);
}
progress::-webkit-progress-bar { background: var(--stock-track); }
progress::-webkit-progress-value { background: var(--stock-color); }
progress::-moz-progress-bar { background: var(--stock-color); }
.stock-high { --stock-color: #397054; --stock-track: #e2efe6; }
.stock-medium { --stock-color: #bd851e; --stock-track: #fcf0d4; }
.stock-low { --stock-color: #a34343; --stock-track: #f6dfdf; }

.inventory-lot-contents { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 1fr); gap: .85rem; }
.inventory-lot .inventory-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.inventory-lot-total dt { color: var(--muted); }
.inventory-lot-total dd { margin: 0; font-weight: 600; }
.inventory-sales-caption small { float: right; text-align: right; font: .75rem/1.4 var(--font-ui); color: var(--muted); }
@media (max-width: 640px) {
  .inventory-lot-contents { grid-template-columns: minmax(0, 3fr) minmax(5rem, 1fr); gap: .6rem; }
  .inventory-lot .inventory-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-sales-caption small { float: none; display: block; margin-top: .3rem; }
}

#inventory-report-status:empty { display: none; }
.inventory-report-table img, .decants-report-table img { display: block; object-fit: contain; }
:is(.inventory-report-table, .decants-report-table, .margins-report-table) tbody tr { cursor: default; }
#decants-report-status:empty, #margins-status:empty { display: none; }
.decants-report-table :is(th, td):last-child { text-align: right; font-variant-numeric: tabular-nums; }
:is(.inventory-report-table, .margins-report-table) th button { margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-weight: 600; }
:is(.inventory-report-table, .margins-report-table) th[aria-sort="ascending"] button::after { content: " ↑"; }
:is(.inventory-report-table, .margins-report-table) th[aria-sort="descending"] button::after { content: " ↓"; }
.inventory-report-volume { min-width: 8rem; }
#reporte-inventarios {
  --inventory-bottle: #397054;
  --inventory-decant: #75bbdf;
  --inventory-consumed: #d8d8d8;
}
.inventory-report-bar { display: flex; height: .65rem; margin-top: .3rem; overflow: hidden; border-radius: .35rem; }
.inventory-report-bar span { flex: 0 0 0; }
.inventory-bar-bottle { background: var(--inventory-bottle); }
.inventory-bar-decant { background: var(--inventory-decant); }
.inventory-bar-consumed { background: var(--inventory-consumed); }
.inventory-volume-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: 0; list-style: none; font-size: .85rem; }
.inventory-volume-legend li { display: flex; align-items: center; gap: .35rem; }
.inventory-volume-legend span { width: .7rem; height: .7rem; border-radius: .15rem; }

.inventory-report-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
#inventory-report-filter { width: 14rem; max-width: 100%; padding: .4rem .55rem; border: 1px solid var(--line); }
#inventory-report-totals { justify-content: flex-end; margin: 0 0 0 auto; text-align: right; }
.inventory-report-table .inventory-report-amount { text-align: right; white-space: nowrap; }

.inventory-lot-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.inventory-lot-remove { margin: 0; padding: .35rem .6rem; background: #8a4541; }

.inventory-lot-actions { display: flex; gap: .35rem; }
.inventory-lot-actions button { margin: 0; width: 2.25rem; height: 2.25rem; padding: 0; font-size: 1rem; }

.header-action {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  margin: 0;
  padding: .45rem 0;
  text-decoration: none;
  white-space: nowrap;
}
.header-action:hover { text-decoration: underline; }
.profile-icon { position: relative; display: inline-block; width: 1.125rem; height: 1.125rem; }
.profile-icon::before, .profile-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1.5px solid currentColor;
}
.profile-icon::before { top: 0; width: .375rem; height: .375rem; border-radius: 50%; }
.profile-icon::after { bottom: 0; width: .875rem; height: .375rem; border-radius: .65rem .65rem .2rem .2rem; }
#account-dialog { width: min(26rem, calc(100% - 2rem)); }
#account-dialog :is(label[for="account-user"], #account-request-intro, #account-confirm-email, #account-inbox-view > p) { padding-inline-end: 1.85rem; }
#account-status, #account-registration-status, #account-dialog .account-field-error { margin: .25rem 0; }
#account-dialog .account-field-error { color: #a52222; }
.account-password-control { position: relative; }
.account-password-control input { width: 100%; padding-inline-end: 3rem; }
.account-password-control input::-ms-reveal { display: none; }
.account-password-toggle {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
}
.account-password-toggle:focus-visible { outline-offset: -3px; }
.account-password-toggle[aria-pressed="false"] .password-eye-slash { display: none; }
.account-entry-links { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 .6rem; }
.account-link-separator { color: var(--muted); }
#account-inbox-ok { width: 100%; }
.account-text-link { display: block; margin-top: .65rem; text-align: center; text-decoration: underline; }
#account-confirm-email { overflow-wrap: anywhere; }
.account-login-divider { display: flex; align-items: center; gap: .65rem; margin: 1rem 0 .75rem; color: var(--muted); }
.account-login-divider::before, .account-login-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
#account-google {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin: 0;
  padding: .55rem .75rem;
  border: 1px solid #dadce0;
  border-radius: .25rem;
  color: #3c4043;
  background: #fff;
  font: 500 .875rem Roboto, Arial, sans-serif;
}
#account-google svg { flex: none; }
#account-google:disabled { cursor: default; }
#account-google-status { margin: .4rem 0 0; text-align: center; }
.admin-page { --admin-gutter: clamp(.75rem, 2vw, 1.5rem); }
.admin-page > :is(header, main, footer) { padding-inline: var(--admin-gutter); }
.admin-page > main { width: 100%; }
.admin-header { flex-wrap: wrap; }
.admin-header nav { flex-wrap: wrap; }
.reports-menu { position: relative; }
.reports-menu summary { cursor: pointer; }
.reports-menu-options {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 4;
  min-width: 9rem;
  padding: .2rem 0;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 4px 12px #24211e20;
}
.reports-menu-options a { display: block; padding: .4rem .8rem; }
.reports-menu-options a:hover, .reports-menu-options a:focus-visible { background: #f0ece5; }
.admin-directory { list-style: none; margin: 0; padding: 0; }
.admin-directory li { border-bottom: 1px solid var(--line); }
.admin-directory a {
  display: block;
  padding: 1rem 0;
  font: 1.4rem var(--font-ui);
  text-decoration: none;
}
.admin-directory a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  header .wordmark { font-size: 1.45rem; letter-spacing: .13em; }
  .admin-header nav { order: 1; flex-basis: 100%; }
}

.storefront-page { --storefront-gutter: clamp(1rem, 3vw, 3rem); }
.storefront-page > header, .storefront-page > footer { padding-inline: var(--storefront-gutter); }
.storefront { width: 100%; padding-inline: var(--storefront-gutter); }
.catalog-hero { display: block; padding: 0; }
#catalog-title { width: calc(100% + 2 * var(--storefront-gutter)); margin: 0 calc(-1 * var(--storefront-gutter)); }
#catalog-title:has(img:not([hidden])) > span { display: none; }
.catalog-hero img { display: block; width: 100%; height: auto; object-fit: contain; }
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
}
.catalog-filters { padding-top: 1.2rem; }
.catalog-filters h2 { margin-bottom: 1.15rem; font-size: 1.35rem; }
.catalog-filters label { display: block; margin-bottom: .3rem; font-size: .875rem; font-weight: 600; }
.catalog-filters :is(select, input) {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
  padding: .55rem .35rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .8rem;
}
.catalog-filters :is(select, input):disabled { color: var(--muted); }
#clear-filters {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: .25rem;
  background: var(--paper);
  color: var(--ink);
}
#clear-filters:hover:not(:disabled) { border-color: var(--ink); }
#clear-filters:disabled { color: var(--muted); opacity: .65; cursor: default; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.catalog-card {
  display: grid;
  grid-template-columns: minmax(0, min(36%, 8rem)) minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  min-height: 9rem;
  padding: .85rem;
  background: var(--paper);
  border-radius: .35rem;
  box-shadow: 0 2px 11px #24211e15;
}
.catalog-card-selected {
  background: linear-gradient(145deg, #fffdf7, #f1f3f8 58%, #f7f0f4);
  box-shadow: 0 2px 11px #24211e15, inset 0 0 0 1px #c5bbc6, inset 0 0 14px #fff9;
}
.catalog-image { display: grid; place-items: center; aspect-ratio: 77 / 100; }
.catalog-image img { width: 100%; height: 100%; object-fit: contain; }
.catalog-image[data-empty]::after { content: attr(data-empty); color: var(--muted); font-size: .75rem; }
.catalog-card-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.catalog-card h3 { margin: 0; font-size: clamp(1.04rem, 1.45vw, 1.35rem); overflow-wrap: anywhere; }
.catalog-brand { color: var(--muted); margin: .3rem 0 .65rem; font-size: .8rem; overflow-wrap: anywhere; }
.add-decant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: min(100%, 11rem);
  margin: 0;
  padding: .35rem .3rem;
  min-height: 2.65rem;
  border: 0;
  border-radius: .2rem;
  background: #000;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.15;
  text-transform: uppercase;
}
.add-decant:hover:not(:disabled) { background: #353330; }
.add-decant:disabled { opacity: .55; cursor: default; }
.add-decant:disabled .decant-icon, .catalog-card-selected .add-decant .decant-icon { display: none; }
.decant-icon {
  position: relative;
  width: .49rem;
  height: .86rem;
  margin: .22rem .45rem 0 .13rem;
  border: 1px solid currentColor;
  border-radius: 0 0 .15rem .15rem;
  transform: rotate(24deg);
  flex-shrink: 0;
}
.decant-icon::before {
  content: "";
  position: absolute;
  bottom: 100%;
  inset-inline: -1px;
  height: .29rem;
  background: currentColor;
  border-radius: .11rem .11rem 0 0;
}
.decant-icon::after {
  content: "";
  position: absolute;
  top: -.24rem;
  left: calc(100% + .14rem);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 3px -2px currentColor, 5px 1px currentColor;
  opacity: .8;
}
.catalog-more { padding: 1.5rem 0; text-align: center; }
/* Keep the grid cell occupied while its detail is in the modal. */
.catalog-card-raised { opacity: 0; }
html:has(.storefront-page #decant-dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
.storefront-page #decant-dialog {
  width: min(800px, calc(100% - 2rem));
  border: 0;
  border-radius: .5rem;
  transform-origin: top left;
  --modal-padding-top: .8rem;
  --modal-padding-inline: .8rem;
  padding: var(--modal-padding-top) var(--modal-padding-inline) .8rem;
}
.storefront-page #decant-dialog::backdrop {
  background: #24211e66;
  opacity: 0;
  transition: opacity 260ms ease;
}
.storefront-page #decant-dialog.decant-visible::backdrop { opacity: 1; }
@starting-style {
  .storefront-page #decant-dialog.decant-visible::backdrop { opacity: 0; }
}
.decant-detail {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 13fr);
  min-height: 400px;
  align-items: stretch;
}
#decant-image {
  position: relative;
  width: 100%;
  aspect-ratio: auto;
}
#decant-image img {
  position: absolute;
  inset: 0;
  padding: clamp(.35rem, 1vw, .9rem);
}
.decant-copy {
  min-width: 0;
  padding: clamp(1.167rem, 2.667vw, 2rem) clamp(.5rem, 2vw, 1.25rem) 1.5rem;
}
#decant-title { font-size: clamp(1.2rem, 3vw, 1.65rem); overflow-wrap: anywhere; }
#decant-description {
  margin: .45rem 0 0;
  font-size: .875rem;
  line-height: 1.35;
}
#decant-accords-title { font-size: .95rem; margin: clamp(1.1rem, 3vw, 1.75rem) 0 .5rem; }
#decant-sizes-title { font-size: .95rem; margin: .5rem 0 .35rem; }
#decant-accords {
  list-style: none;
  margin: 0;
  padding: 0;
}
#decant-accords li {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 200px);
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#decant-accords li + li { margin-top: 2px; }
.decant-accord-bar {
  display: block;
  height: 15px;
  border-radius: .2rem;
  transform-origin: left center;
}
.decant-visible .decant-accord-bar { animation: decant-accord-grow 500ms ease-out both; }
@keyframes decant-accord-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
#decant-no-accords { margin: 0; color: var(--muted); font-size: .85rem; }
.decant-purchase { margin-top: 0; }
#decant-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.25rem, 1.5vw, .8rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.decant-option {
  display: grid;
  gap: .35rem;
  padding: clamp(.2rem, 1.4vw, .75rem);
  border: 2px solid var(--line);
  border-radius: .35rem;
  background: var(--paper);
  text-align: center;
}
.decant-option.in-cart { border-color: var(--ink); background: var(--paper); }
.decant-option-heading { display: flex; justify-content: center; align-items: baseline; gap: .25rem .45rem; white-space: nowrap; }
.decant-option-heading strong { font-size: clamp(.7rem, 2.45vw, .95rem); }
.decant-option-price { font-size: clamp(.78rem, 2.75vw, 1.2rem); font-weight: 650; }
.decant-quantity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: min(100%, 9rem);
  margin-inline: auto;
}
.decant-quantity output { font-size: 1rem; }
.decant-quantity button {
  display: grid;
  place-items: center;
  min-height: 40px;
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}
.decant-quantity svg { width: 1rem; height: 1rem; }
.decant-cart-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.65rem, 4.9vw, 1.2rem);
  min-height: 40px;
  margin: 0;
  padding: .2rem;
  font-size: clamp(.62rem, 2.5vw, .75rem);
  border-color: var(--ink);
  border-radius: .25rem;
}
.decant-cart-add.decant-cart-remove { color: var(--ink); background: var(--paper); }
.decant-cart-add.decant-cart-confirmed:disabled { color: var(--paper); background: var(--ink); box-shadow: inset 0 0 0 2px var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .decant-cart-confirmed { animation: decant-cart-press 500ms ease-out; }
  @keyframes decant-cart-press {
    25% { transform: scale(.95); }
    100% { transform: scale(1); }
  }
}
:is(.decant-cart-add, .decant-quantity button):disabled { background: #edeae5; color: var(--muted); cursor: default; }
.shop-header-actions { grid-area: actions; display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.5rem); }
#cart-count {
  display: grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding-inline: .2rem;
  border-radius: 999px;
  color: #000;
  background: #fff;
  font-size: .75rem;
}
.cart-feedback { margin: .75rem 0 0; }
.cart-feedback:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .storefront-page #decant-dialog::backdrop { transition: none; }
  .decant-visible .decant-accord-bar { animation: none; }
}
@media (max-width: 1090px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-filters { display: none; }
}
@media (max-width: 490px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-card { grid-template-columns: 5.75rem minmax(0, 1fr); }
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/instrument-sans.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

h1, h2, h3, .wordmark { font-weight: 500; }
.storefront-page .catalog-card h3 { font-size: clamp(1.3rem, 1.65vw, 1.85rem); }
.catalog-brand { margin: .25rem 0 .3rem; font-size: 1.05rem; }
.catalog-price { margin: 0 0 .6rem; font-size: .95rem; }
.catalog-brand:empty { display: none; }
.catalog-price[hidden] + .add-decant { margin-top: .3rem; }

.admin-page #decant-dialog { width: min(25rem, calc(100% - 2rem)); }
.decant-fields { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); }
#decant-size { width: 100%; padding: .7rem; border: 1px solid var(--line); background: var(--paper); }
#decant-status { margin: 0; }
#decant-status:empty { display: none; }
#save-decant { justify-self: end; margin: 0; }
.inventory-lot-decant:disabled { opacity: .45; cursor: default; }
.inventory-decants { width: auto; max-width: 100%; margin: .65rem 0 0 auto; font-size: .85rem; }
.inventory-decants :is(th, td) { padding: .35rem clamp(.2rem, 1vw, .55rem); }
.inventory-decants :is(th, td):not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.inventory-decants tbody tr { cursor: default; }

#label-priority-form { display: flex; }
#label-priority-quantity { width: 5rem; }
#label-priority-form button { margin: 0; }
#label-priority-list { margin: .6rem 0 1rem; padding: 0; list-style: none; }
#label-priority-list li { display: flex; align-items: center; gap: .6rem; margin-block: .35rem; }
#label-priority-list button {
  margin: 0;
  padding: .2rem .45rem;
  color: var(--ink);
  background: var(--paper);
}

.label-print-page { min-height: 100vh; width: 215.9mm; margin: 0 auto; padding-block: 8mm; color: #000; font-family: Arial, sans-serif; }
.label-print-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin: 0 5mm 8mm; }
.label-print-controls :is(button, p) { margin: 0; }
.label-print-controls p { font-size: .875rem; }
.label-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(11, 18mm);
  justify-content: center;
  padding-inline: 5mm;
  break-inside: avoid;
}
.label-row:not(:first-child)::before, .label-row:not(:first-child)::after {
  content: "";
  position: absolute;
  top: 0;
  width: 5mm;
  border-top: 1px solid #000;
}
.label-row::before { left: 0; }
.label-row::after { right: 0; }
.perfume-label {
  display: grid;
  grid-template-columns: 12mm minmax(0, 1fr);
  align-items: start;
  width: 18mm;
  height: 25mm;
  break-inside: avoid;
}
.label-bottle { width: 100%; height: 20mm; align-self: center; object-fit: contain; object-position: center; }
.label-copy { display: flex; justify-content: flex-start; align-items: flex-start; gap: .2mm; height: 25mm; text-align: center; }
.label-copy :is(span, strong) {
  writing-mode: vertical-lr;
  text-orientation: sideways;
  inline-size: 25mm;
  overflow-wrap: anywhere;
  font-size: 6pt;
  line-height: .95;
}
.label-copy span { writing-mode: vertical-rl; }
.label-copy strong { font-size: 5pt; }

@media print {
  @page perfume-labels { size: letter; margin: 8mm 0; }
  .label-print-page { page: perfume-labels; min-height: 0; width: auto; padding: 0; }
  .label-print-controls { display: none; }
}

.margins-report-table :is(th, td):nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

#sale-line-form { display: flex; }
#sale-quantity { width: 5rem; }
#add-sale-line, .sale-summary button { margin: 0; }
.sale-lines :is(th, td):nth-child(n+3) { white-space: nowrap; text-align: right; }
.sale-lines tbody tr { cursor: default; }
.sale-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .7rem 1rem; }
.sale-summary strong { font-variant-numeric: tabular-nums; }

#profits-period-form button { margin: 0; }
.profits-totals { margin: 1rem 0; padding: .65rem 0; border-block: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.profits-report-table tbody tr { cursor: default; }
.profits-report-table :is(th, td):nth-child(n+3) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.storefront-page > header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "brand search cart actions";
  gap: clamp(.65rem, 2vw, 1.5rem);
  padding-block: .4rem;
  border-bottom-color: #333;
  color: #fff;
  background: #000;
}
.shop-brand { grid-area: brand; display: flex; align-items: baseline; gap: clamp(.4rem, 1vw, .85rem); }
.shop-tagline { color: #ddd; font-size: clamp(.72rem, 1.2vw, .85rem); white-space: nowrap; }
.storefront-page > header .wordmark {
  font-size: clamp(1rem, 2.1vw, 1.4rem);
  letter-spacing: .025em;
  white-space: nowrap;
}
.storefront-page > header .header-action { min-height: 44px; color: inherit; }
.storefront-page > header :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.storefront-page > header .reports-menu-options { color: var(--ink); }
.storefront-page > header .reports-menu-options :focus-visible { outline-color: var(--ink); outline-offset: -2px; }
#profile-menu .reports-menu-options { left: auto; right: 0; }
#open-cart { grid-area: cart; justify-content: center; min-width: 44px; }
#shop-menu-toggle, .shop-menu-heading, .account-label-mobile { display: none; }
.catalog-quick-search { grid-area: search; min-width: 0; }
.storefront-page > header:not(:has(.catalog-quick-search:not([hidden]))) .shop-brand { grid-column: 1 / 3; }
.catalog-search-field { position: relative; max-width: 34rem; margin: auto; }
.catalog-search-control { display: flex; align-items: stretch; min-height: 44px; border: 1px solid #777; }
#catalog-search-input { flex: 1; min-width: 0; padding: .6rem .75rem; border: 0; background: #000; color: #fff; color-scheme: dark; }
#catalog-search-input::placeholder { color: #ddd; }
#catalog-search-input::-webkit-search-cancel-button { display: none; }
.catalog-search-control button {
  display: grid;
  place-items: center;
  width: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
}
#clear-catalog-search { font-size: 1.45rem; }
.catalog-search-control :is(input, button):focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
#catalog-search-results { position: absolute; inset: 100% 0 auto; z-index: 5; margin: 0; padding: 0; max-height: 18rem; overflow: auto; list-style: none; color: #fff; background: #000; border: 1px solid #777; box-shadow: 0 4px 12px #24211e20; }
#catalog-search-results li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .65rem; align-items: center; padding: .35rem .65rem; cursor: pointer; }
#catalog-search-results li:is(:hover, :focus-visible) { background: #333; }
#catalog-search-results strong, #catalog-search-results strong + span { display: block; }
#catalog-search-results strong + span { color: #ddd; font-size: .8rem; }
.catalog-search-photo { width: 2rem; height: 2.5rem; }
.catalog-search-photo img { width: 100%; height: 100%; object-fit: contain; }
.catalog-use { grid-column: 1 / -1; margin-bottom: .65rem; }
.catalog-use p { margin: 0 0 .25rem; font-size: .875rem; font-weight: 600; }
.catalog-use ul { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.catalog-use a { display: inline-block; padding: .2rem 0; text-decoration: none; }
.catalog-use a:hover, .catalog-use a[aria-current] { text-decoration: underline; text-underline-offset: .15em; }
.catalog-use a[aria-current] { font-weight: 700; }
#catalog-mobile-uses { display: none; }
@media (max-width: 880px) {
  .storefront-page > header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand cart menu" "search search search";
    container-type: inline-size;
    row-gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
  }
  .storefront-page > header::before {
    content: "";
    grid-area: 1 / 1 / 2 / -1;
    align-self: stretch;
    z-index: -1;
    background: #000;
  }
  .storefront-page > header > * { pointer-events: auto; }
  .shop-tagline { display: none; }
  .storefront-page > header:not(:has(.catalog-quick-search:not([hidden]))) .shop-brand { grid-column: brand; }
  .storefront-page > header > :is(.shop-brand, #open-cart, #shop-menu-toggle) { margin-block: .4rem; }
  .shop-brand { margin-inline-start: var(--storefront-gutter); }
  #shop-menu-toggle {
    grid-area: menu;
    display: grid;
    place-items: center;
    min-width: 44px;
    margin-inline-end: var(--storefront-gutter);
  }
  #shop-menu {
    display: none;
    position: absolute;
    grid-row: 1 / 2;
    top: 100%;
    inset-inline-end: 4px;
    z-index: 6;
    width: min(16rem, calc(100cqw - 8px));
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    border: 1px solid #555;
    background: #000;
  }
  #shop-menu-toggle[aria-expanded="true"] + #shop-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  #shop-menu {
    --shop-heading-inset: .8rem;
    --shop-option-inset: calc(var(--shop-heading-inset) + 20px + .55rem);
  }
  #shop-menu .reports-menu > summary,
  #account-link :is(.account-label-desktop, .profile-icon) { display: none; }
  .account-label-mobile { display: inline; }
  #account-entry { padding-block: .4rem; }
  #shop-menu :is(.reports-menu-options a, #profile-logout, #account-link) {
    padding-inline: var(--shop-option-inset) .8rem;
    font-size: .9rem;
  }
  #shop-menu :is(#profile-menu, #help-menu) .reports-menu-options {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    padding-block: .4rem;
    border: 0;
    border-top: 1px solid #555;
    box-shadow: none;
  }
  .shop-menu-heading {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    column-gap: .55rem;
    margin: .25rem var(--shop-heading-inset);
    font-size: 1rem;
    font-weight: 700;
  }
  .shop-menu-heading .profile-icon { justify-self: center; }
  .catalog-search-content {
    padding: .45rem var(--storefront-gutter);
    background: #000;
    transition: transform .2s ease;
  }
  /* Clip the sliding row without changing its size or cutting off search suggestions. */
  .catalog-quick-search {
    clip-path: inset(0 0 -18rem);
    transition: visibility 0s;
  }
  .catalog-quick-search.is-collapsed {
    visibility: hidden;
    pointer-events: none;
    transition-delay: .2s;
  }
  .catalog-quick-search.is-collapsed .catalog-search-content { transform: translateY(-100%); }
  #shop-menu-toggle[aria-expanded="true"] ~ .catalog-quick-search {
    visibility: hidden;
    pointer-events: none;
    transition: none;
  }
  #shop-menu-toggle[aria-expanded="true"] ~ .catalog-quick-search .catalog-search-content { transition: none; }
  @media (prefers-reduced-motion: reduce) {
    .catalog-search-content, .catalog-quick-search.is-collapsed { transition: none; }
  }
  .catalog-search-field { max-width: none; }
  #catalog-mobile-uses { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; margin: .35rem 0 0; padding: 0; list-style: none; }
  #catalog-mobile-uses li + li { border-left: 1px solid #999; }
  #catalog-mobile-uses a { display: block; padding: .25rem clamp(.4rem, 2vw, .7rem); color: inherit; text-decoration: none; }
  #catalog-mobile-uses a:is(:hover, [aria-current]) { text-decoration: underline; text-underline-offset: .15em; }
  #catalog-mobile-uses a[aria-current] { font-weight: 700; }
}

.decant-perfume-summary, .decant-footer-actions { display: none; }

@media (max-width: 720px) {
  html:has(.storefront-page #decant-dialog[open]) { scrollbar-gutter: auto; }
  .storefront-page #decant-dialog {
    width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh;
    max-height: 100vh; max-height: 100dvh;
    inset: 0; margin: 0; border-radius: 0;
    --modal-padding-top: max(.5rem, env(safe-area-inset-top, 0px));
    --modal-padding-inline: .65rem;
    padding-inline-start: max(.65rem, env(safe-area-inset-left, 0px));
    padding-inline-end: max(.65rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(.65rem, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }
  .decant-info :is(#decant-title, #decant-brand) { padding-inline-end: 2.1rem; }
  .decant-detail { min-height: 0; row-gap: .45rem; }
  .decant-copy { display: contents; }
  .decant-info { min-width: 0; padding: 0 .2rem .15rem .35rem; }
  #decant-title { font-size: 1.15rem; }
  #decant-brand { margin: .2rem 0; }
  #decant-description { margin-top: .25rem; font-size: .8rem; }
  .decant-profile { grid-column: 1 / -1; width: 80%; margin: .35rem auto 0; }
  #decant-accords-title { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
  #decant-accords li { grid-template-columns: minmax(5rem, 34%) minmax(0, 1fr); }
  #decant-accords li:nth-child(n+7) { display: none; }
  #decant-accords .decant-accord-bar { height: .65rem; }
  .decant-purchase { margin-top: .9rem; }
  #decant-sizes-title { margin: 0 0 .65rem; }
  #decant-sizes { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .decant-perfume-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .35rem .8rem;
    margin: .75rem 0 0;
    padding-top: .55rem;
    border-top: 1px solid var(--line);
    font-size: .85rem;
  }
  #decant-perfume-total { margin-left: auto; font-size: 1.15rem; text-align: right; }
  .decant-footer-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.35rem; }
  .decant-footer-actions button {
    flex: 1 1 7.5rem;
    min-height: 44px;
    margin: 0;
    padding: .45rem .55rem;
    border: 1px solid var(--ink);
    border-radius: .3rem;
    color: var(--ink);
    background: var(--paper);
    font-size: .82rem;
    font-weight: 600;
  }
  .decant-footer-actions .decant-footer-primary { color: var(--paper); background: var(--ink); }
  .decant-option {
    grid-template-columns: minmax(5.75rem, 1fr) minmax(0, .75fr) minmax(5.25rem, 1fr);
    grid-template-areas: "quantity price action";
    align-items: center;
    padding: .3rem;
  }
  .decant-option-heading { grid-area: price; flex-direction: column; align-items: center; gap: 0; }
  .decant-quantity { grid-area: quantity; justify-self: start; margin: 0; }
  .decant-cart-add { grid-area: action; justify-self: end; width: min(100%, 8rem); gap: .25rem; }
  .decant-option :is(.decant-quantity button, .decant-cart-add) { min-height: 44px; }
  .decant-cart-add .decant-icon { margin-inline: .1rem .25rem; }
}

.cart-page { width: min(100%, 42rem); margin: .85rem auto 0; font-size: .875rem; }
.cart-page h1 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); }
.cart-perfumes, .cart-presentations { display: grid; padding: 0; margin: 0; list-style: none; }
.cart-perfumes { gap: .65rem; }
.cart-perfume {
  grid-template-columns: minmax(0, 3.15rem) minmax(0, 1fr);
  align-items: center;
  gap: .25rem .65rem;
  min-height: 0;
  padding: .55rem .7rem;
  box-shadow: 0 2px 10px #24211e21, inset 0 0 0 1px #24211e16;
}
.cart-perfume-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .5rem; }
.cart-perfume-copy { min-width: 0; }
.storefront-page .cart-perfume h3 { font-size: 1.05rem; }
.cart-perfume-copy .catalog-brand { margin: .15rem 0 0; }
.cart-perfume-subtotal { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.cart-presentations { grid-column: 1 / -1; }
.cart-presentation {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "quantity multiply price action";
  align-items: center;
  gap: clamp(.25rem, 1.1vw, .6rem);
  padding: .2rem 0;
  border: 0;
  border-radius: 0;
}
.cart-presentation + .cart-presentation { border-top: 1px solid #24211e16; }
.cart-presentation .decant-quantity {
  grid-area: quantity;
  grid-template-columns: 2.25rem 1.45rem 2.25rem;
  width: auto;
  margin: 0;
}
.cart-presentation .decant-quantity output { font-size: .85rem; }
.cart-multiply { grid-area: multiply; color: var(--muted); }
.cart-presentation .decant-option-heading {
  grid-area: price;
  flex-direction: row;
  justify-content: flex-start;
  gap: .25rem;
}
.cart-presentation .decant-option-heading :is(strong, .decant-option-price) { font-size: .8rem; }
.cart-presentation .decant-cart-add { grid-area: action; width: auto; padding-inline: .4rem; }
.cart-presentation :is(.decant-quantity button, .decant-cart-add) { min-height: 34px; }
@media (pointer: coarse) {
  .cart-presentation :is(.decant-quantity button, .decant-cart-add) { min-height: 44px; }
}
@media (max-width: 350px) {
  .cart-presentation .decant-quantity { grid-template-columns: 1.85rem 1.15rem 1.85rem; }
  .cart-presentation .decant-option-heading :is(strong, .decant-option-price) { font-size: .74rem; }
}
.cart-grand-total { display: flex; justify-content: space-between; margin-top: .85rem; padding-block: .55rem; border-top: 1px solid var(--line); font-size: 1rem; }
.cart-page-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .7rem; }
.cart-page-actions :is(a, button) { flex: 1 1 8rem; display: grid; place-items: center; min-height: 44px; margin: 0; padding: .45rem; text-align: center; border: 1px solid var(--ink); border-radius: .3rem; }
.cart-page-actions a { text-decoration: none; }
.cart-page-actions button:disabled { cursor: default; opacity: .6; }

#profile-menu .reports-menu-options { right: 0; left: auto; min-width: 10rem; }
#profile-menu .reports-menu-options button {
  width: 100%;
  margin: 0;
  padding: .4rem .8rem;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}
#profile-menu .reports-menu-options button:is(:hover, :focus-visible) { background: #f0ece5; }


.checkout-page { width: min(100%, 52rem); margin: 1rem auto 2rem; }
.checkout-page h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); margin: .4rem 0 .85rem; }
.checkout-back { font-size: .88rem; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .55fr); gap: 1rem; align-items: start; }
.checkout-steps { display: grid; gap: 1rem; }
.checkout-delivery-note { margin: .4rem .85rem 0; }
.checkout-delivery-note a { text-underline-offset: .15em; }
.checkout-page :is(.checkout-step, .checkout-summary) { min-width: 0; margin: 0; padding: .85rem; border: 1px solid var(--line); border-radius: .35rem; }
.checkout-page h2 { margin: 0 0 .55rem; font-size: 1.05rem; font-weight: 650; }
#checkout-delivery-options, #checkout-payment-options { min-width: 0; margin: 0; padding: 0; border: 0; }
#checkout-address-form { margin: 0; }
#checkout-address-form label { display: block; margin-bottom: .25rem; }
#checkout-address-form input { width: 100%; min-width: 0; }
.checkout-step-summary { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; width: 100%; min-height: 44px; margin: 0; padding: .55rem .65rem; color: var(--ink); background: var(--paper); border-radius: .25rem; text-align: left; overflow-wrap: anywhere; }
.checkout-edit-icon { flex: none; align-self: center; }
.checkout-step[aria-disabled="true"] h2 { color: var(--muted); }
.checkout-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem; align-items: start; padding: .55rem 0; cursor: pointer; }
.checkout-option input { margin: .2rem 0 0; }
.checkout-option small { display: block; color: var(--muted); }
.checkout-delivery-group { border-block: 1px solid var(--line); padding: .35rem 0; }
.checkout-delivery-group p { margin: .25rem 0; font-weight: 600; }
.checkout-unavailable { cursor: default; color: var(--muted); }
.checkout-summary h2 { margin: 0; }
.checkout-summary dl { margin: .65rem 0 0; }
.checkout-summary dl div { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; }
.checkout-summary dl div:last-child { border-top: 1px solid var(--line); font-weight: 700; margin-top: .25rem; }
.checkout-summary dd { margin: 0; white-space: nowrap; }
#checkout-login-dialog { width: min(26rem, calc(100% - 2rem)); }
#checkout-login-message { margin: 0; }
#checkout-login-ok { width: 100%; margin-top: .85rem; }
@media (max-width: 620px) { .checkout-layout { grid-template-columns: minmax(0, 1fr); } }

#checkout-pay { width: 100%; }
#checkout-pay:disabled { opacity: .55; cursor: default; }
#checkout-payment-status { margin-bottom: 0; overflow-wrap: anywhere; }

#decant-stock-status { color: #b42318; font-size: .85rem; margin: .5rem 0 0; }
@media (min-width: 721px) {
  #decant-sizes:has(> :only-child) > :only-child { grid-column: 2; }
  #decant-sizes:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 68%; margin-inline: auto; }
}

.cart-stock-note { grid-column: 1 / -1; margin: .1rem 0 .3rem; color: #b42318; font-size: .8rem; text-align: left; }

.customer-orders-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.customer-order-card {
  min-width: 0;
  padding: clamp(.7rem, 3vw, 1.15rem);
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--paper);
}
.customer-order-header,
.customer-order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .75rem;
}
.customer-order-header { position: relative; justify-content: space-between; }
.customer-order-header:has(.customer-order-delete) { padding-inline-end: 44px; }
.customer-order-header h2 { font: inherit; font-weight: 600; }
.customer-order-total { margin-inline-start: .45rem; color: var(--muted); white-space: nowrap; }
.customer-order-actions { justify-content: flex-end; margin-inline-start: auto; }
.customer-order-actions:empty { display: none; }
.customer-order-actions :is(button, a) { margin: 0; font-size: .82rem; }
.customer-order-actions button { min-height: 44px; padding: .35rem .65rem; }
.customer-order-actions .customer-order-delete {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
}
.customer-order-delete svg { width: 20px; height: 20px; }
.customer-order-status { margin: .15rem 0 0; font-size: 1.2rem; font-weight: 700; }
.customer-order-photo-frame { position: relative; min-width: 0; margin-top: .65rem; }
.customer-order-photo-frame::before,
.customer-order-photo-frame::after {
  content: "";
  position: absolute;
  inset-block: 0;
  z-index: 1;
  width: 1.75rem;
  pointer-events: none;
  opacity: 0;
}
.customer-order-photo-frame::before {
  inset-inline-start: 0;
  background: linear-gradient(to right, var(--paper), transparent);
}
.customer-order-photo-frame::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, var(--paper), transparent);
}
.customer-order-photo-frame.has-photos-left::before,
.customer-order-photo-frame.has-photos-right::after { opacity: 1; }
.customer-order-photos {
  display: flex;
  gap: .5rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  margin: 0;
  padding: .25rem 0;
  list-style: none;
}
.customer-order-photos li { flex: 0 0 3.5rem; }
.customer-order-photos img { display: block; width: 100%; height: 3.5rem; object-fit: contain; }

.order-edit-progress { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 10000; display: flex; align-items: center; gap: .65rem; width: max-content; max-width: calc(100% - 2rem); padding: .85rem 1.1rem; background: #171717; color: #fff; border-radius: .4rem; box-shadow: 0 3px 16px #0003; font-size: .95rem; }
.order-edit-spinner { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: order-edit-spin .75s linear infinite; }
@keyframes order-edit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .order-edit-spinner { animation: none; } }

.payment-confirmation { max-width: 40rem; margin: 2rem auto; text-align: center; padding-block: clamp(1rem,4vw,2.5rem); }
.payment-confirmation h1 { font-size: clamp(1.9rem,5vw,2.7rem); margin-block: .5rem 1rem; }
.payment-confirmation .eyebrow { margin-bottom: .6rem; }
.payment-result-icon { display: grid; place-items: center; width: 4.4rem; height: 4.4rem; margin: 0 auto 1.4rem; color: #187443; background: #eaf5ee; border-radius: 50%; }
.payment-order-reference { margin-block: 1.25rem; font-weight: 600; }
.payment-next-step { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.5rem; }
.payment-next-step h2 { font-size: 1.2rem; }
.payment-next-step p { margin: .7rem auto 0; max-width: 33rem; }
.payment-result-actions { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-block: 1.5rem; }
.payment-primary-action { padding: .8rem 1.25rem; border-radius: .25rem; background: var(--ink); color: var(--paper); text-decoration: none; min-height: 44px; }
.payment-primary-action:focus-visible { outline: 2px solid #187443; outline-offset: 4px; }
.payment-result-actions button { margin: 0; }
.policy-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem 1.4rem; }
.payment-policy-links { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 2rem; font-size: .85rem; }
.policy-dialog h2 { font-size: 1.6rem; padding-right: 2rem; }
.policy-dialog h3 { font-size: 1.1rem; margin-top: 1.4rem; }
.policy-dialog p { line-height: 1.65; }
.storefront-page > footer { flex-wrap: wrap; }
@media (max-width: 620px) { .payment-confirmation { margin-block: .75rem; } .payment-primary-action { width: 100%; } .storefront-page > footer { justify-content: center; text-align: center; } .storefront-page > footer .policy-links { flex-basis: 100%; } }

.payment-confirmation h1:focus { outline: none; }

.payment-whatsapp-action { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; background: #128c7e; color: #fff; }
.payment-whatsapp-action:hover { background: #0e766a; }
.payment-whatsapp-action:focus-visible { outline-color: #128c7e; }
.payment-whatsapp-icon { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; }

#help-menu .reports-menu-options { left: auto; right: 0; min-width: 16rem; max-width: calc(100vw - 2rem); }
#help-menu summary { display: flex; align-items: center; gap: .35rem; list-style: none; }
#help-menu summary::-webkit-details-marker { display: none; }
.storefront-page > footer { justify-content: center; }
.order-whatsapp-link { display: inline-block; color: #0e766a; text-underline-offset: .18em; padding-block: .35rem; }

/* Short pages leave free space in main, never inside the footer. */
body:is(.storefront-page, .admin-page) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:is(.storefront-page, .admin-page) > header { flex-shrink: 0; }
body:is(.storefront-page, .admin-page) > main { flex: 1 0 auto; min-height: 0; margin: 0 auto; }
body:is(.storefront-page, .admin-page) > footer { flex: 0 0 auto; min-height: 4rem; max-height: 6rem; overflow-y: auto; padding-block: .8rem; }
body > header :is(a, summary, button), body > header :is(a, summary, button):hover,
body > header .header-action:hover { text-decoration: none; }

.checkout-page .checkout-summary.transfer-slip { width: min(100%, 27rem); margin: 1rem auto; text-align: start; }
.transfer-slip-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.transfer-slip-heading h2 { margin: 0; font-size: 1.1rem; }
.transfer-pdf-action {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border-radius: .25rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}
.transfer-slip dd { margin: 0; text-align: end; overflow-wrap: anywhere; }


#pedidos .brands-table { margin-top: 0; }
#pedidos .perfume-table-scroll + .section-line,
#pedidos #pending-orders-empty + .perfume-table-scroll[hidden] + .section-line { margin-top: 1rem; }
.admin-order-reference details { font-size: .85rem; font-weight: 400; }
.admin-order-reference summary { cursor: pointer; white-space: nowrap; }
.admin-order-reference ul { margin: .25rem 0; padding-inline-start: 1.1rem; }
#admin-cancel-order-dialog, #admin-transfer-dialog, #admin-extend-order-dialog { width: min(26rem, calc(100% - 2rem)); }
#admin-transfer-dialog h2, #admin-extend-order-dialog h2 { padding-inline-end: 1.85rem; }


#catalog-heading.section-line { border-top: 0; }

@media (min-width: 721px) {
  .catalog-filters { position: sticky; top: var(--catalog-sticky-header-height, 60px); align-self: start; max-height: calc(100dvh - var(--catalog-sticky-header-height, 60px) - .75rem); overflow-y: auto; overscroll-behavior: contain; padding-bottom: .75rem; }
  .catalog-layout { scroll-margin-top: var(--catalog-sticky-header-height, 60px); }
}

@media (max-width: 720px) {
  .catalog-hero { display: grid; grid-template-rows: 1fr; width: calc(100% + 2 * var(--storefront-gutter)); margin-inline: calc(-1 * var(--storefront-gutter)); overflow: hidden; transition: grid-template-rows .35s ease; }
  .catalog-hero #catalog-title { width: 100%; min-height: 0; margin: 0; overflow: hidden; }
  .catalog-hero img { transition: transform .35s ease, opacity .25s ease; }
  .catalog-hero.is-mobile-collapsed { grid-template-rows: 0fr; }
  .catalog-hero.is-mobile-collapsed img { transform: translateY(-100%); opacity: 0; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .catalog-hero, .catalog-hero img { transition: none; }
}

.catalog-hero #catalog-title { position: relative; }
.catalog-hero #catalog-title::after { content: ""; position: absolute; inset: auto 0 0; height: clamp(1.1rem, 15%, 3rem); background: linear-gradient(to bottom, #ffffff00, #fff); pointer-events: none; }

@media (max-width: 720px) {
  .catalog-hero, .catalog-hero #catalog-title, .catalog-layout, #catalog-heading.section-line { border: 0; box-shadow: none; }
  .catalog-hero { background: #fff; }
  .catalog-hero #catalog-title::after { content: none; }
  .catalog-hero img { -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 85%, transparent 98%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 85%, transparent 98%, transparent 100%); }
}

/* Keep the purchase summary reachable on short mobile screens. */
.decant-fixed-footer { display: none; }
@media (max-width: 720px) {
  .storefront-page #decant-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
  #decant-dialog > .dModal-close-anchor { flex: 0 0 0; }
  .decant-scroll-content { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .decant-fixed-footer { display: block; flex: 0 0 auto; background: var(--paper); }
  .decant-fixed-footer .decant-perfume-summary { margin-top: 0; padding-top: .65rem; }
  .decant-fixed-footer .decant-footer-actions { margin-top: .75rem; }
  .decant-scroll-content .decant-purchase { padding-bottom: .75rem; }
}

@media (max-width: 720px) {
  .decant-fixed-footer { position: relative; z-index: 1; }
  .decant-fixed-footer::before {
    content: ""; position: absolute; inset: auto 0 100%; height: 1.25rem;
    background: linear-gradient(to bottom, transparent, rgb(0 0 0 / .16));
    opacity: 0; pointer-events: none;
  }
  .decant-fixed-footer.has-more-content::before { opacity: 1; }
}

@media (max-width: 720px) {
  .storefront-page #decant-dialog { touch-action: auto; }
}

/* Route headings receive focus for announcements without a visual control ring. */
.storefront-page :is(h1, h2, h3)[tabindex="-1"]:focus { outline: none; }

body.storefront-page > footer { min-height: 3rem; padding-block: .55rem; }

.payment-result-frame { padding: 0; }
.payment-order-reference { display: grid; gap: .45rem; padding: 1rem; border: 1px solid var(--line); border-radius: .5rem; font-size: clamp(1.25rem, 4vw, 1.6rem); line-height: 1.3; }
.payment-order-reference:empty { display: none; }
.payment-next-step > .payment-primary-action { display: inline-flex; margin-top: .5rem; }
.payment-result-frame .payment-result-actions:has(> :not([hidden])) { margin-bottom: 0; }
.payment-result-frame .payment-result-actions:not(:has(> :not([hidden]))) { display: none; }
.payment-home-link { display: flex; align-items: center; justify-content: center; gap: .5rem; width: fit-content; margin: 2.75rem auto 0; min-height: 44px; text-decoration: none; }
.payment-home-link:hover { text-decoration: underline; }
.payment-confirmation .payment-policy-links { margin-top: .65rem; padding-top: 0; border-top: 0; }

.payment-confirmation .eyebrow { font-size: clamp(1.25rem, 4vw, 1.6rem); line-height: 1.3; letter-spacing: .06em; }

.checkout-terms-consent { display: flex; align-items: flex-start; gap: .65rem; margin-block: 1rem; line-height: 1.5; font-size: .9rem; cursor: pointer; }
.checkout-terms-consent input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; }
.checkout-terms-consent a { text-underline-offset: .15em; }

#checkout-address-form select { width: 100%; min-width: 0; }
#checkout-address-form input[readonly] { background: #f5f5f5; color: var(--muted); }
#checkout-postal-status { margin: 0; }
#checkout-postal-status:empty { display: none; }

#checkout-address-form select { padding: .7rem 2.25rem .7rem .7rem; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background-color: var(--paper); min-height: 44px; }
#checkout-address-form select:disabled { color: var(--muted); }

.checkout-location-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; }

.checkout-location-row select { padding-inline-end: 1.4rem; }

.perfume-table .perfume-unit-cost { text-align: right; white-space: nowrap; }

.perfume-table .perfume-sort { padding: .35rem 0; margin: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: 600; text-align: inherit; white-space: nowrap; cursor: pointer; }
.perfume-sort::after { content: ' ↕'; font-size: .75em; color: var(--muted); }
.perfume-sort[data-direction="ascending"]::after { content: ' ↑'; color: var(--ink); }
.perfume-sort[data-direction="descending"]::after { content: ' ↓'; color: var(--ink); }
.perfume-table .perfume-presentation-group { text-align: center; border-inline-start: 1px solid var(--line); }
.perfume-table .perfume-presentation-start { border-inline-start: 1px solid var(--line); }
.perfume-table .perfume-negative-profit { color: #a12222; }

.perfume-table td:is(.perfume-unit-cost, .perfume-per-ml) { font-weight: 700; }

.perfume-table { --line: #ece8e2; }
.perfume-name-content { display: flex; align-items: center; gap: .55rem; }
.perfume-name-content .perfume-state { flex-shrink: 0; }

.customer-order-date { display: block; margin-top: .25rem; color: var(--muted); font-size: .85rem; font-weight: 400; }

.customer-order-unavailable { margin-inline-start: .5rem; color: #b42318; font-weight: 500; }

#start-checkout.has-stock-warning { opacity: .6; cursor: pointer; }
#cart-stock-dialog { width: min(28rem, calc(100% - 2rem)); }
#cart-stock-dialog-message { padding-inline-end: 1.85rem; line-height: 1.5; }

#cart-stock-dialog-message { padding-inline-end: 0; }
#cart-stock-dialog-ok { display: block; width: 100%; max-width: 100%; margin: 1.25rem 0 0; }

#admin-deliver-order-dialog { width: min(30rem, calc(100% - 2rem)); }

.reports-menu-separator { margin: .3rem .65rem; border: 0; border-top: 1px solid var(--line); }
.sales-report-table :is(th, td):nth-child(n+5):nth-child(-n+10) { text-align: right; white-space: nowrap; }
.sales-report-table :is(th, td):nth-child(-n+3) { white-space: nowrap; }

/* Sale actions reuse the administration dialogs and controls. */
.sale-action-row { cursor: pointer; }
.sale-action-row:hover { background: #f7f7f7; }
.sale-action-row:focus-visible { outline: 2px solid #555; outline-offset: -2px; }
#sale-cancel-units fieldset { border: 1px solid #e5e1dd; margin: 1rem 0; padding: .75rem; }
#sale-cancel-units legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
#sale-cancel-units label { display: flex; align-items: center; gap: .65rem; margin: .45rem 0; cursor: pointer; }
#sale-cancel-units input { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
#sale-cancel-reason { width: 100%; box-sizing: border-box; font: inherit; padding: .6rem; resize: vertical; }
#sale-cancel-summary { font-weight: 600; }
