/*
 * The back office and the customer ordering screens.
 *
 * Layout is theirs (the staff sidebar, dense tables, the checkout grid), but
 * the look is the storefront's: the same teal, ink and line colours as
 * site.css, Raleway headings, the theme's own buttons and its letter-spaced
 * eyebrows, so moving between the site and these screens never feels like
 * changing product.
 */
.commerce-workspace {
  --ws-bg: #f9f9f9;
  --ws-surface: #fff;
  --ws-ink: var(--theme-ink);
  --ws-heading: #000;
  --ws-muted: var(--theme-body);
  --ws-line: var(--theme-line);
  --ws-accent: var(--theme-primary);
  --ws-soft: #e6f6f5;
  --ws-radius: 6px;
  --theme-whisper: var(--ws-bg);
  min-height: 100vh;
  background: var(--ws-bg);
  color: var(--ws-ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}
.commerce-workspace :is(h1,h2,h3,h4,h5,h6) { color: var(--ws-heading); font-family: var(--font-display); font-weight: 700; }
.commerce-workspace h1 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.commerce-workspace :is(h2,h3) { font-size: 20px; }
.commerce-workspace p { color: var(--ws-muted); line-height: 1.7; }
.commerce-workspace a { color: var(--ws-accent); }
/* The workspace link colour must not reach a link styled as a filled button. */
.commerce-workspace a.btn:is(.style1,.style3), .commerce-workspace a.btn:hover { color: #fff; }
/* Raleway draws old-style figures by default; money and counts need level ones. */
.commerce-workspace :is(.workspace-stat-value,.quote-row dd,.checkout-total strong,.account-table td) { font-variant-numeric: lining-nums tabular-nums; }
.commerce-workspace :is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--ws-accent); outline-offset: 4px; }
.commerce-workspace :is(.figure,code) { max-width: 100%; }

