/* =====================================================================
   Exempler Laundry Bar · design system
   Tokens, resets and the components every screen shares.
   ===================================================================== */

:root {
  /* Surfaces */
  --bg: #0A0A0B;
  --surface: #151516;
  --surface-2: #1C1C1E;
  --surface-3: #232327;
  --surface-glass: rgba(21, 21, 22, .72);

  /* Type */
  --text: #F7F5F0;
  --muted: #9A9A9F;
  --faint: #6E6E75;

  /* Accents */
  --gold: #D6B46A;
  --gold-strong: #E4C889;
  --gold-soft: rgba(214, 180, 106, .13);
  --orange: #E2703A;
  --orange-soft: rgba(226, 112, 58, .14);
  --green: #4FBE86;
  --green-soft: rgba(79, 190, 134, .14);
  --red: #E5645C;
  --red-soft: rgba(229, 100, 92, .14);
  --blue: #6AA1F5;
  --blue-soft: rgba(106, 161, 245, .14);

  /* Lines and shadows */
  --line: rgba(247, 245, 240, .08);
  --line-strong: rgba(247, 245, 240, .16);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .8);
  --shadow: 0 20px 44px -24px rgba(0, 0, 0, .9);
  --shadow-lg: 0 36px 80px -30px rgba(0, 0, 0, .95);

  /* Shape */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(.22, .68, .28, 1);
  --fast: .16s var(--ease);
  --base: .28s var(--ease);
  --slow: .45s var(--ease);

  /* Type scale */
  --font-sans: "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;

  /* Layout */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 60px;
  --nav-h: 66px;
}

*,
*::before,
*::after { box-sizing: border-box; }

/**
 * The hidden attribute must always win. Any component that sets its own
 * display (flex/grid) would otherwise override the browser default and stay
 * on screen while JavaScript believes it is hidden.
 */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--gold); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states are always visible for keyboard users --------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--gold); color: #17130A; }

/* Scrollbars ------------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: rgba(247,245,240,.18) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(247, 245, 240, .16);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(247, 245, 240, .28); background-clip: content-box; }

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* Icons ------------------------------------------------------------ */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.icon-xl { width: 34px; height: 34px; }

/* Buttons ---------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-border: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--fast), background var(--fast), border-color var(--fast), opacity var(--fast);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }

.btn-primary {
  --btn-bg: linear-gradient(180deg, var(--gold-strong), var(--gold));
  --btn-fg: #1A1508;
  --btn-border: transparent;
  font-weight: 680;
}
.btn-primary:hover { --btn-bg: linear-gradient(180deg, #EFD69B, var(--gold-strong)); }

.btn-orange {
  --btn-bg: linear-gradient(180deg, #EE8552, var(--orange));
  --btn-fg: #1B0C04;
  --btn-border: transparent;
}
.btn-ghost { --btn-bg: transparent; --btn-border: var(--line-strong); }
.btn-ghost:hover { --btn-bg: rgba(247,245,240,.05); }
.btn-quiet { --btn-bg: transparent; --btn-border: transparent; color: var(--muted); }
.btn-quiet:hover { --btn-bg: rgba(247,245,240,.05); color: var(--text); }
.btn-danger { --btn-bg: var(--red-soft); --btn-fg: #FFC9C5; --btn-border: rgba(229,100,92,.32); }
.btn-danger:hover { --btn-bg: rgba(229,100,92,.24); }
.btn-success { --btn-bg: var(--green-soft); --btn-fg: #AEEBC9; --btn-border: rgba(79,190,134,.32); }
.btn-success:hover { --btn-bg: rgba(79,190,134,.24); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
.btn-lg { min-height: 52px; padding: 15px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 44px; min-height: 44px; border-radius: 50%; }
.btn-icon.btn-sm { width: 36px; min-height: 36px; }

.btn .spinner { display: none; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn-label { opacity: .6; }

.spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Chips and badges -------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 560;
  cursor: pointer;
  transition: all var(--fast);
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-selected="true"], .chip.is-active {
  background: var(--gold-soft);
  border-color: rgba(214, 180, 106, .42);
  color: var(--gold-strong);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(247, 245, 240, .08);
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-gold { background: var(--gold-soft); color: var(--gold-strong); border-color: rgba(214,180,106,.28); }
.badge-orange { background: var(--orange-soft); color: #F0A47A; border-color: rgba(226,112,58,.28); }
.badge-green { background: var(--green-soft); color: #8FE0B6; border-color: rgba(79,190,134,.28); }
.badge-red { background: var(--red-soft); color: #F3A9A4; border-color: rgba(229,100,92,.3); }
.badge-blue { background: var(--blue-soft); color: #A8C8FA; border-color: rgba(106,161,245,.28); }
.badge-muted { background: rgba(247,245,240,.06); color: var(--muted); border-color: var(--line); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.dot-pulse { animation: dotPulse 1.8s var(--ease) infinite; }
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.82); }
}

/* Cards ------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-2 { background: var(--surface-2); }

/* Forms ------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field-hint { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.field-error { margin-top: 6px; font-size: 12.5px; color: #F3A9A4; }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--fast), background var(--fast);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: rgba(214, 180, 106, .55);
  background: var(--surface-3);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239A9A9F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.select option { background: var(--surface-2); color: var(--text); }

.input-icon { position: relative; }
.input-icon .icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}
.input-icon .input { padding-left: 44px; }

.checkline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast);
}
.checkline:hover { border-color: var(--line-strong); }
.checkline input { accent-color: var(--gold); width: 18px; height: 18px; flex: none; }

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 46px; height: 27px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  transition: background var(--base), border-color var(--base);
  flex: none;
  position: relative;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform var(--base), background var(--base);
}
.switch input:checked + .switch-track { background: var(--gold-soft); border-color: rgba(214,180,106,.5); }
.switch input:checked + .switch-track::after { transform: translateX(19px); background: var(--gold); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Quantity stepper -------------------------------------------------- */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px;
}
.stepper button {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--fast);
}
.stepper button:hover { background: var(--surface-3); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output {
  min-width: 30px;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Skeletons --------------------------------------------------------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(247, 245, 240, .06), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; border-radius: 6px; margin-bottom: 8px; }
.sk-line.w-60 { width: 60%; }
.sk-line.w-40 { width: 40%; }
.sk-line.w-80 { width: 80%; }

/* Empty states ------------------------------------------------------ */
.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 54px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 62px; height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--faint);
  margin-bottom: 4px;
}
.empty h3 { font-size: 16px; color: var(--text); }
.empty p { font-size: 14px; max-width: 34ch; }

