:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #111114;
  --text-secondary: #707078;
  --text-tertiary: #9a9aa1;
  --line: rgba(17, 17, 20, 0.08);
  --accent: #ff8a00;
  --accent-soft: #fff0dd;
  --green: #248a3d;
  --green-soft: #e8f7eb;
  --red: #d70015;
  --red-soft: #ffe9eb;
  --blue: #007aff;
  --blue-soft: #e8f2ff;
  --dark: #171719;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .42; cursor: not-allowed; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.25);
  outline-offset: 2px;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: 100%;
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: calc(92px + var(--safe-bottom));
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 138, 0, 0.10), transparent 32%),
    var(--bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(68px + var(--safe-top));
  padding: calc(12px + var(--safe-top)) 18px 12px;
  background: rgba(242, 242, 247, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.brand-block { display: flex; align-items: center; gap: 11px; }
.brand-block strong, .brand-block small { display: block; }
.brand-block strong { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.brand-block small { margin-top: 2px; color: var(--text-secondary); font-size: 11px; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--accent);
}
.brand-icon svg { width: 26px; height: 26px; }

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync-pill.needs-sync .sync-dot { background: var(--accent); }
.sync-pill.sync-error .sync-dot { background: var(--red); }

.app-main { padding: 22px 16px 28px; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; font-size: 30px; font-weight: 720; letter-spacing: -0.045em; }
.page-heading p { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; }
.page-heading .date { color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--dark);
  color: #fff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.14);
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -62px;
  width: 190px;
  height: 190px;
  border: 28px solid rgba(255, 138, 0, 0.18);
  border-radius: 50%;
}
.hero-label { position: relative; z-index: 1; color: rgba(255,255,255,.64); font-size: 12px; }
.hero-value { position: relative; z-index: 1; margin-top: 7px; font-size: 42px; font-weight: 720; letter-spacing: -0.05em; }
.hero-value small { margin-left: 4px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.64); }
.hero-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 18px; }
.hero-meta span { color: rgba(255,255,255,.68); font-size: 11px; }
.hero-meta b { display: block; margin-top: 3px; color: #fff; font-size: 15px; font-weight: 620; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 12px; }
.stat-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.stat-card .label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-secondary); font-size: 11px; }
.stat-card .value { margin-top: 10px; font-size: 24px; font-weight: 700; letter-spacing: -0.035em; }
.stat-card .value small { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.mini-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.mini-icon svg { width: 16px; height: 16px; }
.mini-icon.red { background: var(--red-soft); color: var(--red); }

.section { margin-top: 25px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: -0.02em; }
.section-head p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; }
.text-button { border: 0; padding: 7px 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-action {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
}
.quick-action .quick-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: 0 6px 18px rgba(0,0,0,.06), inset 0 0 0 1px var(--line);
  color: var(--text);
}
.quick-action.primary .quick-icon { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(255,138,0,.25); }
.quick-action svg { width: 21px; height: 21px; }

.alert-banner {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--red-soft);
  text-align: left;
  cursor: pointer;
}
.alert-banner .alert-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(215,0,21,.09); color: var(--red); }
.alert-banner strong { display: block; font-size: 13px; }
.alert-banner small { display: block; margin-top: 3px; color: #8e4a50; font-size: 11px; }
.alert-banner .chevron { color: rgba(215,0,21,.45); }

.list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.transaction-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.transaction-row:first-child { border-top: 0; }
.transaction-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--green-soft); color: var(--green); }
.transaction-icon.out { background: var(--blue-soft); color: var(--blue); }
.transaction-icon svg { width: 19px; height: 19px; }
.transaction-main { min-width: 0; }
.transaction-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.transaction-main small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 11px; }
.transaction-count { text-align: right; font-size: 14px; font-weight: 680; }
.transaction-count.in { color: var(--green); }
.transaction-count.out { color: var(--blue); }
.transaction-count small { display: block; margin-top: 3px; color: var(--text-tertiary); font-size: 10px; font-weight: 500; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.search-field { position: relative; flex: 1; }
.search-field svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; color: var(--text-tertiary); transform: translateY(-50%); pointer-events: none; }
.search-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.82);
  color: var(--text);
  outline: none;
}
.circle-button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: var(--dark); color: #fff; cursor: pointer; }
.circle-button svg { width: 20px; height: 20px; }