/* Back-office frame */
.admin-workspace { display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.workspace-sidebar { position: sticky; top: 0; align-self: start; height: 100dvh; overflow-y: auto; background: var(--ws-surface); border-inline-end: 1px solid var(--ws-line); padding: 30px 18px 24px; }
.workspace-brand { display: flex; flex-direction: column; gap: 8px; color: var(--ws-heading) !important; }
.workspace-sidebar .workspace-brand { padding: 0 12px 32px; }
.commerce-workspace .wordmark { font-size: 20px; white-space: nowrap; }
.workspace-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ws-accent); }
.workspace-nav-label { padding-inline: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .2em; margin-bottom: 10px; color: var(--ws-muted); }
.workspace-nav ul { margin: 0; padding: 0; }
.workspace-nav li { margin: 3px 0; }
.workspace-nav li a { display: flex; align-items: center; gap: 12px; padding: 10px 13px; min-height: 44px; border-radius: 5px; color: var(--ws-ink); font-weight: 500; }
.workspace-nav li a i { font-size: 19px; color: var(--ws-muted); }
.workspace-nav li a:hover { background: var(--ws-bg); color: var(--ws-accent); }
.workspace-nav li a:hover i { color: var(--ws-accent); }
.workspace-nav li a.active { background: var(--ws-soft); color: var(--ws-accent); font-weight: 700; }
.workspace-nav li a.active i { color: var(--ws-accent); }
.workspace-nav .admin-leave { border-top: 1px solid var(--ws-line); margin: 26px 0 14px; padding: 20px 12px 0; }
.workspace-nav .account-signout { width: 100%; }
.workspace-menu-toggle { display: none; }
.workspace-main { min-width: 0; }
.workspace-topbar { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 36px; background: var(--ws-surface); border-bottom: 1px solid var(--ws-line); box-shadow: 0 5px 30px rgba(0, 0, 0, .04); }
.workspace-topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.workspace-store-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--ws-ink) !important; }
.workspace-store-link:hover { color: var(--ws-accent) !important; }
.workspace-store-link i { color: var(--ws-accent); }
.workspace-languages { display: flex; padding: 3px; border: 1px solid var(--ws-line); border-radius: 5px; gap: 3px; }
.workspace-languages a { min-width: 35px; min-height: 32px; display: grid; place-items: center; border-radius: 4px; padding: 4px 8px; font-size: 13px; color: var(--ws-muted); }
.workspace-languages a[aria-current] { background: var(--ws-accent); color: #fff; font-weight: 700; }
.workspace-content { padding: 36px 36px 80px; max-width: 1600px; margin-inline: auto; }
.workspace-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.workspace-back { display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 12px; }
.workspace-role { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border: 1px solid var(--ws-line); border-radius: 5px; background: var(--ws-surface); color: var(--ws-muted); font-size: 13px; }
.commerce-workspace .account-lead { font-size: 16px; max-width: 76ch; margin: 0 0 26px; }

/* Cards and panels: white on the back office's grey, like the theme's cards */
.workspace-panel { min-width: 0; }
.workspace-panel > .account-section { margin-top: 28px; }
.workspace-card, .commerce-workspace .account-section, .commerce-workspace .account-empty-panel { padding: 28px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); }
.workspace-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.workspace-section-heading h2, .workspace-section-heading p { margin: 0; }
.workspace-section-heading > a { font-size: 14px; font-weight: 500; }
.workspace-welcome { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 28px; }
.workspace-welcome .account-lead { margin: 0; }
.workspace-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.workspace-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 28px; }
.workspace-stat { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--ws-surface); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); min-width: 0; transition: border-color .3s, box-shadow .3s, transform .3s; }
.workspace-stat:hover { border-color: var(--ws-accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .06); transform: translateY(-3px); }
.workspace-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ws-muted); font-size: 14px; }
.workspace-stat-top i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ws-soft); color: var(--ws-accent); font-size: 20px; flex-shrink: 0; }
.workspace-stat-value { font-family: var(--font-display); font-size: 36px; line-height: 1.1; color: var(--ws-heading); font-weight: 800; }
.workspace-stat-link { font-size: 13px; font-weight: 500; color: var(--ws-accent); }
.workspace-health { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.workspace-health > span { padding: 7px 12px; border-radius: 5px; border: 1px solid var(--ws-line); font-size: 13px; }

/* Tables */
/* relative: keeps absolutely positioned .sr-only cells inside the scroller (see .exchange-table in site.css). */
.commerce-workspace .table-responsive { position: relative; max-width: 100%; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); margin: 18px 0; }
.commerce-workspace .account-table { margin: 0; color: var(--ws-ink); font-size: 14px; --bs-table-bg: transparent; --bs-table-color: var(--ws-ink); }
.commerce-workspace .account-table th, .commerce-workspace .account-table td { padding: 16px 18px; color: var(--ws-ink); border-color: var(--ws-line); vertical-align: middle; }
.commerce-workspace .account-table thead th { background: var(--ws-bg); color: var(--ws-heading); font-family: var(--font-display); font-size: 13px; letter-spacing: .02em; white-space: nowrap; font-weight: 700; }
.commerce-workspace .account-table tbody tr:last-child > * { border-bottom: 0; }
.commerce-workspace .account-table tbody tr:hover { background: var(--ws-bg); }
.commerce-workspace .account-table a { font-weight: 700; }
.workspace-exchange { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.workspace-exchange > span:last-child { color: var(--ws-muted); font-size: 13px; }

/* Order states. Colours carry meaning here, so they stay distinct from the brand teal. */
.order-status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 5px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--ws-ink); background: var(--ws-bg); }
.order-status > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-info { background: #eaf2fc; color: #2b5fa4; }
.status-success { background: #e6f6f5; color: #00756e; }
.status-warning { background: #fff2db; color: #925c0b; }
.status-neutral { background: #f1f1f1; color: #666; }

/*
 * Buttons are the theme's own (.btn.style1 and friends, with their sliding
 * hover fill). Only what an app screen needs on top: a touch-sized minimum,
 * wrapping for long translated labels, and style2 as an outlined secondary,
 * since the theme's white style2 disappears on a white card.
 */
.commerce-workspace .btn { min-height: 44px; padding: 10px 22px 9px; font-size: 15px; white-space: normal; }
.commerce-workspace .btn.style2 { background: var(--ws-surface); border: 1px solid var(--ws-line); color: var(--ws-ink); }
.commerce-workspace .btn.style2:hover { color: #fff; border-color: transparent; }
.commerce-workspace button:disabled { opacity: .55; cursor: not-allowed; }
.commerce-workspace .link::after { display: none; }

/* Forms */
.commerce-workspace :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { min-width: 0; max-width: 100%; background: var(--ws-surface); color: var(--ws-ink); border: 1px solid var(--ws-line); border-radius: 5px; padding: 11px 14px; font-family: inherit; font-size: 15px; min-height: 48px; }
.commerce-workspace :is(input,select,textarea):focus { border-color: var(--ws-accent); }
.commerce-workspace :is(input,textarea)::placeholder { color: #999; }
.commerce-workspace label { color: var(--ws-heading); font-size: 14px; font-weight: 500; }
.commerce-workspace .form-group { margin-bottom: 20px; }
.commerce-workspace :is(.form-help,.quote-note) { font-size: 13px; color: var(--ws-muted); }
.commerce-workspace :is(.setting-row,.rate-controls,.counter-lookup,.account-card) { background: var(--ws-surface); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); }
.commerce-workspace .counter-lookup { padding: 24px; }
.commerce-workspace .setting-head { flex-wrap: wrap; }
.commerce-workspace .setting-head label { overflow-wrap: anywhere; }
.commerce-workspace .setting-edit > * { min-width: 0; }
.commerce-workspace :is(.form-notice,.form-error) { overflow-wrap: anywhere; }
.commerce-workspace .form-error { color: #b42335; }
.commerce-workspace .admin-filters ul { gap: 4px; padding: 4px; background: var(--ws-surface); border: 1px solid var(--ws-line); border-radius: 5px; width: fit-content; margin-bottom: 20px; }
.commerce-workspace .admin-filters a { border: 0; border-radius: 4px; padding: 8px 12px; font-size: 13px; color: var(--ws-muted); }
.commerce-workspace .admin-filters a.active { background: var(--ws-accent); color: #fff; font-weight: 700; }
.workspace-search { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.workspace-search > div { flex: 1; max-width: 400px; min-width: 160px; }
.workspace-search label { display: block; margin-bottom: 7px; }
.workspace-search input { width: 100%; }
.workspace-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.workspace-pagination p { margin: 0; font-size: 13px; }
.workspace-pagination > div { display: flex; gap: 8px; }
.commerce-workspace .counter-video[hidden] { display: none; }

/*
 * Customer ordering. These pages sit inside the site's header, footer and
 * breadcrumb banner (components/orders/OrderShell.tsx), on the site's white.
 */
.order-workspace { min-height: 0; background: #fff; font-size: 16px; }
.order-page-actions { display: flex; justify-content: flex-end; margin-bottom: 28px; }
.checkout-steps { display: flex; list-style: none; margin: 0 0 40px; padding: 0; gap: 28px; }
.checkout-steps li { display: flex; align-items: center; gap: 10px; color: var(--ws-muted); font-size: 15px; }
.checkout-steps li > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--ws-line); border-radius: 50%; font-size: 13px; background: var(--ws-surface); flex-shrink: 0; }
.checkout-steps li[aria-current] { color: var(--ws-heading); font-weight: 700; }
.checkout-steps li[aria-current] > span { color: #fff; background: var(--ws-accent); border-color: var(--ws-accent); }
.checkout-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); align-items: start; gap: 30px; }
.checkout-summary { position: sticky; top: 110px; min-width: 0; }
.checkout-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.checkout-summary-heading h2 { margin: 0; }
.checkout-summary-heading i { font-size: 24px; color: var(--ws-accent); }
.commerce-workspace .quote-panel { display: block; padding: 30px; background: var(--ws-bg); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); color: var(--ws-ink); }
.commerce-workspace .quote-panel dl { margin: 0; }
.commerce-workspace .quote-row { gap: 16px; }
.commerce-workspace .quote-row dt { color: var(--ws-muted); font-weight: 400; }
.commerce-workspace .quote-row dd { color: var(--ws-heading); font-weight: 600; }
.commerce-workspace .quote-row.is-headline { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 18px; }
.commerce-workspace .quote-row.is-headline dt { font-size: 14px; }
.commerce-workspace .quote-row.is-headline dd { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px,3vw,36px); margin: 0; }
.commerce-workspace .quote-divider { border-color: var(--ws-line); }
.commerce-workspace .coupon-form { margin-top: 20px; padding: 24px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-bg); }
.commerce-workspace .order-form { background: var(--ws-bg); border: 1px solid var(--ws-line); padding: 32px; border-radius: var(--ws-radius); }
.commerce-workspace .converter-field { margin-bottom: 26px; }
.commerce-workspace .converter-field legend { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ws-heading); margin-bottom: 12px; }
.commerce-workspace .choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.commerce-workspace .choice-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 5px; white-space: normal; min-width: 0; border: 1px solid var(--ws-line); border-radius: 5px; background: var(--ws-surface); color: var(--ws-ink); padding: 16px; }
.commerce-workspace .choice-btn[aria-pressed=true] { border-color: var(--ws-accent); background: var(--ws-accent); color: #fff; }
.commerce-workspace .choice-btn[aria-pressed=true] .choice-hint { color: rgba(255, 255, 255, .85); }
.commerce-workspace .choice-btn .choice-name { font-size: 15px; font-weight: 700; }
.commerce-workspace .choice-btn .choice-hint { color: var(--ws-muted); font-size: 13px; opacity: 1; line-height: 1.5; }
.checkout-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 20px; border-top: 1px solid var(--ws-line); margin-bottom: 20px; }
.checkout-total strong { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--ws-heading); }
.commerce-workspace .order-form > .btn { width: 100%; }
.order-workspace .order-detail { max-width: 820px; margin-inline: auto; }
.commerce-workspace .order-code { background: var(--ws-bg); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); }
.commerce-workspace .order-reference { color: var(--ws-heading); }
.commerce-workspace .order-timer { background: var(--ws-surface); font-size: 13px; }
.commerce-workspace .account-facts dd { overflow-wrap: anywhere; }
.workspace-page ~ .back-to-top { display: none; }

