/* Account, first fitting, order and shop pages — the house language from brand.css:
   hairlines and space instead of cards, photos on a quiet tint, square edges. */

/* ---------- header (shared, js/ui/chrome.js) ---------- */
.lux-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.lux-header__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; gap: 20px; }
.lux-header__logo { justify-self: center; }
.lux-header .logo { width: 88px; color: var(--maroon); }
.lux-nav { display: flex; gap: 28px; }
.lux-nav a, .lux-header__end a, .lux-header__end button { color: var(--plum); text-decoration: none; font-size: .9rem; background: none; border: 0; font-family: inherit; cursor: pointer; padding: 4px 0; }
.lux-nav a:hover, .lux-header__end a:hover, .lux-header__end button:hover { color: var(--maroon); }
.lux-nav [aria-current], .lux-header__end [aria-current] { color: var(--maroon); box-shadow: 0 1px 0 currentColor; }
.lux-header__end { justify-self: end; display: flex; gap: 22px; align-items: center; }
.lux-header__tag { font-size: .8rem; color: var(--gold-text); letter-spacing: .02em; }

/* ---------- page openings ---------- */
.page { padding: clamp(46px, 6vw, 80px) 0 0; }
.page-head { text-align: center; max-width: 660px; margin: 0 auto clamp(44px, 6vw, 72px); }
.page-head h1, .page-title { font-size: clamp(2.3rem, 4.4vw, 3.4rem); margin: 0 0 .15em; }
.page-head p:not(.eyebrow), .page-sub { color: var(--muted); margin: 0; }
.page-title { text-align: start; }
.row { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.empty { padding: 34px 0; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.empty .dash-link { margin-top: 10px; }

/* a section with a title on a hairline */
.block { padding: clamp(50px, 6vw, 80px) 0 0; scroll-margin-top: 90px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.block__head h2 { font-size: clamp(1.8rem, 2.8vw, 2.3rem); margin: 0; }

/* split: a photo beside a tinted panel — the house's main composition */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; background: var(--tint); }
.split__photo { margin: 0; overflow: hidden; }
.split__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.split__panel { display: grid; place-items: center; padding: clamp(40px, 6vw, 90px) clamp(24px, 6vw, 80px); text-align: center; }
.split__panel h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); margin-bottom: .25em; }
.split__panel p { color: var(--muted); max-width: 40ch; margin-inline: auto; }
.split__actions { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 30px; }

/* ---------- sign in (account and staff) ---------- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - 77px); }
.auth-split__photo { margin: 0; overflow: hidden; background: var(--tint); }
.auth-split__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.auth-split__panel { display: grid; align-items: center; padding: clamp(40px, 7vw, 100px) clamp(24px, 7vw, 110px); }
.auth { width: 100%; max-width: 420px; margin-inline: auto; }
.auth h1 { font-size: clamp(2.2rem, 3.6vw, 2.9rem); margin-bottom: .2em; }
.auth h1 em { font-style: normal; color: var(--gold-text); }
.auth > p { color: var(--muted); margin-bottom: 2.4em; }
.auth form .btn { margin-top: .6em; }
.auth__back { margin-top: 18px; }
.auth__welcome { margin-bottom: 1.6em; }
.auth__hint { margin: .8em 0 0; font-size: .84rem; color: var(--muted); }
.auth--alone { padding: clamp(60px, 10vw, 120px) 0; }
.auth--alone .emblem { width: 36px; color: var(--gold); margin-bottom: 26px; }

/* ---------- account ---------- */
.acc-head { text-align: center; }
.acc-head h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); margin: 0 0 .15em; }
.acc-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 34px; margin-top: 30px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acc-tabs a, .acc-tabs button { color: var(--plum); text-decoration: none; font: inherit; font-size: .93rem; background: none; border: 0; cursor: pointer; padding: 0; }
.acc-tabs a:hover, .acc-tabs button:hover { color: var(--maroon); }
.acc-tabs button { color: var(--muted); }
.acc-feature { margin-top: clamp(44px, 6vw, 70px); }