.filter-row { display: flex; gap: 8px; margin: 0 -16px 14px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; }
.filter-chip.is-active { border-color: var(--dark); background: var(--dark); color: #fff; }

.result-count { margin-bottom: 9px; color: var(--text-secondary); font-size: 11px; }
.product-list { display: grid; gap: 20px; }
.spec-group { display: grid; gap: 9px; }
.spec-group-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 0 3px; }
.spec-group-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.spec-group-head p { margin: 3px 0 0; color: var(--text-secondary); font-size: 10px; }
.spec-group-head > span { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.spec-product-list { display: grid; gap: 10px; }
.product-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.product-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.product-identity { display: flex; min-width: 0; gap: 12px; }
.tire-symbol { position: relative; display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border: 7px solid #242426; border-radius: 50%; background: #c8c8cd; box-shadow: inset 0 0 0 5px #f4f4f6; }
.tire-symbol::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6f6f75; }
.product-photo-button { flex: 0 0 46px; width: 46px; height: 46px; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: transparent; cursor: zoom-in; }
.product-photo { display: block; width: 100%; height: 100%; border-radius: 14px; object-fit: cover; background: rgba(118,118,128,.08); }
.product-copy { min-width: 0; }
.product-copy h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.product-copy p { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 12px; }
.stock-number { flex: none; text-align: right; }
.stock-number strong { display: block; font-size: 25px; font-weight: 720; letter-spacing: -0.04em; }
.stock-number small { color: var(--text-tertiary); font-size: 10px; }
.low-badge { display: inline-flex; margin-top: 4px; padding: 3px 7px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 9px; font-weight: 650; }
.product-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.meta-cell { min-width: 0; padding: 10px; border-radius: 12px; background: rgba(118,118,128,.07); }
.meta-cell span { display: block; color: var(--text-tertiary); font-size: 9px; }
.meta-cell strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 13px; }

