:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1d2420; background: #f4f6f4; }
* { box-sizing: border-box; }
body { margin: 0; padding-bottom: 82px; }
a { color: #235b40; text-underline-offset: 3px; }
svg { display: block; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: #fff; border-bottom: 1px solid #dce2dd; position: sticky; top: 0; z-index: 5; }
.brand { text-decoration: none; font-weight: 850; font-size: 1.08rem; color: #172019; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.topbar-actions form { margin: 0; }
.topbar-icon, .icon-button, .icon-link { width: 44px; min-width: 44px; height: 44px; border: 0; border-radius: 12px; display: inline-grid; place-items: center; background: transparent; color: #506158; padding: 0; text-decoration: none; cursor: pointer; }
.topbar-icon:active, .icon-button:active, .icon-link:active { background: #edf1ee; transform: scale(.97); }
.topbar-icon svg, .icon-button svg, .icon-link svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(100%, 900px); margin: 0 auto; padding: 18px 14px 34px; }
h1 { margin: 0 0 4px; font-size: 1.55rem; line-height: 1.15; }
h2 { font-size: 1.08rem; margin: 0; }
p { margin-top: 6px; }
.muted { color: #667168; font-size: .9rem; }
.home-hero { display: grid; gap: 14px; margin-bottom: 28px; }
.section-title, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.page-head { align-items: flex-start; margin-top: 0; flex-wrap: wrap; }
.page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.icon-section-title h2 { display: flex; align-items: center; gap: 8px; }
.icon-section-title h2 > svg { width: 21px; height: 21px; fill: none; stroke: #506158; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel { background: #fff; border: 1px solid #dce2dd; border-radius: 16px; padding: 18px; }
.panel.narrow { max-width: 440px; margin: 8vh auto 0; }
.production-panel { max-width: 680px; margin: 0 auto; }
.primary, .secondary, .button, button, input, select, textarea { font: inherit; }
.primary, .secondary, .button { min-height: 52px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; font-weight: 800; text-decoration: none; }
.primary { width: 100%; border: 0; background: #235b40; color: #fff; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .45; transform: none; }
.secondary { background: #fff; color: #235b40; border: 1px solid #bfc9c1; min-height: 44px; }
.compact { min-height: 42px; padding: 0 13px; font-size: .9rem; }
.stack-form { display: grid; gap: 18px; margin-top: 20px; }
.stack-form label, fieldset { display: grid; gap: 7px; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 54px; border: 1px solid #b8c2ba; border-radius: 12px; padding: 12px; background: #fff; font-size: 1.05rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(35, 91, 64, .17); outline-offset: 2px; }
textarea { min-height: 76px; resize: vertical; }
.product-picker { border: 0; padding: 0; margin: 0; }
.product-picker legend { margin-bottom: 8px; font-size: 1rem; }
.product-picker ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-picker li label { min-height: 72px; border: 1px solid #c6cec8; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 13px 14px; font-weight: 800; line-height: 1.15; cursor: pointer; position: relative; }
.product-picker li label:active { transform: scale(.99); }
.product-picker li label:has(input:checked) { border-color: #235b40; box-shadow: inset 0 0 0 2px #235b40; background: #edf5ef; color: #173f2b; }
.product-picker li label:has(input:checked)::after { content: "✓"; display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: #235b40; color: #fff; font-size: .9rem; }
.product-picker input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 1px; }
.quantity-field input { min-height: 68px; font-size: 1.7rem; font-weight: 800; text-align: center; }
.optional-fields { border-top: 1px solid #e3e8e4; padding-top: 2px; }
.optional-fields summary { cursor: pointer; color: #506158; font-weight: 700; padding: 12px 0; }
.optional-fields-body { display: grid; gap: 14px; padding-top: 6px; }
.form-submit { min-height: 60px; font-size: 1.08rem; }
.stock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stock-card { min-height: 104px; background: #fff; border: 1px solid #dce2dd; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.stock-card strong { font-size: 1.85rem; }
.stock-card.wide { min-height: 82px; flex-direction: row; align-items: center; gap: 12px; }
.stock-card-icon { gap: 12px; }
.stock-product-line { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 750; font-size: .9rem; line-height: 1.1; }
.stock-product-icon { width: 29px; height: 29px; flex: 0 0 29px; color: #506158; }
.product-name { font-size: 1rem !important; }
.stock-number { font-size: 1.55rem; font-weight: 850; white-space: nowrap; }
.product-icon { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.list { display: grid; gap: 8px; }
.row { background: #fff; border: 1px solid #dce2dd; border-radius: 12px; padding: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row.voided { opacity: .62; }
.recent-entry-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.recent-entry-icon { width: 34px; height: 34px; flex: 0 0 34px; color: #667168; }
.inventory-count-row { background: #fff; border: 1px solid #dce2dd; border-radius: 12px; padding: 12px; display: grid !important; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 12px; }
.inventory-count-row small { display: block; margin-top: 3px; font-weight: 500; }
.inventory-input input { min-height: 48px; text-align: center; font-size: 1.15rem; font-weight: 750; }
.badge { display: inline-block; margin-top: 4px; padding: 3px 7px; border-radius: 99px; background: #ecefec; font-size: .78rem; }
.delta { font-size: 1.3rem; font-weight: 800; color: #235b40; }
.delta.negative { color: #9c332f; }
.messages { display: grid; gap: 8px; margin-bottom: 14px; }
.message { background: #e8f0ea; border: 1px solid #b9cdbf; border-radius: 10px; padding: 12px; font-weight: 750; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 72px; background: #fff; border-top: 1px solid #dce2dd; display: grid; grid-template-columns: repeat(3, 1fr); z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-weight: 700; font-size: .69rem; color: #647168; border-top: 3px solid transparent; }
.bottom-nav a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a.active { color: #235b40; border-top-color: #235b40; font-weight: 850; }
.bottom-nav .produce-nav { color: #235b40; font-weight: 900; }
.bottom-nav .produce-nav svg { width: 28px; height: 28px; stroke-width: 2; }
.errorlist { margin: 0; padding-left: 20px; color: #9c332f; }
.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; }
.production-flow { max-width: 680px; margin: 0 auto; }
.production-heading { margin-bottom: 16px; }
.production-heading p { margin-bottom: 0; }
.production-form { display: grid; gap: 14px; }
.flow-step { background: #fff; border: 1px solid #dce2dd; border-radius: 16px; padding: 16px; }
.flow-step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.flow-step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e8efe9; color: #235b40; font-weight: 900; flex: 0 0 30px; }
.flow-step-title h2 { font-size: 1.12rem; }
.flow-step-title p { margin: 2px 0 0; }
.production-form.enhanced .quantity-step { display: none; }
.production-form.enhanced .quantity-step.is-ready { display: block; animation: reveal-step .16s ease-out; }
.quantity-control { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; align-items: stretch; }
.quantity-control input { min-height: 72px; padding: 8px; text-align: center; font-size: 2rem; line-height: 1; font-weight: 900; }
.quantity-adjust { min-height: 72px; border: 1px solid #b8c2ba; border-radius: 12px; background: #f7f8f7; color: #235b40; font-size: 2rem; font-weight: 700; cursor: pointer; }
.quantity-adjust:active { background: #edf3ee; transform: translateY(1px); }
.quantity-step .optional-fields { margin-top: 14px; }
.quantity-step .form-submit { margin-top: 8px; }
.quick-production { scroll-margin-top: 72px; }
.quick-production-head { margin-bottom: 13px; }
.quick-production-head h1 { font-size: 1.32rem; }
.quick-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-product { min-height: 118px; border: 1px solid #c6cec8; border-radius: 18px; background: #fff; color: #1d2420; padding: 13px 10px 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; font-weight: 850; line-height: 1.1; cursor: pointer; box-shadow: 0 1px 0 rgba(23, 32, 25, .03); }
.quick-product:active { transform: scale(.975); background: #f3f6f3; }
.quick-product-icon { width: 58px; height: 58px; color: #355844; transition: transform .12s ease; }
.quick-product:active .quick-product-icon { transform: scale(.96); }
.quick-product-name { font-size: .91rem; max-width: 100%; }
.quick-production.has-selection .quick-production-head,
.quick-production.has-selection .quick-product-grid { display: none; }
.quick-quantity-card { background: #fff; border: 2px solid #235b40; border-radius: 22px; padding: 18px; box-shadow: 0 10px 30px rgba(29, 36, 32, .08); }
.quick-selected-product { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quick-selected-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.quick-selected-main strong { font-size: 1.25rem; line-height: 1.1; }
.quick-selected-icon { width: 52px; height: 52px; flex: 0 0 52px; color: #235b40; }
.quick-quantity-control { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 8px; margin-top: 18px; }
.quick-quantity-control input { min-height: 80px; padding: 6px; text-align: center; font-size: 2.5rem; font-weight: 900; border-width: 2px; }
.quick-register { min-height: 68px; margin-top: 14px; border-radius: 15px; font-size: 1.08rem; font-weight: 900; gap: 9px; }
.quick-register svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes reveal-step { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 420px) { .stock-grid { grid-template-columns: 1fr 1fr; } .stock-card { padding: 12px; } .stock-card strong { font-size: 1.65rem; } .inventory-grid { grid-template-columns: 1fr; } .product-picker ul { grid-template-columns: 1fr 1fr; } .product-picker li label { min-height: 76px; padding: 12px; } .quick-product-grid { grid-template-columns: 1fr 1fr; } .quick-product { min-height: 112px; } .quick-product-icon { width: 54px; height: 54px; } .quick-quantity-card { padding: 16px; } .quick-quantity-control { grid-template-columns: 68px minmax(0, 1fr) 68px; } }
@media (min-width: 700px) { .shell { padding: 28px 24px 60px; } .home-hero { grid-template-columns: 1fr auto; align-items: center; } .home-hero .primary { width: auto; min-width: 220px; } .stock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .product-picker ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } .quick-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .quick-product { min-height: 128px; } .bottom-nav { left: 50%; transform: translateX(-50%); width: 560px; border-left: 1px solid #dce2dd; border-right: 1px solid #dce2dd; } }
