:root {
  color-scheme: light;
  --paper: #f7fbff;
  --paper-deep: #eef6ff;
  --paper-warm: #fff8ee;
  --ink: #172033;
  --muted: #718097;
  --line: #dbe7f3;
  --yellow: #ffd861;
  --yellow-soft: #fff6c9;
  --green: #20a37a;
  --green-soft: #e8fbf4;
  --blue: #4f8cff;
  --blue-soft: #eaf2ff;
  --coral: #ff7b72;
  --white: #ffffff;
  --danger: #d35b51;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 216, 97, 0.32), transparent 22rem),
    radial-gradient(circle at 92% 4%, rgba(79, 140, 255, 0.22), transparent 24rem),
    linear-gradient(135deg, var(--paper), var(--paper-deep) 58%, var(--paper-warm));
}

button, input, select { font: inherit; }
button { cursor: pointer; }

main { width: min(1760px, calc(100% - 22px)); margin: 0 auto; padding: 18px 0 40px; }

.login-card {
  width: min(600px, 100%);
  margin: 11vh auto 0;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(74, 67, 53, 0.18);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(91, 116, 144, 0.16);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-bottom: 34px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-family: Georgia, serif;
  font-weight: 700;
}

h1, h2, p { margin-top: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.04em; }
h1 { margin-bottom: 12px; font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1; }
h2 { margin-bottom: 0; font-size: 1.55rem; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.intro { max-width: 470px; margin-bottom: 32px; color: var(--muted); line-height: 1.55; }
label { display: block; margin-bottom: 7px; font-size: 0.78rem; font-weight: 750; }

input, select {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  outline: none;
  background: var(--white);
}

input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14); }

.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; }
.input-row button, .button-icon-text, .status-banner button {
  padding: 12px 19px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-weight: 750;
}

.form-status, .form-error { min-height: 1.2em; margin: 10px 0 0; font-size: 0.85rem; }
.form-status { color: var(--muted); }
.form-error { margin-top: 0; color: var(--danger); }

.app-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.app-header h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.25rem); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.concept-toggle { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.72); }
.concept-toggle-button { padding: 7px 11px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 0.76rem; font-weight: 850; }
.concept-toggle-button.active { color: var(--white); background: linear-gradient(135deg, var(--blue), var(--green)); }
.button-quiet { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255, 255, 255, 0.7); }
.button-quiet:hover { background: var(--white); box-shadow: 0 8px 18px rgba(91, 116, 144, 0.12); }
.scan-header-button { color: var(--green); font-weight: 850; }

