#content:has(.production-calendar-page){height:calc(100dvh - 68px);max-width:none;overflow:hidden;display:flex;flex-direction:column;padding:16px 22px}
.production-calendar-page{position:relative;height:100%;min-height:0;display:flex;flex-direction:column;gap:10px;width:100%}
.production-calendar-header{display:flex;justify-content:space-between;align-items:start;gap:12px;flex-shrink:0}.production-calendar-header h1{margin:0}.production-calendar-header p{margin:2px 0}
.production-calendar-toolbar{display:flex;justify-content:space-between;align-items:end;gap:15px;flex-shrink:0}.calendar-month-controls{display:flex;align-items:center;gap:8px}.calendar-month-controls strong{min-width:170px;text-align:center;text-transform:capitalize}.calendar-month-controls button{min-height:38px;padding:6px 12px}.calendar-filters{display:flex;gap:8px}.calendar-filters label{margin:0;min-width:190px;width:240px;font-size:11px}.calendar-filters select{min-height:38px;margin-top:3px;padding:6px}
.calendar-month-controls .calendar-period-label{display:flex;align-items:center;gap:5px;margin:0;color:var(--muted);font-size:11px;white-space:nowrap}.calendar-period-label select{min-height:38px;width:auto;min-width:115px;padding:5px 8px;text-transform:capitalize}.calendar-period-label:has(#calendarYear) select{min-width:82px}
.calendar-month-summary{display:flex;gap:12px;flex-shrink:0;font-size:12px}.calendar-month-summary span{padding:5px 10px;border-radius:6px;background:#eaf1fb;color:var(--muted)}.calendar-month-summary strong{color:var(--text)}
.production-calendar-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:8px;background:white}
.production-calendar-grid{height:100%;min-height:600px;display:grid;grid-template-columns:repeat(7,minmax(132px,1fr));grid-template-rows:32px repeat(6,minmax(92px,1fr));min-width:924px}
.calendar-weekday{position:sticky;top:0;z-index:1;display:grid;place-items:center;background:#eef3f9;border-bottom:1px solid var(--line);font-size:11px;font-weight:700;color:var(--muted)}
.calendar-day{min-width:0;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:5px;background:#fff}.calendar-day.outside{background:#f6f8fb}.calendar-day.today{box-shadow:inset 0 0 0 2px var(--blue)}
.calendar-day[role=button]{cursor:pointer}.calendar-day[role=button]:hover,.calendar-day[role=button]:focus-visible{background:#eef5ff;outline:2px solid var(--blue);outline-offset:-2px}
.calendar-day-number{display:flex;justify-content:space-between;align-items:center;padding:0 2px 4px;font-size:12px;font-weight:700}.calendar-day-number small{font-size:10px}.calendar-day.outside .calendar-day-number{color:var(--muted)}
.calendar-day-orders{display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:auto;scrollbar-width:thin}.calendar-order{display:flex;flex-direction:column;align-items:flex-start;gap:0;min-height:0;width:100%;padding:4px 6px;text-align:left;border:1px solid #c9daf4;background:#edf4ff;border-radius:4px;line-height:1.2}.calendar-order:hover{background:#dceaff}.calendar-order.order-due{border-color:#edc785;background:#fff5e6}.calendar-order strong{font-size:10px;color:#174f9b}.calendar-order span{max-width:100%;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calendar-order small{font-size:9px;color:var(--muted)}
.production-day-detail{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;min-height:0;padding:18px;background:var(--bg);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 28px #17223520}
.production-day-header{display:flex;align-items:start;justify-content:space-between;gap:14px;flex-shrink:0;padding-bottom:14px;border-bottom:1px solid var(--line)}.production-day-header small{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--blue)}.production-day-header h2{font-size:24px;text-transform:capitalize;margin:3px 0}.production-day-header p{font-size:12px;margin:0}.production-day-header .row{flex-wrap:nowrap}.production-day-header button{min-height:36px;padding:6px 10px}
.production-day-list{display:grid;align-content:start;gap:12px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:15px 3px 2px;scrollbar-gutter:stable}
.production-day-order{padding:16px 18px}.production-day-order-top{display:flex;align-items:start;justify-content:space-between;gap:12px}.production-day-order-top h3{font-size:16px;margin:7px 0 2px}.production-day-order-top p{font-size:12px}.production-day-order-top button{min-height:36px;padding:7px 12px;white-space:nowrap}.production-day-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.production-day-tags>*{padding:4px 7px;border-radius:5px;background:#eaf1fb;color:#315b93;font-size:11px;font-weight:600}.production-day-tags .production-day-due{background:#fff1da;color:#925e10}.production-day-stages{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:6px;margin-top:12px}.production-day-stages>div{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:#f7f9fc}.production-day-stages strong{font-size:11px;overflow-wrap:anywhere}.production-day-stages span{font-size:10px;color:var(--muted)}
@media(max-width:900px){.layout>.main:has(.production-calendar-page){height:var(--sm-visible-height,100dvh);min-height:0;padding-bottom:0;overflow:hidden}#content:has(.production-calendar-page){height:calc(var(--sm-visible-height,100dvh) - 135px)}.production-calendar-toolbar{align-items:stretch;flex-direction:column;gap:8px}.calendar-filters label{width:50%;min-width:0}.production-calendar-grid{grid-template-columns:repeat(7,minmax(120px,1fr));min-width:840px}}
@media(max-width:550px){#content:has(.production-calendar-page){padding:10px 12px}.production-calendar-header h1{font-size:20px}.production-calendar-header button{padding:6px;font-size:11px;min-height:36px}.calendar-month-controls strong{min-width:130px}.calendar-month-controls{gap:4px;flex-wrap:wrap}.calendar-month-controls button{padding:4px 8px}.calendar-month-controls .calendar-period-label{font-size:0}.calendar-period-label select{min-width:98px}.calendar-period-label:has(#calendarYear) select{min-width:72px}.calendar-month-summary{gap:4px}.calendar-month-summary span{padding:4px;font-size:10px}.production-day-detail{padding:12px}.production-day-header{flex-direction:column;gap:8px}.production-day-header h2{font-size:20px}.production-day-order{padding:12px}.production-day-order-top button{font-size:11px;padding:5px 8px}.production-day-stages{grid-template-columns:1fr}}