/* ---------------------------------------------------------------------------
 * Getting around the back office faster: forms in columns, rarely used
 * sections folded away, denser tables.
 * ------------------------------------------------------------------------- */

/* Tables: tighter rows, so a queue fits on a screen. */
.commerce-workspace .account-table th, .commerce-workspace .account-table td { padding: 11px 16px; }
.commerce-workspace .account-table tbody tr.is-selected { background: var(--ws-soft); }
.commerce-workspace .table-action { text-align: end; white-space: nowrap; width: 1%; }
.commerce-workspace .btn.btn-small { min-height: 34px; padding: 5px 14px 4px; font-size: 14px; }

/* ActionForm layout="grid": fields side by side, notes and buttons on their own row. */
.commerce-workspace .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 20px; align-items: start; }
.commerce-workspace .form-grid > :is(.form-notice, .form-group-wide, p, button, .btn) { grid-column: 1 / -1; }
.commerce-workspace .form-grid > :is(button, .btn) { justify-self: start; }
.commerce-workspace .form-grid :is(input, select, textarea) { width: 100%; }

/* A section opened on demand: cash in and out, a new coupon. */
.workspace-disclosure { margin: 24px 0; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); }
.workspace-disclosure > summary { display: flex; flex-direction: column; gap: 2px; padding: 16px 22px; cursor: pointer; list-style: none; }
.workspace-disclosure > summary::-webkit-details-marker { display: none; }
.workspace-disclosure > summary > span:first-child { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ws-heading); }
.workspace-disclosure > summary > span:first-child::before { content: "+"; display: inline-block; width: 22px; color: var(--ws-accent); }
.workspace-disclosure[open] > summary > span:first-child::before { content: "\2212"; }
.workspace-disclosure > summary .form-help { margin: 0; padding-inline-start: 22px; }
.workspace-disclosure > :not(summary) { padding: 4px 22px 22px; }