/* a saved measurement: who it is for on one side, the eleven numbers on the other */
.profiles { display: grid; }
.profile { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px 56px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.profile h3 { font-size: 1.6rem; margin: 0 0 .25em; }
.profile__meta { font-size: .82rem; color: var(--muted); margin-top: .3em; }
.profile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.measure-list { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.measure-list li { display: grid; grid-template-rows: auto auto 1fr; padding: 12px 10px 14px; border-bottom: 1px solid var(--line-soft); border-inline-start: 1px solid var(--line-soft); font-size: .76rem; color: var(--muted); line-height: 1.4; }
.measure-list li:nth-child(6n + 1) { border-inline-start: 0; padding-inline-start: 0; }
.measure-list i { font-style: normal; font-family: var(--font-latin); font-size: .7rem; color: var(--gold-text); margin-bottom: 2px; }
.measure-list b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; color: var(--ink); align-self: end; margin-top: 6px; }
.measure-unit { margin: 10px 0 0; font-size: .76rem; color: var(--muted); }
.style-badges { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; }

/* an order: photo, what it is, where it is, price */
.order { display: grid; grid-template-columns: 112px 1fr auto; gap: 28px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); }
.order .garment { aspect-ratio: 4 / 5; height: auto; }
.order h3 { font-size: 1.45rem; margin: 0; }
.order__meta { font-size: .86rem; color: var(--muted); }
.order__side { text-align: end; display: grid; gap: 12px; justify-items: end; }
.order__price { font-family: var(--font-display); font-size: 1.35rem; color: var(--maroon); }
.progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 14px 0 6px; max-width: 360px; }
.progress span { height: 2px; background: var(--line); }
.progress span.is-done { background: var(--gold); }
.progress span.is-current { background: var(--maroon); }

/* appointments */
.appts { list-style: none; margin: 0; padding: 0; }
.appts li { display: grid; grid-template-columns: 220px 90px 1fr; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.appts__date { font-family: var(--font-display); font-size: 1.3rem; color: var(--maroon); }
.appts__none { padding: 22px 0; color: var(--muted); border-bottom: 1px solid var(--line); margin: 0; }
.book { display: grid; grid-template-columns: 1fr 1fr 1.6fr auto; gap: 0 32px; align-items: end; margin-top: 34px; }
.book .field { margin: 0; }
.book__title { font-size: .95rem; color: var(--plum); margin: 40px 0 0; }

/* ---------- first fitting (measure.html) ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.way { display: grid; align-content: start; text-align: center; color: inherit; text-decoration: none; }
.way__photo { margin: 0 0 22px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tint); }
.way__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.way:hover .way__photo img { transform: scale(1.04); }
.way__tag { font-size: .8rem; color: var(--gold-text); margin-bottom: .3em; }
.way h2 { font-size: 1.6rem; margin: 0 0 .3em; }
.way p { color: var(--muted); font-size: .92rem; max-width: 32ch; margin: 0 auto 1.1em; }
.way .dash-link { justify-self: center; }

.measure-signin { text-align: center; margin: 56px 0 0; }
.measure-form { margin-top: clamp(60px, 8vw, 100px); scroll-margin-top: 90px; border-top: 1px solid var(--line); }
.measure-step { display: grid; grid-template-columns: 260px 1fr; gap: 24px 56px; padding: clamp(34px, 4vw, 52px) 0; border-bottom: 1px solid var(--line); }
.measure-step h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin: 0; }
.measure-step__num { display: block; font-family: var(--font-latin); font-size: .78rem; letter-spacing: .2em; color: var(--gold-text); margin-bottom: 8px; }
.measure-step__body > .field { max-width: 440px; margin: 0; }
.measure-step__body > .notice { margin-bottom: 26px; }
.measure-form__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; padding: 34px 0 0; }
.measure-form__foot .muted { font-size: .88rem; }

/* the shop's numbered chart beside one underlined field per number */
.measure-guide { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 40px; align-items: start; }
.measure-guide__chart { position: sticky; top: 100px; margin: 0; padding: 18px; background: var(--tint); }
.measure-guide__chart img { width: 100%; height: auto; mix-blend-mode: multiply; }
.measure-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 36px; margin: 0; padding: 0; list-style: none; }
.measure-field { position: relative; padding-inline-start: 30px; }
.measure-field__num { position: absolute; inset-inline-start: 0; top: 0; font-family: var(--font-latin); font-size: .8rem; color: var(--gold-text); }
.measure-field label { color: var(--ink); font-size: .92rem; }
.measure-field__input { display: flex; align-items: baseline; border-bottom: 1px solid var(--mauve); transition: border-color .2s ease, box-shadow .2s ease; }
.measure-field__input input { border: 0; box-shadow: none; flex: 1; min-width: 0; }
.measure-field__input input:focus { box-shadow: none; }
.measure-field__input span { font-size: .78rem; color: var(--muted); }
.measure-field__input:focus-within { border-color: var(--maroon); box-shadow: 0 1px 0 var(--maroon); }
.measure-field.has-error .measure-field__input { border-color: var(--danger); }

