/* Production workspace: visual layer over the existing planning actions. */
:root {color-scheme:light;--bg:#f5f5f7;--panel:#fff;--raised:#f1f2f5;--line:#e5e6eb;--line-strong:#cdd0d8;--cream:#202126;--muted:#747780;--orange:#2875e8;--green:#438572;--blue:#527eae;--yellow:#ae7b2a;--purple:#8871b0}
body {background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}
body.production-dark {color-scheme:dark;--bg:#151619;--panel:#202125;--raised:#2a2c31;--line:#35373e;--line-strong:#51545e;--cream:#f2f3f6;--muted:#a2a5af;--orange:#78aaff}
.shell {padding:0}
.app-view {width:100%;max-width:none;margin:0;box-sizing:border-box;height:auto;min-height:100vh;display:flex;flex-direction:column;gap:20px;padding:24px 24px 40px;overflow:visible}
.topbar {background:transparent;border:0;padding:0;min-height:42px}.brand-logo {width:128px}.brand-lockup {gap:18px;font-size:12px;font-weight:550}.top-actions {gap:8px}.sync-pill {border:0;background:var(--raised);color:var(--muted);font-weight:500}
.planner-toolbar {border:0;background:transparent;padding:12px 0 0;display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between}.planner-toolbar h1 {font-size:34px;letter-spacing:-1.3px;font-weight:650}.eyebrow {color:var(--muted);font-size:10px;letter-spacing:.1em;font-weight:650;margin-bottom:5px}.month-switcher {gap:5px}.month-switcher strong {font-size:18px;font-weight:600;min-width:165px}.view-tabs,.production-periods {padding:4px;background:var(--raised);border-radius:12px;gap:2px}.view-tab,.production-periods button {border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:550;font-size:12px;min-height:36px;padding:0 12px}.view-tab.active,.production-periods button[aria-pressed=true] {background:var(--panel);color:var(--cream);box-shadow:0 1px 4px #00000010}
button,a,input,select,textarea {transition:background-color .16s,border-color .16s,box-shadow .16s}button:focus-visible,a:focus-visible {outline:3px solid var(--orange);outline-offset:3px}.primary-button,.ghost-button,.icon-button,.danger-button {border-radius:10px;min-height:42px;font-size:12px;font-weight:600;box-shadow:none!important}.ghost-button,.icon-button {background:var(--panel);color:var(--cream);border:1px solid var(--line)}.primary-button {color:white;background:#2875e8;border-color:#2875e8}.icon-button {width:42px}.ghost-button.compact {min-height:42px}button:hover {filter:none!important}.ghost-button:hover,.calendar-day:hover {background:var(--raised)}
.summary-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.summary-card {border:1px solid var(--line);border-left:1px solid var(--line)!important;border-radius:16px;min-height:94px;padding:18px 20px;gap:4px 12px}.summary-card span {font-size:12px;font-weight:550}.summary-card small {font-size:11px;font-weight:400}.summary-card strong {font-size:30px;letter-spacing:-1px;font-weight:600}
.calendar-view {display:block;overflow:visible}.calendar-panel {overflow:hidden;border-radius:18px;display:block}.weekday-row {padding:14px 0;background:var(--panel);height:auto;border-bottom:1px solid var(--line);font-weight:500;color:var(--muted);font-size:11px}.calendar-grid {grid-auto-rows:minmax(145px,auto);gap:1px;background:var(--line)}.calendar-day {min-width:0;min-height:145px;background:var(--panel);border:0!important;border-radius:0;padding:12px;display:flex;flex-direction:column;gap:8px;box-shadow:none!important;text-align:left;color:var(--cream)}.calendar-day.weekend {background:color-mix(in srgb,var(--panel) 70%,var(--raised))}.calendar-day.adjacent {opacity:.45;pointer-events:none}.day-head {gap:8px}.day-number {font-size:15px;font-weight:600}.today .day-number {color:#fff;background:#2875e8;border-radius:9px;padding:3px 7px}.capacity-value {font-size:10px;color:var(--muted);font-weight:450}.capacity-bar {height:3px;background:var(--raised);margin:0}.capacity-bar span {background:#8fafd6}.day-entries {gap:5px;display:flex;flex-direction:column}.plan-chip {border:0;border-left:2px solid #789ac6;border-radius:6px;background:#edf3fc;color:#2f4f77;padding:6px 7px;min-width:0;box-shadow:none}.plan-chip.manual {background:#f2eef8;border-color:#9980bd;color:#665185}.plan-chip strong {font-size:11px;font-weight:600;overflow-wrap:anywhere}.plan-chip span {font-size:11px;font-weight:650}.plan-lot {font-size:9px!important;font-weight:450!important;overflow-wrap:anywhere}.dough-chip {border:0;background:var(--raised);color:var(--muted);border-radius:5px;padding:4px 6px;font-size:9px;font-weight:450}.dough-chip:empty {display:none}.block-chip {background:#fff2df;color:#976720}.more-chip {font-size:10px;color:var(--muted)}.production-dark .plan-chip {background:#28354a;color:#b6ccea}.production-dark .plan-chip.manual {background:#342e42;color:#c9b9e1}
.planner-side {display:flex;gap:20px;margin-top:18px;overflow:visible}.side-card {background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:none}.legend-card {display:flex;gap:16px;align-items:center;flex-wrap:wrap;font-size:11px}.legend-card .eyebrow {margin:0}.engine-card {display:none}.baker-overview {order:3}.calendar-view {order:4}.settings-view {order:5;overflow:visible}.baker-overview h2 {font-size:15px;font-weight:600}.baker-overview>p {color:var(--muted);font-size:12px;margin:6px 0 12px}.baker-overview #bakerPlans:has(>p) {color:var(--muted);font-size:12px}#bakerPlans button {padding:12px 16px;background:var(--bg);border:0;border-radius:12px}#bakerPlans strong {font-size:12px}#bakerPlans small {font-size:11px;color:var(--muted)}
input,select,textarea {background:var(--panel);color:var(--cream);border:1px solid var(--line-strong);border-radius:10px;min-height:44px;font-size:14px;padding:10px 12px}label {font-size:12px;font-weight:500;color:var(--muted)}
dialog {color:var(--cream);background:var(--panel);border:1px solid var(--line);border-radius:20px;max-height:94dvh;box-shadow:0 24px 100px #0003}dialog::backdrop {background:#171a234d;backdrop-filter:blur(5px)}#dayDialog {position:fixed;inset:0 0 0 auto;margin:0;width:min(680px,94vw);max-width:94vw;height:100dvh;max-height:100dvh;border-radius:22px 0 0 22px;overflow-y:auto;animation:production-panel-in .22s ease-out}#dayPlanForm {padding:0}.dialog-head {padding:22px 24px;position:sticky;top:0;z-index:3;background:var(--panel);border-bottom:1px solid var(--line)}.dialog-head h2 {font-size:23px;letter-spacing:-.6px}.day-existing-plan,.day-block-section,.add-plan-section,#dayDoughLots {padding:20px 24px;margin:0;border-bottom:1px solid var(--line)}.day-block-section {background:var(--panel)}.day-block-section p,#dayDoughLots p,.add-plan-section p {color:var(--muted);font-size:12px;line-height:1.6}.dialog-plan-row {background:var(--bg);border:0;border-radius:12px;padding:14px;margin-top:10px}.plan-row-identity strong {font-size:14px}.plan-row-quantity strong {font-size:20px}.plan-row-menu-panel {background:var(--panel);color:var(--cream);border:1px solid var(--line);box-shadow:0 12px 30px #0002}.dialog-actions {background:var(--panel);padding:18px 24px;gap:10px}#bakerEditor {margin:20px 24px;background:var(--bg)}.day-block-actions {flex-wrap:wrap}.day-block-actions button {white-space:normal;height:auto;padding:10px 14px}.production-workspace-controls {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.production-periods {display:flex}.production-focus {font-size:13px;font-weight:550;color:var(--muted)}.production-new {margin-left:auto}.production-theme {width:auto;padding:0 12px}.calendar-panel[data-period=week] .calendar-grid {grid-auto-rows:minmax(280px,auto)}.calendar-panel[data-period=day] .weekday-row {display:none}.calendar-panel[data-period=day] .calendar-grid {grid-template-columns:1fr;grid-auto-rows:auto}.calendar-panel[data-period=day] .calendar-day {min-height:240px;padding:22px}.calendar-panel[data-period=day] .day-number {font-size:20px}.calendar-panel[data-period=day] .mobile-weekday {display:inline}.calendar-panel[data-period=day] .plan-chip {padding:12px;font-size:14px}.calendar-panel[data-period=day] .plan-chip strong {font-size:14px}.calendar-panel[data-period=day] .plan-lot {font-size:11px!important}.calendar-panel[data-period=day] .dough-chip {font-size:12px;padding:9px}.production-date {max-width:165px}
@keyframes production-panel-in {from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:translateX(0)}}
@media(min-width:701px){.mobile-weekday{display:none}}
@media(max-width:1000px){.app-view{padding:20px}.planner-toolbar{gap:14px}.planner-side{display:block}.calendar-day{padding:8px}.capacity-value{font-size:9px}.brand-lockup #operatorLabel{display:none}}
@media(max-width:700px){.app-view{padding:12px;gap:16px;min-height:100dvh}.topbar{flex-wrap:wrap;gap:10px}.brand-logo{width:108px}.top-actions{gap:6px}.top-actions .ghost-button{padding:0 9px}.sync-pill{display:none}.planner-toolbar{display:grid;grid-template-columns:1fr}.planner-toolbar h1{font-size:30px}.month-switcher{justify-content:space-between}.month-switcher strong{min-width:0;flex:1}.view-tabs{justify-content:flex-start;width:fit-content}.summary-grid{gap:7px}.summary-card{display:flex;flex-direction:column;align-items:flex-start;padding:12px;min-height:112px;gap:6px}.summary-card strong{font-size:25px}.summary-card span{font-size:10px}.summary-card small{font-size:9px}.production-workspace-controls{gap:10px}.production-periods{width:100%;justify-content:stretch}.production-periods button{flex:1;min-height:40px}.production-new{margin-left:0;flex:1}.production-focus{width:100%;font-size:12px}.production-date{flex:1;max-width:none}.calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(100px,auto)}.calendar-day{min-height:100px;padding:4px;gap:4px}.day-number{font-size:12px}.calendar-panel:not([data-period=day]) .capacity-value,.calendar-panel:not([data-period=day]) .plan-lot,.calendar-panel:not([data-period=day]) .dough-chip{display:none}.calendar-panel:not([data-period=day]) .plan-chip{padding:3px;border-left:0}.calendar-panel:not([data-period=day]) .plan-chip strong{font-size:8px}.calendar-panel:not([data-period=day]) .plan-chip span{font-size:9px}.weekday-row{font-size:0;padding:10px 0}.weekday-row span::first-letter{font-size:11px}.calendar-panel:not([data-period=day]) .mobile-weekday{display:none}.legend-card{font-size:10px;gap:12px;padding:14px}.baker-overview{padding:16px}.baker-overview h2{font-size:14px}.baker-overview #bakerPlans button{width:100%}#dayDialog{width:100%;max-width:100%;border-radius:0}.dialog-head{padding:18px}.dialog-head h2{font-size:21px}.day-existing-plan,.day-block-section,.add-plan-section,#dayDoughLots{padding:18px}#bakerEditor{margin:18px;padding:16px}.dialog-grid{grid-template-columns:1fr}.dialog-actions{padding:18px;flex-wrap:wrap}.dialog-actions button{flex:1;white-space:normal}.settings-view{display:block}.capacity-settings,.target-settings{margin-bottom:16px}.target-table-head{display:none}.target-row{grid-template-columns:1fr}.dialog-plan-row{gap:10px}.plan-row-identity{min-width:0}.plan-row-identity strong{overflow-wrap:anywhere}.day-plan-list-head{flex-wrap:wrap}.login-card{padding:24px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Geometry remains stable across month/week/day and nested native dialogs. */
body:has(dialog[open]) {overflow:hidden}
.calendar-grid {grid-template-rows:none;padding:0}
.calendar-panel .calendar-day.adjacent {display:flex}
.calendar-panel[data-period=month] .calendar-day {height:218px;min-height:218px}
.calendar-panel[data-period=week] .calendar-grid {grid-template-rows:none}
.plan-chip {grid-template-columns:minmax(0,1fr) auto;gap:3px 6px;flex-shrink:0}
.plan-chip::before {display:none}.plan-chip .plan-lot {grid-column:1/-1}.plan-chip strong {white-space:normal;line-height:1.3}.day-entries {overflow:hidden;flex:1}.capacity-value {white-space:normal;text-align:right}
.brand-lockup::before {content:'doughLAB';font-size:24px;font-weight:750;letter-spacing:-1.5px;color:var(--cream)}.topbar .brand-logo {display:none}
#productionEditDialog input,#manualDoughDialog input {background:var(--panel);color:var(--cream)}
@media(max-width:700px){.calendar-panel[data-period=month] .calendar-day{height:118px;min-height:118px}.calendar-panel[data-period=week] .calendar-day{min-height:180px}.calendar-panel[data-period=day] .calendar-day{min-height:240px}.calendar-panel[data-period=day] .day-entries{overflow:visible}.calendar-panel[data-period=day] .day-head{align-items:center}.calendar-panel[data-period=day] .day-number{font-size:17px}.calendar-panel[data-period=day] .capacity-value{font-size:11px}.calendar-panel[data-period=day] .plan-chip strong{font-size:13px}.brand-lockup::before{font-size:22px}}
#dayDialog #dayPlanForm {max-height:none;overflow:visible}.day-block-section {grid-template-columns:minmax(0,1fr);gap:14px}.day-block-section input,.day-block-section select {min-height:44px}.dialog-actions button {min-width:0}.target-settings,.capacity-settings {background:var(--panel);border-color:var(--line);border-radius:16px}.target-policy-row {background:var(--panel);border-color:var(--line)}
