:root {
  --bg: #eef1ed;
  --panel: #ffffff;
  --panel-2: #f5f7f4;
  --ink: #1d221f;
  --muted: #707873;
  --line: #d9dfda;
  --dark: #181d1a;
  --dark-2: #242a26;
  --red: #d84b3d;
  --red-hover: #b93d33;
  --red-soft: #fae8e4;
  --green: #197454;
  --green-soft: #e2f2ea;
  --amber: #996111;
  --amber-soft: #fbefd9;
  --shadow: 0 16px 45px rgba(22, 29, 25, .14);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
}

[data-theme="dark"] { --bg: #171a18; --panel: #202421; --panel-2: #272c28; --ink: #f3f5f3; --muted: #9ba39e; --line: #373d39; --red-soft: #3a2724; --green-soft: #20382e; --amber-soft: #3a301f; --shadow: 0 16px 45px rgba(0, 0, 0, .32); }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(216, 75, 61, .28); outline-offset: 2px; }
.hidden { display: none !important; }
.kicker { margin: 0 0 7px; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: 0; }
.form-error { min-height: 16px; margin: 0; color: var(--red-hover); font-size: 11px; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 58%) minmax(360px, 42%); background: var(--panel); }
.login-brand { position: relative; min-height: 100vh; overflow: hidden; padding: 36px 44px; color: #fff; background: var(--dark); }
.login-brand-top { position: relative; z-index: 2; display: flex; gap: 11px; align-items: center; font-size: 15px; font-weight: 700; }
.brand-seal { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--red); border-radius: 50%; font-family: Georgia, serif; font-size: 22px; }
.brand-seal.small { width: 30px; height: 30px; font-size: 17px; }
.login-brand-copy { position: relative; z-index: 2; margin-top: 22vh; }
.login-brand-copy p { margin: 0 0 18px; color: #df9f96; font-size: 10px; font-weight: 800; }
.login-brand-copy h1 { margin: 0; max-width: 520px; font-size: clamp(40px, 4vw, 56px); line-height: 1.12; letter-spacing: 0; }
.login-brand-copy span { display: block; margin-top: 22px; color: #abb4ae; font-size: 13px; }
.login-brand img { position: absolute; right: -5%; bottom: -9%; width: 58%; max-height: 70%; object-fit: contain; opacity: .7; filter: saturate(.72); }
.login-box { display: grid; place-items: center; padding: 40px; background: var(--panel); }
.login-box form { width: min(340px, 100%); }
.login-box h2 { margin: 0 0 35px; font-size: 27px; letter-spacing: 0; }
label { color: var(--muted); font-size: 11px; font-weight: 700; }
.field-icon { position: relative; margin-top: 8px; }
.field-icon svg { position: absolute; top: 50%; left: 12px; width: 16px; color: var(--muted); transform: translateY(-50%); }
.field-icon input { padding-left: 38px; }

.app-shell { min-height: 100vh; display: grid; grid-template: 62px minmax(0, 1fr) / 224px minmax(0, 1fr); }
.app-header { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; color: #fff; background: var(--dark); border-bottom: 1px solid #303632; }
.header-brand, .header-actions { display: flex; align-items: center; }
.header-brand { gap: 10px; }
.header-brand strong { font-size: 14px; }
.edition { margin-left: 5px; padding-left: 15px; color: #8f9993; border-left: 1px solid #39403b; font-size: 10px; }
.header-actions { gap: 6px; }
.connection { display: inline-flex; gap: 7px; align-items: center; margin-right: 10px; color: #9fa8a2; font-size: 10px; }
.connection svg { width: 14px; }
.app-sidebar { display: flex; flex-direction: column; min-height: calc(100vh - 62px); padding: 26px 14px 18px; background: var(--panel); border-right: 1px solid var(--line); }
.nav-group { display: grid; gap: 3px; margin-bottom: 20px; }
.nav-group > span { padding: 0 10px 7px; color: #9aa19d; font-size: 9px; font-weight: 800; }
.nav-link { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 38px; padding: 0 11px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; text-align: left; font-size: 12px; transition: color .16s ease, background .16s ease, transform .16s ease; }
.nav-link svg { width: 15px; height: 15px; }
.nav-link:hover { color: var(--ink); background: var(--panel-2); transform: translateX(2px); }
.nav-link.active { color: var(--ink); background: var(--red-soft); font-weight: 700; }
.nav-link.active svg { color: var(--red); }
.sidebar-foot { display: grid; gap: 4px; margin-top: auto; padding: 14px 10px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.sidebar-foot small { color: #9aa19d; }
.workspace { min-width: 0; overflow: auto; padding: 30px 34px 64px; }
.view { max-width: 1440px; margin: 0 auto; }
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.view-head h1 { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
.view-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

.btn, .icon-btn { display: inline-flex; justify-content: center; align-items: center; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
.btn { gap: 7px; min-height: 38px; padding: 0 14px; font-size: 11px; font-weight: 700; }
.btn svg, .icon-btn svg { width: 15px; height: 15px; }
.btn:hover, .icon-btn:hover { border-color: #adb5af; box-shadow: 0 2px 7px rgba(22, 29, 25, .08); transform: translateY(-1px); }
.btn:active, .icon-btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
.btn-primary { color: #fff; background: var(--red); border-color: var(--red); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn-danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn-quiet { background: var(--panel-2); }
.btn-block { width: 100%; margin-top: 11px; }
.icon-btn { width: 34px; height: 34px; padding: 0; }
.icon-btn.dark { color: #aeb6b1; background: transparent; border-color: transparent; }

input, select, textarea { width: 100%; min-height: 38px; padding: 8px 11px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; outline: 0; font-size: 11px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #aeb8b1; box-shadow: 0 0 0 3px rgba(29, 116, 84, .08); }
input[type="checkbox"] { width: 15px; min-height: 15px; padding: 0; accent-color: var(--red); box-shadow: none; }
.field { display: grid; gap: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.input-search { position: relative; width: min(330px, 100%); }
.input-search svg { position: absolute; top: 50%; left: 11px; width: 15px; color: var(--muted); transform: translateY(-50%); }
.input-search input { padding-left: 34px; background: var(--panel-2); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 18px rgba(22, 29, 25, .04); }
.metric { min-height: 112px; padding: 20px 22px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.metric-label svg { width: 15px; }
.metric-value { margin-top: 13px; font-size: 27px; font-weight: 750; letter-spacing: .01em; }
.metric-note { margin-top: 4px; color: #979f9a; font-size: 9px; }
.metric.warn .metric-value { color: var(--amber); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 18px rgba(22, 29, 25, .035); }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 13px; }
.panel-tools { display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 16px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.quick-action { display: flex; gap: 11px; align-items: center; min-height: 64px; padding: 0 15px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.quick-action:hover { border-color: #b8c0ba; box-shadow: 0 5px 14px rgba(22, 29, 25, .07); transform: translateY(-2px); }
.quick-action i { width: 30px; height: 30px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 5px; }
.quick-action svg { width: 15px; }
.quick-action strong { display: block; font-size: 11px; }
.quick-action span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; gap: 8px; align-items: center; }
.toolbar select { width: auto; min-width: 110px; }
.count-label { color: var(--muted); font-size: 10px; white-space: nowrap; }
.table-scroll { overflow: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th { padding: 10px 14px; color: #8d9590; background: var(--panel-2); font-size: 9px; font-weight: 800; text-align: left; white-space: nowrap; }
td { padding: 11px 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; vertical-align: middle; }
tbody tr:hover { background: var(--panel-2); }
.product-info { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.thumb { width: 40px; height: 40px; object-fit: cover; background: #edf0ec; border-radius: 4px; }
.product-info strong { display: block; max-width: 240px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-info span { display: block; margin-top: 3px; color: #959d98; font-size: 9px; }
.number { color: var(--ink); font-weight: 700; white-space: nowrap; }
.number.warn { color: var(--amber); }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.gray { color: var(--muted); background: var(--panel-2); }
.badge.amber { color: var(--amber); background: var(--amber-soft); }
.badge.red { color: var(--red-hover); background: var(--red-soft); }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; }
.table-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--muted); background: transparent; border: 0; border-radius: 4px; }
.table-btn:hover { color: var(--red); background: var(--red-soft); }
.table-btn svg { width: 14px; }
.muted { color: var(--muted); font-size: 9px; }
.btn-danger { color: #fff; background: var(--red); border-color: var(--red); }
.empty { display: grid; place-items: center; min-height: 180px; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 14px; margin-top: 14px; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.activity-row:last-child { border-bottom: 0; }
.activity-row strong { display: block; color: var(--ink); font-size: 11px; }
.activity-row span { color: var(--muted); }

.cashier-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; min-height: calc(100vh - 132px); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; padding: 14px; }
.product-tile { position: relative; min-height: 176px; padding: 0; overflow: hidden; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.product-tile img { width: 100%; height: 103px; object-fit: cover; background: #eef0ed; }
.product-tile div { padding: 9px 10px; }
.product-tile strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-tile span { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 9px; }
.product-tile b { color: var(--red); font-size: 11px; }
.cart-panel { display: flex; flex-direction: column; }
.cart-items { flex: 1; min-height: 260px; padding: 10px 14px; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cart-row strong { display: block; color: var(--ink); font-size: 10px; }
.cart-row small { color: var(--muted); font-size: 9px; }
.qty-control { display: flex; gap: 6px; align-items: center; }
.qty-control button { width: 24px; height: 24px; padding: 0; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; }
.cart-summary { padding: 15px; background: var(--panel-2); border-top: 1px solid var(--line); }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 10px; }
.summary-line.total { color: var(--ink); font-size: 13px; font-weight: 700; }
.discounts { display: flex; gap: 6px; margin: 10px 0; }
.discounts button { flex: 1; min-height: 30px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; font-size: 9px; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.discounts button:hover { color: var(--ink); border-color: #adb5af; }
.discounts button.active { color: var(--red-hover); background: var(--red-soft); border-color: rgba(216, 75, 61, .35); font-weight: 700; }

.split-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; }
.operation-form { display: grid; gap: 13px; }
.category-list { display: grid; }
.category-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.category-row:first-child { border-top: 0; }
.category-row strong { font-size: 11px; }
.category-row span { color: var(--muted); font-size: 9px; }
.category-background-thumb { width: 56px; height: 28px; object-fit: cover; border-radius: 4px; margin-right: 8px; vertical-align: middle; }
.batch-table input, .batch-table select { min-width: 90px; min-height: 31px; padding: 5px 7px; }
.stock-input { width: 90px; }

.backdrop { position: fixed; z-index: 7; inset: 0; background: rgba(12, 16, 14, .38); }
.drawer { position: fixed; z-index: 8; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(620px, 100vw); background: var(--panel); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .22s ease; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.drawer-body { overflow: auto; padding: 20px 24px 36px; }
.section { padding: 18px 0; border-top: 1px solid var(--line); }
.section:first-child { padding-top: 0; border-top: 0; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title h3 { margin: 0; font-size: 12px; }
.section-title span { color: var(--muted); font-size: 9px; }
.cover-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.cover-row img { width: 64px; height: 64px; object-fit: cover; background: #edf0ec; border-radius: 4px; }
.check-row { display: flex; justify-content: space-between; align-items: center; min-height: 36px; padding: 0 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; }
.sku-list { display: grid; gap: 7px; }
.sku-card { padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; }
.sku-fields { display: grid; grid-template-columns: minmax(130px, 1.15fr) minmax(150px, 1.8fr) 100px 100px 72px; gap: 8px; align-items: center; }
.sku-image-field { display: flex; align-items: center; gap: 7px; min-width: 130px; color: var(--muted); font-size: 9px; cursor: pointer; }
.sku-image-field img { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; background: #edf0ec; }
.sku-image-field input { display: none; }
.sku-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 9px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; }
.sku-actions { display: flex; gap: 7px; align-items: center; }
.modal-layer { position: fixed; z-index: 12; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12, 16, 14, .45); }
.modal { width: min(500px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border-radius: 8px; box-shadow: var(--shadow); }
.modal.product-modal { display: flex; flex-direction: column; width: min(960px, 100%); max-height: calc(100vh - 44px); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { display: grid; gap: 14px; padding: 18px 22px 22px; }
.modal.product-modal > #product-form { min-height: 0; overflow: auto; }
.modal.product-modal #product-form > .section { padding: 22px 26px; }
.modal.product-modal #product-form > .section:first-child { padding-top: 24px; }
.modal.product-modal #product-form > .section + .section { background: var(--bg); border-top: 1px solid var(--line); }
.modal.product-modal #product-form > .form-actions { position: sticky; bottom: 0; z-index: 1; margin: 0; padding: 14px 26px; background: var(--panel); border-top: 1px solid var(--line); }
.modal.product-modal .section-title { margin-bottom: 16px; }
.modal.product-modal .section-title h3 { font-size: 13px; }
.modal.product-modal .section-title span { font-size: 10px; }
.modal.product-modal #sku-add { margin-top: 12px !important; padding: 10px; background: var(--panel); border: 1px dashed var(--line); border-radius: 6px; }
.online-order-detail { display: grid; }
.order-summary-band { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; }
.order-summary-band strong { font-size: 18px; text-align: center; }
.order-summary-band small { color: var(--muted); }
.detail-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 5px; }
.detail-list > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.detail-list > div:first-child { border-top: 0; }
.detail-list span { color: var(--muted); font-size: 9px; }
.detail-list strong { font-size: 10px; font-weight: 600; }
.online-order-items { display: grid; gap: 8px; }
.online-order-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; }
.online-order-item img { width: 48px; height: 48px; object-fit: cover; background: #edf0ec; border-radius: 4px; }
.online-order-item strong, .online-order-item span { display: block; }
.online-order-item span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.event-list { display: grid; gap: 8px; }
.event-list > div { display: grid; grid-template-columns: 100px 1fr; gap: 4px 10px; padding: 9px 10px; background: var(--panel-2); border-left: 2px solid var(--green); }
.event-list span, .event-list small { color: var(--muted); font-size: 9px; }
.event-list small { grid-column: 2; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: 360px; padding: 11px 14px; color: #fff; background: #252d28; border-radius: 5px; box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace { padding: 22px 20px 50px; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cashier-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .login-screen { display: block; }
  .login-brand { min-height: 34vh; padding: 25px 22px; }
  .login-brand-copy { margin-top: 8vh; }
  .login-brand-copy h1 { font-size: 34px; }
  .login-brand-copy span { display: none; }
  .login-brand img { width: 46%; }
  .login-box { min-height: 66vh; padding: 32px 22px; align-items: start; }
  .app-shell { display: block; padding-top: 62px; }
  .app-header { position: fixed; z-index: 6; top: 0; right: 0; left: 0; height: 62px; padding: 0 16px; }
  .edition, .connection { display: none; }
  .app-sidebar { min-height: auto; padding: 9px 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-sidebar nav { display: flex; gap: 5px; width: max-content; }
  .nav-group { display: flex; gap: 4px; margin: 0; }
  .nav-group > span, .sidebar-foot { display: none; }
  .nav-link { width: auto; min-height: 34px; padding: 0 10px; white-space: nowrap; }
  .workspace { padding: 20px 14px 42px; }
  .modal-layer { padding: 10px; }
  .modal.product-modal { max-height: calc(100vh - 20px); border-radius: 7px; }
  .modal.product-modal .modal-head { padding: 17px 18px 14px; }
  .modal.product-modal #product-form > .section { padding: 18px; }
  .modal.product-modal #product-form > .section:first-child { padding-top: 20px; }
  .modal.product-modal #product-form > .form-actions { position: static; flex-direction: column-reverse; padding: 13px 18px 18px; }
  .modal.product-modal #product-form > .form-actions .btn { width: 100%; }
  .view-head { display: block; }
  .head-actions { margin-top: 14px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .cashier-layout, .split-layout { grid-template-columns: 1fr; }
  .cashier-layout { min-height: auto; }
  .cart-panel { min-height: 440px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .input-search { width: 100%; }
  .sku-fields { grid-template-columns: 1fr; }
  .sku-image-field { grid-column: 1 / -1; }
  .sku-fields input:first-of-type { grid-column: 1 / -1; }
}

/* Modern readability scale and surface treatment */
body { font-size: 14px; }
.kicker { margin-bottom: 8px; font-size: 11px; letter-spacing: .04em; }
.form-error { font-size: 12px; }
.login-brand-top { font-size: 16px; }
.login-brand-copy p { font-size: 11px; letter-spacing: .04em; }
.login-brand-copy span { font-size: 14px; }
.header-brand strong { font-size: 15px; }
.edition, .connection { font-size: 11px; }
.nav-group > span { font-size: 10px; letter-spacing: .04em; }
.nav-link { min-height: 40px; font-size: 13px; }
.sidebar-foot { font-size: 11px; }
.workspace { background: var(--bg); }
.view-head h1 { font-size: 28px; letter-spacing: -.01em; }
.view-head p { font-size: 13px; }
.btn { min-height: 40px; padding: 0 15px; font-size: 12px; }
input, select, textarea { min-height: 40px; font-size: 13px; }
label { font-size: 12px; }
.metric-label { font-size: 12px; }
.metric-value { font-size: 30px; }
.metric-note { font-size: 11px; }
.panel-head { min-height: 62px; }
.panel-head h2 { font-size: 15px; }
.quick-action { min-height: 70px; }
.quick-action strong { font-size: 13px; }
.quick-action span { font-size: 11px; }
.count-label, .muted { font-size: 11px; }
th { padding: 12px 14px; font-size: 11px; letter-spacing: .02em; }
td { padding: 13px 14px; font-size: 12px; }
.product-info strong { font-size: 13px; }
.product-info span { font-size: 11px; }
.badge { min-height: 24px; font-size: 11px; }
.empty { font-size: 13px; }
.activity-row { font-size: 12px; }
.activity-row strong { font-size: 13px; }
.product-tile strong { font-size: 12px; }
.product-tile span { font-size: 11px; }
.product-tile b { font-size: 13px; }
.cart-row strong { font-size: 12px; }
.cart-row small, .summary-line { font-size: 11px; }
.summary-line.total { font-size: 15px; }
.discounts button { font-size: 11px; }
.section-title h3 { font-size: 14px; }
.section-title span { font-size: 11px; }
.sku-meta { font-size: 11px; }
.modal-head h2 { font-size: 21px; }
.modal-body { font-size: 13px; }
.drawer-head h2 { font-size: 22px; }
.detail-list span, .event-list span, .event-list small { font-size: 11px; }
.detail-list strong { font-size: 12px; }
.toast { font-size: 12px; }
.app-header { box-shadow: 0 2px 12px rgba(12, 16, 14, .16); }
.panel, .metrics { box-shadow: 0 8px 24px rgba(22, 29, 25, .06); }
.nav-link.active { box-shadow: inset 3px 0 0 var(--red); }

@media (max-width: 760px) {
  .login-brand-copy h1 { font-size: 34px; }
  .view-head h1 { font-size: 24px; }
  .view-head p { font-size: 12px; }
  .quick-action strong { font-size: 12px; }
  .quick-action span { font-size: 10px; }
  th { font-size: 10px; }
  td { font-size: 11px; }
}