/* tailoring choices: three quiet switches */
.style-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 32px; }
.style-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.style-choice legend { font-size: .92rem; color: var(--ink); margin-bottom: 10px; padding: 0; }
.segmented { display: flex; border: 1px solid var(--line); }
.segmented label { position: relative; flex: 1; margin: 0; cursor: pointer; color: var(--plum); }
.segmented label + label { border-inline-start: 1px solid var(--line); }
.segmented input { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 10px 8px; font-size: .9rem; transition: background .2s ease, color .2s ease; }
.segmented label:hover span { background: rgba(86, 25, 36, .04); }
.segmented input:checked + span { background: var(--maroon); color: var(--cream); }
.segmented input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.style-choice.has-error .segmented { border-color: var(--danger); }

.saved { text-align: center; max-width: 560px; margin: 0 auto; padding: clamp(40px, 8vw, 90px) 0 0; }
.saved .emblem { width: 34px; color: var(--gold); margin-bottom: 26px; }
.saved h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); }
.saved .row { justify-content: center; margin-top: 30px; }

/* ---------- real-photo garment (js/ui/garment.js) ---------- */
.garment { position: relative; margin: 0; overflow: hidden; background: var(--tint); }
.garment__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.garment__detail { position: absolute; bottom: 14px; inset-inline-end: 14px; width: 22%; padding: 3px; background: var(--paper); }
.garment--compact { aspect-ratio: 4 / 5; }

/* ---------- shop dashboard ---------- */
.staff-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.staff-head h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin: 34px 0 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 22px 24px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; color: var(--maroon); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 34px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs button { background: none; border: 0; padding: 14px 0; font: inherit; font-size: 1rem; color: var(--muted); cursor: pointer; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected='true'] { color: var(--maroon); border-color: var(--maroon); }
.filters { display: flex; gap: 6px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.filters button { border: 0; background: none; padding: 4px 0; cursor: pointer; font: inherit; font-size: .88rem; color: var(--muted); border-bottom: 1px solid transparent; }
.filters button:hover { color: var(--maroon); }
.filters button.is-active { color: var(--maroon); border-color: var(--maroon); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: start; padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-inline-start: 0; }
thead th { font-weight: 400; font-size: .78rem; color: var(--muted); white-space: nowrap; border-color: var(--maroon); }
td .garment { width: 54px; }
td .muted { font-size: .82rem; }
.cell-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.customer { border-bottom: 1px solid var(--line); }
.customer:first-of-type { border-top: 1px solid var(--line); }
.customer summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 0; cursor: pointer; list-style: none; }
.customer summary::-webkit-details-marker { display: none; }
.customer summary::after { content: '+'; color: var(--gold-text); font-size: 1.2rem; margin-inline-start: 12px; }
.customer[open] summary::after { content: '−'; }
.customer__name { font-family: var(--font-display); font-size: 1.35rem; color: var(--maroon); }
.customer__body { padding: 0 0 26px; }
.customer__body .profile { padding: 24px 0; }
.staff-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 28px; margin-bottom: 22px; }
.staff-tools .field { margin: 0; flex: 1; max-width: 320px; }

