:root {
  --ink: #050505;
  --muted: #6a6765;
  --paper: #f4f1ec;
  --surface: #ffffff;
  --line: #ddd8d3;
  --lime: #ef3044;
  --lime-dark: #bd1e31;
  --coral: #ef3044;
  --blue: #f4d4d8;
  --red: #c51f32;
  --green: #287648;
  --shadow: 0 18px 50px rgba(35, 33, 22, 0.11);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: "DM Sans", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.training-banner { position: fixed; z-index: 80; top: 0; left: 0; right: 0; min-height: 44px; padding: 9px 20px; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; background: #f7c948; color: #261b00; border-bottom: 2px solid #c99600; box-shadow: 0 4px 15px rgba(65,45,0,.18); }
.training-banner strong { font-size: 12px; letter-spacing: .12em; }
.training-banner span { font-size: 13px; }
.training-mode { padding-top: 44px; }
.app-shell.training-mode .sidebar { top: 44px; height: calc(100vh - 44px); }
.training-data-card { border-color: #d4a900; background: #fff9df; }
.training-data-card .eyebrow { color: #8a6700; }

.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden;
}
.login-brand {
  padding: clamp(36px, 6vw, 88px); background: var(--ink); color: white; display: flex; flex-direction: column; justify-content: space-between; position: relative; isolation: isolate; overflow: hidden;
}
.login-brand::before { content: ""; position: absolute; width: 11px; height: 72%; background: var(--lime); right: 0; top: 14%; z-index: -1; }
.login-brand::after { content: ""; position: absolute; width: 220px; height: 220px; border: 34px solid rgba(239,48,68,.18); border-radius: 50%; left: -110px; bottom: -110px; z-index: -1; }
.login-logo-wrap { max-width: 560px; }
.login-logo { display: block; width: 100%; height: auto; }
.wordmark { font-family: "Space Grotesk", sans-serif; font-size: clamp(42px, 7vw, 88px); letter-spacing: -.07em; line-height: .85; }
.tagline { text-transform: uppercase; font-size: 12px; letter-spacing: .22em; font-weight: 700; opacity: .7; margin-top: 16px; }
.login-claim { max-width: 570px; font-family: "Space Grotesk", sans-serif; font-size: clamp(30px, 4vw, 58px); line-height: 1.03; letter-spacing: -.045em; margin: 60px 0; }
.login-mini { max-width: 420px; color: rgba(255,255,255,.7); font-size: 15px; }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(420px, 100%); }
.login-card h1 { font-family: "Space Grotesk"; font-size: 36px; letter-spacing: -.04em; margin: 0 0 10px; }
.login-card > p { color: var(--muted); margin: 0 0 32px; }
.demo-note { margin-top: 24px; border: 1px dashed var(--line); border-radius: 14px; padding: 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.user-picker { display: grid; gap: 11px; }
.user-option { width: 100%; border: 1px solid var(--line); background: white; border-radius: 16px; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; text-align: left; color: var(--ink); }
.user-option:hover { border-color: var(--lime); box-shadow: 0 8px 24px rgba(239,48,68,.12); transform: translateY(-1px); }
.user-option strong, .user-option small { display: block; }
.user-option small { color: var(--muted); margin-top: 2px; }
.user-option b { color: var(--lime); font-size: 22px; }
.user-avatar { width: 45px; height: 45px; border-radius: 50%; background: var(--ink); color: white; display: grid; place-items: center; font-family: "Space Grotesk"; font-size: 20px; }
.user-avatar.large { width: 72px; height: 72px; font-size: 30px; margin: 0 auto 18px; background: var(--lime); }
.selected-user { text-align: center; }
.selected-user h1 { margin-bottom: 6px; }
.selected-user p { margin: 0 0 24px; color: var(--muted); }
.back-user { border: 0; background: transparent; color: var(--muted); padding: 0 0 20px; }
.back-user:hover { color: var(--red); }
.pin-input { text-align: center; font-size: 26px; letter-spacing: .25em; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label, .field-label { font-size: 13px; font-weight: 700; color: #56554d; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: white; color: var(--ink); outline: none; transition: .18s ease; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(217,246,74,.45); }
.currency-control { position: relative; width: 100%; }
.currency-control > span { position: absolute; z-index: 1; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.currency-control .input { padding-left: 31px; }
.currency-input { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.textarea { min-height: 84px; resize: vertical; }
.btn { border: 0; border-radius: 13px; padding: 13px 18px; background: var(--ink); color: white; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; }
a.btn { text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--lime); color: white; }
.btn-secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: #fff1ed; color: var(--red); border: 1px solid #ffd1c6; }
.btn-small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.btn-full { width: 100%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px 1fr; }
.sidebar { background: var(--ink); color: white; position: sticky; top: 0; height: 100vh; padding: 28px 18px; display: flex; flex-direction: column; z-index: 4; }
.brand-small { padding: 2px 9px 27px; }
.brand-small img { display: block; width: 100%; height: auto; }
.nav { display: grid; gap: 6px; }
.nav-btn { border: 0; background: transparent; color: rgba(255,255,255,.64); border-radius: 12px; padding: 12px 13px; display: flex; gap: 11px; align-items: center; text-align: left; font-weight: 600; position: relative; }
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,.1); color: white; }
.nav-icon { width: 24px; text-align: center; }
.nav-alert-badge { margin-left: auto; min-width: 21px; height: 21px; border-radius: 999px; padding: 0 6px; background: var(--lime); color: white; display: inline-grid; place-items: center; font-size: 11px; line-height: 1; }
.side-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.user-chip { padding: 0 11px 14px; }
.user-chip strong, .user-chip span { display: block; }
.user-chip span { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 3px; text-transform: capitalize; }
.sync-pill { margin: 0 11px 12px; font-size: 11px; color: rgba(255,255,255,.56); }
.logout { width: 100%; background: transparent; color: rgba(255,255,255,.7); border: 0; padding: 10px; text-align: left; }
.main { min-width: 0; padding: 30px clamp(22px, 4vw, 58px) 70px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.account-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 13px; padding: 8px 12px; text-align: left; min-width: 126px; }
.account-btn span, .account-btn strong { display: block; }
.account-btn span { color: var(--muted); font-size: 11px; }
.account-btn strong { font-size: 12px; margin-top: 2px; }
.account-btn:hover { border-color: var(--lime); color: var(--red); }
.eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.page-title { font-family: "Space Grotesk"; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.05em; line-height: 1; margin: 5px 0 0; }
.date-badge { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; background: var(--surface); color: var(--muted); font-size: 13px; white-space: nowrap; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; }
.card h2, .card h3 { font-family: "Space Grotesk"; letter-spacing: -.025em; margin: 0; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.hero-card { background: var(--ink); color: white; border: 0; padding: clamp(24px, 4vw, 42px); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -45px; top: -70px; background: var(--lime); }
.hero-card::after { pointer-events: none; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card p { color: rgba(255,255,255,.65); max-width: 570px; }
.hero-card .btn { margin-top: 10px; }
.stat { min-height: 130px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-value { font-family: "Space Grotesk"; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.05em; margin-top: 14px; }
.stat-note { color: var(--muted); font-size: 12px; margin-top: 6px; }
.accent-lime { background: var(--lime); border-color: var(--lime); color: white; }
.accent-blue { background: var(--blue); border-color: var(--blue); }
.accent-coral { background: var(--ink); border-color: var(--ink); color: white; }
.accent-lime .stat-label, .accent-lime .stat-note, .accent-coral .stat-label, .accent-coral .stat-note { color: rgba(255,255,255,.72); }
.accent-blue .stat-label { color: rgba(0,0,0,.58); }

.alert-list, .list { display: grid; gap: 10px; }
.alert-row, .list-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 13px 14px; }
.alert-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); flex: 0 0 auto; }
.row-main { display: flex; gap: 10px; align-items: center; min-width: 0; }
.row-main strong, .row-main span { display: block; }
.row-main span, .row-meta { color: var(--muted); font-size: 12px; }
.stock-count { font-family: "Space Grotesk"; font-size: 20px; }
.empty { text-align: center; color: var(--muted); padding: 30px 16px; border: 1px dashed var(--line); border-radius: 14px; }
.ok-mark { color: var(--green); font-weight: 700; }

.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 12px; scrollbar-width: none; }
.category-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 14px; white-space: nowrap; font-weight: 600; color: var(--muted); }
.category-tab.active { background: var(--ink); color: white; border-color: var(--ink); }
.product-grid { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.product-card { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 17px; padding: 15px; min-height: 150px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: .16s ease; }
.product-card:hover { border-color: #aaa697; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(40,35,20,.08); }
.product-card.unavailable { opacity: .55; }
.product-card-top { display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 12px; align-items: start; }
.product-card-visual { width: 62px; height: 62px; border-radius: 12px; overflow: hidden; background: #ece8e0; border: 1px solid #e2ddd5; display: grid; place-items: center; flex: 0 0 auto; }
.product-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-placeholder { color: var(--muted); font-size: 10px; line-height: 1.15; text-align: center; padding: 5px; }
.product-card-copy { min-width: 0; padding-top: 2px; }
.product-name { font-family: "Space Grotesk"; font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; }
.product-price { margin-top: 8px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.product-note { margin-top: 6px; color: var(--red); font-size: 11px; font-weight: 700; line-height: 1.25; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: white; font-size: 20px; line-height: 1; }
.stepper strong { font-family: "Space Grotesk"; font-size: 20px; }
.sale-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 20px; align-items: start; }
.sale-layout > * { min-width: 0; }
.cart { position: sticky; top: 22px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cart-line span { color: var(--muted); font-size: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: end; padding: 18px 0; }
.cart-total strong { font-family: "Space Grotesk"; font-size: 28px; }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 5px; background: #eeebe2; border-radius: 13px; }
.segmented button { border: 0; border-radius: 9px; padding: 9px 4px; background: transparent; font-size: 12px; font-weight: 700; color: var(--muted); }
.segmented button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(40,35,20,.08); }
.mixed-payment-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.mixed-payment-fields .field { min-width: 0; }
.mixed-payment-fields .input { padding-right: 9px; }
.mixed-payment-balance { border-radius: 11px; background: #f4f1ec; color: var(--muted); padding: 10px 12px; margin: -5px 0 14px; font-size: 11px; line-height: 1.4; }
.mixed-payment-balance.complete { background: #e4f4df; color: #28613b; font-weight: 700; }
.mixed-payment-balance.error { background: #ffe3dc; color: #a23425; font-weight: 700; }
.sale-confirmation-total { text-align: center; border-radius: 17px; background: var(--ink); color: white; padding: 22px 18px; margin-bottom: 16px; }
.sale-confirmation-total span, .sale-confirmation-total strong, .sale-confirmation-total p { display: block; }
.sale-confirmation-total span { color: rgba(255,255,255,.67); font-size: 13px; }
.sale-confirmation-total strong { font-family: "Space Grotesk"; font-size: 38px; margin: 6px 0 3px; }
.sale-confirmation-total p { color: rgba(255,255,255,.82); margin: 0; font-size: 13px; }
.sale-confirmation-items, .sale-confirmation-payment { border: 1px solid var(--line); border-radius: 14px; padding: 5px 14px; margin-bottom: 12px; background: white; }
.sale-confirmation-items > div, .sale-confirmation-payment > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sale-confirmation-items > div:last-child, .sale-confirmation-payment > div:last-child { border-bottom: 0; }
.sale-confirmation-items span, .sale-confirmation-payment span { color: var(--muted); }
.sale-confirmation-question { text-align: center; font-weight: 700; margin: 18px 0 4px; }

.count-table { display: grid; gap: 8px; }
.count-row { display: grid; grid-template-columns: 1fr 90px 92px; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 9px 0; }
.count-row:last-child { border-bottom: 0; }
.count-row .input { padding: 9px 10px; text-align: right; }
.expected { color: var(--muted); font-size: 12px; text-align: right; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.money-summary { display: grid; gap: 10px; margin: 18px 0; }
.money-line { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.money-line strong { font-family: "Space Grotesk"; }
.current-shift-card { background: var(--ink); color: white; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-color: var(--ink); }
.data-location-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-left: 5px solid var(--lime); }
.data-location-card h3 { margin-top: 5px; }
.data-location-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.stack-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.current-shift-card h3 { font-size: 24px; margin-top: 5px; }
.current-shift-card .eyebrow { color: rgba(255,255,255,.58); }
.shift-totals { display: flex; gap: 28px; flex-wrap: wrap; }
.shift-totals span, .shift-totals small, .shift-totals strong { display: block; }
.shift-totals small { color: rgba(255,255,255,.62); font-size: 11px; margin-bottom: 3px; }
.shift-totals strong { font-family: "Space Grotesk"; font-size: 20px; }

.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.quick-periods { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.filters .field { margin: 0; }
.filters .input { min-width: 150px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; background: white; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { background: #f0ede4; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.status-open, .status-completed, .status-received, .status-paid { background: #e4f4df; color: #28613b; }
.status-closed { background: #e8e9ec; color: #54565e; }
.status-voided { background: #ffe3dc; color: #a23425; }
.status-pending { background: #fff0c9; color: #805b00; }
.status-partial { background: #f4d4d8; color: #8e1b2a; }
.status-review-pending { background: #ffe0dc; color: #a11d2c; }
.status-reviewed, .status-ok { background: #e4f4df; color: #28613b; }
.threshold-control { display: flex; gap: 7px; align-items: center; }
.threshold-control .input { width: 70px; padding: 8px; }
.closure-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.closure-heading h3 { font-family: "Space Grotesk"; font-size: 30px; margin: 5px 0; }
.closure-heading p { color: var(--muted); margin: 0; }
.mini-stat { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #f8f6f2; }
.mini-stat span, .mini-stat strong { display: block; }
.mini-stat span { color: var(--muted); font-size: 11px; }
.mini-stat strong { font-family: "Space Grotesk"; font-size: 18px; margin-top: 5px; }
.reconcile-box { border-radius: 16px; border: 1px solid var(--line); padding: 16px; }
.reconcile-box h4 { margin: 0 0 10px; }
.reconcile-box > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.difference-ok { color: var(--green); font-weight: 700; }
.difference-bad { color: var(--red); font-weight: 700; }
.closure-notes { margin-top: 18px; border-left: 4px solid var(--lime); background: #f8f6f2; padding: 13px 15px; }
.closure-notes p { margin: 5px 0; }
.closure-notes span { color: var(--muted); font-size: 12px; }
.inventory-review-alert { margin-bottom: 18px; border: 2px solid #f2a6af; border-radius: var(--radius); padding: 22px; background: #fff4f3; box-shadow: 0 10px 30px rgba(197,31,50,.08); }
.inventory-review-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.inventory-review-head h3 { font-family: "Space Grotesk"; font-size: 24px; letter-spacing: -.03em; margin: 4px 0; }
.inventory-review-head p { color: var(--muted); margin: 0; }
.inventory-review-count { min-width: 43px; height: 43px; border-radius: 50%; background: var(--red); color: white; display: grid; place-items: center; font-family: "Space Grotesk"; font-size: 21px; font-weight: 700; }
.inventory-review-list { display: grid; gap: 9px; }
.inventory-review-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; background: white; border: 1px solid #f2c5ca; border-radius: 14px; padding: 12px; }
.inventory-review-icon { width: 31px; height: 31px; border-radius: 50%; background: #ffe0dc; color: var(--red); display: grid; place-items: center; font-weight: 900; }
.inventory-review-row strong, .inventory-review-row span { display: block; }
.inventory-review-row > div > span { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 3px; }
.closure-review-notice { margin: 0 0 18px; border-radius: 14px; padding: 13px 15px; border-left: 5px solid; }
.closure-review-notice strong, .closure-review-notice span { display: block; }
.closure-review-notice p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.closure-review-notice span { color: var(--muted); font-size: 11px; margin-top: 5px; }
.closure-review-notice.pending { background: #fff0ed; border-color: var(--red); }
.closure-review-notice.reviewed, .closure-review-notice.clear { background: #edf7ed; border-color: var(--green); }
.inventory-difference-row td { background: #fff6f4; }
.review-difference-summary { display: grid; gap: 7px; margin: 0 0 18px; }
.review-difference-summary > div { display: flex; justify-content: space-between; gap: 15px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: white; }
.readonly-note { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.receipt-intro { border-left: 5px solid var(--lime); }
.receipt-intro h3 { font-size: 24px; margin: 5px 0; }
.receipt-intro p { color: var(--muted); margin: 0; }
.pending-purchases { display: grid; gap: 11px; }
.pending-card { border: 1px solid var(--line); border-radius: 16px; background: white; padding: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.pending-card h3 { margin: 8px 0 4px; }
.pending-card p { margin: 0 0 5px; color: var(--muted); }
.pending-card small { color: var(--muted); }
.calculated-cost { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-radius: 12px; background: #f4f1ec; padding: 11px 13px; margin-top: 8px; }
.calculated-cost span { color: var(--muted); font-size: 12px; }
.calculated-cost strong { font-family: "Space Grotesk"; }
.receipt-summary { display: flex; gap: 13px; align-items: center; margin-bottom: 22px; }
.receipt-summary h3, .receipt-summary p { margin: 0; }
.receipt-summary p { color: var(--muted); margin-top: 4px; }
.payroll-intro { background: var(--ink); color: white; border-color: var(--ink); border-left: 6px solid var(--red); }
.payroll-intro h3 { margin: 5px 0 8px; font-size: 26px; }
.payroll-intro p { margin: 0; color: rgba(255,255,255,.68); line-height: 1.6; }
.rule-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.rule-grid > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #f8f6f2; }
.rule-grid strong, .rule-grid span { display: block; }
.rule-grid strong { font-size: 13px; margin-bottom: 5px; }
.rule-grid span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.payroll-sellers { display: grid; gap: 18px; margin-top: 18px; }
.payroll-seller-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.payroll-seller-head h3 { font-size: 25px; margin: 4px 0; }
.payroll-seller-head p { margin: 0; color: var(--muted); }
.payroll-action { display: grid; justify-items: end; gap: 5px; min-width: 155px; }
.payroll-action small { color: var(--muted); }
.payroll-action > strong { font-family: "Space Grotesk"; font-size: 24px; }
.payroll-share-label { display: inline-flex; border-radius: 999px; padding: 6px 10px; background: #f4d4d8; color: #8e1b2a; font-size: 11px; font-weight: 700; margin-bottom: 14px; }
.commission-detail { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; margin-top: 4px; min-width: 190px; }
.status-ready { background: #e4f4df; color: #28613b; }
.payroll-blocked-notice { margin: 0 0 16px; border-left: 5px solid var(--red); border-radius: 13px; background: #fff0ed; padding: 12px 14px; }
.payroll-blocked-notice p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.payroll-review-link { border: 0; background: transparent; color: var(--red); padding: 3px 0; font-size: 12px; font-weight: 700; text-decoration: underline; }
.payment-shift-list { display: grid; gap: 8px; margin: 0 0 20px; }
.payment-shift-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.payment-shift-list span { color: var(--muted); }
.user-admin-list { display: grid; gap: 10px; }
.user-admin-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 15px; padding: 13px; }
.user-admin-card strong, .user-admin-card span { display: block; }
.user-admin-card > div > span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.user-admin-actions { display: flex; justify-content: flex-end; gap: 6px; }
.danger-confirmation { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: center; border: 1px solid #ffd1c6; background: #fff7f4; border-radius: 15px; padding: 14px; }
.danger-confirmation strong { display: block; }
.danger-confirmation p { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 4px 0 0; }
.safe-history-note { margin: 14px 0 20px; border-left: 4px solid var(--lime); background: #f2f7e8; border-radius: 12px; padding: 12px 14px; }
.safe-history-note strong { font-size: 13px; }
.safe-history-note p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 4px 0 0; }
.form-error { color: var(--red); font-size: 12px; font-weight: 700; line-height: 1.4; margin: 7px 0 0; }
.product-settings { border-left: 5px solid var(--red); }
.product-settings h3 { margin: 5px 0 0; }
.product-settings-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.product-setting-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: #f8f6f2; }
.product-setting-row strong, .product-setting-row span { display: block; }
.product-setting-row strong { line-height: 1.2; }
.product-setting-row span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.product-setting-row small { display: block; color: #8a8680; font-size: 11px; margin-top: 3px; }
.product-setting-info { min-width: 0; display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 10px; align-items: center; }
.product-setting-info > img, .product-image-empty { width: 54px; height: 54px; border-radius: 11px; object-fit: cover; background: #e9e5dd; }
.product-image-empty { display: grid !important; place-items: center; padding: 5px; color: var(--muted) !important; font-size: 9px !important; text-align: center; }
.inventory-catalog { border-left: 5px solid var(--red); }
.inventory-catalog h3 { margin: 5px 0 0; }
.catalog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 420px; }
.inventory-category-tabs { margin-top: 18px; }
.inventory-catalog-list { display: grid; gap: 9px; }
.inventory-catalog-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: #f8f6f2; }
.inventory-catalog-main { min-width: 0; display: grid; grid-template-columns: 54px 9px minmax(0,1fr); gap: 10px; align-items: center; }
.inventory-catalog-main > img, .inventory-catalog-main > .product-image-empty { width: 54px; height: 54px; border-radius: 11px; object-fit: cover; background: #e9e5dd; }
.inventory-catalog-main strong, .inventory-catalog-main span, .inventory-catalog-main small { display: block; }
.inventory-catalog-main strong { line-height: 1.2; }
.inventory-catalog-main > div > span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.inventory-catalog-main small { color: #8a8680; font-size: 11px; margin-top: 3px; }
.inventory-catalog-side { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.inventory-quantity { min-width: 78px; text-align: right; }
.inventory-quantity strong, .inventory-quantity span { display: block; }
.inventory-quantity strong { font-family: "Space Grotesk"; font-size: 22px; }
.inventory-quantity span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.inventory-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 230px; }
.item-type-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.item-type-option { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: #f8f6f2; cursor: pointer; }
.item-type-option:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 2px rgba(239,51,70,.12); background: #fff8f8; }
.item-type-option input { margin-top: 3px; accent-color: var(--red); }
.item-type-option strong, .item-type-option small { display: block; }
.item-type-option strong { font-size: 14px; line-height: 1.25; }
.item-type-option small { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.role-explanation { margin-top: 18px; border-left: 4px solid var(--lime); background: #f2f7e8; border-radius: 12px; padding: 12px 14px; }
.role-explanation strong { font-size: 12px; }
.role-explanation p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 4px 0 0; }
.compact-empty { padding: 18px 14px; }
.product-image-field { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 15px; align-items: center; border: 1px solid var(--line); border-radius: 15px; padding: 13px; background: #f8f6f2; }
.product-image-preview { width: 116px; height: 92px; border: 1px dashed #c9c3b9; border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: 12px; overflow: hidden; background: white; }
.product-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-picker { cursor: pointer; }
.product-image-field p { margin: 7px 0 0; }
.remove-image { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: var(--red); font-size: 12px; font-weight: 700; }
.form-intro { font-size: 14px; line-height: 1.6; margin: -5px 0 20px; }
.composition-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 24px 0 12px; }
.composition-heading h3 { margin: 0 0 5px; font-size: 19px; }
.composition-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.composition-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: 390px; overflow-y: auto; padding: 2px 5px 2px 2px; }
.composition-row { display: grid; grid-template-columns: minmax(0,1fr) 72px; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 10px 11px; background: #f8f6f2; }
.composition-row strong, .composition-row small { display: block; }
.composition-row strong { font-size: 13px; line-height: 1.2; }
.composition-row small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.composition-row .input { padding: 9px; text-align: center; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(18,18,14,.68); display: grid; place-items: center; z-index: 50; padding: 18px; }
.modal { background: var(--surface); border-radius: 24px; width: min(760px,100%); max-height: 92vh; overflow: auto; box-shadow: var(--shadow); padding: clamp(20px,4vw,34px); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 22px; }
.modal-head h2 { font-family: "Space Grotesk"; margin: 0; font-size: 28px; letter-spacing: -.04em; }
.icon-btn { border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 50%; background: white; font-size: 19px; }
.toast { position: fixed; z-index: 60; right: 24px; bottom: 24px; background: var(--ink); color: white; border-radius: 13px; padding: 13px 17px; box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .25s ease; max-width: 360px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--red); }
.mobile-nav { display: none; }

@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sale-layout { grid-template-columns: 1fr; }
  .cart { position: static; }
}
@media (max-width: 760px) {
  .training-banner { min-height: 54px; padding: 7px 12px; display: grid; gap: 1px; }
  .training-banner strong { font-size: 11px; }
  .training-banner span { font-size: 11px; line-height: 1.25; }
  .training-mode { padding-top: 54px; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { min-height: 240px; padding: 32px 25px; }
  .login-claim { font-size: 34px; margin: 35px 0 20px; }
  .login-mini { display: none; }
  .login-panel { padding: 34px 22px 50px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 22px 16px 118px; }
  .topbar { margin-bottom: 22px; }
  .page-title { font-size: 34px; }
  .date-badge { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .mobile-nav { display: flex; position: fixed; z-index: 30; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; right: 8px; min-height: 72px; background: var(--ink); border-radius: 18px; padding: 6px; justify-content: flex-start; align-items: stretch; overflow-x: auto; box-shadow: 0 12px 35px rgba(0,0,0,.28); pointer-events: auto; }
  .mobile-nav .nav-btn { display: grid; justify-items: center; align-content: center; gap: 2px; padding: 8px 10px; min-height: 60px; font-size: 10px; min-width: 68px; flex: 1 0 68px; position: relative; z-index: 1; touch-action: manipulation; pointer-events: auto; }
  .mobile-nav .nav-btn > * { pointer-events: none; }
  .mobile-nav .nav-alert-badge { position: absolute; right: 7px; top: 5px; margin: 0; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .product-card { min-height: 145px; padding: 13px; }
  .product-card-top { grid-template-columns: 54px minmax(0,1fr); gap: 9px; }
  .product-card-visual { width: 54px; height: 54px; border-radius: 10px; }
  .card { padding: 17px; }
  .hero-card { padding: 26px 22px; }
  .count-row { grid-template-columns: 1fr 76px; }
  .count-row .expected { grid-column: 1 / -1; text-align: left; margin-top: -5px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .toast { left: 16px; right: 16px; bottom: 86px; max-width: none; }
  .account-actions { gap: 0; }
  .account-btn { min-width: 112px; padding: 7px 9px; }
  .account-btn span { display: none; }
  .current-shift-card { align-items: flex-start; flex-direction: column; }
  .data-location-card { align-items: flex-start; flex-direction: column; }
  .shift-totals { width: 100%; gap: 14px; justify-content: space-between; }
  .pending-card { align-items: flex-start; flex-direction: column; }
  .pending-card .btn { width: 100%; }
  .rule-grid { grid-template-columns: 1fr; }
  .product-settings-list { grid-template-columns: 1fr; }
  .user-admin-card { grid-template-columns: auto minmax(0,1fr); }
  .user-admin-actions { grid-column: 1 / -1; width: 100%; }
  .user-admin-actions .btn { flex: 1; }
  .catalog-actions { width: 100%; max-width: none; justify-content: stretch; }
  .catalog-actions .btn { flex: 1 1 180px; }
  .inventory-catalog-row { grid-template-columns: 1fr; gap: 11px; }
  .inventory-catalog-side { justify-content: space-between; padding-left: 74px; }
  .inventory-quantity { text-align: left; }
  .inventory-row-actions { max-width: none; }
  .item-type-options { grid-template-columns: 1fr; }
  .composition-list { grid-template-columns: 1fr; max-height: 340px; }
  .composition-heading { flex-direction: column; gap: 9px; }
  .inventory-review-row { grid-template-columns: auto minmax(0,1fr); }
  .inventory-review-row .btn { grid-column: 1 / -1; width: 100%; }
  .product-image-field { grid-template-columns: 92px minmax(0,1fr); }
  .product-image-preview { width: 92px; height: 82px; }
  .payroll-seller-head { flex-direction: column; }
  .payroll-action { width: 100%; justify-items: start; }
  .payroll-action .btn { width: 100%; }
}
@media (max-width: 390px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .product-card { min-height: 138px; padding: 10px; border-radius: 14px; }
  .product-card-top { grid-template-columns: 44px minmax(0,1fr); gap: 7px; }
  .product-card-visual { width: 44px; height: 44px; border-radius: 9px; }
  .product-card-placeholder { font-size: 8px; }
  .product-name { font-size: 13px; }
  .product-price { font-size: 11px; margin-top: 5px; }
  .stepper { margin-top: 10px; }
  .stepper button { width: 30px; height: 30px; }
  .stepper strong { font-size: 18px; }
}