.barcode-dialog { width: min(520px, calc(100% - 24px)); padding: 18px; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: rgba(255, 255, 255, 0.96); box-shadow: 0 28px 90px rgba(23, 32, 51, 0.25); }
.barcode-dialog::backdrop { background: rgba(23, 32, 51, 0.34); backdrop-filter: blur(5px); }
.barcode-dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.barcode-dialog-heading h2 { font-size: 1.45rem; }
.barcode-close { width: 32px; height: 32px; color: var(--ink); background: var(--paper-deep); font-size: 1.25rem; }
.barcode-mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.barcode-mode-button { padding: 9px 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 850; }
.barcode-mode-button.active { color: var(--white); background: linear-gradient(135deg, var(--blue), var(--green)); }
.barcode-camera-box { position: relative; display: grid; min-height: 220px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #13202b; }
.barcode-camera-box video { display: block; width: 100%; max-height: 310px; object-fit: cover; }
.barcode-camera-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 32px; color: #d9e6f2; text-align: center; }
.barcode-camera-button { width: 100%; margin-top: 8px; }
.barcode-status { min-height: 1.4em; margin: 10px 2px; color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
.barcode-manual-form, .barcode-bind-form { padding-top: 12px; border-top: 1px solid var(--line); }
.barcode-bind-form { margin-top: 12px; padding: 12px; border: 1px solid #ead16a; border-radius: 16px; background: var(--yellow-soft); }
.barcode-bind-form p { margin-bottom: 10px; font-size: 0.84rem; line-height: 1.4; }
.barcode-bind-form select { flex: 1; }

.status-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 11px 14px; border-radius: 16px; color: #9d3b35; background: #ffe6e2; }
.status-banner[data-kind="loading"] { color: #5e573e; background: #eee4bf; }
.status-banner button { padding: 7px 10px; }

.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; margin-bottom: 12px; padding: 5px; border: 1px solid rgba(133, 167, 205, 0.28); border-radius: 999px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(91, 116, 144, 0.1); }
.tab-button { flex: 0 1 150px; padding: 9px 14px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-weight: 850; }
.tab-button.active { color: var(--white); background: linear-gradient(135deg, var(--coral), var(--blue)); box-shadow: 0 10px 22px rgba(79, 140, 255, 0.22); }

.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); align-items: start; gap: 12px; }
.panel { overflow: hidden; border: 1px solid rgba(133, 167, 205, 0.25); border-radius: 26px; background: rgba(255, 255, 255, 0.82); box-shadow: 0 18px 50px rgba(91, 116, 144, 0.1); }
.pantry-panel { min-height: calc(100vh - 126px); padding: clamp(12px, 2vw, 20px); }
.shopping-panel { padding: 16px; color: var(--ink); background: rgba(255, 255, 255, 0.68); }
.shopping-panel .eyebrow { color: var(--blue); }
.consumables-panel, .history-panel { padding: clamp(16px, 3vw, 28px); }
.history-panel { min-height: calc(100vh - 126px); }

.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.counter { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 999px; color: #775c00; background: var(--yellow-soft); font-weight: 850; font-size: 0.86rem; }
.counter-dark { color: #775c00; background: var(--yellow-soft); }

.add-product-form { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(90px, 0.24fr) minmax(170px, 0.52fr) auto; align-items: end; gap: 8px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(247, 251, 255, 0.78); }
.add-product-form input, .add-product-form select { width: 100%; }
.device-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; padding: 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 253, 248, 0.7); }
.device-form input { width: 100%; }
.button-icon-text { white-space: nowrap; }
.hint { margin: 7px 0 6px; color: var(--muted); font-size: 0.73rem; line-height: 1.35; }
.safety-note { max-width: 760px; margin-bottom: 16px; padding: 11px 13px; border-left: 4px solid var(--yellow); border-radius: 10px; background: rgba(255, 243, 184, 0.55); }
.view-toggle { display: inline-flex; gap: 4px; margin: 0 0 8px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.62); }
.view-toggle-button { padding: 6px 11px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 0.78rem; font-weight: 850; }
.view-toggle-button.active { color: var(--white); background: linear-gradient(135deg, var(--blue), var(--green)); }
.quick-mode-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid #cdeadd; border-radius: 18px; background: linear-gradient(135deg, var(--green-soft), rgba(234, 242, 255, 0.78)); }
.quick-mode-toolbar > div:first-child { display: grid; gap: 2px; }
.quick-mode-toolbar strong { font-size: 0.92rem; }
.quick-mode-toolbar span { color: var(--muted); font-size: 0.72rem; }
.quick-filter { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); }
.quick-filter-button { padding: 7px 10px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 0.72rem; font-weight: 850; white-space: nowrap; }
.quick-filter-button.active { color: var(--ink); background: var(--white); box-shadow: 0 4px 12px rgba(91, 116, 144, 0.12); }
#app-view[data-interface-mode="quick"] .classic-stock-control { display: none; }
.voice-panel { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto; align-items: center; gap: 7px; margin: 0 0 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.58); color: var(--muted); font-size: 0.78rem; }
.voice-button { flex: 0 0 auto; padding: 7px 11px; font-weight: 850; }
.voice-submit { padding: 7px 11px; font-weight: 850; }
.voice-panel input { min-height: 32px; padding: 6px 9px; border-radius: 11px; font-size: 0.82rem; }
.voice-panel span { grid-column: 1 / -1; }

