/* NormalSYS ePOS additions on top of the Materio theme (keep this small). */

.app-brand-img {
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
}

.app-brand-img-menu {
  max-height: 32px;
  max-width: 40px;
  object-fit: contain;
}

.form-control-color {
  height: 3.5rem;
}

#barcodePreview img {
  max-height: 90px;
}

/* Flash Mode: a thin red line on top so staff always know where they are. */
body.god-mode .layout-navbar { border-top: 3px solid var(--bs-danger); }
.matrix-table th, .matrix-table td { text-align: center; vertical-align: middle; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: start; }
.matrix-table .is-override { background: rgba(var(--bs-warning-rgb), .12); }
.activity-json { max-width: 360px; white-space: pre-wrap; word-break: break-word; font-size: .75rem; }

/* NormalSYS green (PO 2026-10-30): copy #4ca90e, background #d4e3ca, icons #52ad15.
   Replaces the theme's lime #72e128 everywhere "success" is used. */
:root {
  --bs-success: #52ad15;
  --bs-success-rgb: 82, 173, 21;
  --bs-success-text-emphasis: #4ca90e;
  --bs-success-bg-subtle: #d4e3ca;
  --bs-success-border-subtle: #b9d3a8;
  --epos-green-copy: #4ca90e;
  --epos-green-bg: #d4e3ca;
  --epos-green-icon: #52ad15;
}
.text-success { color: var(--epos-green-copy) !important; }
.bg-label-success { background-color: var(--epos-green-bg) !important; color: var(--epos-green-copy) !important; }
.bg-label-success .icon-base, .bg-label-success .ri, .text-success .ri, i.text-success { color: var(--epos-green-icon) !important; }
.bg-success { background-color: var(--epos-green-icon) !important; }
.alert-success { --bs-alert-color: var(--epos-green-copy); --bs-alert-bg: var(--epos-green-bg); --bs-alert-border-color: #b9d3a8; --bs-alert-link-color: var(--epos-green-copy); }
.btn-success {
  --bs-btn-bg: var(--epos-green-copy); --bs-btn-border-color: var(--epos-green-copy);
  --bs-btn-hover-bg: #43960c; --bs-btn-hover-border-color: #43960c;
  --bs-btn-active-bg: #3d870b; --bs-btn-active-border-color: #3d870b;
  --bs-btn-disabled-bg: var(--epos-green-copy); --bs-btn-disabled-border-color: var(--epos-green-copy);
  --bs-btn-focus-shadow-rgb: 82, 173, 21;
}
.btn-outline-success {
  --bs-btn-color: var(--epos-green-copy); --bs-btn-border-color: var(--epos-green-copy);
  --bs-btn-hover-bg: var(--epos-green-bg); --bs-btn-hover-color: var(--epos-green-copy); --bs-btn-hover-border-color: var(--epos-green-copy);
  --bs-btn-active-bg: var(--epos-green-bg); --bs-btn-active-color: var(--epos-green-copy);
}
.avatar.avatar-online::after { background-color: var(--epos-green-icon) !important; }

/* Connection health badge in the header (connection-health.js). */
.connection-health { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .65rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 500; background: var(--bs-gray-100, #f6f7fb); color: var(--bs-body-color); white-space: nowrap; }
.connection-health .dot { width: .6rem; height: .6rem; border-radius: 50%; background: #a9a6b0; flex: 0 0 auto; }
.connection-health[data-state="excellent"] { background: var(--epos-green-bg); color: var(--epos-green-copy); }
.connection-health[data-state="excellent"] .dot { background: var(--epos-green-icon); box-shadow: 0 0 0 3px rgba(82, 173, 21, .18); }
.connection-health[data-state="good"] { background: var(--epos-green-bg); color: var(--epos-green-copy); }
.connection-health[data-state="good"] .dot { background: #8cc63f; }
.connection-health[data-state="slow"], .connection-health[data-state="server"] { background: #fff4de; color: #9a6400; }
.connection-health[data-state="slow"] .dot, .connection-health[data-state="server"] .dot { background: #ffab1d; }
.connection-health[data-state="unreachable"], .connection-health[data-state="offline"] { background: #ffe5e4; color: #c62c22; }
.connection-health[data-state="unreachable"] .dot, .connection-health[data-state="offline"] .dot { background: #ff4c51; animation: epos-pulse 1.2s infinite; }
@keyframes epos-pulse { 50% { opacity: .35; } }
@media (max-width: 575.98px) { .connection-health .label { display: none; } }

/* Collapsed menu: turn the arrow round so it reads "expand". */
.layout-menu-collapsed .menu-collapse-icon { transform: rotate(180deg); }
.app-brand .app-brand-text { font-size: 1.125rem; line-height: 1.2; max-width: 150px; white-space: nowrap; }
.layout-menu-collapsed:not(.layout-menu-hover) .app-brand .app-brand-text { display: none; }
.settings-tile { transition: box-shadow .15s ease, transform .15s ease; }
.settings-tile:hover { transform: translateY(-2px); box-shadow: 0 .25rem 1rem rgba(46, 38, 61, .12); }

/* Dashboard (PO 2026-10-30): organisation logo top right of the welcome card. */
.dashboard-logo { max-height: 64px; max-width: 180px; object-fit: contain; }
.dashboard-welcome-text { max-width: 60rem; }

/* Header tools (PO 2026-10-30). */
.epos-flag { font-size: 1.35rem; line-height: 1; cursor: default; }
.epos-notifications { min-width: 18rem; }

/* Searchable dropdowns (app/js/search-select.js). */
.epos-ss-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.epos-ss-button { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.epos-ss-host { position: relative; }
.epos-ss-panel { max-width: 32rem; min-width: 14rem; top: 100%; left: 0; }
.epos-ss-list { max-height: 16rem; overflow-y: auto; }
.epos-ss-item { cursor: pointer; white-space: normal; }
.epos-ss-button.is-invalid ~ .invalid-feedback { display: block; }

/* Sign-in pages: full-screen photo, centred card, credit at the bottom (PO 2026-10-30). */
.auth-photo-page { min-height: 100vh; background: #1e2a17; }
.auth-photo { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.auth-photo-img { width: 100%; height: 100%; object-fit: cover; display: block; animation: auth-photo-in 1.2s ease both; }
.auth-photo-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.45) 100%); }
/* No photo available: a joyful abstract gradient in the NormalSYS greens and warm accents. */
.auth-photo-fallback {
    background:
        radial-gradient(60vmax 60vmax at 10% 15%, rgba(255, 196, 0, .75), transparent 60%),
        radial-gradient(55vmax 55vmax at 90% 20%, rgba(255, 92, 141, .6), transparent 60%),
        radial-gradient(70vmax 70vmax at 75% 95%, rgba(82, 173, 21, .85), transparent 60%),
        radial-gradient(60vmax 60vmax at 5% 95%, rgba(0, 170, 210, .6), transparent 60%),
        #d4e3ca;
}
.auth-photo-main { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem 4.5rem; }
.auth-photo-card { width: 100%; max-width: 27rem; border: 0; border-radius: 1.25rem; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .25); }
.auth-photo-logo { max-height: 3rem; max-width: 14rem; object-fit: contain; }
.auth-brand-logo { max-width: 16rem; }
.auth-photo-icon { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.app-brand-icon-menu { width: 2rem; height: 2rem; object-fit: contain; flex-shrink: 0; }
/* Sign-up: a field only robots fill in (never shown to people). */
.vendor-signup-extra { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-photo-credit { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1; padding: .75rem 1rem; text-align: center; font-size: .8rem; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.auth-photo-credit a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
/* Markets and vendors behind the sign-in page (ADR-026 §12): a canvas over the photo, under the card. */
.auth-network { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s 1.2s; pointer-events: none; }
.auth-network.is-ready { visibility: visible; transition: opacity 1.2s ease; }
/* The Easter egg's smile: it winks at every tap, a little more each time (ADR-026 §12). */
[data-network-toggle] { -webkit-tap-highlight-color: transparent; }
[data-network-toggle].is-winking img { animation: auth-wink .35s ease; }
[data-network-toggle][data-taps="2"] img { transform: rotate(-3deg); }
[data-network-toggle][data-taps="3"] img { transform: rotate(3deg) scale(1.03); }
[data-network-toggle][data-taps="4"] img { transform: rotate(-4deg) scale(1.06); filter: drop-shadow(0 0 .4rem rgba(255, 210, 63, .8)); }
@keyframes auth-wink { 0% { transform: none; } 40% { transform: scaleY(.82) rotate(-4deg); } 100% { transform: none; } }
.auth-network.is-ready { opacity: 1; }
.auth-network-canvas { display: block; }
.has-network .auth-photo-shade { background: linear-gradient(180deg, rgba(8, 12, 20, .42) 0%, rgba(8, 12, 20, .5) 60%, rgba(8, 12, 20, .65) 100%); }
@media (prefers-reduced-motion: reduce) { .auth-network, .auth-network.is-ready { transition: none; } [data-network-toggle].is-winking img { animation: none; } }
@keyframes auth-photo-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-photo-img { animation: none; } }

/* Product Import Wizard (port of legacy app-assets/css/custom/products-import-wizard.css). */
.piw-steps { display: flex; flex-wrap: wrap; gap: .5rem 2rem; list-style: none; padding: 0 0 1.25rem; margin: 0 0 1.5rem; border-bottom: 1px solid var(--bs-border-color); counter-reset: none; }
.piw-steps li { display: flex; align-items: center; gap: .6rem; color: var(--bs-secondary-color); }
.piw-step-num { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; background: var(--bs-secondary-bg); }
.piw-steps li.active { color: var(--bs-heading-color); font-weight: 600; }
.piw-steps li.active .piw-step-num { background: var(--bs-primary); color: #fff; }
.piw-steps li.done .piw-step-num { background: rgba(var(--bs-success-rgb), .15); color: var(--bs-success); }
.piw-drop { display: block; text-align: center; padding: 2.5rem 1rem; border: 2px dashed var(--bs-border-color); border-radius: .75rem; cursor: pointer; transition: border-color .15s, background-color .15s; }
.piw-drop:hover, .piw-drop.dragging { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .04); }
.piw-drop.is-invalid { border-color: var(--bs-danger); }
.piw-columns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.piw-columns .badge { font-family: var(--bs-font-monospace); }
.piw-columns .badge.req { font-weight: 700; }
.piw-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.piw-filter .badge { border: 0; cursor: pointer; background: var(--bs-secondary-bg); color: var(--bs-body-color); padding: .45em .9em; }
.piw-filter .badge.active { background: var(--bs-primary); color: #fff; }
.piw-table-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
.piw-table { font-size: 13px; border-collapse: separate; border-spacing: 0; min-width: 1100px; width: 100%; }
.piw-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); padding: 8px 6px; white-space: nowrap; }
.piw-table td { padding: 4px 6px; vertical-align: top; border-bottom: 1px solid var(--bs-border-color-translucent); }
.piw-table td.piw-rownum { color: var(--bs-secondary-color); width: 46px; }
.piw-table td.piw-issues { min-width: 220px; max-width: 320px; font-size: 12px; line-height: 1.35; }
.piw-table tr.piw-row-error td { background: rgba(var(--bs-danger-rgb), .06); }
.piw-table tr.piw-row-warning td { background: rgba(var(--bs-warning-rgb), .08); }
.piw-table tr.piw-row-excluded td { opacity: .5; }
.piw-table tr.piw-row-dirty td.piw-rownum { box-shadow: inset 3px 0 0 var(--bs-primary); }
input.piw-cell { height: 30px; padding: 0 6px; font-size: 13px; }
input.piw-cell.piw-err { border-color: var(--bs-danger); background: rgba(var(--bs-danger-rgb), .05); }
input.piw-cell.piw-warn { border-color: var(--bs-warning); }
input.piw-cell.piw-generated { font-style: italic; color: var(--bs-primary); }
.piw-w-name { min-width: 220px; } .piw-w-code { min-width: 130px; } .piw-w-desc { min-width: 200px; }
.piw-w-num { width: 70px; } .piw-w-price { width: 90px; }
.piw-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.piw-status.ok, .piw-status.created { background: rgba(var(--bs-success-rgb), .14); color: var(--bs-success); }
.piw-status.warning { background: rgba(var(--bs-warning-rgb), .18); color: #b45309; }
.piw-status.error, .piw-status.failed { background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); }
.piw-status.excluded, .piw-status.skipped { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.piw-status.changed { background: rgba(var(--bs-info-rgb), .14); color: var(--bs-info); }
.piw-msg { display: block; }
.piw-msg.error { color: var(--bs-danger); }
.piw-msg.warning { color: #b45309; }
.piw-msg.info { color: var(--bs-secondary-color); }
.piw-pager { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.piw-progress-label { display: flex; justify-content: space-between; font-size: 13px; margin-top: 12px; }
.piw-progress-label + .progress .progress-bar { width: 0; }
.piw-log { max-height: 180px; overflow: auto; font-size: 12px; background: var(--bs-tertiary-bg); border-radius: .375rem; padding: 8px; margin-top: 12px; }
.piw-stat { text-align: center; padding: 16px 8px; border-radius: .5rem; }
.piw-stat-num { font-size: 32px; font-weight: 600; line-height: 1.1; }
.piw-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.piw-stat.created { background: rgba(var(--bs-success-rgb), .12); color: var(--bs-success); }
.piw-stat.failed { background: rgba(var(--bs-danger-rgb), .1); color: var(--bs-danger); }
.piw-stat.excluded { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.piw-stat.total { background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); }
.piw-problem-list .list-group-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.piw-problem-list .list-group-item.active .piw-status { background: rgba(255, 255, 255, .25); color: #fff; }
.piw-resolver { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: 16px; }
.piw-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.piw-actions .spacer { flex: 1; }
.piw-pre { white-space: pre-line; }
.piw-vendor-pick .form-select, .piw-vendor-pick .epos-ss-button { min-width: 16rem; }

/* Till (sale screen and 80 mm receipt). */
.till-results { max-height: 55vh; overflow-y: auto; }
.till-results .active-hint { border-left: 3px solid var(--bs-primary); }
.till-cart { max-height: 45vh; overflow-y: auto; }
.till-line-total { min-width: 6rem; }
.till-pin { letter-spacing: .5em; font-size: 1.75rem; }
.till-receipt { max-width: 80mm; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background: #fff; color: #000; padding: 4mm; }
.till-receipt-58 { max-width: 58mm; font-size: 11px; }
.till-receipt .receipt-logo { max-width: 100%; max-height: 30mm; }
.till-receipt table { width: 100%; border-collapse: collapse; }
.till-receipt .receipt-items th { font-weight: 700; border-bottom: 1px solid #000; padding: 0 1px; }
.till-receipt .receipt-items td, .till-receipt .receipt-totals td { padding: 0 1px; vertical-align: top; }
.till-receipt .receipt-terms { font-size: 11px; }
.till-receipt hr { margin: 2mm 0; border-top: 1px dashed #000; opacity: 1; }
@media print { body { background: #fff; } .container-xxl { padding: 0 !important; } .till-receipt { padding: 0; } .receipt-public .card { box-shadow: none; border: 0; } }
.receipt-public { max-width: 30rem; }
.receipt-send { max-width: 80mm; }
.epos-bell-count { position: absolute; top: 2px; right: 0; font-size: .65rem; padding: .2em .45em; }
.epos-notification-list { max-height: 22rem; overflow-y: auto; }
.epos-notification-list .epos-unread { background: rgba(var(--bs-primary-rgb), .05); }

/* Product explore (spec §7) */
.explore-image img { width: 100%; height: 100%; object-fit: cover; }
.explore-card .text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-photo { max-width: 100%; border-radius: .5rem; }

/* Till auto print: only the slip is printed from the sale page */
#print-area { display: none; }
@media print {
  body.epos-print-receipt > *:not(#print-area) { display: none !important; }
  body.epos-print-receipt #print-area { display: block; }
  body.epos-print-receipt #print-area .till-receipt { margin: 0; }
}

/* Dashboard totals refreshing (PO 2026-10-31): a ring turns around the icon while figures load */
.epos-ring { position: relative; display: inline-flex; }
.epos-ring.is-loading::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent; border-left-color: transparent;
  animation: epos-ring-spin .8s linear infinite; pointer-events: none;
}
.epos-ring-sm.is-loading::after { inset: -5px; border-width: 2px; }
@keyframes epos-ring-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .epos-ring.is-loading::after { animation: epos-ring-pulse 1.2s ease-in-out infinite; border-color: currentColor; }
  @keyframes epos-ring-pulse { 50% { opacity: .3; } }
}
[data-dashboard-refresh].is-busy .ri-refresh-line { display: inline-block; animation: epos-ring-spin .8s linear infinite; }

/* Guided tours (tour.js) */
.epos-tour-box { position: absolute; z-index: 1090; border-radius: .5rem; pointer-events: none;
  box-shadow: 0 0 0 3px var(--bs-primary), 0 0 0 9999px rgba(20, 20, 30, .45); transition: all .2s ease; }
.epos-tour-pop { position: absolute; z-index: 1091; }
.epos-tour-pop.is-mini { background: transparent; box-shadow: none !important; border: 0; }
.epos-tour-pop.is-mini .btn { text-transform: none; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .epos-tour-box { transition: none; } }

/* Walk-through guides (PO 2026-11-01): pictures of the real screens instead of videos */
.kb-thumb { aspect-ratio: 16 / 9; background: var(--bs-tertiary-bg); }
.kb-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.guide-shot { background: var(--bs-tertiary-bg); border-start-start-radius: var(--bs-card-inner-border-radius); border-end-start-radius: var(--bs-card-inner-border-radius); overflow: hidden; }
.guide-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
@media (max-width: 991.98px) { .guide-shot { border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; } }
.guide-tip { background: rgba(var(--bs-warning-rgb), .08); border-radius: .375rem; padding: .5rem .75rem; }
@media print { .guide-step { break-inside: avoid; } .guide-shot img { max-height: 9cm; object-fit: contain; } }

/* Vendor home (PO 2026-11-01): one card per market (administrator) to choose the view */
.vendor-market-card { color: inherit; border: 1px solid transparent; transition: border-color .15s ease, box-shadow .15s ease; }
.vendor-market-card:hover, .vendor-market-card:focus-visible { border-color: rgba(var(--bs-primary-rgb), .4); }
.vendor-market-card.is-active { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary); }
.vendor-stock-search { width: 14rem; max-width: 100%; }
.vendor-product-thumb { width: 38px; height: 38px; object-fit: cover; }
.vendor-products td { vertical-align: middle; }
.vendor-label-qty { width: 4.5rem; min-width: 4.5rem; }
.min-w-0 { min-width: 0; }
.vendor-switch { display: flex; flex-wrap: wrap; gap: .5rem; }
.vendor-switch-item { display: inline-flex; align-items: center; padding: .45rem .9rem; border-radius: 2rem; border: 1px solid var(--bs-border-color);
  background: var(--bs-paper-bg, var(--bs-body-bg)); color: var(--bs-heading-color); font-weight: 500; }
.vendor-switch-item:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.vendor-switch-item.is-active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.vendor-viewing { font-size: .8125rem; }
.vendor-place-card .vendor-place-stat { min-width: 5.5rem; }

/* Tax invoice (Settings → Receipts & invoices: paper size) */
.sale-invoice { max-width: 210mm; }
.sale-invoice-letter { max-width: 216mm; }
.sale-invoice-roll80 { max-width: 80mm; font-size: 12px; }
.invoice-sheet { background: #fff; color: #222; padding: 14mm; border-radius: .5rem; box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .08); }
.sale-invoice-roll80 .invoice-sheet { padding: 4mm; }
.invoice-logo { max-height: 22mm; max-width: 60mm; }
.invoice-title { letter-spacing: .08em; color: #222; }
.invoice-meta th { padding: 0 .75rem 0 0; font-weight: 600; text-align: left; }
.invoice-lines th { border-bottom: 2px solid #222; }
.invoice-totals td { padding: .15rem 0 .15rem 2rem; }
.invoice-totals .invoice-grand td { border-top: 2px solid #222; padding-top: .4rem; }
.invoice-paid { display: inline-block; border: 3px solid #2e7d32; color: #2e7d32; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; padding: .2rem .8rem; transform: rotate(-4deg); }
@page invoice-a4 { size: A4; margin: 0; }
@page invoice-letter { size: letter; margin: 0; }
@page invoice-roll80 { size: 80mm auto; margin: 0; }
@media print {
  .sale-invoice-a4 { page: invoice-a4; }
  .sale-invoice-letter { page: invoice-letter; }
  .sale-invoice-roll80 { page: invoice-roll80; }
  .invoice-sheet { box-shadow: none; border-radius: 0; }
}

/* Set-up wizard (ADR-022): the guide beside the page, and the part of the page it is about. */
.setup-panel { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1085; width: 22rem; max-width: calc(100vw - 2rem); }
.setup-panel .card-header { background: transparent; }
.setup-target { outline: 3px solid var(--bs-warning); outline-offset: 4px; border-radius: .375rem; animation: setup-pulse 1.6s ease-in-out 3; }
@keyframes setup-pulse { 50% { outline-color: transparent; } }
.setup-progress { height: .625rem; }
.setup-steps .accordion-button { gap: .25rem; }
.setup-step-done .accordion-button .fw-medium { color: var(--bs-secondary-color); }
@media (max-width: 575.98px) { .setup-panel { right: 1rem; left: 1rem; bottom: 1rem; width: auto; } }
.setup-trail { max-height: 44rem; overflow-y: auto; }

/* Charts drawn on the server (ADR-025, App\Core\View\ColumnChart). Colours validated for colour-blind
   separation and contrast: blue = within the SLA / allowance, red = missed / overtime; dark mode has its own steps. */
.epos-chart { display: block; width: 100%; height: auto; max-height: 15rem; overflow: visible; font-family: inherit; }
.epos-chart .chart-grid { stroke: var(--bs-border-color); stroke-width: 1; shape-rendering: crispEdges; }
.epos-chart .chart-tick { fill: var(--bs-secondary-color); font-size: 10px; font-variant-numeric: tabular-nums; }
.epos-chart .chart-cap { fill: var(--bs-heading-color); font-size: 10.5px; font-weight: 600; }
.epos-chart .chart-hit { fill: transparent; }
.epos-chart .chart-col:hover .chart-hit { fill: var(--bs-border-color); fill-opacity: .35; }
.epos-chart .chart-seg:hover path { opacity: .85; }
.epos-chart .chart-ref { stroke: var(--bs-heading-color); stroke-width: 2; stroke-linecap: round; }
.chart-fill-good { fill: #2a78d6; }
.chart-fill-bad { fill: #d03b3b; }
.chart-key { display: inline-block; width: .625rem; height: .625rem; border-radius: 2px; }
.chart-key-good { background: #2a78d6; }
.chart-key-bad { background: #d03b3b; }
.chart-key-ref { display: inline-block; width: .875rem; height: 2px; border-radius: 1px; background: var(--bs-heading-color); }
[data-bs-theme=dark] .chart-fill-good { fill: #3987e5; }
[data-bs-theme=dark] .chart-fill-bad { fill: #e66767; }
[data-bs-theme=dark] .chart-key-good { background: #3987e5; }
[data-bs-theme=dark] .chart-key-bad { background: #e66767; }
@media (forced-colors: active) { .chart-fill-good { fill: CanvasText; } .chart-fill-bad { fill: Highlight; } }

/* FunID (ADR-026) */
.vendor-fun-id { letter-spacing: .08em; }
.vendor-fun-id-input { width: 6.5rem; }
.text-pre-line { white-space: pre-line; }

/* Market request screening questions (ADR-026 §4) */
.mrq-order { width: 6rem; }
.mrq-question { min-width: 20rem; width: 40%; }
.mrq-type { min-width: 8.5rem; }
.mrq-options { min-width: 12rem; }

/* Vendor account pages (PO 2026-11-03): one menu, page titles with one or two actions, a "Show" dropdown. */
.vendor-search { width: 16rem; max-width: 100%; }
.vendor-product-name { text-transform: none; }
.vendor-logo-box { display: flex; align-items: center; justify-content: center; min-height: 8rem; padding: 1rem; border: 1px dashed var(--bs-border-color); border-radius: .5rem; text-align: center; }
.vendor-logo { max-width: 100%; max-height: 10rem; object-fit: contain; }
.vendor-logo-sm { width: 2.5rem; height: 2.5rem; object-fit: contain; border-radius: .375rem; background: var(--bs-body-bg); }
.vendor-market-search { max-width: 22rem; }
.vendor-switch .form-select { min-width: 12rem; }
.vendor-market-card .alert { border-radius: .5rem; }

/* Release Log and announcements (ADR-027). */
.release-area { letter-spacing: .06em; }
.campaign-sample { display: block; width: 100%; height: 44rem; border: 0; border-top: 1px solid var(--bs-border-color); background: #fff; }

/* The kiosk screen and self-checkout (ADR-028): groups and tiles on the left in the organisation's colour,
   the basket on the right, a big Pay button. Touch sizes of 40px and more. */
.kiosk-html, .kiosk-body { height: 100%; }
.kiosk-body { background: #eef0f4; overflow: hidden; }
.kiosk { --kiosk-radius: 16px; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.kiosk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.kiosk-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.kiosk-logo { height: 34px; max-width: 160px; object-fit: contain; }
.kiosk-point { font-weight: 600; color: var(--bs-heading-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk-top-tools { display: flex; align-items: center; gap: 12px; }
.kiosk-staff { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 20px; background: #1f2937; color: #fff; }
.kiosk-staff strong { color: #fff; }
.kiosk-staff form { margin: 0; }
.kiosk > .alert { margin: 12px 16px 0; }
.kiosk-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 34%); gap: 16px; padding: 16px; }
.kiosk-left { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 24px; border-radius: var(--kiosk-radius); background: var(--bs-primary); color: #fff; }
.kiosk-title { margin: 0 0 12px; font-size: 2rem; font-weight: 700; color: #fff; }
.kiosk-search { position: relative; }
.kiosk-scan { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0 16px; border-radius: 12px; background: #fff; color: var(--bs-body-color); }
.kiosk-scan i { font-size: 1.6rem; color: var(--bs-primary); }
.kiosk-scan input { flex: 1; min-width: 0; padding: 14px 0; border: 0; outline: 0; font-size: 1.15rem; background: transparent; }
.kiosk-scan span { padding: 14px 0; opacity: .6; }
.kiosk-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; max-height: 50vh; overflow-y: auto; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); border-radius: 12px; }
.kiosk-results:empty { display: none; }
.kiosk-results .list-group-item { padding: 12px 16px; }
.kiosk-results .active-hint { border-left: 3px solid var(--bs-primary); }
.kiosk-hint { margin: 8px 2px 0; font-size: .85rem; opacity: .8; }
.kiosk-heading { margin: 24px 0 12px; font-size: 1.25rem; font-weight: 600; color: #fff; }
.kiosk-none { opacity: .85; }
.kiosk-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kiosk-group { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 12px 14px; border: 0; border-radius: 12px; background: #fff; color: var(--bs-body-color); text-align: left; font-size: 1.05rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.kiosk-group:hover, .kiosk-group:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .7); }
.kiosk-group-text { min-width: 0; }
.kiosk-group-name { display: block; font-weight: 600; color: var(--bs-heading-color); }
.kiosk-group-sub { display: block; font-size: .875rem; color: var(--bs-secondary-color); }
.kiosk-chevron { margin-left: auto; font-size: 1.6rem; color: var(--bs-primary); }
.kiosk-pic { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 64px; height: 64px; overflow: hidden; border-radius: 10px; background: #f3f4f6; }
.kiosk-pic img { width: 100%; height: 100%; object-fit: cover; }
.kiosk-pic-sm { width: 40px; height: 40px; border-radius: 8px; }
.kiosk-initial { font-size: 1.6rem; font-weight: 700; color: var(--bs-primary); }
.kiosk-pic-sm .kiosk-initial { font-size: 1.1rem; }
.kiosk-group-view { display: flex; flex-direction: column; flex: 1; margin-top: 20px; }
.kiosk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kiosk-round { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--bs-primary); font-size: 1.4rem; }
.kiosk-round:disabled { opacity: .45; }
.kiosk-group-title { flex: 1; margin: 0; font-size: 1.5rem; font-weight: 700; color: #fff; }
.kiosk-filter { display: flex; align-items: center; gap: 8px; width: 240px; max-width: 100%; margin: 0; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--bs-body-color); }
.kiosk-filter input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; }
.kiosk-count { margin: 12px 2px; opacity: .9; }
.kiosk-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-content: start; flex: 1; }
.kiosk-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 0; border-radius: 12px; background: #fff; color: var(--bs-body-color); text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.kiosk-tile .kiosk-pic { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.kiosk-tile .kiosk-initial { font-size: 2.2rem; }
.kiosk-tile-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.25; color: var(--bs-heading-color); }
.kiosk-tile-price { font-weight: 700; color: var(--bs-primary); }
.kiosk-tile.is-added { animation: kiosk-added .45s ease-out; }
@keyframes kiosk-added { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .95); transform: scale(.97); } 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); transform: scale(1); } }
.kiosk-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; font-weight: 600; }
.kiosk-basket { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: var(--kiosk-radius); background: #fff; }
.kiosk-basket-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--bs-border-color); }
.kiosk-basket-head h2 { margin: 0; font-size: 1.25rem; }
.kiosk:not(.has-items) #till-clear { visibility: hidden; }
.kiosk-lines { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px; }
.kiosk-lines:empty { display: none; }
.kiosk-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bs-border-color); }
.kiosk-line-name { font-weight: 600; color: var(--bs-heading-color); }
.kiosk-line-unit { color: var(--bs-secondary-color); }
.kiosk-qty { display: flex; align-items: center; gap: 6px; }
.kiosk-qty-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--bs-border-color); border-radius: 50%; background: #fff; color: var(--bs-primary); font-size: 1.2rem; }
.kiosk-qty-btn.is-bin { color: var(--bs-danger); }
.kiosk-qty-n { min-width: 2ch; font-weight: 600; text-align: center; }
.kiosk-line-total { min-width: 5.5rem; font-weight: 600; text-align: right; color: var(--bs-heading-color); }
.kiosk-empty { flex: 1; margin: 0; padding: 40px 20px; text-align: center; color: var(--bs-secondary-color); }
.kiosk-basket-foot { padding: 16px 20px; border-top: 1px solid var(--bs-border-color); background: #fafbfc; }
.kiosk-sum { display: flex; justify-content: space-between; }
.kiosk-discounts > div { display: flex; justify-content: space-between; }
.kiosk-total { margin-top: 4px; font-size: 1.4rem; font-weight: 700; color: var(--bs-heading-color); }
.kiosk-pay { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 12px; padding: 18px 22px; border-radius: 12px; font-size: 1.4rem; font-weight: 700; }
.kiosk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 12px; }
.kiosk-help { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 0; border-radius: 999px; background: #fff; color: var(--bs-primary); font-size: 1.1rem; font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.kiosk-help i { font-size: 1.4rem; }
.kiosk-overlay { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(17, 24, 39, .55); }
.kiosk-sheet { width: 100%; max-width: 640px; max-height: 100%; overflow-y: auto; padding: 32px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.kiosk-sheet h2 { font-size: 1.75rem; }
.kiosk-sheet-icon { font-size: 3rem; color: var(--bs-primary); }
.kiosk-sheet-lead { font-size: 1.1rem; color: var(--bs-secondary-color); }
.kiosk-due { display: flex; justify-content: center; align-items: baseline; gap: 14px; margin: 16px 0; font-size: 1.25rem; }
.kiosk-due strong { font-size: 2.6rem; color: var(--bs-heading-color); }
.kiosk-receipt, .kiosk-confirm { text-align: left; }
.kiosk-receipt summary { color: var(--bs-primary); cursor: pointer; }
.kiosk-confirm { margin-top: 16px; padding: 16px; border: 1px dashed var(--bs-border-color); border-radius: 12px; }
.kiosk-confirm .form-select, .kiosk-confirm .form-control { flex: 1; min-width: 10rem; }
.kiosk-sheet-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.kiosk-closed { align-items: center; justify-content: center; padding: 16px; }
.kiosk-preview { overflow: hidden; border-radius: var(--kiosk-radius); }
.kiosk-preview .kiosk-left { max-height: 620px; padding: 20px; }
.kiosk-preview .kiosk-tiles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.kiosk-preview .kiosk-title { font-size: 1.5rem; }
.list-group-item.active-group { box-shadow: inset 3px 0 0 var(--bs-primary); }
@media (max-width: 1399.98px) { .kiosk-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1099.98px) { .kiosk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899.98px) {
    .kiosk-body { overflow: auto; }
    .kiosk { height: auto; min-height: 100vh; }
    .kiosk-main { grid-template-columns: 1fr; }
    .kiosk-left { overflow: visible; }
    .kiosk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kiosk-lines { max-height: none; }
}

/* Module switches in Flash Mode (ADR-029). */
.module-switch { display: flex; align-items: flex-start; gap: 12px; height: 100%; margin: 0; padding: 12px 14px; border: 1px solid var(--bs-border-color); border-radius: .5rem; cursor: pointer; }
.module-switch:has(input:checked) { border-color: var(--bs-primary); box-shadow: inset 3px 0 0 var(--bs-primary); }
.module-switch .form-check-input { margin-top: .15rem; }
.module-package { min-width: 18rem; }

/* Migration assistant in Flash Mode (ADR-030): the import's phases. */
.migration-phases { list-style: none; margin: 0; padding: 0; counter-reset: phase; }
.migration-phases li { position: relative; padding: 0 0 12px 34px; counter-increment: phase; color: var(--bs-secondary-color); }
.migration-phases li::before { content: counter(phase); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border: 1px solid var(--bs-border-color); border-radius: 50%; font-size: .75rem; line-height: 22px; text-align: center; }
.migration-phases li.is-now { color: var(--bs-heading-color); font-weight: 500; }
.migration-phases li.is-now::before { border-color: var(--bs-primary); color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15); }
.migration-phases li.is-done { color: var(--bs-body-color); }
.migration-phases li.is-done::before { content: "\2713"; border-color: var(--bs-success); background: var(--bs-success); color: #fff; }
.migration-phases small { font-weight: 400; }

/* Laybuys at the till (ADR-031). */
.laybuy-steps { display: flex; gap: 16px; list-style: none; padding: 0; counter-reset: lb; font-size: .85rem; }
.laybuy-steps li { counter-increment: lb; color: var(--bs-secondary-color); }
.laybuy-steps li::before { content: counter(lb); display: inline-block; width: 20px; height: 20px; margin-right: 6px; border: 1px solid var(--bs-border-color); border-radius: 50%; font-size: .7rem; line-height: 18px; text-align: center; }
.laybuy-steps li.is-now { color: var(--bs-heading-color); font-weight: 500; }
.laybuy-steps li.is-now::before { border-color: var(--bs-primary); color: var(--bs-primary); }
.laybuy-steps li.is-done::before { content: "\2713"; border-color: var(--bs-success); background: var(--bs-success); color: #fff; }
.laybuy-terms { max-height: 260px; overflow-y: auto; white-space: pre-line; }
.laybuy-sign { display: block; aspect-ratio: 8 / 3; background: #fff; touch-action: none; cursor: crosshair; }
.laybuy-done-icon { font-size: 3.5rem; }
.laybuy-id-photo { max-height: 70vh; }
@media (max-width: 575.98px) { .laybuy-steps { display: none; } }
.laybuy-msg { max-width: 34rem; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: var(--bs-gray-100, #f4f5fa); }
.laybuy-msg.is-in { margin-left: auto; background: rgba(var(--bs-success-rgb), .12); }

/* Settings → Branding → Theme and colours (ADR-034, appearance.js). Colours come from the theme's tokens. */
.appearance-theme { display: block; position: relative; height: 100%; cursor: pointer; padding: 1rem 1.25rem; background: var(--bs-paper-bg);
  border: 2px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg, .75rem); transition: border-color .15s ease, box-shadow .15s ease; }
.appearance-theme:hover { border-color: var(--bs-primary); }
.appearance-theme.is-chosen { border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .18); }
.appearance-theme:focus-within { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.appearance-theme-input { position: absolute; opacity: 0; pointer-events: none; }
.appearance-theme-body { display: flex; flex-direction: column; gap: .45rem; }
.appearance-theme-title { font-weight: 700; font-size: 1.0625rem; color: var(--bs-heading-color, var(--bs-body-color)); }
.appearance-theme-blurb { color: var(--bs-secondary-color); font-size: .875rem; }
.appearance-swatches { display: inline-flex; gap: .35rem; }
.appearance-swatch { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1px solid rgba(var(--bs-body-color-rgb, 0, 0, 0), .2); }
.appearance-palette { display: inline-flex; align-items: center; gap: .65rem; padding: .45rem .85rem; cursor: pointer; background: var(--bs-paper-bg); color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color); border-radius: 999px; }
.appearance-palette[hidden] { display: none; }
.appearance-palette:hover:not(:disabled) { border-color: var(--bs-primary); }
.appearance-palette.is-active { border-color: var(--bs-primary); box-shadow: 0 0 0 .15rem rgba(var(--bs-primary-rgb), .18); }
.appearance-palette-name { font-size: .875rem; font-weight: 500; }
.appearance-frame { display: block; width: 100%; height: 380px; background: #fff; border: 1px solid var(--bs-border-color); border-radius: .75rem; }
.appearance-notes { color: var(--bs-warning-text-emphasis); padding-inline-start: 1.1rem; }
