/* Keep the production workspace on one desktop-width canvas. Tablets and
   desktop windows scale the same canvas to the available horizontal space. */
html.desktop-canvas-scaled{overflow-x:hidden}
html.desktop-canvas-scaled body{overflow-x:hidden}
html.tablet-device.desktop-canvas-scaled,html.tablet-device.desktop-canvas-scaled body{width:1920px;min-width:1920px;max-width:1920px}
html.desktop-canvas-scaled .sidebar{position:fixed;inset:0 auto auto 0;width:244px;height:var(--desktop-canvas-height);min-height:var(--desktop-canvas-height);padding:26px 12px;display:flex;flex-direction:column;overflow:hidden}
html.desktop-canvas-scaled .shell{width:calc(100% - 244px);margin-left:244px}
html.desktop-canvas-scaled:not(.tablet-device) .sidebar{width:195.2px}
html.desktop-canvas-scaled:not(.tablet-device) .sidebar{padding-top:0}
html.desktop-canvas-scaled:not(.tablet-device) .shell{width:calc(100% - 195.2px);margin-left:195.2px}
html.desktop-canvas-scaled .platform-logo{display:flex;width:119px;height:56px;min-height:0;flex-basis:auto;margin:0 9px 32px}
html.desktop-canvas-scaled:not(.tablet-device) .platform-logo{margin-bottom:58px}
html.desktop-canvas-scaled .platform-logo svg{width:100%;height:24px}
html.desktop-canvas-scaled .nav-label{display:block}
html.desktop-canvas-scaled .sidebar nav{display:grid;flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;gap:6px;padding:0}
html.desktop-canvas-scaled .sidebar nav::-webkit-scrollbar{width:0;height:0}
html.desktop-canvas-scaled .sidebar nav>div:not([hidden]){display:block}
html.desktop-canvas-scaled .sidebar .nav-item{display:flex;width:100%;justify-content:flex-start;padding:11px 10px}
html.desktop-canvas-scaled .sidebar .nav-item>span:nth-child(2){display:block}
html[lang=en].desktop-canvas-scaled .sidebar .nav-item>span:nth-child(2){white-space:normal!important;overflow-wrap:anywhere}
html.desktop-canvas-scaled .sidebar .user{display:flex}
html.tablet-device.desktop-canvas-scaled .sidebar .nav-label{font-size:13px;line-height:18px}
html.tablet-device.desktop-canvas-scaled .sidebar .nav-item{font-size:18px;line-height:1.35;gap:14px;padding:12px 12px}
html.tablet-device.desktop-canvas-scaled .sidebar .nav-item>span:nth-child(2){font-size:18px;line-height:1.35}
html.tablet-device.desktop-canvas-scaled .sidebar .maintenance-child,
html[lang=en].tablet-device.desktop-canvas-scaled .sidebar .maintenance-child{font-size:17px;padding-left:30px}
html[lang=en].tablet-device.desktop-canvas-scaled .sidebar .nav-item>span:nth-child(2){font-size:17px;line-height:1.3}
html.desktop-canvas-scaled .topbar{height:56px;min-height:56px;padding:0 22px;gap:20px;flex-wrap:nowrap}
html.desktop-canvas-scaled .nex-primary{width:173px;height:44px}
html.desktop-canvas-scaled .header-metrics{order:initial;width:auto;padding:0;margin:0 auto;display:flex}
html.desktop-canvas-scaled .header-metrics .metric{display:flex;padding:0 18px;gap:10px;border-left:1px solid #e3eaee}
html.desktop-canvas-scaled .header-metrics .metric-label{font-size:12px}
html.desktop-canvas-scaled .header-metrics .metric-number{font-size:20px}
html.desktop-canvas-scaled .top-actions{margin-left:auto;gap:10px}
html.desktop-canvas-scaled main{padding:18px 24px 12px;max-width:none}
html.desktop-canvas-scaled:not(.mobile-device) .page-heading{flex-wrap:nowrap}
html.desktop-canvas-scaled .heading-actions{flex-direction:row;flex-wrap:nowrap}
html.desktop-canvas-scaled .kiosk-lock-dialog{width:1920px!important;height:var(--desktop-canvas-height);max-height:none}

/* The weekly board always consumes its container. The whole page is scaled on
   iPad, so no inner horizontal scroll or second card scale is necessary. */
#board.board.week{overflow-x:hidden}
#board .schedule-grid{width:100%;min-width:0;grid-template-columns:118px repeat(5,minmax(0,1fr))}
#board .schedule-grid.with-weekend{width:100%;min-width:0;grid-template-columns:118px repeat(7,minmax(0,1fr))}
html[lang=en] #board .schedule-grid{grid-template-columns:132px repeat(5,minmax(0,1fr))}
html[lang=en] #board .schedule-grid.with-weekend{grid-template-columns:132px repeat(7,minmax(0,1fr))}
#board .schedule-grid.with-weekend .order-card{zoom:1;width:100%;max-width:100%}
#board .schedule-grid.with-weekend .order-card :is(span,strong,b,small,summary,button,div){font-size:10px!important;line-height:17px!important}
#board .schedule-grid.with-weekend .order-card .card-order-number{font-size:15px!important;line-height:18px!important}
#board .schedule-grid.with-weekend .order-card .compact-output{grid-template-columns:minmax(0,1fr) auto;gap:4px;padding:0 6px 4px}
#board .schedule-grid.with-weekend .order-card .compact-output span{min-width:0;font-size:10px!important;line-height:17px!important}
#board .schedule-grid.with-weekend .order-card .compact-output span:first-child{overflow:hidden;text-overflow:ellipsis}
#board .card-order-summary{grid-template-columns:max-content minmax(max-content,1fr);gap:5px}
#board .card-order-summary .card-process-label{max-width:none;overflow:visible;white-space:nowrap}
#board .card-order-summary .card-process-name{max-width:none;overflow:visible;text-overflow:clip;white-space:nowrap}
#board .empty-lane{white-space:nowrap}
#board .compact-output span,#board .card-total-caption span,#board .card-total-caption b{white-space:nowrap}
html:not(.mobile-device) .shell,html:not(.mobile-device) #board .order-card{touch-action:pan-y pinch-zoom}
html.tablet-device #board .order-card{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
html.tablet-device #board.board.week{touch-action:pan-y pinch-zoom}

.schedule-board-shell{position:relative;min-width:0;background:#fff}
#board .grid-corner,#board .day-head{height:36px}
.schedule-window-shift{position:absolute;top:0;z-index:24;display:grid;place-items:center;width:38px;height:36px;padding:0;border:0;border-radius:0;background:#cbe768;color:#102d3b;box-shadow:none;line-height:1;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.schedule-window-shift svg{display:block;width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.schedule-window-shift:hover,.schedule-window-shift:focus-visible{background:#d9ef85;color:#041824}
.schedule-window-shift:active{background:#b7db55}
.schedule-window-shift-previous{left:0}
.schedule-window-shift-next{right:0}
.schedule-window-shift[hidden]{display:none!important}
.schedule-window-shift:disabled{opacity:.3}
.toolbar .week-controls .week-step-button{display:grid;place-items:center;width:36px;min-width:36px;height:32px;padding:0;background:#041824;color:#fff;border:1px solid #041824;border-radius:6px;box-shadow:0 2px 6px #04182426}
.toolbar .week-controls .week-step-button svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.toolbar .week-controls .week-step-button:hover,.toolbar .week-controls .week-step-button:focus-visible{background:#12313e;border-color:#12313e;color:#dff29b}
.toolbar .week-controls .week-step-button:active{transform:scale(.96)}
.today-week-button{min-width:48px;height:32px;padding:4px 9px!important;border:1px solid #dce6ea!important;border-radius:6px;background:#fff!important;color:#244654!important;font-weight:800!important;white-space:nowrap}
.today-week-button:hover,.today-week-button:focus-visible{background:#eef5d9!important;border-color:#b8cf70!important}

/* Date and time deliberately occupy the same vertical rhythm as the message
   control while using less horizontal header space. */
.california-clock{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:0;min-height:34px;font-size:10px;line-height:14px;text-align:right}
.california-clock .clock-date,.california-clock .clock-time{display:block;white-space:nowrap}

/* Keep desktop browser labels compact and on one line across font engines. */
.sidebar .nav-item{font-size:14.4px;line-height:1.35;white-space:nowrap}
.sidebar .nav-item>span:nth-child(2){font-size:inherit!important;line-height:inherit!important;white-space:nowrap!important;word-break:keep-all;overflow-wrap:normal}
.sidebar .maintenance-child,.sidebar .nav-item.sidebar-submenu-item{font-size:12.8px;white-space:nowrap}
.sidebar .sidebar-submenu-item>span,.sidebar .maintenance-child>span:nth-child(2){white-space:nowrap!important;word-break:keep-all;overflow-wrap:normal}
html[lang=en] .sidebar .nav-item{font-size:13px;gap:8px}
html[lang=en] .sidebar .maintenance-child,html[lang=en] .sidebar .nav-item.sidebar-submenu-item{font-size:12px;padding-left:24px}

html.tablet-device.standalone-app .topbar{height:calc(56px + env(safe-area-inset-top,0px));min-height:calc(56px + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px);padding-right:calc(22px + env(safe-area-inset-right,0px));padding-left:calc(22px + env(safe-area-inset-left,0px))}

/* Kiosk remains active until its explicit exit button is used. */
html.kiosk-mode,html.kiosk-mode body{min-height:100%;background:#eef3f6}
html.kiosk-mode .shell{min-height:100dvh;background:#eef3f6}
html.kiosk-mode main{min-height:calc(100dvh - 56px)}
.kiosk-lock-actions{grid-template-columns:1fr}

/* Keep production values readable and aligned to the label edges on every board size. */
#board .order-card .compact-output{margin:0 9px;padding:5px 0 0;grid-template-columns:minmax(0,1fr) auto;gap:8px;font-size:13px;line-height:1.45;align-items:center}
#board .order-card .compact-output b{font-size:13px}
#board .order-card .compact-output span{min-width:0}
#board .order-card .compact-output span:first-child{text-align:left;overflow:hidden;text-overflow:ellipsis}
#board .order-card .compact-output span:last-child{text-align:right}
#board .schedule-grid.with-weekend .order-card .compact-output{margin:0 9px;padding:5px 0 0;gap:4px}
#board .schedule-grid.with-weekend .order-card .card-total-progress{padding:5px 9px 4px}
#board .schedule-grid.with-weekend .order-card .compact-output span,#board .schedule-grid.with-weekend .order-card .compact-output b{font-size:12px!important;line-height:18px!important}
html.tablet-device #board .lane-drop{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