/* Till count: one row per currency - what it is, the notes, the running total. */
.till-count { margin-top: 12px; }
.till-rows { border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); }
.till-row { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) minmax(110px, auto); gap: 8px 20px; align-items: center; margin: 0; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--ws-line); min-width: 0; }
.till-row:last-child { border-bottom: 0; }
.till-row-head { float: left; display: flex; flex-direction: column; gap: 1px; width: auto; margin: 0; padding: 0; font-size: 14px; line-height: 1.35; }
.till-row-head .figure { font-weight: 700; color: var(--ws-heading); }
.till-row-head .till-currency-expected { font-size: 12px; }
.till-row-inputs { display: flex; flex-wrap: wrap; gap: 8px 10px; min-width: 0; }
.till-note { display: flex; flex-direction: column; gap: 2px; width: 92px; }
.till-note-total { width: 180px; }
.till-note label { font-size: 12px; font-weight: 500; color: var(--ws-muted); }
.commerce-workspace .till-note input { min-height: 38px; padding: 6px 10px; width: 100%; }
.till-note-expected { font-size: 11px; color: var(--ws-muted); }
.till-note .form-error { font-size: 12px; }
.till-note.has-error input { border-color: #b42335; }
.till-row-total { text-align: end; font-weight: 700; color: var(--ws-heading); font-variant-numeric: lining-nums tabular-nums; }
.till-row-total.is-different { color: #925c0b; }
.till-more { margin-top: 12px; }
.till-more > summary { cursor: pointer; padding: 8px 2px; font-weight: 500; color: var(--ws-accent); }
.till-more[open] > summary { margin-bottom: 8px; }
/* Kept in view while the count scrolls: who watched, why it differs, and the button. */
.till-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 20px; margin-top: 16px; padding: 14px 18px 0; background: var(--ws-surface); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); box-shadow: 0 -8px 24px rgba(0, 0, 0, .05); }
.till-actions .form-group { flex: 1 1 240px; margin-bottom: 14px; }
.till-actions .form-group :is(input, select) { width: 100%; }
.till-actions .btn { margin: 26px 0 14px; }