/* Toasts ------------------------------------------------------------ */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px);
  transform: translateX(-50%);
  z-index: 700;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toastIn .32s var(--ease);
  pointer-events: auto;
}
.toast.is-out { animation: toastOut .26s var(--ease) forwards; }
.toast-success { border-color: rgba(79,190,134,.34); }
.toast-success .icon { color: var(--green); }
.toast-error { border-color: rgba(229,100,92,.34); }
.toast-error .icon { color: var(--red); }
.toast-info .icon { color: var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* Modals and sheets -------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  background: rgba(6, 6, 7, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn .22s var(--ease);
  overscroll-behavior: contain;
}
.overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }

.sheet {
  position: relative;
  width: 100%;
  max-height: 92vh;
  margin-top: auto;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: sheetUp .38s var(--ease);
  overflow: hidden;
}
@keyframes sheetUp { from { transform: translateY(8%); opacity: .4; } }

.sheet-grab {
  width: 40px; height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 10px auto 2px;
  flex: none;
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sheet-head h2 { font-size: 17px; flex: 1; }
.sheet-body { overflow-y: auto; padding: 18px; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  padding: 14px 18px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex: none;
}

.modal {
  margin: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn .3s var(--ease);
}
.modal-wide { width: min(880px, calc(100vw - 32px)); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Tables ------------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
table.data th {
  text-align: left;
  padding: 13px 16px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr { transition: background var(--fast); }
table.data tbody tr:hover { background: rgba(247, 245, 240, .028); }
table.data tbody tr:last-child td { border-bottom: 0; }

/* Utility layout ---------------------------------------------------- */
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.page-center {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head h2 { font-size: 19px; }
.section-head .link,
.panel-head .link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* Works for both <a> and <button> — buttons must not keep UA chrome. */
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--gold);
  font-size: 13.5px;
  font-weight: 600;
}
.section-head .link:hover { color: var(--gold-strong); }

.denied-card {
  max-width: 460px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}
.denied-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: #F3A9A4;
}
.denied-card h1 { font-size: 22px; margin-bottom: 10px; }
.denied-card p { color: var(--muted); margin-bottom: 22px; }
.denied-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* =====================================================================
   Shared components used by the customer app, the POS and admin modals
   (option pickers, ticket lines, totals and inline link buttons).
   ===================================================================== */
.opt-group { margin-bottom: 20px; }
.opt-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.opt-head h3 { font-size: 15px; }
.opt-head .req { font-size: 11px; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; font-weight: 650; }
.opt-head .opt-hint { font-size: 12px; color: var(--faint); margin-left: auto; }
.opt-list { display: grid; gap: 8px; }
.opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--fast);
}
.opt-row:hover { border-color: var(--line-strong); }
.opt-row.is-picked { border-color: rgba(214, 180, 106, .55); background: var(--gold-soft); }
.opt-row.is-disabled { opacity: .45; cursor: not-allowed; }
.opt-row input { position: absolute; opacity: 0; pointer-events: none; }
.opt-mark {
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1.6px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: none;
  transition: all var(--fast);
}
.opt-row[data-type="multiple"] .opt-mark { border-radius: 7px; }
.opt-row.is-picked .opt-mark { border-color: var(--gold); background: var(--gold); color: #1A1508; }
.opt-mark .icon { width: 13px; height: 13px; opacity: 0; stroke-width: 2.6; }
.opt-row.is-picked .opt-mark .icon { opacity: 1; }
.opt-name { flex: 1; font-size: 14.5px; }
.opt-price { font-size: 13.5px; color: var(--gold-strong); font-variant-numeric: tabular-nums; }
.opt-error { color: #F3A9A4; font-size: 12.5px; margin-top: 6px; }
.opt-group.has-error .opt-head h3 { color: #F3A9A4; }
.cart-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-of-type { border-bottom: 0; }
.cart-thumb {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
}
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-name { font-size: 14.5px; font-weight: 620; }
.cart-line-opts { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.cart-line-note { font-size: 12.5px; color: var(--gold); margin-top: 4px; }
.cart-line-actions { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.cart-line-price { font-weight: 680; font-variant-numeric: tabular-nums; text-align: right; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text); }
.link-btn.danger:hover { color: #F3A9A4; }
.totals { display: grid; gap: 9px; padding: 16px 0 4px; }
.total-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.total-row span:last-child { font-variant-numeric: tabular-nums; color: var(--text); }
.total-row.grand {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.total-row.grand span:last-child { color: var(--gold-strong); }

/* The hidden control must sit inside its own row: if it is positioned
   against a distant ancestor, focusing it scrolls that ancestor and the
   whole sheet jumps. */
.opt-row { position: relative; }
.opt-row input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
  appearance: none;
}
.opt-row:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