.product-list, .shopping-list, .category-products, .device-list, .consumable-list, .history-list { padding: 0; margin: 0; list-style: none; }
.product-list { max-height: none; overflow: visible; padding-right: 0; }
.pantry-panel { overflow: visible; }
.product-group { margin-top: 8px; }
.product-group:first-child { margin-top: 2px; }
.category-heading { position: sticky; top: 58px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); }
.category-heading h3 { margin: 0; color: var(--blue); font-size: 0.64rem; letter-spacing: 0.055em; text-transform: uppercase; }
.category-heading span { color: var(--muted); font-size: 0.66rem; font-weight: 800; }
.product-item { display: grid; grid-template-columns: 22px minmax(140px, 1fr) 24px minmax(68px, 0.16fr) 24px 24px 24px; align-items: center; gap: 5px; min-height: 29px; margin-top: 2px; padding: 2px 6px; border: 1px solid transparent; border-radius: 8px; font-size: 0.82rem; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.product-item:hover { background: rgba(234, 242, 255, 0.55); }
.product-item.needed { border-color: #f0d26e; background: var(--yellow-soft); }
.product-check, .shopping-check { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.product-title { display: flex; min-width: 0; align-items: center; gap: 6px; }
.product-name { min-width: 0; overflow: hidden; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.stock-badge { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; color: #956b00; background: #fff0a8; font-size: 0.64rem; font-weight: 850; line-height: 1.25; letter-spacing: 0.015em; }
.amount-input { width: 100%; padding: 2px 6px; min-height: 24px; border-color: transparent; border-radius: 7px; background: rgba(255, 255, 255, 0.72); font-size: 0.8rem; }
.product-item:not(.needed) .amount-input { background: transparent; }

.icon-button { display: grid; width: 24px; height: 24px; place-items: center; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: rgba(79, 140, 255, 0.12); }
.amount-step { color: var(--blue); background: rgba(79, 140, 255, 0.08); font-size: 0.9rem; font-weight: 900; line-height: 1; }
.amount-step:hover { color: var(--white); background: linear-gradient(135deg, var(--blue), var(--green)); }
.add-to-cart { color: var(--green); }
.delete-button:hover { color: var(--danger); }

.quick-product-item { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; align-items: center; gap: 8px; min-height: 48px; margin-top: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.72); }
.quick-product-item.needed { border-color: #f0d26e; background: var(--yellow-soft); }
.quick-product-title { display: grid; min-width: 0; gap: 2px; }
.quick-product-title strong { overflow: hidden; font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-product-title small { color: var(--muted); font-size: 0.7rem; }
.quick-product-actions { display: flex; gap: 5px; }
.quick-action { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--white); font-size: 0.74rem; font-weight: 850; white-space: nowrap; }
.status-action { color: #876100; border-color: #ead16a; background: #fff9dc; }
.status-action.active { color: #725500; background: #ffeaa0; }
.status-action.static-status { cursor: default; color: var(--danger); border-color: #f2c1bb; background: #fff0ed; }
.empty-action { color: var(--danger); }
.buy-action { color: var(--green); }
.quick-action:not(.static-status):hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(91, 116, 144, 0.12); }

.quick-add { display: flex; gap: 7px; margin-bottom: 10px; }
.quick-add input { flex: 1; border-color: var(--line); color: var(--ink); background: var(--white); }
.quick-add input::placeholder { color: #9aa8ba; }
.quick-add input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14); }
.quick-add button { width: 42px; border: 0; border-radius: 14px; color: var(--white); background: linear-gradient(135deg, var(--coral), var(--yellow)); font-size: 1.15rem; font-weight: 850; }

.shopping-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.shopping-check { accent-color: var(--green); }
.shopping-text { overflow-wrap: anywhere; }
.shopping-item.done .shopping-text { color: #9aa8ba; text-decoration: line-through; }
.shopping-item .icon-button { color: var(--muted); }
.shopping-item .icon-button:hover { color: var(--danger); background: #fff0ed; }
.clear-completed { width: 100%; margin-top: 12px; padding: 9px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--white); }

@media (min-width: 1100px) {
  .shopping-panel { position: sticky; top: 62px; }
}

.device-list { display: grid; gap: 14px; }
.device-card { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, 0.78); }
.device-card-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.device-card h3 { margin: 0 0 3px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; }
.device-card-header p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.device-details { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 12px; margin-bottom: 14px; }
.plate-photo-box { display: grid; min-height: 116px; place-items: center; overflow: hidden; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); background: rgba(255, 255, 255, 0.5); font-size: 0.8rem; }
.plate-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.device-edit-grid { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr); align-content: start; gap: 8px; }
.device-edit-grid input[type="file"] { grid-column: 1 / -1; padding: 9px; font-size: 0.82rem; }
.compact-input { width: 100%; padding: 7px 9px; border-radius: 8px; font-size: 0.86rem; }
.strong-input { font-weight: 800; }
.consumable-list { display: grid; gap: 8px; margin-bottom: 12px; }
.consumable-item { display: grid; grid-template-columns: 58px minmax(180px, 1.2fr) minmax(170px, 0.9fr) minmax(190px, 1fr) auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, 0.52); }
.consumable-item.due { border-color: #e7b0a7; background: #fff0ed; }
.consumable-item.soon { border-color: #ead16a; background: var(--yellow-soft); }
.consumable-main, .consumable-schedule, .consumable-actions { display: flex; gap: 7px; }
.consumable-main { min-width: 0; }
.consumable-photo-box { display: grid; width: 58px; height: 44px; place-items: center; overflow: hidden; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.62); font-size: 0.68rem; }
.consumable-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.reminder-text { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.consumable-actions { justify-content: end; }
.consumable-actions button, .consumable-form button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: var(--white); font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.consumable-actions button:hover, .consumable-form button:hover { background: rgba(73, 102, 78, 0.08); }
.consumable-photo-input { max-width: 112px; padding: 6px; border-radius: 8px; font-size: 0.7rem; }
.consumable-form { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(110px, 0.7fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(130px, 0.8fr) auto; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.consumable-form input { width: 100%; padding: 8px 9px; border-radius: 8px; font-size: 0.84rem; }

.history-panel .panel-heading { margin-bottom: 16px; }
.history-panel .hint { margin-bottom: 12px; }
.history-list { display: grid; gap: 8px; margin-top: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(247, 251, 255, 0.6); }
.history-list:empty { display: none; }
.history-item { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.62); }
.history-time { color: var(--muted); font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.history-body { min-width: 0; }
.history-body p { margin: 0 0 3px; font-size: 0.92rem; font-weight: 800; }
.history-body small { color: var(--muted); overflow-wrap: anywhere; }

.empty-state { padding: 42px 12px; text-align: center; color: var(--muted); }
.empty-state span { display: inline-grid; width: 44px; height: 44px; place-items: center; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 50%; font-size: 1.4rem; }
.empty-state p { margin-bottom: 4px; color: var(--ink); font-weight: 750; }
.empty-state small { font-size: 0.78rem; }
.empty-dark { color: var(--muted); }
.empty-dark span { border-color: var(--line); }
.empty-dark p { color: var(--ink); }
.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; }

button:disabled, input:disabled, select:disabled { cursor: wait; opacity: 0.55; }

@media (max-width: 820px) {
  .dashboard { grid-template-columns: 1fr; }
  .shopping-panel { order: 2; }
  .pantry-panel { min-height: auto; }
  .device-form, .device-details, .consumable-item, .consumable-form { grid-template-columns: 1fr; }
  .consumable-main, .consumable-schedule, .consumable-actions { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  main { width: min(100% - 12px, 1180px); padding-top: 10px; }
  input, select { font-size: 16px; }
  .login-card { margin-top: 4vh; border-radius: 20px; }
  .app-header { align-items: flex-start; }
  .header-actions { align-items: flex-end; flex-direction: column-reverse; }
  .scan-header-button { order: -1; }
  .concept-toggle-button { padding: 6px 8px; font-size: 0.68rem; }
  .input-row { flex-direction: column; }
  .add-product-form { grid-template-columns: 1fr 1fr; }
  .add-product-form > div:nth-child(3) { grid-column: 1 / -1; }
  .add-product-form .button-icon-text { grid-column: 1 / -1; }
  .voice-panel { grid-template-columns: 1fr auto; gap: 5px; }
  .voice-button { grid-column: 1; }
  .voice-panel input, .voice-panel span { grid-column: 1 / -1; }
  .quick-mode-toolbar { align-items: stretch; flex-direction: column; padding: 10px; }
  .quick-filter { align-self: stretch; }
  .quick-filter-button { flex: 1; padding-inline: 6px; }
  .quick-product-item { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 7px; }
  .quick-product-actions { grid-column: 1 / -1; }
  .quick-product-actions .quick-action { flex: 1; }
  .quick-action { min-height: 36px; }
  .tab-button { flex: 1; }
  .device-form { padding: 12px; }
  .device-edit-grid { grid-template-columns: 1fr; }
  .history-panel { min-height: auto; padding: 14px 10px; }
  .history-list { padding: 6px; border-radius: 16px; }
  .history-item { grid-template-columns: 1fr; gap: 4px; padding: 9px 10px; }
  .product-item { grid-template-columns: 18px minmax(0, 1fr) 22px 54px 22px 22px 22px; gap: 4px; padding: 2px 4px; font-size: 0.78rem; }
  .product-check, .shopping-check { width: 17px; height: 17px; }
  .product-title { gap: 4px; }
  .stock-badge { padding: 1px 5px; font-size: 0.58rem; }
  .amount-input { grid-column: auto; grid-row: auto; min-height: 24px; padding: 2px 4px; font-size: 16px; }
  .amount-step, .product-item .icon-button { width: 22px; height: 22px; }
  .category-heading { top: 52px; }
  .barcode-dialog { width: calc(100% - 12px); padding: 14px; border-radius: 20px; }
  .barcode-camera-box { min-height: 190px; }
}