/* Settings: tabs per group, one compact row per setting. */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 4px; background: var(--ws-surface); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); }
.settings-tabs [role=tab] { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 4px; background: none; color: var(--ws-ink); font-weight: 500; }
.settings-tabs [role=tab]:hover { color: var(--ws-accent); }
.settings-tabs [role=tab][aria-selected=true] { background: var(--ws-accent); color: #fff; }
.settings-tab-count { font-size: 12px; opacity: .7; }
.settings-list { margin: 0; padding: 0; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); }
.settings-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) 90px; gap: 6px 24px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--ws-line); }
.settings-item:last-child { border-bottom: 0; }
.settings-item.has-error { background: #fdf3f4; }
.settings-item-text label { display: block; margin: 0 0 2px; font-size: 15px; }
.settings-item-text .form-help { margin: 0; line-height: 1.5; }
.settings-item-text code { font-size: 11px; color: var(--ws-muted); background: var(--ws-bg); padding: 1px 5px; border-radius: 3px; }
.settings-item-text .form-error { margin: 4px 0 0; }
.settings-item-control :is(input:not([type=checkbox]), select, textarea) { width: 100%; }
.settings-item > .rate-chip { justify-self: end; }
.setting-number { display: flex; align-items: center; gap: 8px; }
.setting-unit { color: var(--ws-muted); font-size: 14px; white-space: nowrap; }
.commerce-workspace .setting-json { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.setting-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.setting-switch input { appearance: none; width: 46px; height: 26px; margin: 0; border-radius: 13px; background: #cfd4d9; cursor: pointer; transition: background .2s; position: relative; flex-shrink: 0; }
.setting-switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .2s; }
.setting-switch input:checked { background: var(--ws-accent); }
.setting-switch input:checked::after { inset-inline-start: 23px; }
.setting-switch-on, .setting-switch-off { font-size: 14px; font-weight: 500; }
.setting-switch input:checked ~ .setting-switch-off, .setting-switch input:not(:checked) ~ .setting-switch-on { display: none; }
.settings-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 20px; margin-top: 12px; padding: 12px 0; background: var(--ws-bg); }
.settings-actions .form-notice { margin: 0; flex: 1 1 260px; }

/* Rates: a currency's controls open beneath its own row. */
.commerce-workspace .rate-manage-row > td { padding: 0 16px 16px; background: var(--ws-soft); }
.commerce-workspace .rate-manage-row:hover { background: none; }
.rate-controls { padding: 16px 18px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-surface); }
.rate-controls > h3 { margin: 0 0 12px; font-size: 17px; }

