:root {
    --navy: #12263c; --navy-2: #1e3a54; --blue: #b84604; --blue-dark: #a53f04;
    --cyan: #1ec8dd; --orange: #f28c28; --red: #c63d3d; --green: #117a58;
    --ink: #14283e; --muted: #5d6c80; --line: #dfe5ec; --soft: #f7f7f5; --white: #fff;
    --sidebar-width: 264px;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink); background: var(--soft); font-synthesis: none;
}
* { box-sizing: border-box; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* Small print never drops below 12 px, whatever the size of the text around it. */
small, .small { font-size: max(.75rem, .875em); }
/* A line that opens or closes a section is at least 24 px high, the smallest comfortable click target. */
summary { min-height: 24px; }
/* A control the server rejected. The border and ring add to the linked message, so the state does not rely on colour alone. */
[aria-invalid="true"] { border-color: #b63333 !important; box-shadow: 0 0 0 3px rgba(182,51,51,.18) !important; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 2000; padding: 10px 16px; background: var(--navy); color: #fff; border-radius: 6px; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); color: #fff; }
.maintenance-actions, .document-links { display: flex; flex-wrap: wrap; gap: 10px; }
.maintenance-actions { margin: 20px 0; }
.module-documents { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.module-documents h2 { font-size: 1.05rem; margin: 3px 0 6px; }
.module-documents p { margin: 0; color: var(--muted); font-size: .8rem; max-width: 560px; }
.button:disabled { opacity: .55; cursor: not-allowed; }
form[aria-busy="true"] [type="submit"] { opacity: .65; cursor: progress; }
.workspace-role { color: var(--muted); font-size: .8rem; }
.registration-body { background: var(--soft); }
.login-shell.registration-shell { max-width: 1360px; min-height: auto; margin: 32px auto; padding: 0 20px; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); }
.registration-shell .login-form-panel { padding: 24px; }
.registration-shell .registration-card { max-width: none; width: 100%; }
.registration-shell .login-brand-panel { border-radius: 14px 0 0 14px; padding: 40px 30px; }
.registration-shell .login-intro { margin-top: 64px; }
.registration-shell .login-module-list { display: grid; grid-template-columns: 1fr; margin: 10px 0 24px; }
.registration-shell .login-brand-panel > p { position: relative; z-index: 1; color: #bbcbd8; font-size: .85rem; }
.registration-requests { padding: 24px; margin-bottom: 24px; }
.registration-request { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.registration-request h3 { font-size: 1rem; margin: 0 0 8px; }
.registration-request p { font-size: .85rem; margin: 4px 0; color: var(--muted); }
.registration-review-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.catalog-reference-note { margin: 12px 0; padding: 14px; border-radius: 8px; background: #fff7ec; color: #694320; font-size: .85rem; }
@media (max-width: 980px) { .login-shell.registration-shell { display: block; max-width: 720px; padding: 0 12px; margin: 16px auto; } .registration-shell .login-form-panel { padding: 0; } .registration-request { align-items: flex-start; flex-direction: column; } }
.registration-card { background: white; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--line); border-radius: 14px; }
.registration-card h1 { font-size: 2rem; }
.registration-card input[type="checkbox"] { width: auto; flex: none; }
.registration-consent { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0; }
.registration-consent input { margin-top: 4px; }
.registration-card .registration-consent { display: flex; align-items: flex-start; gap: 12px; }
.registration-card .registration-consent input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 3px 0 0; flex: 0 0 18px; accent-color: var(--blue); }
@media (max-width: 640px) { .workspace-role { display: none; } }
.transaction-line { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; margin-bottom: 12px; }
.payment-record { padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
[hidden], .hidden { display: none !important; }
/* Focus Not Obscured (WCAG 2.2 SC 2.4.11): when the browser scrolls a focused control into view it keeps clear
   of the bar that stays at the top of the page, and on narrow screens of the bar that stays at the bottom. */
html { min-width: 300px; background: var(--soft); scroll-padding-top: 86px; }
@media (max-width: 900px) { html { scroll-padding-bottom: 76px; } }
body { margin: 0; min-height: 100vh; background: var(--soft); font-family: "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.55; }
button, input, select, textarea { font: inherit; } a { color: inherit; text-decoration: none; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.mini-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.mini-stat-grid article { padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.mini-stat-grid span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; }
.mini-stat-grid strong { display: block; color: var(--navy); font-size: 1.65rem; font-weight: 750; line-height: 1.2; }
@media (max-width: 780px) { .mini-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #c4cfdd; padding: 24px 16px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: white; padding: 0 10px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand strong, .brand small { display: block; } .brand strong { font-size: 1.18rem; letter-spacing: -.02em; }
.brand small { color: #8da0b9; font-size: .77rem; margin-top: 1px; }
/* The default mark has the same shape, colour and bars as the public pages (public.css .site-brand-mark). */
.brand-mark { width: 39px; height: 39px; background: var(--blue); display: flex; align-items: end; justify-content: center; gap: 3px; padding: 10px; border-radius: 9px; }
.brand-mark span { display: block; width: 5px; height: 9px; background: white; border-radius: 1px; }
.brand-mark span:nth-child(2) { height: 18px; } .brand-mark span:nth-child(3) { height: 14px; }
.side-nav { overflow-y: auto; padding: 10px 0; scrollbar-width: thin; scrollbar-color: #394a62 transparent; }
.nav-section { margin-top: 13px; }
.nav-section > p { margin: 0 12px 6px; color: #9bafc4; font-size: .75rem; font-weight: 800; letter-spacing: .06em; line-height: 1.5; text-transform: uppercase; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 12px; border-radius: 8px; padding: 10px 12px; color: #aebdd0; font-size: .875rem; font-weight: 600; transition: background .18s, color .18s, transform .18s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: var(--blue); color: white; }
.nav-item svg { flex: 0 0 auto; }
.nav-item b { margin-left: auto; min-width: 23px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255,255,255,.12); color: white; display: grid; place-items: center; font-size: .75rem; }
.nav-item b.warning { background: #b94b36; }
.sidebar-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.user-card { margin-top: 9px; padding: 12px 9px 0; display: flex; align-items: center; gap: 10px; }
.avatar, .top-avatar { display: grid; place-items: center; border-radius: 9px; background: #284a66; color: white; font-weight: 800; }
.avatar { width: 36px; height: 36px; font-size: .75rem; } .user-card > span:nth-child(2) { min-width: 0; flex: 1; }
/* F5: long account names wrap instead of being cut off. */ .user-card strong, .user-card small { display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.user-card strong { color: white; font-size: .79rem; } .user-card small { color: #7f91a8; font-size: .75rem; }
.user-card button, .user-card > a { color: #8292a8; background: none; border: 0; cursor: pointer; padding: 6px; }
.main-column { min-width: 0; }
.project-footer { padding: 1.75rem 0; background: var(--navy); color: #d9e4ee; font-size: .8rem; line-height: 1.7; }
.project-footer-inner { max-width: 1660px; margin: 0 auto; padding: 0 32px; }
.project-footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem 2rem; }
.project-footer-identity { margin: 0; min-width: 0; max-width: 46rem; font-weight: 650; overflow-wrap: anywhere; }
.project-footer-links { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.project-footer a { display: inline-block; padding: .3rem 0; color: #d9e4ee; text-decoration: underline; text-underline-offset: .2em; }
.project-footer a:hover, .project-footer a[aria-current] { color: white; text-decoration-thickness: 2px; }
.project-footer a:focus-visible { outline: 3px solid #fdad72; outline-offset: 4px; border-radius: 2px; }
.essential-cookie-notice { margin: 1.3rem 0 0; padding-top: 1rem; border-top: 1px solid #ffffff30; color: #bdccd8; }
@media (max-width: 640px) {
    .project-footer-inner { padding-left: 18px; padding-right: 18px; }
    .project-footer-links { gap: .5rem 1.25rem; }
}
.topbar { height: 70px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 0 30px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.global-search { width: min(600px, 56vw); min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; }
.global-search-field { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; margin: 0; }
.global-search > .button, .global-search-clear { flex-shrink: 0; }
.global-search-clear { padding: 8px 2px; font-size: .78rem; }
.global-search svg { position: absolute; left: 14px; color: #7b899a; width: 18px; }
.global-search input { width: 100%; min-width: 0; height: 40px; border: 1px solid #d6dde5; background: #f7f9fb; border-radius: 8px; padding: 0 68px 0 42px; color: var(--ink); outline: none; font-size: .88rem; }
.global-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(200,78,6,.12); background: white; }
.global-search kbd { position: absolute; right: 10px; font: 600 .68rem/1 system-ui; color: var(--muted); border: 1px solid #dbe1e7; border-bottom-width: 2px; border-radius: 5px; padding: 5px 7px; background: white; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sync-state { color: #526277; font-size: .77rem; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.sync-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(242,140,40,.15); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; color: #526277; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.icon-button:hover { background: var(--soft); color: var(--blue); }
.notification-button { position: relative; }
.notification-button span { position: absolute; top: 0; right: -3px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; display: grid; place-items: center; background: var(--red); color: white; border: 2px solid white; font-size: .75rem; }
.top-avatar { width: 38px; height: 38px; font-size: .75rem; } .mobile-menu { display: none; }
.workspace { padding: 29px 32px 48px; max-width: 1660px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 2px 0 4px; font-size: clamp(1.65rem, 2.3vw, 2.2rem); line-height: 1.16; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: .91rem; }
.heading-actions { display: flex; gap: 10px; }
.heading-actions select, .button { min-height: 42px; border: 1px solid #d6dde5; border-radius: 7px; padding: 0 14px; background: white; color: #334258; font-weight: 700; font-size: .82rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.button svg { width: 17px; } .button.primary { border-color: var(--blue); background: var(--blue); color: white; }
.button.primary:hover { background: var(--blue-dark); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card, .panel { background: white; border: 1px solid var(--line); box-shadow: 0 3px 12px rgba(20,32,51,.045); }
.metric-card { min-height: 126px; display: flex; align-items: center; gap: 15px; padding: 20px; border-radius: 10px; position: relative; overflow: hidden; }
.metric-card p, .metric-card small, .metric-card strong { display: block; margin: 0; }
.metric-card p { color: var(--muted); font-size: .76rem; font-weight: 700; }
.metric-card strong { font-size: 1.55rem; line-height: 1.2; margin: 3px 0 2px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.metric-card small { color: var(--muted); font-size: .75rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr); gap: 16px; }
.panel { border-radius: 10px; padding: 22px; min-width: 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.panel-heading h2 { margin: 1px 0 0; font-size: 1.04rem; letter-spacing: -.02em; }
.panel-heading a { display: flex; align-items: center; gap: 5px; color: var(--blue); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.panel-heading a svg { width: 15px; }
.positive { color: var(--green); background: #e8f7f0; border-radius: 12px; padding: 5px 9px; font-size: .75rem; font-weight: 800; }
.orange-text { color: #c7650b !important; }
.chart-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.chart-summary > div:first-child strong, .chart-summary > div:first-child span { display: block; }
.chart-summary > div:first-child strong { font-size: 1.8rem; letter-spacing: -.04em; } .chart-summary > div:first-child span { color: var(--muted); font-size: .75rem; }
.legend { display: flex; gap: 13px; color: var(--muted); font-size: .75rem; } .legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; } .legend .this-week { background: var(--blue); } .legend .last-week { background: #cdd6e1; }
.bar-chart { height: 160px; display: flex; align-items: end; gap: clamp(9px, 2vw, 19px); margin-top: 16px; padding-top: 10px; border-bottom: 1px solid #e8edf2; }
.bar-group { height: 100%; flex: 1; max-width: 50px; position: relative; display: flex; justify-content: center; align-items: end; gap: 3px; }
.bar { width: min(13px, 38%); border-radius: 3px 3px 0 0; } .bar.solid { background: var(--blue); } .bar.ghost { background: #d7dfe9; }
.bar-group small { position: absolute; bottom: -22px; color: var(--muted); font-size: .75rem; } .performance-panel { padding-bottom: 38px; }
.order-list { border-top: 1px solid #edf0f4; }
.order-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid #edf0f4; }
.order-row:hover .order-identity strong { color: var(--blue); }
.order-symbol { width: 34px; height: 34px; display: grid; place-items: center; background: #eef3f8; color: #476079; border-radius: 7px; font-size: .75rem; font-weight: 900; }
.order-identity, .order-value { min-width: 0; } .order-identity strong, .order-identity small, .order-value strong, .order-value small { display: block; }
.order-identity strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .79rem; }
.order-identity small { color: var(--muted); font-size: .75rem; margin-top: 2px; } .order-value { text-align: right; } .order-value strong { font-size: .78rem; }
.badge { display: inline-block !important; width: fit-content; margin: 4px 0 0 auto; border-radius: 10px; padding: 3px 7px; font-size: .75rem !important; font-weight: 800; }
.badge.review { background: #fff0df; color: #b85b07; } .badge.processing { background: #e7f0ff; color: #1559c0; }
.badge.approved { background: #e5f5ed; color: #15734f; } .badge.submitted { background: #efeafe; color: #6541ad; }
.stock-panel { grid-column: 1; } .stock-table { border-top: 1px solid #e8edf2; }
.stock-row { display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(120px, .9fr) 70px 72px; align-items: center; gap: 16px; padding: 14px 3px; border-bottom: 1px solid #edf0f4; }
.stock-row strong, .stock-row small { display: block; } .stock-row > span:first-child strong { font-size: .8rem; }
.stock-row small { color: var(--muted); font-size: .75rem; } .stock-level b { display: block; font-size: .75rem; margin-bottom: 5px; }
.stock-level i { display: block; height: 5px; background: #edf0f4; border-radius: 3px; overflow: hidden; }
.stock-level em { display: block; height: 100%; background: var(--orange); border-radius: inherit; }
.text-button { border: 0; min-height: 24px; color: var(--blue); background: transparent; font-size: .75rem; font-weight: 800; cursor: pointer; }
.actions-panel { grid-column: 2; } .quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-grid a { min-height: 101px; padding: 13px; border: 1px solid #e0e6ed; border-radius: 8px; transition: border-color .18s, transform .18s, box-shadow .18s; }
.quick-grid a:hover { border-color: var(--muted); }
.quick-grid a > span { width: 30px; height: 30px; display: grid; place-items: center; background: #eaf2ff; color: var(--blue); border-radius: 7px; margin-bottom: 9px; }
.quick-grid a svg { width: 16px; } .quick-grid strong, .quick-grid small { display: block; }
.quick-grid strong { font-size: .76rem; } .quick-grid small { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.placeholder-panel { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; }
.placeholder-panel h2 { margin: 14px 0 5px; } .placeholder-panel p { color: var(--muted); max-width: 480px; }
.placeholder-icon { width: 64px; height: 64px; border-radius: 15px; display: grid; place-items: center; background: #e7f0ff; color: var(--blue); }
.placeholder-icon svg { width: 29px; height: 29px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: grid; gap: 8px; }
.app-toast { width: min(380px, calc(100vw - 44px)); background: var(--navy); color: white; padding: 13px 16px; border-left: 4px solid var(--cyan); border-radius: 7px; box-shadow: 0 16px 35px rgba(8,20,39,.28); font-size: .82rem; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Shared operational controls */
.section-gap { margin-top: 16px; }
.flash { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 8px; font-size: .82rem; }
.flash.success { color: #116445; background: #eaf8f1; border-color: #bce6d1; }
.flash.error { color: #9b2f2f; background: #fff0f0; border-color: #f2c7c7; }
.flash button { border: 0; background: transparent; color: inherit; font-size: 1.25rem; cursor: pointer; }
/* Sign-in details shown once after adding a user or resetting a password. */
.flash.account-handover { display: block; padding: 16px 18px; font-size: .875rem; }
.account-handover-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-handover-head h2 { margin: 0; font-size: 1rem; }
.account-handover-details { display: grid; gap: 6px; margin: 12px 0; }
.account-handover-details div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: baseline; }
.account-handover-details dt { font-weight: 600; }
.account-handover-details dd { margin: 0; overflow-wrap: anywhere; }
.account-handover-password { padding: 4px 10px; border: 1px solid #bce6d1; border-radius: 6px; background: #fff; color: #10231b; font-family: Consolas, "Courier New", monospace; font-size: 1.25rem; letter-spacing: .08em; user-select: all; }
.account-handover p { margin: 0 0 10px; }
.account-handover .button { border: 1px solid #bce6d1; border-radius: 6px; background: #fff; color: #116445; font-size: .8125rem; }
.account-handover .form-note { margin: 0; color: inherit; }
@media (max-width: 560px) { .account-handover-details div { grid-template-columns: 1fr; gap: 0; } }
.module-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 16px; }
.module-toolbar select, .report-filter select, .report-filter input { height: 40px; border: 1px solid #d7dee7; border-radius: 7px; background: white; padding: 0 12px; color: #34445a; }
.field-search { position: relative; width: min(430px, 100%); }
.field-search svg { position: absolute; left: 12px; top: 10px; width: 18px; color: #7c8a9b; }
.field-search input { width: 100%; height: 40px; padding: 0 12px 0 39px; border: 1px solid #d7dee7; border-radius: 7px; outline: 0; }
.field-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,102,229,.1); }
.filter-feedback { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 18px; color: var(--muted); font-size: .78rem; }
.filter-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--muted); }
.record-count { color: var(--muted); font-size: .75rem; font-weight: 650; }
.toolbar-chips { display: flex; gap: 7px; }
.toolbar-chips span { padding: 6px 9px; border-radius: 12px; color: #596b82; background: #eef2f6; font-size: .75rem; font-weight: 700; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { color: #56667b; background: #f6f8fa; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid #e8edf2; vertical-align: middle; }
.data-table tbody tr:hover { background: #f9fbfd; }
.data-table td > strong, .data-table td > small { display: block; }
.data-table td > small { color: var(--muted); margin-top: 3px; font-size: .8125rem; }
.data-table .number { text-align: right; white-space: nowrap; }
.data-table tfoot th { background: #eef3f8; color: #26374d; font-size: .75rem; }
.status { font-weight: inherit; white-space: nowrap; font-style: normal; }
.status.critical, .status.rejected, .status.cancelled, .status.inactive, .status.closed { font-weight: 700; }
.positive-text { color: var(--green); font-weight: 800; }
.button.compact { min-height: 36px; padding: 0 10px; font-size: .75rem; }
.button.wide { width: 100%; }
.button.danger { border-color: #dd5555; color: #b63333; background: #fff4f4; }
.inline-action { display: flex; align-items: center; gap: 6px; }
.inline-action select { min-height: 36px; max-width: 150px; border: 1px solid #d7dee7; border-radius: 6px; background: white; font-size: .8125rem; }
.form-note { color: var(--muted); font-size: .8125rem; line-height: 1.6; }

/* Dialogs and forms */
.modal { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; border: 0; border-radius: 12px; padding: 0; color: var(--ink); box-shadow: 0 30px 70px rgba(8,20,39,.3); }
/* Native dialogs share the visual class, but not Bootstrap's JS modal lifecycle. */
dialog.modal { inset: 0; margin: auto; height: fit-content; }
dialog.modal[open] { display: block; }
dialog.modal:not([open]) { display: none; }
.modal::backdrop { background: rgba(5,14,28,.62); backdrop-filter: blur(3px); }
.modal form { padding: 22px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-head button { width: 34px; height: 34px; border: 0; border-radius: 7px; background: var(--soft); color: #5d6c80; font-size: 1.3rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid label, .checkout-form label, .ticket-response label, .report-filter label { display: grid; gap: 7px; min-width: 0; color: #43536a; font-size: .8125rem; font-weight: 750; }
.form-grid input, .form-grid select, .form-grid textarea, .checkout-form input, .checkout-form select, .ticket-response input, .ticket-response select, .ticket-response textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #d5dde7; border-radius: 7px; padding: 9px 11px; background: white; color: var(--ink); font-size: 1rem; outline: none; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .checkout-form input:focus, .checkout-form select:focus, .ticket-response input:focus, .ticket-response select:focus, .ticket-response textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: 0 0 0 3px rgba(200,78,6,.12); }
.form-grid .price-confirmation .checkbox-option { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.form-grid .price-confirmation input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; flex: 0 0 20px; accent-color: var(--blue); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.notification-modal { width: min(440px, calc(100vw - 28px)); padding: 22px; }
.notification-list a { display: flex; align-items: center; gap: 11px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.notification-list a:hover strong { color: var(--blue); }
.notification-list strong, .notification-list small { display: block; }
.notification-list strong { font-size: .78rem; } .notification-list small { margin-top: 2px; color: var(--muted); font-size: .75rem; }

/* POS */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.pos-catalog { min-height: 620px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.product-tile { display: flex; flex-direction: column; min-height: 238px; padding: 15px; border: 1px solid #e0e6ed; border-radius: 9px; }
.product-tile.hidden { display: none; }
.pos-group-filter { min-height: 42px; max-width: 230px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #22344d; font-size: .86rem; font-weight: 600; }
.product-grid .pos-group { grid-column: 1 / -1; margin: 16px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: #1c2b41; font-size: .95rem; font-weight: 800; }
.product-grid .pos-group:first-child { margin-top: 0; }
.product-tile-image { width: 56px; height: 56px; object-fit: contain; }
.product-monogram { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: #e8f1ff; font-weight: 900; font-size: .75rem; text-transform: uppercase; }
.product-tile > p { margin: 12px 0 3px; color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.product-tile h2 { margin: 0; font-size: .86rem; line-height: 1.35; }
.product-tile > small { color: var(--muted); font-size: .75rem; margin-top: 4px; }
.product-tile > div:nth-last-of-type(1) { margin-top: auto; padding: 12px 0 9px; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.product-tile > div strong { font-size: .91rem; }
.stock-warn, .stock-ok { font-size: .75rem; font-weight: 750; }
.stock-warn { color: #9c5209; } .stock-ok { color: var(--green); }
/* The cart never grows taller than the window: it scrolls inside, and the total and the button stay in view. */
.pos-cart { scroll-padding-bottom: 144px; position: sticky; top: 86px; max-height: calc(100vh - var(--pos-cart-top, 200px) - 16px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0; }
.cart-footer { position: sticky; bottom: 0; z-index: 1; display: grid; gap: 10px; margin: 12px -4px 0; padding: 0 4px 16px; background: #fff; box-shadow: 0 -8px 10px -10px rgba(16,32,56,.28); }
.pos-cart .empty-state { min-height: 120px; }
.cart-lines { min-height: 120px; max-height: min(330px, 36vh); overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty-state { min-height: 190px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-state span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #edf2f7; }
.empty-state strong { margin-top: 9px; color: #53647a; font-size: .8rem; } .empty-state p { margin: 2px 0 0; font-size: .75rem; }
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; padding: 12px 2px; border-bottom: 1px solid #edf0f4; }
.cart-line strong, .cart-line small { display: block; } .cart-line strong { font-size: .875rem; line-height: 1.35; } .cart-line small { margin-top: 2px; color: #5f6f84; font-size: .78rem; }
.cart-line-total { text-align: right; white-space: nowrap; }
.cart-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.cart-controls button { min-width: 34px; height: 34px; border: 1px solid #cfd8e3; border-radius: 6px; background: white; color: #22344d; font-size: 1.05rem; font-weight: 700; line-height: 1; cursor: pointer; }
.cart-controls button:hover:not(:disabled) { background: #f2f6fb; }
.cart-controls button:disabled { color: #b3bfcc; cursor: not-allowed; }
.cart-controls input { width: 68px; height: 34px; border: 1px solid #cfd8e3; border-radius: 6px; padding: 4px 6px; font-size: .9rem; font-weight: 700; text-align: center; }
.cart-controls .cart-remove { margin-left: auto; padding: 0 10px; border-color: transparent; color: #b3401a; font-size: .8rem; }
.cart-controls .cart-remove:hover:not(:disabled) { background: #fdf0ea; }
.checkout-form { display: grid; gap: 11px; padding-top: 16px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-top: 1px dashed #ced7e1; }
.cart-total span { color: #66758a; font-size: .8rem; font-weight: 700; } .cart-total strong { font-size: 1.35rem; }

/* Inventory and directories */
.inventory-banner { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--navy); color: white; overflow: hidden; }
.inventory-banner div, .inventory-banner a { min-height: 104px; padding: 22px; border-right: 1px solid rgba(255,255,255,.12); }
.inventory-banner div:last-child { border: 0; }
.inventory-banner a { color: inherit; text-decoration: none; }
.inventory-banner a:hover, .inventory-banner a:focus-visible { background: rgba(255,255,255,.08); }
.inventory-banner a:hover strong, .inventory-banner a:focus-visible strong { text-decoration: underline; } .inventory-banner span, .inventory-banner strong { display: block; }
.inventory-banner span { color: #91a3ba; font-size: .75rem; font-weight: 700; } .inventory-banner strong { margin-top: 5px; font-size: 1.35rem; }
.meter { width: 130px; height: 6px; border-radius: 4px; overflow: hidden; background: #e9edf2; }
.meter span { display: block; height: 100%; background: var(--green); } .meter span.danger { background: var(--orange); }
.timeline-list article { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid #edf0f4; }
.timeline-list strong, .timeline-list p { display: block; margin: 0; } .timeline-list strong { font-size: .78rem; } .timeline-list p, .timeline-list small { color: var(--muted); font-size: .75rem; }
.timeline-list > article > small { text-align: right; }
.movement-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; }
.movement-icon.in { background: #e4f5ec; color: var(--green); } .movement-icon.out { background: #fff0df; color: #9c5209; }
.directory-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.directory-head { display: flex; justify-content: space-between; align-items: center; }
.directory-card > small { display: block; margin-top: 14px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.directory-card h2 { margin: 2px 0 4px; font-size: .98rem; } .directory-card > p { margin: 0; min-height: 39px; color: #68788e; font-size: .75rem; }
.directory-card dl { margin: 14px 0; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.directory-card dl div { display: grid; grid-template-columns: 65px 1fr; gap: 8px; padding: 3px 0; font-size: .75rem; }
.directory-card dt { color: var(--muted); } .directory-card dd { margin: 0; overflow-wrap: anywhere; }

/* Purchase board */
.purchase-board { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; align-items: start; }
.purchase-column { min-height: 340px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #e9eef3; }
.column-title { display: flex; align-items: center; justify-content: space-between; padding: 3px 3px 12px; }
.column-title strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.column-title span { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 12px; background: #d7dfe8; font-size: .75rem; font-weight: 800; }
.purchase-card { padding: 14px; margin-bottom: 9px; border: 1px solid #dae1e8; border-radius: 8px; background: white; box-shadow: 0 2px 7px rgba(20,32,51,.04); }
.purchase-card > small { color: var(--blue); font-size: .75rem; font-weight: 800; } .purchase-card h2 { margin: 5px 0 3px; font-size: .84rem; }
.purchase-card p { margin: 0; color: var(--muted); font-size: .75rem; } .purchase-card > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin: 12px 0; font-size: .75rem; }
.purchase-card > div span { margin-left: auto; color: var(--muted); text-align: right; } .purchase-card p.delivery-date { margin: -4px 0 10px; color: #3f4d5e; } .purchase-card p.delivery-date.is-late { color: #b42318; font-weight: 700; }
.purchase-card .compact-field { display: grid; gap: 4px; margin-bottom: 8px; color: #3f4d5e; font-size: .75rem; font-weight: 700; }
.purchase-card .compact-field input { min-height: 28px; }
.business-details-editor { margin-top: 14px; } .business-details-editor summary { cursor: pointer; font-weight: 700; } .business-details-editor .checkbox-field { display: flex; min-height: 24px; gap: 10px; align-items: center; justify-content: flex-start; grid-column: span 2; font-weight: 500; }
.business-details-editor .checkbox-field input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.role-permissions { padding: 18px 22px; } .role-permissions summary { display: grid; gap: 4px; cursor: pointer; } .role-permissions summary strong { font-size: 1rem; } .role-permissions summary span { color: var(--muted); font-size: .8125rem; }
.role-permissions h3 { margin: 18px 0 8px; font-size: .9rem; } .role-matrix td:not(:first-child), .role-matrix th:not(:first-child) { text-align: center; } .role-matrix .role-matrix-group th { background: #f3f6f9; text-align: left; font-size: .75rem; } .column-empty { margin: 50px 0; color: var(--muted); text-align: center; font-size: .75rem; }

/* Reporting */
.report-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.report-filter label { flex: 1 1 160px; min-width: 0; }
.report-filter input, .report-filter select { width: 100%; min-width: 0; max-width: 100%; }
.report-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 14px; }
.report-kpis article, .report-kpis a { padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--navy); color: white; text-decoration: none; }
.report-kpis a:hover, .report-kpis a:focus-visible { background: #1d3a57; } .report-kpis a:hover strong, .report-kpis a:focus-visible strong { text-decoration: underline; }
.report-kpis span, .report-kpis strong, .report-kpis small { display: block; } .report-kpis span { color: #91a3ba; font-size: .75rem; font-weight: 700; }
.report-kpis strong { margin: 5px 0 1px; font-size: 1.45rem; } .report-kpis small { color: #7f94ad; font-size: .75rem; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.print-only { display:none; }

/* Users, tickets, settings */
.role-strip { display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px }.role-strip article{display:flex;align-items:center;gap:10px;padding:13px;border:1px solid var(--line);border-radius:9px;background:white}.role-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#e8f1ff;color:var(--blue);font-size:.75rem;font-weight:900}.role-strip strong,.role-strip small{display:block}.role-strip strong{font-size:.75rem}.role-strip small{color:var(--muted);font-size:.75rem}
.person-cell{display:flex;align-items:center;gap:9px}
.ticket-board { display: grid; grid-template-columns: minmax(330px, .75fr) minmax(0, 1.25fr); gap: 14px; }
.ticket-list { padding: 15px; }
#ticketItems { max-height: 32rem; overflow-y: auto; overscroll-behavior: contain; }
.ticket-list, .ticket-detail { min-width: 0; overflow-wrap: anywhere; }
.ticket-item { width: 100%; display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; gap: 10px; text-align: left; padding: 14px 3px; border: 0; border-bottom: 1px solid #e8edf2; background: transparent; cursor: pointer; }
.ticket-item:hover, .ticket-item.selected { background: #f4f8ff; }
.ticket-marker { width: 4px; height: 100%; min-height: 55px; border-radius: 3px; background: #9db0c4; }
.ticket-item.selected .ticket-marker { background: var(--blue); }
.ticket-item strong, .ticket-item small, .ticket-item p { display: block; margin: 0; }
.ticket-item strong { font-size: .875rem; margin: 3px 0; }
.ticket-item p, .ticket-item small { color: var(--muted); font-size: .75rem; }
.ticket-item > span:last-child { text-align: right; }
.ticket-item em { margin-left: auto; margin-bottom: 7px; }
.ticket-hero { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ticket-hero .ticket-number { margin: 0; color: var(--muted); font-size: .85rem; }
.ticket-history h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.ticket-hero h2 { margin: 3px 0 8px; font-size: 1.15rem; }
.ticket-hero > p:last-child { margin: 0; color: #5d6e84; font-size: .875rem; white-space: pre-line; }
.ticket-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 15px 0; padding: 10px; background: #f6f8fa; border-radius: 8px; }
.ticket-meta div { padding: 6px 10px; }
.ticket-meta dt { color: var(--muted); font-size: .75rem; }
.ticket-meta dd { margin: 2px 0 0; font-size: .875rem; font-weight: 700; }
.ticket-response { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.ticket-response label:first-of-type { grid-column: 1 / -1; }
.ticket-response button { min-width: 120px; }
.ticket-response > fieldset { min-width: 0; grid-column: 1 / -1; display: grid; gap: 12px; }
.ticket-response > fieldset button { justify-self: start; }
.ticket-history{margin:18px 0;display:grid;gap:10px}.ticket-history article{padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:#f8fafc}.ticket-history article strong,.ticket-history article small{display:block}.ticket-history article small{margin-top:2px;color:var(--muted)}.ticket-history article p{margin:8px 0 0;line-height:1.5}
.audit-notice{display:flex;align-items:center;gap:12px;padding:14px 17px;margin-bottom:14px;border:1px solid #bdd7f7;border-radius:9px;background:#ecf4ff;color:#174f9d}.audit-notice>span{width:38px;height:38px;display:grid;place-items:center;border-radius:9px;background:#dceaff}.audit-notice strong,.audit-notice p{display:block;margin:0}.audit-notice p{font-size:.75rem;color:#4c6690;margin-top:2px}.data-table code,.connection-card code{padding:2px 5px;border-radius:4px;background:#eef2f6;font-size:.75rem}
.settings-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px}.connection-card{display:flex;gap:12px;padding:14px;border:1px solid #f2d1a9;border-radius:9px;background:#fff7ed}.connection-card>span{width:40px;height:40px;display:grid;place-items:center;border-radius:8px;background:#ffe8cc;color:#b75f09}.connection-card strong,.connection-card p{display:block;margin:0}.connection-card strong{font-size:.8rem}.connection-card p{margin-top:3px;color:#775f45;font-size:.75rem;line-height:1.5}.settings-list{margin:16px 0}.settings-list div{display:flex;justify-content:space-between;gap:20px;padding:10px 0;border-bottom:1px solid #edf0f4;font-size:.75rem}.settings-list dt{color:var(--muted)}.settings-list dd{margin:0;font-weight:750;text-align:right}.permission-table td:not(:first-child),.permission-table th:not(:first-child){text-align:center}.permission{display:inline-grid;width:25px;height:25px;place-items:center;border-radius:50%;font-weight:900}.permission.yes{background:#e4f5ec;color:var(--green)}.permission.no{color:#a3afbc}

/* Business settings */
.brand-copy { min-width: 0; }
.brand-copy strong { max-width: 168px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark.has-logo { padding: 0; background: white; overflow: hidden; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.settings-surface { width: 100%; max-width: 1040px; }
.settings-heading { margin-bottom: 22px; }
.settings-profile-card, .settings-session-card { padding: 0; overflow: hidden; }
.settings-profile-card > .form-note { margin: 16px 26px 0; }
.settings-session-card { margin-top: 16px; }
.settings-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.settings-card-heading h2, .settings-card-heading p { margin: 0; }
.settings-card-heading h2 { font-size: 1.18rem; letter-spacing: -.025em; }
.settings-card-heading p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.saved-stamp { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #eef4ff; color: #285ca9; font-size: .75rem; font-weight: 750; }
.business-identity-row { display: flex; align-items: center; gap: 18px; margin: 24px 26px 2px; padding: 18px; border: 1px solid #dbe5f1; border-radius: 10px; background: #f7faff; }
.settings-logo-preview { width: 78px; height: 78px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid #d7e2ef; border-radius: 12px; background: white; color: var(--blue); box-shadow: 0 4px 12px rgba(20,32,51,.06); }
.settings-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-copy { min-width: 0; }
.logo-copy > strong { display: block; font-size: .94rem; }
.logo-copy > p { margin: 3px 0 11px; color: var(--muted); font-size: .82rem; }
.logo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.logo-actions .button { min-height: 38px; padding: 0 13px; background: white; }
.logo-actions .remove-logo-button { padding: 7px 2px; color: #a23d3d; }
.logo-actions > span { color: var(--muted); font-size: .75rem; }
.settings-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 24px 26px 26px; }
.settings-form-grid .span-2 { grid-column: 1 / -1; }
.settings-form-grid label { display: grid; gap: 7px; min-width: 0; color: #34445a; font-size: .875rem; font-weight: 750; }
.settings-form-grid label > span b { color: #c44848; }
.settings-form-grid input { width: 100%; min-height: 46px; border: 1px solid #cfd8e4; border-radius: 8px; padding: 10px 12px; background: white; color: var(--ink); font-size: .94rem; outline: none; transition: border-color .16s, box-shadow .16s; }
.settings-form-grid input:hover { border-color: #aebdce; }
.settings-form-grid input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,102,229,.11); }
.settings-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 26px; border-top: 1px solid var(--line); background: #f8fafc; }
.settings-save-bar p, .settings-save-bar strong, .settings-save-bar span { display: block; margin: 0; }
.settings-save-bar strong { font-size: .82rem; }
.settings-save-bar span { margin-top: 2px; color: var(--muted); font-size: .77rem; }
.settings-save-bar .button { min-width: 142px; }
.session-information { margin: 0; padding: 2px 26px 10px; }
.session-information > div { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e8edf2; }
.session-information > div:last-child { border-bottom: 0; }
.session-information dt { display: flex; align-items: center; gap: 12px; color: #34445a; font-size: .9rem; font-weight: 750; }
.session-information dt > span:last-child { display: grid; }
.session-information dt small { margin-top: 2px; color: var(--muted); font-size: .75rem; font-weight: 500; }
.session-information dd { margin: 0; color: var(--ink); font-size: .9rem; font-weight: 750; text-align: right; }
.session-icon { width: 38px; height: 38px; display: grid !important; place-items: center; border-radius: 9px; background: #eaf2ff; color: var(--blue); }
.session-icon.active { background: #e7f6ef; color: var(--green); }
.session-icon svg { width: 18px; height: 18px; }
.connection-active { display: inline-flex; align-items: center; gap: 7px; color: #11734f; }
.connection-active i { width: 8px; height: 8px; border-radius: 50%; background: #18a26e; box-shadow: 0 0 0 3px rgba(24,162,110,.13); }

/* Authentication, module catalog, and customer portal */
.login-body { background: #edf2f7; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(440px, 1.05fr); }
.login-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(34px, 5vw, 72px); color: white; background: var(--navy); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; width: fit-content; }
.login-brand > span:last-child { display: grid; }
.login-brand strong { font-size: 1rem; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.login-brand small { max-width: 370px; margin-top: 2px; color: #9eafc3; font-size: .75rem; }
.login-intro { position: relative; z-index: 1; max-width: 650px; margin-top: clamp(72px, 12vh, 140px); }
.login-intro h1 { margin: 13px 0 18px; font-size: clamp(2.45rem, 4.4vw, 4.45rem); line-height: .98; letter-spacing: -.055em; }
.login-intro > p:last-child { max-width: 590px; color: #adc0d4; font-size: .98rem; line-height: 1.7; }
.login-module-list { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin: auto 0 0; padding: 36px 0 0; list-style: none; }
.login-module-list li { display: flex; align-items: center; gap: 9px; color: #afbed0; font-size: .75rem; line-height: 1.3; }
.login-module-list span { width: 23px; height: 23px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: #70d3df; font-weight: 850; }
.login-form-panel { display: grid; place-items: center; padding: 42px; background: #f5f7fa; }
.login-card { width: min(470px, 100%); padding: clamp(28px, 4vw, 46px); border: 1px solid #dbe2ea; border-radius: 16px; background: white; box-shadow: 0 22px 60px rgba(16,34,58,.1); }
.login-card h2 { margin: 4px 0 7px; font-size: 2rem; letter-spacing: -.04em; }
.login-card > div:first-child > p:last-child { margin: 0 0 25px; color: var(--muted); font-size: .85rem; line-height: 1.55; }
.login-card > label { display: grid; gap: 7px; margin-top: 15px; color: #3b4b60; font-size: .78rem; font-weight: 780; }
.login-card > label input, .demo-access-note select { width: 100%; min-height: 46px; border: 1px solid #ccd6e1; border-radius: 8px; padding: 10px 12px; outline: none; background: white; color: var(--ink); }
.login-card > label input:focus, .demo-access-note select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,102,229,.11); }
.login-card > .button { margin-top: 22px; min-height: 48px; }
.demo-access-note { margin-top: 22px; padding: 16px; border: 1px solid #c9d9ee; border-radius: 10px; background: #f2f7ff; }
.demo-access-note strong { color: #27558d; font-size: .76rem; }
.demo-access-note p { margin: 4px 0 11px; color: #5e7190; font-size: .75rem; }
.demo-access-note code { color: #184f99; font-size: .75rem; }
.demo-access-note select { min-height: 40px; font-size: .75rem; }
.demo-access-note .text-button { margin-top: 9px; }
.login-security-note { margin: 18px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }
.login-card .flash { margin: 16px 0 3px; }
.logout-form { margin: 0; }
.sign-out-form { margin: 8px 0 0; }
.sign-out-form .nav-item { width: 100%; min-height: 44px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: .83rem; text-align: left; }
.sign-out-form .nav-item:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 2px; }
.sync-state:not(.demo) i { background: var(--green); box-shadow: 0 0 0 3px rgba(22,143,104,.15); }
.module-catalog { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.module-catalog-card { position: relative; min-height: 310px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 5px 16px rgba(20,32,51,.055); transition: transform .18s, box-shadow .18s, border-color .18s; }
.module-catalog-card:hover { transform: translateY(-3px); border-color: #b9cdf0; box-shadow: 0 14px 30px rgba(20,52,91,.1); }
.module-catalog-card.unavailable { cursor: not-allowed; opacity: .62; filter: grayscale(.18); }
.module-catalog-card.unavailable:hover { transform: none; border-color: var(--line); box-shadow: 0 5px 16px rgba(20,32,51,.055); }
.module-number { position: absolute; top: 18px; right: 20px; color: #a6b3c2; font-size: .75rem; font-weight: 850; }
.module-catalog-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: #e9f1ff; }
.module-catalog-card h2 { margin: 20px 0 9px; font-size: 1rem; line-height: 1.35; }
.module-catalog-card p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.55; }
.module-catalog-card small { margin-top: 14px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.module-catalog-card > strong { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 17px; color: var(--blue); font-size: .75rem; }
.module-catalog-card > strong svg { width: 14px; }
.portal-grid { display: grid; grid-template-columns: minmax(280px,.68fr) minmax(0,1.32fr); gap: 16px; }
.portal-grid > .portal-orders:last-child { grid-column: 1 / -1; }
.portal-profile h2 { margin: 2px 0 18px; }
.portal-profile dl { margin: 0; }
.portal-profile dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .75rem; }
.portal-profile dt { color: var(--muted); }
.portal-profile dd { margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.forbidden-panel { max-width: 680px; padding: 42px; text-align: center; }
.forbidden-panel > span { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; background: #edf3ff; color: var(--blue); }
.forbidden-panel h2 { margin: 0; }
.forbidden-panel p { margin: 8px auto 0; color: var(--muted); }
.password-panel { max-width: 720px; padding: 0; overflow: hidden; }
.account-link { display: block; margin: 8px 10px 0 55px; color: #8194ad; font-size: .75rem; }
.account-link:hover { color: white; }

/* Safe setup and deployment failure state */
.setup-required-body { min-height: 100vh; background: #edf2f7; }
.setup-required-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.setup-required-card { width: min(720px, 100%); padding: clamp(28px, 5vw, 52px); border: 1px solid #d8e0ea; border-radius: 14px; background: white; box-shadow: 0 24px 70px rgba(16,35,61,.13); }
.setup-required-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 16px; background: #fff0e7; color: #d65f13; font-size: 1.65rem; font-weight: 850; }
.setup-required-card h1 { margin: 4px 0 10px; color: #101d32; font-size: clamp(1.8rem, 4vw, 2.55rem); letter-spacing: -.035em; }
.setup-required-summary { max-width: 620px; margin: 0; color: #607089; line-height: 1.7; }
.setup-required-steps { margin-top: 28px; padding: 22px 24px; border: 1px solid #e1e7ef; border-radius: 10px; background: #f8fafc; }
.setup-required-steps h2 { margin: 0 0 12px; color: #1b2b42; font-size: 1rem; }
.setup-required-steps ol { margin: 0; padding-left: 20px; color: #53657d; }
.setup-required-steps li + li { margin-top: 9px; }
.setup-required-card code { color: #1e54b7; overflow-wrap: anywhere; }
.setup-required-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; color: var(--muted); font-size: .78rem; }
@media (max-width: 560px) { .setup-required-shell { padding: 14px; } .setup-required-footer { align-items: stretch; flex-direction: column; } .setup-required-footer .button { justify-content: center; } }

@media (max-width: 1180px) { .product-grid{grid-template-columns:1fr 1fr}.purchase-board{grid-template-columns:1fr 1fr}.directory-grid{grid-template-columns:1fr 1fr}.role-strip{grid-template-columns:repeat(3,1fr)}.module-catalog{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 1120px) { .metric-grid { grid-template-columns: 1fr 1fr; } .dashboard-grid { grid-template-columns: 1fr; } .stock-panel, .actions-panel { grid-column: auto; } }
@media (max-width: 780px) {
    .app-shell { display: block; } .sidebar { position: fixed; left: 0; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 45px rgba(5,15,30,.25); }
    .sidebar.open { transform: translateX(0); } .mobile-menu { display: grid; flex: 0 0 auto; }
    .topbar { height: 62px; padding: 0 14px; gap: 8px; } .global-search { width: auto; flex: 1; }
    .global-search kbd, .sync-state, .top-avatar { display: none; } .global-search input { padding-right: 10px; }
    .workspace { padding: 22px 16px 38px; } .page-heading { align-items: flex-start; flex-direction: column; }
    .heading-actions { width: 100%; } .heading-actions select, .heading-actions .button { flex: 1; }
    .metric-grid { grid-template-columns: 1fr 1fr; } .metric-card { min-height: 112px; padding: 15px; align-items: flex-start; }
    .metric-card strong { font-size: 1.25rem; }
    .stock-row { grid-template-columns: 1.5fr .9fr auto; } .stock-row > span:nth-child(3) { display: none; }
    .pos-layout,.report-grid,.ticket-board,.settings-grid,.portal-grid{grid-template-columns:1fr}.portal-grid > .portal-orders:last-child{grid-column:auto}.pos-cart{position:static;max-height:none;overflow:visible}.cart-footer{position:static;box-shadow:none}.inventory-banner{grid-template-columns:1fr 1fr}.directory-grid{grid-template-columns:1fr}.report-kpis{grid-template-columns:1fr}.report-filter{align-items:stretch;flex-direction:column}.report-filter label{min-width:0;flex-basis:auto}.role-strip{grid-template-columns:1fr 1fr}.ticket-response{grid-template-columns:1fr}.purchase-board{grid-template-columns:1fr 1fr}
    .login-shell { grid-template-columns: 1fr; }
    .login-brand-panel { min-height: auto; padding: 34px 28px; }
    .login-intro { margin-top: 58px; }
    .login-intro h1 { font-size: clamp(2.35rem, 9vw, 3.7rem); }
    .login-module-list { display: none; }
    .login-form-panel { padding: 34px 18px; }
    .settings-form-grid { grid-template-columns: 1fr; }
    .settings-form-grid .span-2 { grid-column: auto; }
}
@media (max-width: 520px) {
    .metric-grid { grid-template-columns: 1fr; } .metric-card { min-height: 96px; align-items: center; } .panel { padding: 17px; }
    .chart-summary, .panel-heading { align-items: flex-start; } .panel-heading { flex-direction: column; gap: 7px; } .positive { align-self: flex-start; } .legend { display: none; }
    .order-row { grid-template-columns: 34px minmax(0, 1fr); } .order-value { grid-column: 2; display: flex; align-items: center; justify-content: space-between; text-align: left; } .badge { margin: 0 !important; }
    .stock-row { grid-template-columns: 1fr auto; } .stock-level { grid-column: 1 / -1; order: 3; } .quick-grid { grid-template-columns: 1fr; }
    .product-grid,.purchase-board,.inventory-banner,.role-strip,.module-catalog{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.module-toolbar{align-items:stretch;flex-direction:column}.timeline-list article{grid-template-columns:35px 1fr}.timeline-list>article>small{grid-column:2;text-align:left}.ticket-meta{grid-template-columns:1fr}
    #ticketItems { max-height: 40vh; }
    .module-catalog-card { min-height: 260px; }
    .login-brand-panel { padding: 28px 20px; }
    .login-brand small { max-width: 250px; }
    .login-intro { margin-top: 45px; }
    .login-intro > p:last-child { font-size: .88rem; }
    .login-form-panel { padding: 24px 12px; }
    .login-card { padding: 25px 20px; }
    .settings-card-heading, .business-identity-row, .settings-save-bar { align-items: flex-start; flex-direction: column; }
    .settings-card-heading { padding: 20px 18px 17px; }
    .settings-profile-card > .form-note { margin-inline: 18px; }
    .business-identity-row { margin: 18px 18px 0; padding: 15px; }
    .settings-form-grid { padding: 20px 18px; gap: 15px; }
    .settings-save-bar { padding: 17px 18px; }
    .settings-save-bar .button { width: 100%; }
    .session-information { padding: 0 18px 8px; }
    .session-information > div { align-items: flex-start; flex-direction: column; gap: 9px; padding: 15px 0; }
    .session-information dd { padding-left: 50px; text-align: left; }
}
.report-output .report-page-notice { display: none; }
@page report-output {
    size: A4 portrait;
    margin: 14mm 12mm 16mm;
    @bottom-center { content: "Page " counter(page) " of " counter(pages); font: 9px Arial, sans-serif; color: #526172; }
}
@media print {
    .sidebar,.topbar,.no-print,.flash,.toast-region{display:none!important}.app-shell{display:block}.workspace{max-width:none;padding:0}.print-only{display:block}.panel,.report-kpis article{box-shadow:none;break-inside:avoid}.report-kpis article{color:#000;background:#fff}.report-kpis span,.report-kpis small{color:#555}.report-grid{grid-template-columns:1fr 1fr}.data-table th,.data-table td{padding:8px}.report-heading{margin-bottom:20px}.report-heading h1{margin-bottom:2px}.report-heading p{margin:0;color:#555}
    html, body, .app-shell, .main-column, .workspace { background: #fff !important; }
    body:has(.report-output) { background: #fff; }
    .report-output { page: report-output; color: #172536; font: 11px/1.45 Arial, Helvetica, sans-serif; }
    .report-output .report-heading { break-inside: avoid; }
    .report-output .report-heading h1 { font-size: 20px; line-height: 1.25; }
    .report-output .report-heading p { font-size: 10px; overflow-wrap: anywhere; }
    .report-output .report-heading .report-project-title { margin-bottom: 6px; font-size: 9px; }
    .report-output .report-heading .report-print-notice { margin-top: 8px; font-size: 9px; font-weight: 700; }
    .report-output .report-page-notice { display: table-row; }
    .report-output .report-page-notice td { padding: 8px 6px; text-align: center; font-size: 9px; font-weight: 700; }
    .report-output .panel { break-inside: auto; overflow: visible; }
    .report-output .panel-heading { break-after: avoid; }
    .report-output .data-table-wrap { overflow: visible; }
    .report-output .data-table { table-layout: fixed; width: 100%; font-size: 10px; }
    .report-output .data-table thead th:nth-child(2) { width: 30%; }
    .report-output .data-table th, .report-output .data-table td { padding: 6px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
    .report-output .data-table th { font-size: 9px; }
    .report-output .data-table thead { display: table-header-group; }
    .report-output .data-table tfoot { display: table-footer-group; }
    .report-output .data-table tr { break-inside: avoid; }
    .report-output .data-table .status { display: inline-block; max-width: 100%; white-space: normal; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Product records, filters, and master-data forms */
.product-record-detail { margin-bottom: 22px; }
.product-record-description { margin: 0 0 22px; color: var(--muted); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.product-record-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin: 0 0 22px; }
.product-record-facts > div { min-width: 0; }
.product-record-facts dt { margin-bottom: 7px; color: var(--muted); font-size: .75rem; font-weight: 650; }
.product-record-facts dd { margin: 0; color: var(--ink); font-size: .9rem; font-weight: 650; overflow-wrap: anywhere; }
.product-record-actions, .product-row-actions, .product-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.product-record-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.product-record-filters label { display: grid; flex: 1 1 150px; min-width: 0; gap: 6px; color: #43536a; font-size: .75rem; font-weight: 750; }
.product-record-filters .product-search-field { flex: 2 1 240px; }
.product-record-filters input, .product-record-filters select { width: 100%; min-width: 0; height: 41px; padding: 9px 11px; border: 1px solid #d5dde7; border-radius: 7px; background: white; color: var(--ink); outline: none; }
.product-record-filters input:focus, .product-record-filters select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,102,229,.1); }
.product-record-table td:first-child { min-width: 190px; max-width: 320px; white-space: normal; overflow-wrap: anywhere; }
.product-record-table td:nth-child(2) { max-width: 180px; white-space: normal; overflow-wrap: anywhere; }
.product-record-table .product-row-actions { flex-wrap: nowrap; }
.product-record-modal { width: min(720px, calc(100vw - 28px)); }
.product-record-modal .form-grid label { min-width: 0; }
.product-record-modal .form-grid label small { color: var(--muted); font-size: .75rem; font-weight: 450; line-height: 1.5; }
.product-reference-picker { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.product-reference-picker summary { color: var(--ink); font-size: .8rem; font-weight: 650; cursor: pointer; }
.product-reference-picker label { margin-top: 14px; }
.product-reference-picker .catalog-reference-note { margin-bottom: 0; }
.product-form-errors { margin-top: 18px; padding: 14px 16px; border: 1px solid #e9b8b8; border-radius: 8px; background: #fff4f4; color: #9e2929; font-size: .82rem; }
.product-form-errors ul { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 780px) {
    .product-record-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-record-filters label, .product-record-filters .product-search-field { flex-basis: calc(50% - 12px); }
}
@media (max-width: 520px) {
    .product-record-facts { grid-template-columns: 1fr; gap: 16px; }
    .product-record-filters { padding: 14px; }
    .product-record-filters label, .product-record-filters .product-search-field { flex-basis: 100%; }
    .product-filter-actions { width: 100%; }
    .product-filter-actions .button { flex: 1; }
    .product-record-modal form { padding: 18px; }
}


/* Components used by the role sidebar, top bar, bell, confirmation dialog and paged lists
   (finishing spec 3.1–3.5, 4.1, 4.5). Brand colours and the existing type scale are unchanged. */
.breadcrumb-trail { margin: 0 0 4px; font-size: .78rem; color: var(--muted); }
.sidebar-organized .brand { align-items: center; }
.sidebar-organized .brand-copy strong { font-size: .95rem; line-height: 1.3; white-space: nowrap; }
.nav-group-label { margin: 14px 12px 4px; font-size: .75rem; font-weight: 500; color: #8496aa; }
.sidebar-organized .nav-item b { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: #fff; font-size: .75rem; text-align: center; }
.sidebar-foot .nav-item-quiet { min-height: 34px; font-size: .8rem; color: #aebdd0; }
.sidebar-foot .nav-item-quiet.active { color: #fff; }
.global-search-field { position: relative; }
.global-search-field .search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.global-search-field .search-clear[hidden] { display: none; }
.global-search-field .search-clear svg { width: 14px; height: 14px; }
.global-search-field input::-webkit-search-cancel-button { display: none; }
.topbar-spacer { flex: 1; }
.notification-list a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.notification-list a strong { display: block; font-size: .85rem; }
.notification-list a small { color: var(--muted); font-size: .78rem; }
.notification-empty { color: var(--muted); font-size: .85rem; padding: 12px 0; }
.flash { grid-template-columns: 1fr auto; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.filter-bar label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; }
.filter-bar .reset-link { align-self: center; display: inline-block; padding: 3px 0; font-size: .8rem; text-decoration: underline; }
.filter-bar input, .filter-bar select { min-height: 32px; padding: 2px 8px; }
.report-presets a, .registration-card > a { display: inline-block; padding: 3px 0; }
.table-summary { margin: 0 0 8px; font-size: .82rem; color: var(--muted); }
.table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 0; font-size: .8rem; color: var(--muted); }
.pagination-links { display: flex; gap: 8px; align-items: center; }
.pagination-links a, .pagination-links span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pagination-links span[aria-disabled] { opacity: .5; }
.empty-row { color: var(--muted); text-align: center; padding: 24px !important; }
.doc-number { white-space: nowrap; }
.heading-action-form { display: inline-flex; margin: 0; }
.sale-cancelled-note { display: grid; gap: 4px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid #f0b4ab; border-left: 4px solid #b42318; border-radius: 8px; background: #fff5f3; color: #5f1d14; font-size: .9rem; }
.button.danger-filled { color: #fff; background: #b42318; border-color: #b42318; }
dialog.confirm-dialog { max-width: 460px; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
dialog.confirm-dialog:not([open]) { display: none; }
dialog.confirm-dialog.sale-review { max-width: 640px; }
/* Warning before automatic sign-out. Hidden parts stay hidden although .button sets a display value. */
dialog.session-warning [hidden] { display: none !important; }
dialog.session-warning .session-warning-time { font-variant-numeric: tabular-nums; color: var(--muted); }
.sale-review-scroll { max-height: min(40vh, 320px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.sale-review-lines { width: 100%; border-collapse: collapse; font-size: .875rem; }
.sale-review-lines th { position: sticky; top: 0; background: #f4f7fa; color: #43536a; font-size: .78rem; text-align: left; }
.sale-review-lines th, .sale-review-lines td { padding: 8px 10px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.sale-review-lines tbody tr:last-child td { border-bottom: 0; }
.sale-review-lines .number { text-align: right; white-space: nowrap; }
.sale-review-summary { display: grid; gap: 6px; margin: 14px 0 12px; }
.sale-review-summary div { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.sale-review-summary dt { color: #5f6f84; font-weight: 600; } .sale-review-summary dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.sale-review-summary .sale-review-total { margin-top: 4px; padding-top: 10px; border-top: 1px dashed #ced7e1; font-size: 1.15rem; }
.sale-review-summary .sale-review-total dt { color: #1c2b41; }
/* On a narrow phone the review keeps product, quantity and amount; the unit price is already in the cart. */
@media (max-width: 520px) { dialog.confirm-dialog.sale-review { padding: 16px; } .sale-review-lines th:nth-child(3), .sale-review-lines td:nth-child(3) { display: none; } .sale-review-lines th, .sale-review-lines td { padding: 8px 6px; } .sale-review-lines td:first-child { overflow-wrap: anywhere; } }
dialog.confirm-dialog h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; }
dialog.confirm-dialog p { font-size: .88rem; margin: 0 0 12px; }
dialog.confirm-dialog label { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; }
dialog.confirm-dialog .field-error { color: #a12a2a; font-size: .78rem; font-weight: 500; }
dialog.confirm-dialog .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
dialog.confirm-dialog::backdrop { background: rgba(15, 23, 32, .45); }
.cart-change { margin: 4px 0 8px; font-size: .9rem; font-weight: 600; color: #13603f; }
.cart-change.is-short { color: #a12a2a; }
.pos-cart-jump { display: none; }
@media (max-width: 900px) { .pos-cart-jump { display: flex; gap: 6px; position: sticky; bottom: 12px; z-index: 30; justify-content: center; margin: 12px 0; padding: 12px 16px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.18); } }

/* Role pages: readable records and consistent action groups (2026-11-10). */
.page-heading { align-items: flex-start; gap: 1rem; }
.page-heading h1, .panel-heading h2, .person-cell strong { overflow-wrap: anywhere; }
.product-row-actions, .product-record-actions { flex-wrap: wrap; gap: .5rem; }
.registration-review-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; width: min(100%, 30rem); align-items: end; }
.decision-reason { display: grid; grid-column: 1 / -1; gap: .3rem; font-size: .85rem; }
.decision-reason input, .account-unlock-form input { width: 100%; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 5px; padding: .5rem; background: #fff; color: inherit; }
.account-unlock-form { display: grid; gap: .5rem; max-width: 24rem; }
.account-unlock-form label { display: grid; gap: .3rem; }
.field-error { color: #a12a2a; overflow-wrap: anywhere; }
.portal-cancel-form { display: grid; gap: .5rem; max-width: 24rem; }
.portal-cancel-form label { display: grid; gap: .3rem; }
.portal-cancel-form textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 5px; padding: .5rem; font: inherit; }
.data-table .status, .record-detail .status, .ticket-board .status, .registration-requests > .panel-heading .status { background: transparent; color: inherit; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.data-table .status::before, .ticket-board .status::before { display: none; }
@media (max-width: 600px) {
    .registration-request { min-width: 0; }
    .registration-review-actions { width: 100%; }
    .registration-review-actions .button { white-space: normal; min-height: 44px; }
    .page-heading > .button { align-self: flex-start; }
    .modal-actions { flex-wrap: wrap; }
    .role-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .role-strip article { min-width: 0; }
    .role-strip strong { overflow-wrap: anywhere; }
    #usersTable, #usersTable tbody, #usersTable tr { display: block; width: 100%; min-width: 0; }
    #usersTable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    #usersTable tr { padding: 1rem; border-bottom: 1px solid var(--line); }
    #usersTable td { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .5rem; padding: .4rem 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    #usersTable td::before { content: attr(data-label); font-size: .8rem; font-weight: 600; }
    #usersTable td[data-label="Actions"] { display: block; }
    #usersTable td[data-label="Actions"]::before { display: block; margin-bottom: .5rem; }
    #usersTable .button { min-height: 44px; padding: .6rem .75rem; }
    #usersTable .person-cell { min-width: 0; align-items: flex-start; }
    #usersTable .person-cell > div { min-width: 0; }
    #usersTable .person-cell strong, #usersTable .person-cell small { display: block; white-space: normal; overflow-wrap: anywhere; }
    .portal-orders-table, .portal-orders-table tbody, .portal-orders-table tr { display: block; width: 100%; min-width: 0; }
    .portal-orders-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .portal-orders-table tr { padding: 1rem; border-bottom: 1px solid var(--line); }
    .portal-orders-table td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem; padding: .4rem 0; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
    .portal-orders-table td::before { content: attr(data-label); font-size: .8rem; font-weight: 600; }
    .portal-orders-table td[data-label="Actions"] { display: block; }
    .portal-orders-table td[data-label="Actions"]::before { display: block; margin-bottom: .5rem; }
    .portal-orders-table .inline-action { display: grid; gap: .75rem; }
    .portal-orders-table .button { min-height: 44px; white-space: normal; }
}

/* Functional workspace: actions first, readable status and full record subjects. */
.dashboard-workspace, .dashboard-activity { display: grid; gap: 20px; min-width: 0; }
.workspace-heading { margin-bottom: 0; align-items: flex-start; }
.workspace-heading h1 { font-size: clamp(1.7rem, 2.5vw, 2.1rem); letter-spacing: -.02em; }
.workspace-heading p { max-width: 65ch; color: #435469; font-size: 1rem; line-height: 1.6; }
.workspace-refresh { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; flex-shrink: 0; }
.workspace-refresh > span { font-size: .875rem; color: #435469; }
.workspace-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.workspace-section-heading h2 { margin: 0; font-size: 1.125rem; line-height: 1.4; font-weight: 600; }
.workspace-section-heading > span, .workspace-section-heading a { font-size: .875rem; }
.workspace-section-heading a { display: inline-flex; align-items: center; min-height: 44px; }
.workspace-section-heading > span { color: #435469; }
.workspace-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.workspace-action { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.8fr) 3rem; align-items: center; gap: 1rem; min-height: 52px; padding: .75rem 0; border-top: 1px solid var(--line); }
.workspace-action strong { font-size: 1rem; font-weight: 600; }
.workspace-action > span:not(.action-word) { font-size: .9375rem; color: #435469; }
.action-word { font-size: .875rem; color: var(--blue-dark); font-weight: 600; text-align: right; }
.workspace-action:hover strong, .dashboard-record:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.workspace-action:hover, .dashboard-record:hover, .status-overview a:hover { background: #f8fafc; }
.status-overview { margin: 0; }
.status-overview-row { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.5fr); align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: .75rem 0; }
.status-overview-row dt { font-size: 1rem; font-weight: 600; }
.status-overview-row dd { margin: 0; min-width: 0; }
.status-overview-row a { display: grid; grid-template-columns: minmax(4rem, .6fr) minmax(0, 2fr) 3rem; align-items: center; gap: 1rem; min-height: 44px; }
.status-overview-row strong { font-size: 1.5rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.status-overview-row a > span:not(.action-word) { font-size: .9375rem; color: #435469; }
.dashboard-records { list-style: none; padding: 0; margin: 0; }
.dashboard-record { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, auto) 3rem; gap: 1.5rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); }
.dashboard-record-identity { display: grid; gap: .35rem; min-width: 0; }
.dashboard-record-identity strong { font-size: 1rem; line-height: 1.5; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.dashboard-record-identity > span { color: #435469; font-size: .9375rem; line-height: 1.5; }
.dashboard-record-value { font-size: .9375rem; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.workspace-total { font-size: 1.5rem; font-weight: 600; }
.workspace-total > span { color: #435469; font-size: .9375rem; font-weight: 400; }
.button { font-size: .875rem; font-weight: 600; }
.dashboard-workspace .panel, .dashboard-activity .panel { padding: 24px; box-shadow: none; }
.portal-grid { margin-top: 20px; }
body[data-role="Customer"] .workspace-actions { margin-bottom: 20px; }
.settings-surface { max-width: 1120px; }
.settings-surface p, .settings-surface dt, .settings-surface dd { font-size: 1rem; line-height: 1.6; }
.settings-surface small { font-size: .875rem; color: #435469; }
@media (max-width: 780px) {
    .workspace-heading, .workspace-section-heading { flex-wrap: wrap; }
    .workspace-refresh { align-items: flex-start; flex-shrink: 1; }
    .workspace-action { grid-template-columns: minmax(0, 1fr) 3rem; gap: .35rem 1rem; }
    .workspace-action > span:not(.action-word) { grid-column: 1; }
    .workspace-action .action-word { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    .status-overview-row { grid-template-columns: 1fr; gap: .4rem; }
    .status-overview-row a { grid-template-columns: minmax(3rem, auto) minmax(0, 1fr) 2.5rem; gap: .75rem; }
    .dashboard-record { grid-template-columns: minmax(0, 1fr) 3rem; gap: .5rem 1rem; }
    .dashboard-record-value { grid-column: 1; text-align: left; }
    .dashboard-record .action-word { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    .dashboard-workspace .panel, .dashboard-activity .panel { padding: 18px; }
}

/* Settings expose real account and delivery state, with eligible audited actions. */
.settings-workspace { display: grid; gap: 20px; max-width: 1120px; }
.settings-workspace .panel { padding: 24px; box-shadow: none; }
.settings-workspace p { color: #435469; font-size: 1rem; line-height: 1.6; }
.settings-details { margin: 1rem 0; }
.settings-details > div { display: grid; grid-template-columns: 12rem minmax(0,1fr); gap: 1rem; border-top: 1px solid var(--line); padding: .75rem 0; }
.settings-details dt { font-weight: 600; }
.settings-details dd { margin: 0; overflow-wrap: anywhere; }
.notification-counts { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; border-block: 1px solid var(--line); padding: 1rem 0; margin: 1.5rem 0; }
.notification-counts div { display: flex; align-items: baseline; gap: .75rem; }
.notification-counts dt { color: #435469; font-weight: 400; }
.notification-counts dd { font-size: 1.4rem; font-weight: 600; margin: 0; }
.notification-list { padding: 0; list-style: none; }
.notification-list > li { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.notification-list h4 { font-size: 1rem; margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.compact-details > div { padding: .35rem 0; border: 0; }
.notification-problem { overflow-wrap: anywhere; }
.notification-retry-form { display: grid; gap: .75rem; max-width: 36rem; }
.notification-retry-form label { display: grid; gap: .35rem; font-weight: 600; }
.notification-retry-form input { min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: .6rem; width: 100%; }
.notification-retry-form .button { justify-self: start; }
@media (max-width: 600px) { .settings-workspace .panel { padding: 18px; } .settings-details > div { grid-template-columns: 1fr; gap: .3rem; } }

/* Account identity and role filters: separate facts, clear selected state. */
.person-cell { align-items: flex-start; min-width: 0; }
.person-cell > div { display: grid; gap: 4px; min-width: 0; }
.person-cell strong, .person-cell small { display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.person-cell strong { font-size: .9375rem; font-weight: 600; }
.person-cell small { font-size: .875rem; color: #435469; }
#usersTable { font-size: .9375rem; }
#usersTable td { vertical-align: middle; }
#usersTable td:first-child { min-width: 13rem; }
.account-role-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0 12px; }
.account-role-filters a { display: grid; align-content: center; gap: 4px; min-height: 76px; padding: 12px 16px; border: 1px solid #c8d6e5; border-left: 4px solid #54779b; border-radius: 8px; background: #eaf1f8; color: #203b58; }
.account-role-filters strong { font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.account-role-filters span { font-size: .875rem; }
.account-role-filters a:hover { border-color: #8badd0; background: #dfeaf6; }
.account-role-filters a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--blue); font-weight: 700; background: #ffeedf; border-color: #dc9d6d; border-left-color: var(--blue); color: #713007; }
.account-filter-help { font-size: .9375rem; color: #435469; margin-bottom: 18px; }
.users-list-panel { border-top: 4px solid #315f87; scroll-margin-top: 90px; }
.users-list-panel > .workspace-section-heading { background: #eaf1f8; border-radius: 5px; padding: 12px 14px; }
@media (min-width: 1500px) { .account-role-filters { grid-template-columns: repeat(6,minmax(0,1fr)); } }
@media (max-width: 600px) {
    .account-role-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .account-role-filters a { padding: 12px; }
}

/* Settings reference: one white surface, compact facts and understated section links. */
.settings-clean { max-width: 1160px; background: #fff; border: 1px solid #e2e6eb; border-radius: 6px; padding: 24px 28px; gap: 0; color: #17212e; }
.settings-clean .page-heading { margin-bottom: 16px; }
.settings-clean .page-heading h1 { font-size: 1.75rem; letter-spacing: -.025em; }
.settings-clean p { font-size: .9375rem; color: #47515f; line-height: 1.6; }
.settings-clean .workspace-refresh { max-width: 22rem; font-size: .8125rem; }
.settings-clean-nav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 22px; padding: 0; margin: 0 0 6px; border-bottom: 1px solid #dce1e7; background: #fff; }
.settings-clean-nav a { display: flex; align-items: center; min-height: 46px; padding: 10px 2px; border-bottom: 2px solid transparent; color: #273240; font-size: .9375rem; font-weight: 600; }
.settings-clean-nav a:hover { color: #1457a6; border-bottom-color: #9cb6d5; }
.settings-clean-nav a:focus-visible { outline: 2px solid #1457a6; outline-offset: 3px; }
.settings-clean:not(:has(:target)) .settings-clean-nav a:first-child,
.settings-clean:has(#accountSettingsHeading:target) .settings-clean-nav a[href="#accountSettingsHeading"],
.settings-clean:has(#businessDetailsHeading:target) .settings-clean-nav a[href="#businessDetailsHeading"],
.settings-clean:has(#emailStatusTitle:target) .settings-clean-nav a[href="#emailStatusTitle"] { border-bottom-color: #26394e; color: #101923; }
.settings-clean .panel { padding: 24px 0; margin: 0; border: 0; border-bottom: 1px solid #e2e6eb; border-radius: 0; background: #fff; box-shadow: none; }
.settings-clean .panel:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-clean .workspace-section-heading { gap: 16px; margin-bottom: 14px; }
.settings-clean h2 { font-size: 1.0625rem; line-height: 1.5; font-weight: 600; scroll-margin-top: 100px; }
.settings-clean h3 { font-size: 1rem; font-weight: 600; margin: 22px 0 12px; }
.settings-clean .button { min-height: 40px; font-weight: 600; border-radius: 5px; }
.settings-clean .button.primary { color: #1457a6; border-color: #cfd9e4; background: #fff; }
.settings-clean .button.primary:hover { background: #f2f6fb; border-color: #92b0d2; }
.settings-clean .settings-details { margin: 12px 0 18px; font-size: .9375rem; }
.settings-clean .settings-details > div { grid-template-columns: minmax(150px,200px) minmax(0,1fr); padding: 12px 0; border-color: #e8ebef; }
.settings-clean .settings-details dt { color: #364151; font-weight: 500; }
.settings-clean .settings-details dd { color: #17212e; }
.settings-clean .notification-counts { gap: 16px 30px; margin: 18px 0; padding: 14px 0; font-size: .9375rem; border-color: #e2e6eb; }
.settings-clean .notification-counts dd { font-size: 1.125rem; }
.settings-clean .notification-list > li { padding: 18px 0; border-color: #e2e6eb; }
.settings-clean .notification-list .workspace-section-heading { margin-bottom: 8px; }
.settings-clean .notification-list .workspace-section-heading strong { font-size: .875rem; font-weight: 600; }
.settings-clean .notification-list h4 { font-size: .9375rem; }
.settings-clean .compact-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 10px 0 0; }
.settings-clean .compact-details > div { display: block; padding: 0; border: 0; }
.settings-clean .compact-details dt { margin-bottom: 4px; font-size: .8125rem; color: #596472; }
.settings-clean .compact-details dd { font-size: .875rem; }
@media (max-width: 600px) {
    .settings-clean { padding: 18px 16px; }
    .settings-clean .panel { padding: 20px 0; }
    .settings-clean-nav { gap: 0 18px; }
    .settings-clean-nav a { font-size: .875rem; }
    .settings-clean .settings-details > div { grid-template-columns: 1fr; gap: 5px; }
    .settings-clean .compact-details { grid-template-columns: 1fr; gap: 10px; }
    .settings-clean .notification-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
}

/* Touch comfort. On phone-width screens every control is at least 40 px high (the WCAG 2.2 minimum of 24 px is
   met at every width; 40 px is the comfortable size for a thumb). Desktop sizes are unchanged. */
@media (max-width: 640px) {
    .button, .button.compact, .text-button, .icon-button, .inline-action select, .filter-bar input, .filter-bar select,
    .purchase-card .compact-field input, .workspace select, .workspace input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
    dialog select, dialog input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) { min-height: 40px; }
    .modal-head button { width: 40px; height: 40px; }
    .cart-controls button { min-width: 40px; height: 40px; }
    .cart-controls input { height: 40px; }
    .sidebar-close, .flash button { min-width: 40px; min-height: 40px; }
    summary { padding-top: 10px; padding-bottom: 10px; }
    .filter-bar .reset-link, .report-presets a, .registration-card > a { padding-top: 11px; padding-bottom: 11px; }
    .pagination-links a { display: inline-block; padding: 10px 6px; }
    .project-footer a { padding-top: .7rem; padding-bottom: .7rem; }
}
/* Audit log: recent sign-ins, activity views and date shortcuts. */
.audit-signins .panel-heading { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.audit-signin-links { display: flex; gap: 8px; flex-wrap: wrap; }
.audit-signin-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.audit-signin-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.audit-signin-list li:last-child { border-bottom: 0; }
.audit-signin-list .status { justify-self: start; }
.audit-signin-role { color: var(--muted); font-size: .8125rem; }
.audit-signin-list time { color: #34445a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit-views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.audit-views a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: #34445a; font-size: .8125rem; font-weight: 650; text-decoration: none; }
.audit-views a[aria-current="page"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.audit-presets { margin: -4px 0 10px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: .8125rem; }
.audit-presets a[aria-current="true"] { font-weight: 750; }
#auditTable td small { display: block; color: var(--muted); }
.audit-pages { justify-content: flex-end; margin-top: 12px; }
@media (max-width: 640px) {
    .audit-signin-list li { grid-template-columns: 88px minmax(0, 1fr); }
    .audit-signin-list time, .audit-signin-role { grid-column: 2; }
}

/* Sale cart: walk-in buyer details (optional, printed on the receipt only) and a saved customer's stored details. */
.pos-buyer { display: grid; gap: 11px; min-width: 0; margin: 0; padding: 12px; border: 1px solid #d5dde7; border-radius: 8px; }
.pos-buyer[hidden] { display: none; }
.pos-buyer legend { padding: 0 6px; color: var(--ink); font-size: .875rem; font-weight: 750; }
.pos-buyer .form-note { margin: 0; }
.checkout-form .pos-buyer label small { color: var(--muted); font-size: .75rem; font-weight: 450; line-height: 1.5; }
.pos-saved-customer { padding: 10px 12px; border: 1px solid #d5dde7; border-radius: 8px; background: #f7f9fc; }
.pos-saved-customer > p { margin: 0 0 6px; color: var(--ink); font-size: .875rem; font-weight: 750; }
.pos-saved-customer dl { display: grid; gap: 4px; margin: 0; }
.pos-saved-customer dl div { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 8px; }
.pos-saved-customer dt { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.pos-saved-customer dd { margin: 0; overflow-wrap: anywhere; font-size: .875rem; }

/* New sale: products as list rows, in the same order and grouping as the public catalog. */
.pos-catalog { container-type: inline-size; container-name: poscatalog; }
.pos-rows { border-top: 1px solid var(--line); }
.pos-rows .pos-group { margin: 18px 0 0; padding: 0 0 6px; border-bottom: 1px solid var(--line); color: #1c2b41; font-size: .95rem; font-weight: 800; }
.pos-rows .pos-group:first-child { margin-top: 10px; }
.pos-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e8edf3; }
.pos-row[hidden] { display: none; }
.pos-row-image { width: 48px; height: 48px; object-fit: contain; }
.pos-row-name { min-width: 0; }
.pos-row-category { margin: 0 0 2px; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.pos-row h3 { margin: 0 0 3px; font-size: .92rem; line-height: 1.35; }
.pos-row-spec { margin: 0 0 3px; color: var(--muted); font-size: .8rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pos-row-sku { margin: 0; color: var(--muted); font-size: .75rem; }
.pos-row-price strong { display: block; font-size: .98rem; }
.pos-row-price span { display: block; color: var(--muted); font-size: .78rem; }
.pos-row-stock { margin: 0; font-size: .82rem; font-weight: 700; }
.pos-row-action { display: grid; gap: 4px; }
.pos-row-action .button { width: 100%; }
.pos-row-action small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
/* Narrow catalog column (phone or a wide cart): name first, then price, stock and the button below it. */
.pos-row-image { width: 40px; height: 40px; }
.pos-row-price, .pos-row-stock, .pos-row-action { grid-column: 2; }
.pos-row-price { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.pos-row-price strong { display: inline; }
@container poscatalog (min-width: 520px) {
    .pos-row { grid-template-columns: 48px minmax(0, 1fr) 118px; gap: 8px 14px; }
    .pos-row-image { width: 48px; height: 48px; }
    .pos-row-price { grid-column: 3; display: block; }
    .pos-row-price strong { display: block; }
    .pos-row-stock, .pos-row-action { grid-column: 2 / -1; }
    .pos-row-action { grid-template-columns: minmax(0, 200px) 1fr; align-items: center; }
}
@container poscatalog (min-width: 820px) {
    .pos-row { grid-template-columns: 48px minmax(0, 1fr) 118px 132px 140px; }
    .pos-row-stock { grid-column: 4; }
    .pos-row-action { grid-column: 5; grid-template-columns: 1fr; }
}

/* Record lists: sortable column headings, the count line and the page size. */
.data-table th .sort-link { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; color: inherit; font: inherit; text-decoration: none; white-space: nowrap; }
.data-table th .sort-link:hover, .data-table th .sort-link:focus-visible { text-decoration: underline; }
.data-table th[aria-sort="ascending"] .sort-link, .data-table th[aria-sort="descending"] .sort-link { color: var(--ink); }
.data-table th.number .sort-link { justify-content: flex-end; }
.list-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 10px; }
.list-status .table-summary { margin: 0; }
.list-size label { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.list-size select { min-height: 32px; padding: 2px 8px; }
.list-presets { margin: -6px 0 10px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: .8125rem; }
.list-presets a[aria-current="true"] { font-weight: 750; }

/* Reports: tabs, description, date shortcuts as buttons, row headings in breakdown tables. */
.report-tabs { margin-bottom: 8px; }
.report-description { margin: 0 0 12px; color: #43536a; max-width: 80ch; }
.report-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.report-presets span { color: #43536a; font-size: .8125rem; font-weight: 700; }
.report-presets a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #34445a; font-size: .8125rem; font-weight: 650; text-decoration: none; }
.report-presets a[aria-current="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.report-coverage-note { margin: 0 0 14px; color: #34445a; font-size: .875rem; }
.report-section .panel-heading p { margin: 4px 0 0; color: #5d6c80; font-size: .8125rem; }
.report-table tbody th { color: #172536; background: transparent; font-size: .875rem; letter-spacing: 0; text-transform: none; font-weight: 650; white-space: normal; }
.report-table td, .report-table tbody th { white-space: normal; }
.report-table td.number, .report-table th.number { white-space: nowrap; }

/* Report visual summaries, split share layout, focused customer banner, and transaction detail header. */
.report-customer-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 0 0 14px; padding: 16px 20px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 9px; background: #fff; }
.report-customer-banner h2 { margin: 2px 0 3px; font-size: 1.08rem; color: var(--ink); }
.report-customer-banner p { margin: 0; color: var(--muted); font-size: .8125rem; }
.report-banner-eyebrow, .report-detail-eyebrow { margin: 0 0 2px !important; color: var(--blue) !important; font-size: .72rem !important; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.report-detail-summary { margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink) !important; font-size: .8125rem !important; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-section-split { display: grid; grid-template-columns: 310px minmax(0, 1fr); align-items: start; gap: 18px; }
.report-split-table { min-width: 0; }
.report-chart { margin: 0 0 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.report-section-split > .report-chart { margin: 0; }
.report-chart svg { display: block; width: 100%; height: auto; fill: none; stroke: none; stroke-width: 0; stroke-linecap: butt; stroke-linejoin: miter; }
.report-chart figcaption { margin: 0; color: var(--ink); font-size: .8125rem; font-weight: 750; }
.report-chart-sub { margin: 2px 0 0; color: var(--muted); font-size: .75rem; }
.report-chart-share { display: grid; gap: 12px; }
.report-pie-head { display: grid; gap: 1px; }
.report-chart-pie { width: 164px; height: 164px; margin: 2px auto; }
.report-chart-pie svg { width: 164px; height: 164px; }
.report-pie-slice { stroke: #ffffff; stroke-width: 1.5; stroke-linejoin: round; transition: opacity .15s ease; }
.report-pie-slice:hover { opacity: .88; }
.report-pie-label { fill: #ffffff; stroke: none; stroke-width: 0; font-size: 10.5px; font-weight: 800; font-family: inherit; pointer-events: none; }
.report-chart-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid #edf1f6; }
.report-chart-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid #edf1f6; font-size: .79rem; color: var(--ink); }
.report-chart-legend li:last-child { border-bottom: 0; padding-bottom: 0; }
.report-chart-legend li span { min-width: 0; overflow-wrap: anywhere; }
.report-chart-legend li strong { font-variant-numeric: tabular-nums; font-weight: 750; white-space: nowrap; }
.report-chart-legend li small { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.report-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; align-self: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.report-swatch.c1 { background: var(--blue); }
.report-swatch.c2 { background: var(--navy); }
.report-swatch.c3 { background: var(--green); }
.report-swatch.c4 { background: #d97706; }
.report-swatch.c5 { background: #2b6cb0; }
.report-swatch.c6 { background: #6b4c9a; }
.report-swatch.other { background: #94a3b8; }
.report-chart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #edf1f6; }
.report-chart-series { display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 0; }
.report-chart-series li { display: inline-flex; align-items: baseline; gap: 6px; padding: 0; border-bottom: 0; }
.report-chart-series li small { min-width: 0; text-align: left; }
.report-chart-stat, .report-chart-peak { padding-left: 14px !important; border-left: 1px solid var(--line); }
.report-chart-canvas { width: 100%; overflow-x: auto; }
.report-chart-canvas svg { width: 100%; min-width: 520px; max-height: 225px; height: auto; }
.report-chart-grid { stroke: #e6ecf2; stroke-width: 1; stroke-dasharray: 3 3; }
.report-chart-baseline { stroke: #c5d0dc; stroke-width: 1.25; }
.report-chart-axis { fill: var(--muted); stroke: none; stroke-width: 0; font-size: 11px; font-weight: 500; font-family: inherit; }
.report-bar-value { fill: var(--ink); stroke: none; stroke-width: 0; font-size: 10.5px; font-weight: 700; font-family: inherit; }
.report-bar-column, .report-trend-area { stroke: none; stroke-width: 0; }
.report-trend-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.report-trend-point { stroke: #ffffff; stroke-width: 2; }
.report-chart > .form-note { margin: 8px 0 0; }
.print-document .report-chart { margin: 0 0 10px; padding: 12px 14px; background: #fff; }
.print-document .report-chart-share { grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 10px 18px; }
.print-document .report-pie-head { grid-column: 1 / -1; }
.print-document .report-chart-pie, .print-document .report-chart-pie svg { width: 136px; height: 136px; margin: 0; }
.print-document .report-chart-canvas svg { min-width: 0; max-height: 170px; }
@media (max-width: 960px) {
    .report-section-split { grid-template-columns: 1fr; }
    .report-chart-share { grid-template-columns: 164px minmax(0, 1fr); align-items: center; gap: 18px; }
    .report-pie-head { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .report-chart { padding: 14px; }
    .report-chart-share, .print-document .report-chart-share { grid-template-columns: 1fr; }
    .print-document .report-chart-pie { margin: 0 auto; }
    .report-chart-stat, .report-chart-peak { padding-left: 0 !important; border-left: 0; }
    .report-detail-summary { white-space: normal; }
}
@media print {
    .report-chart { break-inside: avoid; page-break-inside: avoid; background: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .report-chart-canvas { overflow: visible; }
    .report-chart-canvas svg { min-width: 0; max-height: 170px; }
    .report-section-split { grid-template-columns: 240px minmax(0, 1fr); gap: 12px; }
    .report-chart-pie, .report-chart-pie svg { width: 132px; height: 132px; }
}

/* Customer catalog, order summary, review and order details. Formal and quiet: neutral surfaces,
   thin rules, one primary action. Availability is text, never a coloured badge. */
.notice { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--navy-2); background: #fff; color: var(--ink); font-size: .9rem; }
.notice-error { border-left-color: #8a2f2f; }
.portal-order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.portal-order-summary { position: sticky; top: 16px; display: grid; gap: 14px; padding: 20px; }
.portal-order-summary h2 { font-size: 1.05rem; margin: 0; }
.portal-order-summary label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.portal-order-summary label small { font-weight: 400; color: var(--muted); }
.portal-order-summary textarea, .portal-order-summary select { width: 100%; font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid #c9d2dc; border-radius: 6px; background: #fff; }
.portal-summary-empty { margin: 0; color: var(--muted); font-size: .9rem; }
.portal-summary-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.portal-summary-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.portal-summary-name { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.portal-summary-lines small { grid-column: 1; color: var(--muted); }
.portal-summary-lines .text-button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.portal-summary-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding-top: 4px; font-size: .95rem; }
.portal-summary-total strong { font-size: 1.15rem; }
.portal-catalog-tools { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.portal-catalog-tools label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.portal-catalog-tools input, .portal-catalog-tools select { width: 100%; font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid #c9d2dc; border-radius: 6px; background: #fff; }
.portal-catalog-count { margin: 0; padding-bottom: 10px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.portal-catalog-legend { margin: 12px 0 4px; color: var(--muted); font-size: .85rem; }
.portal-catalog-group h3 { margin: 20px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.portal-catalog-list { list-style: none; margin: 0; padding: 0; }
.portal-catalog-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.portal-catalog-image { grid-row: 1 / span 2; align-self: start; }
.portal-catalog-availability { grid-column: 2; }
.portal-catalog-quantity { grid-column: 3; grid-row: 2; }
.portal-catalog-item.is-selected { background: #f3f5f8; box-shadow: inset 3px 0 0 var(--navy-2); padding-left: 10px; padding-right: 10px; }
.portal-catalog-image { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.portal-catalog-main { min-width: 0; display: grid; gap: 2px; }
.portal-catalog-name { font-size: .95rem; overflow-wrap: anywhere; }
.portal-catalog-sku { color: var(--muted); font-size: .8rem; }
.portal-catalog-description { margin: 2px 0 0; color: var(--muted); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.portal-catalog-price { display: grid; text-align: right; }
.portal-catalog-price span, .portal-catalog-unit { color: var(--muted); font-size: .8rem; }
.portal-catalog-availability { display: grid; gap: 2px; font-size: .85rem; }
.portal-catalog-availability small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.availability { font-weight: 600; }
.availability-in-stock { color: #24533f; }
.availability-low-stock { color: #6b4e0e; }
.availability-out-of-stock { color: #7d2a2a; }
.availability-unconfirmed { color: var(--muted); }
.portal-catalog-quantity { display: grid; justify-items: end; gap: 4px; }
.quantity-stepper { display: inline-grid; grid-template-columns: 40px 76px 40px; border: 1px solid #c9d2dc; border-radius: 6px; overflow: hidden; background: #fff; }
.quantity-stepper input { width: 100%; min-height: 40px; border: 0; border-left: 1px solid #c9d2dc; border-right: 1px solid #c9d2dc; text-align: center; font: inherit; -moz-appearance: textfield; }
.quantity-stepper input::-webkit-outer-spin-button, .quantity-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-button { min-height: 40px; border: 0; background: #f4f6f8; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.stepper-button:hover { background: #e8ecf1; }
.portal-review .portal-review-table td, .portal-review .portal-review-table th { white-space: normal; }
dialog.portal-review { width: min(760px, calc(100vw - 28px)); padding: 22px; }
.portal-review > p { margin: 14px 0 0; }
.portal-review .data-table-wrap { margin-top: 14px; max-width: 100%; overflow-x: auto; }
.portal-review .portal-review-table { width: 100%; min-width: 0; }
.portal-review .modal-actions { margin-top: 18px; }
.portal-review-details { display: grid; gap: 8px; margin-top: 14px; }
.portal-review-details div, .portal-detail-facts div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
.portal-review-details dt, .portal-detail-facts dt { color: var(--muted); font-size: .85rem; }
.portal-review-details dd, .portal-detail-facts dd { margin: 0; overflow-wrap: anywhere; }
.portal-detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0 0 8px; }
.portal-detail-facts .span-all { grid-column: 1 / -1; }
.portal-detail-facts dd small, .portal-profile dd small { display: block; color: var(--muted); font-size: .8rem; }
.portal-order-detail h3 { font-size: .95rem; margin: 22px 0 10px; }
.portal-detail-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .9rem; }
.portal-history small { display: block; color: var(--muted); }
.portal-history p { margin: 2px 0 0; }
.portal-detail-actions, .portal-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.portal-detail-actions { margin-top: 20px; }
.portal-cancel-form > p, .portal-cancel-form > label { display: block; margin: 0 22px 14px; }
.portal-cancel-form textarea { width: 100%; margin-top: 6px; font: inherit; padding: 8px 10px; border: 1px solid #c9d2dc; border-radius: 6px; }
@media (min-width: 1500px) {
    .portal-catalog-item { grid-template-columns: 56px minmax(0, 1fr) 120px 170px 170px; }
    .portal-catalog-image { grid-row: auto; align-self: center; }
    .portal-catalog-availability, .portal-catalog-quantity { grid-column: auto; grid-row: auto; }
}
@media (max-width: 1100px) {
    .portal-order-layout { grid-template-columns: minmax(0, 1fr); }
    .portal-order-summary { position: static; }
}
@media (max-width: 640px) {
    .portal-catalog-tools { grid-template-columns: minmax(0, 1fr); }
    .portal-catalog-item { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; }
    .portal-catalog-image { width: 48px; height: 48px; grid-row: 1; }
    .portal-catalog-price { grid-column: 2; text-align: left; display: flex; gap: 6px; align-items: baseline; }
    .portal-catalog-availability, .portal-catalog-quantity { grid-column: 2; grid-row: auto; justify-items: start; }
    .portal-detail-facts { grid-template-columns: minmax(0, 1fr); }
    .portal-review-details div, .portal-detail-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .quantity-stepper { grid-template-columns: 44px 80px 44px; }
    .stepper-button, .quantity-stepper input { min-height: 44px; }
    /* Stacked order cards: secondary lines sit under the value, never under the label. */
    .portal-orders-table td > small, .portal-orders-table td > .portal-amount + small { grid-column: 2; }
    .portal-orders-table td.number { justify-items: start; }
    .portal-row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Review and order-detail tables become one card per product, so nothing scrolls sideways. */
    .portal-review-table, .portal-review-table tbody, .portal-review-table tr, .portal-review-table tfoot,
    .portal-detail-table, .portal-detail-table tbody, .portal-detail-table tr { display: block; width: 100%; }
    .portal-review-table thead, .portal-detail-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .portal-review-table tbody tr, .portal-detail-table tbody tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .portal-review-table td, .portal-detail-table td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; padding: .25rem 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
    .portal-review-table td::before, .portal-detail-table td::before { content: attr(data-label); font-size: .8rem; font-weight: 600; color: var(--muted); }
    .portal-review-table td.number, .portal-detail-table td.number { justify-items: stretch; text-align: left; }
    .portal-review-table td.number::before, .portal-detail-table td.number::before { text-align: left; justify-self: start; }
    .portal-review-table tfoot tr { display: flex; justify-content: space-between; padding: 10px 0; }
    .portal-review-table tfoot th, .portal-review-table tfoot td { display: block; padding: 0; border: 0; background: none; }
    .portal-review-table tfoot td::before { content: none; }
    .portal-review .data-table-wrap { overflow-x: visible; }
}
