:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg-soft);font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg-soft)}.dashboard-shell{min-height:100vh;display:flex;flex-direction:column}.dashboard-header{height:76px;background:#fff;border-bottom:1px solid #e7ece8;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,72px)}.brand-lockup,.header-right{display:flex;align-items:center;gap:12px}.brand-mark,.boot-mark{width:38px;height:38px;border-radius:12px;background:var(--accent);color:#fff;display:grid;place-items:center;font:800 20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.brand-lockup strong{display:block;font:800 18px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.5px}.brand-lockup span{display:block;font-size:9px;letter-spacing:1.6px;color:#84918a;font-weight:700;margin-top:2px}.header-right{font-size:12px;color:#65736b}.status-indicator{width:8px;height:8px;border-radius:50%;background:#d69b36}.dashboard-main{width:min(1120px,calc(100% - 40px));margin:0 auto;padding:54px 0 64px;flex:1}.welcome-row{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:32px}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;color:#668074;margin:0 0 10px}.welcome-row h1{font:800 clamp(26px,4vw,38px) -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-1.3px;margin:0 0 10px;color:#18362b}.muted{color:#78857e;line-height:1.6;margin:0;font-size:14px}.date-chip,.count-pill{border:1px solid #e1e8e3;background:#fff;border-radius:999px;padding:9px 14px;font-size:12px;color:#5d6d64;white-space:nowrap}.panel,.metric-card{background:#fff;border:1px solid #e7ece8;border-radius:18px;box-shadow:0 8px 30px rgba(26,55,42,.035)}.sign-in-panel{max-width:560px;padding:32px;display:grid;grid-template-columns:1fr;gap:24px}.sign-in-panel h2,.products-panel h2{font:700 21px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;margin:0 0 8px;color:#1b382d}.login-form{display:grid;gap:10px}.login-form label{font-size:12px;font-weight:700;color:#40554a;margin-top:6px}.login-form input{width:100%;height:46px;border:1px solid #dfe7e1;border-radius:10px;padding:0 13px;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;outline:none}.login-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(71,125,101,.12)}.button{border:0;border-radius:10px;padding:14px 24px;font:700 13px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}.button-primary{background:#194b39;color:#fff;margin-top:12px}.button-primary:disabled{opacity:.6;cursor:wait}.button-quiet{background:#eef3ef;color:#385548;padding:8px 12px}.error-message{font-size:13px;color:#b33d36;margin:4px 0}.notice-message{color:#3d7058;font-size:13px;margin-top:16px}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}.metric-card{padding:22px}.metric-label{display:block;font-size:10px;letter-spacing:1.2px;font-weight:700;color:#718077}.metric-card strong{display:block;font:800 30px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183c2e;margin:12px 0 4px}.metric-foot{font-size:11px;color:#8a968f}.products-panel{padding:26px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.section-heading h2{margin-bottom:0}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;letter-spacing:1px;color:#89958e;font-weight:700;padding:12px;border-bottom:1px solid #edf0ed}td{font-size:13px;color:#5d6d64;padding:16px 12px;border-bottom:1px solid #f0f3f0}td strong{color:#253d31}.empty-state{text-align:center;padding:44px 16px}.empty-state strong{font:700 16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.dashboard-footer{border-top:1px solid #e7ece8;padding:20px clamp(20px,5vw,72px);display:flex;justify-content:space-between;gap:12px;color:#8a968f;font-size:11px}.boot-screen{min-height:100vh;display:grid;align-content:center;justify-items:center;gap:14px;color:#748179;font-size:13px}.boot-mark{width:48px;height:48px;font-size:24px}#blazor-error-ui{display:none;position:fixed;bottom:0;left:0;right:0;padding:16px;background:#fff1ed;color:#8c2f25;z-index:1000}#blazor-error-ui .dismiss{float:right;cursor:pointer}@media(max-width:680px){.dashboard-header{height:66px;padding:0 18px}.dashboard-main{padding:36px 0;width:calc(100% - 32px)}.welcome-row{display:block}.date-chip{display:inline-block;margin-top:18px}.metric-grid{grid-template-columns:1fr}.sign-in-panel,.products-panel{padding:22px}.dashboard-footer{display:block;line-height:1.9}}

/* Workspace refinements */
.brand-lockup{text-decoration:none;color:inherit}
.brand-lockup small{display:block;font-size:9px;letter-spacing:1.5px;color:#84918a;font-weight:700;margin-top:3px}
.status-indicator.online{background:#299764;box-shadow:0 0 0 3px rgba(41,151,100,.12)}
.status-indicator.offline{background:#c87535;box-shadow:0 0 0 3px rgba(200,117,53,.12)}
.role-chip{border:1px solid #dce8df;background:#f3f7f4;color:#315a43;border-radius:999px;padding:7px 11px;font-size:11px;font-weight:700}
.workspace-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:36px 0 18px}
.workspace-toolbar h2{font:700 22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1b382d;margin:0 0 7px}
.workspace-toolbar .eyebrow{margin-bottom:8px}
.permission-note,.table-note,.helper-message{font-size:11px;color:#84918a;line-height:1.6}
.permission-note{margin:14px 2px 0}
.table-note{margin:14px 12px 0}
.sku{font-variant-numeric:tabular-nums;color:#66776d;font-size:12px}
.products-panel{min-height:150px}
.empty-state .button{margin-top:16px}
.login-form input:focus-visible,.button:focus-visible{outline:3px solid rgba(71,125,101,.25);outline-offset:2px}
@media(max-width:680px){
 .header-right{gap:8px;font-size:11px}
 .role-chip{padding:6px 8px}
 .workspace-toolbar{align-items:flex-start;margin-top:28px}
 .workspace-toolbar h2{font-size:20px}
 .count-pill{padding:8px 10px}
 .products-panel{padding:18px}
 th,td{white-space:nowrap}
}


/* Accessible form validation and notification system */
.field-group{display:grid;grid-template-columns:1fr;gap:7px;min-width:0}
.field-group label{margin:0!important;line-height:1.4}
.field-group input,.field-group textarea,.field-group select{width:100%;min-width:0}
.field-group .validation-message{color:#b42318;font-size:12px;line-height:1.4;margin:0}
.field-group input.invalid,.field-group input[aria-invalid="true"]{border-color:#d92d20;background:#fffafa}
.field-group input.invalid:focus,.field-group input[aria-invalid="true"]:focus{border-color:#d92d20;box-shadow:0 0 0 3px rgba(217,45,32,.12)}
.login-form .validation-message{color:#b42318;font-size:12px}
.toast-host{position:fixed;right:24px;top:90px;z-index:1200;width:min(420px,calc(100vw - 32px));pointer-events:none}
.toast-card{display:grid;grid-template-columns:34px minmax(0,1fr) 28px;align-items:start;gap:12px;padding:15px 14px;border:1px solid;border-radius:14px;box-shadow:0 16px 40px rgba(20,35,27,.16);background:#fff;pointer-events:auto;animation:toast-in .18s ease-out}
.toast-error{border-color:#f2b8b5;border-left:4px solid #d92d20}
.toast-success{border-color:#a8d9bd;border-left:4px solid #16834a}
.toast-symbol{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;font-weight:800;font-size:15px}
.toast-error .toast-symbol{background:#fef0ef;color:#b42318}
.toast-success .toast-symbol{background:#eaf7ef;color:#167344}
.toast-card strong{display:block;color:#25382e;font-size:13px;margin:1px 0 4px}
.toast-card p{margin:0;color:#68766e;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.toast-close{border:0;background:transparent;color:#7a8980;font-size:20px;line-height:1;cursor:pointer;padding:1px}
.toast-close:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.helper-message{margin:10px 0 0;color:#a33a32}
@keyframes toast-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.toast-host{right:16px;top:76px;width:calc(100vw - 32px)}.toast-card{padding:13px}}

/* ShopPulse design-system tokens and mobile-first interaction sizing */
:root {
  --ink: #1a2332;
  --accent: #0b5f8a;
  --bg-soft: #f4f7fa;
  --danger: #c62828;
  --card-border: #d7dee8;
  --surface: #ffffff;
  --text-muted: #667487;
  --radius-card: 12px;
  --touch-target: 44px;
}
body { color: var(--ink); background: var(--bg-soft); }
.panel, .metric-card { background: var(--surface); border-color: var(--card-border); border-radius: var(--radius-card); }
.dashboard-header, .dashboard-footer { border-color: var(--card-border); }
.button, .login-form input, .field-group input, .field-group select { min-height: var(--touch-target); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover:not(:disabled) { background: #084c70; }
.error-message, .field-group .validation-message, .login-form .validation-message, .helper-message { color: var(--danger); }
.material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
}
@media (max-width: 680px) {
  .button { min-height: 48px; }
  .login-form input, .field-group input, .field-group select { min-height: 48px; }
}


/* Application workspace: mobile-first layouts shared by operational journeys */
:root {
  --ink: #1a2332;
  --accent: #0b5f8a;
  --bg-soft: #f4f7fa;
  --danger: #c62828;
  --card-border: #d7dee8;
  --surface: #fff;
  --text-muted: #667487;
  --radius-card: 12px;
  --touch-target: 44px;
  --success: #247447;
  --warning: #9a6500;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color:var(--ink); background:var(--bg-soft); }
.feature-page { width:min(1160px,calc(100% - 40px)); margin:0 auto; padding:24px 0 64px; min-height:100vh; }
.feature-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:4px 0 20px; border-bottom:1px solid var(--card-border); }
.feature-header .brand-lockup { display:flex; align-items:center; gap:12px; }
.feature-heading { padding:34px 0 22px; }
.feature-heading h1 { margin:0 0 8px; color:var(--ink); font-size:clamp(26px,4vw,36px); line-height:1.15; letter-spacing:-.7px; font-weight:750; }
.feature-heading .eyebrow { color:var(--accent); }
.workspace-nav { display:flex; flex-wrap:wrap; gap:8px; padding:14px 0; border-bottom:1px solid var(--card-border); }
.workspace-nav a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:9px 13px; border:1px solid transparent; border-radius:9px; color:#43546a; text-decoration:none; font-size:13px; font-weight:650; }
.workspace-nav a:hover,.workspace-nav a:focus-visible { color:var(--accent); background:#eaf2f7; border-color:#cbdce8; outline:none; }
.panel,.pulse-card { background:var(--surface); border:1px solid var(--card-border); border-radius:var(--radius-card); box-shadow:0 4px 12px rgba(26,35,50,.045); }
.panel { padding:22px; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.panel-heading h2,.form-panel h2 { margin:0; color:var(--ink); font-size:19px; font-weight:700; }
.muted { color:var(--text-muted); font-size:14px; line-height:1.55; }
.eyebrow { color:var(--accent); font-size:10px; letter-spacing:1.45px; font-weight:750; }
.role-chip,.count-pill { display:inline-flex; align-items:center; border:1px solid var(--card-border); border-radius:999px; padding:7px 11px; background:#fff; color:#536176; font-size:11px; font-weight:700; white-space:nowrap; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:11px 18px; border:1px solid transparent; border-radius:8px; font-size:14px; font-weight:650; cursor:pointer; transition:background .15s,border-color .15s,transform .15s; }
.button:focus-visible,.form-control:focus-visible { outline:3px solid rgba(11,95,138,.2); outline-offset:2px; }
.button:disabled { opacity:.55; cursor:not-allowed; }
.button-primary { color:#fff; background:var(--accent); }
.button-primary:hover:not(:disabled) { background:#084c70; }
.button-quiet { color:#35465b; background:#f2f5f8; border-color:#e0e6ed; }
.button-quiet:hover:not(:disabled) { background:#e8eef4; }
.form-panel { max-width:780px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:20px; }
.field-group { display:grid; align-content:start; gap:7px; min-width:0; }
.field-group.full { grid-column:1/-1; }
.field-group label,.form-panel label,.cart-panel label { color:#35445a; font-size:13px; font-weight:650; }
.form-control,.field-group input,.field-group textarea,.field-group select { display:block; width:100%; min-width:0; min-height:46px; padding:10px 12px; border:1px solid #cfd8e3; border-radius:8px; background:#fff; color:var(--ink); font:inherit; font-size:14px; }
.form-control:focus,.field-group input:focus,.field-group textarea:focus,.field-group select:focus { border-color:var(--accent); outline:none; box-shadow:0 0 0 3px rgba(11,95,138,.1); }
.field-group textarea { min-height:96px; resize:vertical; }
.small-note { margin:14px 0; font-size:12px; color:var(--text-muted); line-height:1.5; }
.inline-alert { margin:14px 0; padding:12px 14px; border:1px solid #efc2c0; border-left:4px solid var(--danger); border-radius:8px; background:#fff7f6; color:#922b26; font-size:13px; line-height:1.5; }
.toast-inline { margin:16px 0; padding:12px 14px; border:1px solid #b9dfc7; border-left:4px solid var(--success); border-radius:8px; background:#f2fbf5; color:#1e663b; font-size:13px; }
.toolbar-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:12px 0 18px; }
.toolbar-row label { color:#405067; font-size:13px; font-weight:650; }
.compact-select { width:auto; min-width:150px; }
.sales-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); align-items:start; gap:18px; }
.product-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.product-pick { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:72px; padding:10px; border:1px solid var(--card-border); border-radius:10px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }
.product-pick:hover:not(:disabled) { border-color:#9db9ca; background:#f8fbfd; }
.product-pick:disabled { opacity:.48; cursor:not-allowed; }
.product-initial { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; font-weight:800; font-size:17px; }
.product-pick-copy { display:grid; gap:3px; min-width:0; }
.product-pick-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.product-pick-copy small,.product-stock { color:var(--text-muted); font-size:11px; }
.product-pick-price { grid-column:3; grid-row:1; font-size:13px; font-weight:750; white-space:nowrap; }
.product-stock { grid-column:2/4; grid-row:2; }
.cart-panel { position:sticky; top:16px; }
.cart-line { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid #edf0f4; }
.cart-line>div:first-child { display:grid; gap:4px; }
.cart-line strong { font-size:13px; }
.cart-line small { color:var(--text-muted); font-size:11px; }
.quantity-control { display:flex; align-items:center; gap:8px; }
.quantity-control button { width:36px; height:36px; border:1px solid var(--card-border); border-radius:8px; background:#f7f9fb; font-size:18px; }
.cart-total,.receipt-total { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:17px 0; margin:8px 0; border-top:1px solid var(--card-border); font-size:15px; }
.cart-total strong,.receipt-total strong { font-size:21px; }
.cart-panel .form-control { margin:7px 0 14px; }
.checkout-button { width:100%; min-height:52px; margin-top:10px; }
.change-preview { display:flex; justify-content:space-between; padding:8px 0; color:var(--text-muted); }
.field-error,.text-danger { color:var(--danger)!important; font-size:12px; }
.expiry-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.expiry-panel.safe { border-top:4px solid #2b8a57; }
.expiry-panel.expired { border-top:4px solid #c62828; }
.expiry-panel.expiring { border-top:4px solid #d89a24; }
.expiry-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 12px; padding:14px 0; border-bottom:1px solid #edf0f4; }
.expiry-item>div { display:grid; gap:4px; }
.expiry-item strong { font-size:13px; }
.expiry-item small { color:var(--text-muted); font-size:11px; }
.expiry-date { font-size:12px; font-weight:700; white-space:nowrap; }
.expired .expiry-date { color:var(--danger); }
.expiring .expiry-date { color:var(--warning); }
.priority-label { grid-column:1/-1; color:var(--warning); font-size:11px; font-weight:700; }
.expiry-item a { grid-column:1/-1; width:max-content; color:var(--accent); font-size:12px; font-weight:650; }
.metrics-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.metric-card { display:grid; gap:8px; padding:18px; }
.metric-card>span { color:var(--text-muted); font-size:12px; }
.metric-card>strong { color:var(--ink); font-size:clamp(18px,2vw,25px); overflow-wrap:anywhere; }
.metric-card>small { color:var(--text-muted); font-size:11px; }
.summary-line { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid #edf0f4; font-size:13px; }
.summary-line strong { font-variant-numeric:tabular-nums; }
.badge-live { display:inline-flex; padding:6px 10px; border-radius:999px; background:#eaf7ef; color:#247447; font-size:10px; font-weight:800; letter-spacing:.7px; }
.receipt-panel { max-width:560px; margin:0 auto; }
.receipt-line { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #edf0f4; font-size:13px; }
.empty-state { padding:26px 12px; text-align:center; }
@media(max-width:820px) { .sales-grid { grid-template-columns:1fr; } .cart-panel { position:static; } .metrics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .feature-page { width:calc(100% - 28px); padding-top:14px; }
  .feature-heading { padding:26px 0 16px; }
  .workspace-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .workspace-nav a { background:#fff; border-color:var(--card-border); justify-content:flex-start; }
  .panel { padding:16px; }
  .form-grid,.expiry-grid { grid-template-columns:1fr; }
  .field-group.full { grid-column:auto; }
  .product-picker { grid-template-columns:1fr; }
  .product-pick { min-height:68px; }
  .cart-line { grid-template-columns:minmax(0,1fr) auto; }
  .cart-line>strong { grid-column:2; text-align:right; }
  .toolbar-row { align-items:stretch; }
  .toolbar-row .compact-select { flex:1; }
  .metrics-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .metric-card { padding:13px; }
}
@media print {
  body * { visibility:hidden!important; }
  #receipt,#receipt * { visibility:visible!important; }
  #receipt { position:absolute; inset:0; width:100%; max-width:none; border:0; box-shadow:none; }
  #receipt button { display:none!important; }
}


/* Login experience: compact, quiet and image-free */
.login-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,480px); align-items:center; gap:clamp(24px,5vw,64px); }
.login-aside { max-width:480px; padding:18px 0; }
.login-aside h2 { margin:0 0 12px; color:var(--ink); font-size:clamp(25px,3.5vw,34px); line-height:1.2; letter-spacing:-.6px; }
.login-aside>p:not(.eyebrow) { max-width:410px; color:var(--text-muted); font-size:15px; line-height:1.65; }
.login-aside ul { display:grid; gap:13px; margin:24px 0 0; padding:0; list-style:none; color:#405067; font-size:13px; }
.login-aside li { display:flex; align-items:center; gap:10px; }
.feature-icon { display:inline-grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border-radius:50%; background:#e8f3f8; color:var(--accent); font-size:12px; font-weight:800; }
.hero-icon { display:grid; place-items:center; width:58px; height:58px; margin-bottom:26px; border-radius:16px; background:#e8f3f8; color:var(--accent); }
.hero-icon svg { width:32px; height:32px; }
.sign-in-panel { width:100%; max-width:480px; padding:28px; }
.sign-in-panel .button-primary { width:100%; min-height:50px; margin-top:10px; }
@media(max-width:820px) { .login-layout { grid-template-columns:1fr; gap:18px; } .login-aside { max-width:none; padding:10px 0; } .login-aside ul { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; } .login-aside li { align-items:flex-start; font-size:11px; } }
@media(max-width:600px) { .login-aside ul { grid-template-columns:1fr; } .sign-in-panel { max-width:none; padding:20px; } }


.stock-status { display:inline-flex; align-items:center; min-height:26px; padding:4px 9px; border-radius:999px; font-size:11px; font-weight:750; white-space:nowrap; }
.stock-status.ok { color:#21643b; background:#eaf6ee; }
.stock-status.low { color:#9b2c26; background:#fff0ef; }


.dashboard-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:9px; }
.dashboard-actions .button { text-decoration:none; }
.dashboard-actions .button-primary { margin-top:0; }
@media(max-width:680px) { .dashboard-actions { justify-content:flex-start; margin-top:14px; } }


.card-confirmation { display:flex; align-items:flex-start; gap:10px; margin:12px 0; color:#35445a; font-size:13px; line-height:1.5; }
.card-confirmation input { width:20px; height:20px; min-width:20px; margin:0; accent-color:var(--accent); }


.panel-actions,.table-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.table-subtext { display:block; color:var(--text-muted); font-size:11px; margin-top:3px; overflow-wrap:anywhere; }
.checkbox-field { display:flex; align-items:center; }
.checkbox-field label { display:flex; align-items:center; gap:10px; min-height:44px; }
.checkbox-field input { width:20px; height:20px; accent-color:var(--accent); }
.link-button { border:0; background:transparent; color:var(--accent); text-decoration:underline; padding:2px 4px; font:inherit; cursor:pointer; }
.audit-json { max-width:360px; max-height:180px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; padding:10px; border-radius:8px; background:var(--bg-soft); color:var(--ink); font-size:11px; }
.rush-mode .product-picker { grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; }
.rush-mode .product-pick { min-height:112px; padding:16px; border-width:2px; }
.rush-mode .product-initial { width:48px; height:48px; font-size:18px; }
.rush-mode .product-pick-copy strong { font-size:15px; }
.rush-mode .product-pick-price { font-size:16px; }
@media(max-width:600px) { .rush-mode .product-picker { grid-template-columns:repeat(2,minmax(0,1fr)); } .rush-mode .product-pick { min-height:126px; padding:12px; } }

@media(max-width:980px) { .expiry-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .expiry-grid { grid-template-columns:1fr; } }


.inventory-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:18px 0 12px; }
.inventory-tabs [role="tab"] { min-height:44px; }
.inventory-metrics { margin-top:8px; }
@media(max-width:600px) { .inventory-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .inventory-tabs>button:last-child { grid-column:1/-1; } }


.rescue-list { display:grid; gap:14px; }
.rescue-card { display:grid; gap:14px; }
.rescue-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.rescue-card-heading h2 { margin:0; font-size:19px; }
.rescue-card-heading .eyebrow { margin:0 0 5px; }
.rescue-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.rescue-stats>div { display:grid; gap:4px; padding:12px; border-radius:10px; background:var(--bg-soft); }
.rescue-stats span { color:var(--text-muted); font-size:11px; }
.rescue-stats strong { color:var(--ink); font-size:17px; font-variant-numeric:tabular-nums; }
.rescue-recommendation { margin:0; padding:12px 14px; border-left:3px solid var(--accent); background:#f1f7fa; border-radius:0 8px 8px 0; font-size:13px; }
@media(max-width:600px) { .rescue-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .rescue-card-heading { align-items:flex-start; flex-direction:column; } }

/* Single-column sign-in: no split-card or hero panel. */
.login-layout { display:flex; justify-content:center; align-items:flex-start; width:100%; }
.sign-in-panel { width:min(100%,480px); max-width:480px; margin:0 auto; }


/* Consistent mobile-friendly control targets across every operational journey. */
button { min-height: var(--touch-target, 44px); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  min-height: var(--touch-target, 44px);
}


.payment-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(17, 27, 40, .58);
}
.payment-modal {
  width: min(560px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(12, 25, 40, .24);
}
.payment-modal .checkout-button { width: 100%; min-height: 52px; }
@media (max-width: 600px) {
  .payment-modal-backdrop { align-items: flex-end; padding: 0; }
  .payment-modal {
    width: 100%;
    max-height: 92dvh;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
}

/* Accessibility and responsive UX hardening */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(11, 95, 138, .42);
  outline-offset: 3px;
}
:where(button, input, select, textarea) { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
:where(input, select, textarea) { scroll-margin-block: 7rem; }
:where(.panel, .pulse-card, .metric-card, .payment-modal) { min-width: 0; }
:where(.muted, .small-note, .table-note, .permission-note) { overflow-wrap: anywhere; }
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 620px; }
.table-wrap th, .table-wrap td { vertical-align: middle; }
.table-wrap th { white-space: nowrap; }
.table-wrap td { overflow-wrap: anywhere; }
:where(.field-group, .form-grid, .toolbar-row, .dashboard-header, .workspace-toolbar) { min-width: 0; }
:where(.button, .link-button, .workspace-nav a) { text-underline-offset: 3px; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { transform: none; }
:where(.field-group input, .field-group select, .field-group textarea, .form-control):disabled {
  cursor: not-allowed;
  background: #f2f5f8;
  color: #667487;
}
:where(.field-group input, .field-group select, .field-group textarea, .form-control)[aria-invalid="true"] {
  border-color: var(--danger);
}
:where(.validation-message, .field-error, .text-danger) { line-height: 1.45; }
:where(.empty-state, .inline-alert, .toast-inline) { overflow-wrap: anywhere; }
:where(.toast-host, .toast-card) { max-width: 100%; }
:where(.count-pill, .role-chip, .stock-status) { max-width: 100%; }
.workspace-nav a[aria-current="page"],
.workspace-nav a.active {
  color: var(--accent);
  background: #eaf2f7;
  border-color: #cbdce8;
}
@media (max-width: 820px) {
  .feature-page { width: min(100% - 32px, 720px); }
  .feature-header, .dashboard-header, .workspace-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .header-right { flex-wrap: wrap; }
  .cart-panel { z-index: 1; }
}
@media (max-width: 600px) {
  .feature-page { width: calc(100% - 24px); padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .feature-heading h1 { overflow-wrap: anywhere; }
  .panel { padding: 14px; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; }
  .panel-actions, .table-actions, .dashboard-actions { width: 100%; }
  .panel-actions > .button, .table-actions > .button { flex: 1 1 auto; }
  .dashboard-actions > .button { flex: 1 1 100%; }
  .form-grid { gap: 14px; }
  .cart-line { gap: 8px; }
  .quantity-control { gap: 5px; }
  .quantity-control button { width: 40px; height: 40px; }
  .payment-modal-backdrop { padding-bottom: env(safe-area-inset-bottom); }
  .toast-host { right: 12px; top: 68px; width: calc(100vw - 24px); }
  .table-wrap { margin-inline: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media (forced-colors: active) {
  .button, .panel, .stock-status, .workspace-nav a { border: 1px solid ButtonText; }
  :where(a, button, input, select, textarea):focus-visible { outline: 2px solid Highlight; }
}


/* Current-page and keyboard navigation feedback */
.workspace-nav a.active {
  color: var(--accent);
  background: #eaf2f7;
  border-color: #cbdce8;
  font-weight: 750;
}
.workspace-nav a:focus-visible {
  outline: 3px solid rgba(11, 95, 138, .28);
  outline-offset: 2px;
}


/* Checkout: readable basket rows and an accessible, scrollable payment sheet. */
.cart-line { grid-template-columns:minmax(0,1fr) auto minmax(76px,auto); }
.cart-line>div:first-child { min-width:0; }
.cart-line>div:first-child strong { overflow-wrap:anywhere; }
.quantity-control button { width:44px; height:44px; min-width:44px; font-size:20px; }
.payment-modal:focus { outline:3px solid rgba(11,95,138,.28); outline-offset:3px; }
.payment-modal .panel-heading { gap:12px; }
.payment-modal .panel-heading>div { min-width:0; }
.payment-modal label { display:block; margin:16px 0 7px; color:#35445a; font-size:13px; font-weight:700; }
.payment-modal .form-control { min-height:48px; }
.receipt-meta { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:8px 16px; color:var(--text-muted); font-size:12px; }
.receipt-meta p { margin:0 0 10px; }
.receipt-items { border-top:1px solid var(--card-border); }
.receipt-item-details { display:grid; gap:4px; min-width:0; }
.receipt-item-details small { color:var(--text-muted); font-size:11px; }
.receipt-breakdown { display:grid; gap:8px; margin-top:12px; font-size:13px; }
.receipt-breakdown>div:not(.receipt-total) { display:flex; justify-content:space-between; gap:12px; }
.receipt-total { margin-top:8px; }
@media(max-width:600px) {
  .product-picker { grid-template-columns:1fr; }
  .cart-line { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .cart-line>strong { grid-column:2; text-align:right; }
  .quantity-control { gap:6px; }
  .quantity-control button { width:44px; height:44px; }
  .payment-modal-backdrop { overscroll-behavior:contain; }
  .payment-modal { overflow-y:auto; overscroll-behavior:contain; }
  .receipt-line { align-items:flex-start; }
}
@media print {
  .receipt-meta,.receipt-breakdown,.receipt-items { break-inside:avoid; }
  #receipt { padding:0!important; }
}