@media (max-width: 991px) {
  .till-row { grid-template-columns: minmax(0, 1fr) auto; }
  .till-row-inputs { grid-column: 1 / -1; grid-row: 2; }
  .settings-item { grid-template-columns: minmax(0, 1fr) auto; }
  .settings-item-control { grid-column: 1 / -1; }
  .settings-item > .rate-chip { grid-row: 1; grid-column: 2; }
}
@media (max-width: 575px) {
  .till-row { padding: 12px; }
  .till-note { width: calc(33.333% - 7px); }
  .till-note-total { width: 100%; }
  .settings-item { padding: 12px 14px; }
}

@media (min-width: 1500px) { .workspace-content { padding-top: 42px; } }
@media (max-width: 1199px) {
  .admin-workspace { grid-template-columns: 218px minmax(0,1fr); }
  .workspace-sidebar { padding-inline: 12px; }
  .workspace-topbar { padding-inline: 24px; }
  .workspace-content { padding-inline: 24px; }
}
@media (max-width: 991px) {
  .admin-workspace { display: block; }
  .workspace-sidebar { position: static; height: auto; overflow: visible; padding: 16px 20px; border-inline-end: 0; border-bottom: 1px solid var(--ws-line); }
  .workspace-sidebar .workspace-brand { padding: 0 0 16px; }
  .workspace-sidebar .workspace-brand > .workspace-eyebrow { display: none; }
  .workspace-menu-toggle { display: flex; width: 100%; align-items: center; gap: 9px; border: 1px solid var(--ws-line); border-radius: 5px; color: var(--ws-heading); background: var(--ws-bg); padding: 10px 14px; font-weight: 500; }
  .workspace-nav-body { display: none; padding-top: 20px; }
  .workspace-nav-body.is-open { display: block; }
  .workspace-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .workspace-topbar { min-height: 65px; padding: 14px 20px; }
  .workspace-content { padding: 26px 20px 70px; }
  .checkout-grid { gap: 20px; }
  .commerce-workspace .order-form { padding: 24px; }
}
@media (max-width: 767px) {
  .workspace-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .checkout-grid { grid-template-columns: minmax(0,1fr); }
  .checkout-summary { position: static; }
  .order-page-actions { justify-content: stretch; }
  .order-page-actions .btn { width: 100%; }
  .workspace-topbar-actions { gap: 12px; }
  .commerce-workspace .quote-row dd { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 479px) {
  .workspace-topbar > .workspace-eyebrow, .workspace-role { display: none; }
  .workspace-topbar-actions { justify-content: space-between; width: 100%; }
  .workspace-stat { padding: 16px; }
  .workspace-stat-top { align-items: flex-start; }
  .workspace-stat-top i { width: 30px; height: 30px; font-size: 16px; }
  .workspace-stat-value { font-size: 28px; }
  .workspace-card, .commerce-workspace .account-section, .commerce-workspace .quote-panel, .commerce-workspace .order-form { padding: 20px; }
  .commerce-workspace .choice-grid { grid-template-columns: minmax(0,1fr); }
  .checkout-steps { gap: 14px; flex-wrap: wrap; }
  .checkout-steps li { font-size: 13px; }
  .workspace-nav li a { padding: 10px 8px; font-size: 13px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .commerce-workspace * { transition: none !important; } }
@media print {
  .workspace-sidebar, .workspace-topbar, .workspace-page-heading .btn, .workspace-back, .checkout-steps, .order-page-actions, .breadcrumb-wrap, .header-wrap, .footer-wrap { display: none !important; }
  .commerce-workspace, .workspace-main { display: block; background: #fff; color: #000; padding: 0; }
  .commerce-workspace .quote-panel, .commerce-workspace .order-code { color: #000; background: #fff; break-inside: avoid; }
}
