:root {
  --navy-950: #0a1429;
  --navy-900: #101b35;
  --navy-800: #182747;
  --navy-700: #253a61;
  --blue-700: #245ad7;
  --blue-600: #3474f4;
  --blue-500: #5792ff;
  --blue-100: #eaf1ff;
  --blue-50: #f4f7ff;
  --ink: #17243b;
  --ink-soft: #53627a;
  --muted: #78869d;
  --line: #e4eaf2;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --green: #16966a;
  --green-bg: #e9f8f1;
  --amber: #bd791b;
  --amber-bg: #fff5e5;
  --red: #cc4a50;
  --red-bg: #fff0f0;
  --purple: #7655c8;
  --purple-bg: #f2edff;
  --shadow: 0 18px 48px rgba(23, 42, 76, .10);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: calc(14px * var(--font-scale, 1)); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy-900); font-family: 'Manrope', sans-serif; font-size: calc(18px * var(--font-scale, 1)); font-weight: 800; letter-spacing: -.8px; }
.brand-light { color: #fff; }
.brand-highlight { color: #66a0ff; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #77aaff, #2762df); color: #fff; font-size: calc(19px * var(--font-scale, 1)); font-weight: 800; box-shadow: 0 7px 18px rgba(57, 117, 239, .25); }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 9px; color: var(--blue-600); font-size: calc(10px * var(--font-scale, 1)); font-weight: 800; letter-spacing: 1.5px; }
.button { min-height: 39px; border: 1px solid transparent; border-radius: 10px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(1.02); }
.button-primary { color: #fff; background: linear-gradient(135deg, #3477f6, #2458d3); box-shadow: 0 8px 18px rgba(43, 101, 225, .18); }
.button-secondary { color: var(--navy-800); background: #fff; border-color: var(--line); }
.button-soft { color: var(--blue-700); background: var(--blue-100); }
.button-danger { color: #fff; background: #d64b53; }
.button-ghost { color: var(--ink-soft); background: transparent; border-color: transparent; }
.button-small { min-height: 32px; padding: 0 11px; font-size: calc(12px * var(--font-scale, 1)); }
.button-wide { width: 100%; min-height: 46px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; color: var(--ink-soft); background: transparent; font-size: calc(18px * var(--font-scale, 1)); transition: .18s ease; }
.icon-button:hover { color: var(--blue-700); background: var(--blue-100); }

/* Sign in */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .95fr) 1.05fr; background: #fff; }
.login-art { min-height: 100vh; position: relative; overflow: hidden; padding: 44px clamp(30px, 6vw, 90px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: radial-gradient(circle at 72% 21%, rgba(76, 132, 245, .42), transparent 32%), radial-gradient(circle at 20% 85%, rgba(36, 87, 190, .45), transparent 35%), linear-gradient(145deg, #142342, #091328 80%); }
.login-art:after { content: ''; position: absolute; width: 470px; height: 470px; border: 1px solid rgba(148, 182, 255, .15); border-radius: 50%; right: -170px; bottom: -100px; box-shadow: 0 0 0 40px rgba(148, 182, 255, .025), 0 0 0 90px rgba(148, 182, 255, .02); }
.login-art-copy { position: relative; z-index: 1; max-width: 540px; margin-top: -30px; }
.login-art-copy .eyebrow { color: #85b2ff; }
.login-art-copy h1 { margin: 0 0 22px; font: 800 clamp(42px, 5vw, 68px)/1.08 'Manrope', sans-serif; letter-spacing: -3px; }
.login-art-copy h1 em { color: #7aa9ff; font-style: normal; }
.login-art-copy p:not(.eyebrow) { max-width: 400px; color: #b7c6df; font-size: calc(16px * var(--font-scale, 1)); line-height: 1.8; }
.login-art-bottom, .login-foot { color: #93a2ba; font-size: calc(11px * var(--font-scale, 1)); letter-spacing: .35px; }
.login-panel { display: grid; place-items: center; padding: 40px 25px; }
.login-card { width: min(390px, 100%); }
.login-card h2 { margin: 0 0 8px; font: 800 calc(27px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: -.8px; }
.login-card .muted { margin: 0 0 30px; }
.login-card label, .field label { display: block; margin: 0 0 7px; color: #35445d; font-size: calc(12px * var(--font-scale, 1)); font-weight: 700; }
.login-card input, .login-card select { width: 100%; height: 46px; margin: 0 0 18px; border: 1px solid #dce4ef; border-radius: 9px; padding: 0 13px; outline: none; background: #fff; color: var(--ink); }
.login-card input:focus, .login-card select:focus, .field input:focus, .field select:focus, .field textarea:focus, .table-search:focus { border-color: #75a1f7; box-shadow: 0 0 0 3px rgba(70, 127, 237, .12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-toggle { position: absolute; right: 8px; top: 5px; }
.login-note { margin: 18px 0 0; color: var(--muted); font-size: calc(11px * var(--font-scale, 1)); text-align: center; }
.login-foot { align-self: end; margin-top: 44px; }
.mobile-brand { display: none; margin-bottom: 38px; }

/* App shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 252px; display: flex; flex-direction: column; padding: 24px 17px 17px; background: linear-gradient(180deg, #121f3c 0%, #0d1830 100%); color: #d7e1f1; box-shadow: 8px 0 30px rgba(10, 25, 53, .08); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 24px; }
.sidebar-close { display: none; color: #b7c5dc; }
.workspace-card { min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 11px 11px; margin-bottom: 17px; border: 1px solid rgba(168, 190, 230, .14); border-radius: 15px; background: linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.035)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 22px rgba(4, 12, 28, .08); }
.workspace-avatar { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; overflow: hidden; border-radius: 13px; background: linear-gradient(135deg, #547ff0, #7b9eff); color: #fff; font-size: calc(12px * var(--font-scale, 1)); font-weight: 800; box-shadow: 0 6px 15px rgba(57, 117, 239, .2); }
.workspace-avatar.has-logo { padding: 4px; border: 1px solid rgba(255,255,255,.8); background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,.12); }
.workspace-logo-image { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.workspace-avatar-initials { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; letter-spacing: -.2px; }
.workspace-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.workspace-card strong { display: block; overflow: hidden; color: #f4f7ff; font-size: calc(12px * var(--font-scale, 1)); font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card small { display: block; overflow: hidden; color: #9aabc7; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #52d39c; box-shadow: 0 0 0 4px rgba(82, 211, 156, .1); }
.main-nav { overflow-y: auto; flex: 1; padding: 0 2px; scrollbar-width: thin; scrollbar-color: #2b426b transparent; }
.nav-caption { margin: 11px 9px 8px; color: #7183a2; font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; letter-spacing: 1.4px; }
.nav-caption-spaced { margin-top: 22px; }
.nav-link { min-height: 39px; display: flex; align-items: center; gap: 12px; padding: 0 10px; margin: 2px 0; border-radius: 9px; color: #aebbd0; font-size: calc(12px * var(--font-scale, 1)); font-weight: 600; transition: .17s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.075); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(65, 117, 232, .35), rgba(57, 105, 211, .15)); box-shadow: inset 2px 0 #78a5ff; }
.nav-icon { width: 17px; display: inline-grid; place-items: center; color: #91a9d2; font-size: calc(16px * var(--font-scale, 1)); }
.nav-link.active .nav-icon { color: #91b7ff; }
.nav-count { min-width: 21px; height: 19px; display: grid; place-items: center; margin-left: auto; border-radius: 6px; background: rgba(107, 150, 240, .2); color: #a9c6ff; font-size: calc(10px * var(--font-scale, 1)); }
.sidebar-bottom { padding-top: 12px; }
.help-card { margin: 0 3px 15px; padding: 13px; border: 1px solid rgba(145, 173, 225, .13); border-radius: 12px; background: linear-gradient(135deg, rgba(67, 104, 184, .23), rgba(255,255,255,.035)); }
.help-icon { display: inline-grid; width: 25px; height: 25px; place-items: center; margin-bottom: 8px; border-radius: 8px; color: #b8d0ff; background: rgba(112, 158, 255, .18); }
.help-card strong { display: block; color: #f1f5fc; font-size: calc(11px * var(--font-scale, 1)); }
.help-card p { margin: 5px 0 9px; color: #95a7c4; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.55; }
.help-card a { color: #9bbcff; font-size: calc(10px * var(--font-scale, 1)); font-weight: 700; }
.help-card a span { margin-left: 3px; }
.profile-row { min-height: 50px; display: flex; align-items: center; gap: 9px; padding: 8px 5px 0; border-top: 1px solid rgba(163, 184, 221, .12); }
.profile-avatar { width: 31px; height: 31px; display: inline-grid; flex: 0 0 31px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, #e6edff, #b9ccfb); color: #3156a1; font-size: calc(10px * var(--font-scale, 1)); font-weight: 800; }
.profile-copy { min-width: 0; display: grid; gap: 3px; }
.profile-copy strong { color: #f3f6fd; font-size: calc(11px * var(--font-scale, 1)); }
.profile-copy small { color: #8496b5; font-size: calc(10px * var(--font-scale, 1)); }
.profile-menu { margin-left: auto; color: #9fb0cb; }
.main-area { min-height: 100vh; margin-left: 252px; display: flex; flex-direction: column; }
.topbar { height: 66px; position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid #e8edf4; background: rgba(255,255,255,.93); backdrop-filter: blur(14px); }
.topbar-left, .topbar-actions, .breadcrumb, .topbar-user { display: flex; align-items: center; }
.breadcrumb { gap: 11px; color: #8a96a9; font-size: calc(11px * var(--font-scale, 1)); }
.breadcrumb b { color: #c3ccd8; font-weight: 400; }
.breadcrumb strong { color: #263650; font-size: calc(12px * var(--font-scale, 1)); }
.topbar-actions { gap: 17px; }
.today-label { color: #768399; font-size: calc(11px * var(--font-scale, 1)); }
.topbar-icon { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; overflow: visible; border: 1px solid #dce5f8; border-radius: 12px; color: #2948b8; background: linear-gradient(155deg, #ffffff 5%, #edf2ff 100%); box-shadow: 0 5px 14px rgba(38, 71, 164, .09), inset 0 1px 0 rgba(255,255,255,.95); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.topbar-icon:hover { transform: translateY(-2px); border-color: #a9bdf2; color: #193b9f; box-shadow: 0 9px 20px rgba(38, 71, 164, .16), inset 0 1px 0 rgba(255,255,255,.98); }
.topbar-action-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.install-app-button { color: #fff; border-color: #2b4cba; background: linear-gradient(145deg, #5479ef, #2747b6 78%); box-shadow: 0 6px 15px rgba(43, 76, 186, .22), inset 0 1px 0 rgba(255,255,255,.25); }
.install-app-button:hover { color: #fff; border-color: #1e3b9f; background: linear-gradient(145deg, #6387fa, #1f3d9e 82%); box-shadow: 0 10px 22px rgba(43, 76, 186, .3); }
.notification-button { color: #314c9a; background: linear-gradient(155deg, #fff 8%, #f0f4ff 100%); }
.notification-indicator { width: 8px; height: 8px; position: absolute; top: 6px; right: 6px; border: 2px solid #fff; border-radius: 50%; background: #ef5c68; box-shadow: 0 0 0 2px rgba(239, 92, 104, .12); }
.report-summary-row td { padding-top: 14px; padding-bottom: 14px; border-top: 2px solid #cbd8f5; background: linear-gradient(90deg, #f3f6ff, #fbfcff); color: #203e97; font-size: calc(11px * var(--font-scale, 1)); }
.report-summary-row strong { color: #203e97; font-weight: 900; letter-spacing: .25px; }
body[data-theme="dark"] .report-summary-row td { border-color: #435d93; background: #1e3155; color: #c9d8ff; }
body[data-theme="dark"] .report-summary-row strong { color: #c9d8ff; }
.topbar-user { gap: 8px; color: #45536a; font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; }
.profile-avatar.small { width: 28px; height: 28px; flex-basis: 28px; border-radius: 9px; }
.chevron { color: #94a0b2; }
.mobile-menu { display: none; margin-right: 10px; }
.page-wrap { width: 100%; max-width: 1600px; flex: 1; padding: 29px 34px 35px; margin: 0 auto; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 34px 18px; border-top: 1px solid #e7ecf3; color: #94a0b0; font-size: calc(10px * var(--font-scale, 1)); }
.app-footer b { margin: 0 5px; color: #c5ced9; }

/* Page building blocks */
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 0 0 6px; font: 800 calc(25px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: -.9px; color: #192842; }
.page-heading p { margin: 0; color: #7b899e; font-size: calc(12px * var(--font-scale, 1)); }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.section-title { margin: 25px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title h2 { margin: 0; font: 800 calc(14px * var(--font-scale, 1)) 'Manrope', sans-serif; color: #24344e; }
.section-title p { margin: 4px 0 0; color: #8793a6; font-size: calc(11px * var(--font-scale, 1)); }
.section-title .text-link { color: var(--blue-600); font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; }
.card { border: 1px solid #e7ecf3; border-radius: var(--radius); background: #fff; box-shadow: 0 5px 18px rgba(27, 49, 84, .025); }
.card-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #edf1f6; }
.card-header h3 { margin: 0; font: 800 calc(13px * var(--font-scale, 1)) 'Manrope', sans-serif; color: #24344e; }
.card-header p { margin: 4px 0 0; color: #8793a5; font-size: calc(10px * var(--font-scale, 1)); }
.card-body { padding: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { position: relative; overflow: hidden; min-height: 116px; padding: 16px 17px; border: 1px solid #e7ecf3; border-radius: 14px; background: #fff; }
.stat-card:after { content: ''; position: absolute; width: 105px; height: 105px; right: -51px; bottom: -62px; border-radius: 50%; background: var(--stat-soft, #edf3ff); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { color: #78879c; font-size: calc(10px * var(--font-scale, 1)); font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--stat-soft, #edf3ff); color: var(--stat-color, #3474f4); font-size: calc(15px * var(--font-scale, 1)); }
.stat-value { position: relative; z-index: 1; margin-top: 12px; color: #1d2c45; font: 800 calc(24px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: -.9px; }
.stat-foot { position: relative; z-index: 1; margin-top: 3px; color: #9aa5b5; font-size: calc(10px * var(--font-scale, 1)); }
.stat-blue { --stat-color: #3474f4; --stat-soft: #edf3ff; }
.stat-green { --stat-color: #168c68; --stat-soft: #e8f7f0; }
.stat-amber { --stat-color: #b57a27; --stat-soft: #fff4e4; }
.stat-purple { --stat-color: #7958c9; --stat-soft: #f1edff; }
.stat-red { --stat-color: #c94e5a; --stat-soft: #fff0f0; }
.queue-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.queue-card { min-height: 86px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e7ecf3; border-radius: 13px; background: #fff; text-align: left; transition: .18s ease; }
.queue-card:hover { transform: translateY(-2px); border-color: #cbdaf7; box-shadow: 0 8px 22px rgba(45, 86, 160, .08); }
.queue-bubble { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 11px; background: var(--q-bg); color: var(--q-color); font-weight: 800; }
.queue-card strong { display: block; color: #2b3c57; font: 800 calc(19px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.queue-card span:last-child { display: block; margin-top: 2px; color: #8793a6; font-size: calc(10px * var(--font-scale, 1)); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 15px; }
.dashboard-chart { min-height: 220px; }
.mini-bars { height: 150px; display: flex; align-items: end; justify-content: space-around; gap: 12px; padding: 10px 8px 0; border-bottom: 1px solid #eef1f6; }
.mini-bar-col { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 7px; }
.mini-bar-track { width: min(30px, 70%); height: 112px; display: flex; align-items: end; overflow: hidden; border-radius: 7px 7px 2px 2px; background: #f0f4fb; }
.mini-bar-fill { width: 100%; min-height: 4px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #79a8ff, #3975ed); }
.mini-bar-col small { color: #95a1b3; font-size: calc(9px * var(--font-scale, 1)); }
.legend-row { display: flex; align-items: center; gap: 14px; color: #8895a7; font-size: calc(10px * var(--font-scale, 1)); }
.legend-dot { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #568cf2; }
.activity-list { display: grid; gap: 15px; }
.activity-item { display: flex; gap: 10px; }
.activity-mark { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; background: #edf3ff; color: #477cec; font-size: calc(12px * var(--font-scale, 1)); }
.activity-copy { min-width: 0; }
.activity-copy p { margin: 1px 0 3px; color: #53627a; font-size: calc(11px * var(--font-scale, 1)); line-height: 1.5; }
.activity-copy p strong { color: #273852; }
.activity-copy small { color: #9aa5b5; font-size: calc(9px * var(--font-scale, 1)); }

/* Tables and forms */
.table-card { overflow: hidden; }
.table-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-search { width: 220px; height: 35px; padding: 0 11px; border: 1px solid #e3e9f1; border-radius: 8px; outline: none; color: var(--ink); font-size: calc(11px * var(--font-scale, 1)); }
.filter-select { height: 35px; padding: 0 28px 0 10px; border: 1px solid #e3e9f1; border-radius: 8px; outline: none; background: #fff; color: #53627a; font-size: calc(11px * var(--font-scale, 1)); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 12px 15px; background: #fafbfd; color: #8491a4; font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; letter-spacing: .65px; text-align: left; text-transform: uppercase; }
td { padding: 13px 15px; border-top: 1px solid #f0f3f7; color: #526178; font-size: calc(11px * var(--font-scale, 1)); vertical-align: middle; }
tbody tr:hover { background: #fbfcff; }
.cell-main { color: #293a55; font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; }
.cell-sub { display: block; margin-top: 3px; color: #9aa5b5; font-size: calc(9px * var(--font-scale, 1)); font-weight: 500; }
.table-actions { display: flex; align-items: center; gap: 3px; }
.table-actions button { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #78879d; font-size: calc(13px * var(--font-scale, 1)); }
.table-actions button:hover { color: var(--blue-700); background: var(--blue-100); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; background: #f0f3f8; color: #65748b; font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; }
.badge:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-blue { background: #edf3ff; color: #386cce; }
.badge-green { background: #e8f7f0; color: #16845f; }
.badge-amber { background: #fff4e4; color: #ae741f; }
.badge-red { background: #fff0f0; color: #bd4e55; }
.badge-purple { background: #f1edff; color: #7554c3; }
.empty-state { padding: 42px 20px; text-align: center; }
.empty-state .empty-icon { width: 45px; height: 45px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 14px; background: #edf3ff; color: #5486e8; font-size: calc(20px * var(--font-scale, 1)); }
.empty-state h3 { margin: 0 0 6px; color: #2b3b55; font: 800 calc(13px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.empty-state p { max-width: 360px; margin: 0 auto 15px; color: #8b97a8; font-size: calc(11px * var(--font-scale, 1)); line-height: 1.6; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #e0e7f0; border-radius: 8px; outline: none; background: #fff; color: #253650; font-size: calc(11px * var(--font-scale, 1)); transition: .16s ease; }
.field textarea { min-height: 82px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #9ba7b8; }
.field .field-help { margin-top: 5px; color: #9aa5b5; font-size: calc(9px * var(--font-scale, 1)); }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; min-height: 0; accent-color: var(--blue-600); }
.check-row { display: flex; align-items: center; gap: 8px; color: #55647b; font-size: calc(11px * var(--font-scale, 1)); }
.form-section-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; margin: 7px 0 -2px; padding-bottom: 9px; border-bottom: 1px solid #edf1f6; color: #263750; font: 800 calc(11px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.form-section-title span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: #edf3ff; color: #4278df; }

/* Modals */
.modal-root { position: relative; z-index: 100; }
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 22px; overflow: hidden; background: rgba(9, 19, 39, .57); backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s ease; }
.modal-backdrop.is-visible { opacity: 1; }
.modal-content-updating { opacity: .72; transform: translateY(3px); transition: opacity .14s ease, transform .14s ease; }
.vat-treatment-fields > .field { padding: 10px 12px; border: 1px solid #e6ebf3; border-radius: 10px; background: #fbfcff; }
.vat-treatment-fields .field.vat-inclusive-active { border-color: #3578ed; background: #edf4ff; box-shadow: inset 0 0 0 1px rgba(53,120,237,.12); }
.vat-inclusive-hint { color: #2459b6 !important; font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-content-updating { transition: none; } }
.modal { width: min(720px, 100%); height: auto; max-height: min(90vh, 900px); max-height: min(90dvh, 900px); display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 17px; background: #fff; box-shadow: 0 25px 80px rgba(4, 14, 35, .28); animation: riseIn .19s ease; }
.modal.modal-wide { width: min(980px, 100%); }
.modal.modal-narrow { width: min(480px, 100%); }
.modal-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 22px 16px; border-bottom: 1px solid #edf1f6; }
.modal-head h2 { margin: 0 0 5px; color: #1e2e47; font: 800 calc(17px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: -.4px; }
.modal-head p { margin: 0; color: #8793a6; font-size: calc(10px * var(--font-scale, 1)); }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f4f6fa; color: #68778d; font-size: calc(19px * var(--font-scale, 1)); }
.modal-close:hover { background: #eaf1ff; color: #285dcc; }
.modal form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.modal-body { flex: 1 1 auto; min-height: 0; max-height: calc(90vh - 150px); max-height: calc(90dvh - 150px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 20px 22px; }
.modal-foot { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 22px; border-top: 1px solid #edf1f6; background: #fcfdff; }
.attachment-preview-wrap { min-height: 180px; max-height: 68vh; display: grid; place-items: center; overflow: auto; border: 1px solid #e5ebf3; border-radius: 12px; background: #f5f7fb; }
.attachment-image-preview { width: 100%; display: grid; place-items: center; padding: 10px; }
.attachment-image-preview img { display: block; max-width: 100%; max-height: 66vh; object-fit: contain; }
.attachment-frame-preview { width: 100%; height: min(66vh, 720px); border: 0; background: #fff; }
.attachment-unavailable { padding: 28px 18px; text-align: center; }
.attachment-unavailable h3 { color: #263750; font: 800 calc(13px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.attachment-unavailable p { color: #61718a; font-size: calc(11px * var(--font-scale, 1)); }
.photo-open-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: zoom-in; }
.photo-open-button img { display: block; }
.photo-open-button:focus-visible { outline: 3px solid rgba(52,116,244,.5); outline-offset: 2px; }
.modal-foot-left, .modal-foot-right { display: flex; gap: 8px; align-items: center; }
.toast-root { position: fixed; z-index: 150; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { min-width: 240px; max-width: min(380px, calc(100vw - 44px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #dcebe4; border-radius: 10px; background: #fff; color: #2d5c49; box-shadow: var(--shadow); font-size: calc(11px * var(--font-scale, 1)); animation: riseIn .18s ease; }
.toast.error { border-color: #f0d5d6; color: #a83d44; }
.toast-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: #e9f8f1; }
.toast.error .toast-icon { background: #fff0f0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Job details / repair journey */
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 15px; color: #6380ad; font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; }
.job-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 19px 21px; border: 1px solid #e5ebf4; border-radius: 15px; background: linear-gradient(120deg, #fff 65%, #f2f6ff); }
.job-hero h1 { margin: 0 0 7px; font: 800 calc(21px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: -.6px; }
.job-subline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #76859a; font-size: calc(10px * var(--font-scale, 1)); }
.job-hero-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.journey-card { margin-top: 14px; padding: 18px 20px 15px; }
.journey-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.journey-header strong { color: #263650; font: 800 calc(12px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.journey-header span { color: #8996a9; font-size: calc(10px * var(--font-scale, 1)); }
.journey-track { display: flex; align-items: flex-start; }
.journey-step { min-width: 0; flex: 1; position: relative; text-align: center; }
.journey-step:not(:last-child):after { content: ''; position: absolute; top: 15px; left: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: #e4eaf2; }
.journey-step.done:not(:last-child):after { background: #73a0f5; }
.journey-circle { width: 31px; height: 31px; position: relative; z-index: 1; display: grid; place-items: center; margin: 0 auto 8px; border: 2px solid #e2e8f1; border-radius: 50%; background: #fff; color: #9aa6b8; font-size: calc(10px * var(--font-scale, 1)); font-weight: 800; }
.journey-step.done .journey-circle { border-color: #3474f4; background: #3474f4; color: #fff; box-shadow: 0 0 0 4px #eaf1ff; }
.journey-step.current .journey-circle { border-color: #3474f4; background: #fff; color: #3474f4; box-shadow: 0 0 0 4px #eaf1ff; }
.journey-step small { display: block; color: #8794a8; font-size: calc(9px * var(--font-scale, 1)); font-weight: 600; }
.journey-step.current small, .journey-step.done small { color: #3b5f9e; font-weight: 800; }
.job-tabs { display: flex; gap: 20px; overflow-x: auto; margin-top: 18px; border-bottom: 1px solid #e5ebf3; }
.job-tab { padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8290a4; font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; white-space: nowrap; }
.job-tab.active { border-bottom-color: #3474f4; color: #2c65d4; }
.job-tab-content { padding-top: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-item { padding: 12px; border: 1px solid #edf1f6; border-radius: 9px; background: #fcfdff; }
.detail-item small { display: block; margin-bottom: 5px; color: #8d99aa; font-size: calc(9px * var(--font-scale, 1)); }
.detail-item strong { color: #33445e; font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; overflow-wrap: anywhere; }
.items-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check-item { display: flex; align-items: center; gap: 7px; padding: 8px 9px; border: 1px solid #edf1f6; border-radius: 8px; color: #65748b; font-size: calc(10px * var(--font-scale, 1)); }
.check-item input { accent-color: #3474f4; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-card { overflow: hidden; border: 1px solid #e8edf4; border-radius: 10px; background: #fff; }
.photo-card img { width: 100%; height: 120px; display: block; object-fit: cover; background: #f2f5fa; }
.photo-card div { padding: 8px; }
.photo-card strong { display: block; overflow: hidden; color: #3b4a62; font-size: calc(10px * var(--font-scale, 1)); text-overflow: ellipsis; white-space: nowrap; }
.photo-card small { color: #97a3b3; font-size: calc(9px * var(--font-scale, 1)); }
.invoice-total { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: 15px; padding: 15px; border-radius: 10px; background: #f3f6fd; }
.invoice-total span { color: #6f7d92; font-size: calc(10px * var(--font-scale, 1)); }
.invoice-total strong { color: #233653; font: 800 calc(21px * var(--font-scale, 1)) 'Manrope', sans-serif; }

/* Documents / print */
.document-preview { padding: 24px; border: 1px solid #e6ebf2; background: #fff; color: #263650; }
.document-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 2px solid #243c67; }
.document-brand img { width: 52px; height: 52px; object-fit: contain; }
.document-brand h2 { margin: 0 0 4px; color: #1b2d4b; font: 800 calc(16px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.document-brand p { margin: 0; color: #74839a; font-size: calc(9px * var(--font-scale, 1)); }
.document-title { margin: 20px 0 13px; text-align: center; font: 800 calc(15px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: .6px; }
.document-preview table { white-space: normal; }
.document-preview td, .document-preview th { padding: 9px; border: 1px solid #e3e8ef; color: #53627a; font-size: calc(10px * var(--font-scale, 1)); }
.document-preview th { background: #f5f7fa; color: #465873; }
.document-note { margin-top: 17px; color: #65748b; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.7; }
.document-footer { margin-top: 30px; padding-top: 10px; border-top: 1px solid #e9edf2; color: #9aa5b5; font-size: calc(8px * var(--font-scale, 1)); text-align: center; }

/* Settings / report helpers */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-card { padding: 18px; }
.settings-card h3 { margin: 0 0 5px; color: #293a54; font: 800 calc(13px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.settings-card > p { margin: 0 0 15px; color: #8995a7; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.55; }
.theme-options { display: flex; gap: 9px; flex-wrap: wrap; }
.theme-option { width: 94px; padding: 8px; border: 1px solid #e4eaf2; border-radius: 10px; background: #fff; color: #53627a; text-align: left; font-size: calc(10px * var(--font-scale, 1)); }
.theme-option.active { border-color: #6b96ef; box-shadow: 0 0 0 2px #eaf1ff; }
.theme-swatch { height: 38px; display: flex; gap: 4px; padding: 5px; margin-bottom: 7px; border-radius: 6px; background: #12203e; }
.theme-swatch i { display: block; width: 30%; border-radius: 3px; background: #3474f4; }
.theme-swatch i:nth-child(2) { background: #fff; }
.theme-swatch i:nth-child(3) { background: #dbe6fa; }
.report-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-metric { padding: 13px; border: 1px solid #edf1f6; border-radius: 10px; }
.report-metric small { color: #8996a9; font-size: calc(9px * var(--font-scale, 1)); }
.report-metric strong { display: block; margin-top: 5px; color: #283a56; font: 800 calc(18px * var(--font-scale, 1)) 'Manrope', sans-serif; }

@media (max-width: 1180px) {
  .sidebar { width: 228px; }
  .main-area { margin-left: 228px; }
  .page-wrap { padding-left: 24px; padding-right: 24px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .mobile-menu { display: inline-grid; }
  .main-area { margin-left: 0; }
  .topbar { height: 60px; padding: 0 18px; }
  .today-label { display: none; }
  .page-wrap { padding: 22px 18px 28px; }
  .app-footer { padding: 14px 18px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-brand { display: inline-flex; }
}
@media (max-width: 560px) {
  .topbar-user { display: none; }
  .topbar-actions { gap: 8px; }
  .page-heading { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .page-heading h1 { font-size: calc(22px * var(--font-scale, 1)); }
  .heading-actions { align-items: stretch; }
  .heading-actions .button { flex: 1; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 104px; padding: 12px; }
  .stat-value { font-size: calc(20px * var(--font-scale, 1)); }
  .queue-grid { gap: 8px; }
  .queue-card { min-height: 74px; padding: 10px; gap: 8px; }
  .queue-card strong { font-size: calc(17px * var(--font-scale, 1)); }
  .queue-bubble { width: 30px; height: 30px; flex-basis: 30px; }
  .table-tools { width: 100%; }
  .table-search { flex: 1; width: auto; min-width: 100px; }
  .field-grid, .settings-grid { grid-template-columns: 1fr; }
  .field.full, .form-section-title { grid-column: auto; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .items-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-hero { flex-direction: column; }
  .job-hero-actions { width: 100%; }
  .job-hero-actions .button { flex: 1; }
  .journey-card { padding: 14px 10px; overflow-x: auto; }
  .journey-track { min-width: 560px; }
  .journey-step small { font-size: calc(8px * var(--font-scale, 1)); }
  .modal-backdrop { align-items: center; padding: 8px; }
  .modal { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 13px; }
  .modal-head, .modal-body { padding-left: 15px; padding-right: 15px; }
  .modal-body { max-height: calc(94vh - 135px); max-height: calc(94dvh - 135px); }
  .modal-foot { padding: 11px 15px; }
  .modal-foot-left { display: none; }
  .modal-foot-right { width: 100%; }
  .modal-foot-right .button { flex: 1; }
  .app-footer { font-size: calc(9px * var(--font-scale, 1)); }
  .app-footer span:last-child { text-align: right; }
}

@media print {
  body * { visibility: hidden !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area { position: absolute; inset: 0; width: 100%; padding: 0; }
  .print-hidden { display: none !important; }
  .document-preview { border: 0; padding: 0; }
}

/* Optional dark workspace palette */
body[data-theme="dark"] { background: #0d172b; color: #e4ebf7; }
body[data-theme="dark"] .main-area { background: #0d172b; }
body[data-theme="dark"] .topbar, body[data-theme="dark"] .card, body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .queue-card, body[data-theme="dark"] .job-hero, body[data-theme="dark"] .modal,
body[data-theme="dark"] .document-preview, body[data-theme="dark"] .settings-card { background: #15223b; border-color: #2a3a58; color: #e1e9f6; }
body[data-theme="dark"] .page-heading h1, body[data-theme="dark"] .section-title h2, body[data-theme="dark"] .card-header h3,
body[data-theme="dark"] .stat-value, body[data-theme="dark"] .queue-card strong, body[data-theme="dark"] .cell-main,
body[data-theme="dark"] .detail-item strong, body[data-theme="dark"] .job-hero h1, body[data-theme="dark"] .settings-card h3,
body[data-theme="dark"] .modal-head h2 { color: #edf3ff; }
body[data-theme="dark"] .page-heading p, body[data-theme="dark"] .section-title p, body[data-theme="dark"] .stat-label,
body[data-theme="dark"] .stat-foot, body[data-theme="dark"] td, body[data-theme="dark"] .modal-head p,
body[data-theme="dark"] .detail-item small, body[data-theme="dark"] .settings-card > p { color: #a3b2ca; }
body[data-theme="dark"] th { background: #1b2a46; color: #a8b8d2; }
body[data-theme="dark"] td, body[data-theme="dark"] .card-header, body[data-theme="dark"] .modal-head,
body[data-theme="dark"] .modal-foot, body[data-theme="dark"] .job-tabs, body[data-theme="dark"] .app-footer { border-color: #2a3a58; }
body[data-theme="dark"] .detail-item, body[data-theme="dark"] .invoice-total, body[data-theme="dark"] .document-note,
body[data-theme="dark"] .document-footer { background: #1b2a46; color: #c0cce0; border-color: #2a3a58; }
body[data-theme="dark"] .field input, body[data-theme="dark"] .field select, body[data-theme="dark"] .field textarea,
body[data-theme="dark"] .table-search, body[data-theme="dark"] .filter-select { background: #101b31; color: #e4ebf7; border-color: #344563; }
body[data-theme="dark"] .button-secondary { background: #1d2d4b; border-color: #344563; color: #dbe6f8; }
body[data-theme="dark"] .topbar { background: rgba(18, 31, 55, .95); }
body[data-theme="dark"] .breadcrumb strong, body[data-theme="dark"] .topbar-user { color: #d6e1f3; }
.required-star { color: #d95b62; font-weight: 800; }
.quick-links { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.quick-link { min-width: 0; min-height: 57px; display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e5ebf3; border-radius: 10px; background: #fff; color: #52627a; font-size: calc(10px * var(--font-scale, 1)); font-weight: 700; transition: .18s ease; }
.quick-link:hover { border-color: #b9cdf7; color: #2d62cb; background: #f8faff; transform: translateY(-2px); box-shadow: 0 7px 17px rgba(37, 80, 153, .07); }
.quick-link > span { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; background: #edf3ff; color: #3973e3; font-size: calc(14px * var(--font-scale, 1)); }
.quick-link b { margin-left: auto; color: #a7b2c2; font-size: calc(10px * var(--font-scale, 1)); }
body[data-theme="dark"] .quick-link { background: #15223b; border-color: #2a3a58; color: #c6d3e8; }
@media (max-width: 1180px) { .quick-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Suppliers page — directory, inventory catalogue and credit watch */
.supplier-summary-grid { margin-bottom: 16px; }
.supplier-directory-card { margin-bottom: 0; }
.supplier-directory-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.supplier-filters { width: min(100%, 760px); display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(150px, .9fr) minmax(130px, .7fr); gap: 8px; align-items: center; }
.supplier-search-group { display: flex; gap: 7px; min-width: 0; }
.supplier-search-group .table-search { min-width: 0; flex: 1; }
.supplier-filters select { width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid #dce4ef; border-radius: 8px; outline: 0; background: #fff; color: #34445d; font: 600 calc(10px * var(--font-scale, 1)) 'DM Sans', sans-serif; }
.supplier-filters select:focus, .supplier-search-group input:focus { border-color: #6a97f3; box-shadow: 0 0 0 3px rgba(52,116,244,.1); }
.supplier-actions { gap: 5px; }
.supplier-actions button { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid #e1e8f2; border-radius: 8px; background: #f8faff; color: #365b9e; font-size: calc(14px * var(--font-scale, 1)); transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease; }
.supplier-actions button:hover { transform: translateY(-2px); background: #eaf1ff; color: #1c59c6; box-shadow: 0 5px 13px rgba(34,83,166,.12); }
.supplier-part-count { color: #203b67; font-weight: 800; font-variant-numeric: tabular-nums; }
.supplier-credit-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 14px 16px; border: 1px solid #e3eaf4; border-radius: 12px; background: #fbfcff; }
.supplier-alert-item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; color: #3c506d; background: #edf3fc; font-size: calc(10px * var(--font-scale, 1)); }
.supplier-alert-item strong { font-size: calc(12px * var(--font-scale, 1)); }
.supplier-alert-item.overdue { color: #a3323b; background: #fff0f0; }
.supplier-alert-item.soon { color: #8b5a13; background: #fff6e7; }
.supplier-alert-item.clear { color: #25724e; background: #eaf8f0; }
.supplier-credit-setting { margin-left: auto; color: #5e6f88; font-size: calc(10px * var(--font-scale, 1)); }
.supplier-credit-setting strong { color: #263f66; }
.supplier-page-note { margin: 11px 2px 0; color: #61728d; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.55; }
.supplier-inventory-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid #dce7f8; border-radius: 12px; background: linear-gradient(120deg, #f8faff, #eef4ff); }
.supplier-inventory-intro .eyebrow { color: #4774bc; font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; letter-spacing: 1px; }
.supplier-inventory-intro h3 { margin: 4px 0 5px; color: #1f3557; font: 800 calc(16px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.supplier-inventory-intro p { max-width: 560px; margin: 0; color: #5d6f89; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
.supplier-inventory-count { flex: 0 0 auto; padding: 7px 9px; border: 1px solid #d6e2f6; border-radius: 20px; color: #325c9f; background: #fff; font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; }
.supplier-library-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 9px; align-items: end; margin-bottom: 15px; }
.supplier-library-toolbar .field { margin: 0; }
.supplier-part-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #e5ebf4; border-bottom: 0; border-radius: 10px 10px 0 0; background: #f8faff; color: #294269; font-size: calc(10px * var(--font-scale, 1)); font-weight: 800; }
.supplier-part-list-head small { color: #687b96; font-size: calc(9px * var(--font-scale, 1)); font-weight: 500; }
.supplier-part-rows { display: grid; gap: 0; padding: 0 11px; border: 1px solid #e5ebf4; border-radius: 0 0 10px 10px; }
.supplier-part-row { display: grid; grid-template-columns: 1.35fr 1fr 1fr .8fr auto; gap: 9px; align-items: end; padding: 11px 0; border-bottom: 1px solid #edf1f6; }
.supplier-part-row:last-child { border-bottom: 0; }
.supplier-part-row .field { min-width: 0; margin: 0; }
.supplier-part-row .field label { font-size: calc(9px * var(--font-scale, 1)); }
.supplier-part-row .field input { min-height: 34px; padding: 7px 9px; font-size: calc(10px * var(--font-scale, 1)); }
.supplier-part-row input[readonly] { background: #f8faff; color: #3a4f6e; }
.supplier-part-row.editing { margin: 0 -11px; padding: 11px; border-radius: 8px; background: #f7faff; }
.supplier-part-row-actions { display: flex; align-items: center; gap: 5px; padding-bottom: 1px; }
.supplier-part-row-actions .button { min-height: 32px; padding: 0 9px; white-space: nowrap; }
.supplier-remove-row { color: #a13c47 !important; }
.supplier-part-empty { padding: 19px 10px; margin: 0; color: #5d6f89; font-size: calc(10px * var(--font-scale, 1)); text-align: center; }
.supplier-vat-panel { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(180px, .7fr); gap: 14px; align-items: center; margin-top: 14px; padding: 14px 16px; border: 1px solid #e1e9f4; border-radius: 11px; background: #fbfcff; }
.supplier-vat-toggle { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.supplier-vat-toggle input { width: 19px; height: 19px; accent-color: var(--blue-600); }
.supplier-vat-toggle span { display: grid; gap: 3px; }
.supplier-vat-toggle strong { color: #213c65; font: 800 calc(11px * var(--font-scale, 1)) 'Manrope', sans-serif; letter-spacing: .5px; }
.supplier-vat-toggle small { color: #60728d; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.45; }
.supplier-vat-rate .field { margin: 0; }
.supplier-vat-rate .field-help { margin-top: 5px; }
.supplier-vat-rate[hidden] { display: none !important; }
.button-danger { border: 1px solid #f0cdd0; color: #a4333e; background: #fff2f2; }
.button-danger:hover { border-color: #eab6bb; color: #8f202b; background: #ffe8e9; }
@media (max-width: 900px) {
  .supplier-filters { grid-template-columns: minmax(220px, 1.2fr) minmax(145px, .8fr); }
  .supplier-filters select:last-child { grid-column: 1 / -1; }
  .supplier-part-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-part-row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .supplier-vat-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .supplier-filters { width: 100%; grid-template-columns: 1fr; }
  .supplier-filters select:last-child { grid-column: auto; }
  .supplier-search-group { width: 100%; }
  .supplier-inventory-intro { flex-direction: column; }
  .supplier-library-toolbar { grid-template-columns: 1fr 1fr; }
  .supplier-library-toolbar .field { grid-column: 1 / -1; }
  .supplier-library-toolbar .button { width: 100%; justify-content: center; }
  .supplier-part-row { grid-template-columns: 1fr; }
  .supplier-part-row-actions { grid-column: auto; }
  .supplier-credit-setting { width: 100%; margin-left: 0; }
}

/* Supplier page refinement — exact directory columns, action modals and import UX */
.supplier-directory-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 11px 16px; border-top: 1px solid #edf1f6; color: #64758e; font-size: calc(10px * var(--font-scale, 1)); }
.supplier-directory-footer a { margin-left: auto; color: var(--blue-600); font-weight: 800; }
.supplier-part-count { display: inline-block; font-size: calc(14px * var(--font-scale, 1)); }
.supplier-credit-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; margin-bottom: 15px; border: 1px solid #e3eaf4; border-radius: 11px; background: #f8faff; }
.supplier-credit-summary > div { display: grid; align-content: start; gap: 7px; min-width: 0; }
.supplier-credit-summary > div > span { color: #64758e; font-size: calc(9px * var(--font-scale, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.supplier-credit-summary strong { color: #243a5d; font-size: calc(11px * var(--font-scale, 1)); }
.supplier-toggle { display: inline-flex; align-items: center; gap: 9px; color: #294267; font-size: calc(10px * var(--font-scale, 1)); font-weight: 800; cursor: pointer; }
.supplier-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.supplier-toggle-track { position: relative; width: 38px; height: 22px; border-radius: 20px; background: #c5cfdd; transition: background .18s ease; }
.supplier-toggle-track:after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .18s ease; }
.supplier-toggle input:checked + .supplier-toggle-track { background: var(--blue-600); }
.supplier-toggle input:checked + .supplier-toggle-track:after { transform: translateX(16px); }
.supplier-vat-panel { grid-template-columns: minmax(230px, 1fr) auto minmax(170px, .45fr); }
.supplier-vat-panel > div:first-child strong { display: block; color: #243a5d; font: 800 calc(12px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.supplier-vat-panel > div:first-child p { margin: 5px 0 0; color: #60728d; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
.supplier-vat-rate { margin: 0; }
.supplier-vat-rate input { min-height: 36px; }
.supplier-row-state { color: #60728d; font-size: calc(9px * var(--font-scale, 1)); font-weight: 700; white-space: nowrap; }
.supplier-part-row-actions .button { font-size: calc(9px * var(--font-scale, 1)); }
.badge-gray { color: #5d6d82; background: #eef2f7; }
.modal-wide { width: min(1080px, calc(100vw - 36px)); }
body[data-theme="dark"] .supplier-credit-summary,
body[data-theme="dark"] .supplier-vat-panel,
body[data-theme="dark"] .supplier-part-list-head,
body[data-theme="dark"] .supplier-part-rows,
body[data-theme="dark"] .supplier-directory-footer { background: #182843; border-color: #30415f; color: #c4d1e4; }
body[data-theme="dark"] .supplier-credit-summary strong,
body[data-theme="dark"] .supplier-vat-panel > div:first-child strong,
body[data-theme="dark"] .supplier-toggle { color: #e1eafa; }
body[data-theme="dark"] .supplier-inventory-intro { background: linear-gradient(120deg, #172743, #1d3153); border-color: #304768; }
body[data-theme="dark"] .supplier-inventory-intro h3 { color: #e4ecf9; }
body[data-theme="dark"] .supplier-inventory-intro p,
body[data-theme="dark"] .supplier-vat-panel > div:first-child p,
body[data-theme="dark"] .supplier-credit-summary > div > span { color: #a6b7d1; }
body[data-theme="dark"] .supplier-directory-footer a { color: #8db2ff; }
@media (max-width: 900px) {
  .supplier-vat-panel { grid-template-columns: 1fr 1fr; }
  .supplier-vat-panel > div:first-child { grid-column: 1 / -1; }
  .supplier-credit-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .supplier-directory-footer { align-items: flex-start; flex-direction: column; }
  .supplier-directory-footer a { margin-left: 0; }
  .supplier-credit-summary { grid-template-columns: 1fr; }
  .supplier-vat-panel { grid-template-columns: 1fr; }
  .supplier-vat-panel > div:first-child { grid-column: auto; }
  .supplier-library-toolbar { grid-template-columns: 1fr; }
  .supplier-library-toolbar .field { grid-column: auto; }
}


/* Auto GMS v1.0.3 — editable invoice editor */
.invoice-form-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-bottom:16px; }
.invoice-form-summary > div { min-width:0; padding:11px 13px; border:1px solid #e4ebf5; border-radius:10px; background:#f7f9fd; }
.invoice-form-summary small, .invoice-live-card small { display:block; color:#718099; font-size: calc(9px * var(--font-scale, 1)); font-weight:800; letter-spacing:.09em; }
.invoice-form-summary strong { display:block; margin-top:4px; color:#263852; font-size: calc(11px * var(--font-scale, 1)); overflow-wrap:anywhere; }
.invoice-form-section { margin:18px 0 10px; align-items:center; }
.invoice-form-section h3 { margin:0 0 3px; color:#293b57; font:800 calc(13px * var(--font-scale, 1)) 'Manrope',sans-serif; }
.invoice-form-section p { margin:0; color:#6f7e94; font-size: calc(10px * var(--font-scale, 1)); line-height:1.5; }
.invoice-lines-table-wrap { border:1px solid #e6ebf3; border-radius:11px; }
.invoice-lines-table { min-width:680px; }
.invoice-lines-table th { white-space:nowrap; }
.invoice-lines-table td { padding:7px; vertical-align:middle; }
.invoice-line-input { width:100%; min-width:90px; height:36px; border:1px solid #dce4ef; border-radius:7px; padding:0 9px; color:#243650; background:#fff; font-size: calc(11px * var(--font-scale, 1)); }
.invoice-line-number { min-width:74px; }
.invoice-line-type { color:#6a7890; font-size: calc(9px * var(--font-scale, 1)); text-transform:capitalize; }
.invoice-line-remove { width:30px; height:30px; min-width:30px; }
.invoice-adjustments { margin-top:15px; }
.invoice-live-card { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:16px; padding:15px 17px; border:1px solid #cddcf7; border-radius:12px; background:linear-gradient(120deg,#f4f8ff,#fbfdff); }
.invoice-live-card strong { display:block; margin-top:4px; color:#1d4ea5; font:800 calc(23px * var(--font-scale, 1)) 'Manrope',sans-serif; }
.invoice-live-card p { max-width:56%; margin:0; color:#65758e; font-size: calc(10px * var(--font-scale, 1)); line-height:1.5; text-align:right; }
.satisfaction-statement { padding:12px; border-radius:9px; background:#f5f8fd; color:#4f6079; font-size: calc(11px * var(--font-scale, 1)); line-height:1.6; }
@media (max-width: 700px) {
  .invoice-form-summary { grid-template-columns:1fr; }
  .invoice-live-card { align-items:flex-start; flex-direction:column; }
  .invoice-live-card p { max-width:100%; text-align:left; }
}


/* Auto GMS 1.0.5 — quotation and labour builders */
.quote-builder-intro, .labour-builder-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:15px 16px; margin-bottom:16px; border:1px solid #dce7f6; border-radius:13px; background:linear-gradient(135deg,#f4f8ff,#fbfdff); }
.quote-builder-intro h3, .labour-builder-intro h3 { margin:4px 0 4px; color:#1d3150; font:800 calc(16px * var(--font-scale, 1)) Manrope,sans-serif; }
.quote-builder-intro p, .labour-builder-intro p { margin:0; color:#60718b; font-size: calc(11px * var(--font-scale, 1)); }
.quote-builder-total { min-width:175px; padding:10px 13px; border:1px solid #d4e1f6; border-radius:11px; background:#fff; text-align:right; }
.quote-builder-total small { display:block; margin-bottom:4px; color:#71819a; font-size: calc(9px * var(--font-scale, 1)); font-weight:800; letter-spacing:.7px; }
.quote-builder-total strong { color:#1d4e9b; font:800 calc(17px * var(--font-scale, 1)) Manrope,sans-serif; white-space:nowrap; }
.quote-builder-entry { padding:15px; border:1px solid #e4ebf4; border-radius:13px; background:#fff; }
.quote-builder-actions { display:flex; align-items:center; justify-content:space-between; gap:13px; margin-top:13px; }
.quote-builder-actions .field-help { flex:1; margin:0; }
.quote-builder-list { margin-top:19px; }
.quote-builder-list .section-title { margin:0 0 9px; }
.quote-builder-table { min-width:760px; }
.quote-labour-controls { display:flex; align-items:flex-end; gap:10px; }
.quote-labour-controls .field { min-width:190px; flex:1; }
.quote-builder-labour { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-top:17px; padding:14px 15px; border:1px solid #e2eaf4; border-radius:12px; background:#f8faff; }
.quote-builder-labour > div:first-child strong { display:block; color:#243752; font:800 calc(12px * var(--font-scale, 1)) Manrope,sans-serif; }
.quote-builder-labour > div:first-child small { display:block; max-width:390px; margin-top:4px; color:#687a93; font-size: calc(10px * var(--font-scale, 1)); line-height:1.5; }

.supplementary-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 24px; }
.supplementary-totals > div { display: grid; gap: 4px; text-align: right; }
.supplementary-totals small { color: #71819a; font-size: calc(9px * var(--font-scale, 1)); font-weight: 700; letter-spacing: .02em; }
.supplementary-totals strong { color: #263b5a; font: 800 calc(13px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.quote-builder-summary { display:grid; gap:8px; margin-top:15px; padding:13px 15px; border:1px solid #e4ebf4; border-radius:12px; background:#fbfcff; }
.quote-builder-summary > div { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#65758c; font-size: calc(11px * var(--font-scale, 1)); }
.quote-builder-summary strong { color:#273a56; font:800 calc(12px * var(--font-scale, 1)) Manrope,sans-serif; }
.quote-builder-summary .quote-grand-total { padding-top:9px; border-top:1px solid #e2e9f2; color:#1d3150; font-weight:800; }
.quote-builder-summary .quote-grand-total strong { color:#1b4e9a; font-size: calc(17px * var(--font-scale, 1)); }
.quote-builder-footer-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:14px; }
.estimate-approval-card { margin:12px 0 17px; border-color:#dbe6f4; }
.estimate-approval-card .card-body { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.estimate-approval-card strong { color:#243650; font:800 calc(12px * var(--font-scale, 1)) Manrope,sans-serif; }
.estimate-approval-card p { margin:4px 0 0; color:#738198; font-size: calc(10px * var(--font-scale, 1)); }
.satisfactory-summary { margin-bottom:16px; padding:12px; border:1px solid #e2eaf4; border-radius:12px; background:#f8faff; }
.satisfactory-checklist { padding:12px; border:1px solid #e4ebf4; border-radius:11px; background:#fcfdff; }
.signature-writing-line { display:flex; align-items:flex-end; min-height:46px; padding:0 0 5px; border-bottom:1px solid #34435b; color:#92a0b2; font-size: calc(10px * var(--font-scale, 1)); }
.signature-writing-line span { padding-bottom:1px; }

@media (max-width: 640px) {
  .quote-builder-intro, .labour-builder-intro { flex-direction:column; }
  .quote-builder-total { width:100%; text-align:left; }
  .quote-builder-actions { align-items:stretch; flex-direction:column; }
  .quote-builder-actions .button { width:100%; }
  .quote-builder-labour { align-items:stretch; flex-direction:column; }
  .quote-labour-controls { align-items:stretch; flex-direction:column; }
  .quote-labour-controls .button { width:100%; }
  .quote-builder-footer-actions { flex-direction:column; }
  .quote-builder-footer-actions .button { width:100%; }
  .estimate-approval-card .card-body { align-items:stretch; flex-direction:column; }
}


/* Version 1.0.5 — expanded Satisfactory Letter job-card detail layout */
.satisfactory-summary .detail-grid { margin-bottom: 14px; }
.satisfactory-condition { grid-column: 1 / -1; padding: 13px 14px; border: 1px solid var(--line, #dfe6f0); border-radius: 12px; background: var(--surface-soft, #f7f9fc); }
.satisfactory-condition p { margin: 7px 0 0; line-height: 1.6; white-space: pre-wrap; }
.signature-writing-line { width: 100%; max-width: 430px; height: 42px; border-bottom: 1px solid currentColor; margin-top: 5px; }

/* Version 1.0.7 — premium tax panels, supplier entry choices and accent palette */
:root {
  --accent-shadow: color-mix(in srgb, var(--blue-600) 19%, transparent);
}
.button-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 8px 18px var(--accent-shadow);
}
.button-primary:hover {
  box-shadow: 0 12px 24px var(--accent-shadow);
  filter: saturate(1.08) brightness(1.035);
}
.button-soft,
.icon-button:hover,
.quick-link > span {
  color: var(--blue-700);
  background: var(--blue-100);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.table-search:focus,
.filter-select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--accent-shadow);
}

/* Clear, premium VAT selection block shared by quotation and supplementary forms. */
.tax-treatment-card {
  min-width: 0;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--blue-600) 22%, #e4ebf4);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--blue-50), #ffffff 78%);
  box-shadow: 0 10px 25px rgba(26, 48, 84, .055);
}
.tax-treatment-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}
.tax-treatment-icon {
  width: 37px;
  height: 37px;
  display: grid;
  flex: 0 0 37px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  font: 800 calc(18px * var(--font-scale, 1)) Manrope, sans-serif;
  box-shadow: 0 7px 15px var(--accent-shadow);
}
.tax-treatment-heading > div { min-width: 0; display: grid; gap: 3px; }
.tax-treatment-heading strong {
  color: #263a58;
  font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif;
}
.tax-treatment-heading small {
  color: #687991;
  font-size: calc(10px * var(--font-scale, 1));
  line-height: 1.5;
}
.tax-treatment-chip {
  margin-left: auto;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--blue-600) 20%, #dfe8f6);
  border-radius: 999px;
  color: var(--blue-700);
  background: #fff;
  font-size: calc(8px * var(--font-scale, 1));
  font-weight: 850;
  letter-spacing: .7px;
  white-space: nowrap;
}
.vat-treatment-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.vat-treatment-fields > .field {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #e2e9f3;
  border-radius: 11px;
  background: rgba(255,255,255,.88);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.vat-treatment-fields > .field:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--blue-600) 32%, #e2e9f3);
  box-shadow: 0 7px 16px rgba(23, 54, 101, .06);
}
.vat-treatment-fields .field.vat-inclusive-active,
.vat-treatment-fields .field.vat-added-active {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px var(--accent-shadow), 0 7px 15px rgba(25, 57, 104, .05);
}
.vat-treatment-fields .check-row {
  color: #30445f;
  font-size: calc(10px * var(--font-scale, 1));
  line-height: 1.45;
  font-weight: 750;
}
.vat-treatment-fields input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue-600); }
.tax-rate-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #e6edf6;
  border-radius: 11px;
  background: rgba(255,255,255,.82);
}
.tax-rate-fields[hidden] { display: none !important; }
.tax-rate-fields .field-help { color: #61738c; font-size: calc(10px * var(--font-scale, 1)); }
.vat-inclusive-hint { color: var(--blue-700) !important; font-weight: 750; }
.tax-calculation-summary {
  margin-top: 14px;
  padding: 15px 17px;
  border: 1px solid #e0e8f3;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, var(--blue-50));
  box-shadow: 0 9px 21px rgba(24, 47, 82, .045);
}
.tax-calculation-summary > div { min-height: 25px; }
.tax-calculation-summary .quote-grand-total {
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid #dfe7f2;
}
.tax-calculation-summary .quote-grand-total strong {
  color: var(--blue-700);
  font-size: calc(20px * var(--font-scale, 1));
}
.document-tax-summary {
  width: min(440px, 100%);
  display: grid;
  gap: 8px;
  margin: 14px 0 0 auto;
  padding: 13px 15px;
  border: 1px solid #dfe7f1;
  border-radius: 9px;
  background: #f8faff;
}
.document-tax-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: #566780;
  font-size: calc(10px * var(--font-scale, 1));
}
.document-tax-summary strong { color: #283c5a; font-weight: 800; white-space: nowrap; }
.document-tax-summary .document-tax-final {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid #dce5f1;
  color: #1e3558;
  font-weight: 850;
}
.document-tax-summary .document-tax-final strong {
  color: #184b9d;
  font-size: calc(14px * var(--font-scale, 1));
}

/* Supplier parts catalogue: library and manual entry are separate, unmistakable paths. */
.supplier-part-entry-options { display: grid; gap: 11px; margin: 4px 0 17px; }
.supplier-part-entry-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2eaf5;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 48, 83, .045);
}
.supplier-library-entry { background: linear-gradient(135deg, #f7faff, #fff); }
.supplier-manual-entry { background: linear-gradient(135deg, #fbfaff, #fff); }
.supplier-part-entry-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.supplier-entry-number {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue-700);
  background: var(--blue-100);
  font: 800 calc(10px * var(--font-scale, 1)) Manrope, sans-serif;
}
.supplier-part-entry-heading > div { min-width: 0; display: grid; gap: 3px; }
.supplier-part-entry-heading strong { color: #263a58; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.supplier-part-entry-heading small { color: #687991; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.45; }
.supplier-entry-tag {
  margin-left: auto;
  padding: 5px 7px;
  border: 1px solid #e2e9f3;
  border-radius: 999px;
  color: #62738b;
  background: #fff;
  font-size: calc(8px * var(--font-scale, 1));
  font-weight: 850;
  letter-spacing: .6px;
}
.supplier-library-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  margin: 0;
}
.supplier-manual-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.supplier-manual-fields .field { margin: 0; }
.supplier-manual-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.supplier-manual-actions .field-help { margin: 0; color: #64758e; }
.supplier-entry-divider { display: flex; align-items: center; gap: 12px; color: #8794a8; font-size: calc(9px * var(--font-scale, 1)); font-weight: 850; letter-spacing: 1px; }
.supplier-entry-divider::before,
.supplier-entry-divider::after { content: ''; height: 1px; flex: 1; background: #e6ebf3; }

/* Seven accent choices: four-colour swatches and responsive, tactile selection cards. */
.theme-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 10px; }
.theme-option {
  width: auto;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  background: #fff;
  color: #53627a;
  text-align: left;
  font-size: calc(10px * var(--font-scale, 1));
  font-weight: 750;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.theme-option:hover { transform: translateY(-2px); border-color: var(--blue-500); box-shadow: 0 9px 20px rgba(25, 48, 84, .09); }
.theme-option:focus-visible { outline: 3px solid var(--accent-shadow); outline-offset: 2px; }
.theme-option.active { border-color: var(--blue-600); box-shadow: 0 0 0 2px var(--blue-100), 0 8px 18px rgba(25, 48, 84, .07); }
.theme-swatch { height: 39px; display: flex; gap: 4px; padding: 5px; margin-bottom: 8px; border-radius: 7px; background: #12203e; }
.theme-swatch i { display: block; flex: 1 1 25%; min-width: 0; border-radius: 4px; }
.theme-swatch i:nth-child(2) { background: #245ad7; }
.theme-swatch i:nth-child(3) { background: #5792ff; }
.theme-swatch i:nth-child(4) { background: #eaf1ff; }

/* Smooth, visible interactions across panels and controls. */
.card, .settings-card, .quote-builder-entry, .supplier-part-entry-card, .tax-treatment-card {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--blue-600) 17%, #e3eaf3); }
.button:focus-visible, .icon-button:focus-visible, [data-action]:focus-visible {
  outline: 3px solid var(--accent-shadow);
  outline-offset: 2px;
}
.modal { box-shadow: 0 28px 85px rgba(4, 14, 35, .30), 0 2px 8px rgba(4, 14, 35, .08); }
.modal-head { background: linear-gradient(120deg, #fff, #f9fbff); }

body[data-theme="dark"] .tax-treatment-card,
body[data-theme="dark"] .supplier-part-entry-card,
body[data-theme="dark"] .tax-calculation-summary {
  border-color: #344866;
  background: linear-gradient(145deg, #192945, #15223b);
}
body[data-theme="dark"] .tax-treatment-heading strong,
body[data-theme="dark"] .supplier-part-entry-heading strong,
body[data-theme="dark"] .tax-calculation-summary strong { color: #e3edff; }
body[data-theme="dark"] .tax-treatment-heading small,
body[data-theme="dark"] .supplier-part-entry-heading small,
body[data-theme="dark"] .supplier-manual-actions .field-help { color: #a9bad3; }
body[data-theme="dark"] .vat-treatment-fields > .field,
body[data-theme="dark"] .tax-rate-fields,
body[data-theme="dark"] .document-tax-summary { background: #1b2d49; border-color: #344866; }
body[data-theme="dark"] .vat-treatment-fields .check-row,
body[data-theme="dark"] .document-tax-summary > div,
body[data-theme="dark"] .document-tax-summary strong { color: #d6e3f7; }
body[data-theme="dark"] .theme-option { color: #d2def0; background: #15223b; border-color: #344866; }
body[data-theme="dark"] .theme-swatch { background: #0d172b; }

@media (max-width: 700px) {
  .tax-treatment-heading { align-items: flex-start; flex-wrap: wrap; }
  .tax-treatment-chip { margin-left: 48px; }
  .vat-treatment-fields, .tax-rate-fields { grid-template-columns: 1fr; }
  .supplier-library-toolbar { grid-template-columns: 1fr; }
  .supplier-library-toolbar .field { grid-column: auto; }
  .supplier-manual-fields { grid-template-columns: 1fr; }
  .supplier-manual-actions { align-items: stretch; flex-direction: column; }
  .supplier-manual-actions .button { width: 100%; }
  .document-tax-summary { margin-left: 0; }
}

/* Auto GMS v1.0.8 — invoice summary, saved supplementary editing and text sizing */
.invoice-live-card {
  display: block;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cddcf7;
  border-radius: 15px;
  background: linear-gradient(135deg, #f2f7ff 0%, #fbfdff 72%);
  box-shadow: 0 8px 24px rgba(35, 74, 133, .07);
}
.invoice-live-header {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 20px;
  padding: 2px 2px 15px;
  border-bottom: 1px solid #e1eaf8;
}
.invoice-live-final { min-width: 0; }
.invoice-live-final > small {
  display: block;
  color: #71819b;
  font-size: calc(10px * var(--font-scale, 1));
  font-weight: 850;
  letter-spacing: .1em;
}
.invoice-live-final > strong {
  display: block;
  margin-top: 5px;
  color: #1d4ea5;
  font: 800 clamp(25px, 3vw, 34px)/1.12 'Manrope', sans-serif;
  letter-spacing: -.7px;
  overflow-wrap: anywhere;
}
.invoice-live-header > p {
  max-width: none;
  margin: 0;
  color: #687993;
  font-size: calc(11px * var(--font-scale, 1));
  line-height: 1.65;
  text-align: right;
}
.invoice-vat-inline,
.document-inclusive-vat {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid #b8dfce;
  border-radius: 999px;
  background: #eaf8f1;
  color: #16714e;
  font: 800 calc(10px * var(--font-scale, 1))/1.2 'DM Sans', sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
}
.invoice-live-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.invoice-live-breakdown-grid > div {
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid #e2eaf6;
  border-radius: 10px;
  background: rgba(255, 255, 255, .9);
}
.invoice-live-breakdown-grid small {
  display: block;
  color: #71819a;
  font-size: calc(9px * var(--font-scale, 1));
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .045em;
}
.invoice-live-breakdown-grid strong {
  display: block;
  margin-top: 7px;
  color: #2b4164;
  font: 800 calc(14px * var(--font-scale, 1))/1.25 'Manrope', sans-serif;
  overflow-wrap: anywhere;
}
.invoice-live-breakdown-grid > div:nth-child(2) strong,
.invoice-live-breakdown-grid > div:nth-child(4) strong,
.invoice-live-breakdown-grid > div:nth-child(5) strong { color: #9a5260; }
.document-invoice-final-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 9px;
}
.document-inclusive-vat {
  margin: 0;
  padding: 3px 7px;
  font-size: calc(8px * var(--font-scale, 1));
  vertical-align: middle;
}
.supplementary-row-actions { min-width: 112px; }
.supplementary-row-actions button { min-width: 29px; }
.supplementary-row-actions button.danger { color: #bf4650; border-color: #f1d6d8; background: #fff7f7; }
.supplementary-row-actions button.danger:hover { color: #fff; border-color: #c94f58; background: #c94f58; }
.supplementary-edit-intro {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  padding: 12px 14px;
  border: 1px solid #e2eaf5;
  border-radius: 10px;
  background: #f7f9fd;
}
.supplementary-edit-intro p { flex: 1 1 270px; margin: 0; color: #667790; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.55; }
.appearance-font-section {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 16px;
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
}
.appearance-font-section > div:first-child > strong { display: block; color: #293c59; font: 800 calc(12px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.appearance-font-section > div:first-child > p { margin: 4px 0 0; color: #738198; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
.font-size-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.font-size-option {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #e0e7f1;
  border-radius: 10px;
  background: #fff;
  color: #52627b;
  font: 700 calc(10px * var(--font-scale, 1)) 'DM Sans', sans-serif;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.font-size-option:hover { transform: translateY(-2px); border-color: var(--blue-500); box-shadow: 0 8px 18px rgba(31, 61, 110, .09); }
.font-size-option:focus-visible { outline: 3px solid var(--blue-100); outline-offset: 2px; }
.font-size-option.active { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 2px var(--blue-100); color: var(--blue-700); }
.font-size-sample { flex: 0 0 28px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--blue-100); color: var(--blue-700); font: 800 calc(13px * var(--font-scale, 1)) 'Manrope', sans-serif; }
.font-size-option[data-font-size="large"] .font-size-sample { font-size: calc(17px * var(--font-scale, 1)); }
.font-size-option[data-font-size="extra-large"] .font-size-sample { font-size: calc(21px * var(--font-scale, 1)); }
html[data-font-size="extra-large"] { --font-scale: 1.12; }
.font-size-option[data-font-size="compact"] .font-size-sample { font-size: calc(11px * var(--font-scale, 1)); }
body[data-theme="dark"] .invoice-live-card { background: linear-gradient(135deg, #172945, #1b2d49); border-color: #344866; box-shadow: none; }
body[data-theme="dark"] .invoice-live-header { border-color: #344866; }
body[data-theme="dark"] .invoice-live-final > small,
body[data-theme="dark"] .invoice-live-header > p,
body[data-theme="dark"] .invoice-live-breakdown-grid small { color: #a8b8d2; }
body[data-theme="dark"] .invoice-live-final > strong { color: #a9c7ff; }
body[data-theme="dark"] .invoice-live-breakdown-grid > div { background: #1d304e; border-color: #344866; }
body[data-theme="dark"] .invoice-live-breakdown-grid strong { color: #e0eaff; }
body[data-theme="dark"] .supplementary-edit-intro,
body[data-theme="dark"] .font-size-option { background: #1b2d49; border-color: #344866; color: #dce7f8; }
body[data-theme="dark"] .appearance-font-section { border-color: #344866; }
body[data-theme="dark"] .appearance-font-section > div:first-child > strong { color: #e0eaff; }
body[data-theme="dark"] .appearance-font-section > div:first-child > p,
body[data-theme="dark"] .supplementary-edit-intro p { color: #a8b8d2; }
@media (max-width: 860px) {
  .invoice-live-breakdown-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .invoice-live-header { grid-template-columns: 1fr; gap: 10px; }
  .invoice-live-header > p { text-align: left; }
  .invoice-live-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appearance-font-section { grid-template-columns: 1fr; }
  .font-size-options { grid-template-columns: 1fr; }
  .font-size-option { min-height: 48px; }
}
@media print {
  html { zoom: 1 !important; }
  .document-inclusive-vat { border: 1px solid #9bcfb5 !important; background: #eef8f2 !important; color: #176d4c !important; }
}


/* Auto GMS v1.0.9 — automotive Shop point of sale */
.shop-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.shop-metric {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #e5ebf4;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f9fbff);
  box-shadow: 0 5px 18px rgba(25, 47, 81, .035);
}
.shop-metric span, .shop-metric small { display: block; color: #7e8ba0; font-size: calc(10px * var(--font-scale, 1)); font-weight: 700; }
.shop-metric strong { display: block; margin: 8px 0 3px; color: #203657; font: 800 calc(22px * var(--font-scale, 1)) Manrope, sans-serif; letter-spacing: -.6px; overflow-wrap: anywhere; }
.shop-metric-primary { border-color: color-mix(in srgb, var(--blue-600) 22%, #e5ebf4); background: linear-gradient(145deg, var(--blue-50), #fff 86%); }
.shop-metric-primary strong { color: var(--blue-700); }
.shop-metric-warning { border-color: #f1d6a7; background: linear-gradient(145deg, #fff9ed, #fff); }
.shop-metric-warning strong { color: #a56818; }
.shop-pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 15px; align-items: start; }
.shop-catalog-panel { min-width: 0; overflow: hidden; }
.shop-catalog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 20px 15px; border-bottom: 1px solid #edf1f6; }
.shop-catalog-header h2 { margin: 4px 0; color: #213651; font: 800 calc(17px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-catalog-header p { margin: 0; color: #8794a8; font-size: calc(10px * var(--font-scale, 1)); }
.shop-search-wrap { width: min(340px, 48%); position: relative; }
.shop-search-wrap > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8a99ae; font-size: calc(19px * var(--font-scale, 1)); }
.shop-search-wrap input { width: 100%; height: 41px; padding: 0 13px 0 38px; border: 1px solid #dfe7f2; border-radius: 11px; outline: 0; color: #263a57; background: #f9fbfe; font: 600 calc(11px * var(--font-scale, 1)) 'DM Sans', sans-serif; transition: border-color .18s, box-shadow .18s, background .18s; }
.shop-search-wrap input:focus { border-color: var(--blue-600); background: #fff; box-shadow: 0 0 0 3px var(--blue-100); }
.shop-category-chips { display: flex; gap: 7px; padding: 13px 17px; overflow-x: auto; border-bottom: 1px solid #f0f3f7; scrollbar-width: thin; }
.shop-category-chip { flex: 0 0 auto; min-height: 32px; padding: 0 11px; border: 1px solid #e5ebf3; border-radius: 999px; background: #fff; color: #687991; font: 700 calc(10px * var(--font-scale, 1)) 'DM Sans', sans-serif; cursor: pointer; transition: .16s ease; }
.shop-category-chip:hover { transform: translateY(-1px); border-color: var(--blue-600); color: var(--blue-700); }
.shop-category-chip.active { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-700); box-shadow: 0 3px 10px var(--accent-shadow); }
.shop-catalog-meta { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px 2px; color: #8c99ac; font-size: calc(9px * var(--font-scale, 1)); font-weight: 700; }
.shop-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; padding: 14px 16px 18px; }
.shop-product-card { min-width: 0; overflow: hidden; border: 1px solid #e7edf5; border-radius: 13px; background: #fff; transition: transform .18s, border-color .18s, box-shadow .18s; }
.shop-product-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--blue-600) 38%, #e7edf5); box-shadow: 0 11px 25px rgba(30, 63, 116, .09); }
.shop-product-card.is-out-of-stock { opacity: .68; }
.shop-product-art { height: 73px; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: linear-gradient(125deg, var(--blue-50), #f7faff 72%); }
.shop-product-art > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--blue-700); box-shadow: 0 4px 13px rgba(31, 67, 127, .09); font-size: calc(20px * var(--font-scale, 1)); }
.shop-product-art small { max-width: 65%; color: #7586a0; font-size: calc(8px * var(--font-scale, 1)); font-weight: 800; text-align: right; }
.shop-product-details { padding: 11px 12px 12px; }
.shop-product-title-row { display: flex; align-items: flex-start; gap: 6px; justify-content: space-between; }
.shop-product-title-row h3 { min-width: 0; margin: 0; color: #263a57; font: 800 calc(10px * var(--font-scale, 1))/1.45 Manrope, sans-serif; }
.shop-product-details > p { margin: 5px 0 0; color: #8996a9; font-size: calc(8px * var(--font-scale, 1)); }
.shop-product-fitment { min-height: 22px; margin-top: 5px; color: #8d99ab; font-size: calc(8px * var(--font-scale, 1)); }
.shop-product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #f0f3f7; }
.shop-product-bottom > div { min-width: 0; }
.shop-product-bottom strong { display: block; color: #244d96; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; white-space: nowrap; }
.shop-product-bottom small { display: block; margin-top: 3px; color: #8b98aa; font-size: calc(8px * var(--font-scale, 1)); }
.shop-add-button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: var(--blue-600); color: #fff; font: 800 calc(9px * var(--font-scale, 1)) 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; transition: transform .16s, box-shadow .16s, background .16s; }
.shop-add-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--blue-700); box-shadow: 0 5px 12px var(--accent-shadow); }
.shop-add-button:disabled { background: #d7dee9; color: #8491a3; cursor: not-allowed; }
.shop-stock-flag { flex: 0 0 auto; padding: 3px 5px; border-radius: 999px; background: #fff4df; color: #a66a17; font-size: calc(7px * var(--font-scale, 1)); font-weight: 800; text-transform: uppercase; }
.shop-stock-flag.out { background: #ffebed; color: #bc4652; }
.shop-no-results { grid-column: 1 / -1; padding: 45px 12px; color: #7d8ca2; text-align: center; }
.shop-no-results strong { color: #2d405d; font: 800 calc(13px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-no-results p { font-size: calc(10px * var(--font-scale, 1)); }
.shop-cart-panel { position: sticky; top: 82px; min-width: 0; overflow: hidden; }
.shop-cart-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 17px 12px; border-bottom: 1px solid #edf1f6; }
.shop-cart-header h2 { margin: 3px 0 0; color: #203651; font: 800 calc(17px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-cart-header h2 span { display: inline-grid; min-width: 21px; height: 21px; place-items: center; margin-left: 4px; border-radius: 7px; background: var(--blue-50); color: var(--blue-700); font: 800 calc(10px * var(--font-scale, 1)) 'DM Sans', sans-serif; vertical-align: 2px; }
.shop-cart-customer-hint { padding: 11px 17px; background: #f9fbff; color: #8290a4; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.5; }
.shop-cart-lines { max-height: 430px; overflow: auto; padding: 5px 14px; }
.shop-cart-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 3px; border-bottom: 1px solid #f0f3f7; }
.shop-cart-line-main { min-width: 0; display: grid; gap: 3px; }
.shop-cart-line-main strong { color: #2b3e5a; font: 700 calc(10px * var(--font-scale, 1))/1.4 Manrope, sans-serif; }
.shop-cart-line-main small { color: #8b98aa; font-size: calc(8px * var(--font-scale, 1)); }
.shop-cart-line-main b { color: #244d96; font: 800 calc(10px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-cart-line-actions { display: flex; align-items: center; gap: 7px; }
.shop-quantity-control { display: flex; align-items: center; gap: 7px; padding: 3px; border: 1px solid #e5ebf3; border-radius: 8px; background: #fbfcfe; }
.shop-quantity-control button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: #edf3ff; color: var(--blue-700); font-weight: 800; cursor: pointer; }
.shop-quantity-control button:hover { background: var(--blue-600); color: white; }
.shop-quantity-control span { min-width: 12px; color: #344760; font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; text-align: center; }
.shop-remove-line { width: 23px; height: 23px; border: 0; border-radius: 7px; background: #fff0f1; color: #c44d5b; font-size: calc(15px * var(--font-scale, 1)); cursor: pointer; }
.shop-cart-empty { display: grid; justify-items: center; gap: 7px; padding: 42px 13px; color: #8997aa; text-align: center; }
.shop-cart-empty span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: #f1f5fc; font-size: calc(20px * var(--font-scale, 1)); }
.shop-cart-empty strong { color: #354760; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-cart-empty p { max-width: 200px; margin: 0; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.5; }
.shop-cart-footer { padding: 14px 16px 16px; border-top: 1px solid #edf1f6; background: #fbfcff; }
.shop-cart-subtotal { display: flex; justify-content: space-between; align-items: center; color: #73829a; font-size: calc(10px * var(--font-scale, 1)); }
.shop-cart-subtotal strong { color: #203a60; font: 800 calc(19px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-cart-footer p { margin: 7px 0 12px; color: #95a1b2; font-size: calc(8px * var(--font-scale, 1)); }
.shop-checkout-button { width: 100%; justify-content: center; min-height: 42px; }
.shop-checkout-button:disabled { opacity: .5; cursor: not-allowed; }
.shop-inventory-card, .shop-sales-card { margin-top: 16px; overflow: hidden; }
.shop-register-items { display: inline-block; max-width: 260px; overflow: hidden; color: #718097; font-size: calc(9px * var(--font-scale, 1)); text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.shop-demo-note { margin: 12px 2px 0; color: #9aa5b4; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.6; }
.shop-product-form-intro { padding: 12px 14px; margin-bottom: 15px; border: 1px solid #dce7fb; border-radius: 11px; background: linear-gradient(120deg, var(--blue-50), #fff); }
.shop-product-form-intro strong { color: #28436e; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-product-form-intro p { margin: 4px 0 0; color: #7c8ba2; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.5; }
.pos-checkout-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid #d8e5ff; border-radius: 14px; background: linear-gradient(125deg, var(--blue-50), #f8fbff); }
.pos-checkout-banner > div { display: grid; gap: 4px; }
.pos-checkout-banner strong { color: var(--blue-700); font: 800 calc(25px * var(--font-scale, 1)) Manrope, sans-serif; }
.pos-checkout-banner small { color: #8594aa; font-size: calc(9px * var(--font-scale, 1)); }
.pos-checkout-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: var(--blue-600); color: #fff; font-size: calc(19px * var(--font-scale, 1)); box-shadow: 0 7px 18px var(--accent-shadow); }
.pos-checkout-totals { display: grid; gap: 8px; padding: 14px 16px; margin-top: 14px; border: 1px solid #e5ebf3; border-radius: 12px; background: #fbfcff; }
.pos-checkout-totals > div { display: flex; justify-content: space-between; gap: 15px; color: #728199; font-size: calc(10px * var(--font-scale, 1)); }
.pos-checkout-totals strong { color: #2d4260; font: 800 calc(10px * var(--font-scale, 1)) Manrope, sans-serif; text-align: right; }
.pos-checkout-totals .pos-checkout-final { padding-top: 10px; border-top: 1px solid #e4eaf3; color: #29436d; font-weight: 800; }
.pos-checkout-totals .pos-checkout-final strong { color: var(--blue-700); font-size: calc(17px * var(--font-scale, 1)); }
.document-tax-final-value { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }

body[data-theme="dark"] .shop-metric, body[data-theme="dark"] .shop-catalog-panel, body[data-theme="dark"] .shop-cart-panel,
body[data-theme="dark"] .shop-inventory-card, body[data-theme="dark"] .shop-sales-card,
body[data-theme="dark"] .shop-product-card { background: #15223b; border-color: #2a3a58; }
body[data-theme="dark"] .shop-metric span, body[data-theme="dark"] .shop-metric small, body[data-theme="dark"] .shop-product-details > p,
body[data-theme="dark"] .shop-product-fitment, body[data-theme="dark"] .shop-cart-customer-hint,
body[data-theme="dark"] .shop-cart-empty p, body[data-theme="dark"] .shop-demo-note { color: #a7b6cd; }
body[data-theme="dark"] .shop-metric strong, body[data-theme="dark"] .shop-catalog-header h2,
body[data-theme="dark"] .shop-product-title-row h3, body[data-theme="dark"] .shop-cart-header h2,
body[data-theme="dark"] .shop-cart-line-main strong, body[data-theme="dark"] .shop-cart-empty strong { color: #e4edfb; }
body[data-theme="dark"] .shop-search-wrap input, body[data-theme="dark"] .shop-category-chip,
body[data-theme="dark"] .shop-quantity-control { background: #101b31; border-color: #344866; color: #dbe7f9; }
body[data-theme="dark"] .shop-cart-customer-hint, body[data-theme="dark"] .shop-cart-footer,
body[data-theme="dark"] .pos-checkout-totals { background: #1b2d49; border-color: #344866; }
body[data-theme="dark"] .shop-cart-subtotal strong, body[data-theme="dark"] .shop-quantity-control span,
body[data-theme="dark"] .pos-checkout-totals strong { color: #e1ebfa; }
body[data-theme="dark"] .shop-product-art { background: linear-gradient(125deg, #1d3558, #15233c); }
body[data-theme="dark"] .shop-product-art > span { background: #263b5c; }

@media (max-width: 1240px) {
  .shop-pos-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shop-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-pos-layout { grid-template-columns: 1fr; }
  .shop-cart-panel { position: static; }
  .shop-cart-lines { max-height: 340px; }
}
@media (max-width: 560px) {
  .shop-metrics { gap: 8px; }
  .shop-metric { padding: 12px; }
  .shop-metric strong { font-size: calc(19px * var(--font-scale, 1)); }
  .shop-catalog-header { align-items: stretch; flex-direction: column; }
  .shop-search-wrap { width: 100%; }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .shop-product-art { height: 58px; padding: 9px; }
  .shop-product-art > span { width: 33px; height: 33px; }
  .shop-product-details { padding: 9px; }
  .shop-product-bottom { align-items: flex-start; flex-direction: column; }
  .shop-add-button { width: 100%; }
  .shop-cart-line { align-items: flex-start; }
  .shop-cart-line-actions { flex-direction: column-reverse; align-items: flex-end; }
  .shop-register-items { max-width: 120px; }
}

/* Invoice document totals: shared, print-safe VAT breakdown */
.document-invoice-tax-summary {
  width: min(480px, 100%);
  display: grid;
  gap: 0;
  margin: 14px 0 0 auto;
  padding: 13px 15px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  background: #f8faff;
  break-inside: avoid;
  page-break-inside: avoid;
}
.document-invoice-tax-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  color: #52637c;
  font-size: calc(10px * var(--font-scale, 1));
  line-height: 1.45;
}
.document-invoice-tax-row > span { min-width: 0; }
.document-invoice-tax-row > strong,
.document-invoice-tax-row > div > strong {
  flex: 0 0 auto;
  color: #293d5c;
  font-weight: 800;
  white-space: nowrap;
}
.document-invoice-vat-row {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #e2e9f3;
  color: #254f91;
  font-weight: 750;
}
.document-invoice-final-row {
  align-items: center;
  margin-top: 5px;
  padding: 12px 0 8px;
  border-top: 1px solid #d8e3f2;
  color: #1e3558;
  font-size: calc(11px * var(--font-scale, 1));
  font-weight: 850;
}
.document-invoice-final-row > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.document-invoice-final-row > div > strong {
  color: #184b9d;
  font: 850 17px/1.25 'Manrope', sans-serif;
}
.document-invoice-balance-row {
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px dashed #d8e3f2;
  color: #243a5d;
  font-weight: 850;
}
body[data-theme="dark"] .document-invoice-tax-summary {
  background: #1b2d49;
  border-color: #344866;
}
body[data-theme="dark"] .document-invoice-tax-row { color: #c3d2e8; }
body[data-theme="dark"] .document-invoice-tax-row > strong,
body[data-theme="dark"] .document-invoice-tax-row > div > strong { color: #e1ebfa; }
body[data-theme="dark"] .document-invoice-vat-row,
body[data-theme="dark"] .document-invoice-final-row,
body[data-theme="dark"] .document-invoice-balance-row { border-color: #344866; }
@media (max-width: 520px) {
  .document-invoice-tax-summary { width: 100%; }
  .document-invoice-tax-row { font-size: calc(9px * var(--font-scale, 1)); }
}
@media print {
  .document-invoice-tax-summary { background: #f8faff !important; border: 1px solid #dfe7f1 !important; }
  .document-invoice-tax-row { color: #52637c !important; }
  .document-invoice-tax-row > strong,
  .document-invoice-tax-row > div > strong { color: #293d5c !important; }
  .document-invoice-vat-row,
  .document-invoice-final-row,
  .document-invoice-balance-row { border-color: #d8e3f2 !important; }
}

/* v1.1.1 — editable document templates and Help centre */
.document-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 28px;
}
.document-template-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.document-template-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue-500);
  box-shadow: 0 12px 26px rgba(31, 56, 96, .09);
}
.document-template-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: calc(20px * var(--font-scale, 1));
  font-weight: 800;
}
.document-template-copy { min-width: 0; }
.document-template-copy h3 { margin: 0 0 4px; color: #273752; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.document-template-copy p { margin: 0 0 6px; color: #718098; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
.document-template-copy small { color: var(--blue-700); font-size: calc(9px * var(--font-scale, 1)); font-weight: 700; }
.template-editor-intro {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--blue-100);
  border-radius: 12px;
  background: var(--blue-50);
  color: #31435f;
}
.template-editor-intro strong { display: block; margin-bottom: 5px; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.template-editor-intro p { margin: 0; color: #65758d; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.6; }
.document-template-intro,
.document-template-footer-note {
  margin: 13px 0;
  color: #52627b;
  font-size: calc(10px * var(--font-scale, 1));
  line-height: 1.7;
}
.document-template-footer-note {
  margin-top: 22px;
  padding: 11px 13px;
  border-left: 3px solid #b9c9e4;
  background: #f6f8fc;
}
.document-brand > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.document-brand > div h2 { display: block; }
.document-brand > div span { color: #74839a; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.45; overflow-wrap: anywhere; }

.help-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 19px 21px;
  background: linear-gradient(125deg, var(--blue-50), #fff 72%);
  border-color: var(--blue-100);
}
.help-intro-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 9px 20px rgba(52, 116, 244, .22);
  font: 800 calc(28px * var(--font-scale, 1)) Manrope, sans-serif;
}
.help-intro h2 { margin: 0 0 5px; color: #233550; font: 800 calc(15px * var(--font-scale, 1)) Manrope, sans-serif; }
.help-intro p { margin: 0; color: #6d7b91; font-size: calc(11px * var(--font-scale, 1)); line-height: 1.65; }
.help-guide-grid,
.help-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.help-guide-card { min-width: 0; padding: 17px 18px; }
.help-guide-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.help-guide-heading h3 { margin: 0 0 3px; color: #293953; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.help-guide-heading small { color: #8794a7; font-size: calc(9px * var(--font-scale, 1)); }
.help-guide-description { margin: 0 0 11px; color: #697991; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.65; }
.help-guide-card ol { margin: 0; padding-left: 19px; color: #52627b; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.75; }
.help-guide-card li { padding-left: 3px; margin: 4px 0; }
.help-resource-card { min-width: 0; padding: 16px; }
.help-resource-type,
.help-resource-category { color: var(--blue-700); font-size: calc(9px * var(--font-scale, 1)); font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.help-resource-category { display: inline-block; margin-bottom: 7px; padding: 4px 7px; border-radius: 6px; background: var(--blue-50); }
.help-resource-card h3 { margin: 6px 0; color: #293953; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.help-resource-card p { min-height: 32px; margin: 0 0 13px; color: #718098; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.55; }
.help-resource-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.help-empty { grid-column: 1 / -1; padding: 26px; border: 1px dashed #cbd6e5; border-radius: 13px; background: #fbfcfe; color: #718098; text-align: center; font-size: calc(11px * var(--font-scale, 1)); }
.help-storage-note { margin-top: 18px; }
.help-storage-note strong { color: #34455f; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.help-storage-note p { margin: 6px 0 0; color: #718098; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.65; }
.help-video-player-wrap { width: 100%; overflow: hidden; border-radius: 12px; background: #101b35; }
.help-video-player { display: block; width: 100%; max-height: min(68vh, 620px); background: #101b35; }
.button-danger-ghost { color: #c94752; background: transparent; border: 1px solid transparent; }
.button-danger-ghost:hover { color: #a92e3b; background: #fff0f1; border-color: #ffd9dd; }

@media (max-width: 900px) {
  .document-template-grid,
  .help-guide-grid,
  .help-resource-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .document-template-card { grid-template-columns: 38px minmax(0, 1fr); }
  .document-template-icon { width: 38px; height: 38px; }
  .document-template-card > button { grid-column: 1 / -1; width: 100%; }
  .help-intro { align-items: flex-start; padding: 15px; }
  .help-intro-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; font-size: calc(23px * var(--font-scale, 1)); }
}
@media print {
  .document-template-intro,
  .document-template-footer-note { color: #333 !important; background: transparent !important; }
}

/* v1.1.2 — Garage identity and access administration */
.garage-logo-manager {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #e2eaf5;
  border-radius: 13px;
  background: linear-gradient(135deg, #fbfcff, #f4f7fd);
}
.garage-logo-preview-wrap {
  display: grid;
  place-items: center;
  width: 116px;
  height: 94px;
  flex: 0 0 116px;
  padding: 9px;
  border: 1px dashed #c7d4e8;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.garage-logo-preview-wrap img,
.garage-logo-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 76px;
  object-fit: contain;
}
.garage-logo-placeholder { display: grid; justify-items: center; gap: 5px; color: #8a9bb3; }
.garage-logo-placeholder span { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: #fff; background: var(--blue-700); font: 800 calc(16px * var(--font-scale, 1)) Manrope, sans-serif; }
.garage-logo-placeholder small { font-size: calc(9px * var(--font-scale, 1)); }
.garage-logo-controls { display: grid; gap: 6px; min-width: 0; }
.garage-logo-controls > strong { color: #253b5b; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.garage-logo-controls > p { max-width: 520px; margin: 0; color: #687b96; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
.garage-logo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.garage-logo-choose { position: relative; cursor: pointer; }
.garage-logo-choose input { display: none !important; }
.garage-logo-controls > small { color: #71819a; font-size: calc(9px * var(--font-scale, 1)); }
.garage-identity-footer { display: flex; justify-content: flex-end; margin-top: 14px; }
.document-garage-slogan { margin: -3px 0 5px; color: #64748b; font-size: calc(10px * var(--font-scale, 1)); font-style: italic; font-weight: 600; letter-spacing: .15px; }

.access-security-note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin: -3px 0 14px; border: 1px solid #d8e5fa; border-radius: 12px; background: linear-gradient(120deg, #f6f9ff, #eff5ff); }
.access-security-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: #245ad7; background: #e3edff; font-size: calc(18px * var(--font-scale, 1)); font-weight: 800; }
.access-security-note strong { color: #24436e; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.access-security-note p { margin: 4px 0 0; color: #60728d; font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
.access-users-card { overflow: hidden; }
.access-table-sub { display: block; margin-top: 3px; color: #71819a; font-size: calc(9px * var(--font-scale, 1)); }
.access-user-actions { min-width: 66px; }
.access-user-actions button:disabled { opacity: .32; cursor: not-allowed; }
.access-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.access-role-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 14px; border: 1px solid #e4eaf3; border-radius: 12px; background: #fff; box-shadow: 0 4px 13px rgba(27, 54, 93, .035); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.access-role-card:hover { border-color: #c4d5f2; transform: translateY(-1px); box-shadow: 0 8px 19px rgba(27, 54, 93, .07); }
.access-role-copy { min-width: 0; }
.access-role-heading { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.access-role-heading > strong { color: #263b59; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.access-role-copy p { margin: 5px 0; color: #687b96; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.45; }
.access-role-copy small { color: #8290a4; font-size: calc(9px * var(--font-scale, 1)); }
.access-role-card .button { flex: 0 0 auto; }
.access-user-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; margin-bottom: 14px; border: 1px solid #e2eaf5; border-radius: 10px; background: #f8faff; }
.access-user-summary strong { color: #253b5b; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.access-user-summary span { color: #687b96; font-size: calc(9px * var(--font-scale, 1)); text-align: right; }
.access-credential-create { grid-column: 1 / -1; padding: 13px; border: 1px solid #e0e9f7; border-radius: 11px; background: #f9fbff; }
.access-credential-create > h4 { margin: 0 0 12px; color: #29466e; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.access-note { margin-top: 11px; }
.access-inherit-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 12px; margin-bottom: 13px; border: 1px solid #dfe8f5; border-radius: 10px; background: #f8faff; cursor: pointer; }
.access-inherit-toggle input { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2px; accent-color: var(--blue-600); }
.access-inherit-toggle span { display: grid; gap: 3px; }
.access-inherit-toggle strong { color: #29466e; font-size: calc(10px * var(--font-scale, 1)); }
.access-inherit-toggle small { color: #72839c; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.45; }
.access-permissions-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 0 10px; }
.access-permissions-heading h3 { margin: 0 0 4px; color: #263b59; font: 800 calc(13px * var(--font-scale, 1)) Manrope, sans-serif; }
.access-permissions-heading p { margin: 0; color: #71819a; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.4; }
.access-permission-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.access-permission-group { min-width: 0; padding: 12px; border: 1px solid #e4eaf3; border-radius: 11px; background: #fff; }
.access-permission-group h4 { margin: 0 0 10px; color: #29466e; font: 800 calc(10px * var(--font-scale, 1)) Manrope, sans-serif; }
.access-permission-grid { display: grid; gap: 8px; }
.access-permission-item { display: flex; align-items: flex-start; gap: 8px; color: #52647d; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.4; cursor: pointer; }
.access-permission-item input { width: 15px; height: 15px; flex: 0 0 15px; margin: 0; accent-color: var(--blue-600); }
.access-permission-groups.is-disabled,
#user-permission-checklist.is-disabled { opacity: .57; }
.access-permission-groups.is-disabled .access-permission-item { cursor: not-allowed; }
.access-user-actions button:hover:not(:disabled) { color: var(--blue-700); background: var(--blue-50); }

@media (max-width: 850px) {
  .access-role-grid { grid-template-columns: 1fr; }
  .access-permission-groups { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .garage-logo-manager { align-items: flex-start; flex-direction: column; }
  .garage-logo-preview-wrap { width: 100%; height: 100px; flex-basis: auto; }
  .access-role-card { align-items: flex-start; flex-direction: column; }
  .access-role-card .button { width: 100%; }
  .access-user-summary { align-items: flex-start; flex-direction: column; }
  .access-user-summary span { text-align: left; }
  .access-permissions-heading { align-items: flex-start; flex-direction: column; }
  .access-permissions-heading .button { width: 100%; }
}

/* v1.1.2 — explicit garage logo picker and access status states */
.garage-logo-choose { min-height: 34px; }
.garage-logo-file-input { display: none !important; }
.access-users-card .badge-amber { color: #8a5b0b; background: #fff3d5; border: 1px solid #f3dfad; }
.access-users-card .badge-red { color: #a7333e; background: #fff0f1; border: 1px solid #f5d2d6; }
.access-users-card .badge-green { color: #13734d; background: #e6f7ee; border: 1px solid #c8ebd8; }

/* v1.1.3 — live garage identity in the sidebar workspace card */
@media (max-width: 560px) {
  .workspace-card { min-height: 70px; gap: 10px; padding: 9px; }
  .workspace-avatar { width: 42px; height: 42px; flex-basis: 42px; }
  .workspace-card strong { font-size: calc(11px * var(--font-scale, 1)); }
  .workspace-card small { font-size: calc(9px * var(--font-scale, 1)); }
}


/* v1.1.4 — garage operating expenses, separate Shop ledger and report tools */
.expense-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-top: 1px solid #edf1f6; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
.expense-filters label { display: grid; gap: 5px; min-width: 150px; color: #64738b; font-size: calc(10px * var(--font-scale, 1)); font-weight: 700; }
.expense-filters input, .expense-filters select { min-width: 145px; height: 34px; border: 1px solid #dfe6f0; border-radius: 8px; padding: 0 9px; background: #fff; color: var(--ink); font-size: calc(11px * var(--font-scale, 1)); }
.expense-export-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #728098; font-size: calc(10px * var(--font-scale, 1)); }
.expense-export-actions > div { display: flex; gap: 7px; flex-wrap: wrap; }
.shop-ledger-card { margin: 16px 0; overflow: hidden; }
.shop-ledger-card .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-ledger-card .stat-card { min-width: 0; }
.shop-sales-card .table-scroll { max-height: 520px; }
.shop-register-items { display: block; min-width: 150px; max-width: 270px; white-space: normal; line-height: 1.45; }
#expenses-table tbody tr[hidden] { display: none; }
@media (max-width: 760px) {
  .expense-filters { align-items: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-filters label, .expense-filters input, .expense-filters select { min-width: 0; width: 100%; }
  .expense-export-actions { align-items: flex-start; flex-direction: column; }
  .shop-ledger-card .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .expense-filters { grid-template-columns: 1fr; }
  .shop-ledger-card .stats-grid { grid-template-columns: 1fr; }
  .expense-export-actions > div { width: 100%; }
  .expense-export-actions .button { flex: 1; }
}


/* v1.1.5 — report-specific filters, insurer statements and petty-cash signatures */
.report-filter-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line, #e4e9f1);
  border-radius: 12px;
  background: var(--surface-soft, #f8faff);
}
.report-filter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  color: var(--text, #24344d);
  font-size: calc(12px * var(--font-scale, 1));
}
.report-filter-heading span { color: var(--muted, #718096); font-size: calc(10px * var(--font-scale, 1)); }
.report-specific-filters { display: contents; }
.report-filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.report-filter-panel[hidden] { display: none !important; }
.document-signature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 46px 0 24px;
  break-inside: avoid;
}
.document-signature-block { min-width: 0; min-height: 118px; display: flex; flex-direction: column; justify-content: flex-end; color: #27364b; }
.document-signature-block strong { font-size: calc(11px * var(--font-scale, 1)); margin-bottom: 42px; }
.document-signature-line { height: 1px; width: 100%; border-bottom: 1px solid #64748b; }
.document-signature-block small { margin-top: 5px; font-size: calc(9px * var(--font-scale, 1)); color: #667085; }
.document-signature-date { margin-top: 14px; font-size: calc(9px * var(--font-scale, 1)); color: #475467; }
.insurance-statement-preview { padding: 22px; color: #27364b; background: #fff; }
.insurance-statement-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.insurance-statement-logo { width: 72px; height: 72px; object-fit: contain; }
.insurance-statement-logo-fallback { width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; border-radius: 12px; background: #1c3769; color: white; font-weight: 800; }
.insurance-statement-brand h2 { margin: 0 0 4px; }
.insurance-statement-brand p { margin: 0; font-size: calc(10px * var(--font-scale, 1)); color: #64748b; }
.insurance-statement-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid #dce3ed; border-bottom: 1px solid #dce3ed; }
.insurance-statement-meta div { display: grid; gap: 4px; }
.insurance-statement-meta small, .insurance-statement-metrics small { font-size: calc(9px * var(--font-scale, 1)); text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.insurance-statement-meta strong { font-size: calc(12px * var(--font-scale, 1)); }
.insurance-statement-meta span { font-size: calc(10px * var(--font-scale, 1)); color: #64748b; }
.insurance-statement-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; padding: 16px 0; }
.insurance-statement-metrics > div { border: 1px solid #e1e7ef; border-radius: 9px; padding: 10px; }
.insurance-statement-metrics strong { display: block; margin-top: 5px; font-size: calc(15px * var(--font-scale, 1)); }
.insurance-statement-total th { background: #f1f5fb; }
@media (max-width: 760px) {
  .document-signature-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .document-signature-block { min-height: 104px; }
  .document-signature-block strong { margin-bottom: 34px; }
  .insurance-statement-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .insurance-statement-meta { grid-template-columns: 1fr; }
  .report-filter-panel { padding: 12px; }
  .report-filter-actions { flex-wrap: wrap; }
}
@media print {
  .document-signature-grid { margin-top: 42px; }
  .insurance-statement-preview { padding: 0; }
  .insurance-statement-metrics > div { break-inside: avoid; }
}

/* Shop workspace: distinct pages within the Shop ledger */
.shop-subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line, #e4e9f1);
  border-radius: 13px;
  background: var(--surface, #fff);
  scrollbar-width: thin;
}
.shop-subnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted, #667085);
  font: inherit;
  font-size: calc(11px * var(--font-scale, 1));
  font-weight: 650;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.shop-subnav-link:hover { background: var(--surface-soft, #f5f7fb); color: var(--text, #1f2937); }
.shop-subnav-link.active { background: var(--primary-soft, #edf3ff); color: var(--primary, #3157a4); }
.shop-subnav-link span { font-size: calc(14px * var(--font-scale, 1)); }
.shop-subnav + .shop-metrics,
.shop-subnav + .shop-pos-layout,
.shop-subnav + .card { margin-top: 0; }
.shop-metrics { margin-bottom: 16px; }
.shop-sales-table-wrap, #shop-sales-table, #shop-purchases-table, #shop-inventory-table { min-width: 780px; }
#shop-sales-table td, #shop-purchases-table td, #shop-inventory-table td { vertical-align: middle; }
#shop-sales-table .table-actions, #shop-purchases-table .table-actions { flex-wrap: wrap; }
.shop-subnav-link:focus-visible { outline: 2px solid var(--primary, #3157a4); outline-offset: 2px; }
@media (max-width: 760px) {
  .shop-subnav { margin-bottom: 14px; }
  .shop-subnav-link { padding: 8px 10px; font-size: calc(10px * var(--font-scale, 1)); }
  .shop-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-metrics .shop-metric strong { font-size: calc(19px * var(--font-scale, 1)); }
}

/* Auto GMS v1.2.1 — polished Shop dashboard and workspace navigation */
.shop-subnav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  padding: 9px;
  margin: 0 0 22px;
  overflow: visible;
  border: 1px solid #e2e9f5;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(24, 47, 88, .045);
  scrollbar-width: none;
}
.shop-subnav::-webkit-scrollbar { display: none; }
.shop-subnav-link {
  position: relative;
  min-width: 0;
  min-height: 43px;
  justify-content: flex-start;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #61718d;
  font-size: calc(11px * var(--font-scale, 1));
  font-weight: 750;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.shop-subnav-link > span {
  width: 25px;
  height: 25px;
  display: inline-grid;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 8px;
  background: #f0f4fc;
  color: #526b9b;
  font-size: calc(13px * var(--font-scale, 1));
  transition: background .18s ease, color .18s ease;
}
.shop-subnav-link:hover {
  transform: translateY(-1px);
  border-color: #dce6f8;
  background: #f7f9ff;
  color: #244fba;
  box-shadow: 0 5px 13px rgba(35, 76, 160, .07);
}
.shop-subnav-link:hover > span { background: #e7efff; color: #245ad7; }
.shop-subnav-link.active {
  border-color: #dce7ff;
  background: linear-gradient(135deg, #edf3ff, #f6f8ff);
  color: #214fb9;
  box-shadow: inset 0 0 0 1px rgba(52, 116, 244, .035);
}
.shop-subnav-link.active > span { background: #dce8ff; color: #245ad7; }
.shop-subnav-link:focus-visible { outline: 3px solid rgba(52, 116, 244, .22); outline-offset: 2px; }

.shop-dashboard-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 310px);
  align-items: center;
  gap: 26px;
  overflow: hidden;
  padding: 27px 30px;
  margin: 0 0 24px;
  border: 1px solid rgba(112, 151, 235, .28);
  border-radius: 19px;
  color: #fff;
  background: radial-gradient(circle at 84% 18%, rgba(118, 160, 255, .30), transparent 28%), linear-gradient(118deg, #15264b 0%, #203d80 58%, #285bd0 100%);
  box-shadow: 0 15px 34px rgba(31, 70, 155, .16), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.shop-dashboard-hero::before,
.shop-dashboard-hero::after {
  position: absolute;
  z-index: -1;
  content: '';
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  pointer-events: none;
}
.shop-dashboard-hero::before { width: 310px; height: 310px; top: -210px; right: 80px; box-shadow: 0 0 0 32px rgba(255,255,255,.025), 0 0 0 68px rgba(255,255,255,.02); }
.shop-dashboard-hero::after { width: 230px; height: 230px; right: -115px; bottom: -165px; }
.shop-dashboard-hero-copy { min-width: 0; max-width: 720px; }
.shop-dashboard-eyebrow { display: inline-block; margin-bottom: 9px; color: #b9d0ff; font-size: calc(9px * var(--font-scale, 1)); font-weight: 850; letter-spacing: 1.7px; }
.shop-dashboard-hero-copy h2 { margin: 0 0 8px; color: #fff; font: 800 clamp(20px, 2.3vw, 27px)/1.2 Manrope, sans-serif; letter-spacing: -.8px; }
.shop-dashboard-hero-copy p { max-width: 630px; margin: 0; color: #d3def6; font-size: calc(12px * var(--font-scale, 1)); line-height: 1.7; }
.shop-dashboard-hero-actions { display: grid; gap: 9px; }
.shop-hero-action {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(221, 232, 255, .27);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,.095);
  text-align: left;
  backdrop-filter: blur(8px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.shop-hero-action:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.52); background: rgba(255,255,255,.16); box-shadow: 0 9px 22px rgba(5, 17, 46, .18); }
.shop-hero-action > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: calc(17px * var(--font-scale, 1)); font-weight: 800; }
.shop-hero-action > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.shop-hero-action strong { color: #fff; font: 800 calc(11px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-hero-action small { color: #c9d8f6; font-size: calc(9px * var(--font-scale, 1)); }
.shop-hero-action > b { color: #cfe0ff; font-size: calc(15px * var(--font-scale, 1)); text-align: right; }
.shop-hero-action-primary { border-color: rgba(255,255,255,.55); background: #fff; box-shadow: 0 6px 18px rgba(7, 22, 61, .13); }
.shop-hero-action-primary:hover { background: #f3f7ff; }
.shop-hero-action-primary > span:first-child { color: #fff; background: linear-gradient(135deg, #4d83f3, #245ad7); }
.shop-hero-action-primary strong { color: #203d7b; }
.shop-hero-action-primary small, .shop-hero-action-primary > b { color: #6b7fa8; }

.shop-dashboard-section { margin: 0 0 24px; }
.shop-dashboard-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 0 0 13px; }
.shop-dashboard-section-heading .eyebrow { display: block; margin: 0 0 4px; font-size: calc(8px * var(--font-scale, 1)); letter-spacing: 1.5px; }
.shop-dashboard-section-heading h2 { margin: 0; color: #233653; font: 800 calc(16px * var(--font-scale, 1)) Manrope, sans-serif; letter-spacing: -.35px; }
.shop-dashboard-section-heading p { margin: 4px 0 0; color: #8996aa; font-size: calc(10px * var(--font-scale, 1)); }
.shop-dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-dashboard-stat {
  --shop-stat-color: #285bd0;
  --shop-stat-soft: #edf3ff;
  position: relative;
  min-width: 0;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: 15px 16px 13px;
  border: 1px solid #e4eaf3;
  border-radius: 15px;
  color: #263a59;
  background: linear-gradient(145deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 5px 17px rgba(27, 49, 84, .035);
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.shop-dashboard-stat::after { position: absolute; width: 105px; height: 105px; right: -58px; bottom: -66px; border-radius: 50%; background: var(--shop-stat-soft); content: ''; opacity: .85; transition: transform .2s ease; }
.shop-dashboard-stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--shop-stat-color) 38%, #e4eaf3); box-shadow: 0 12px 24px rgba(30, 61, 117, .09); }
.shop-dashboard-stat:hover::after { transform: scale(1.35); }
.shop-dashboard-stat:focus-visible, .shop-dashboard-tile:focus-visible { outline: 3px solid rgba(52, 116, 244, .22); outline-offset: 2px; }
.shop-dashboard-stat-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #71809a; font-size: calc(10px * var(--font-scale, 1)); font-weight: 800; }
.shop-dashboard-stat-top i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--shop-stat-color); background: var(--shop-stat-soft); font-size: calc(15px * var(--font-scale, 1)); font-style: normal; font-weight: 850; }
.shop-dashboard-stat > strong { position: relative; z-index: 1; display: block; margin: 8px 0 2px; color: #203655; font: 800 clamp(19px, 2vw, 23px)/1.2 Manrope, sans-serif; letter-spacing: -.55px; overflow-wrap: anywhere; }
.shop-dashboard-stat > small { position: relative; z-index: 1; min-height: 15px; color: #8996aa; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.5; }
.shop-dashboard-stat > b { position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 10px; color: var(--shop-stat-color); font-size: calc(9px * var(--font-scale, 1)); font-weight: 850; }
.shop-stat-blue { --shop-stat-color: #245ad7; --shop-stat-soft: #eaf1ff; }
.shop-stat-amber { --shop-stat-color: #a96b18; --shop-stat-soft: #fff3df; }
.shop-stat-violet { --shop-stat-color: #7655c8; --shop-stat-soft: #f1edff; }
.shop-stat-green { --shop-stat-color: #16845f; --shop-stat-soft: #e9f8f1; }
.shop-stat-sky { --shop-stat-color: #2876a8; --shop-stat-soft: #e8f5fd; }
.shop-stat-red { --shop-stat-color: #bd4c5a; --shop-stat-soft: #fff0f1; }
.shop-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-dashboard-tile {
  min-width: 0;
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px solid #e4eaf3;
  border-radius: 15px;
  color: #243955;
  background: #fff;
  box-shadow: 0 5px 17px rgba(27, 49, 84, .03);
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.shop-dashboard-tile:hover { transform: translateY(-3px); border-color: #bfd0f4; background: linear-gradient(145deg, #fff, #f8faff); box-shadow: 0 12px 25px rgba(30, 61, 117, .085); }
.shop-dashboard-icon { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border: 1px solid #e1eaff; border-radius: 12px; color: #285bd0; background: linear-gradient(145deg, #edf3ff, #e5edff); font-size: calc(19px * var(--font-scale, 1)); font-weight: 800; transition: transform .2s ease, background .2s ease; }
.shop-dashboard-tile:hover .shop-dashboard-icon { transform: scale(1.06) rotate(-3deg); background: #dce8ff; }
.shop-dashboard-tile-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-height: 78px; }
.shop-dashboard-tile-copy > strong { color: #263a59; font: 800 calc(12px * var(--font-scale, 1)) Manrope, sans-serif; }
.shop-dashboard-tile-copy > small { margin-top: 5px; color: #8592a7; font-size: calc(9px * var(--font-scale, 1)); line-height: 1.55; }
.shop-dashboard-tile-copy > b { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 9px; color: #2a5ecf; font-size: calc(9px * var(--font-scale, 1)); font-weight: 850; }
.shop-dashboard-tile-primary { border-color: #cddcff; background: linear-gradient(145deg, #f1f5ff, #fff 82%); }
.shop-dashboard-tile-primary .shop-dashboard-icon { color: #fff; border-color: transparent; background: linear-gradient(145deg, #4b80f0, #245ad7); box-shadow: 0 6px 13px rgba(43, 91, 203, .18); }
.shop-dashboard-tile-primary:hover { border-color: #9ebaf5; background: linear-gradient(145deg, #eaf1ff, #fff); }

body[data-theme="dark"] .shop-subnav { border-color: #2b3d5e; background: #15223b; box-shadow: none; }
body[data-theme="dark"] .shop-subnav-link { color: #aab9d1; }
body[data-theme="dark"] .shop-subnav-link > span { color: #a8c3ff; background: #203455; }
body[data-theme="dark"] .shop-subnav-link:hover { border-color: #3a5480; color: #e8f0ff; background: #1b2d4d; }
body[data-theme="dark"] .shop-subnav-link.active { border-color: #3f5f9a; color: #cfe0ff; background: #20385f; }
body[data-theme="dark"] .shop-subnav-link.active > span { color: #d7e5ff; background: #2c4b7c; }
body[data-theme="dark"] .shop-dashboard-section-heading h2 { color: #e5edfb; }
body[data-theme="dark"] .shop-dashboard-section-heading p { color: #9dadc5; }
body[data-theme="dark"] .shop-dashboard-stat, body[data-theme="dark"] .shop-dashboard-tile { border-color: #2e4264; color: #e3ecfb; background: linear-gradient(145deg, #172743, #15223b); box-shadow: none; }
body[data-theme="dark"] .shop-dashboard-stat:hover, body[data-theme="dark"] .shop-dashboard-tile:hover { border-color: #5475b3; background: #1b2e4d; box-shadow: 0 12px 25px rgba(0,0,0,.16); }
body[data-theme="dark"] .shop-dashboard-stat-top, body[data-theme="dark"] .shop-dashboard-stat > small, body[data-theme="dark"] .shop-dashboard-tile-copy > small { color: #a9b9d0; }
body[data-theme="dark"] .shop-dashboard-stat > strong, body[data-theme="dark"] .shop-dashboard-tile-copy > strong { color: #e5edfb; }
body[data-theme="dark"] .shop-dashboard-icon { border-color: #345080; color: #c7d9ff; background: #20385f; }
body[data-theme="dark"] .shop-dashboard-tile-primary { border-color: #45639b; background: linear-gradient(145deg, #1a3157, #172743); }
body[data-theme="dark"] .shop-dashboard-tile-primary .shop-dashboard-icon { color: #fff; background: linear-gradient(145deg, #477ce9, #244fba); }

@media (max-width: 1120px) {
  .shop-subnav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-dashboard-hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 270px); padding: 23px; }
  .shop-dashboard-stats, .shop-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shop-subnav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 7px; }
  .shop-subnav-link { justify-content: flex-start; padding: 8px 9px; font-size: calc(10px * var(--font-scale, 1)); }
  .shop-dashboard-hero { grid-template-columns: 1fr; gap: 18px; padding: 21px; }
  .shop-dashboard-hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .shop-subnav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-subnav-link { white-space: normal; line-height: 1.25; }
  .shop-dashboard-stats, .shop-dashboard-grid { grid-template-columns: 1fr; gap: 9px; }
  .shop-dashboard-stat { min-height: 116px; }
  .shop-dashboard-tile { min-height: 98px; }
  .shop-dashboard-hero-actions { grid-template-columns: 1fr; }
  .shop-dashboard-section { margin-bottom: 20px; }
}


/* Auto GMS v1.2.2 — Shop cashier, partner and payment experience */
.shop-subnav-spacer{flex:1 1 auto}.shop-session-user{font-size: calc(10px * var(--font-scale, 1));font-weight:800;color:#64748b;padding:8px 10px;white-space:nowrap}.shop-subnav-logout{border:1px solid #dce4f1;border-radius:10px;background:#fff;color:#52617a;font-weight:800;font-size: calc(10px * var(--font-scale, 1));padding:9px 12px;cursor:pointer;transition:.18s}.shop-subnav-logout:hover{border-color:#9eb8ed;background:#f3f7ff;color:#285bd0;transform:translateY(-1px)}
.shop-pos-customer-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;margin:0 0 15px;border:1px solid #dce6f7;background:linear-gradient(110deg,#fff,#f5f8ff);box-shadow:0 8px 22px rgba(33,62,112,.045)}.shop-pos-customer-copy{display:grid;gap:3px;min-width:180px}.shop-pos-customer-copy .eyebrow{font-size: calc(8px * var(--font-scale, 1));letter-spacing:1.4px;color:#5976b0;font-weight:900}.shop-pos-customer-copy strong{font:800 calc(15px * var(--font-scale, 1)) Manrope,sans-serif;color:#203655}.shop-pos-customer-copy small{font-size: calc(10px * var(--font-scale, 1));color:#8a97ab}.shop-pos-customer-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}.shop-customer-mode{display:flex;padding:3px;border:1px solid #dce5f4;border-radius:12px;background:#edf2fa}.shop-customer-mode button{border:0;border-radius:9px;padding:8px 12px;background:transparent;color:#65738b;font-size: calc(10px * var(--font-scale, 1));font-weight:850;cursor:pointer;transition:.18s}.shop-customer-mode button.active{color:#fff;background:linear-gradient(135deg,#4478eb,#2854c7);box-shadow:0 4px 10px rgba(45,89,194,.2)}#shop-pos-customer-select{min-width:190px;max-width:280px;border:1px solid #dce5f4;border-radius:10px;padding:9px 11px;background:#fff;color:#283b59;font-size: calc(11px * var(--font-scale, 1));font-weight:650}
.shop-payment-summary{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;margin-bottom:18px;border:1px solid rgba(149,179,240,.25);border-radius:16px;background:radial-gradient(circle at 88% 20%,rgba(111,153,255,.35),transparent 35%),linear-gradient(120deg,#172e57,#244f9d);color:#fff}.shop-payment-summary>div:first-child{display:grid;gap:4px}.shop-payment-summary .eyebrow{font-size: calc(8px * var(--font-scale, 1));letter-spacing:1.5px;color:#bed1f9;font-weight:900}.shop-payment-summary strong{font:850 27px/1.15 Manrope,sans-serif;letter-spacing:-.7px}.shop-payment-summary small{font-size: calc(10px * var(--font-scale, 1));color:#d0dcf4}.shop-payment-summary-mark{display:grid;place-items:center;width:48px;height:48px;border:1px solid rgba(255,255,255,.24);border-radius:14px;background:rgba(255,255,255,.12);font:900 calc(13px * var(--font-scale, 1)) Manrope}.shop-payment-mode-heading{margin:2px 0 10px}.shop-payment-mode-heading .eyebrow{font-size: calc(8px * var(--font-scale, 1));color:#7185a7;font-weight:900;letter-spacing:1.4px}.shop-payment-mode-heading h3{margin:3px 0;color:#233a5d;font:850 17px Manrope}.shop-payment-mode-heading p{margin:0;color:#8290a5;font-size: calc(10px * var(--font-scale, 1))}.shop-payment-method-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.shop-payment-method{display:flex;align-items:center;gap:11px;min-width:0;text-align:left;padding:12px;border:1px solid #e0e7f2;border-radius:13px;background:linear-gradient(145deg,#fff,#fbfcff);cursor:pointer;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.shop-payment-method:hover{transform:translateY(-2px);border-color:#b9cdf4;box-shadow:0 9px 20px rgba(38,77,148,.09)}.shop-payment-method.active{border-color:#5784e7;background:linear-gradient(145deg,#f0f5ff,#fff);box-shadow:0 0 0 3px rgba(65,112,220,.1)}.shop-payment-method-icon{display:grid;place-items:center;flex:0 0 35px;height:35px;border-radius:11px;background:#edf3ff;color:#285bd0;font:900 calc(14px * var(--font-scale, 1)) Manrope}.shop-payment-method:nth-child(1) .shop-payment-method-icon{background:#e7f7ef;color:#16865f}.shop-payment-method:nth-child(2) .shop-payment-method-icon{background:#fff3e1;color:#ba781b}.shop-payment-method:nth-child(3) .shop-payment-method-icon{background:#eaf1ff;color:#355fba}.shop-payment-method:nth-child(4) .shop-payment-method-icon{background:#f2edff;color:#7055b7}.shop-payment-method:nth-child(5) .shop-payment-method-icon{background:#eaf2fb;color:#405b86}.shop-payment-method>span:nth-child(2){display:grid;gap:3px;min-width:0;flex:1}.shop-payment-method strong{font:850 11px Manrope;color:#273c5d}.shop-payment-method small{font-size: calc(9px * var(--font-scale, 1));color:#8c99ad;line-height:1.35}.shop-payment-method>b{color:#5176c5;font-size: calc(15px * var(--font-scale, 1))}.shop-payment-detail{margin-top:12px}.shop-payment-empty{display:grid;justify-items:center;gap:5px;padding:24px;border:1px dashed #d7e0ee;border-radius:14px;background:#f8faff;color:#8290a5}.shop-payment-empty>span{font-size: calc(25px * var(--font-scale, 1));color:#6585ca}.shop-payment-empty strong{font:800 calc(12px * var(--font-scale, 1)) Manrope;color:#536581}.shop-payment-empty small{font-size: calc(9px * var(--font-scale, 1))}.shop-payment-inner{padding:15px;border:1px solid #dce6f5;border-radius:15px;background:linear-gradient(145deg,#fbfcff,#f4f7fd)}.shop-payment-inner-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.shop-payment-inner-title>div{display:grid;gap:3px}.shop-payment-inner-title strong{font:850 12px Manrope;color:#273d60}.shop-payment-inner-title small{font-size: calc(9px * var(--font-scale, 1));color:#8291a7}.shop-payment-mini-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e7efff;color:#315fc5;font-weight:900}.shop-payment-mini-icon.mpesa{background:#e7f8ef;color:#159263}.shop-payment-mini-icon.cash{background:#fff0db;color:#bd7a17}.shop-payment-mini-icon.bank{background:#e8f0ff;color:#3862bd}.shop-payment-mini-icon.credit{background:#f1edff;color:#7356b9}.shop-payment-mini-icon.split{background:#eaf1f8;color:#4d668e}.shop-payment-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.shop-stk-button{margin-bottom:1px;min-height:39px;white-space:nowrap}.shop-change-display{display:grid;align-content:center;gap:5px;padding:10px 13px;border:1px solid #cfe9dc;border-radius:11px;background:#effaf4}.shop-change-display span{font-size: calc(8px * var(--font-scale, 1));font-weight:900;color:#338565;letter-spacing:1px}.shop-change-display strong{font:850 17px Manrope;color:#08764f}.shop-payment-totals{display:grid;gap:8px;padding:14px 2px 2px;margin-top:12px;border-top:1px solid #e7edf6}.shop-payment-totals>div{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#74839a;font-size: calc(10px * var(--font-scale, 1))}.shop-payment-totals strong{color:#334967;font:800 calc(11px * var(--font-scale, 1)) Manrope}.shop-payment-totals .shop-payment-grand-total{padding-top:9px;border-top:1px dashed #dfe6f1;color:#253d61;font-weight:900}.shop-payment-grand-total strong{font:900 calc(18px * var(--font-scale, 1)) Manrope;color:#214eae}.shop-split-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.shop-split-total{display:flex;justify-content:space-between;margin-top:10px;padding:10px 12px;border-radius:10px;background:#eaf1ff;color:#48648f;font-size: calc(10px * var(--font-scale, 1));font-weight:800}.shop-split-total strong{font:850 14px Manrope;color:#244f9d}
.shop-login-shell{min-height:65vh;display:grid;place-items:center;padding:25px 12px}.shop-login-card{width:min(100%,460px);padding:30px;border:1px solid #e1e8f3;border-radius:22px;background:linear-gradient(145deg,#fff,#f7f9fe);box-shadow:0 22px 55px rgba(29,57,104,.1)}.shop-login-brand{display:flex;align-items:center;gap:10px;margin-bottom:18px}.shop-login-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,#4b80f0,#214fb8);color:#fff;font:900 calc(13px * var(--font-scale, 1)) Manrope;box-shadow:0 7px 16px rgba(47,92,196,.22)}.shop-login-brand .eyebrow{font-size: calc(8px * var(--font-scale, 1));color:#5977b3;letter-spacing:1.3px;font-weight:900}.shop-login-card h1{margin:0 0 8px;font:850 23px Manrope;color:#203758;letter-spacing:-.6px}.shop-login-card>p{margin:0 0 18px;color:#8492a8;font-size: calc(11px * var(--font-scale, 1));line-height:1.65}.shop-login-form{display:grid;gap:13px}.shop-login-form .field input{min-height:42px}.shop-login-submit{width:100%;justify-content:center;margin-top:5px}.shop-login-hint{display:block;margin-top:13px;text-align:center;color:#8a98ad;font-size: calc(9px * var(--font-scale, 1))}.shop-admin-entry,.shop-back-entry{width:100%;justify-content:center;margin-top:12px}.shop-accent-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.shop-accent-option,.shop-font-size-option{display:grid;gap:7px;padding:10px;border:1px solid #e1e8f2;border-radius:12px;background:#fff;cursor:pointer;transition:.18s}.shop-accent-option.selected,.shop-font-size-option.selected{border-color:#5d83dc;box-shadow:0 0 0 3px rgba(61,99,232,.09);background:#f7f9ff}.shop-accent-option input,.shop-font-size-option input{position:absolute;opacity:0;pointer-events:none}.shop-accent-swatches{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;height:15px;overflow:hidden;border-radius:5px}.shop-accent-swatches i{display:block}.shop-accent-option strong,.shop-font-size-option strong{font-size: calc(10px * var(--font-scale, 1));color:#435875}.shop-font-size-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.shop-font-size-option{display:flex;align-items:center;justify-content:space-between}.shop-font-size-option span{font:850 14px Manrope;color:#2d5fc7}.shop-settings-block{padding:16px 0;border-bottom:1px solid #edf1f7}.shop-settings-block:last-child{border-bottom:0}.shop-settings-block h3{margin:0 0 4px;color:#263c5d;font:850 13px Manrope}.shop-settings-block>p{margin:0 0 12px;color:#8592a7;font-size: calc(10px * var(--font-scale, 1))}.shop-logo-setting-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px;border:1px dashed #d7e0ee;border-radius:12px;background:#f8faff}.shop-settings-logo-preview,.shop-settings-logo-placeholder{width:54px;height:54px;object-fit:contain;border-radius:10px;background:#fff;border:1px solid #e2e8f2}.shop-settings-logo-placeholder{display:grid;place-items:center;color:#fff;background:#285bd0;font:900 calc(17px * var(--font-scale, 1)) Manrope}.shop-logo-setting-row small{font-size: calc(9px * var(--font-scale, 1));color:#8a97aa}.shop-vat-choice-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.shop-vat-choice{display:flex;align-items:flex-start;gap:8px;padding:11px;border:1px solid #dfe7f2;border-radius:11px;background:#fff;cursor:pointer}.shop-vat-choice.selected{border-color:#6388e0;background:#f4f7ff;box-shadow:0 0 0 2px rgba(61,99,232,.08)}.shop-vat-choice input{margin:2px 0 0;accent-color:#315fc9}.shop-vat-choice span{display:grid;gap:4px}.shop-vat-choice strong{font-size: calc(10px * var(--font-scale, 1));color:#3b5274}.shop-vat-choice small{font-size: calc(9px * var(--font-scale, 1));color:#8794a8;line-height:1.4}.shop-product-form-intro{padding:12px 14px;margin-bottom:14px;border:1px solid #dfe8f7;border-radius:12px;background:linear-gradient(110deg,#f3f7ff,#fff)}.shop-product-form-intro strong{color:#284d94;font:850 12px Manrope}.shop-product-form-intro p{margin:4px 0 0;color:#8493a9;font-size: calc(10px * var(--font-scale, 1));line-height:1.5}
body[data-theme="dark"] .shop-pos-customer-bar,body[data-theme="dark"] .shop-payment-inner,body[data-theme="dark"] .shop-login-card,body[data-theme="dark"] .shop-accent-option,body[data-theme="dark"] .shop-font-size-option{background:linear-gradient(145deg,#172743,#142139);border-color:#304667;color:#e5edfb}body[data-theme="dark"] .shop-pos-customer-copy strong,body[data-theme="dark"] .shop-payment-mode-heading h3,body[data-theme="dark"] .shop-payment-method strong,body[data-theme="dark"] .shop-payment-inner-title strong,body[data-theme="dark"] .shop-login-card h1,body[data-theme="dark"] .shop-settings-block h3{color:#e5edfb}body[data-theme="dark"] .shop-payment-method{background:#192b48;border-color:#304667}body[data-theme="dark"] .shop-payment-method.active{background:#20365b;border-color:#6d91e2}body[data-theme="dark"] .shop-payment-empty{background:#172742;border-color:#304667}body[data-theme="dark"] .shop-vat-choice{background:#192b48;border-color:#304667}body[data-theme="dark"] .shop-vat-choice.selected{background:#21385d;border-color:#6d91e2}body[data-theme="dark"] .shop-payment-totals strong{color:#d9e5fa}body[data-theme="dark"] .shop-accent-option strong,body[data-theme="dark"] .shop-font-size-option strong{color:#c8d8f3}
@media(max-width:760px){.shop-pos-customer-bar{align-items:flex-start;flex-direction:column}.shop-pos-customer-controls{width:100%;justify-content:flex-start}.shop-customer-mode{width:100%}.shop-customer-mode button{flex:1}#shop-pos-customer-select{flex:1;min-width:150px}.shop-payment-method-grid{grid-template-columns:1fr}.shop-split-grid,.shop-vat-choice-group{grid-template-columns:1fr}.shop-payment-input-row{grid-template-columns:1fr}.shop-accent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-font-size-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-session-user{display:none}.shop-subnav-logout{margin-left:auto}}


/* v1.2.3 — readable large-type layout without viewport zoom overflow */
:root { --font-scale: 1; --garage-logo-size: 64px; }
.modal-root, .modal-backdrop { width: 100%; }
.modal-backdrop { box-sizing: border-box; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); overflow-y: auto; }
.modal, .modal.modal-wide, .modal.modal-narrow {
  min-width: 0; width: min(100%, 980px); max-width: 100%;
  max-height: min(92dvh, 960px);
}
.modal.modal-narrow { width: min(100%, 480px); }
.modal:not(.modal-wide):not(.modal-narrow) { width: min(100%, 720px); }
.modal-head, .modal-foot, .modal-foot-left, .modal-foot-right { min-width: 0; }
.modal-head > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.modal-head p { overflow-wrap: anywhere; }
.modal-foot { flex-wrap: wrap; }
.modal-foot-left, .modal-foot-right { flex-wrap: wrap; }
.modal-foot .button { min-height: 37px; white-space: normal; overflow-wrap: anywhere; }
.modal-body { min-width: 0; overflow-y: auto; overflow-x: auto; max-height: none; }
.modal-body :is(.field-grid, .settings-grid, .shop-accent-grid, .shop-font-size-grid, .shop-vat-choice-group, .shop-payment-method-grid) { min-width: 0; }
.modal-body :is(input, select, textarea, button, label) { max-width: 100%; }
.modal-body :is(table, .table-scroll, .document-preview) { max-width: 100%; }
.modal-body .table-scroll, .modal-body .document-preview { overflow-x: auto; }
.settings-grid > *, .field-grid > *, .shop-accent-grid > *, .shop-font-size-grid > * { min-width: 0; }
:where(.settings-card,.card,.shop-cart-panel,.shop-catalog-panel,.pos-checkout-banner) { max-width: 100%; }
.garage-logo-preview-wrap { width: min(100%, calc(var(--garage-logo-size) + 26px)); min-height: calc(var(--garage-logo-size) + 20px); height: auto; flex: 0 0 auto; }
.garage-logo-preview-wrap img { width: var(--garage-logo-size); height: var(--garage-logo-size); max-height: none; max-width: 100%; }
.garage-logo-resize { display: grid; gap: 6px; width: min(100%, 340px); margin-top: 10px; padding-top: 10px; border-top: 1px solid #dbe4f2; }
.garage-logo-resize label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-weight: 800; color: #344867; }
.garage-logo-resize output { color: var(--blue-700); font-weight: 800; }
.garage-logo-resize input { width: 100%; accent-color: var(--blue-600); }
.document-brand img, .insurance-statement-logo { width: var(--garage-logo-size); height: var(--garage-logo-size); max-width: 100%; object-fit: contain; }
.workspace-avatar.has-logo { width: clamp(42px, var(--garage-logo-size), 72px); height: clamp(42px, var(--garage-logo-size), 72px); flex: 0 0 auto; }
.workspace-logo-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.sidebar-scrim { display: none; }
@media (max-width: 820px) {
 .sidebar { z-index: 90; max-width: min(84vw, 320px); transform: translate3d(-110%,0,0); transition: transform .28s cubic-bezier(.22,.68,0,1); will-change: transform; }
 .sidebar.open { transform: translate3d(0,0,0); }
 .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(8,18,39,.55); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .28s ease, visibility .28s ease; }
 body.mobile-nav-open .sidebar-scrim { opacity: 1; visibility: visible; pointer-events: auto; }
 body.mobile-nav-open { overflow: hidden; }
 .modal-backdrop { padding: 8px; align-items: center; }
 .modal, .modal.modal-wide, .modal.modal-narrow { width: 100%; max-height: calc(100dvh - 16px); }
 .modal-head { padding: 13px 15px; }
 .modal-body { padding: 14px 15px; }
 .modal-foot { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 15px max(12px, env(safe-area-inset-bottom)); }
 .modal-foot-left { display: flex; width: 100%; flex-wrap: wrap; }
 .modal-foot-right { width: 100%; }
 .modal-foot-left > .button, .modal-foot-right > .button { flex: 1 1 140px; }
 .modal-body .shop-accent-grid, .modal-body .shop-font-size-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .modal-body .shop-vat-choice-group, .modal-body .shop-payment-method-grid, .modal-body .shop-split-grid { grid-template-columns: minmax(0,1fr); }
 .garage-logo-preview-wrap { width: min(100%, calc(var(--garage-logo-size) + 26px)); min-height: calc(var(--garage-logo-size) + 20px); }
}
@media (max-width: 420px) {
 .modal .field-grid, .modal .shop-payment-input-row { grid-template-columns: minmax(0, 1fr); }
 .modal-foot-left > .button, .modal-foot-right > .button { flex: 1 1 100%; }
 .modal .shop-accent-grid, .modal .shop-font-size-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
 .sidebar, .sidebar-scrim { transition: none !important; }
}
@media print { :root { --font-scale: 1 !important; } }

/* v1.2.3 multi-product supplier orders: retained from amended v1.2.1 */
.shop-supplier-price-editor, .shop-purchase-lines-editor { margin-top: 16px; padding: 15px; border: 1px solid #e3eaf4; border-radius: 12px; background: #fbfcff; }
.shop-supplier-price-heading, .shop-purchase-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shop-supplier-price-heading strong, .shop-purchase-lines-heading strong { display: block; color: #263b5a; font: 800 11px Manrope, sans-serif; }
.shop-supplier-price-heading p, .shop-purchase-lines-heading p { margin: 4px 0 0; color: #7e8ca2; font-size: 9px; line-height: 1.5; }
.shop-supplier-price-row, .shop-purchase-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .7fr) auto; align-items: end; gap: 10px; padding: 10px 0; border-top: 1px solid #e9eef6; }
.shop-purchase-line { grid-template-columns: minmax(180px, 1.5fr) minmax(90px, .55fr) minmax(150px, .8fr) auto; }
.shop-supplier-price-row label, .shop-purchase-line label { display: grid; gap: 5px; min-width: 0; color: #62728b; font-size: 9px; font-weight: 700; }
.shop-supplier-price-row select, .shop-supplier-price-row input, .shop-purchase-line select, .shop-purchase-line input { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid #dce4ef; border-radius: 8px; outline: none; background: #fff; color: #263750; font: 500 11px 'DM Sans', sans-serif; }
.shop-supplier-price-row select:focus, .shop-supplier-price-row input:focus, .shop-purchase-line select:focus, .shop-purchase-line input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); }
.shop-price-remove { min-width: 34px; height: 36px; padding: 0 10px; font-size: 17px; }
.shop-purchase-lines-editor .field-help { margin-bottom: 0; }
body[data-theme="dark"] .shop-supplier-price-editor, body[data-theme="dark"] .shop-purchase-lines-editor { background: #1b2d49; border-color: #344866; }
body[data-theme="dark"] .shop-supplier-price-heading strong, body[data-theme="dark"] .shop-purchase-lines-heading strong { color: #e1ebfa; }
body[data-theme="dark"] .shop-supplier-price-heading p, body[data-theme="dark"] .shop-purchase-lines-heading p, body[data-theme="dark"] .shop-supplier-price-row label, body[data-theme="dark"] .shop-purchase-line label { color: #afbdd2; }
body[data-theme="dark"] .shop-supplier-price-row, body[data-theme="dark"] .shop-purchase-line { border-color: #344866; }
body[data-theme="dark"] .shop-supplier-price-row select, body[data-theme="dark"] .shop-supplier-price-row input, body[data-theme="dark"] .shop-purchase-line select, body[data-theme="dark"] .shop-purchase-line input { background: #101b31; border-color: #405575; color: #e1ebfa; }
@media (max-width: 700px) {
  .shop-supplier-price-heading, .shop-purchase-lines-heading { align-items: flex-start; }
  .shop-supplier-price-row, .shop-purchase-line { grid-template-columns: minmax(0, 1fr) minmax(100px, .7fr) auto; }
  .shop-purchase-line label:first-child { grid-column: 1 / -1; }
  .shop-supplier-price-row .shop-price-remove, .shop-purchase-line .shop-price-remove { grid-column: 3; }
}

body[data-theme="dark"] .shop-metric, body[data-theme="dark"] .shop-catalog-panel, body[data-theme="dark"] .shop-cart-panel,
body[data-theme="dark"] .shop-inventory-card, body[data-theme="dark"] .shop-sales-card,
body[data-theme="dark"] .shop-product-card { background: #15223b; border-color: #2a3a58; }
body[data-theme="dark"] .shop-metric span, body[data-theme="dark"] .shop-metric small, body[data-theme="dark"] .shop-product-details > p,
body[data-theme="dark"] .shop-product-fitment, body[data-theme="dark"] .shop-cart-customer-hint,
body[data-theme="dark"] .shop-cart-empty p, body[data-theme="dark"] .shop-demo-note { color: #a7b6cd; }
body[data-theme="dark"] .shop-metric strong, body[data-theme="dark"] .shop-catalog-header h2,
body[data-theme="dark"] .shop-product-title-row h3, body[data-theme="dark"] .shop-cart-header h2,
body[data-theme="dark"] .shop-cart-line-main strong, body[data-theme="dark"] .shop-cart-empty strong { color: #e4edfb; }
body[data-theme="dark"] .shop-search-wrap input, body[data-theme="dark"] .shop-category-chip,
body[data-theme="dark"] .shop-quantity-control { background: #101b31; border-color: #344866; color: #dbe7f9; }
body[data-theme="dark"] .shop-cart-customer-hint, body[data-theme="dark"] .shop-cart-footer,
body[data-theme="dark"] .pos-checkout-totals { background: #1b2d49; border-color: #344866; }
body[data-theme="dark"] .shop-cart-subtotal strong, body[data-theme="dark"] .shop-quantity-control span,
body[data-theme="dark"] .pos-checkout-totals strong { color: #e1ebfa; }
body[data-theme="dark"] .shop-product-art { background: linear-gradient(125deg, #1d3558, #15233c); }
body[data-theme="dark"] .shop-product-art > span { background: #263b5c; }

@media (max-width: 1240px) {
  .shop-pos-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shop-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-pos-layout { grid-template-columns: 1fr; }
  .shop-cart-panel { position: static; }
  .shop-cart-lines { max-height: 340px; }
}
@media (max-width: 560px) {
  .shop-metrics { gap: 8px; }
  .shop-metric { padding: 12px; }
  .shop-metric strong { font-size: 19px; }
  .shop-catalog-header { align-items: stretch; flex-direction: column; }
  .shop-search-wrap { width: 100%; }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .shop-product-art { height: 58px; padding: 9px; }
  .shop-product-art > span { width: 33px; height: 33px; }
  .shop-product-details { padding: 9px; }
  .shop-product-bottom { align-items: flex-start; flex-direction: column; }
  .shop-add-button { width: 100%; }
  .shop-cart-line { align-items: flex-start; }
  .shop-cart-line-actions { flex-direction: column-reverse; align-items: flex-end; }
  .shop-register-items { max-width: 120px; }
}



/* Auto GMS v1.2.4 — polished responsive POS, inventory workflows and sidebar palettes */
:root { --sidebar-from:#121f3c; --sidebar-to:#0d1830; }
.sidebar { background:linear-gradient(155deg,var(--sidebar-from) 0%,var(--sidebar-to) 100%); transition:background .26s ease,transform .28s cubic-bezier(.22,.68,0,1); }
.system-icon { width:1.2em; height:1.2em; display:inline-block; flex:none; vertical-align:-.17em; stroke-width:1.8; }
.nav-icon .system-icon { width:19px; height:19px; }
.shop-subnav-link > span .system-icon { width:20px; height:20px; }
.shop-dashboard-icon .system-icon { width:28px; height:28px; }
.shop-dashboard-stat .system-icon { width:22px; height:22px; }
.shop-hero-action .system-icon { width:24px; height:24px; }
.theme-swatch,.shop-accent-swatches { grid-template-columns:repeat(5,minmax(0,1fr)); }
.shop-accent-swatches { height:22px; }
.appearance-sidebar-section { margin:18px 0; padding:16px 0; border-top:1px solid #e6ecf5; border-bottom:1px solid #e6ecf5; }
.appearance-sidebar-section strong { display:block; font-size:calc(13px * var(--font-scale,1)); color:var(--ink,#26334a); }
.appearance-sidebar-section p { color:#718097; font-size:calc(11px * var(--font-scale,1)); margin:5px 0 14px; }
.appearance-sidebar-options { display:flex; gap:9px; flex-wrap:wrap; }
.sidebar-color-option { display:inline-flex; align-items:center; gap:8px; padding:10px 13px; min-height:44px; border:1px solid #dbe4f1; border-radius:12px; background:#fff; font-size:calc(11px * var(--font-scale,1)); font-weight:750; cursor:pointer; color:#44546e; transition:transform .18s,border-color .18s,box-shadow .18s; }
.sidebar-color-option i { width:20px; height:20px; border-radius:7px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.22); }
.sidebar-color-option.active,.sidebar-color-option:hover { border-color:var(--blue-600); box-shadow:0 0 0 3px rgba(61,99,232,.11); transform:translateY(-1px); }
.shop-pos-mode-bar { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:center; gap:16px; padding:15px 17px; border:1px solid #dee8fa; border-radius:17px; background:linear-gradient(120deg,#f7f9ff,#fff 68%); box-shadow:0 8px 28px rgba(33,69,140,.05); }
.shop-pos-mode-bar > div:first-child { min-width:0; display:grid; gap:4px; }
.shop-pos-mode-bar strong { display:flex; align-items:center; gap:9px; color:#20375d; font:850 calc(17px * var(--font-scale,1)) Manrope,Arial,sans-serif; }
.shop-pos-mode-bar small { color:#64758d; font-size:calc(12px * var(--font-scale,1)); line-height:1.5; }
.shop-pos-mode-toggle { display:flex; align-items:center; gap:5px; flex-wrap:wrap; padding:5px; border:1px solid #e0e8f5; border-radius:14px; background:#edf2fb; }
.shop-pos-mode-toggle button { display:flex; align-items:center; gap:9px; border:0; border-radius:10px; padding:12px 18px; font:800 calc(14px * var(--font-scale,1)) Manrope,Arial,sans-serif; min-height:48px; color:#48627f; background:transparent; cursor:pointer; }
.shop-pos-mode-toggle button.active { color:#fff; background:linear-gradient(135deg,var(--blue-600),var(--blue-700)); box-shadow:0 4px 12px rgba(30,70,140,.18); }
.shop-restaurant-details { display:grid; grid-template-columns:minmax(160px,.7fr) minmax(160px,1fr) minmax(210px,1.4fr); gap:16px; align-items:end; padding:17px; border-radius:15px; border:1px solid #e3e9f5; background:#fff; }
.shop-restaurant-hint { color:#4e617b; font-size:calc(12px * var(--font-scale,1)); line-height:1.6; background:#f1f6ff; border-radius:10px; padding:12px; }
.shop-pos-layout,.shop-pos-selling-layout { grid-template-columns:minmax(0,1fr) minmax(350px,410px); gap:17px; }
.shop-catalog-header h2,.shop-cart-header h2 { font-size:calc(23px * var(--font-scale,1)); }
.shop-catalog-header p,.shop-catalog-meta,.shop-cart-customer-hint,.shop-cart-footer p { font-size:calc(12px * var(--font-scale,1)); }
.shop-product-title-row h3,.shop-cart-line-main strong { font-size:calc(15px * var(--font-scale,1)); line-height:1.35; }
.shop-product-card .shop-product-bottom strong { font-size:calc(18px * var(--font-scale,1)); }
.shop-product-bottom small,.shop-product-details p,.shop-product-fitment { font-size:calc(12px * var(--font-scale,1)); }
.shop-add-button,.shop-checkout-button,.shop-pos-customer-controls button,.shop-category-chip { min-height:48px; touch-action:manipulation; font-size:calc(13px * var(--font-scale,1)); }
.shop-quantity-control button,.shop-remove-line { min-width:44px; min-height:44px; font-size:calc(19px * var(--font-scale,1)); touch-action:manipulation; }
.shop-quantity-control span { font-size:calc(16px * var(--font-scale,1)); min-width:35px; }
.shop-product-grid { grid-template-columns:repeat(auto-fit,minmax(195px,1fr)); gap:12px; }
.shop-product-card { border-radius:17px; box-shadow:0 4px 16px rgba(21,52,101,.04); }
.shop-product-card:active { transform:scale(.988); }
.shop-payment-method { min-height:72px; }
.shop-split-balance { padding:17px 20px; border-radius:15px; border:1px solid #dbe6fb; background:linear-gradient(120deg,#edf3ff,#f9fbff); margin-top:14px; box-shadow:0 8px 22px rgba(39,80,159,.06); }
.shop-split-balance > div:first-child { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.shop-split-balance span { color:#304b74; font:800 calc(13px * var(--font-scale,1)) Manrope,sans-serif; }
.shop-split-balance strong { color:#214caa; font:900 calc(24px * var(--font-scale,1)) Manrope,sans-serif; }
.shop-split-balance small { display:block; margin-top:8px; color:#5a779e; font-size:calc(11px * var(--font-scale,1)); }
.shop-split-balance small.is-warning { color:#b2383e; }
.shop-split-balance.is-complete { border-color:#83caa9; background:#edf9f2; }
.shop-split-balance.is-complete strong { color:#168152; }
.shop-split-progress { margin-top:13px; height:8px; overflow:hidden; border-radius:999px; background:#cfddf6; }
.shop-split-progress > span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#5c85ef,#1cac86); transition:width .17s ease; }
.shop-split-grid .field input { min-height:52px; font-size:calc(17px * var(--font-scale,1)); font-weight:800; }
.shop-inventory-tabs { display:flex; gap:9px; align-items:center; flex-wrap:wrap; margin:14px 0; }
.shop-inventory-tab { display:inline-flex; align-items:center; gap:9px; min-height:47px; padding:11px 15px; border:1px solid #e1e7f3; border-radius:12px; background:#fff; color:#5b6b82; cursor:pointer; font:800 calc(12px * var(--font-scale,1)) Manrope,sans-serif; box-shadow:0 3px 8px rgba(33,56,100,.025); }
.shop-inventory-tab.active { background:linear-gradient(130deg,var(--blue-600),var(--blue-700)); border-color:transparent; color:#fff; box-shadow:0 6px 17px rgba(46,84,157,.15); }
.shop-inventory-tab b { display:grid;place-items:center;min-width:20px;height:20px;border-radius:7px;background:#e7edfc;color:#355ab2;font:800 11px Manrope; }
.shop-inventory-notices { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0 16px; }
.shop-inventory-notice { display:inline-flex; align-items:center; flex-wrap:wrap; gap:8px; min-height:47px; background:#f2f7ff; border:1px solid #dae5fa; border-radius:13px; padding:11px 16px; color:#385683; font-size:calc(12px * var(--font-scale,1)); text-align:left; }
button.shop-inventory-notice { cursor:pointer; }
.shop-inventory-notice.due { background:#fff4e6; border-color:#f5d6a0; color:#89561d; }
.shop-inventory-notice.low { background:#fff8ed; border-color:#efd8ab; color:#82551e; }
.shop-inventory-notice.good { color:#247653; background:#effaf4; border-color:#c7ecd9; }
.shop-inventory-notice .system-icon { width:20px;height:20px; }
.shop-stocktake-input { width:110px; max-width:100%; min-height:48px; text-align:center; font:850 calc(15px * var(--font-scale,1)) Manrope,sans-serif; }
.shop-stocktake-variance { color:#169466; font-size:calc(14px * var(--font-scale,1)); }
.shop-stocktake-variance.is-negative { color:#c34e4e; }
.shop-stocktake-footer { padding:17px; border-top:1px solid #e9eef7; display:flex; justify-content:space-between; align-items:end; flex-wrap:wrap; gap:15px; }
.shop-stocktake-footer label { min-width:min(100%,290px); display:grid;gap:6px;color:#465d79;font-weight:800; font-size:calc(12px * var(--font-scale,1)); }
.shop-stocktake-footer input { min-height:44px; padding:10px; border:1px solid #dfe7f2; border-radius:10px; }
.shop-stocktake-footer button { min-height:49px; }
.shop-pos-mode-bar,.shop-restaurant-details,.shop-inventory-tabs,.shop-inventory-notices,.shop-stocktake-footer,.shop-payment-inner,.shop-product-grid,.shop-catalog-panel,.shop-cart-panel,.card,.card-header,.field-grid,.modal-dialog { min-width:0; max-width:100%; }
.field-grid > *,.shop-pos-mode-bar > *,.shop-restaurant-details > *, .shop-inventory-tab span { min-width:0; overflow-wrap:anywhere; }
@media(max-width:1150px) { .shop-pos-layout,.shop-pos-selling-layout { grid-template-columns:minmax(0,1fr) minmax(315px,370px); } }
@media(max-width:1000px) { .shop-pos-layout,.shop-pos-selling-layout { grid-template-columns:minmax(0,1fr); } .shop-restaurant-details { grid-template-columns:repeat(2,minmax(0,1fr)); } .shop-restaurant-hint { grid-column:1 / -1; } }
@media(max-width:760px) { .shop-pos-mode-bar { align-items:stretch; } .shop-pos-mode-toggle { width:100%; } .shop-pos-mode-toggle button { flex:1; justify-content:center; padding:10px; } .shop-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; } .shop-inventory-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .shop-inventory-tab { justify-content:flex-start; padding:10px; } .shop-restaurant-details { grid-template-columns:1fr; } .shop-restaurant-hint { grid-column:auto; } .shop-stocktake-footer { flex-direction:column; align-items:stretch; } .shop-stocktake-footer button { width:100%; } .shop-split-balance strong { font-size:calc(20px * var(--font-scale,1)); } }
@media(max-width:420px) { .shop-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .shop-product-art { min-height:54px; } .shop-product-details { padding:10px; } .shop-add-button { min-width:0; width:100%; } .shop-product-bottom { flex-wrap:wrap; gap:9px; } .shop-catalog-panel { padding:9px; } .shop-inventory-tabs { grid-template-columns:1fr 1fr; } .shop-inventory-tab { font-size:calc(10px * var(--font-scale,1)); } }
@media(pointer:coarse) { .shop-subnav-link,.shop-inventory-tab,.shop-add-button,.shop-payment-method,.shop-category-chip,.shop-pos-mode-toggle button { min-height:50px; touch-action:manipulation; } button:active { filter:brightness(.95); } }
@media(prefers-reduced-motion:reduce) { .shop-split-progress > span,.sidebar,.shop-product-card,.shop-inventory-tab { transition:none!important; } }
body[data-theme="dark"] .shop-pos-mode-bar, body[data-theme="dark"] .shop-restaurant-details, body[data-theme="dark"] .shop-inventory-tab, body[data-theme="dark"] .shop-split-balance { background:#18273f; border-color:#30466b; color:#e5ecf9; }
body[data-theme="dark"] .shop-pos-mode-bar strong, body[data-theme="dark"] .shop-pos-mode-bar small, body[data-theme="dark"] .shop-split-balance strong, body[data-theme="dark"] .shop-split-balance span { color:#d6e6ff; }

body .sidebar { background:linear-gradient(155deg,var(--sidebar-from) 0%,var(--sidebar-to) 100%) !important; }
.shop-product-art .system-icon {width:25px;height:25px;}