/* dialog: a plain sheet */
dialog { border: 0; border-radius: 0; padding: 0; width: min(760px, calc(100% - 24px)); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(36, 26, 28, .5); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 30px; border-bottom: 1px solid var(--line); }
.dialog__head h2 { margin: 0; font-size: 1.6rem; }
.dialog__head button { background: none; border: 0; color: var(--plum); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.dialog__body { padding: 26px 30px; max-height: 70vh; overflow: auto; }
.dialog__foot { display: flex; gap: 12px; justify-content: flex-end; padding: 18px 30px; border-top: 1px solid var(--line); }
.dialog__body .measure-guide { grid-template-columns: 1fr; gap: 20px; }
.dialog__body .measure-guide__chart { position: static; max-width: 280px; margin: 0 auto; }
.dialog__body .style-choices { margin: 10px 0 24px; }

/* job card */
.jobcard__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.jobcard__photo { width: 150px; flex: none; }
.jobcard h3 { font-size: 1.25rem; margin: 26px 0 8px; }
.jobcard th { font-weight: 400; color: var(--muted); width: 45%; }
.jobcard td, .jobcard th { padding: 9px 0; }
.jobcard__num { display: inline-block; min-width: 22px; font-family: var(--font-latin); font-size: .78rem; color: var(--gold-text); }
.jobcard__pattern { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; }
.jobcard__pattern img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
@media print {
  body > *:not(dialog[open]) { display: none !important; }
  dialog[open] { position: static; width: 100%; max-height: none; }
  dialog::backdrop { display: none; }
  .dialog__foot, .dialog__head button { display: none; }
  .dialog__body { max-height: none; overflow: visible; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-inline-start: 0; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .profile, .measure-step { grid-template-columns: 1fr; }
  .measure-list { grid-template-columns: repeat(4, 1fr); }
  .measure-list li:nth-child(6n + 1) { border-inline-start: 1px solid var(--line-soft); padding-inline-start: 10px; }
  .measure-list li:nth-child(4n + 1) { border-inline-start: 0; padding-inline-start: 0; }
  .book { grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .book .btn { grid-column: 1 / -1; margin-top: 18px; justify-self: start; }
}
@media (max-width: 800px) {
  .lux-nav__home, .lux-nav__more ~ .lux-nav__more { display: none; }
  .split, .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .split__photo { aspect-ratio: 4 / 3; }
  .auth-split__photo { aspect-ratio: 16 / 9; }
  .ways { grid-template-columns: 1fr; gap: 44px; }
  .way__photo { aspect-ratio: 16 / 10; }
  .measure-guide { grid-template-columns: 1fr; }
  .measure-guide__chart { position: static; max-width: 320px; margin: 0 auto; }
  .style-choices { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 36px, var(--wrap)); }
  .lux-header__row { min-height: 64px; }
  .lux-header .logo { width: 72px; }
  .grid-2, .measure-fields { grid-template-columns: 1fr; }
  .measure-list { grid-template-columns: repeat(3, 1fr); }
  .measure-list li:nth-child(4n + 1) { border-inline-start: 1px solid var(--line-soft); padding-inline-start: 10px; }
  .measure-list li:nth-child(3n + 1) { border-inline-start: 0; padding-inline-start: 0; }
  .order { grid-template-columns: 84px 1fr; gap: 18px; }
  .order__side { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; text-align: start; }
  .appts li { grid-template-columns: 1fr auto; }
  .appts li > :last-child { grid-column: 1 / -1; }
  .book { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(n) { border-inline-start: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .tabs { gap: 22px; overflow-x: auto; }
  .tabs button { white-space: nowrap; }
  .lux-header--staff .lux-header__tag { display: none; }
  .lux-header--staff .lux-header__row { grid-template-columns: auto 1fr; gap: 16px; }
  .lux-header--staff .lux-header__end { gap: 16px; }
  .lux-header--staff .lux-header__end button { font-size: .82rem; white-space: nowrap; }
}
