@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

:root {
  --ink: #202b24;
  --muted: #768078;
  --line: #e5e8df;
  --paper: #fff;
  --canvas: #f5f5ef;
  --green: #315c45;
  --green-dark: #254735;
  --green-pale: #e9f0e8;
  --coral: #c35c43;
  --coral-pale: #f9ece6;
  --shadow: 0 12px 32px rgba(34, 48, 36, .06);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.sidebar { position: fixed; inset: 0 auto 0 0; display: flex; width: 242px; flex-direction: column; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: #fbfbf7; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: white; background: var(--green); font-size: 20px; }
.brand-name { font-size: 15px; font-weight: 700; }
.brand-sub { margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav-label { margin: 42px 10px 12px; color: #9aa198; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 6px; color: #626d64; font-size: 13px; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: var(--green-dark); background: var(--green-pale); }
.nav-count { display: grid; min-width: 22px; height: 22px; margin-left: auto; place-items: center; border-radius: 20px; color: var(--coral); background: var(--coral-pale); font-size: 11px; }
.side-bottom { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.65; }
.side-bottom strong { display: block; margin-bottom: 3px; color: #48544b; font-size: 12px; }
main { max-width: 1440px; min-height: 100vh; margin-left: 242px; padding: 42px clamp(24px, 4.5vw, 68px) 56px; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 33px; }
.eyebrow { color: var(--coral); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
h1, h2 { margin: 8px 0 0; font-family: Fraunces, Georgia, serif; font-weight: 500; letter-spacing: 0; }
h1 { font-size: clamp(29px, 3vw, 37px); }
h2 { margin: 0; font-size: 22px; }
.today { color: var(--muted); font-size: 12px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 0; border-radius: 5px; color: white; background: var(--green); cursor: pointer; font-size: 12px; font-weight: 700; }
.button:hover { background: var(--green-dark); }
.button.secondary { border: 1px solid var(--line); color: #59645b; background: white; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.metric { min-height: 112px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.metric-label { color: #778078; font-size: 11px; font-weight: 600; }
.metric-value { margin-top: 10px; font-family: Fraunces, Georgia, serif; font-size: 29px; line-height: 1; }
.metric-hint { margin-top: 6px; color: #929a92; font-size: 10px; }
.stock-alert { display: flex; align-items: center; gap: 12px; min-height: 55px; margin-bottom: 26px; padding: 10px 15px; border: 1px solid #efdcd1; border-radius: 6px; background: #fcf4ef; }
.alert-icon { display: grid; width: 29px; height: 29px; flex: none; place-items: center; border-radius: 50%; color: var(--coral); background: #f5e5db; }
.alert-copy { color: #765b4e; font-size: 12px; }
.alert-copy strong { color: #573e33; }
.alert-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.alert-actions form { display: flex; }
.alert-link { margin: 0; padding: 0; border: 0; color: var(--coral); background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; }
.inventory-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }
.toolbar { display: flex; align-items: center; gap: 9px; }
.search { width: 208px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; outline: 0; background: white; font-size: 11px; }
.search:focus, .field input:focus, .field select:focus { border-color: #7e9a82; box-shadow: 0 0 0 3px rgba(68, 111, 76, .1); }
.filters { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 3px; }
.filter { flex: none; padding: 7px 11px; border-radius: 4px; color: #778078; font-size: 10px; font-weight: 600; }
.filter:hover, .filter.active { color: var(--green-dark); background: var(--green-pale); }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fafbf8; }
th { height: 39px; padding: 0 14px; border-bottom: 1px solid var(--line); color: #858e85; font-size: 9px; font-weight: 700; letter-spacing: .65px; text-transform: uppercase; }
td { height: 61px; padding: 8px 14px; border-bottom: 1px solid #eff1eb; color: #525e54; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfb; }
.product { display: flex; align-items: center; gap: 11px; min-width: 165px; }
.product > div { min-width: 0; }
.product-name-line, .shopping-name-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 7px; min-width: 0; }
.brand-badge { display: inline-block; flex: none; padding: 3px 6px; border: 1px solid #dfe8db; border-radius: 3px; color: #46634b; background: #eef3eb; font-size: 8px; font-weight: 700; line-height: 1.2; }
.kosher-badge { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 3px 6px; border: 1px solid transparent; border-radius: 3px; font-size: 8px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.kosher-badge .kosher-symbol { display: grid; width: 14px; height: 14px; place-items: center; border: 1px solid currentColor; border-radius: 50%; }
.kosher-badge .kosher-symbol svg { display: block; width: 9px; height: 9px; }
.kosher-badge.kosher, .kosher-badge.kosher_dairy, .kosher-badge.pareve { border-color: #d5e5d4; color: #3c7147; background: #edf5eb; }
.kosher-badge.kosher_meat { border-color: #efdad3; color: #a94e3d; background: #fcf0ec; }
.kosher-badge.fish { border-color: #d6e3e8; color: #416875; background: #edf5f7; }
.kosher-badge.passover { border-color: #eadcb9; color: #816525; background: #f8f1df; }
.kosher-badge.not_kosher { border-color: #efdad3; color: #a94e3d; background: #fcf0ec; }
.kosher-badge.unknown { border-color: #e4e5de; color: #68716b; background: #f2f3ef; }
.pantry-only[hidden] { display: none; }
.seasonal-indicator { display: inline-flex; width: 17px; height: 17px; flex: none; align-items: center; justify-content: center; border-radius: 50%; color: #8b6824; background: #f7f0de; vertical-align: middle; }
.seasonal-indicator svg { display: block; width: 11px; height: 11px; }
.product-icon { display: grid; width: 35px; height: 35px; flex: none; place-items: center; border-radius: 7px; color: var(--green); background: #edf1e8; font-size: 12px; font-weight: 700; }
.image-thumbnail { display: grid; width: 40px; height: 40px; flex: none; place-items: center; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #f2f4ee; cursor: zoom-in; }
.image-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-thumbnail img[hidden], .thumbnail-placeholder[hidden] { display: none; }
.thumbnail-placeholder { color: var(--green); font-size: 18px; }
.item-identity-field { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 14px; }
.item-photo-preview { width: 72px; height: 72px; }
.photo-controls { display: grid; gap: 7px; }
.photo-controls input[type="file"] { width: 100%; height: auto; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.remove-photo { display: flex; align-items: center; gap: 7px; color: var(--coral); font-size: 11px; }
.remove-photo input { width: 15px; height: 15px; margin: 0; accent-color: var(--coral); }
.shopping-thumbnail { width: 42px; height: 42px; }
.shopping-thumbnail-placeholder { width: 42px; height: 42px; }
.item-image-viewer { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 24px; border: 0; background: transparent; }
.item-image-viewer::backdrop { background: rgba(18, 26, 20, .82); }
.image-viewer-inner { position: relative; display: grid; width: 100%; height: 100%; place-items: center; }
.image-viewer-inner img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: white; box-shadow: 0 18px 70px rgba(0, 0, 0, .35); }
.image-viewer-close { position: absolute; top: 0; right: 0; z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; color: white; background: rgba(30, 40, 32, .75); cursor: pointer; font-size: 22px; }
.product-name { color: #2b362d; font-size: 11px; font-weight: 700; }
.product-detail { margin-top: 3px; color: #969d95; font-size: 9px; }
.product-location { margin-top: 3px; color: #536b58; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.inventory-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px 8px; max-width: 480px; margin-top: 7px; }
.inventory-detail { display: grid; min-width: 0; gap: 2px; }
.inventory-detail span { color: #909990; font-size: 8px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.inventory-detail strong { overflow-wrap: anywhere; color: #536057; font-size: 9px; font-weight: 500; line-height: 1.35; }
.category-tag { display: inline-block; padding: 5px 7px; border-radius: 3px; color: #667368; background: #f0f3ed; font-size: 9px; white-space: nowrap; }
.quantity { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.quantity strong { min-width: 16px; color: #303c32; font-size: 12px; text-align: center; }
.step-button { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #e8ebe4; border-radius: 4px; color: #677269; background: white; cursor: pointer; }
.step-button:hover { border-color: #b8c5b5; color: var(--green); }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 3px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.status.ok { color: #477452; background: #eaf3e9; }
.status.low { color: #af563e; background: #fbede6; }
.stock-status { display: grid; justify-items: start; gap: 5px; }
.restock-count { color: #768078; font-size: 9px; white-space: nowrap; }
.restock-count strong { color: #303c32; }
.row-action { padding: 5px 7px; border: 0; border-radius: 4px; color: var(--green); background: #f1f4ef; cursor: pointer; font-size: 10px; font-weight: 700; }
.row-action:hover { background: #e5ece2; }
.row-action.delete { color: var(--coral); background: var(--coral-pale); }
.table-foot { display: flex; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--line); color: #929990; font-size: 10px; }
.empty-state { padding: 42px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.form-panel { max-width: 720px; padding: 25px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.form-intro { margin: 6px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #59645b; font-size: 10px; font-weight: 700; }
.field input, .field select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #e0e5dc; border-radius: 4px; outline: 0; color: var(--ink); background: white; font-size: 12px; }
.field input::placeholder { color: #a4aba3; }
.checkbox-field { display: flex; min-height: 40px; align-items: center; gap: 9px; color: #59645b; font-size: 11px; font-weight: 500; }
.checkbox-field input { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--green); }
.optional-label, .field-hint { color: #929a92; font-size: 10px; font-weight: 400; }
.field-hint { line-height: 1.5; }
.item-shopping-settings { padding-top: 14px; border-top: 1px solid var(--line); }
.item-shopping-custom { display: grid; max-width: 320px; gap: 6px; }
.item-shopping-custom[hidden] { display: none; }
.item-shopping-custom label { color: #59645b; font-size: 10px; font-weight: 700; }
.item-shopping-custom input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #e0e5dc; border-radius: 4px; outline: 0; color: var(--ink); background: white; font-size: 12px; }
.item-shopping-custom input:focus { border-color: #7e9a82; box-shadow: 0 0 0 3px rgba(68, 111, 76, .1); }
.scan-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.scanner-dialog { width: min(100% - 32px, 520px); padding: 22px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 24px 80px rgba(25, 40, 28, .24); }
.scanner-dialog::backdrop { background: rgba(28, 39, 30, .65); }
.scanner-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.scanner-head p { margin: 5px 0 16px; color: var(--muted); font-size: 12px; }
.close-scan { width: 32px; height: 32px; border: 0; border-radius: 4px; color: #59645b; background: #f1f3ee; cursor: pointer; font-size: 22px; }
.scanner-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 5px; background: #19221b; }
.scanner-frame video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame span { position: absolute; top: 50%; right: 12%; left: 12%; height: 2px; background: #e7bd68; box-shadow: 0 0 12px rgba(231, 189, 104, .7); }
.scanner-status { min-height: 36px; margin: 12px 0; color: #59645b; font-size: 12px; line-height: 1.5; }
.scanner-actions { display: flex; justify-content: end; }
.action-group { display: flex; align-items: center; justify-content: end; gap: 5px; }
.action-group form { display: inline-flex; }
.shopping-summary { max-width: 620px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shopping-section { margin-top: 26px; }
.shopping-list { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.shopping-row { display: grid; grid-template-columns: 30px 46px minmax(0, 1fr) minmax(126px, auto) auto; align-items: center; gap: 12px 14px; min-height: 66px; padding: 14px 16px; border-bottom: 1px solid #eff1eb; }
.shopping-row:last-child { border-bottom: 0; }
.shopping-row.done .shopping-name strong { color: #899188; text-decoration: line-through; }
.shopping-check { display: flex; }
.check-button { width: 24px; height: 24px; border: 1px solid #cbd4c7; border-radius: 5px; color: white; background: white; cursor: pointer; }
.done .check-button { border-color: var(--green); background: var(--green); }
.shopping-name { display: grid; gap: 3px; min-width: 0; }
.shopping-name strong { overflow-wrap: anywhere; color: #2b362d; font-size: 12px; }
.shopping-name span { color: #969d95; font-size: 10px; }
.shopping-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.shopping-detail { display: grid; min-width: 0; gap: 2px; }
.shopping-detail span { overflow-wrap: anywhere; color: #536057; font-size: 10px; line-height: 1.35; }
.shopping-detail .shopping-detail-label { color: #909990; font-size: 8px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.shopping-restock { display: grid; gap: 6px; min-width: 170px; padding: 8px 10px; border: 1px solid #efdcd1; border-radius: 5px; background: #fcf4ef; }
.shopping-quantity-form { display: grid; gap: 5px; }
.shopping-quantity-form > label { color: #9d5b43; font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.shopping-quantity-fields { display: flex; align-items: center; gap: 6px; }
.shopping-quantity-fields input { width: 64px; height: 36px; padding: 0 7px; border: 1px solid #e6cfc3; border-radius: 4px; color: #573e33; background: white; font: 600 18px Fraunces, Georgia, serif; }
.shopping-quantity-fields small { flex: 1; color: #765b4e; font-size: 10px; }
.shopping-save-button { min-height: 32px; padding: 0 9px; border: 0; border-radius: 4px; color: white; background: #9d5b43; cursor: pointer; font-size: 10px; font-weight: 700; }
.shopping-save-button:hover { background: #834932; }
.shopping-auto-form { display: flex; }
.shopping-auto-button { padding: 0; border: 0; color: #765b4e; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.shopping-auto-label { color: #765b4e; font-size: 9px; }
.shopping-row.done .shopping-restock { opacity: .62; }
.shopping-empty { border: 1px solid var(--line); border-radius: 7px; background: white; }
.recipe-count { color: var(--muted); font-size: 11px; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.recipe-card { display: grid; grid-template-columns: minmax(130px, .75fr) minmax(0, 1.5fr); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.recipe-card-image { display: grid; min-height: 220px; place-items: center; overflow: hidden; color: #6d806c; background: #e9eee5; font-size: 42px; }
.recipe-card-image img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.recipe-card-body { display: grid; align-content: start; gap: 14px; min-width: 0; padding: 16px; }
.recipe-card-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.recipe-card-top > div { min-width: 0; }
.recipe-card-top h2 { overflow-wrap: anywhere; font-size: 20px; }
.recipe-card-top p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.recipe-edit-link, .recipe-view-link { color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap; }
.recipe-view-link { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.recipe-card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 10px; }
.recipe-stock-summary { display: flex; flex-wrap: wrap; gap: 5px; }
.stock-pill { padding: 4px 6px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.stock-pill.available { color: #477452; background: #eaf3e9; }
.stock-pill.missing { color: #af563e; background: #fbede6; }
.stock-pill.mismatch { color: #8b6824; background: #f7f0de; }
.recipe-empty { padding: 48px 20px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.recipe-empty p { margin: 8px 0 18px; color: var(--muted); font-size: 12px; }
.recipe-form-panel { max-width: 960px; }
.field textarea { width: 100%; min-height: 90px; resize: vertical; padding: 10px; border: 1px solid #e0e5dc; border-radius: 4px; outline: 0; color: var(--ink); background: white; font: inherit; font-size: 12px; line-height: 1.5; }
.field textarea:focus { border-color: #7e9a82; box-shadow: 0 0 0 3px rgba(68, 111, 76, .1); }
.ingredient-editor { margin: 26px 0; }
.recipe-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.recipe-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.ingredient-list { display: grid; gap: 9px; }
.ingredient-editor-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.3fr) minmax(90px, .65fr) minmax(100px, .8fr) 32px; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcf9; }
.ingredient-editor-row label { display: grid; min-width: 0; gap: 5px; color: #59645b; font-size: 9px; font-weight: 700; }
.ingredient-editor-row input, .ingredient-editor-row select { width: 100%; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid #e0e5dc; border-radius: 4px; outline: 0; color: var(--ink); background: white; font-size: 11px; }
.ingredient-editor-row input:focus, .ingredient-editor-row select:focus { border-color: #7e9a82; }
.ingredient-editor-row input[readonly] { color: #667368; background: #f0f3ed; }
.ingredient-remove { display: grid; width: 30px; height: 34px; place-items: center; border: 1px solid #efdcd1; border-radius: 4px; color: var(--coral); background: white; cursor: pointer; font-size: 19px; }
.recipe-steps { padding-top: 4px; border-top: 1px solid var(--line); }
.recipe-hero-image { max-height: 380px; overflow: hidden; border-radius: 7px; background: #e9eee5; }
.recipe-hero-image img { display: block; width: 100%; max-height: 380px; object-fit: cover; }
.recipe-description { max-width: 800px; margin: 18px 0; color: #59645b; font-size: 14px; line-height: 1.65; }
.recipe-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recipe-time-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 20px 0; }
.recipe-time-grid > div { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.recipe-time-grid span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.recipe-time-grid strong { color: var(--ink); font-family: Fraunces, Georgia, serif; font-size: 18px; font-weight: 500; }
.recipe-video-link { margin: 14px 0; font-size: 12px; font-weight: 700; }
.recipe-video-link a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.recipe-detail-layout { display: grid; grid-template-columns: minmax(270px, .85fr) minmax(0, 1.5fr); align-items: start; gap: 22px; margin-top: 24px; }
.recipe-ingredients-panel { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.recipe-ingredient-list { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.recipe-ingredient { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid #eff1eb; }
.recipe-ingredient > div { display: grid; min-width: 0; gap: 3px; }
.recipe-ingredient strong { overflow-wrap: anywhere; color: #2b362d; font-size: 12px; }
.recipe-ingredient .seasonal-indicator { margin-left: 5px; }
.recipe-ingredient > div > span, .recipe-ingredient small { color: var(--muted); font-size: 10px; }
.ingredient-status { flex: none; padding: 5px 7px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.ingredient-status.available { color: #477452; background: #eaf3e9; }
.ingredient-status.missing { color: #af563e; background: #fbede6; }
.ingredient-status.mismatch { color: #8b6824; background: #f7f0de; }
.recipe-instructions { display: grid; gap: 22px; }
.recipe-step-section { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.recipe-step-section h2 { margin-bottom: 10px; }
.recipe-step-section ol { display: grid; gap: 10px; margin: 0; padding-left: 23px; color: #435047; font-size: 13px; line-height: 1.65; }
.recipe-step-section li { padding-left: 4px; }
.form-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; }
.form-actions-right { display: flex; gap: 8px; }
.errors { margin: 0 0 18px; padding: 11px 14px; border: 1px solid #efdcd1; border-radius: 4px; color: #9b4c38; background: #fcf4ef; font-size: 12px; }
.errors p { margin: 3px 0; }
@media (max-width: 1050px) {
  .sidebar { width: 205px; }
  main { margin-left: 205px; padding-right: 26px; padding-left: 26px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shopping-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-grid { grid-template-columns: 1fr; }
  .ingredient-editor-row { grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) minmax(80px, .6fr) minmax(100px, .8fr) 32px; }
  th, td { padding-right: 9px; padding-left: 9px; }
}
@media (max-width: 760px) {
  .sidebar { position: sticky; top: 0; z-index: 2; width: auto; height: auto; padding: 10px 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .brand-mark { width: 34px; height: 34px; }
  .nav-label, .side-bottom { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
  .nav-link { padding: 8px 10px; font-size: 11px; }
  main { min-height: auto; margin-left: 0; padding: 24px 16px 40px; }
  .topline { align-items: start; flex-wrap: wrap; margin-bottom: 23px; }
  .topline > div:last-child { gap: 8px !important; }
  .today { display: none; }
  .metrics { gap: 8px; margin-bottom: 14px; }
  .metric { min-height: 96px; padding: 12px; }
  .metric-value { font-size: 25px; }
  .stock-alert { align-items: start; gap: 8px; margin-bottom: 23px; padding: 10px; }
  .alert-actions { align-self: center; gap: 10px; }
  .alert-link { align-self: center; }
  .inventory-head { align-items: start; flex-direction: column; }
  .toolbar, .search { width: 100%; }
  .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  table, tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
  .table-wrap td { display: flex; min-width: 0; min-height: 39px; height: auto; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eff1eb; }
  .table-wrap td::before { flex: none; color: var(--muted); content: attr(data-label); font-size: 10px; font-weight: 600; }
  .table-wrap td:first-child { display: block; grid-column: 1 / -1; padding: 10px 0; }
  .table-wrap td:first-child::before { display: none; }
  .table-wrap td:nth-last-child(2), .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td:last-child { grid-column: 1 / -1; }
  .product { min-width: 0; }
  .table-actions { flex-wrap: wrap; }
  .table-foot { gap: 8px; flex-wrap: wrap; }
  .shopping-row { grid-template-columns: 26px 36px minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .shopping-thumbnail, .shopping-thumbnail-placeholder { width: 36px; height: 36px; }
  .shopping-restock { grid-column: 3 / -1; grid-row: 2; min-width: 0; }
  .shopping-row > form:last-child { grid-column: 3 / -1; grid-row: 3; justify-self: end; }
  .shopping-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; }
  .recipe-card { grid-template-columns: 105px minmax(0, 1fr); }
  .recipe-card-image, .recipe-card-image img { min-height: 190px; }
  .recipe-card-body { gap: 10px; padding: 12px; }
  .recipe-time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recipe-detail-layout { grid-template-columns: 1fr; }
  .ingredient-editor-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 9px; }
  .ingredient-editor-row label:nth-child(1), .ingredient-editor-row label:nth-child(2) { grid-column: span 1; }
  .ingredient-editor-row label:nth-child(3), .ingredient-editor-row label:nth-child(4) { grid-column: span 1; }
  .ingredient-remove { grid-column: 3; grid-row: 1; justify-self: end; }
  .recipe-section-heading { align-items: start; }
  .item-identity-field { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
  .item-photo-preview { width: 58px; height: 58px; }
  .item-image-viewer { padding: 12px; }
  .stock-alert { flex-wrap: wrap; }
  .alert-actions { width: 100%; justify-content: space-between; margin-left: 38px; }
}
@media (max-width: 430px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .topline .button { padding: 0 10px; font-size: 10px; }
  .scan-field { grid-template-columns: 1fr; }
  .scan-field .button { width: 100%; }
  .recipe-card { grid-template-columns: 1fr; }
  .recipe-card-image, .recipe-card-image img { min-height: 160px; max-height: 190px; }
  .recipe-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredient-editor-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; padding: 9px; }
  .ingredient-editor-row label:nth-child(1), .ingredient-editor-row label:nth-child(2) { grid-column: span 3; }
  .ingredient-editor-row label:nth-child(3), .ingredient-editor-row label:nth-child(4) { grid-column: span 1; }
  .ingredient-remove { grid-column: 3; grid-row: 3; }
  .recipe-section-heading { flex-direction: column; }
  .recipe-section-heading .button { width: 100%; }
}