.button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 13px;
  background: rgba(118,118,128,.1);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.button.primary { background: var(--dark); color: #fff; }
.button.accent { background: var(--accent); color: #fff; }
.button.green { background: var(--green-soft); color: var(--green); }
.button.blue { background: var(--blue-soft); color: var(--blue); }
.button.danger { background: var(--red-soft); color: var(--red); }
.button.block { width: 100%; }
.icon-only { display: grid; place-items: center; width: 42px; padding: 0; }
.icon-only svg { width: 18px; height: 18px; }

.empty-state { padding: 44px 20px; text-align: center; color: var(--text-secondary); }
.empty-state .empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 13px; border-radius: 19px; background: rgba(118,118,128,.08); color: var(--text-tertiary); }
.empty-state strong { display: block; color: var(--text); font-size: 15px; }
.empty-state p { margin: 6px 0 0; font-size: 12px; }

.settings-group { margin-top: 18px; }
.settings-group:first-of-type { margin-top: 0; }
.settings-title { margin: 0 0 8px 4px; color: var(--text-secondary); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.settings-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.settings-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 62px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.settings-row:first-child { border-top: 0; }
.settings-row-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); }
.settings-row-icon.orange { background: var(--accent-soft); color: var(--accent); }
.settings-row-icon.green { background: var(--green-soft); color: var(--green); }
.settings-row-icon svg { width: 18px; height: 18px; }
.settings-row strong { display: block; font-size: 13px; }
.settings-row small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 10px; }
.settings-value { color: var(--text-secondary); font-size: 12px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: calc(70px + var(--safe-bottom));
  padding: 7px 8px var(--safe-bottom);
  background: rgba(249, 249, 249, 0.88);
  border-top: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.nav-item { display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: var(--text-tertiary); font-size: 10px; font-weight: 600; cursor: pointer; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.is-active { color: var(--accent); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding-top: var(--safe-top); background: rgba(0,0,0,.34); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-backdrop[hidden] { display: none; }
.bottom-sheet { width: min(680px, 100%); max-height: min(88svh, 900px); overflow: hidden; border-radius: 26px 26px 0 0; background: #f9f9fb; box-shadow: 0 -20px 60px rgba(0,0,0,.2); animation: sheetUp .24s ease-out; }
@keyframes sheetUp { from { transform: translateY(28px); opacity: .7; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 38px; height: 5px; margin: 8px auto 2px; border-radius: 999px; background: rgba(60,60,67,.22); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 13px; border-bottom: 1px solid var(--line); }
.sheet-eyebrow { display: block; margin-bottom: 3px; color: var(--text-tertiary); font-size: 9px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.sheet-header h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.close-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(118,118,128,.12); color: var(--text-secondary); cursor: pointer; }
.close-button svg { width: 18px; height: 18px; }
.sheet-content { max-height: calc(88svh - 76px); overflow-y: auto; padding: 18px 18px calc(22px + var(--safe-bottom)); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field > span { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid rgba(60,60,67,.14);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
}
.form-field textarea { min-height: 84px; resize: vertical; }
.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 44px; }
.input-with-unit span { position: absolute; right: 13px; top: 50%; color: var(--text-tertiary); font-size: 12px; transform: translateY(-50%); pointer-events: none; }
.form-hint { margin: 0; color: var(--text-tertiary); font-size: 10px; line-height: 1.5; }
.form-error { margin: 0; color: var(--red); font-size: 11px; }
.form-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 18px; }
.form-actions.single { grid-template-columns: 1fr; }
[hidden] { display: none !important; }

.image-upload-preview { display: grid; place-items: center; min-height: 180px; overflow: hidden; border: 1px dashed rgba(60,60,67,.22); border-radius: 16px; background: #fff; }
.image-upload-preview > img { width: 100%; height: 210px; object-fit: contain; background: rgba(118,118,128,.05); }
.image-upload-preview > span { display: grid; justify-items: center; gap: 8px; color: var(--text-tertiary); }
.image-upload-preview svg { width: 30px; height: 30px; }
.image-upload-preview small { font-size: 11px; }
.image-upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.image-picker { position: relative; display: grid; place-items: center; overflow: hidden; }
.image-picker input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: rgba(118,118,128,.12); }
.segmented button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 650; cursor: pointer; }
.segmented button.is-active { background: #fff; color: var(--text); box-shadow: 0 2px 7px rgba(0,0,0,.08); }

.selected-product { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px; border-radius: 17px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.selected-product strong, .selected-product small { display: block; }
.selected-product small { margin-top: 4px; color: var(--text-secondary); font-size: 11px; }
.selected-product .stock { text-align: right; font-size: 21px; font-weight: 700; }
.selected-product .stock small { font-size: 9px; font-weight: 500; }

.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-tertiary); font-size: 10px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.sync-code { width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; word-break: break-all; resize: vertical; }
.notice { padding: 13px; border-radius: 14px; background: var(--blue-soft); color: #285b8f; font-size: 11px; line-height: 1.55; }
.notice.warning { background: var(--accent-soft); color: #8a571a; }

.image-lightbox { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: minmax(0,1fr) auto; place-items: center; gap: 14px; padding: calc(54px + var(--safe-top)) 18px calc(22px + var(--safe-bottom)); background: rgba(0,0,0,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.image-lightbox img { display: block; max-width: 100%; max-height: calc(100svh - 130px - var(--safe-top) - var(--safe-bottom)); border-radius: 16px; object-fit: contain; }
.image-lightbox p { margin: 0; color: rgba(255,255,255,.82); font-size: 13px; text-align: center; }
.lightbox-close { position: absolute; top: calc(12px + var(--safe-top)); right: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.lightbox-close svg { width: 21px; height: 21px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 80;
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(28,28,30,.94);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 540px) {
  .app-shell { max-width: 680px; min-height: 100svh; box-shadow: 0 0 45px rgba(0,0,0,.08); }
  .app-header, .bottom-nav { left: 50%; right: auto; width: min(680px, 100%); transform: translateX(-50%); }
  .app-main { padding-left: 24px; padding-right: 24px; }
  .filter-row { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid.two-column { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 370px) {
  .app-header { padding-left: 13px; padding-right: 13px; }
  .app-main { padding-left: 12px; padding-right: 12px; }
  .filter-row { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .brand-block small { display: none; }
  .sync-pill { padding: 0 9px; }
  .page-heading h1 { font-size: 27px; }
  .quick-grid { gap: 5px; }
  .quick-action .quick-icon { width: 46px; height: 46px; }
  .product-meta { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
