/* Must be the first CSS in the bundle: a layer's place is fixed where its name
   first appears, so legacy_ui/*'s own @layer legacy, required next, would
   otherwise rank below base and lose every margin and padding to the reset. */
@layer base, legacy, layout, components, utilities;
/*!
 * jQuery UI CSS Framework 1.14.2
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * https://api.jqueryui.com/category/theming/
 *
 * To view and modify this theme, visit https://jqueryui.com/themeroller/
 */

/*






 */



/* Component containers
----------------------------------*/
.ui-widget {
	font-family: Arial,Helvetica,sans-serif/*{ffDefault}*/;
	font-size: 1em/*{fsDefault}*/;
}
.ui-widget .ui-widget {
	font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
	font-family: Arial,Helvetica,sans-serif/*{ffDefault}*/;
	font-size: 1em;
}
.ui-widget.ui-widget-content {
	border: 1px solid #c5c5c5/*{borderColorDefault}*/;
}
.ui-widget-content {
	border: 1px solid #dddddd/*{borderColorContent}*/;
	background: #ffffff/*{bgColorContent}*/ /*{bgImgUrlContent}*/ /*{bgContentXPos}*/ /*{bgContentYPos}*/ /*{bgContentRepeat}*/;
	color: #333333/*{fcContent}*/;
}
.ui-widget-content a {
	color: #333333/*{fcContent}*/;
}
.ui-widget-header {
	border: 1px solid #dddddd/*{borderColorHeader}*/;
	background: #e9e9e9/*{bgColorHeader}*/ /*{bgImgUrlHeader}*/ /*{bgHeaderXPos}*/ /*{bgHeaderYPos}*/ /*{bgHeaderRepeat}*/;
	color: #333333/*{fcHeader}*/;
	font-weight: bold;
}
.ui-widget-header a {
	color: #333333/*{fcHeader}*/;
}

/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,

/* We use html here because we need a greater specificity to make sure disabled
works properly when clicked or hovered */
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
	border: 1px solid #c5c5c5/*{borderColorDefault}*/;
	background: #f6f6f6/*{bgColorDefault}*/ /*{bgImgUrlDefault}*/ /*{bgDefaultXPos}*/ /*{bgDefaultYPos}*/ /*{bgDefaultRepeat}*/;
	font-weight: normal/*{fwDefault}*/;
	color: #454545/*{fcDefault}*/;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
	color: #454545/*{fcDefault}*/;
	text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
	border: 1px solid #cccccc/*{borderColorHover}*/;
	background: #ededed/*{bgColorHover}*/ /*{bgImgUrlHover}*/ /*{bgHoverXPos}*/ /*{bgHoverYPos}*/ /*{bgHoverRepeat}*/;
	font-weight: normal/*{fwDefault}*/;
	color: #2b2b2b/*{fcHover}*/;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited,
a.ui-button:hover,
a.ui-button:focus {
	color: #2b2b2b/*{fcHover}*/;
	text-decoration: none;
}

.ui-visual-focus {
	box-shadow: 0 0 3px 1px rgb(94, 158, 214);
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
	border: 1px solid #003eff/*{borderColorActive}*/;
	background: #007fff/*{bgColorActive}*/ /*{bgImgUrlActive}*/ /*{bgActiveXPos}*/ /*{bgActiveYPos}*/ /*{bgActiveRepeat}*/;
	font-weight: normal/*{fwDefault}*/;
	color: #ffffff/*{fcActive}*/;
}
.ui-icon-background,
.ui-state-active .ui-icon-background {
	border: #003eff/*{borderColorActive}*/;
	background-color: #ffffff/*{fcActive}*/;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
	color: #ffffff/*{fcActive}*/;
	text-decoration: none;
}

/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
	border: 1px solid #dad55e/*{borderColorHighlight}*/;
	background: #fffa90/*{bgColorHighlight}*/ /*{bgImgUrlHighlight}*/ /*{bgHighlightXPos}*/ /*{bgHighlightYPos}*/ /*{bgHighlightRepeat}*/;
	color: #777620/*{fcHighlight}*/;
}
.ui-state-checked {
	border: 1px solid #dad55e/*{borderColorHighlight}*/;
	background: #fffa90/*{bgColorHighlight}*/;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
	color: #777620/*{fcHighlight}*/;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
	border: 1px solid #f1a899/*{borderColorError}*/;
	background: #fddfdf/*{bgColorError}*/ /*{bgImgUrlError}*/ /*{bgErrorXPos}*/ /*{bgErrorYPos}*/ /*{bgErrorRepeat}*/;
	color: #5f3f3f/*{fcError}*/;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
	color: #5f3f3f/*{fcError}*/;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
	color: #5f3f3f/*{fcError}*/;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
	font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
	opacity: .7;
	font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
	opacity: .35;
	background-image: none;
}

/* Icons
----------------------------------*/

/* states and images */
.ui-icon {
	width: 16px;
	height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_444444_256x240-5b1bc5ecbf6257940fd47ab757497949efd8ca0e2195fd5f7e522c22c565437f.png)/*{iconsContent}*/;
}
.ui-widget-header .ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_444444_256x240-5b1bc5ecbf6257940fd47ab757497949efd8ca0e2195fd5f7e522c22c565437f.png)/*{iconsHeader}*/;
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon,
.ui-button:hover .ui-icon,
.ui-button:focus .ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_555555_256x240-aed2560ea8d33bda117c5f7571f8173d0edd21afc81863d10e7d8fda77b4fe3a.png)/*{iconsHover}*/;
}
.ui-state-active .ui-icon,
.ui-button:active .ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_ffffff_256x240-3ebbaee199ea42d3f5d5b4fb0d9f364c8c0f8ac8c8b74d8760b390ae5b65439e.png)/*{iconsActive}*/;
}
.ui-state-highlight .ui-icon,
.ui-button .ui-state-highlight.ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_777620_256x240-77cd4a5b6e3a9b05e76ba6c5918942513037710c1c45a329a1d216bddb0f7d8f.png)/*{iconsHighlight}*/;
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_cc0000_256x240-d2a80a409f0c8fdd27e965b28eff1aed8163a3231498f2f5a06f350be7854cec.png)/*{iconsError}*/;
}
.ui-button .ui-icon {
	background-image: url(https://d249dlssj7e19a.cloudfront.net/assets/jquery-ui/ui-icons_777777_256x240-203b5d28738ff5a835ef5b47b5dba906577b341f688dd240992a876228a56510.png)/*{iconsDefault}*/;
}

/* positioning */
/* Three classes needed to override `.ui-button:hover .ui-icon` */
.ui-icon-blank.ui-icon-blank.ui-icon-blank {
	background-image: none;
}
.ui-icon-caret-1-n { background-position: 0 0; }
.ui-icon-caret-1-ne { background-position: -16px 0; }
.ui-icon-caret-1-e { background-position: -32px 0; }
.ui-icon-caret-1-se { background-position: -48px 0; }
.ui-icon-caret-1-s { background-position: -65px 0; }
.ui-icon-caret-1-sw { background-position: -80px 0; }
.ui-icon-caret-1-w { background-position: -96px 0; }
.ui-icon-caret-1-nw { background-position: -112px 0; }
.ui-icon-caret-2-n-s { background-position: -128px 0; }
.ui-icon-caret-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -65px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -65px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }


/* Misc visuals
----------------------------------*/

/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
	border-top-left-radius: 3px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
	border-top-right-radius: 3px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
	border-bottom-left-radius: 3px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
	border-bottom-right-radius: 3px/*{cornerRadius}*/;
}

/* Overlays */
.ui-widget-overlay {
	background: #aaaaaa/*{bgColorOverlay}*/ /*{bgImgUrlOverlay}*/ /*{bgOverlayXPos}*/ /*{bgOverlayYPos}*/ /*{bgOverlayRepeat}*/;
	opacity: .3/*{opacityOverlay}*/;
}
.ui-widget-shadow {
	box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #666666/*{bgColorShadow}*/;
}
/*!
 * jQuery UI Datepicker 1.14.2
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * https://api.jqueryui.com/datepicker/#theming
 */
/*

 */
.ui-datepicker {
	width: 17em;
	padding: .2em .2em 0;
	display: none;
}
.ui-datepicker .ui-datepicker-header {
	position: relative;
	padding: .2em 0;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	position: absolute;
	top: 2px;
	width: 1.8em;
	height: 1.8em;
}
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
	top: 1px;
}
.ui-datepicker .ui-datepicker-prev {
	left: 2px;
}
.ui-datepicker .ui-datepicker-next {
	right: 2px;
}
.ui-datepicker .ui-datepicker-prev-hover {
	left: 1px;
}
.ui-datepicker .ui-datepicker-next-hover {
	right: 1px;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
	display: block;
	position: absolute;
	left: 50%;
	margin-left: -8px;
	top: 50%;
	margin-top: -8px;
}
.ui-datepicker .ui-datepicker-title {
	margin: 0 2.3em;
	line-height: 1.8em;
	text-align: center;
}
.ui-datepicker .ui-datepicker-title select {
	font-size: 1em;
	margin: 1px 0;
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
	width: 45%;
}
.ui-datepicker table {
	width: 100%;
	font-size: .9em;
	border-collapse: collapse;
	margin: 0 0 .4em;
}
.ui-datepicker th {
	padding: .7em .3em;
	text-align: center;
	font-weight: bold;
	border: 0;
}
.ui-datepicker td {
	border: 0;
	padding: 1px;
}
.ui-datepicker td span,
.ui-datepicker td a {
	display: block;
	padding: .2em;
	text-align: right;
	text-decoration: none;
}
.ui-datepicker .ui-datepicker-buttonpane {
	background-image: none;
	margin: .7em 0 0 0;
	padding: 0 .2em;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
	float: right;
	margin: .5em .2em .4em;
	cursor: pointer;
	padding: .2em .6em .3em .6em;
	width: auto;
	overflow: visible;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
	float: left;
}

/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi {
	width: auto;
}
.ui-datepicker-multi .ui-datepicker-group {
	float: left;
}
.ui-datepicker-multi .ui-datepicker-group table {
	width: 95%;
	margin: 0 auto .4em;
}
.ui-datepicker-multi-2 .ui-datepicker-group {
	width: 50%;
}
.ui-datepicker-multi-3 .ui-datepicker-group {
	width: 33.3%;
}
.ui-datepicker-multi-4 .ui-datepicker-group {
	width: 25%;
}
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
	border-left-width: 0;
}
.ui-datepicker-multi .ui-datepicker-buttonpane {
	clear: left;
}
.ui-datepicker-row-break {
	clear: both;
	width: 100%;
	font-size: 0;
}

/* RTL support */
.ui-datepicker-rtl {
	direction: rtl;
}
.ui-datepicker-rtl .ui-datepicker-prev {
	right: 2px;
	left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next {
	left: 2px;
	right: auto;
}
.ui-datepicker-rtl .ui-datepicker-prev:hover {
	right: 1px;
	left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next:hover {
	left: 1px;
	right: auto;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane {
	clear: right;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
	float: left;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
.ui-datepicker-rtl .ui-datepicker-group {
	float: right;
}
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
	border-right-width: 0;
	border-left-width: 1px;
}

/* Icons */
.ui-datepicker .ui-icon {
	display: block;
	text-indent: -99999px;
	overflow: hidden;
	background-repeat: no-repeat;
	left: .5em;
	top: .3em;
}
@charset "UTF-8";
@layer legacy {
  H1 SMALL {
    font-size: 0.7em;
    color: var(--text-tertiary);
  }
  /* ── List tables ──
     Card-style tables. TABLE.fixed-list-header is a floating clone of the
     header row that list.js creates and positions — keep it position: fixed. */
  TABLE.list, TABLE.fixed-list-header {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    margin-top: 18px;
    font-size: 0.8rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
  }
  TABLE.list TR TH, TABLE.fixed-list-header TR TH {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    background: var(--bg-muted);
    border-bottom: 1.5px solid var(--border-light);
    padding: 8px;
    text-align: left;
  }
  TABLE.list TR TH.sortable, TABLE.fixed-list-header TR TH.sortable {
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 12px 12px;
    cursor: pointer;
  }
  TABLE.list TR TH.sortable:hover, TABLE.fixed-list-header TR TH.sortable:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
  }
  TABLE.list TR TH.sortable:hover.asc, TABLE.list TR TH.sortable:hover .desc, TABLE.fixed-list-header TR TH.sortable:hover.asc, TABLE.fixed-list-header TR TH.sortable:hover .desc {
    padding-right: 20px;
  }
  TABLE.list TR TH.sortable.asc, TABLE.list TR TH.sortable.desc, TABLE.fixed-list-header TR TH.sortable.asc, TABLE.fixed-list-header TR TH.sortable.desc {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding-right: 20px;
    background-position: right 4px center;
  }
  TABLE.list TR TH.sortable.asc, TABLE.fixed-list-header TR TH.sortable.asc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
  TABLE.list TR TH.sortable.desc, TABLE.fixed-list-header TR TH.sortable.desc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
  }
  TABLE.list TR TD, TABLE.fixed-list-header TR TD {
    border-bottom: 1px solid rgba(200, 189, 178, 0.3);
    padding: 8px;
    color: var(--text-primary);
    vertical-align: middle;
  }
  TABLE.list TR TD.tool, TABLE.fixed-list-header TR TD.tool {
    border-left: 1px solid var(--border-light);
    position: relative;
    width: 1px; /* browser will make it as small as possible */
  }
  TABLE.list TR TD.tool A, TABLE.fixed-list-header TR TD.tool A {
    display: block;
    padding: 6px;
    margin: -6px;
  }
  TABLE.list TR TD.tool A.icon, TABLE.fixed-list-header TR TD.tool A.icon {
    padding-left: 24px;
    background-position: 5px center;
  }
  TABLE.list TR:last-child TD, TABLE.fixed-list-header TR:last-child TD {
    border-bottom: none;
  }
  TABLE.list TR, TABLE.fixed-list-header TR {
    /* Zebra striping. Odd rows get a subtle warm stripe; even rows stay on
       the table's white base. Uses !important + the TABLE.list context to
       out-rank base.css.scss's legacy TR.odd/.even paint. Anything that
       intentionally colors cells in these tables must out-rank (0,2,3)
       !important — order.css.scss's fulfilled/unfulfilled cells and
       base.css.scss's #notes-table already do.
       Two ways a row gets striped: an explicit .odd class (used by tables
       that interleave hidden detail rows — estimates, purchase_orders,
       work_orders, and the order-show line tables — so alternation counts
       only real rows), or the positional :nth-child rule below (the common
       flat index-table case). */
  }
  TABLE.list TR, TABLE.fixed-list-header TR {
    /* Positional striping for plain list tables. Skips rows that opt into
       explicit .odd/.even classes and .totals rows (which keep their own
       background). Non-!important so the hover highlight still wins. */
  }
  TABLE.list TR:nth-child(even):not(.odd):not(.even):not(.totals) TD, TABLE.fixed-list-header TR:nth-child(even):not(.odd):not(.even):not(.totals) TD {
    background-color: var(--row-stripe);
  }
  TABLE.list TR[onclick]:hover TD, TABLE.list TR[data-url]:hover TD, TABLE.list TR.highlight TD, TABLE.fixed-list-header TR[onclick]:hover TD, TABLE.fixed-list-header TR[data-url]:hover TD, TABLE.fixed-list-header TR.highlight TD {
    /* !important so hover still shows on striped rows, whose
       backgrounds are set !important above. Deeper than --row-stripe
       so a hovered row darkens whether it is striped or not. */
    transition: background var(--transition-fast);
    cursor: pointer;
  }
  TABLE.list TR[data-url]:focus, TABLE.fixed-list-header TR[data-url]:focus {
    outline: 3px solid var(--accent-walnut);
    outline-offset: -3px;
  }
  .tab TABLE.list, TABLE.fixed-list-header.inner {
    margin-top: 0;
  }
  TABLE.fixed-list-header {
    position: fixed;
    background: white;
    box-shadow: var(--shadow-sm);
  }
  /* ── List metadata bar (result counts, paging) ── */
  .list-info {
    background: var(--bg-muted);
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: right;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
  }
  .list-info .paging A {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
  }
  .list-info .paging A:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  .list-info .paging EM {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--accent-walnut);
    color: var(--text-inverse);
    font-style: normal;
    font-weight: 700;
  }
  .list-header-block {
    background: var(--bg-muted);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
  .list-header-block .clear-filter {
    padding-right: 8px;
  }
  /* ── Info box: card ── */
  .info-box {
    position: relative;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 12px;
  }
  /* ── Detail header (record title area) ── */
  .detail-header {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
  }
  .detail-header H1 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 12px;
    border-bottom: none;
  }
  .detail-header LABEL {
    color: var(--text-tertiary);
  }
  .detail-header .info-box {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px;
  }
  .detail-header .audit {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
  }
  /* ── Split table (label row over value row) ── */
  .split-table {
    width: 100%;
    border-spacing: 0;
  }
  .split-table TD, .split-table TH {
    padding: 4px 6px;
  }
  .split-table TR.top TD {
    background: var(--bg-muted);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
  }
  .split-table TR.top TD LABEL {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
  }
  .split-table TR.bottom TD {
    background: white;
    border-top: none;
    border-bottom: none;
  }
  .split-table TR.bottom TD P {
    margin-top: 6px;
    margin-bottom: 6px;
  }
  .column {
    float: left;
    position: relative;
    /* Each sfr_columns column is a size container so the .fields tables inside
       can switch to a stacked label-over-value layout when the column itself
       gets narrow (4–5 column detail pages at tablet/laptop widths) — a media
       query can't know the column count. See fields.scss. */
    container-type: inline-size;
  }
}
/* Kept outside @layer legacy: inside a layer, !important outranks every
   !important in the app, the reverse of how these were written to work. */
TABLE.list TR TD.tool, TABLE.fixed-list-header TR TD.tool {
  background: var(--bg-muted) !important;
}

TABLE.list TR.even TD, TABLE.fixed-list-header TR.even TD {
  background-color: transparent !important;
}

TABLE.list TR.odd TD, TABLE.fixed-list-header TR.odd TD {
  background-color: var(--row-stripe) !important;
}

TABLE.list TR[onclick]:hover TD, TABLE.list TR[data-url]:hover TD, TABLE.list TR.highlight TD, TABLE.fixed-list-header TR[onclick]:hover TD, TABLE.fixed-list-header TR[data-url]:hover TD, TABLE.fixed-list-header TR.highlight TD {
  background: var(--row-hover) !important;
}

TABLE.fixed-list-header {
  margin-top: 0 !important;
}
@charset "UTF-8";
@layer legacy {
  .fields {
    width: 100%;
    table-layout: fixed;
  }
  .fields TD, .fields TH {
    vertical-align: top;
  }
  .fields TH {
    text-align: right;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 600;
    width: 120px;
    /* let long labels wrap to a second line instead of ellipsizing —
       "Total Upholstered Pieces" etc. were unreadable truncated */
    overflow-wrap: break-word;
    padding: 4px 10px 4px 0;
  }
  .fields TD {
    color: var(--text-primary);
    font-weight: 600;
    padding: 4px 0;
    /* long unbroken values (emails, SKUs) wrap instead of painting over
       the neighboring column */
    overflow-wrap: anywhere;
  }
  .fields TD .wrapper {
    margin: -5px 0;
  }
  .fields TD P {
    margin: 5px 0;
  }
  .fields TD IMG.sfr-document {
    max-width: 100%;
  }
  .fields TD AUDIO.sfr-document {
    width: 100%;
  }
  .fields TR.separator TD {
    padding-top: 8px;
  }
  .fields TR.separator TD H2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-muted);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px;
    margin: 0;
    text-align: center;
  }
  .tab .fields TR.separator H2 {
    margin: 0 -4px 0 -4px;
  }
  .fields.wide TH {
    width: 200px;
  }
  /* When the enclosing sfr_columns column (a size container, see base.scss) is
     too narrow for the 120px label beside a useful value — 4–5 column detail
     pages at tablet/laptop widths — stack each label above its value so the
     value gets the column's full width. Pages without a .column ancestor never
     match a container, so they keep the side-by-side layout. */
  @container (max-width: 280px) {
    .fields,
    .fields TBODY,
    .fields TR,
    .fields TH,
    .fields TD {
      display: block;
      width: 100%;
      box-sizing: border-box;
    }
    .fields TH {
      text-align: left;
      padding: 6px 0 1px;
    }
    .fields TD {
      padding: 0 0 3px;
    }
    /* Value-less label rows (blank fields render an empty TD) would leave the
       label floating over the next row's label — tighten instead of hiding,
       since a blank value is still information on a detail page. */
    .fields TD:empty {
      min-height: 4px;
    }
  }
}
@layer legacy {
  .tab-set {
    font-size: 13px;
    margin: 0 0 16px 0;
    position: relative;
  }
  .tab-set .tab {
    display: none;
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .tab-set .tab .scroll {
    position: relative;
    overflow: visible;
  }
  .tab-set .tab.loading {
    padding: 1.5em;
    text-indent: -10000px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    position: relative;
    min-height: 80px;
    /* spinner ring on a rotating pseudo-element (backgrounds can't
       rotate); keyframes live in legacy_ui/icons.scss */
  }
  .tab-set .tab.loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A2D1C' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9' stroke-dasharray='42 15'/%3E%3C/svg%3E") center/24px 24px no-repeat;
    animation: sfr-spin 0.8s linear infinite;
  }
  .tab-set .tab-control {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0 4px;
    position: relative;
    z-index: 2;
    background: var(--bg-subtle);
    border-bottom: 2px solid var(--border-light);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }
  .tab-set .tab-control LI {
    display: inline-block;
    border: none;
    background: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    position: relative;
    top: auto;
  }
  .tab-set .tab-control A, .tab-set .tab-control SPAN {
    display: inline-block;
    position: relative;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    padding: 10px 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-fast);
  }
  .tab-set .tab-control A:hover, .tab-set .tab-control SPAN:hover {
    color: var(--text-primary);
  }
  .tab-set .tab-control .active-tab {
    background: none;
  }
  .tab-set .tab-control .active-tab A, .tab-set .tab-control .active-tab SPAN {
    font-weight: 700;
  }
  .tab-set .tab-control .active-tab A::after, .tab-set .tab-control .active-tab SPAN::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-walnut);
    border-radius: 2px 2px 0 0;
  }
  .tab-set TD A:hover {
    color: var(--accent-walnut);
    text-decoration: underline;
  }
  .tab-set.clickable TR:hover {
    background: rgba(237, 232, 225, 0.6);
    cursor: pointer;
  }
}
/* Kept outside @layer legacy: inside a layer, !important outranks every
   !important in the app, the reverse of how these were written to work. */
.tab-set .tab.loading {
  background: var(--bg-muted) !important;
}

.tab-set .tab-control .active-tab A, .tab-set .tab-control .active-tab SPAN {
  color: var(--accent-walnut) !important;
}
@layer legacy {
  #sfr-modal-mask {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 18, 16, 0.55);
  }
  .sfr-modal {
    display: none;
    position: absolute;
    background: white;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.55;
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
  }
  .sfr-modal H1 {
    margin: 0;
    padding: 12px 18px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    background: white;
    border-bottom: 1.5px solid var(--border-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    cursor: move;
  }
  .sfr-modal.alert H1 {
    color: var(--status-rush);
    background: var(--status-rush-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10.3 4.2-8 13.9A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-2.9l-8-13.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4M12 17.2h.01'/%3E%3C/svg%3E") 18px center no-repeat;
    background-size: 14px 14px;
    padding-left: 40px;
  }
  .sfr-modal DIV.busy {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    color: var(--text-secondary);
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    padding-top: 50px;
    opacity: 0.85;
    z-index: 2;
    border-radius: var(--radius-lg);
    /* spinner ring at the old gif spot; modal.js sets the message via
       .html(), which replaces child nodes only, so the ::after survives */
  }
  .sfr-modal DIV.busy::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 84px;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A2D1C' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9' stroke-dasharray='42 15'/%3E%3C/svg%3E") center/28px 28px no-repeat;
    animation: sfr-spin 0.8s linear infinite;
  }
  .sfr-modal DIV.scroll {
    overflow: auto;
  }
  .sfr-modal {
    /* A hand-built view, one that opens with its own heading rather than an
       sfr form (whose label column and floated buttons already sit off the
       edge), gets the title bar's 18px gutter; without it the heading, notes
       and tables touch the card's border. border-box keeps modal.js's
       max-height on this box. Heading and paragraph spacing is in
       design_system/components.scss (@layer components), so a view's own rules win. */
  }
  .sfr-modal > DIV.scroll:has(> :is(h2, h3)) {
    padding: 14px 18px 18px;
    box-sizing: border-box;
  }
  .sfr-modal {
    /* A production workflow page in a modal (a catalogue variant's BOO): its
       page padding has only a 4px side gutter. */
  }
  .sfr-modal .pw-page {
    padding: 14px 18px 18px;
  }
  .sfr-modal TABLE.list {
    margin-top: 0;
    border: none;
  }
  .sfr-modal TABLE.list TR.add-link-wrapper TD {
    background: var(--bg-muted);
    border-bottom: 1.5px solid var(--border-light);
  }
  .sfr-modal TABLE.list TR TD {
    background: white;
  }
  .sfr-modal {
    /* Footer for hand-built modals (no f.submit/f.cancel). Lays buttons out
       exactly where the floated .modal-button pair lands: bottom-right, 12px
       from the edges and 12px apart, primary last. Children keep .pretty's
       margin: 0, so don't add .modal-button to them. */
  }
  .sfr-modal .modal-actions {
    clear: both;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 12px;
  }
  .sfr-modal {
    /* Explanatory text above an sfr form's fields, on the title bar's
       18px gutter (the form's own rows carry their label column instead). */
  }
  .sfr-modal .modal-intro {
    padding: 12px 18px 4px;
  }
  .sfr-modal .modal-main-panel {
    margin-bottom: 0;
  }
  @media (max-width: 600px) {
    .sfr-modal {
      max-height: calc(100vh - 24px);
      overflow: auto;
    }
  }
}
/* A form control with no class at all, in any modal, still looks like the
   app's: a plain Rails form_for / *_tag helper otherwise renders browser
   defaults (inset border, Arial, grey button), which has shipped more than
   once (the law labels modal, 2026-11-18). @layer base and :where() make it
   the weakest rule there is: any class, a wrapper's rule (.ms-popup input),
   an sfr form or an rb-* style (@layer components) wins over it. Only
   explicit submits are touched, so icon and toggle buttons are left alone. */
@layer base {
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]) {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]):hover {
    border-color: var(--border-medium);
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]):focus, .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]).focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class])[disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class])[disabled]:hover {
    border-color: var(--border-light);
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]).error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]).error:hover {
    border-color: var(--unfulfilled);
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]).error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class])::-webkit-outer-spin-button, .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class])::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .sfr-modal :where(input:not([type]), input[type=text], input[type=number],
  input[type=date], input[type=email], input[type=tel], input[type=url],
  input[type=search], input[type=password], textarea, select):not([class]) {
    padding: 6px 10px;
  }
  .sfr-modal :where(input[type=submit], button[type=submit]):not([class]) {
    padding: 8px 16px;
    line-height: 1.35;
    color: var(--text-inverse);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-walnut);
    cursor: pointer;
  }
  .sfr-modal :where(input[type=submit], button[type=submit]):not([class]):hover {
    background: var(--accent-walnut-light);
  }
}
/* Kept outside @layer legacy: inside a layer, !important outranks every
   !important in the app, the reverse of how these were written to work. */
@media (max-width: 600px) {
  .sfr-modal {
    left: 12px !important;
    width: calc(100vw - 24px) !important;
  }
}
@layer legacy {
  A.icon, SPAN.icon {
    padding: 2px 0 2px 20px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: 0 center;
    background-size: 14px 14px;
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  A.icon:hover, SPAN.icon:hover {
    color: var(--accent-walnut);
  }
  A.icon.no-label, SPAN.icon.no-label {
    display: inline-block;
    width: 0;
    height: 16px;
    vertical-align: middle;
  }
  A.icon.no-label:hover, SPAN.icon.no-label:hover {
    text-decoration: none;
  }
  A.icon, SPAN.icon {
    /* Busy state: JS swaps in a spinner by toggling .busy. Backgrounds
       can't rotate, so the ring is painted on a rotating ::before. */
  }
  A.icon.busy, SPAN.icon.busy {
    position: relative;
  }
  A.icon.busy::before, SPAN.icon.busy::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A2D1C' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9' stroke-dasharray='42 15'/%3E%3C/svg%3E") center/14px 14px no-repeat;
    animation: sfr-spin 0.8s linear infinite;
  }
  A.icon.accept, SPAN.icon.accept {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155E3E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8.5 12.5 2.5 2.5 4.5-5'/%3E%3C/svg%3E");
  }
  A.icon.add, SPAN.icon.add {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155E3E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
  }
  A.icon.arrow_left, SPAN.icon.arrow_left {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m12 5-7 7 7 7'/%3E%3C/svg%3E");
  }
  A.icon.arrow_right, SPAN.icon.arrow_right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
  }
  A.icon.arrow_undo, SPAN.icon.arrow_undo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 14-5-5 5-5'/%3E%3Cpath d='M4 9h11a5 5 0 0 1 0 10h-4'/%3E%3C/svg%3E");
  }
  A.icon.arrow_up, SPAN.icon.arrow_up {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3C/svg%3E");
  }
  A.icon.asterisk_orange, SPAN.icon.asterisk_orange {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2601C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M5 8l14 8M19 8 5 16'/%3E%3C/svg%3E");
  }
  A.icon.asterisk_yellow, SPAN.icon.asterisk_yellow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4A017' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M5 8l14 8M19 8 5 16'/%3E%3C/svg%3E");
  }
  A.icon.attach, SPAN.icon.attach {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
  }
  A.icon.bin, SPAN.icon.bin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M8 6V4.5A1.5 1.5 0 0 1 9.5 3h5A1.5 1.5 0 0 1 16 4.5V6'/%3E%3Cpath d='m6.5 6 1 14a1.5 1.5 0 0 0 1.5 1.4h6a1.5 1.5 0 0 0 1.5-1.4l1-14'/%3E%3Cpath d='M10 10.5v6M14 10.5v6'/%3E%3C/svg%3E");
  }
  A.icon.bomb, SPAN.icon.bomb {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='14' r='7'/%3E%3Cpath d='m15 9 3.5-3.5'/%3E%3Cpath d='M19 2.5v2M21.5 5h-2'/%3E%3C/svg%3E");
  }
  A.icon.calendar_view_month, SPAN.icon.calendar_view_month {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3Cpath d='M8 15.5h.01M12 15.5h.01M16 15.5h.01'/%3E%3C/svg%3E");
  }
  A.icon.cancel, SPAN.icon.cancel {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6m0-6-6 6'/%3E%3C/svg%3E");
  }
  A.icon.clock, SPAN.icon.clock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E");
  }
  A.icon.cog, SPAN.icon.cog {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/svg%3E");
  }
  A.icon.contrast_high, SPAN.icon.contrast_high {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3a9 9 0 0 1 0 18z' fill='%234A3E36' stroke='none'/%3E%3C/svg%3E");
  }
  A.icon.creditcards, SPAN.icon.creditcards {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
  }
  A.icon.cross, SPAN.icon.cross {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E");
  }
  A.icon.date, SPAN.icon.date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
  }
  A.icon.delete, SPAN.icon.delete {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M7.25 12h9.5'/%3E%3C/svg%3E");
  }
  A.icon.download, SPAN.icon.download {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v12'/%3E%3Cpath d='m6.5 10 5.5 5.5L17.5 10'/%3E%3Cpath d='M4.5 20.5h15'/%3E%3C/svg%3E");
  }
  A.icon.email, SPAN.icon.email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  }
  A.icon.email_open, SPAN.icon.email_open {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5 12 3l9 6.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='m3 9.5 9 6 9-6'/%3E%3C/svg%3E");
  }
  A.icon.emoticon_smile, SPAN.icon.emoticon_smile {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C49020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 10h.01M15 10h.01'/%3E%3Cpath d='M8.5 14.5a4.5 4.5 0 0 0 7 0'/%3E%3C/svg%3E");
  }
  A.icon.error, SPAN.icon.error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10.3 4.2-8 13.9A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-2.9l-8-13.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4M12 17.2h.01'/%3E%3C/svg%3E");
  }
  A.icon.exclamation, SPAN.icon.exclamation {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C49020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4.5M12 16.5h.01'/%3E%3C/svg%3E");
  }
  A.icon.flag_blue, SPAN.icon.flag_blue {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231439A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.flag_green, SPAN.icon.flag_green {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155E3E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.flag_orange, SPAN.icon.flag_orange {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2601C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.flag_pink, SPAN.icon.flag_pink {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2447A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.flag_purple, SPAN.icon.flag_purple {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B3FA0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.flag_red, SPAN.icon.flag_red {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.flag_yellow, SPAN.icon.flag_yellow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4A017' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4c4-2 6 2 10 0v8c-4 2-6-2-10 0'/%3E%3C/svg%3E");
  }
  A.icon.folder, SPAN.icon.folder {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 19V5a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
  }
  A.icon.house, SPAN.icon.house {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 9-8 9 8'/%3E%3Cpath d='M5 10v10a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V10'/%3E%3C/svg%3E");
  }
  A.icon.image, SPAN.icon.image {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='m21 15-5-5-9 9'/%3E%3C/svg%3E");
  }
  A.icon.images, SPAN.icon.images {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='3' width='14' height='12' rx='2'/%3E%3Cpath d='M3 7v12a2 2 0 0 0 2 2h12'/%3E%3Cpath d='m21 11-4-4-6 6'/%3E%3C/svg%3E");
  }
  A.icon.information, SPAN.icon.information {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231439A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5h.01'/%3E%3C/svg%3E");
  }
  A.icon.key, SPAN.icon.key {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='7.5' r='4.5'/%3E%3Cpath d='m10.7 10.7 10 10'/%3E%3Cpath d='m15.5 15.5 2.5-2.5M19 19l2.5-2.5'/%3E%3C/svg%3E");
  }
  A.icon.lock, SPAN.icon.lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  }
  A.icon.magnifier, SPAN.icon.magnifier {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4.35-4.35'/%3E%3C/svg%3E");
  }
  A.icon.map, SPAN.icon.map {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3C/svg%3E");
  }
  A.icon.map_go, SPAN.icon.map_go {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3Ccircle cx='12' cy='11' r='2' stroke='%23155E3E'/%3E%3C/svg%3E");
  }
  A.icon.mobile_phone, SPAN.icon.mobile_phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2.5' width='8' height='19' rx='2'/%3E%3Cpath d='M12 18.5h.01'/%3E%3C/svg%3E");
  }
  A.icon.note, SPAN.icon.note {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h8.5L19 7v14.5H6z'/%3E%3Cpath d='M14.5 2.5V7H19'/%3E%3Cpath d='M9 12.5h6M9 16.5h6'/%3E%3C/svg%3E");
  }
  A.icon.package, SPAN.icon.package {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8v8l-9 5-9-5V8l9-5z'/%3E%3Cpath d='m3 8 9 5 9-5'/%3E%3Cpath d='M12 13v8'/%3E%3C/svg%3E");
  }
  A.icon.page, SPAN.icon.page {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h8.5L19 7v14.5H6z'/%3E%3Cpath d='M14.5 2.5V7H19'/%3E%3C/svg%3E");
  }
  A.icon.page_white, SPAN.icon.page_white {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h8.5L19 7v14.5H6z'/%3E%3Cpath d='M14.5 2.5V7H19'/%3E%3C/svg%3E");
  }
  A.icon.page_white_acrobat, SPAN.icon.page_white_acrobat {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h8.5L19 7v14.5H6z'/%3E%3Cpath d='M14.5 2.5V7H19'/%3E%3Cpath d='M9 13.5h6M9 17h4'/%3E%3C/svg%3E");
  }
  A.icon.page_white_edit, SPAN.icon.page_white_edit {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h8.5L19 7v9'/%3E%3Cpath d='M14.5 2.5V7H19'/%3E%3Cpath d='M6 2.5V21.5h5'/%3E%3Cpath d='m13.5 20 6-6 2 2-6 6h-2z'/%3E%3C/svg%3E");
  }
  A.icon.pencil, SPAN.icon.pencil {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z'/%3E%3C/svg%3E");
  }
  A.icon.pencil_white, SPAN.icon.pencil_white {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z'/%3E%3C/svg%3E");
  }
  A.icon.printer, SPAN.icon.printer {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 14h12v7H6z'/%3E%3C/svg%3E");
  }
  A.icon.report, SPAN.icon.report {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M8 16.5v-5M12 16.5v-9M16 16.5v-3'/%3E%3C/svg%3E");
  }
  A.icon.sort_down_arrow, SPAN.icon.sort_down_arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
  A.icon.sort_up_arrow, SPAN.icon.sort_up_arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
  }
  A.icon.stop, SPAN.icon.stop {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 2.5h8.2l5.4 5.4v8.2l-5.4 5.4H7.9l-5.4-5.4V7.9z'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
  }
  A.icon.table, SPAN.icon.table {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M9 10v10M15 10v10'/%3E%3C/svg%3E");
  }
  A.icon.tick, SPAN.icon.tick {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155E3E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5 10-11'/%3E%3C/svg%3E");
  }
  A.icon.time, SPAN.icon.time {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E");
  }
  A.icon.up_down_arrow, SPAN.icon.up_down_arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3C/svg%3E");
  }
  A.icon.user_orange, SPAN.icon.user_orange {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C49020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20.5a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
  }
  A.icon.vcard, SPAN.icon.vcard {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Ccircle cx='8' cy='11' r='2'/%3E%3Cpath d='M5.5 16a3 3 0 0 1 5 0'/%3E%3Cpath d='M14 10h5M14 14h4'/%3E%3C/svg%3E");
  }
  A.icon.world, SPAN.icon.world {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E");
  }
  A.icon.wrench, SPAN.icon.wrench {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
  }
  A.icon.wrench_orange, SPAN.icon.wrench_orange {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C49020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
  }
  A.busy, SPAN.busy {
    opacity: 0.5;
  }
  @keyframes sfr-spin {
    to {
      transform: rotate(360deg);
    }
  }
}
/* Kept outside @layer legacy: inside a layer, !important outranks every
   !important in the app, the reverse of how these were written to work. */
A.icon.busy, SPAN.icon.busy {
  background-image: none !important;
}
@charset "UTF-8";
@layer legacy {
  .sfr-toolbar {
    position: relative;
    /* The toolbar partial renders UL.items.left + UL.items.right inside
       .main; the old design split them with floats. Flex keeps the split
       (`.right { margin-left: auto }` below) without the float/clear dance. */
  }
  .sfr-toolbar .main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    /* the partial's float-clearing div is dead weight in a flex row */
  }
  .sfr-toolbar .main > div[style*=clear] {
    display: none;
  }
  .sfr-toolbar.page {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    z-index: 10;
    background: var(--bg-card);
    border-bottom: 1.5px solid var(--border-light);
    padding: 8px 12px;
  }
  .sfr-toolbar.page .main {
    background: transparent;
    border: none;
    padding: 0;
  }
  .sfr-toolbar.page UL.items LI {
    /* .rb-btn buttons mixed into legacy toolbars keep their rebuild styling */
  }
  .sfr-toolbar.page UL.items LI A:not(.rb-btn), .sfr-toolbar.page UL.items LI BUTTON:not(.rb-btn), .sfr-toolbar.page UL.items LI .email {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background-color: transparent;
    border: none;
  }
  .sfr-toolbar.page UL.items LI A:not(.rb-btn):hover, .sfr-toolbar.page UL.items LI BUTTON:not(.rb-btn):hover, .sfr-toolbar.page UL.items LI .email:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
  }
  .sfr-toolbar.page UL.items LI {
    /* Restated inside the .page variant: the A:not(.rb-btn) padding
       shorthand above out-specifies the base A.icon rule below, so the
       icon inset must be re-asserted at higher specificity. */
  }
  .sfr-toolbar.page UL.items LI A.icon {
    padding-left: 20px;
  }
  .sfr-toolbar UL.items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .sfr-toolbar UL.items.left {
    float: none;
  }
  .sfr-toolbar UL.items.right {
    float: none;
    margin-left: auto;
  }
  .sfr-toolbar UL.items LI {
    display: inline-flex;
    align-items: center;
    height: auto;
    padding: 0;
    margin: 0;
  }
  .sfr-toolbar UL.items LI.separator {
    width: 1px;
    height: 20px;
    background: var(--border-light);
    margin: 0 6px;
    border: none;
  }
  .sfr-toolbar UL.items LI.space {
    width: 16px;
  }
  .sfr-toolbar UL.items LI A:not(.rb-btn), .sfr-toolbar UL.items LI BUTTON {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.3;
    transition: all var(--transition-fast);
  }
  .sfr-toolbar UL.items LI A.icon, .sfr-toolbar UL.items LI SPAN.icon {
    padding-left: 20px;
    background-repeat: no-repeat;
    background-position: 2px center;
    background-size: 14px 14px;
  }
  .sfr-toolbar {
    /* Toolbar search field */
  }
  .sfr-toolbar INPUT[type=text] {
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 0.8rem;
    width: 140px;
    background: var(--bg-card);
  }
  .sfr-toolbar INPUT[type=text]:focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .sfr-toolbar {
    /* Toolbar filter selects (Vendor, Payment Type, Viewing…) — match the
       search field instead of the native UA control. */
  }
  .sfr-toolbar SELECT {
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 3px 6px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text-primary);
  }
  .sfr-toolbar SELECT:focus {
    border-color: var(--accent-walnut);
    outline: none;
  }
  .sfr-toolbar {
    /* Space between inline labels and their controls inside a toolbar item
       (flex gap also separates bare text nodes from inputs/checkboxes). */
  }
  .sfr-toolbar UL.items LI {
    gap: 6px;
  }
  /* ── Toolbar inside a tab panel ── */
  .tab .sfr-toolbar {
    position: relative;
    z-index: 5;
    width: 100%;
    height: auto;
    background: var(--bg-muted);
    border-bottom: 1.5px solid var(--border-light);
    padding: 8px 12px;
  }
  .tab .sfr-toolbar .main {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
  }
  .tab .sfr-toolbar UL.items {
    gap: 4px;
  }
  .tab .sfr-toolbar UL.items LI {
    height: auto;
  }
  .tab .sfr-toolbar UL.items LI.separator {
    display: none;
  }
  .tab .sfr-toolbar UL.items LI A:not(.rb-btn), .tab .sfr-toolbar UL.items LI BUTTON {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background-color: white;
    border: 1px solid var(--border-light);
  }
  .tab .sfr-toolbar UL.items LI A:not(.rb-btn):hover, .tab .sfr-toolbar UL.items LI BUTTON:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    text-decoration: none;
  }
  .tab .sfr-toolbar UL.items LI A.icon {
    padding-left: 22px;
    background-position: 5px center;
    background-size: 13px 13px;
  }
  .tab {
    /* tab_set.js prepends this spacer into tabs without a toolbar; the flow
       layout doesn't need it. */
  }
  .tab .dummy-toolbar {
    display: none;
  }
}
@charset "UTF-8";
@layer legacy {
  FORM.sfr-form, DIV.sfr-form {
    position: relative;
    font-size: 13px;
    margin: 0;
    padding: 0;
  }
  FORM.sfr-form p.intro, DIV.sfr-form p.intro {
    margin: 8px;
  }
  FORM.sfr-form p.errors, DIV.sfr-form p.errors {
    margin-top: 0;
    background: var(--status-rush-bg);
    border-bottom: 1px solid var(--status-rush);
    border-left: 0;
    border-right: 0;
    padding: 8px;
    text-align: center;
    color: var(--status-rush);
    font-weight: 700;
    font-size: 0.85rem;
  }
  FORM.sfr-form h2, DIV.sfr-form h2 {
    text-align: center;
    padding: 8px 12px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    margin: 16px 0 8px;
    font-size: 1.1rem;
  }
  FORM.sfr-form h2.fieldset, DIV.sfr-form h2.fieldset {
    position: relative;
    bottom: -8px;
  }
  FORM.sfr-form .label, DIV.sfr-form .label {
    font-size: inherit;
    font-weight: normal;
  }
  FORM.sfr-form fieldset, DIV.sfr-form fieldset {
    padding: 16px;
    margin: 8px 0;
    background: white;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
  FORM.sfr-form, DIV.sfr-form {
    /* Rebuild (rb-*) buttons inside an sfr form keep their own styling: this
       rule is unlayered and would otherwise turn them into white input boxes.
       The exclusion sits in :where() so it adds no specificity: as a bare
       :not() pair it lifted this .pretty base to (0,3,2), above the
       BUTTON.pretty.cancel outline and .bottom-button float/margin, and every
       f.cancel rendered as a white, margin-less box out of line with Save. */
  }
  FORM.sfr-form input::-webkit-input-placeholder, FORM.sfr-form textarea::-webkit-input-placeholder, DIV.sfr-form input::-webkit-input-placeholder, DIV.sfr-form textarea::-webkit-input-placeholder {
    color: var(--text-tertiary);
    font-style: italic;
  }
  FORM.sfr-form input::-moz-placeholder, FORM.sfr-form textarea::-moz-placeholder, DIV.sfr-form input::-moz-placeholder, DIV.sfr-form textarea::-moz-placeholder {
    color: var(--text-tertiary);
    font-style: italic;
  }
  FORM.sfr-form option.placeholder-option, DIV.sfr-form option.placeholder-option {
    color: var(--text-tertiary);
    font-style: italic;
  }
  FORM.sfr-form .placeholder-label, DIV.sfr-form .placeholder-label {
    color: var(--text-tertiary);
    font-style: italic;
    position: absolute;
    width: 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    cursor: text;
  }
  FORM.sfr-form select, DIV.sfr-form select {
    padding: 6px 8px;
    width: 100%;
  }
  FORM.sfr-form textarea, DIV.sfr-form textarea {
    height: 60px;
  }
  FORM.sfr-form label.radio, FORM.sfr-form label.checkbox, DIV.sfr-form label.radio, DIV.sfr-form label.checkbox {
    display: block;
    margin: 2px 0 2px 20px;
    text-indent: -20px;
  }
  FORM.sfr-form INPUT[type=checkbox], DIV.sfr-form INPUT[type=checkbox] {
    margin: 0;
    position: relative;
    accent-color: var(--accent-walnut);
  }
  FORM.sfr-form .bottom-button, FORM.sfr-form BUTTON.cancel, FORM.sfr-form A.cancel.button, FORM.sfr-form DIV.cancel.button, FORM.sfr-form INPUT.submit, DIV.sfr-form .bottom-button, DIV.sfr-form BUTTON.cancel, DIV.sfr-form A.cancel.button, DIV.sfr-form DIV.cancel.button, DIV.sfr-form INPUT.submit {
    float: right;
    margin: 12px 12px 12px 0;
  }
  FORM.sfr-form DIV.error-field, DIV.sfr-form DIV.error-field {
    background: rgba(254, 205, 205, 0.35);
    padding: 4px 0;
    margin: 4px 0;
    border: 1px solid var(--status-rush-bg);
    border-left: none;
    border-right: none;
    border-radius: var(--radius-sm);
  }
  FORM.sfr-form DIV.error-field TABLE.field-pair, DIV.sfr-form DIV.error-field TABLE.field-pair {
    margin: 0;
  }
  FORM.sfr-form DIV.error-message, DIV.sfr-form DIV.error-message {
    color: var(--unfulfilled);
    font-size: 0.78rem;
    font-style: italic;
    text-align: center;
  }
  FORM.sfr-form TABLE.field-pair, DIV.sfr-form TABLE.field-pair {
    table-layout: fixed;
    width: 100%;
    margin: 8px 0;
  }
  FORM.sfr-form TABLE.field-pair TH, DIV.sfr-form TABLE.field-pair TH {
    font-weight: 600;
    font-size: 0.76rem;
    color: var(--text-tertiary);
    width: 150px;
    text-align: right;
    vertical-align: middle;
  }
  FORM.sfr-form TABLE.field-pair TD, DIV.sfr-form TABLE.field-pair TD {
    vertical-align: middle;
    padding: 0 8px;
  }
  FORM.sfr-form TABLE.field-pair.bottom TH, FORM.sfr-form TABLE.field-pair.top TH, DIV.sfr-form TABLE.field-pair.bottom TH, DIV.sfr-form TABLE.field-pair.top TH {
    text-align: left;
    padding-left: 9px;
  }
  FORM.sfr-form DIV.has-many, DIV.sfr-form DIV.has-many {
    overflow: auto;
  }
  FORM.sfr-form, DIV.sfr-form {
    /* Table-mode has-many add rows render as a bare TR with one TD, which
       otherwise sits flush against the form/modal edge. Give the add link
       the same breathing room as the rows above it. */
  }
  FORM.sfr-form TR.add-link-wrapper > TD, DIV.sfr-form TR.add-link-wrapper > TD {
    padding: 8px 8px 4px 8px;
  }
  FORM.sfr-form TABLE.deletable, DIV.sfr-form TABLE.deletable {
    width: 100%;
    /* fixed layout keeps the row at exactly 100% — without it the ⊖ tool
       cell pushes ~3px past the container and DIV.has-many's overflow
       paints a scrollbar strip under every section */
    table-layout: fixed;
    border-spacing: 0;
  }
  FORM.sfr-form TABLE.deletable.highlight, DIV.sfr-form TABLE.deletable.highlight {
    background: rgba(237, 232, 225, 0.5);
  }
  FORM.sfr-form TABLE.deletable .field-pair, DIV.sfr-form TABLE.deletable .field-pair {
    margin: 0;
  }
  FORM.sfr-form TABLE.deletable TD, DIV.sfr-form TABLE.deletable TD {
    padding: 0;
  }
  FORM.sfr-form TABLE.deletable TD .tool, DIV.sfr-form TABLE.deletable TD .tool {
    width: 18px;
    padding: 0 10px 0 0;
  }
  FORM.sfr-form TABLE.deletable, DIV.sfr-form TABLE.deletable {
    /* The delete tool is its own outer cell. Without explicit column widths,
       fixed table layout splits the row 50/50 and leaves a nested Yardage
       input only a few pixels wide on phones. */
  }
  FORM.sfr-form TABLE.deletable > TBODY > TR > TD:first-child, DIV.sfr-form TABLE.deletable > TBODY > TR > TD:first-child {
    width: auto;
  }
  FORM.sfr-form TABLE.deletable > TBODY > TR > TD.tool, DIV.sfr-form TABLE.deletable > TBODY > TR > TD.tool {
    width: 28px;
    padding-right: 4px;
  }
  FORM.sfr-form TABLE.deletable .delete-button, DIV.sfr-form TABLE.deletable .delete-button {
    cursor: pointer;
  }
  .pretty, A.button, DIV.button, FORM.sfr-form input, FORM.sfr-form textarea, FORM.sfr-form select, FORM.sfr-form button:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input, DIV.sfr-form textarea, DIV.sfr-form select, DIV.sfr-form button:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.submit, DIV.sfr-form INPUT.submit, FORM.sfr-form BUTTON.cancel, FORM.sfr-form A.cancel.button, FORM.sfr-form DIV.cancel.button, DIV.sfr-form BUTTON.cancel, DIV.sfr-form A.cancel.button, DIV.sfr-form DIV.cancel.button {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .pretty:hover, A.button:hover, DIV.button:hover, FORM.sfr-form input:hover, FORM.sfr-form textarea:hover, FORM.sfr-form select:hover, FORM.sfr-form button:hover:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input:hover, DIV.sfr-form textarea:hover, DIV.sfr-form select:hover, DIV.sfr-form button:hover:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.submit:hover, DIV.sfr-form INPUT.submit:hover, FORM.sfr-form BUTTON.cancel:hover, FORM.sfr-form A.cancel.button:hover, FORM.sfr-form DIV.cancel.button:hover, DIV.sfr-form BUTTON.cancel:hover, DIV.sfr-form A.cancel.button:hover, DIV.sfr-form DIV.cancel.button:hover {
    border-color: var(--border-medium);
  }
  .pretty:focus, A.button:focus, DIV.button:focus, FORM.sfr-form input:focus, FORM.sfr-form textarea:focus, FORM.sfr-form select:focus, FORM.sfr-form button:focus:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input:focus, DIV.sfr-form textarea:focus, DIV.sfr-form select:focus, DIV.sfr-form button:focus:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.submit:focus, DIV.sfr-form INPUT.submit:focus, FORM.sfr-form BUTTON.cancel:focus, FORM.sfr-form A.cancel.button:focus, FORM.sfr-form DIV.cancel.button:focus, DIV.sfr-form BUTTON.cancel:focus, DIV.sfr-form A.cancel.button:focus, DIV.sfr-form DIV.cancel.button:focus, .pretty.focus, A.focus.button, DIV.focus.button, FORM.sfr-form input.focus, FORM.sfr-form textarea.focus, FORM.sfr-form select.focus, FORM.sfr-form button.focus:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input.focus, DIV.sfr-form textarea.focus, DIV.sfr-form select.focus, DIV.sfr-form button.focus:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.focus.submit, DIV.sfr-form INPUT.focus.submit, FORM.sfr-form BUTTON.focus.cancel, FORM.sfr-form A.focus.cancel.button, FORM.sfr-form DIV.focus.cancel.button, DIV.sfr-form BUTTON.focus.cancel, DIV.sfr-form A.focus.cancel.button, DIV.sfr-form DIV.focus.cancel.button {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .pretty[disabled], A[disabled].button, DIV[disabled].button, FORM.sfr-form input[disabled], FORM.sfr-form textarea[disabled], FORM.sfr-form select[disabled], FORM.sfr-form button[disabled]:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input[disabled], DIV.sfr-form textarea[disabled], DIV.sfr-form select[disabled], DIV.sfr-form button[disabled]:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT[disabled].submit, DIV.sfr-form INPUT[disabled].submit, FORM.sfr-form BUTTON[disabled].cancel, FORM.sfr-form A[disabled].cancel.button, FORM.sfr-form DIV[disabled].cancel.button, DIV.sfr-form BUTTON[disabled].cancel, DIV.sfr-form A[disabled].cancel.button, DIV.sfr-form DIV[disabled].cancel.button {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .pretty[disabled]:hover, A[disabled].button:hover, DIV[disabled].button:hover, FORM.sfr-form input[disabled]:hover, FORM.sfr-form textarea[disabled]:hover, FORM.sfr-form select[disabled]:hover, FORM.sfr-form button[disabled]:hover:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input[disabled]:hover, DIV.sfr-form textarea[disabled]:hover, DIV.sfr-form select[disabled]:hover, DIV.sfr-form button[disabled]:hover:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT[disabled].submit:hover, DIV.sfr-form INPUT[disabled].submit:hover, FORM.sfr-form BUTTON[disabled].cancel:hover, DIV.sfr-form BUTTON[disabled].cancel:hover {
    border-color: var(--border-light);
  }
  .pretty.error, A.error.button, DIV.error.button, FORM.sfr-form input.error, FORM.sfr-form textarea.error, FORM.sfr-form select.error, FORM.sfr-form button.error:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input.error, DIV.sfr-form textarea.error, DIV.sfr-form select.error, DIV.sfr-form button.error:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.error.submit, DIV.sfr-form INPUT.error.submit, FORM.sfr-form BUTTON.error.cancel, FORM.sfr-form A.error.cancel.button, FORM.sfr-form DIV.error.cancel.button, DIV.sfr-form BUTTON.error.cancel, DIV.sfr-form A.error.cancel.button, DIV.sfr-form DIV.error.cancel.button {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .pretty.error:hover, A.error.button:hover, DIV.error.button:hover, FORM.sfr-form input.error:hover, FORM.sfr-form textarea.error:hover, FORM.sfr-form select.error:hover, FORM.sfr-form button.error:hover:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input.error:hover, DIV.sfr-form textarea.error:hover, DIV.sfr-form select.error:hover, DIV.sfr-form button.error:hover:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.error.submit:hover, DIV.sfr-form INPUT.error.submit:hover, FORM.sfr-form BUTTON.error.cancel:hover, DIV.sfr-form BUTTON.error.cancel:hover {
    border-color: var(--unfulfilled);
  }
  .pretty.error:focus, A.error.button:focus, DIV.error.button:focus, FORM.sfr-form input.error:focus, FORM.sfr-form textarea.error:focus, FORM.sfr-form select.error:focus, FORM.sfr-form button.error:focus:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input.error:focus, DIV.sfr-form textarea.error:focus, DIV.sfr-form select.error:focus, DIV.sfr-form button.error:focus:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.error.submit:focus, DIV.sfr-form INPUT.error.submit:focus, FORM.sfr-form BUTTON.error.cancel:focus, DIV.sfr-form BUTTON.error.cancel:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .pretty::-webkit-outer-spin-button, A.button::-webkit-outer-spin-button, DIV.button::-webkit-outer-spin-button, FORM.sfr-form input::-webkit-outer-spin-button, FORM.sfr-form textarea::-webkit-outer-spin-button, FORM.sfr-form select::-webkit-outer-spin-button, FORM.sfr-form button:where(:not([class^=rb-]):not([class*=" rb-"]))::-webkit-outer-spin-button, DIV.sfr-form input::-webkit-outer-spin-button, DIV.sfr-form textarea::-webkit-outer-spin-button, DIV.sfr-form select::-webkit-outer-spin-button, DIV.sfr-form button:where(:not([class^=rb-]):not([class*=" rb-"]))::-webkit-outer-spin-button, FORM.sfr-form INPUT.submit::-webkit-outer-spin-button, DIV.sfr-form INPUT.submit::-webkit-outer-spin-button, FORM.sfr-form BUTTON.cancel::-webkit-outer-spin-button, FORM.sfr-form A.cancel.button::-webkit-outer-spin-button, FORM.sfr-form DIV.cancel.button::-webkit-outer-spin-button, DIV.sfr-form BUTTON.cancel::-webkit-outer-spin-button, DIV.sfr-form A.cancel.button::-webkit-outer-spin-button, DIV.sfr-form DIV.cancel.button::-webkit-outer-spin-button, .pretty::-webkit-inner-spin-button, A.button::-webkit-inner-spin-button, DIV.button::-webkit-inner-spin-button, FORM.sfr-form input::-webkit-inner-spin-button, FORM.sfr-form textarea::-webkit-inner-spin-button, FORM.sfr-form select::-webkit-inner-spin-button, FORM.sfr-form button:where(:not([class^=rb-]):not([class*=" rb-"]))::-webkit-inner-spin-button, DIV.sfr-form input::-webkit-inner-spin-button, DIV.sfr-form textarea::-webkit-inner-spin-button, DIV.sfr-form select::-webkit-inner-spin-button, DIV.sfr-form button:where(:not([class^=rb-]):not([class*=" rb-"]))::-webkit-inner-spin-button, FORM.sfr-form INPUT.submit::-webkit-inner-spin-button, DIV.sfr-form INPUT.submit::-webkit-inner-spin-button, FORM.sfr-form BUTTON.cancel::-webkit-inner-spin-button, FORM.sfr-form A.cancel.button::-webkit-inner-spin-button, FORM.sfr-form DIV.cancel.button::-webkit-inner-spin-button, DIV.sfr-form BUTTON.cancel::-webkit-inner-spin-button, DIV.sfr-form A.cancel.button::-webkit-inner-spin-button, DIV.sfr-form DIV.cancel.button::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .picker-field.pretty, A.picker-field.button, DIV.picker-field.button, FORM.sfr-form input.picker-field, FORM.sfr-form textarea.picker-field, FORM.sfr-form select.picker-field, FORM.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input.picker-field, DIV.sfr-form textarea.picker-field, DIV.sfr-form select.picker-field, DIV.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.picker-field.submit, DIV.sfr-form INPUT.picker-field.submit, FORM.sfr-form BUTTON.picker-field.cancel, FORM.sfr-form A.picker-field.cancel.button, FORM.sfr-form DIV.picker-field.cancel.button, DIV.sfr-form BUTTON.picker-field.cancel, DIV.sfr-form A.picker-field.cancel.button, DIV.sfr-form DIV.picker-field.cancel.button {
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4.35-4.35'/%3E%3C/svg%3E") right 8px center no-repeat;
    background-size: 14px 14px;
    box-sizing: border-box;
    display: inline-block;
    height: 30px;
    padding: 4px;
    width: 100%;
    position: relative;
    cursor: pointer;
  }
  .picker-field.pretty A, A.picker-field.button A, DIV.picker-field.button A, FORM.sfr-form input.picker-field A, FORM.sfr-form textarea.picker-field A, FORM.sfr-form select.picker-field A, FORM.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])) A, DIV.sfr-form input.picker-field A, DIV.sfr-form textarea.picker-field A, DIV.sfr-form select.picker-field A, DIV.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])) A, FORM.sfr-form INPUT.picker-field.submit A, DIV.sfr-form INPUT.picker-field.submit A, FORM.sfr-form BUTTON.picker-field.cancel A, DIV.sfr-form BUTTON.picker-field.cancel A {
    text-decoration: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 26px 6px 24px;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .picker-field.pretty:hover, A.picker-field.button:hover, DIV.picker-field.button:hover, FORM.sfr-form input.picker-field:hover, FORM.sfr-form textarea.picker-field:hover, FORM.sfr-form select.picker-field:hover, FORM.sfr-form button.picker-field:hover:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input.picker-field:hover, DIV.sfr-form textarea.picker-field:hover, DIV.sfr-form select.picker-field:hover, DIV.sfr-form button.picker-field:hover:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT.picker-field.submit:hover, DIV.sfr-form INPUT.picker-field.submit:hover, FORM.sfr-form BUTTON.picker-field.cancel:hover, DIV.sfr-form BUTTON.picker-field.cancel:hover {
    border-color: var(--border-medium);
  }
  .picker-field.pretty .picker-clear, A.picker-field.button .picker-clear, DIV.picker-field.button .picker-clear, FORM.sfr-form input.picker-field .picker-clear, FORM.sfr-form textarea.picker-field .picker-clear, FORM.sfr-form select.picker-field .picker-clear, FORM.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])) .picker-clear, DIV.sfr-form input.picker-field .picker-clear, DIV.sfr-form textarea.picker-field .picker-clear, DIV.sfr-form select.picker-field .picker-clear, DIV.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])) .picker-clear, FORM.sfr-form INPUT.picker-field.submit .picker-clear, DIV.sfr-form INPUT.picker-field.submit .picker-clear, FORM.sfr-form BUTTON.picker-field.cancel .picker-clear, DIV.sfr-form BUTTON.picker-field.cancel .picker-clear {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 6px;
    height: 14px;
    width: 14px;
    cursor: pointer;
    opacity: 0.65;
  }
  .picker-field.pretty .picker-clear:hover, A.picker-field.button .picker-clear:hover, DIV.picker-field.button .picker-clear:hover, FORM.sfr-form input.picker-field .picker-clear:hover, FORM.sfr-form textarea.picker-field .picker-clear:hover, FORM.sfr-form select.picker-field .picker-clear:hover, FORM.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])) .picker-clear:hover, DIV.sfr-form input.picker-field .picker-clear:hover, DIV.sfr-form textarea.picker-field .picker-clear:hover, DIV.sfr-form select.picker-field .picker-clear:hover, DIV.sfr-form button.picker-field:where(:not([class^=rb-]):not([class*=" rb-"])) .picker-clear:hover, FORM.sfr-form INPUT.picker-field.submit .picker-clear:hover, DIV.sfr-form INPUT.picker-field.submit .picker-clear:hover, FORM.sfr-form BUTTON.picker-field.cancel .picker-clear:hover, DIV.sfr-form BUTTON.picker-field.cancel .picker-clear:hover {
    opacity: 1;
  }
  .picker-field.pretty.empty A, A.picker-field.empty.button A, DIV.picker-field.empty.button A, FORM.sfr-form input.picker-field.empty A, FORM.sfr-form textarea.picker-field.empty A, FORM.sfr-form select.picker-field.empty A, FORM.sfr-form button.picker-field.empty:where(:not([class^=rb-]):not([class*=" rb-"])) A, DIV.sfr-form input.picker-field.empty A, DIV.sfr-form textarea.picker-field.empty A, DIV.sfr-form select.picker-field.empty A, DIV.sfr-form button.picker-field.empty:where(:not([class^=rb-]):not([class*=" rb-"])) A, FORM.sfr-form INPUT.picker-field.empty.submit A, DIV.sfr-form INPUT.picker-field.empty.submit A, FORM.sfr-form BUTTON.picker-field.empty.cancel A, DIV.sfr-form BUTTON.picker-field.empty.cancel A {
    padding-left: 8px;
    color: var(--text-tertiary);
    font-style: italic;
  }
  .picker-field.pretty.empty .picker-clear, A.picker-field.empty.button .picker-clear, DIV.picker-field.empty.button .picker-clear, FORM.sfr-form input.picker-field.empty .picker-clear, FORM.sfr-form textarea.picker-field.empty .picker-clear, FORM.sfr-form select.picker-field.empty .picker-clear, FORM.sfr-form button.picker-field.empty:where(:not([class^=rb-]):not([class*=" rb-"])) .picker-clear, DIV.sfr-form input.picker-field.empty .picker-clear, DIV.sfr-form textarea.picker-field.empty .picker-clear, DIV.sfr-form select.picker-field.empty .picker-clear, DIV.sfr-form button.picker-field.empty:where(:not([class^=rb-]):not([class*=" rb-"])) .picker-clear, FORM.sfr-form INPUT.picker-field.empty.submit .picker-clear, DIV.sfr-form INPUT.picker-field.empty.submit .picker-clear, FORM.sfr-form BUTTON.picker-field.empty.cancel .picker-clear, DIV.sfr-form BUTTON.picker-field.empty.cancel .picker-clear {
    display: none;
  }
  .picker-clear.fa {
    margin-top: 3px;
    font-size: 15px;
  }
  /* Nothing to clear on an empty picker — hide the glyph regardless of
     whether the field uses the .pretty variant (hand-rolled pickers like the
     quote request's Linked Estimate omit it). */
  .picker-field.empty .picker-clear {
    display: none;
  }
  /* The gem helper (and the quote request form) emit the picker clear glyph
     as an <img> pointing at the old gray-ball PNG; swap in a stroke-style
     circle-x to match the rebuild icons. (content replacement on <img> is
     supported in all current browsers; older ones just keep the PNG.) */
  IMG.picker-clear {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6m0-6-6 6'/%3E%3C/svg%3E");
    width: 14px;
    height: 14px;
  }
  /* Autocomplete / time pop-up. sfr_form.js appends this to <body> and
     positions it under the active field — it sets position/left/top inline,
     so it carries its own typography (outside .legacy-content). */
  #sfr-field-pop-under {
    background: white;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    width: auto;
    z-index: 10000;
  }
  #sfr-field-pop-under UL {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  #sfr-field-pop-under UL.lookup LI {
    position: relative;
    clear: both;
  }
  #sfr-field-pop-under UL.lookup LI span {
    display: block;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(200, 189, 178, 0.3);
    cursor: pointer;
  }
  #sfr-field-pop-under UL.lookup LI .code {
    display: inline-block;
    box-sizing: border-box;
    vertical-align: top;
    text-align: center;
    border-right: 1px solid rgba(200, 189, 178, 0.3);
    background: white;
    margin-top: 0;
  }
  #sfr-field-pop-under UL.lookup LI .display {
    display: inline-block;
    width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: white;
    color: var(--text-secondary);
  }
  #sfr-field-pop-under UL.lookup LI:hover .code {
    background: var(--bg-secondary);
  }
  #sfr-field-pop-under UL.lookup LI:hover .display {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  #sfr-field-pop-under UL.time LI {
    clear: both;
    position: relative;
  }
  #sfr-field-pop-under UL.time LI.divider {
    background: var(--border-light);
    height: 2px;
  }
  #sfr-field-pop-under UL.time LI .hour, #sfr-field-pop-under UL.time LI .ampm {
    display: inline-block;
    background: var(--bg-muted);
    border: 1px solid rgba(200, 189, 178, 0.3);
    box-sizing: border-box;
    font-weight: 600;
    color: var(--text-tertiary);
  }
  #sfr-field-pop-under UL.time LI .hour {
    padding: 4px 1px 4px 4px;
    border-left: none;
    border-top: none;
    text-align: right;
    width: 30px;
  }
  #sfr-field-pop-under UL.time LI .ampm {
    padding: 4px 4px 4px 2px;
    border-right: none;
    border-top: none;
    text-align: left;
  }
  #sfr-field-pop-under UL.time LI UL {
    white-space: nowrap;
    display: inline-block;
  }
  #sfr-field-pop-under UL.time LI UL LI {
    clear: none;
    background: white;
    display: inline-block;
    padding: 4px;
    text-align: center;
    width: 24px;
    cursor: pointer;
    border-bottom: 1px solid rgba(200, 189, 178, 0.3);
    box-sizing: border-box;
    transition: background var(--transition-fast);
  }
  #sfr-field-pop-under UL.time LI UL LI:hover {
    background: var(--bg-secondary);
  }
  #sfr-field-pop-under .time-popunder {
    background: var(--bg-muted);
    text-align: center;
  }
  #sfr-field-pop-under .time-popunder A {
    display: inline-block;
    padding: 3px 8px;
    margin: 4px 0;
    border: 1.5px solid var(--border-medium);
    background: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
  }
  #sfr-field-pop-under .time-popunder A.am-button {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  #sfr-field-pop-under .time-popunder A.pm-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  #sfr-field-pop-under .time-popunder A.selected {
    background: var(--accent-walnut);
    border-color: var(--accent-walnut);
    color: var(--text-inverse);
    font-weight: 700;
  }
  .sfr-full-width, input[type=text].pretty, FORM.sfr-form input[type=text], DIV.sfr-form input[type=text], input[type=password].pretty, FORM.sfr-form input[type=password], DIV.sfr-form input[type=password], input[type=number].pretty, FORM.sfr-form input[type=number], DIV.sfr-form input[type=number], input[type=time].pretty, FORM.sfr-form input[type=time], DIV.sfr-form input[type=time], textarea.pretty, FORM.sfr-form textarea, DIV.sfr-form textarea {
    -webkit-appearance: none;
    padding: 6px 10px;
    width: 100%;
  }
  .field-with-suffix {
    display: flex;
    align-items: center;
    width: 100%;
  }
  .field-with-suffix > input {
    flex: 1 1 0;
    min-width: 0;
  }
  .field-with-suffix .field-suffix {
    flex: none;
    margin-left: 6px;
    color: var(--text-tertiary);
  }
  INPUT[type=button].pretty, FORM.sfr-form INPUT[type=button].submit, DIV.sfr-form INPUT[type=button].submit, INPUT[type=submit].pretty, FORM.sfr-form INPUT[type=submit].submit, DIV.sfr-form INPUT[type=submit].submit, BUTTON.pretty, A.button, DIV.button, FORM.sfr-form BUTTON.cancel, FORM.sfr-form A.cancel.button, FORM.sfr-form DIV.cancel.button, DIV.sfr-form BUTTON.cancel, DIV.sfr-form A.cancel.button, DIV.sfr-form DIV.cancel.button {
    padding: 8px 16px;
    /* Fixed, so an A.button (which would inherit the body's 1.55) comes out
       the same 35px as an INPUT or BUTTON beside it. */
    line-height: 1.35;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-walnut);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast);
  }
  INPUT[type=button].pretty:hover, FORM.sfr-form INPUT[type=button].submit:hover, DIV.sfr-form INPUT[type=button].submit:hover, INPUT[type=submit].pretty:hover, FORM.sfr-form INPUT[type=submit].submit:hover, DIV.sfr-form INPUT[type=submit].submit:hover, BUTTON.pretty:hover, A.button:hover, DIV.button:hover, FORM.sfr-form BUTTON.cancel:hover, FORM.sfr-form A.cancel.button:hover, FORM.sfr-form DIV.cancel.button:hover, DIV.sfr-form BUTTON.cancel:hover, DIV.sfr-form A.cancel.button:hover, DIV.sfr-form DIV.cancel.button:hover {
    background: var(--accent-walnut-light);
  }
  INPUT[type=button].pretty.submit, FORM.sfr-form INPUT[type=button].submit, DIV.sfr-form INPUT[type=button].submit, INPUT[type=submit].pretty.submit, FORM.sfr-form INPUT[type=submit].submit, DIV.sfr-form INPUT[type=submit].submit, BUTTON.pretty.submit, A.submit.button, DIV.submit.button, FORM.sfr-form BUTTON.submit.cancel, FORM.sfr-form A.submit.cancel.button, FORM.sfr-form DIV.submit.cancel.button, DIV.sfr-form BUTTON.submit.cancel, DIV.sfr-form A.submit.cancel.button, DIV.sfr-form DIV.submit.cancel.button {
    background: var(--accent-walnut);
  }
  INPUT[type=button].pretty.submit:hover, FORM.sfr-form INPUT[type=button].submit:hover, DIV.sfr-form INPUT[type=button].submit:hover, INPUT[type=submit].pretty.submit:hover, FORM.sfr-form INPUT[type=submit].submit:hover, DIV.sfr-form INPUT[type=submit].submit:hover, BUTTON.pretty.submit:hover, A.submit.button:hover, DIV.submit.button:hover, FORM.sfr-form BUTTON.submit.cancel:hover, DIV.sfr-form BUTTON.submit.cancel:hover {
    background: var(--accent-walnut-light);
  }
  INPUT[type=button].pretty.cancel, FORM.sfr-form INPUT[type=button].cancel.submit, DIV.sfr-form INPUT[type=button].cancel.submit, INPUT[type=submit].pretty.cancel, FORM.sfr-form INPUT[type=submit].cancel.submit, DIV.sfr-form INPUT[type=submit].cancel.submit, BUTTON.pretty.cancel, A.cancel.button, DIV.cancel.button, FORM.sfr-form BUTTON.cancel, DIV.sfr-form BUTTON.cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-medium);
    padding: 6.5px 16px;
  }
  INPUT[type=button].pretty.cancel:hover, FORM.sfr-form INPUT[type=button].cancel.submit:hover, DIV.sfr-form INPUT[type=button].cancel.submit:hover, INPUT[type=submit].pretty.cancel:hover, FORM.sfr-form INPUT[type=submit].cancel.submit:hover, DIV.sfr-form INPUT[type=submit].cancel.submit:hover, BUTTON.pretty.cancel:hover, A.cancel.button:hover, DIV.cancel.button:hover, FORM.sfr-form BUTTON.cancel:hover, DIV.sfr-form BUTTON.cancel:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
  }
  INPUT[type=button].pretty, FORM.sfr-form INPUT[type=button].submit, DIV.sfr-form INPUT[type=button].submit, INPUT[type=submit].pretty, FORM.sfr-form INPUT[type=submit].submit, DIV.sfr-form INPUT[type=submit].submit, BUTTON.pretty, A.button, DIV.button, FORM.sfr-form BUTTON.cancel, FORM.sfr-form A.cancel.button, FORM.sfr-form DIV.cancel.button, DIV.sfr-form BUTTON.cancel, DIV.sfr-form A.cancel.button, DIV.sfr-form DIV.cancel.button {
    /* destructive confirms (delete/void) — red primary */
  }
  INPUT[type=button].pretty.danger, FORM.sfr-form INPUT[type=button].danger.submit, DIV.sfr-form INPUT[type=button].danger.submit, INPUT[type=submit].pretty.danger, FORM.sfr-form INPUT[type=submit].danger.submit, DIV.sfr-form INPUT[type=submit].danger.submit, BUTTON.pretty.danger, A.danger.button, DIV.danger.button, FORM.sfr-form BUTTON.danger.cancel, FORM.sfr-form A.danger.cancel.button, FORM.sfr-form DIV.danger.cancel.button, DIV.sfr-form BUTTON.danger.cancel, DIV.sfr-form A.danger.cancel.button, DIV.sfr-form DIV.danger.cancel.button {
    background: var(--unfulfilled);
  }
  INPUT[type=button].pretty.danger:hover, FORM.sfr-form INPUT[type=button].danger.submit:hover, DIV.sfr-form INPUT[type=button].danger.submit:hover, INPUT[type=submit].pretty.danger:hover, FORM.sfr-form INPUT[type=submit].danger.submit:hover, DIV.sfr-form INPUT[type=submit].danger.submit:hover, BUTTON.pretty.danger:hover, A.danger.button:hover, DIV.danger.button:hover, FORM.sfr-form BUTTON.danger.cancel:hover, DIV.sfr-form BUTTON.danger.cancel:hover {
    background: var(--status-rush);
  }
  INPUT[type=button].pretty, FORM.sfr-form INPUT[type=button].submit, DIV.sfr-form INPUT[type=button].submit, INPUT[type=submit].pretty, FORM.sfr-form INPUT[type=submit].submit, DIV.sfr-form INPUT[type=submit].submit, BUTTON.pretty, A.button, DIV.button, FORM.sfr-form BUTTON.cancel, FORM.sfr-form A.cancel.button, FORM.sfr-form DIV.cancel.button, DIV.sfr-form BUTTON.cancel, DIV.sfr-form A.cancel.button, DIV.sfr-form DIV.cancel.button {
    /* Disabled buttons: the .pretty[disabled] rule pins the pale
       background with !important, but this walnut block's text color
       out-specifies its tertiary text — restate it here so disabled
       labels stay legible (pale pill + muted text everywhere). */
  }
  INPUT[type=button].pretty[disabled], FORM.sfr-form INPUT[type=button][disabled].submit, DIV.sfr-form INPUT[type=button][disabled].submit, INPUT[type=button].pretty:disabled, FORM.sfr-form INPUT[type=button].submit:disabled, DIV.sfr-form INPUT[type=button].submit:disabled, INPUT[type=submit].pretty[disabled], FORM.sfr-form INPUT[type=submit][disabled].submit, DIV.sfr-form INPUT[type=submit][disabled].submit, INPUT[type=submit].pretty:disabled, FORM.sfr-form INPUT[type=submit].submit:disabled, DIV.sfr-form INPUT[type=submit].submit:disabled, BUTTON.pretty[disabled], A[disabled].button, DIV[disabled].button, FORM.sfr-form BUTTON[disabled].cancel, FORM.sfr-form A[disabled].cancel.button, FORM.sfr-form DIV[disabled].cancel.button, DIV.sfr-form BUTTON[disabled].cancel, DIV.sfr-form A[disabled].cancel.button, DIV.sfr-form DIV[disabled].cancel.button, BUTTON.pretty:disabled, A.button:disabled, DIV.button:disabled, FORM.sfr-form BUTTON.cancel:disabled, FORM.sfr-form A.cancel.button:disabled, FORM.sfr-form DIV.cancel.button:disabled, DIV.sfr-form BUTTON.cancel:disabled, DIV.sfr-form A.cancel.button:disabled, DIV.sfr-form DIV.cancel.button:disabled {
    color: var(--text-tertiary);
    cursor: default;
  }
  INPUT[type=button].pretty[disabled]:hover, FORM.sfr-form INPUT[type=button][disabled].submit:hover, DIV.sfr-form INPUT[type=button][disabled].submit:hover, INPUT[type=button].pretty:disabled:hover, FORM.sfr-form INPUT[type=button].submit:disabled:hover, DIV.sfr-form INPUT[type=button].submit:disabled:hover, INPUT[type=submit].pretty[disabled]:hover, FORM.sfr-form INPUT[type=submit][disabled].submit:hover, DIV.sfr-form INPUT[type=submit][disabled].submit:hover, INPUT[type=submit].pretty:disabled:hover, FORM.sfr-form INPUT[type=submit].submit:disabled:hover, DIV.sfr-form INPUT[type=submit].submit:disabled:hover, BUTTON.pretty[disabled]:hover, A[disabled].button:hover, DIV[disabled].button:hover, FORM.sfr-form BUTTON[disabled].cancel:hover, DIV.sfr-form BUTTON[disabled].cancel:hover, BUTTON.pretty:disabled:hover, A.button:disabled:hover, DIV.button:disabled:hover, FORM.sfr-form BUTTON.cancel:disabled:hover, DIV.sfr-form BUTTON.cancel:disabled:hover {
    background: var(--bg-muted);
  }
  INPUT[type=button].pretty.modal, FORM.sfr-form INPUT[type=button].modal.submit, DIV.sfr-form INPUT[type=button].modal.submit, INPUT[type=button].pretty.modal-button, FORM.sfr-form INPUT[type=button].modal-button.submit, DIV.sfr-form INPUT[type=button].modal-button.submit, INPUT[type=submit].pretty.modal, FORM.sfr-form INPUT[type=submit].modal.submit, DIV.sfr-form INPUT[type=submit].modal.submit, INPUT[type=submit].pretty.modal-button, FORM.sfr-form INPUT[type=submit].modal-button.submit, DIV.sfr-form INPUT[type=submit].modal-button.submit, BUTTON.pretty.modal, A.modal.button, DIV.modal.button, FORM.sfr-form BUTTON.modal.cancel, FORM.sfr-form A.modal.cancel.button, FORM.sfr-form DIV.modal.cancel.button, DIV.sfr-form BUTTON.modal.cancel, DIV.sfr-form A.modal.cancel.button, DIV.sfr-form DIV.modal.cancel.button, BUTTON.pretty.modal-button, A.modal-button.button, DIV.modal-button.button, FORM.sfr-form BUTTON.modal-button.cancel, FORM.sfr-form A.modal-button.cancel.button, FORM.sfr-form DIV.modal-button.cancel.button, DIV.sfr-form BUTTON.modal-button.cancel, DIV.sfr-form A.modal-button.cancel.button, DIV.sfr-form DIV.modal-button.cancel.button {
    float: right;
    margin: 12px 12px 12px 0;
  }
  /* Inside an sfr form, A.button.cancel also picks up the walnut primary through
     the FORM.sfr-form BUTTON.cancel extends, at (0,3,1) -- above the outline
     variant's a.cancel.button -- so a page form's Cancel link rendered as a
     second walnut button. Restate the outline at the same specificity. */
  FORM.sfr-form A.button.cancel, DIV.sfr-form A.button.cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-medium);
    padding: 6.5px 16px;
  }
  FORM.sfr-form A.button.cancel:hover, DIV.sfr-form A.button.cancel:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
  }
  A.button.bottom-button, FORM.sfr-form A.button.cancel, DIV.sfr-form A.button.cancel, DIV.button.bottom-button, FORM.sfr-form DIV.button.cancel, DIV.sfr-form DIV.button.cancel, INPUT[type=button].bottom-button, FORM.sfr-form INPUT[type=button].submit, DIV.sfr-form INPUT[type=button].submit, INPUT[type=submit].bottom-button, FORM.sfr-form INPUT[type=submit].submit, DIV.sfr-form INPUT[type=submit].submit, BUTTON.bottom-button, FORM.sfr-form BUTTON.cancel, DIV.sfr-form BUTTON.cancel {
    float: right;
    margin: 12px 12px 12px 0;
  }
  TABLE.upload-field {
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
  }
  TABLE.upload-field TD {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  TABLE.upload-field TD.button {
    /* wide enough for "Choose File..." beside the attach glyph */
    width: 132px;
  }
  TABLE.upload-field .size {
    font-size: 0.72rem;
    color: var(--text-tertiary);
  }
  TABLE.upload-field {
    /* Upload buttons read as secondary actions: outlined, with an attach
       glyph from the gem icon set (the generic DIV.button walnut style is
       overridden here at higher specificity). */
  }
  TABLE.upload-field DIV.button {
    width: 100%;
    text-align: center;
    position: relative;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") 8px center no-repeat;
    background-size: 14px 14px;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-medium);
    padding: 6.5px 12px 6.5px 26px;
  }
  TABLE.upload-field DIV.button:hover {
    background-color: var(--bg-muted);
    color: var(--text-primary);
  }
  TABLE.upload-field DIV.button {
    /* sfr_form.js drives this strip's width and toggles .indeterminate —
       geometry must stay exactly as the JS expects. Walnut bar so it
       stays visible against the white button. */
  }
  TABLE.upload-field DIV.button .progress {
    height: 3px;
    padding: 0;
    position: absolute;
    bottom: 1px;
    background-color: transparent;
    left: 2px;
    right: 2px;
  }
  TABLE.upload-field DIV.button .progress DIV {
    height: 3px;
    width: 0;
    background: var(--accent-walnut);
    opacity: 0.9;
  }
  TABLE.upload-field DIV.button .progress DIV.indeterminate {
    width: 100%;
    background: transparent url(https://d249dlssj7e19a.cloudfront.net/assets/sfr_ui/upload-progress-ebf40a17a1458a507b8b4540c7c14723d7fd5311b1dabb44b4551aa8470633a0.gif) top left repeat-x;
  }
  .picker {
    padding: 8px;
  }
  .picker UL.picklist {
    list-style: none;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: white;
    max-height: 400px;
    overflow: auto;
  }
  .picker UL.picklist LI {
    list-style: none;
    /* picker rows are scan-and-click — needs a clearly visible
       separator (the 0.3-alpha hairline all but vanishes on white) */
    border-bottom: 1px solid rgba(200, 189, 178, 0.6);
  }
  .picker UL.picklist LI:last-child {
    border: none;
  }
  .picker UL.picklist LI A {
    display: block;
    padding: 7px 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: background var(--transition-fast);
  }
  .picker UL.picklist LI A:hover {
    background: var(--bg-secondary);
  }
  .picker {
    /* Table-flavored pick lists (e.g. orders/add_from_estimate renders
       <table class="picklist">). */
  }
  .picker TABLE.picklist {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: white;
    max-height: 400px;
    overflow: auto;
    border-collapse: collapse;
  }
  .picker TABLE.picklist TH {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    background: var(--bg-muted);
    border-bottom: 1.5px solid var(--border-light);
    padding: 6px 8px;
  }
  .picker TABLE.picklist TD {
    border-top: 1px solid rgba(200, 189, 178, 0.6);
    padding: 6px 8px;
  }
  .picker TABLE.picklist TR:hover TD {
    background: var(--bg-secondary);
    cursor: pointer;
  }
  .picker .picker-search-container {
    table-layout: fixed;
    width: 100%;
  }
  .picker .picker-search-container BUTTON, .picker .picker-search-container A.button, .picker .picker-search-container DIV.button {
    padding: 4px 6px;
    margin-bottom: 8px;
    width: 65px;
  }
  .picker .picker-search-container .button-container {
    width: 67px;
  }
  .picker .picker-search {
    margin-bottom: 8px;
  }
}
/* Kept outside @layer legacy: inside a layer, !important outranks every
   !important in the app, the reverse of how these were written to work. */
.pretty[disabled], A[disabled].button, DIV[disabled].button, FORM.sfr-form input[disabled], FORM.sfr-form textarea[disabled], FORM.sfr-form select[disabled], FORM.sfr-form button[disabled]:where(:not([class^=rb-]):not([class*=" rb-"])), DIV.sfr-form input[disabled], DIV.sfr-form textarea[disabled], DIV.sfr-form select[disabled], DIV.sfr-form button[disabled]:where(:not([class^=rb-]):not([class*=" rb-"])), FORM.sfr-form INPUT[disabled].submit, DIV.sfr-form INPUT[disabled].submit, FORM.sfr-form BUTTON[disabled].cancel, FORM.sfr-form A[disabled].cancel.button, FORM.sfr-form DIV[disabled].cancel.button, DIV.sfr-form BUTTON[disabled].cancel, DIV.sfr-form A[disabled].cancel.button, DIV.sfr-form DIV[disabled].cancel.button {
  background: var(--row-stripe) !important;
  box-shadow: none !important;
}

TABLE.upload-field TD {
  padding: 0 !important;
}

TABLE.upload-field TD.info {
  padding-left: 6px !important;
}

.picker TABLE.picklist TD {
  text-align: center !important;
}
/* Date inputs get a calendar glyph (stroke SVG, matches the icon set).
   The form-scoped selectors matter: sfr_form's `FORM.sfr-form input`
   reset paints `background: white` at (0,1,2), which out-specifies a bare
   input.hasDatepicker and wipes the glyph inside forms. */
input.hasDatepicker,
FORM.sfr-form INPUT.hasDatepicker,
DIV.sfr-form INPUT.hasDatepicker {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px 14px;
  padding-right: 28px !important;
}

.ui-datepicker {
  width: 19em;
  padding: 8px;
  background: white;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-primary);
}
.ui-datepicker .ui-datepicker-header {
  background: transparent;
  border: none;
  border-radius: 0;
  font-weight: 700;
  padding: 2px 0 6px;
}
.ui-datepicker .ui-datepicker-title {
  color: var(--text-primary);
}
.ui-datepicker .ui-datepicker-title select {
  font-family: var(--font-body);
  font-size: 0.78rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-primary);
  padding: 2px 4px;
}
.ui-datepicker .ui-datepicker-title select:focus {
  border-color: var(--accent-walnut);
  outline: none;
}
.ui-datepicker {
  /* Prev / next buttons: strip the theme's beveled chrome and swap the
     jquery-ui gray sprite for chevrons matching the icon set. */
}
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  top: 4px;
  cursor: pointer;
}
.ui-datepicker .ui-datepicker-prev.ui-state-hover, .ui-datepicker .ui-datepicker-prev:hover, .ui-datepicker .ui-datepicker-next.ui-state-hover, .ui-datepicker .ui-datepicker-next:hover {
  background: var(--bg-secondary);
  border: none;
}
.ui-datepicker .ui-datepicker-prev.ui-state-disabled, .ui-datepicker .ui-datepicker-next.ui-state-disabled {
  opacity: 0.35;
}
.ui-datepicker .ui-datepicker-prev .ui-icon, .ui-datepicker .ui-datepicker-next .ui-icon {
  background-size: 14px 14px !important;
  background-position: center !important;
}
.ui-datepicker .ui-datepicker-prev .ui-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5-7 7 7 7'/%3E%3C/svg%3E") !important;
}
.ui-datepicker .ui-datepicker-next .ui-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") !important;
}
.ui-datepicker table.ui-datepicker-calendar {
  background: transparent;
  border: none;
  margin: 0 0 4px;
}
.ui-datepicker table.ui-datepicker-calendar th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  padding: 4px 0;
}
.ui-datepicker table.ui-datepicker-calendar td {
  border: none;
  padding: 1px;
}
.ui-datepicker table.ui-datepicker-calendar td span, .ui-datepicker table.ui-datepicker-calendar td a {
  display: block;
  text-align: center;
  padding: 5px 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.ui-datepicker table.ui-datepicker-calendar td a.ui-state-hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.ui-datepicker table.ui-datepicker-calendar td {
  /* Today */
}
.ui-datepicker table.ui-datepicker-calendar td a.ui-state-highlight, .ui-datepicker table.ui-datepicker-calendar td span.ui-state-highlight {
  background: var(--status-hold-bg);
  color: var(--status-hold);
  font-weight: 700;
}
.ui-datepicker table.ui-datepicker-calendar td {
  /* Selected day */
}
.ui-datepicker table.ui-datepicker-calendar td a.ui-state-active, .ui-datepicker table.ui-datepicker-calendar td span.ui-state-active {
  background: var(--accent-walnut);
  color: var(--text-inverse);
  font-weight: 700;
}
.ui-datepicker table.ui-datepicker-calendar td.ui-datepicker-other-month a, .ui-datepicker table.ui-datepicker-calendar td.ui-datepicker-other-month span {
  color: var(--text-tertiary);
  opacity: 0.6;
}
.ui-datepicker table.ui-datepicker-calendar td.ui-state-disabled span {
  color: var(--text-tertiary);
  opacity: 0.4;
}
.ui-datepicker .ui-datepicker-buttonpane {
  background: transparent;
  border-top: 1px solid rgba(200, 189, 178, 0.4);
  margin: 4px 0 0;
  padding: 6px 0 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  opacity: 1;
  transition: all var(--transition-fast);
}
.ui-datepicker .ui-datepicker-buttonpane button:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
@charset "UTF-8";
@layer legacy {
  /* ============================================================
     LEGACY COMPAT — old sfr-ui views inside new layout shell
     Scopes old structural styles so they work within .legacy-content
     ============================================================ */
  .legacy-content {
    padding: 0;
    /* ── Background ──
       sfr-ui views were designed for white backgrounds.
       Also set the top bar and main area to white. */
    background: var(--bg-card);
    /* Restore browser-default spacing for block elements */
  }
  .legacy-content p, .legacy-content ul, .legacy-content ol, .legacy-content dl, .legacy-content blockquote, .legacy-content fieldset, .legacy-content figure, .legacy-content pre, .legacy-content hr {
    margin-block: 1em;
  }
  .legacy-content ul, .legacy-content ol {
    padding-inline-start: 40px;
  }
  .legacy-content dd {
    margin-inline-start: 40px;
  }
  .legacy-content fieldset {
    padding: 0.35em 0.75em 0.625em;
    border: 1px solid;
  }
  .legacy-content {
    /* ── Layout ──
       Allow horizontal scroll for wide sfr-ui content. */
    overflow-x: auto;
  }
  .legacy-content #sfr-body {
    /* Hug the sidebar and fit the available main column. A fixed 1140px
       minimum hid filters and trailing columns on common laptop widths. */
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    /* sfr-ui JS dynamically sets padding-top to push content below
       the old fixed toolbar. Since the toolbar is now position:relative
       (flows in document), override with !important. */
  }
  .legacy-content .inventory-filter-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .legacy-content .record-key {
    display: block;
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 600;
  }
  .legacy-content .stock-operation-form {
    max-width: 620px;
  }
  .legacy-content .stock-operation-summary,
  .legacy-content .stock-operation-empty {
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-walnut);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
  }
  .legacy-content .stock-operation-empty strong {
    display: block;
    color: var(--text-primary);
  }
  .legacy-content .stock-operation-warning {
    margin: -4px 0 12px;
    color: var(--status-rush);
    font-weight: 700;
  }
  .legacy-content .legacy-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }
  .legacy-content {
    /* Submit buttons that must read as row links: sfr's .icon/.add classes style
       only A/SPAN (an INPUT falls back to the native accent-colored control), and
       a filled .pretty button is too heavy stacked two-deep in an Action cell
       (Incoming Stock's Receive + Send, Receive + Resolve). */
  }
  .legacy-content input[type=submit].link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent-walnut);
    cursor: pointer;
    text-align: left;
  }
  .legacy-content input[type=submit].link-button:hover {
    text-decoration: underline;
  }
  .legacy-content {
    /* ── Typography ──
       Override sfr-ui's Helvetica 12px with Kovet fonts. */
  }
  .legacy-content {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.55;
  }
  .legacy-content a:not(.rb-btn, .rb-tab-btn, .rb-page-link, .rb-filter-btn, .rb-sort-btn, .rb-reset-btn) {
    color: var(--accent-walnut);
  }
  .legacy-content a:not(.rb-btn, .rb-tab-btn, .rb-page-link, .rb-filter-btn, .rb-sort-btn, .rb-reset-btn):visited {
    color: var(--accent-walnut-light);
  }
  .legacy-content h1, .legacy-content h2, .legacy-content h3 {
    color: var(--text-primary);
  }
  .legacy-content {
    /* ── Pagination ── */
  }
  .legacy-content {
    /* ── Old header/tools/footer — hidden ── */
  }
  .legacy-content #header {
    display: none;
  }
  .legacy-content #tools {
    display: none;
  }
  .legacy-content #footer #busy {
    display: none;
    text-align: center;
    padding: 10px;
  }
  /* Old classes that may appear on any page — keep globally */
  .rush {
    color: red;
    background-color: pink;
    border: 1px solid red;
    padding-left: 2px;
    padding-right: 2px;
  }
  .model-room {
    color: blue;
    background-color: lightcyan;
    border: 1px solid blue;
    padding-left: 2px;
    padding-right: 2px;
  }
  UL.segment-buttons {
    margin: 8px auto;
    text-align: center;
    list-style: none;
  }
  UL.segment-buttons LI {
    display: inline-block;
    border: 1px solid #ddd;
    margin: 0 0 0 -1px;
    padding: 0;
    background: #fafafa;
  }
  UL.segment-buttons LI A {
    text-decoration: none;
    display: block;
    padding: 4px 12px;
    color: black;
  }
  UL.segment-buttons LI A:visited {
    color: black;
  }
  UL.segment-buttons LI A {
    /* Arrow icon links inside segment buttons: the 4px 12px padding
       above beats the base .icon inset and the glyph painted over the
       text. Put each arrow on its natural side with room to breathe. */
  }
  UL.segment-buttons LI A.icon.arrow_left {
    padding-left: 30px;
    background-position: 10px center;
  }
  UL.segment-buttons LI A.icon.arrow_right {
    padding-right: 30px;
    background-position: right 10px center;
  }
  UL.segment-buttons LI:first-child {
    border-bottom-left-radius: 14px;
    border-top-left-radius: 14px;
  }
  UL.segment-buttons LI:first-child A {
    padding-left: 18px;
  }
  UL.segment-buttons LI:last-child {
    border-bottom-right-radius: 14px;
    border-top-right-radius: 14px;
  }
  UL.segment-buttons LI:last-child A {
    padding-right: 18px;
  }
  UL.segment-buttons LI.current {
    background: #ddd;
  }
  /* Number fields never show their spinner. The up/down arrows are a liability
     in this app rather than a convenience: they sit on quantity and cost inputs
     in dense tables (the BOM editor, the costing ledger, dimensions) where a
     stray scroll over a focused field silently changes a saved number, and
     several of those fields carry four decimal places that a 1-per-click stepper
     cannot reach anyway.

     legacy_ui/sfr_form.scss already does this, but only inside .pretty -- which
     leaves every plain number input in the app (anything not built through the
     sfr form builder) still showing them. This is the app-wide rule.

     Both -webkit- pseudo-elements are needed (Chrome/Safari), and
     appearance: textfield is what removes it in Firefox. Kept unnested and at
     plain top level on purpose: the vendored sfr stylesheet is unlayered and
     outranks anything in an @layer here regardless of specificity. */
  input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
  }
  input[type=number]::-webkit-outer-spin-button,
  input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
  }
  /* A.icon.bin now lives in legacy_ui/icons.scss with the rest of the set. */
  .factory-shipment-padding TD {
    padding-top: 15px;
  }
}
/* Kept outside @layer legacy: inside a layer, !important outranks every
   !important in the app, the reverse of how these were written to work. */
.legacy-content #sfr-body {
  padding: 4px 16px 24px !important;
}

.legacy-content, .legacy-content .sfr-form, .legacy-content .tab-set, .legacy-content .pretty, .legacy-content input, .legacy-content select, .legacy-content textarea, .legacy-content button {
  font-family: var(--font-body) !important;
}

.legacy-content h1, .legacy-content h2, .legacy-content h3 {
  font-family: var(--font-display) !important;
}

.legacy-content .pagination a, .legacy-content .pagination span {
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  padding: 4px 10px !important;
  border-radius: var(--radius-sm) !important;
}

.legacy-content .pagination .current {
  background: var(--accent-walnut) !important;
  color: var(--text-inverse) !important;
}

.legacy-content .pagination a:hover {
  background: var(--bg-muted) !important;
  color: var(--text-primary) !important;
}

.rush {
  text-decoration: none !important;
}

.model-room {
  text-decoration: none !important;
}

TABLE.dimensions-table TH, TABLE.dimensions-table TD {
  text-align: center !important;
}

TABLE.dimensions-table TH INPUT, TABLE.dimensions-table TD INPUT {
  text-align: center !important;
}

.factory-shipment-report .shipment td {
  background: #ccc !important;
}

.new-wiw-order td {
  background: #ccc !important;
}

.same-wiw-order td {
  background: white !important;
}
@charset "UTF-8";
/* ============================================================
   DESIGN TOKENS
   ============================================================ */
@layer base {
  :root {
    /* Sidebar */
    --sidebar-bg: #141210;
    --sidebar-hover: #221E1B;
    --sidebar-active: #2E2620;
    --sidebar-text: #C4BAB0;
    --sidebar-text-active: #F7F2EC;
    --sidebar-accent: #D4906A;
    /* Backgrounds */
    --bg-primary: #EDE8E1;
    --bg-secondary: #E0D8CE;
    --bg-card: #FFFFFF;
    /* Inset panels and header bands sitting on a white card. */
    --bg-subtle: #FAF8F5;
    --surface-inset: var(--bg-subtle);
    /* The legacy (sfr) screens' header bands, tool cells and hover fills. */
    --bg-muted: #F5F3F0;
    /* List-table rows: white base -> warm zebra stripe -> deeper hover.
       Kept as distinct levels so a hovered row still visibly darkens whether
       it is striped or not. */
    --row-stripe: #F0EBE4;
    --row-hover: rgba(200, 189, 178, 0.45);
    /* Text */
    --text-primary: #1A1210;
    --text-secondary: #4A3E36;
    --text-tertiary: #7A6C62;
    --text-inverse: #F5F0EB;
    /* Accents */
    --accent-walnut: #5A2D1C;
    --accent-walnut-light: #7A4A38;
    --accent-brass: #9E6E00;
    --accent-brass-light: #C49020;
    /* Borders */
    --border-light: #C8BDB2;
    --border-medium: #A89688;
    /* Status — Open */
    --status-open: #155E3E;
    --status-open-bg: #BBEDD8;
    /* Status — Hold */
    --status-hold: #92400E;
    --status-hold-bg: #FDE8B6;
    /* Status — Shipped */
    --status-shipped: #1439A0;
    --status-shipped-bg: #C8D8F8;
    /* Status — Closed */
    --status-closed: #3F4755;
    --status-closed-bg: #D8DCE4;
    /* Status — Rework: pieces sent back to be worked again */
    --status-rework: #5B2D91;
    --status-rework-bg: #E6D9F7;
    /* Status — Rush */
    --status-rush: #7F1D22;
    --status-rush-bg: #FECDCD;
    /* Fulfillment */
    --fulfilled: #155E3E;
    --fulfilled-bg: #BBEDD8;
    --partial: #92400E;
    --partial-bg: #FDE8B6;
    --unfulfilled: #B91C1C;
    --unfulfilled-bg: #FECDCD;
    /* Task priority: the base is the dot and stripe on white; -fill/-border/-text/-dot draw the solid pill. */
    --priority-high: var(--unfulfilled);
    --priority-high-fill: var(--unfulfilled);
    --priority-high-border: var(--status-rush);
    --priority-high-text: #FFF1F1;
    --priority-high-dot: #FFE3E3;
    --priority-medium: var(--accent-brass-light);
    --priority-medium-fill: #F5C557;
    --priority-medium-border: #B07A00;
    --priority-medium-text: #4A2D00;
    --priority-medium-dot: #4A2D00;
    --priority-low: #3F6643;
    --priority-low-fill: #3F6643;
    --priority-low-border: #2F4A33;
    --priority-low-text: #F1F7F2;
    --priority-low-dot: #C8E0CC;
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(44,36,32,0.10);
    --shadow-md: 0 4px 14px rgba(44,36,32,0.14);
    --shadow-lg: 0 8px 28px rgba(44,36,32,0.18);
    --shadow-card: 0 2px 6px rgba(44,36,32,0.10), 0 1px 3px rgba(44,36,32,0.07);
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    /* Motion */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  html {
    font-size: 17px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
  }
  body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }
  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 6px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
  }
  a {
    color: inherit;
  }
}
@charset "UTF-8";
/* ============================================================
   LAYOUT
   ============================================================ */
@layer layout {
  /* ---- SIDEBAR ---- */
  .rb-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-body);
    animation: sidebarIn 0.3s ease-out both;
  }
  @keyframes sidebarIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  .rb-sidebar-logo {
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
  }
  .rb-sidebar-logo h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--sidebar-text-active);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
  }
  .rb-sidebar-logo span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--sidebar-text);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.7;
  }
  .rb-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-hover) transparent;
  }
  .rb-nav-section {
    margin-bottom: 8px;
  }
  .rb-nav-section-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sidebar-text);
    opacity: 0.5;
    padding: 16px 24px 6px;
    display: block;
  }
  .rb-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 600;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
    cursor: pointer;
  }
  .rb-nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
  }
  .rb-nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
  }
  .rb-nav-item.active::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 4px;
    width: 3px;
    background: var(--sidebar-accent);
    border-radius: 0 3px 3px 0;
  }
  .rb-nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
  }
  .rb-nav-item.active .rb-nav-icon,
  .rb-nav-item:hover .rb-nav-icon {
    opacity: 1;
  }
  .rb-nav-badge {
    margin-inline-start: auto;
    background: var(--sidebar-accent);
    color: var(--sidebar-bg);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
  }
  .rb-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }
  .rb-sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sidebar-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sidebar-bg);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    text-transform: uppercase;
  }
  .rb-sidebar-user {
    flex: 1;
    min-width: 0;
  }
  .rb-sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--sidebar-text-active);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rb-sidebar-user-role {
    font-size: 0.7rem;
    color: var(--sidebar-text);
    opacity: 0.7;
  }
  .rb-sidebar-logout,
  .rb-sidebar-footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
  }
  .rb-sidebar-logout:hover,
  .rb-sidebar-footer-btn:hover,
  .rb-sidebar-footer-btn[aria-current=page] {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
  }
  .rb-sidebar-logout svg,
  .rb-sidebar-footer-btn svg {
    width: 16px;
    height: 16px;
  }
  /* ---- SIDEBAR OVERLAY (mobile drawer scrim) ---- */
  .rb-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 16, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
  }
  .rb-sidebar-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  /* ---- HAMBURGER (hidden on desktop) ---- */
  .rb-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
  }
  .rb-menu-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
  }
  .rb-menu-toggle svg {
    display: block;
  }
  /* ---- MAIN CONTENT ---- */
  .rb-main {
    margin-inline-start: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-inline-start var(--transition-smooth);
  }
  @media (min-width: 901px) {
    .rb-sidebar {
      transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    }
    body.rb-sidebar-collapsed .rb-sidebar {
      transform: translateX(calc(-1 * var(--sidebar-width)));
      box-shadow: none;
    }
    body.rb-sidebar-collapsed .rb-main {
      margin-inline-start: 0;
    }
  }
  /* White background for legacy views — covers main area + top bar */
  .rb-main:has(.legacy-content) {
    background: var(--bg-card);
  }
  .rb-main:has(.legacy-content) .rb-top-bar {
    background: rgba(255, 255, 255, 0.92);
  }
  /* ---- TOP BAR ---- */
  .rb-top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(237, 232, 225, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--border-medium);
    padding: 0 32px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .rb-top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .rb-top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  /* ---- RESPONSIVE: tablet — tighten horizontal padding ---- */
  @media (max-width: 1100px) {
    .rb-top-bar {
      padding: 0 20px;
    }
  }
  /* ---- RESPONSIVE: legacy detail/show pages on narrow screens ---- */
  @media (max-width: 700px) {
    /* sfr_columns wraps columns as floated divs. Stack on mobile. */
    .legacy-content .info-box .column {
      float: none;
      width: 100% !important; /* sfr's _columns partial sets each column's width inline */
      display: block;
      max-width: 100%;
    }
    .legacy-content .info-box .column + .column {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-light);
    }
    /* .fields tables — let them fill the column instead of 126px fixed width */
    .legacy-content table.fields {
      width: 100%;
      table-layout: fixed;
    }
    .legacy-content table.fields th {
      width: 40%;
      word-wrap: break-word;
    }
    .legacy-content table.fields td {
      word-wrap: break-word;
      overflow-wrap: anywhere;
    }
    /* Detail header title — scale down on mobile */
    .legacy-content .detail-header {
      padding: 14px;
    }
    .legacy-content .detail-header h1 {
      font-size: 1.15rem;
      line-height: 1.25;
    }
    /* The "Order Details" centered h1 on show page — scale down */
    .legacy-content > #sfr-body > h1 {
      font-size: 1.3rem;
      line-height: 1.3;
    }
    /* Toolbar: collapse to a single horizontally-scrollable strip rather than
       exploding into ~10 wrapped rows. */
    .legacy-content .sfr-toolbar.page {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .legacy-content .sfr-toolbar.page::-webkit-scrollbar {
      display: none;
    }
    .legacy-content .sfr-toolbar.page ul.items {
      flex-wrap: nowrap;
    }
    .legacy-content .sfr-toolbar.page ul.items li {
      flex-shrink: 0;
    }
    /* The search/filter inputs inside toolbar shouldn't stretch the row */
    .legacy-content .sfr-toolbar.page input[type=text] {
      width: 120px;
    }
    /* The inventory toolbar contains two filters and an action. Keep that one
       discoverable instead of placing its Location and Search controls beyond
       a hidden horizontal toolbar scrollbar. */
    body.inventories_index .legacy-content .sfr-toolbar.page {
      overflow-x: visible;
    }
    body.inventories_index .legacy-content .sfr-toolbar.page ul.items.right {
      width: 100%;
      flex-wrap: wrap;
    }
    body.inventories_index .legacy-content .sfr-toolbar.page ul.items li.inventory-filter-item {
      order: 99;
      width: 100%;
      flex: 1 0 100%;
    }
    body.inventories_index .inventory-filter-form {
      display: grid;
      grid-template-columns: max-content minmax(0, 1fr);
      gap: 8px;
      width: 100%;
    }
    body.inventories_index .inventory-filter-form input[type=text],
    body.inventories_index .inventory-filter-form select {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }
    body.inventories_index .inventory-filter-form input[type=submit] {
      grid-column: 2;
      justify-self: start;
    }
    /* Receipt and stock filters carry operational actions, so keep every
       control visible rather than requiring an undiscoverable sideways swipe. */
    body.receipts_index .legacy-content .sfr-toolbar.page,
    body.fabric_stock_index .legacy-content .sfr-toolbar.page {
      overflow-x: visible;
    }
    body.receipts_index .legacy-content .sfr-toolbar.page ul.items.right,
    body.fabric_stock_index .legacy-content .sfr-toolbar.page ul.items.right {
      width: 100%;
      flex-wrap: wrap;
    }
    body.receipts_index .legacy-content .sfr-toolbar.page li.receipt-filter-item,
    body.fabric_stock_index .legacy-content .sfr-toolbar.page li.stock-filter-item {
      width: 100%;
      flex: 1 0 100%;
    }
    body.receipts_index .legacy-content .sfr-toolbar.page li.receipt-filter-item {
      order: 99;
    }
    body.fabric_stock_index .legacy-content .sfr-toolbar.page li.stock-filter-item {
      order: -1;
    }
    body.receipts_index .receipt-filter-form,
    body.fabric_stock_index .stock-filter-form {
      display: grid;
      grid-template-columns: max-content minmax(0, 1fr);
      gap: 8px;
      width: 100%;
      align-items: center;
    }
    body.receipts_index .receipt-filter-form input:not([type=hidden]),
    body.receipts_index .receipt-filter-form select,
    body.fabric_stock_index .stock-filter-form input:not([type=hidden]) {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }
    body.receipts_index .receipt-filter-form input[type=submit],
    body.fabric_stock_index .stock-filter-form input[type=submit] {
      grid-column: 2;
      justify-self: start;
      width: auto;
    }
    /* Tab-set: override the inline `height: 3000px` that the legacy helper
       sets — on mobile that leaves a huge empty expanse after tab content. */
    .legacy-content .tab-set {
      height: auto !important;
    }
    .legacy-content .tab-set .tab-control {
      overflow-x: auto;
      flex-wrap: nowrap;
      scrollbar-width: none;
    }
    .legacy-content .tab-set .tab-control::-webkit-scrollbar {
      display: none;
    }
    /* Wide tables inside tabs — allow horizontal scroll on their wrapper.
       !important: page stylesheets (@layer components) size their list tables,
       e.g. .program-items-table's min-width and table.customs-factura's font-size. */
    .legacy-content table.list,
    .legacy-content table.fixed-list-header {
      min-width: 0 !important;
      font-size: 0.76rem !important;
    }
    /* Operational stock lists become labeled records on phones. The location
       quantities and actions remain visible without a page-wide sideways
       scroll or a scrollbar after fifty rows. */
    .legacy-content table.responsive-record-table {
      display: block;
      width: 100%;
      margin-top: 12px;
      border: 0;
      background: transparent;
    }
    .legacy-content table.responsive-record-table thead {
      display: none;
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
      border: 0;
    }
    .legacy-content table.responsive-record-table tbody,
    .legacy-content table.responsive-record-table tr {
      display: block;
      width: 100%;
    }
    .legacy-content table.responsive-record-table tbody tr {
      margin-bottom: 12px;
      overflow: hidden;
      background: white;
      border: 1px solid var(--border-light);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-sm);
    }
    .legacy-content table.responsive-record-table td {
      display: grid;
      grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      width: 100%;
      min-height: 38px;
      padding: 8px 10px;
      box-sizing: border-box;
      overflow-wrap: anywhere;
      border-right: 0;
      border-left: 0;
      border-bottom: 1px solid rgba(200, 189, 178, 0.3);
    }
    .legacy-content table.responsive-record-table td:empty {
      display: none;
    }
    .legacy-content table.responsive-record-table td::before {
      content: attr(data-label);
      color: var(--text-tertiary);
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      line-height: 1.25;
      text-transform: uppercase;
    }
    .legacy-content table.responsive-record-table td.tool {
      background: #F5F3F0 !important; /* beats legacy_ui/base's unlayered !important row stripes */
    }
    .legacy-content table.responsive-record-table td.tool > a,
    .legacy-content table.responsive-record-table td.tool > form {
      margin: 0;
    }
    /* A table nested inside a record card (e.g. the BOM materials list) keeps
       its table layout — scrolling sideways in its own .legacy-table-scroll
       wrapper — instead of inheriting the labeled-grid treatment above, whose
       descendant selectors would otherwise explode every nested cell too. */
    .legacy-content table.responsive-record-table table.list {
      display: table;
      width: 100%;
    }
    .legacy-content table.responsive-record-table table.list tbody {
      display: table-row-group;
      width: auto;
    }
    /* Undoes the hidden-thead rule above for a nested table that has a head
       of its own (the BOM materials list). */
    .legacy-content table.responsive-record-table table.list thead {
      display: table-header-group;
      position: static;
      width: auto;
      height: auto;
      margin: 0;
      overflow: visible;
      clip: auto;
      white-space: normal;
    }
    .legacy-content table.responsive-record-table table.list tr {
      display: table-row;
      margin: 0;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      background: transparent;
      overflow: visible;
    }
    .legacy-content table.responsive-record-table table.list td {
      display: table-cell;
      width: auto;
      min-height: 0;
      padding: 6px 8px;
      border-bottom: 1px solid rgba(200, 189, 178, 0.3);
    }
    .legacy-content table.responsive-record-table table.list td::before {
      content: none;
    }
    .legacy-content table.responsive-record-table table.list td:empty {
      display: table-cell;
    }
    .legacy-content table.incoming-stock-responsive input,
    .legacy-content table.incoming-stock-responsive select,
    .legacy-content table.incoming-stock-responsive form {
      width: 100% !important; /* its inputs carry an inline width */
      max-width: 100%;
      box-sizing: border-box;
    }
    .legacy-content table.stock-movement-responsive .movement-note-row {
      margin-top: -8px;
    }
    /* Mobile paging shows only the current page and directional controls.
       JS marks numeric/gap links so the server-side helper remains unchanged. */
    .legacy-content .list-info {
      text-align: center;
    }
    .legacy-content .list-info > div[style*="float: left"],
    .legacy-content .list-info > div[style*="float: right"] {
      float: none !important; /* the float is inline */
      text-align: center;
    }
    .legacy-content .list-info > div[style*="float: right"] {
      margin-top: 6px;
    }
    .legacy-content .paging .page-number,
    .legacy-content .paging .page-gap {
      display: none;
    }
    .rb-top-bar-left,
    .rb-top-bar-right {
      min-width: 0;
    }
    #masquerade-link {
      padding-inline: 8px;
    }
  }
  /* ---- RESPONSIVE: mobile — sidebar becomes a drawer ---- */
  @media (max-width: 900px) {
    .rb-sidebar {
      width: min(280px, 85vw);
      transform: translateX(-100%);
      transition: transform var(--transition-smooth);
      box-shadow: var(--shadow-lg);
      animation: none;
    }
    .rb-sidebar.is-open {
      transform: translateX(0);
    }
    .rb-main {
      margin-inline-start: 0;
    }
    /* Lock body scroll when drawer is open */
    body.rb-nav-open {
      overflow: hidden;
    }
    .rb-top-bar {
      padding: 0 14px;
      gap: 10px;
    }
    /* Legacy views: let wide tables scroll inside main instead of pushing layout.
       !important: compat sets #sfr-body's padding with !important. */
    .legacy-content {
      overflow-x: auto;
    }
    .legacy-content #sfr-body {
      min-width: 0;
      padding: 4px 12px 20px !important;
    }
  }
}
/* ============================================================
   COMPONENTS
   ============================================================ */
@layer components {
  /* ---- MODAL TEXT ----
     Modals mount on <body>, outside .legacy-content's restored block margins,
     so a popup's headings and paragraphs would stack with no space between
     them. :where() keeps this at zero specificity: any view's own class
     (.po-modal-hint, .ms-popup-what) still sets its spacing. */
  :where(.sfr-modal) :where(h2) {
    margin: 0 0 4px;
  }
  :where(.sfr-modal) :where(h3) {
    margin: 18px 0 6px;
  }
  :where(.sfr-modal) :where(h4) {
    margin: 12px 0 4px;
  }
  :where(.sfr-modal) :where(p) {
    margin: 0 0 8px;
  }
  :where(.sfr-modal > div.scroll) > :where(h2, h3):first-child {
    margin-top: 0;
  }
  /* ---- BREADCRUMB ---- */
  .rb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
  }
  .rb-breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  .rb-breadcrumb a:hover {
    color: var(--accent-walnut);
  }
  .rb-breadcrumb-sep {
    color: var(--text-tertiary);
    font-size: 0.7rem;
  }
  .rb-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 700;
  }
  @media (max-width: 700px) {
    /* The page heading gives the context; the full trail would push Reports and Switch user off-screen. */
    .rb-top-bar-left .rb-breadcrumb {
      display: none;
    }
  }
  /* ---- BUTTONS ---- */
  .rb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    /* Every variant carries the secondary's 1.5px border (transparent unless
       the variant colors it) and a fixed line-height, so an A, a BUTTON and an
       INPUT come out the same height whichever variant they wear. Without
       them a link was 35px, a button 32px and a secondary 38px, and a primary
       beside a secondary never lined up. */
    line-height: 1.5;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
  }
  .rb-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  .rb-btn-primary {
    background: var(--accent-walnut);
    color: var(--text-inverse);
  }
  .rb-btn-primary:hover {
    background: var(--accent-walnut-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }
  .rb-btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium);
  }
  .rb-btn-secondary:hover {
    background: var(--bg-secondary);
  }
  /* A stop: putting work on hold. */
  .rb-btn-dark {
    background: var(--status-closed);
    color: var(--text-inverse);
  }
  .rb-btn-dark:hover {
    background: var(--text-primary);
    box-shadow: var(--shadow-md);
  }
  .rb-btn-dark:disabled:hover, .rb-btn-dark[disabled]:hover {
    background: var(--status-closed);
    box-shadow: none;
  }
  /* Sending work back: asking for rework (outlined), and its confirmation. */
  .rb-btn-rework {
    background: var(--bg-card);
    color: var(--status-rework);
    border: 1.5px solid var(--status-rework);
  }
  .rb-btn-rework:hover {
    background: var(--status-rework-bg);
  }
  .rb-btn-rework-solid {
    background: var(--status-rework);
    color: var(--text-inverse);
  }
  .rb-btn-rework-solid:hover {
    background: var(--text-primary);
    box-shadow: var(--shadow-md);
  }
  .rb-btn-rework-solid:disabled:hover, .rb-btn-rework-solid[disabled]:hover {
    background: var(--status-rework);
    box-shadow: none;
  }
  .rb-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
  }
  .rb-btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  /* Disabled, whatever the variant: faded, and no hover lift or fill. */
  .rb-btn:disabled, .rb-btn[disabled], .rb-btn[aria-disabled=true] {
    opacity: 0.5;
    cursor: not-allowed;
  }
  .rb-btn:disabled:hover, .rb-btn[disabled]:hover {
    transform: none;
    box-shadow: none;
  }
  .rb-btn-primary:disabled:hover, .rb-btn-primary[disabled]:hover {
    background: var(--accent-walnut);
  }
  .rb-btn-secondary:disabled:hover, .rb-btn-secondary[disabled]:hover {
    background: var(--bg-card);
  }
  .rb-btn-ghost:disabled:hover, .rb-btn-ghost[disabled]:hover {
    background: transparent;
    color: var(--text-secondary);
  }
  /* Modifiers. After the variants: same specificity, so the later rule wins. */
  .rb-btn-danger {
    color: var(--unfulfilled);
  }
  .rb-btn-danger:hover {
    color: var(--bg-card);
    background: var(--unfulfilled);
    border-color: var(--unfulfilled);
  }
  .rb-btn-danger:disabled:hover, .rb-btn-danger[disabled]:hover {
    color: var(--unfulfilled);
    background: transparent;
    border-color: transparent;
  }
  .rb-btn-sm {
    height: 28px;
    padding: 0 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
  }
  /* ---- DROPDOWN ---- */
  .rb-dropdown {
    position: relative;
    display: inline-block;
  }
  .rb-dropdown > summary {
    list-style: none;
    cursor: pointer;
  }
  .rb-dropdown > summary::-webkit-details-marker {
    display: none;
  }
  .rb-dropdown > summary::marker {
    content: "";
  }
  .rb-dropdown-chevron {
    width: 12px !important;
    height: 12px !important;
    transition: transform var(--transition-fast);
  }
  .rb-dropdown[open] .rb-dropdown-chevron {
    transform: rotate(180deg);
  }
  .rb-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .rb-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .rb-dropdown-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  /* An item that is also an sfr icon link (a.pencil.icon) draws its glyph as a
     background image, so the text starts after it. */
  .rb-dropdown-item.icon {
    padding-left: 34px;
    background-position: 12px center;
  }
  .rb-dropdown-divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--border-light);
  }
  .rb-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent-walnut);
  }
  .rb-dropdown-item.is-active {
    background: var(--bg-secondary);
    color: var(--accent-walnut);
  }
  /* Row-level action menu inside a list table. .rb-btn is sized for the toolbar;
     at that size it dominates every row of a 50-row page, so the trigger is
     compact here. */
  .row-actions {
    display: inline-block;
  }
  .row-actions > summary {
    padding: 4px 10px;
    font-size: 0.72rem;
    justify-content: center;
  }
  .row-actions > summary:hover {
    text-decoration: none;
  }
  /* Fixed, not absolute: the list table scrolls inside an overflow:auto wrapper,
     which clips an absolutely-positioned panel at the wrapper's edge. Placed by
     placeRowMenu in the template, which is also what closes it on scroll. */
  .row-actions .rb-dropdown-menu {
    position: fixed;
    /* The shared rule pins right:0 to hang the panel off a toolbar button. Left
       alone, a fixed element with both right and left set stretches to fill the
       viewport -- which measured as a full-width panel and placed it off-screen
       left. placeRowMenu sets left, so right must yield. */
    right: auto;
    top: auto;
    min-width: 200px;
    text-align: left;
  }
  /* The list table centres its tool cells; the menu's own items read as a list
     and must stay left-aligned regardless of the cell they hang off. */
  .row-actions .rb-dropdown-item {
    justify-content: flex-start;
    text-align: left;
  }
  .row-actions .rb-dropdown-item:hover {
    text-decoration: none;
  }
  .sfr-toolbar ul.items li a.rb-btn {
    color: var(--text-primary);
  }
  .sfr-toolbar ul.items li a.rb-btn:hover {
    text-decoration: none;
    background: var(--bg-secondary);
  }
  .sfr-toolbar ul.items li .rb-dropdown-item:hover {
    text-decoration: none;
    background: var(--bg-secondary);
  }
  /* ---- FLASH MESSAGES ---- */
  .rb-flash {
    padding: 12px 32px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .rb-flash-notice {
    background: var(--status-open-bg);
    color: var(--status-open);
    border-color: rgba(21, 94, 62, 0.2);
  }
  .rb-flash-alert {
    background: var(--status-rush-bg);
    color: var(--status-rush);
    border-color: rgba(127, 29, 34, 0.2);
  }
  /* ---- MASQUERADE BANNER ---- */
  .rb-masquerade-banner {
    background: var(--status-hold-bg);
    color: var(--status-hold);
    border-bottom: 1px solid rgba(146, 64, 14, 0.2);
    padding: 8px 32px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .rb-masquerade-banner a {
    color: var(--accent-walnut);
    font-weight: 700;
    text-decoration: underline;
  }
  /* ---- STATUS PILLS ---- */
  .rb-status {
    display: inline-flex;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  .rb-status-open {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .rb-status-hold {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .rb-status-shipped {
    background: var(--status-shipped-bg);
    color: var(--status-shipped);
  }
  .rb-status-closed {
    background: var(--status-closed-bg);
    color: var(--status-closed);
  }
  .rb-status-rush {
    background: var(--status-rush-bg);
    color: var(--status-rush);
  }
  .rb-status-rework {
    background: var(--status-rework-bg);
    color: var(--status-rework);
  }
  .rb-status-neutral {
    background: var(--bg-secondary);
    color: var(--text-secondary);
  }
  .rb-status-sm {
    padding: 2px 8px;
    font-size: 0.66rem;
  }
  /* ---- FULFILLMENT BADGES ---- */
  .rb-fulfillment {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
  }
  .rb-readiness-done {
    background: var(--fulfilled-bg);
    color: var(--fulfilled);
    border: 1px solid rgba(21, 94, 62, 0.15);
  }
  .rb-readiness-partial {
    background: var(--partial-bg);
    color: var(--partial);
    border: 1px solid rgba(146, 64, 14, 0.15);
  }
  .rb-readiness-missing {
    background: var(--unfulfilled-bg);
    color: var(--unfulfilled);
    border: 1px solid rgba(185, 28, 28, 0.15);
  }
  .rb-readiness-na {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px dashed var(--border-light);
  }
  .rb-readiness-mark {
    margin-right: 3px;
    font-family: var(--font-body);
  }
  /* ---- TABS ---- */
  .rb-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 12px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
  }
  .rb-tab-btn:hover {
    color: var(--text-primary);
  }
  .rb-tab-btn.active {
    color: var(--accent-walnut);
    border-bottom-color: var(--accent-walnut);
  }
  .rb-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 16px;
    border-bottom: 2px solid var(--border-light);
  }
  /* Folder tabs on a tinted strip under the page header (Project Management's
     manager tabs): the active tab is a white card joined to the page below. */
  .rb-tab-bar-folder {
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 10px 32px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
  }
  .rb-tab-bar-folder .rb-tab-btn {
    padding: 8px 18px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-right: 4px;
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .rb-tab-bar-folder .rb-tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
  }
  .rb-tab-bar-folder .rb-tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-light);
    position: relative;
    top: 1px;
  }
  /* ---- FILTER BAR: segmented filters, sort and reset ---- */
  .rb-filter-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .rb-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .rb-filter-group {
    display: flex;
    gap: 0;
    flex-shrink: 0;
  }
  .rb-filter-btn {
    padding: 5px 12px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    margin-left: -1px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .rb-filter-btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    margin-left: 0;
  }
  .rb-filter-btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .rb-filter-btn:only-child {
    border-radius: var(--radius-sm);
  }
  .rb-filter-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    z-index: 1;
    position: relative;
  }
  .rb-filter-btn.active {
    background: var(--accent-walnut);
    color: var(--text-inverse);
    border-color: var(--accent-walnut);
    z-index: 1;
    position: relative;
  }
  .rb-filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border-medium);
    margin: 0 8px;
    flex-shrink: 0;
    align-self: center;
  }
  .rb-sort-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
    flex-shrink: 0;
  }
  .rb-sort-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 2px;
  }
  .rb-sort-btn {
    padding: 4px 10px;
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-fast);
  }
  .rb-sort-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
  }
  .rb-sort-btn.active {
    background: var(--bg-card);
    border-color: var(--border-medium);
    color: var(--text-primary);
  }
  .rb-sort-arrow {
    margin-left: 4px;
  }
  /* ---- RESET FILTERS ----
     Ghost-styled so it reads as an escape hatch, not a filter competing with
     the active (walnut) pills. Only rendered when filters are active. */
  .rb-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-fast);
  }
  .rb-reset-btn svg {
    width: 12px;
    height: 12px;
  }
  .rb-reset-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
    color: var(--text-primary);
  }
  /* ---- PAGINATION ---- */
  .rb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px 32px;
  }
  .rb-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
  }
  .rb-page-link:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
    color: var(--text-primary);
  }
  .rb-page-link.current {
    background: var(--accent-walnut);
    color: var(--text-inverse);
    border-color: var(--accent-walnut);
  }
  .rb-page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
  }
  @media (max-width: 1100px) {
    .rb-filter-bar {
      padding: 10px 20px;
    }
    .rb-flash {
      padding: 12px 20px;
    }
    .rb-masquerade-banner {
      padding: 8px 20px;
    }
    .rb-pagination {
      padding: 20px;
    }
  }
  @media (max-width: 900px) {
    .rb-filter-bar {
      padding: 8px 14px;
    }
    .rb-flash {
      padding: 10px 14px;
    }
    .rb-masquerade-banner {
      padding: 8px 14px;
      font-size: 0.76rem;
    }
    .rb-pagination {
      padding: 16px 14px;
    }
  }
  /* ---- SECTION HEADER (inside page) ---- */
  .rb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
  }
  .rb-section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
  }
  /* ---- DATA TABLE ---- */
  .rb-table-wrap {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }
  .rb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
  }
  .rb-table thead th {
    background: var(--bg-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-tertiary);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1.5px solid var(--border-light);
    white-space: nowrap;
  }
  .rb-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(200, 189, 178, 0.4);
    color: var(--text-primary);
    font-weight: 600;
    vertical-align: middle;
  }
  .rb-table tbody tr:last-child td {
    border-bottom: none;
  }
  .rb-table tbody tr:hover td {
    background: rgba(237, 232, 225, 0.5);
  }
  .rb-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }
  .rb-kpi {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px 18px;
  }
  .rb-kpi__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-tertiary);
  }
  .rb-kpi__value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    font-variant-numeric: lining-nums tabular-nums;
  }
  .rb-kpi__note {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
  }
  .rb-bar-chart {
    --rb-bar-plot: 220px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(76px, 1fr);
    grid-template-rows: 1fr auto;
    gap: 0 10px;
    overflow-x: auto;
    padding: 4px 4px 8px;
  }
  .rb-bar-chart__bar {
    --rb-bar: 0;
    grid-row: span 2;
    display: grid;
    grid-template-rows: subgrid;
    justify-items: center;
    text-align: center;
  }
  .rb-bar-chart__value {
    grid-area: 1/1;
    align-self: end;
    margin-bottom: calc(var(--rb-bar) * var(--rb-bar-plot));
    padding-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .rb-bar-chart__fill {
    grid-area: 1/1;
    align-self: end;
    width: 100%;
    max-width: 88px;
    height: calc(var(--rb-bar) * var(--rb-bar-plot));
    background: var(--accent-walnut-light);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }
  .rb-bar-chart__label {
    grid-area: 2/1;
    width: 100%;
    margin-top: 6px;
    border-top: 1.5px solid var(--border-light);
    padding-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
  }
  /* ---- MONO / CODE SPANS ---- */
  .rb-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
  }
  /* ---- CHOICE CARDS ----
     A few exclusive options, each needing a sentence of explanation: radio
     buttons drawn as cards, a <label class="rb-choice-card"> around each
     <input type="radio">, inside a <fieldset class="rb-choice-cards">. The
     checked card is marked by the stylesheet alone (:has), so a form needs
     no script for it. Side by side where there is room, stacked at phone
     width. */
  .rb-choice-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 4px 0 16px;
    padding: 0 4px;
    border: 0;
  }
  .rb-choice-cards legend {
    width: 100%;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .rb-choice-card {
    position: relative;
    display: flex;
    flex: 1 1 300px;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
  }
  .rb-choice-card input[type=radio] {
    position: absolute;
    top: 15px;
    left: 14px;
    accent-color: var(--accent-walnut);
  }
  .rb-choice-card:hover {
    border-color: var(--border-medium);
  }
  .rb-choice-card:has(input:checked) {
    border-color: var(--accent-walnut);
    background: var(--bg-subtle);
    box-shadow: var(--shadow-sm);
  }
  .rb-choice-card:has(input:focus-visible) {
    outline: 2px solid var(--accent-brass);
    outline-offset: 2px;
  }
  .rb-choice-card__title {
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-choice-card__text,
  .rb-choice-card__list {
    font-size: 0.88rem;
    color: var(--text-secondary);
  }
  .rb-choice-card__list-title {
    margin-top: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
  }
  .rb-choice-card__list {
    display: flex;
    flex-direction: column;
  }
}
/* Customer tier, 1-3 stars. Unlayered on purpose: it sits inside page
   headings and field tables styled by unlayered page stylesheets. */
.tier-stars {
  color: #D4A83A;
  font-size: 0.85em;
  letter-spacing: 1px;
  line-height: 1;
  vertical-align: baseline;
  white-space: nowrap;
  cursor: default;
}
/* ============================================================
   UTILITIES
   ============================================================ */
@layer utilities {
  .rb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
}
@charset "UTF-8";
/* ============================================================
   ORDER LIST PAGE
   ============================================================ */
@layer components {
  /* ---- SEARCH + VIEW SWITCHER ROW ---- */
  .rb-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 32px;
  }
  .rb-search-wrap {
    position: relative;
    flex: 1;
    max-width: 420px;
  }
  .rb-search-wrap.rb-search-fabric {
    max-width: 300px;
  }
  .rb-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    pointer-events: none;
  }
  .rb-search-input {
    width: 100%;
    padding: 7px 12px 7px 34px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast);
  }
  .rb-search-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 500;
  }
  .rb-search-input:focus {
    border-color: var(--accent-walnut);
  }
  .rb-view-switcher {
    display: flex;
    gap: 0;
    flex-shrink: 0;
  }
  .rb-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    margin-left: -1px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
  }
  .rb-view-btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    margin-left: 0;
  }
  .rb-view-btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .rb-view-btn:hover {
    background: var(--bg-secondary);
  }
  .rb-view-btn.active {
    background: var(--accent-walnut);
    color: var(--text-inverse);
    border-color: var(--accent-walnut);
    z-index: 1;
    position: relative;
  }
  .rb-view-btn svg {
    width: 14px;
    height: 14px;
  }
  .rb-list-count {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* ---- ADVANCED FILTER (Order::Filter panel) ----
     The disclosure toggle lives in the list toolbar; the panel it controls is
     a sibling below it, so the open state is driven by [hidden] from the
     view's inline script rather than by any CSS-only trick. */
  .rb-adv-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-fast);
  }
  .rb-adv-toggle svg {
    width: 13px;
    height: 13px;
  }
  .rb-adv-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  .rb-adv-toggle-count {
    display: inline-block;
    min-width: 16px;
    padding: 0 5px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: var(--text-inverse);
    background: var(--accent-walnut);
    border-radius: var(--radius-pill);
  }
  .rb-adv-toggle-caret {
    color: var(--text-tertiary);
    transition: transform var(--transition-fast);
  }
  .rb-adv-toggle.is-open .rb-adv-toggle-caret {
    transform: rotate(180deg);
  }
  .rb-adv-filter {
    padding: 0 32px 4px;
  }
  .rb-adv-filter[hidden] {
    display: none;
  }
  .rb-adv-filter-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .rb-adv-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border-light);
  }
  .rb-adv-filter-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
  }
  .rb-adv-filter-clear {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-walnut);
    text-decoration: none;
    white-space: nowrap;
  }
  .rb-adv-filter-clear:hover {
    text-decoration: underline;
  }
  /* Two field columns that collapse to one when there is no room for the
     150px sfr label plus a usable control. */
  .rb-adv-filter-grid {
    display: grid;
    /* min() so the 380px track floor can't push the panel wider than the
       viewport on a phone — auto-fit alone would overflow. */
    grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
    gap: 0 40px;
    padding: 12px 18px 4px;
  }
  .rb-adv-filter-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px 14px;
    border-top: 1px solid var(--border-light);
  }
  /* The Kom checkbox's field-pair table would otherwise
     stretch to 100% and push Search onto its own line; its empty 150px label
     cell is kept, which is what lines the checkbox up with the controls above
     it. The submit's float+margin is meaningless inside a flex row. */
  .rb-adv-filter-foot .field-pair {
    width: auto;
    margin: 0;
  }
  .rb-adv-filter-foot input.submit {
    float: none;
    margin: 0;
  }
  /* ---- ACTIVE FILTER CHIPS ---- */
  .rb-filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 32px 0;
  }
  .rb-filter-chips-label {
    margin-inline-end: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-tertiary);
  }
  .rb-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px 3px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: var(--radius-pill);
    white-space: nowrap;
  }
  .rb-filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--text-tertiary);
    border-radius: var(--radius-pill);
    text-decoration: none;
  }
  .rb-filter-chip-remove:hover {
    background: rgba(90, 45, 28, 0.07);
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .rb-filter-chips-clear {
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-decoration: underline;
  }
  .rb-filter-chips-clear:hover {
    color: var(--accent-walnut);
  }
  /* ---- ORDER LIST / CARDS ---- */
  .rb-order-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 32px 32px;
  }
  .rb-order-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
    padding-left: 4px;
  }
  .rb-order-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-medium);
    transition: background var(--transition-fast);
  }
  /* The stripe shows how urgent the required date is. It used to show the
     status, but nearly every open order is on a hold, so it was always amber. */
  .rb-order-card[data-urgency=overdue]::before {
    background: var(--status-rush);
  }
  .rb-order-card[data-urgency=soon]::before {
    background: var(--accent-brass-light);
  }
  .rb-order-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
  }
  .rb-order-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    min-width: 0;
  }
  .rb-order-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .rb-order-so {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-walnut);
    background: rgba(90, 45, 28, 0.07);
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
  }
  .rb-order-customer {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
  }
  .rb-order-project {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
  }
  .rb-order-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .rb-meta-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .rb-meta-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-tertiary);
  }
  .rb-meta-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-meta-missing {
    color: var(--text-tertiary);
    font-weight: 600;
  }
  .rb-countdown {
    margin-left: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-tertiary);
  }
  .rb-countdown-overdue {
    color: var(--status-rush);
  }
  .rb-countdown-soon {
    color: var(--accent-brass);
  }
  .rb-meta-divider {
    width: 1px;
    height: 28px;
    background: var(--border-light);
    flex-shrink: 0;
  }
  .rb-order-card-managers {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }
  .rb-manager-item {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .rb-manager-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-tertiary);
  }
  .rb-manager-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .rb-order-card-notes {
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 2px 8px;
    border-left: 2px solid var(--accent-brass-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rb-order-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    flex-shrink: 0;
    min-width: 140px;
  }
  .rb-order-pill-row {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .rb-order-card .rb-status {
    text-transform: none;
    letter-spacing: 0;
  }
  .rb-order-badges {
    display: flex;
    gap: 4px;
  }
  .rb-order-total {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  /* ---- EMPTY STATE ---- */
  .rb-empty-state {
    text-align: center;
    padding: 64px 32px;
  }
  .rb-empty-state-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }
  .rb-empty-state-sub {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    font-weight: 600;
  }
  /* Tablet and mobile padding. Here, not in design_system/layout.scss: the
     layout layer loses to these components-layer rules whatever the width. */
  @media (max-width: 1100px) {
    .rb-list-toolbar {
      padding: 12px 20px;
    }
    .rb-adv-filter {
      padding: 0 20px 4px;
    }
    .rb-filter-chips {
      padding: 8px 20px 0;
    }
    .rb-order-list {
      padding: 0 20px 24px;
    }
  }
  @media (max-width: 900px) {
    .rb-list-toolbar {
      padding: 10px 14px;
      flex-wrap: wrap;
    }
    .rb-adv-filter {
      padding: 0 14px 4px;
    }
    .rb-filter-chips {
      padding: 8px 14px 0;
    }
    .rb-order-list {
      padding: 0 14px 20px;
    }
  }
}
@charset "UTF-8";
/* ============================================================
   TASKS — the dashboard's task list and the task (note) page
   ============================================================ */
@layer components {
  /* ---- PRIORITY DOT ---- */
  .rb-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  /* ---- STATUS DOT ---- */
  .rb-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: middle;
  }
  .rb-status-dot.rb-status-open {
    background: #3F6643;
  }
  .rb-status-dot.rb-status-in-discussion {
    background: #3A8EC7;
  }
  .rb-status-dot.rb-status-resolved {
    background: #9A9A9A;
  }
  /* ============================================================ */
  /*  TASKS LIST                                                  */
  /* ============================================================ */
  .rb-filter-priority {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .rb-filter-priority .rb-priority-dot {
    width: 8px;
    height: 8px;
  }
  .rb-filter-priority.high .rb-priority-dot {
    background: var(--priority-high);
  }
  .rb-filter-priority.medium .rb-priority-dot {
    background: var(--priority-medium);
  }
  .rb-filter-priority.low .rb-priority-dot {
    background: var(--priority-low);
  }
  .rb-filter-priority.high.active {
    background: var(--priority-high-fill);
    border-color: var(--priority-high-border);
    color: var(--priority-high-text);
  }
  .rb-filter-priority.medium.active {
    background: var(--priority-medium-fill);
    border-color: var(--priority-medium-border);
    color: var(--priority-medium-text);
  }
  .rb-filter-priority.low.active {
    background: var(--priority-low-fill);
    border-color: var(--priority-low-border);
    color: var(--priority-low-text);
  }
  .rb-filter-priority.high.active .rb-priority-dot {
    background: var(--priority-high-dot);
  }
  .rb-filter-priority.medium.active .rb-priority-dot {
    background: var(--priority-medium-dot);
  }
  .rb-filter-priority.low.active .rb-priority-dot {
    background: var(--priority-low-dot);
  }
  .rb-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
  }
  .rb-task-card {
    --task-accent: var(--border-medium);
    position: relative;
    display: grid;
    grid-template-columns: 5px 1fr auto;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 12px 16px 12px 0;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  }
  .rb-task-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
  }
  .rb-task-card[data-priority=high] {
    --task-accent: var(--priority-high);
  }
  .rb-task-card[data-priority=medium] {
    --task-accent: var(--priority-medium);
  }
  .rb-task-card[data-priority=low] {
    --task-accent: var(--priority-low);
  }
  .rb-task-card[data-priority=none] {
    --task-accent: var(--border-medium);
  }
  .rb-task-card.is-resolved {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0.015)), var(--bg-card);
  }
  .rb-task-card.is-overdue {
    border-color: #E2A4A4;
  }
  .rb-task-stripe {
    background: var(--task-accent);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
  }
  .rb-task-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  .rb-task-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
  }
  .rb-task-head-tags {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-self: center;
  }
  .rb-task-text {
    flex: 1 1 240px;
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    padding-bottom: 1px;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .rb-task-text:hover {
    color: var(--accent-walnut);
    border-bottom-color: var(--accent-walnut-light);
  }
  .rb-task-text span {
    display: inline;
  }
  .rb-task-text br {
    display: none;
  }
  .rb-task-card.is-resolved .rb-task-text {
    color: var(--text-secondary);
  }
  .rb-task-type {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inverse);
    background: var(--accent-walnut);
    border-radius: var(--radius-sm);
  }
  .rb-priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 10px;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid transparent;
  }
  .rb-priority-pill .rb-priority-dot {
    width: 7px;
    height: 7px;
  }
  .rb-priority-pill[data-priority=high] {
    color: var(--priority-high-text);
    background: var(--priority-high-fill);
    border-color: var(--priority-high-border);
  }
  .rb-priority-pill[data-priority=high] .rb-priority-dot {
    background: var(--priority-high-dot);
  }
  .rb-priority-pill[data-priority=medium] {
    color: var(--priority-medium-text);
    background: var(--priority-medium-fill);
    border-color: var(--priority-medium-border);
  }
  .rb-priority-pill[data-priority=medium] .rb-priority-dot {
    background: var(--priority-medium-dot);
  }
  .rb-priority-pill[data-priority=low] {
    color: var(--priority-low-text);
    background: var(--priority-low-fill);
    border-color: var(--priority-low-border);
  }
  .rb-priority-pill[data-priority=low] .rb-priority-dot {
    background: var(--priority-low-dot);
  }
  .rb-task-status {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 999px;
    border: 1px solid transparent;
  }
  .rb-task-status.open {
    background: var(--status-open);
    color: #EAF7EF;
    border-color: #0E4A30;
  }
  .rb-task-status.resolved {
    background: var(--status-closed);
    color: #EFF1F5;
    border-color: #2C3340;
  }
  .rb-task-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-walnut);
    font-weight: 600;
    font-size: 0.86rem;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    padding-bottom: 1px;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .rb-task-order:hover {
    color: var(--accent-walnut-light);
    border-bottom-color: currentColor;
  }
  .rb-task-order svg {
    width: 14px;
    height: 14px;
    opacity: 0.75;
  }
  .rb-task-resolution {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    border-left: 3px solid var(--fulfilled);
    background: rgba(21, 94, 62, 0.1);
    padding: 6px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.45;
  }
  .rb-task-resolution-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fulfilled);
    flex-shrink: 0;
  }
  .rb-task-resolution-by {
    color: var(--text-secondary);
    font-size: 0.85rem;
  }
  .rb-task-resolution-by strong {
    color: var(--text-primary);
    font-weight: 700;
  }
  .rb-task-resolution-sep {
    color: var(--border-medium);
  }
  .rb-task-resolution-text {
    flex: 1 1 200px;
    min-width: 0;
    color: var(--text-secondary);
  }
  .rb-task-resolution-text span {
    display: inline;
  }
  .rb-task-docs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
  }
  .rb-task-doc {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .rb-task-doc-link {
    color: var(--accent-walnut);
    text-decoration: none;
    font-weight: 600;
  }
  .rb-task-doc-link.subtle {
    color: var(--text-tertiary);
    font-weight: 500;
  }
  .rb-task-doc-link:hover {
    text-decoration: underline;
  }
  .rb-task-doc-name {
    color: var(--text-secondary);
  }
  .rb-task-doc-desc {
    color: var(--text-tertiary);
  }
  .rb-task-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-medium);
  }
  .rb-task-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.82rem;
  }
  .rb-task-meta-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .rb-task-meta-value {
    color: var(--text-primary);
    font-weight: 700;
  }
  .rb-task-meta-value.overdue {
    color: var(--unfulfilled);
  }
  .rb-task-meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-medium);
    opacity: 0.5;
  }
  .rb-task-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    align-self: flex-start;
    padding-right: 2px;
    min-width: 104px;
  }
  .rb-task-actions .rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .rb-task-actions .rb-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  @media (max-width: 720px) {
    .rb-task-card {
      grid-template-columns: 4px 1fr;
      gap: 14px;
      padding: 16px 16px 16px 0;
    }
    .rb-task-actions {
      grid-column: 2/-1;
      flex-direction: row;
      flex-wrap: wrap;
      min-width: 0;
    }
  }
  /* ============================================================ */
  /*  TASK SHOW PAGE                                              */
  /* ============================================================ */
  .rb-task-show {
    padding: 24px 28px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1100px;
  }
  .rb-task-show-card {
    --task-accent: var(--border-medium);
    position: relative;
    display: grid;
    grid-template-columns: 6px 1fr;
    gap: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 24px 28px 24px 0;
    box-shadow: var(--shadow-md);
  }
  .rb-task-show-card[data-priority=high] {
    --task-accent: var(--priority-high);
  }
  .rb-task-show-card[data-priority=medium] {
    --task-accent: var(--priority-medium);
  }
  .rb-task-show-card[data-priority=low] {
    --task-accent: var(--priority-low);
  }
  .rb-task-show-stripe {
    background: var(--task-accent);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  }
  .rb-task-show-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }
  .rb-task-show-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .rb-task-needs-resolution {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--status-rush);
    background: var(--status-rush-bg);
    border: 1px solid #E0A8A8;
    border-radius: 999px;
  }
  .rb-task-show-title {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-display, var(--font-body));
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }
  .rb-task-show-title span {
    display: inline;
  }
  .rb-task-show-card[data-resolved=true] .rb-task-show-title {
    color: var(--text-secondary);
  }
  .rb-task-show-order {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: var(--text-inverse);
    background: var(--accent-walnut);
    border: 1px solid var(--accent-walnut);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
    transition: background 0.15s ease, transform 0.15s ease;
  }
  .rb-task-show-order:hover {
    background: var(--accent-walnut-light);
    border-color: var(--accent-walnut-light);
  }
  .rb-task-show-order svg {
    width: 15px;
    height: 15px;
  }
  .rb-task-show-order-meta {
    padding-left: 8px;
    margin-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    opacity: 0.85;
    font-size: 0.78rem;
  }
  .rb-task-show-resolution {
    margin-top: 4px;
    border-left: 4px solid var(--fulfilled);
    background: rgba(21, 94, 62, 0.1);
    padding: 14px 18px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-primary);
  }
  .rb-task-show-resolution-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }
  .rb-task-show-resolution-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fulfilled);
  }
  .rb-task-show-resolution-by {
    color: var(--text-secondary);
    font-size: 0.85rem;
  }
  .rb-task-show-resolution-by strong {
    color: var(--text-primary);
    font-weight: 700;
  }
  .rb-task-show-resolution-text {
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.55;
  }
  .rb-task-show-resolution-text p {
    margin: 0 0 6px 0;
  }
  .rb-task-show-resolution-text p:last-child {
    margin-bottom: 0;
  }
  /* Two-column meta grid */
  .rb-task-show-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  @media (max-width: 800px) {
    .rb-task-show-grid {
      grid-template-columns: 1fr;
    }
    .rb-task-show {
      padding: 16px 16px 32px;
    }
    .rb-task-show-card {
      padding: 18px 20px 18px 0;
    }
    .rb-task-show-title {
      font-size: 1.35rem;
    }
  }
  .rb-task-show-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
  }
  .rb-task-show-panel-title {
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
  }
  .rb-task-show-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    min-width: 22px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-inverse);
    background: var(--accent-walnut);
    border-radius: 999px;
    letter-spacing: 0;
  }
  .rb-task-show-defs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
  }
  .rb-task-show-def {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    align-items: baseline;
  }
  .rb-task-show-def dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
  }
  .rb-task-show-def dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
  }
  .rb-task-show-def dd.overdue {
    color: var(--unfulfilled);
  }
  .rb-task-show-def dd .rb-status {
    margin-left: 4px;
  }
  .rb-task-show-docs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .rb-task-show-doc {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
  }
  .rb-task-show-doc-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-walnut);
  }
  .rb-task-show-doc-main {
    min-width: 0;
  }
  .rb-task-show-doc-name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rb-task-show-doc-desc {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    margin-top: 2px;
  }
  .rb-task-show-doc-actions {
    display: inline-flex;
    gap: 6px;
    flex-shrink: 0;
  }
  .rb-task-show-empty {
    margin: 0;
    color: var(--text-tertiary);
    font-style: italic;
    font-size: 0.9rem;
  }
  /* ---- REPLIES ---- */
  .rb-task-show-replies {
    margin-top: 18px;
  }
  .rb-task-show-reply-list {
    list-style: none;
    margin: 0 0 14px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .rb-task-show-reply {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    background: var(--bg-secondary);
  }
  .rb-task-show-reply-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.82rem;
  }
  .rb-task-show-reply-author {
    font-weight: 600;
  }
  .rb-task-show-reply-meta {
    color: var(--text-tertiary);
    font-size: 0.78rem;
  }
  .rb-task-show-reply-delete {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-tertiary);
  }
  .rb-task-show-reply-body {
    font-size: 0.9rem;
  }
  .rb-task-show-reply-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .rb-task-show-reply-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font: inherit;
  }
}
.rb-task-head-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.rb-task-head-tags-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rb-assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.rb-assignee-chip .rb-assignee-chip-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.rb-assignee-chip .rb-assignee-chip-name {
  font-weight: 500;
}

.rb-task-show-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.rb-task-show-tags-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rb-task-show {
  position: relative;
}

.rb-drop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.rb-drop-overlay[hidden] {
  display: none;
}

.rb-drop-overlay-inner {
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Tasks page: vendors waiting for approval (users/_dashboard_vendor_approvals)
   and change orders waiting for authorization (users/_dashboard_change_order_approvals). */
.rb-vendor-approvals,
.rb-change-order-approvals {
  padding: 20px 20px 0;
}

.rb-vendor-approvals .rb-section-header,
.rb-change-order-approvals .rb-section-header {
  margin-bottom: 10px;
}

.vendor-pending {
  font-weight: 700;
  color: var(--status-hold);
}
@charset "UTF-8";
@layer components {
  /* Compact drop control that lives in the toolbar next to the search field. */
  .ol-image-drop {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.25em 0.6em;
    border: 1px dashed var(--border-medium);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.9em;
    white-space: nowrap;
    vertical-align: middle;
  }
  .ol-image-drop.dragover {
    border-color: var(--accent-walnut);
    background: var(--bg-secondary);
    color: var(--accent-walnut);
  }
  .ol-image-drop-label::before {
    content: "⬇ ";
  }
  .ol-image-browse {
    color: var(--accent-walnut);
    cursor: pointer;
    text-decoration: underline;
  }
  .ol-image-drop-spinner {
    color: var(--accent-walnut);
    font-style: italic;
  }
  .ol-image-search-controls {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35em;
    vertical-align: middle;
  }
  .ol-image-hint-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.9em;
    color: var(--text-secondary);
  }
  .ol-image-hint-label {
    white-space: nowrap;
  }
  .ol-image-hint {
    width: 190px;
  }
  .ol-image-hint-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    flex: none;
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.85em;
    color: var(--text-secondary);
    cursor: help;
  }
  .ol-image-hint-tip {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: -0.5em;
    z-index: 30;
    width: 280px;
    padding: 0.6em 0.75em;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    font-size: 0.95em;
    font-style: normal;
    white-space: normal;
    text-align: left;
    line-height: 1.45;
  }
  .ol-image-hint-info:hover .ol-image-hint-tip,
  .ol-image-hint-info:focus .ol-image-hint-tip {
    display: block;
  }
  .ol-image-search-banner {
    display: flex;
    align-items: center;
    gap: 1em;
    margin: 0.75em 0 1em;
  }
  .ol-image-search-query {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3em;
    margin: 0;
    padding: 0.4em;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--row-stripe);
  }
  .ol-image-search-query-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
  }
  .ol-image-search-query-img {
    display: block;
    max-width: 110px;
    max-height: 110px;
    border-radius: 4px;
  }
  .ol-image-search-summary {
    font-size: 1.05em;
  }
  .ol-image-search-error {
    color: var(--unfulfilled);
  }
  .ol-image-search-hint {
    display: inline-block;
    margin-right: 10px;
    font-style: italic;
  }
  /* Result thumbnails are bigger than the 32px .swatch so matches are easy to eyeball. */
  img.ol-image-result-thumb {
    max-width: 72px;
    max-height: 72px;
    border-radius: 3px;
    cursor: pointer;
  }
  /* "Your recent searches" strip above the results. Deliberately small: it's a
     navigation aid, not content, so the thumbs are 40px chips in one wrapping row
     with the meta text only along for the ride on hover/wide screens. */
  .ol-recent-searches {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0.5em 0 0.75em;
    font-size: 0.85em;
    color: var(--text-secondary);
  }
  .ol-recent-searches-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85em;
    color: var(--text-tertiary);
  }
  .ol-recent-searches-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4em;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .ol-recent-search {
    margin: 0;
    padding: 0;
  }
  .ol-recent-search-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 2px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--row-stripe);
    text-decoration: none;
    color: inherit;
  }
  .ol-recent-search-link:hover {
    border-color: var(--accent-walnut);
    background: var(--bg-secondary);
  }
  img.ol-recent-search-thumb {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
  }
  .ol-recent-search-meta {
    padding-right: 0.4em;
    font-size: 0.85em;
    color: var(--text-tertiary);
    white-space: nowrap;
  }
  .ol-recent-searches-all {
    font-size: 0.9em;
  }
  .ol-recent-searches-note {
    color: var(--text-secondary);
  }
  /* The /image_searches list page. The thumb is the row's subject rather than a
     chip, so it gets a bit more room than the 40px strip above — still a fixed
     square so tall and wide query images line up down the column. */
  img.ol-search-list-thumb {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    border-radius: 3px;
  }
  .ol-search-list-hint {
    font-style: italic;
    display: block;
  }
  .ol-image-search-back {
    font-size: 0.9em;
    margin: 0 0 0.75em;
  }
  /* Click-to-sort headers on the image-search results (rank vs order number). The
     ::after glyph is a neutral ⇅ until a column is the active sort, then ▲/▼. */
  .ol-image-search-results th.ol-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
  }
  .ol-image-search-results th.ol-sortable:hover {
    color: var(--accent-walnut);
  }
  .ol-image-search-results th.ol-sortable::after {
    content: " ⇅";
    color: var(--border-medium);
  }
  .ol-image-search-results th.ol-sortable.sort-asc::after {
    content: " ▲";
    color: var(--accent-walnut);
  }
  .ol-image-search-results th.ol-sortable.sort-desc::after {
    content: " ▼";
    color: var(--accent-walnut);
  }
  .ol-image-search-results td.ol-image-rank {
    text-align: center;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
  }
  /* Expanded sibling rows sit visually under their representative rather than
     reading as a flat list of equals. */
  table.list tr.ol-expanded-row > td:first-child {
    padding-left: 24px;
  }
  table.list tr.ol-expanded-row {
    background-color: var(--bg-subtle);
  }
  .ol-more-badge {
    margin-left: 6px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 16px;
    color: var(--accent-walnut);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    cursor: pointer;
  }
  .ol-more-badge:hover {
    background: var(--border-light);
  }
  .ol-more-badge[disabled] {
    color: var(--text-tertiary);
    cursor: default;
  }
  /* "Showing the first 100 of N" / "no other matches" — a note about the rows
     above it, not another row of data. Same layer note as above. */
  table.list tr.ol-expand-note > td {
    font-style: italic;
    color: var(--text-secondary);
  }
}
@charset "UTF-8";
/* ============================================================
   PROJECT MANAGEMENT — pre-production tracking grid
   A very wide step-by-step grid (one column per hand-off), so it scrolls
   inside its own region and leans on the status colours to be scannable:
   green = done, red = outstanding, neutral = nothing tracked here.
   ============================================================ */
@layer components {
  /* ---- MONTH PICKER (sits in the filter bar) ---- */
  .pm-month-form {
    display: flex;
    flex-shrink: 0;
    margin-left: 4px;
  }
  .pm-month-input {
    padding: 4px 10px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
  }
  .pm-month-input:hover {
    background: var(--bg-secondary);
  }
  .pm-month-input:focus {
    border-color: var(--accent-walnut);
  }
  .pm-month-input.active {
    background: var(--accent-walnut);
    color: var(--text-inverse);
    border-color: var(--accent-walnut);
  }
  /* The native indicator is near-invisible against walnut. */
  .pm-month-input.active::-webkit-calendar-picker-indicator {
    filter: invert(1);
  }
  /* ---- LOOKAHEAD PILL COUNTS ---- */
  .pm-pill-count {
    display: inline-block;
    margin-left: 5px;
    padding: 0 5px;
    min-width: 16px;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
  }
  .rb-filter-btn.active .pm-pill-count {
    background: rgba(255, 255, 255, 0.22);
    color: var(--text-inverse);
  }
  /* An empty month is worth showing -- it says "nothing there" -- but it should
     not pull the eye the way a month with work in it does. */
  .pm-pill-count.is-zero {
    opacity: 0.45;
  }
  /* ---- TABLE REGION ---- */
  /* Tracks the horizontal padding the rest of the shell uses at each width. */
  .pm-table-region {
    padding: 0 32px 8px;
  }
  @media (max-width: 1100px) {
    .pm-table-region {
      padding: 0 20px 8px;
    }
  }
  @media (max-width: 700px) {
    .pm-table-region {
      padding: 0 14px 8px;
    }
  }
  /* The grid is far wider than any viewport, and long: scroll it in both axes
     here so the page body never scrolls sideways under the sidebar, and so the
     sticky header below has a scroll container to pin against. Capped by
     viewport height rather than content so the pager stays reachable. */
  .pm-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 260px);
    min-height: 320px;
    /* Warm card container, matching the schedule mockup. */
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .pm-table {
    /* Sized by content — a stretched 24-column table is unreadable. */
    width: auto;
    min-width: 100%;
  }
  /* Sticky on <thead> rather than each <th>: the header is two rows, and
     pinning cells individually would stack the sub-header on top of the row
     above it. The th backgrounds keep rows from showing through. */
  .pm-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .pm-table thead th {
    vertical-align: bottom;
    text-align: center;
    max-width: 120px;
    white-space: normal;
    line-height: 1.25;
  }
  .pm-table tbody td {
    padding: 6px 10px;
    text-align: center;
    vertical-align: top;
    font-weight: 600;
  }
  /* Row banding reads better than a hover tint on a grid this wide. */
  .pm-table tbody > tr:nth-child(even) > td {
    background: rgba(237, 232, 225, 0.35);
  }
  .pm-table tbody > tr:hover > td {
    background: rgba(212, 144, 106, 0.1);
  }
  /* Client and project names are the only prose here; left-aligned and capped
     so a long project title cannot set the height of the whole row. */
  .pm-text {
    text-align: left !important;
    /* min as well as max: the surrounding columns are all nowrap chips, so
       without a floor the browser squeezes these two down to a word per line. */
    min-width: 160px;
    max-width: 200px;
    white-space: normal;
    font-weight: 600;
    line-height: 1.35;
  }
  .pm-work-order {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .pm-work-order:hover {
    text-decoration: underline;
  }
  .pm-date {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    white-space: nowrap;
  }
  /* A deadline that has already passed is the signal these columns exist for. */
  .pm-overdue {
    color: var(--unfulfilled);
    font-weight: 700;
  }
  /* An unconfirmed ship date is a weaker deadline than a confirmed one, and the
     app already reads these colours this way (ship_date_status_highlight). */
  .pm-ship-confirmed {
    color: var(--fulfilled);
  }
  .pm-ship-not_confirmed {
    color: var(--text-tertiary);
  }
  .pm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    margin-top: 4px;
  }
  .pm-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
  }
  /* ---- NESTED LINE TABLES (inside an expanded cell) ---- */
  .pm-sub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
  }
  .pm-sub-table thead th {
    padding: 5px 8px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    text-align: left;
    background: var(--bg-secondary);
    white-space: nowrap;
  }
  .pm-sub-table td {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(200, 189, 178, 0.35);
    vertical-align: middle;
    text-align: left;
  }
  .pm-sub-table tbody tr:last-child td {
    border-bottom: none;
  }
  .pm-line-table td {
    white-space: nowrap;
  }
  .pm-sub-label {
    color: var(--text-tertiary);
    font-weight: 700;
    white-space: nowrap;
  }
  /* ---- STATUS CHIPS ----
     Every "is this step done" cell reduces to one chip: green done, red
     outstanding, neutral when the column tracks nothing on this order. A chip
     rather than a tinted cell — orders run to a dozen lines, and tinting the
     cell would paint a slab of colour hundreds of pixels tall. */
  .pm-cell {
    white-space: nowrap;
  }
  .pm-chip {
    display: inline-block;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
  }
  .pm-chip-done {
    background: var(--fulfilled-bg);
    color: var(--fulfilled);
  }
  .pm-chip-todo {
    background: var(--unfulfilled-bg);
    color: var(--unfulfilled);
  }
  .pm-chip-none {
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    font-weight: 600;
  }
  /* Tracked, but blocked on an earlier step. Dashed to say "this becomes your
     problem later" — as against pm-chip-none, which never will. */
  .pm-chip-pending {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px dashed var(--border-medium);
    font-weight: 600;
    cursor: help;
  }
  .pm-chip-working {
    background: var(--status-shipped-bg);
    color: var(--status-shipped);
  }
  /* Chips that do something get an affordance; static ones must not look clickable. */
  a.pm-chip {
    cursor: pointer;
    transition: filter var(--transition-fast);
  }
  a.pm-chip:hover {
    filter: brightness(0.94);
    color: inherit;
    text-decoration: none;
  }
  /* In flight — these fire real emails, so the chip must not invite a second click. */
  a.pm-chip.pm-busy {
    opacity: 0.5;
    pointer-events: none;
  }
  /* ---- ATTENTION CELLS ---- */
  .pm-attention-toggle::after {
    content: "▸";
    margin-left: 5px;
    font-size: 0.7em;
    display: inline-block;
    transition: transform var(--transition-fast);
  }
  .pm-cell.open .pm-attention-toggle::after {
    transform: rotate(90deg);
  }
  .pm-attention-detail {
    display: none;
  }
  .pm-cell.open .pm-attention-detail {
    display: block;
    /* Give the panel room to breathe: left to the column's own width, tag ids
       and item names wrap onto three lines each. */
    min-width: 340px;
    margin-top: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-align: left;
    white-space: normal;
  }
}
@layer components {
  .approval-header .emp-hint {
    margin: 6px 0 0;
  }
  .approval-tabs .rb-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .approval-tab-count {
    padding: 2px 7px;
    border-radius: 12px;
    background: var(--bg-card);
    font-family: var(--font-mono);
    font-size: 0.75rem;
  }
  .approval-table-scroll {
    overflow-x: auto;
  }
  .approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .po-number-cell {
    white-space: nowrap;
  }
  .po-preview-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
  }
  .po-preview-toggle::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--transition-fast);
  }
  .po-preview-toggle[aria-expanded=true]::before {
    transform: translateY(2px) rotate(-135deg);
  }
  .po-preview-row[hidden] {
    display: none;
  }
  .emp-table tbody tr.po-preview-row:hover {
    background: none;
  }
  .emp-table tbody tr:has(+ .po-preview-row[hidden]:last-child) td {
    border-bottom: none;
  }
  .emp-table .po-preview-row > td {
    padding: 0 12px 14px;
  }
  .po-preview {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    padding: 10px 12px 12px;
  }
  .po-preview-title {
    margin: 0 0 8px;
    font-weight: 600;
  }
  .po-preview-scroll {
    max-height: 434px;
    overflow: auto;
    background: var(--bg-card);
  }
  .po-preview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .emp-table .po-preview-table th,
  .emp-table .po-preview-table td {
    height: 40px;
    padding: 4px 10px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border-light);
  }
  .emp-table .po-preview-table th {
    height: 34px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-card);
    white-space: nowrap;
  }
  .emp-table .po-preview-table tbody tr:last-child td {
    border-bottom: none;
  }
  .po-preview-table .po-preview-num {
    text-align: right;
    white-space: nowrap;
  }
  .po-preview-image {
    width: 44px;
  }
  .po-preview-image img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
}
@charset "UTF-8";
@layer components {
  .commission-item-ul {
    list-style-type: none;
    margin: 0;
    padding: 5px 0px 5px 0px;
    overflow: hidden;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }
  .commission-item-ul li {
    float: left;
    padding-right: 15px;
    width: 12%;
  }
  .commission-item-ul li:nth-child(1) {
    text-align: left;
    width: 20%;
  }
  .picker-wrapper {
    overflow: hidden;
    white-space: nowrap;
  }
  .legend TABLE {
    border-spacing: 0;
    width: 100%;
  }
  .legend TABLE TD {
    padding: 4px;
    border: 1px solid var(--border-light);
  }
  .legend TABLE TR.unfulfilled TD {
    background: rgb(255, 221, 221);
  }
  .legend TABLE TR.partial TD {
    background: rgb(255, 254, 204);
  }
  .legend TABLE TR.fulfilled TD {
    background: rgb(230, 251, 229);
  }
  .legend TABLE TR.overage TD {
    background: rgb(221, 238, 255);
  }
  #flash {
    text-align: center;
    background-color: rgb(250, 194, 69);
    padding: 6px;
    margin: 4px;
    border: 1px solid rgb(237, 134, 24);
  }
  #sfr-body {
    position: relative;
  }
  .popup-trigger {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A3E36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center right/11px 11px no-repeat;
    padding-right: 14px;
    white-space: nowrap;
    text-decoration: none;
    color: black;
  }
  .popup-trigger.popped {
    background-color: var(--text-primary);
    background-position-4: 2px;
    background-position-y: 2px;
    color: var(--text-inverse);
    border: none;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
    padding: 4px 8px 4px 8px;
    margin: -3px -8px -3px -8px;
    box-shadow: 0 3px 5px #555;
  }
  .popup-container {
    border: 3px solid var(--text-primary);
    background: var(--bg-primary);
    border-radius: 4px;
    border-top-left-radius: 0;
    box-shadow: 0 3px 5px #555;
    padding: 4px;
    margin-right: 8px;
    z-index: 10001;
    position: absolute;
  }
  .popup-container P {
    padding: 5px 0;
    margin: 0;
  }
  .popup-container .buttons {
    width: 130px;
    margin-top: -5px;
  }
  .popup-container .buttons A {
    display: block;
    text-align: center;
    margin-top: 5px;
  }
  IMG.swatch {
    height: 32px;
    width: 32px;
    max-height: 32px;
    max-width: 32px;
  }
  TD.drag-handle {
    width: 16px;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 14px 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3C/svg%3E");
  }
  DIV.gallery-div {
    border: solid 1px gray;
    margin: 5px;
    width: 125px;
    float: left;
  }
  DIV.gallery-div IMG.gallery {
    height: 125px;
    width: 125px;
    max-height: 125px;
    max-width: 125px;
    align: center;
  }
  DIV.order-picture-div {
    border: solid 1px gray;
    margin: 5px;
    width: 500px;
    display: table;
    margin: 0 auto;
  }
  DIV.order-picture-div IMG.gallery {
    height: 500px;
    width: 500px;
    align: center;
  }
  SPAN.gallery-title {
    display: table;
    margin: 0 auto;
    text-align: center;
    font-weight: bold;
    word-break: break-all;
  }
  SPAN.gallery-description {
    display: table;
    margin: 0 auto;
    text-align: center;
  }
  #busy {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: var(--text-secondary);
    opacity: 0.4;
    color: white;
    text-align: center;
    padding-top: 20%;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 3px 3px 3px black;
  }
  BODY .field-pair TABLE.edit-fabrics TH {
    text-align: center;
  }
  BODY .field-pair TABLE.edit-fabrics TD {
    padding: 2px;
  }
  BODY .field-pair TABLE.edit-fabrics TD.tool {
    width: 1px;
  }
  TABLE.purchase-report TR.separator {
    font-weight: bold;
  }
  TABLE.purchase-report TR.fabric TD:nth-child(1), TABLE.purchase-report TR.item TD:nth-child(1) {
    padding-left: 20px;
  }
  table#notes-table TR.bottom TD {
    background-color: white;
  }
  table#notes-table TR.client-note TD {
    background-color: #FF7878;
  }
  table#notes-table TR.top {
    background-color: #ffe;
  }
  DIV.note-doc {
    margin-bottom: 2px;
    padding: 3px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
  }
  .resolvable {
    background-color: #FF7878;
  }
  TR.even TD {
    background-color: white;
  }
  TR.odd TD {
    background-color: #ffe;
  }
  a.asc {
    padding: 4px 18px 4px 14px;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 13px 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
  a.desc {
    padding: 4px 18px 4px 14px;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 13px 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6C62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
  }
  TABLE.list TR.totals TD {
    font-weight: bold;
    border-top: 1px solid black;
    background: var(--bg-secondary);
  }
  TABLE.commission TR :nth-child(4) {
    text-align: right;
  }
  TABLE.commission TR :nth-child(5) {
    text-align: right;
  }
  TABLE.commission TR :nth-child(6) {
    text-align: right;
  }
  TABLE.commission TR :nth-child(7) {
    text-align: right;
  }
  TABLE.commission TR :nth-child(8) {
    text-align: right;
  }
  TABLE#commission-items TR :nth-child(4) {
    text-align: right;
    font-weight: bold;
  }
  TABLE#commission-items TR :nth-child(4) {
    text-align: right;
  }
  TABLE#commission-items TR :nth-child(5) {
    text-align: right;
  }
  TABLE#commission-items TR :nth-child(6) {
    text-align: right;
  }
  TABLE#commission-items TR :nth-child(7) {
    text-align: right;
  }
  TABLE#commission-items TR :nth-child(8) {
    text-align: right;
    font-weight: bold;
  }
  TABLE#commission-items TR :nth-child(9) {
    text-align: right;
    font-weight: bold;
  }
  TABLE#commission-items TR :nth-child(10) {
    text-align: right;
    padding-right: 12px;
  }
  .bottom-line {
    border-bottom: 2px solid black;
  }
  .barcode-row {
    width: 15%;
    text-align: center;
    verticle-align: center;
    padding: 10px;
  }
  .barcode-order-row {
    width: 25%;
    text-align: center;
    verticle-align: center;
    padding: 5px;
  }
  /* Explanatory text inside an sfr form — a note about the fields around it, not
     a control. Rendered through label_and_value with an empty label so it lands
     in the field column; a bare <p> between fields sits flush at the form's left
     edge, 150px out from everything it is describing. */
  .form-field-note td {
    color: var(--text-secondary);
  }
  /* Helper text under a heading, introducing the table or section below it
     (factory_runs/edit, items/_production_routing). Used in the markup since
     before this rule existed, so until now it rendered as plain body copy. */
  p.hint {
    margin: 4px 0 10px;
    color: var(--text-secondary);
    font-size: 12px;
    max-width: 60em;
  }
}
@layer components {
  .cadwf-search-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .qr-top-bar.cadwf-top-bar {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .qr-top-bar-search.cadwf-search {
    flex: 1 1 100%;
    max-width: none;
    order: 4;
  }
  .cadwf-search form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .qr-top-bar-search.cadwf-search input[type=text] {
    width: 240px;
    padding-left: 12px;
  }
  .cadwf-top-bar .qr-top-bar-actions {
    flex-wrap: wrap;
  }
  .cadwf-detail {
    border-left: 3px solid var(--border-light);
    background: var(--bg-secondary);
    margin: 0 12px 10px;
  }
  .cadwf-detail > summary {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
  }
  .cadwf-detail[open] {
    border-left-color: var(--accent-walnut);
  }
  .cadwf-item-panel {
    padding: 12px 16px 18px;
  }
  .cadwf-items-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
  }
  .cadwf-items-table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    text-align: left;
  }
  .cadwf-items-table th, .cadwf-items-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-light);
  }
  .cadwf-item-status-form {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .cadwf-item-status-form select {
    max-width: 230px;
    padding: 7px;
  }
  .cadwf-review-note {
    padding: 10px 12px;
    border-left: 3px solid var(--accent-brass-light);
    background: var(--bg-primary);
  }
  .cadwf-rollup {
    font-size: 12px;
    font-weight: 600;
  }
  .cadwf-review {
    color: var(--accent-brass);
  }
  .cadwf-instructions {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 12px;
  }
  .cadwf-request-heading {
    padding: 14px 16px 0;
    margin: 0;
    font-size: 14px;
  }
  .cadwf-empty {
    padding: 40px !important;
    text-align: center;
  }
  .cadwf-item-list .cadwf-item-type {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 2px;
  }
  .cadwf-item-list > tbody > .cadwf-item-row > td {
    padding: 10px 14px;
  }
  .cadwf-item-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
  .cadwf-item-list {
    min-width: 1360px;
  }
  .cadwf-item-list .qr-col-head {
    top: 0;
  }
  .cadwf-item-list th:first-child {
    width: 90px;
  }
  .cadwf-item-list th:nth-child(2) {
    width: 190px;
  }
  .cadwf-item-list th:nth-child(3) {
    width: 170px;
  }
  .cadwf-item-list th:nth-child(4) {
    width: 240px;
  }
  .cadwf-item-list th:nth-child(5) {
    width: 130px;
  }
  .cadwf-item-list th:nth-child(6) {
    width: 270px;
  }
  .cadwf-item-list th:last-child {
    width: 250px;
  }
  .cadwf-item-list .cadwf-item-cell, .cadwf-item-list .cadwf-customer-cell,
  .cadwf-item-list .cadwf-project-cell, .cadwf-item-list .cadwf-person-cell {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .cadwf-item-list .cadwf-item-status-form {
    flex-wrap: nowrap;
  }
  .cadwf-item-list .cadwf-item-status-form {
    margin: 0;
  }
  .cadwf-item-detail-row[hidden] {
    display: none;
  }
  .cadwf-item-context {
    padding: 10px 14px;
    border-left: 3px solid var(--border-light);
    background: var(--bg-secondary);
    font-size: 12px;
  }
  @media (max-width: 800px) {
    .cadwf-item-status-form {
      flex-wrap: wrap;
    }
    .cadwf-items-table {
      min-width: 560px;
    }
    .cadwf-item-panel {
      overflow-x: auto;
    }
  }
  .cadwf-drag-hint {
    margin: 12px 14px 0;
    color: var(--text-secondary);
    font-size: 12px;
  }
  .cadwf-group-toggle {
    width: 100%;
    border: 0;
    border-left: 3px solid transparent;
    text-align: left;
  }
  .cadwf-group-label {
    position: sticky;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .cadwf-item-list tbody[hidden] {
    display: none;
  }
  .cadwf-item-row:not([draggable=true]) {
    cursor: default;
  }
  .cadwf-drag-grip {
    touch-action: none;
    user-select: none;
    cursor: grab;
    float: left;
    margin: 0 9px 0 -4px;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 32px;
  }
  .cadwf-item-list .qr-drop-target .qr-group-header-inner {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }
  .cadwf-item-assignee-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
  }
  .cadwf-bulk-assignment {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    font-size: 12px;
  }
  .cadwf-bulk-assignment label {
    margin: 0;
  }
  .cadwf-item-select {
    margin-right: 7px;
    vertical-align: middle;
  }
  .cadwf-selected-row > td {
    background: #fff4d7 !important;
  }
  .cadwf-bulk-assignment button:disabled, .cadwf-bulk-assignment input:disabled {
    opacity: 0.5;
    cursor: default;
  }
}
@layer components {
/* The catalogue picker (catalogue_picker/_picker, FB 43712): filters, a grid
   of cards (one per official variant, or an item with none) and a pager. */
.catalogue-picker-filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.catalogue-picker-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.catalogue-picker-filters input,
.catalogue-picker-filters select {
  width: 100%;
  box-sizing: border-box;
}
.catalogue-picker-error {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--status-rush);
}
.catalogue-picker-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.catalogue-picker-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.catalogue-picker-card:hover,
.catalogue-picker-card:focus-visible {
  border-color: var(--accent-walnut-light);
}
.catalogue-picker-card.is-picked {
  border-color: var(--accent-walnut);
  box-shadow: 0 0 0 1px var(--accent-walnut);
}
/* A card the host won't import from (the CADs tab's import: no CAD). */
.catalogue-picker-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.catalogue-picker-card:disabled:hover {
  border-color: var(--border-light);
}
.catalogue-picker-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin: 0 0 6px;
  border-radius: 4px;
  background: var(--row-stripe);
  overflow: hidden;
}
.catalogue-picker-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.catalogue-picker-sku { font-weight: 700; }
.catalogue-picker-program,
.catalogue-picker-variant { font-size: 11px; color: var(--text-secondary); }
.catalogue-picker-archived { font-size: 11px; color: var(--status-hold); }
.catalogue-picker-note { margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--status-open); }
.catalogue-picker-empty, .bom-import-loading { margin: 12px 0; color: var(--text-secondary); }
.catalogue-picker-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.catalogue-picker-pager.rb-pagination { padding: 0; }

/* Importar BOM: the Catálogo / Órdenes existentes tabs, the
   Órdenes existentes filters, scope banner and cards, and the picked BOM's
   preview under the pickers. */
.bom-import-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-width: 640px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--row-stripe);
}
.bom-import-tabs button {
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bom-import-tabs button[aria-selected="true"] { background: var(--accent-walnut); color: var(--text-inverse); }
.bom-import-tabs button:focus-visible { outline: 2px solid var(--accent-brass); outline-offset: 1px; }
.bom-import-order-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bom-import-order-filters .catalogue-picker-search,
.bom-import-order-filters .bom-import-so { grid-column: span 2; }
.bom-import-order-filters .bom-import-with-bom {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}
.bom-import-order-filters .bom-import-with-bom input { width: auto; }
.bom-import-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-primary);
}
.bom-import-scope p { margin: 0; }
.bom-import-scope-text { font-size: 14px; }
.bom-import-scope-hint { font-size: 11px; color: var(--text-secondary); }
.bom-import-line-qty { margin-top: 4px; font-size: 11px; }
.bom-import-modes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 8px; padding: 0; border: 0; }
.bom-import-modes label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.bom-import-already { margin: 0 0 6px; font-size: 12px; color: var(--status-hold); }
.bom-import-preview { max-height: 220px; margin: 0 0 10px; overflow: auto; border: 1px solid var(--border-light); border-radius: 6px; }
.bom-import-preview table { width: 100%; font-size: 12px; }
.bom-import-preview th { position: sticky; top: 0; background: var(--bg-card); }
.bom-import-preview .num { text-align: right; white-space: nowrap; }

@media (max-width: 900px) {
  .catalogue-picker-filters { grid-template-columns: 1fr 1fr; }
  .catalogue-picker-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bom-import-order-filters .catalogue-picker-search,
  .bom-import-order-filters .bom-import-so { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .catalogue-picker-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
}

/* select2's own theme (select2.css) is unlayered, so these overrides of it
   stay unlayered too. */
.bom-import-order-filters .select2-container .select2-selection--single {
  height: 36px;
  border-color: var(--border-light);
  border-radius: 6px;
}
.bom-import-order-filters .select2-container .select2-selection--single .select2-selection__rendered { line-height: 34px; font-size: 14px; font-weight: 400; }
.bom-import-order-filters .select2-container .select2-selection--single .select2-selection__arrow { height: 34px; }
@layer components {
/* Pages seen without a login (layouts/public): a slim header in the sidebar's colours instead of the staff chrome. */
.rb-public {
  margin: 0;
  background: var(--bg-primary);
}

.rb-public-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 24px;
  background: var(--sidebar-bg);
}

.rb-public-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sidebar-text-active);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.rb-public-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sidebar-text-active);
  opacity: 0.6;
}

/* The client's change order approval page. */
/* 15px, not the staff pages' 13px: clients read this once, often on a phone. */
.co-approval {
  font-size: 15px;
  max-width: 760px;
  margin: 32px auto;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.co-approval h1 {
  margin: 0 0 4px;
}

.co-order {
  margin: 0 0 20px;
  color: var(--text-secondary);
}

.co-heading {
  margin: 24px 0 8px;
  font-size: 1.25rem;
}

.co-was {
  color: var(--text-secondary);
  font-size: 0.85em;
  white-space: nowrap;
}

.co-was::before { content: "("; }
.co-was::after { content: ")"; }

.co-cost {
  padding: 16px 18px;
  border-left: 4px solid var(--status-hold);
  border-radius: var(--radius-md);
  background: var(--status-hold-bg);
}

.co-cost p {
  margin: 0 0 4px;
}

.co-cost-net {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--status-hold);
}

.co-cost-net.co-cost-down,
.co-cost-net.co-cost-none {
  color: var(--status-open);
}

.co-cost-total {
  font-size: 1.05rem;
}

.co-cost-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.co-cost-deposit {
  margin-top: 8px;
}

.co-lines,
.co-totals {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.co-lines th,
.co-totals thead th {
  padding: 8px;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-light);
}

.co-lines td {
  padding: 10px 8px;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light);
}

.co-lines .co-num,
.co-totals .co-num {
  text-align: right;
}

.co-net {
  font-weight: 700;
}

.co-detail {
  margin-top: 2px;
  font-size: 0.85rem;
}

.co-header-changes {
  margin: 0;
  padding-left: 20px;
}

.co-totals {
  max-width: 360px;
  margin: 20px 0 0 auto;
}

.co-totals tbody th,
.co-totals td {
  padding: 4px 8px;
  text-align: left;
  font-weight: normal;
}

.co-totals-total th,
.co-totals-total td {
  font-weight: 700;
  border-top: 2px solid var(--border-light);
}

.co-pdf {
  margin: 24px 0 0;
}

.co-approve {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.co-done {
  margin: 0 0 20px;
  padding: 10px 14px;
  border-left: 4px solid var(--status-open);
  border-radius: var(--radius-md);
  background: var(--status-open-bg);
  color: var(--status-open);
  font-weight: 600;
}

.co-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0;
  max-width: 640px;
}

.co-agree input {
  margin-top: 4px;
  flex-shrink: 0;
}

.co-submit {
  min-height: 44px;
}

/* A refused send or approval: inline and persistent, as .esig-errors (not .rb-flash, which hides itself). */
.co-errors {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid rgba(127, 29, 34, 0.2);
  border-radius: var(--radius-md);
  background: var(--status-rush-bg);
  color: var(--status-rush);
  font-weight: 600;
}

.co-warning {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--status-hold-bg);
  color: var(--status-hold);
  font-weight: 600;
}

.co-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  max-width: 640px;
}

.co-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.co-field .pretty {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  box-sizing: border-box;
}

.co-field textarea.pretty {
  height: auto;
}

.co-field .hint {
  margin: 0;
}

.co-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Staff: the change order page's Online approval list. */
.co-online-approval {
  margin-top: 24px;
}

.co-online-approval .rb-section-header {
  margin-bottom: 10px;
}

.co-online-approval .rb-section-header h3 {
  margin: 0;
}

.co-errors ul {
  margin: 0;
  padding-left: 18px;
}

.co-contact {
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* A phone: each changed line becomes a card, its figures one per row with their label. */
@media (max-width: 600px) {
  .co-approval {
    margin: 0;
    padding: 16px;
    border-radius: 0;
    box-shadow: none;
  }

  .co-lines thead {
    display: none;
  }

  .co-lines,
  .co-lines tbody,
  .co-lines tr,
  .co-lines td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .co-lines tr {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  }

  .co-lines td {
    padding: 4px 0;
    border: 0;
  }

  .co-lines td[data-label] {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }

  .co-lines td[data-label] .co-change-value {
    text-align: right;
  }

  .co-lines td[data-label]::before {
    content: attr(data-label);
    color: var(--text-secondary);
    text-align: left;
  }

  .co-lines td.co-net {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }

  .co-totals {
    max-width: none;
  }
}
}
@layer components {
  .master-schedule.completed-runs .cr-years {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }
  .master-schedule.completed-runs .cr-weeks {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    padding-bottom: 6px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
  }
  .master-schedule.completed-runs .cr-year, .master-schedule.completed-runs .cr-week, .master-schedule.completed-runs .cr-step {
    display: inline-block;
    flex: none;
    padding: 5px 12px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary);
    font: 700 12px/1.2 var(--font-body);
    text-decoration: none;
  }
  .master-schedule.completed-runs .cr-year:hover, .master-schedule.completed-runs .cr-week:hover, .master-schedule.completed-runs a.cr-step:hover {
    background: var(--row-stripe);
  }
  .master-schedule.completed-runs .cr-year[aria-current], .master-schedule.completed-runs .cr-week[aria-current] {
    background: var(--accent-walnut);
    border-color: var(--accent-walnut);
    color: var(--text-inverse);
  }
  .master-schedule.completed-runs .cr-week-empty {
    color: var(--text-tertiary);
    font-weight: 600;
  }
  .master-schedule.completed-runs .cr-week-empty[aria-current] {
    color: var(--text-inverse);
  }
  .master-schedule.completed-runs .cr-step-off {
    opacity: 0.35;
  }
  .master-schedule.completed-runs .cr-estimated {
    color: var(--text-secondary);
    text-decoration: underline dotted;
    cursor: help;
  }
  .master-schedule.completed-runs .cr-nomatch {
    margin: 0 0 12px;
    color: var(--text-secondary);
  }
  .master-schedule.completed-runs .cr-reopen {
    margin-top: 4px;
  }
  .master-schedule.completed-runs .cr-reopen .rb-btn {
    padding: 2px 8px;
    font-size: 10px;
  }
  .master-schedule.completed-runs tbody[hidden] {
    display: none;
  }
  .master-schedule.completed-runs .ms-main {
    grid-template-columns: minmax(0, 1fr);
  }
}
@charset "UTF-8";
@layer components {
  /* Costing worksheets — the ledger (see app/javascript/controllers/costing_form_controller.js
     and app/views/costing_worksheets/_ledger.html.erb) and its EN/ES toggle
     (app/views/costing_worksheets/_locale_toggle.html.erb).

     Reuses the app's existing CSS custom properties (defined on :root in
     design_system/tokens.scss) rather than introducing new colors: --border-light /
     --radius-sm for the table, --bg-secondary to shade the read-only computed
     cells against --bg-card, and the same --status-rush / --status-rush-bg pair
     .rb-flash-alert already uses for an attention-worthy message, so the
     stale-results notice reads as the same "something needs your attention"
     signal the rest of the app already uses — just scoped to sit inline next to
     the ledger instead of as a page-wide banner. */
  /* Capped rather than full-width, same reasoning as before the rework: a label
     has to sit close enough to its figure to be read as a pair, and a wide
     screen strands them apart otherwise. */
  .costing-ledger {
    width: 100%;
    max-width: 40rem;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
  .costing-ledger th,
  .costing-ledger td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: middle;
  }
  .costing-ledger th {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .costing-ledger tbody tr:last-child th,
  .costing-ledger tbody tr:last-child td {
    border-bottom: none;
  }
  /* A section banner row — where the sheet itself breaks into ENVIO Y COSTO...,
     TARIFF..., and the scenario's markup block. Spans the full row so it reads
     as a divider between blocks, not another line item. */
  .costing-ledger tr.costing-banner th {
    padding-top: 0.9rem;
    padding-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--accent-walnut);
    border-bottom: 2px solid var(--border-medium);
    white-space: normal;
  }
  /* A running total — the figure every row above it in that block rolls up to
     (TOTAL BURDEN FACTORY COST, MEXICO COST INCLUDING TARIFF). Reads as a
     subtotal, matching the weight the old .costing-total row had. */
  .costing-ledger tr.costing-total th,
  .costing-ledger tr.costing-total td {
    font-weight: 700;
    border-top: 2px solid var(--border-light);
  }
  /* A server-computed, read-only figure sitting inline with editable input
     cells in the same row — shaded so its non-editability is visible without
     reading the row, the same way a spreadsheet greys a formula cell apart
     from an input cell. */
  .costing-ledger td.costing-computed {
    background: var(--bg-secondary);
    font-variant-numeric: tabular-nums;
  }
  /* Each row reads left to right as "input × factor = total", so the numbers
     sit in two right-aligned stacks: what you type, and what the sheet works
     out. Every total lands in .costing-amount at the right edge — no cell in
     either column spans, or a colspan'd figure would right-align against the
     table edge instead of against its column and break the stack exactly at the
     rows that matter most. */
  .costing-ledger td.costing-input,
  .costing-ledger td.costing-amount,
  .costing-ledger td.costing-percent {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  /* min-width, not width: under auto table layout `width` is only a suggestion,
     so a column of placeholders would still render hairline-thin and then shove
     the ledger sideways the moment the first figure was computed. min-width is
     honoured, so both columns hold their size from the first render. */
  .costing-ledger td.costing-input,
  .costing-ledger td.costing-amount {
    min-width: 7.5rem;
    white-space: nowrap;
  }
  /* The digits inside an editable cell have to line up with the figures above
     and below it, not just the input box itself. */
  .costing-ledger td.costing-input input[type=number],
  .costing-ledger td.costing-input input[type=text] {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  /* The card picker is a select, not a number: wide enough for "Amex (3.5%)". */
  .costing-ledger td.costing-input select.costing-card-type {
    width: 9rem;
    max-width: 100%;
  }
  .costing-ledger td.costing-input .costing-card-differs {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    white-space: normal;
  }
  .costing-ledger td.costing-percent {
    color: var(--text-tertiary);
    font-size: 0.85rem;
  }
  .costing-ledger td.costing-factor {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
  }
  /* Every editable cell in the ledger sits beside its label and, often, beside
     a computed figure and a percentage on the same row — a full-width input
     would crowd all of that out. */
  .costing-ledger input[type=number],
  .costing-ledger input[type=text] {
    width: 5.5rem;
  }
  /* The reps' commission and the order's rebate above the ledger
     (_order_commission.html.erb, _order_rebate.html.erb). */
  .costing-order-commission,
  .costing-order-rebate {
    margin: 0 0 1rem;
    font-size: 0.9rem;
  }
  .costing-order-commission p,
  .costing-order-rebate p {
    margin: 0 0 0.5rem;
  }
  .costing-order-commission .costing-order-commission-reps {
    color: var(--text-secondary);
  }
  .costing-order-commission a.icon,
  .costing-order-rebate a.icon {
    margin-left: 0.75rem;
  }
  .costing-results-notice {
    margin: 0 0 1rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 0.85rem;
    font-weight: 600;
  }
  /* .legacy-content sets `overflow-x: auto` so wide sfr-ui views can scroll
     sideways, and that quietly computes overflow-y to `auto` too — making it a
     scroll container, and the nearest scrollport for anything sticky inside it.
     It never actually scrolls (its height is content-driven; the page scrolls on
     <body>), so a sticky descendant would resolve against a scrollport that
     never moves and simply never stick. Restored to `visible` on the costing
     pages only — nothing here is wide enough to have wanted the sideways scroll,
     and body's own `overflow-x: hidden` is still the backstop. */
  .legacy-content:has(.costing-costable) {
    overflow: visible;
  }
  /* The costable header (app/views/costing_worksheets/_costable.html.erb) —
     what this worksheet prices, shown above the ledger on every costing page.
     Wider than the ledger's 40rem, unlike the rest of the page: it carries the
     piece's dimensions and spec sheet alongside the thumbnail now, and squeezing
     three regions into the ledger's column would stack them into a wall. Regions
     wrap (and the spec grid drops columns) below that, so a narrower viewport
     reflows rather than overflowing.

     Frozen under the app's own sticky top bar, so the piece being costed — its
     image, dimensions and specs — stays readable the whole way down a ledger
     that runs several screens long. z-index below .rb-top-bar's 50 so the bar
     still covers it, above the ledger so rows pass underneath rather than
     through — which only works because the background is opaque. */
  .costing-costable {
    position: sticky;
    top: var(--header-height);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.6rem 1.25rem;
    max-width: 64rem;
    margin-bottom: 1rem;
    padding: 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    /* Ledger rows pass UNDER this block once it is pinned, and they meet its
       bottom edge mid-row. The shadow puts the card visibly in front of them, so
       that reads as one thing overlapping another rather than as a row that has
       been cut in half. */
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.35);
  }
  /* Each region names itself, or the dimensions and the specs run together as
     one undifferentiated block of small text. */
  .costing-costable-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  /* Identity (number + description) sits narrow; the spec sheet takes what is
     left. min-width: 0 on both, or a long description or spec value would refuse
     to wrap and push the card past its max-width. */
  .costing-costable-facts {
    flex: 1 1 12rem;
    min-width: 0;
  }
  .costing-costable-specs {
    flex: 2 1 18rem;
    min-width: 0;
  }
  .costing-costable-dimensions {
    margin-top: 0.5rem;
  }
  .costing-costable-quantity {
    margin-top: 0.5rem;
  }
  /* Set larger than everything else in the card on purpose: the ledger below
     costs and prices exactly ONE of the piece, so how many are being made is the
     figure a reader has to carry with them and the one thing here that is not
     already implied by the drawing and the specs. */
  .costing-costable-quantity-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
  }
  /* Starting the first worksheet (app/views/costing_worksheets/_new_worksheet_buttons.html.erb).
     Full-size buttons under the header rather than toolbar items, so the page's
     only available action looks like one. Matches the header's width so the two
     share an edge, and wraps when the order's type maps to no rate row and every
     type is offered at once. */
  .costing-new-worksheets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 64rem;
    margin-bottom: 1rem;
  }
  /* Bigger than the app's default .rb-btn, which is sized for a row of actions
     sitting beside content — these stand alone. Scoped to this block so nothing
     else picks the size up. */
  .costing-new-worksheets .rb-btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
  }
  /* Measurements read as a row of discrete figures, not as a sentence — each one
     is looked up individually ("what's the seat height?"), so they get spacing
     of their own rather than a separator to scan past. */
  .costing-costable-dimension-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
  }
  /* The space between an abbreviation and its figure is a real one in the markup,
     not margin alone: "W 20"" is what should land in the clipboard (and in a
     screen reader) when someone copies a dimension out of here. */
  .costing-costable-dimension-abbreviation {
    font-weight: 600;
    color: var(--text-tertiary);
  }
  /* The line's fabric yardage, under the dimensions and set the same way: a row
     of figures, each introduced by its placement. */
  .costing-costable-yardage {
    margin-top: 0.5rem;
  }
  .costing-costable-yardage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
  }
  .costing-costable-yardage-placement {
    font-weight: 600;
    color: var(--text-tertiary);
  }
  /* Label over value, in as many columns as the region is wide enough for, so a
     dozen specs fit in the height of a few lines.
     Grid rather than CSS `columns`: multi-column layout answers a height limit by
     spilling into FURTHER columns off to the side, so a capped multicol spec
     sheet hides its overflow sideways behind a horizontal scrollbar instead of
     scrolling down through it. Grid flows row by row and scrolls the way the cap
     below intends. */
  .costing-costable-spec-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.35rem 1.25rem;
    margin: 0;
    font-size: 0.8rem;
    /* A line can carry a dozen-plus fields and this block is sticky — without a
       ceiling the spec sheet alone would take the screen the ledger needs. */
    max-height: 8.5rem;
    overflow-y: auto;
  }
  .costing-costable-spec-list dt {
    color: var(--text-tertiary);
  }
  .costing-costable-spec-list dd {
    margin: 0;
    color: var(--text-primary);
  }
  /* The thumbnail is wrapped in an <a> (link_to_modal) — an inline element by
     default, whose line-box adds descender space below the 60px image and leaves
     the anchor taller than the picture it holds. Block-level makes it size
     exactly to its image, so it lines up with the text beside it. */
  .costing-costable a {
    display: block;
  }
  .costing-costable-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }
  .costing-costable-number {
    font-weight: 600;
  }
  .costing-costable-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
  }
  /* The line's "Item Notes", full-width under the thumb/facts/specs row —
     flex-basis 100% forces the wrap. */
  .costing-costable-note {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
  }
  /* pre-line: the note is typed into a textarea on the order line, and its line
     breaks are its structure.

     Uncapped, unlike the spec list beside it. A 5rem scroll box here clipped
     ~2-5% of real notes (up to 9 lines hidden, worst case 45% of the note
     visible), and its only affordance was an inner scrollbar that macOS draws
     only while scrolling — so a clipped note read as a complete one, which is
     the opposite of what a note like "COM only" is on the page to do. A spec
     value that gets cut off is still looked up by name; a truncated sentence
     silently changes what it says. */
  .costing-costable-note-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
  }
  /* The order line's pricing note (app/views/costing_worksheets/_pricing_note.html.erb),
     sitting between the costable header and the ledger. Matches the ledger's
     width so the whole page reads as one column. */
  .costing-pricing-note {
    max-width: 40rem;
    margin-bottom: 1rem;
  }
  .costing-pricing-note textarea {
    width: 100%;
    box-sizing: border-box;
  }
  .costing-pricing-note-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
  }
  .costing-pricing-note p {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
  }
  /* The yardage and BOM PLANTILLA link, under the pricing note
     (app/views/costing_worksheets/_recorded_fields.html.erb). Same width and
     rhythm as the note above it, so the two read as one block of things recorded
     about the piece rather than two unrelated ones. */
  .costing-recorded-fields {
    max-width: 40rem;
    margin-bottom: 1rem;
  }
  .costing-recorded-fields p {
    margin: 0.2rem 0 0;
  }
  /* Matches .costing-pricing-note-label — the read-only pages set these two
     blocks' headings in the same voice. */
  .costing-recorded-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    margin-top: 0.6rem;
  }
  /* sfr sizes .pretty off the `size` attribute, leaving a ~150px box adrift in a
     40rem column. The yardage keeps a narrower box on purpose — it is a two- or
     three-digit figure, and a full-width input over "18.5" reads as a text area. */
  .costing-recorded-fields input[type=text] {
    width: 100%;
    box-sizing: border-box;
  }
  .costing-recorded-fields input[type=number] {
    width: 10rem;
    box-sizing: border-box;
  }
  /* The page heading with the client beside it
     (app/views/costing_worksheets/_heading.html.erb). Baseline-aligned so the
     name sits on the heading's line rather than floating at its middle, and
     wrapping under it when a long heading and a long client name will not share
     one line. */
  .costing-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
  }
  .costing-heading-client {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
  }
  /* Same voice as the header's region labels (.costing-costable-label), inline. */
  .costing-heading-client-label {
    margin-right: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  /* Trail back to the order or estimate (app/views/costing_worksheets/_breadcrumbs.html.erb). */
  .costing-breadcrumbs {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
  }
  .costing-breadcrumbs span {
    margin-left: 0.35rem;
  }
  /* A read-only echo of the value a rate is being applied to (the burden rate
     behind ENG & PROTYPING, the metal or frame cost behind a tariff). Styled as
     a figure, not as a field, so it never reads as something you can edit. */
  .costing-echo {
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
  }
  /* Evidence attached to one costing pass
     (app/views/costing_worksheets/_documents_fields.html.erb). Matches the
     ledger's width so the page keeps reading as one column. */
  .costing-documents {
    max-width: 40rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
  }
  .costing-documents legend {
    font-weight: 600;
    padding: 0 0.35rem;
  }
  .costing-documents-hint {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
  }
  .costing-documents-table {
    width: 100%;
  }
  /* sfr's .pretty text input sizes itself off the `size` attribute, which leaves
     the caption a ~150px box adrift in a 60%-wide column. Fill the cell instead,
     so the field lines up under its own heading. */
  .costing-documents-table td input[type=text] {
    width: 100%;
    box-sizing: border-box;
  }
  /* Headings sit left over their columns; without this they centre and stop
     pointing at the fields below them. */
  .costing-documents-table th {
    text-align: left;
  }
  .costing-document-name {
    flex-shrink: 0;
  }
  /* The read-only document list on Show
     (app/views/costing_worksheets/_documents.html.erb). */
  .costing-documents-list {
    max-width: 40rem;
    margin-top: 1.5rem;
  }
  .costing-documents-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .costing-document-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-light);
  }
  .costing-document-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }
  .costing-document-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
  }
  /* The Save/Cancel pair, rendered at both ends of the form
     (app/views/costing_worksheets/_form_actions.html.erb). Flex rather than the
     bare inline whitespace the markup used to rely on: Save is an INPUT and
     Cancel an A.button, two elements with different line-height and baseline, so
     side by side they sat a pixel or two off each other with a single space
     between them. */
  .costing-form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
  }
  /* Find-a-similar-BOM panel (app/views/costing_worksheets/_bom_panel.html.erb),
     sitting between the costable header and the form on New/Edit. Same width and
     card treatment as .costing-costable so the page still reads as one column of
     boxed sections, not a mix of framed and unframed blocks. */
  .bom-panel {
    max-width: 64rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
  }
  .bom-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
  }
  /* Heading carries the Hide/Show control, pushed to the far edge so the panel
     reads as one collapsible block rather than a heading with a stray button. */
  .bom-panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
  }
  /* The imported BOM collapses with a native <details> rather than a scripted
     toggle (it ships collapsed, so a JS-only opener would strand the section if
     the controller module ever failed to load). Everything below is what turns
     the default disclosure triangle into the same Hide/Show affordance the
     search half above it uses. */
  .bom-collapse > summary {
    list-style: none; /* Firefox */
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
  }
  .bom-collapse > summary::-webkit-details-marker {
    display: none;
  }
  /* Row count and reference total, hoisted out of the fold: the material cost
     inputs below are derived from them, so they have to read without opening. */
  .bom-collapse-summary {
    margin-left: 0.4rem;
    color: var(--text-tertiary);
    font-weight: normal;
  }
  .bom-collapse-label {
    color: var(--accent-walnut);
    font-size: 0.8rem;
    font-weight: normal;
  }
  /* One label is always hidden; which one is the disclosure's own state. */
  .bom-collapse[open] .bom-collapse-show,
  .bom-collapse:not([open]) .bom-collapse-hide {
    display: none;
  }
  /* Provenance / reference-total / save-note lines under the current BOM
     heading (app/views/costing_worksheets/_current_bom.html.erb). Same small,
     muted treatment as the rest of the read-only annotations on this page
     (.costing-echo, .costing-breadcrumbs). */
  .bom-provenance,
  .bom-reference-total,
  .bom-immediate-note {
    margin: 0.2rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .bom-reference-total {
    font-variant-numeric: tabular-nums;
  }
  .bom-immediate-note {
    color: var(--text-tertiary);
    font-style: italic;
  }
  /* Price-source and waste markers on a BOM table's Description cell
     (app/views/order_lines/_bom_table.html.erb). Small pills
     rather than plain text so they read as metadata about the row, not part
     of the description itself. */
  .bom-price-source,
  .bom-waste {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.7rem;
    font-size: 0.72rem;
    font-style: normal;
    white-space: nowrap;
    vertical-align: middle;
  }
  .bom-price-source.catalog {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .bom-price-source.imported {
    background: var(--bg-secondary);
    color: var(--text-secondary);
  }
  .bom-waste {
    background: var(--status-hold-bg);
    color: var(--status-hold);
    cursor: help;
  }
  /* Row-delete button on an editable BOM row (order_lines/_bom_table). */
  .bom-row-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.3rem;
  }
  .bom-row-delete:hover {
    color: var(--unfulfilled);
  }
  /* The one action left where the find-a-similar-BOM search used to be
     (app/views/costing_worksheets/_bom_panel.html.erb). Sized like the
     new-worksheet buttons rather than the toolbar links: on a line with no BOM
     yet this is the primary thing to do on the panel. */
  .bom-panel-find {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0.25rem;
  }
  /* Import from Catalogue (order_lines/_bom_import_button, ticket 21306): the
     section bars' walnut, as Vincent's mockup draws it above the table. */
  a.rb-btn.bom-import-button,
  a.rb-btn.bom-import-button:visited {
    background: var(--accent-walnut);
    border-color: var(--accent-walnut);
    color: var(--text-inverse);
  }
  a.rb-btn.bom-import-button:hover,
  a.rb-btn.bom-import-button:focus-visible {
    filter: brightness(1.15);
    color: var(--text-inverse);
  }
  /* ---------------------------------------------------------------------------
     The BOM table (app/views/order_lines/_bom_table.html.erb), drawn by the
     full-page BOM editor (edit_bom.html.erb, _bom_editor.html.erb) and by the
     costing pages' Current BOM panel (ticket 21304) -- a row means the same
     thing on both screens, so it looks the same on both.
     --------------------------------------------------------------------------- */
  .bom-editor-head h2 {
    margin: 1.2rem 0 0.2rem;
  }
  .bom-editor-count {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
  }
  .bom-editor-provenance {
    margin: 0.2rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .bom-editor-source {
    margin: 0.4rem 0 0.6rem;
  }
  .bom-editor-variant {
    margin: 0 0 0.4rem;
  }
  .bom-editor-source-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1.5rem;
  }
  .bom-editor-source-row > .bom-import-button {
    margin-top: 0.15rem;
  }
  .bom-editor-source-row > .bom-import-button + .bom-plantilla {
    border-left: 1px solid var(--border-medium);
    padding-left: 1.5rem;
  }
  .bom-plantilla {
    min-width: 0;
  }
  .bom-plantilla-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
  }
  .bom-plantilla-icon {
    flex: none;
    color: var(--text-secondary);
  }
  .bom-plantilla-text {
    min-width: 0;
  }
  .bom-plantilla-label {
    font-weight: 600;
  }
  .bom-plantilla-file {
    overflow-wrap: anywhere;
  }
  .bom-plantilla-change summary {
    display: inline;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .bom-plantilla-change-first summary {
    display: none;
  }
  .bom-plantilla-file + .bom-plantilla-change {
    display: inline;
    margin-left: 0.5rem;
  }
  .bom-plantilla-change[open] {
    display: block;
    margin-left: 0;
  }
  .bom-plantilla-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.35rem 0 0;
  }
  .bom-plantilla-form input[name=plantilla_url] {
    width: 28rem;
    max-width: 100%;
  }
  .bom-plantilla-reimport {
    margin: 0;
  }
  .bom-plantilla-status,
  .bom-plantilla-notice {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .bom-plantilla-status.error,
  .bom-plantilla-error {
    color: var(--unfulfilled);
  }
  .bom-plantilla-error {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
  }
  .bom-editor-locked {
    margin: 0.4rem 0 0.6rem;
    color: var(--unfulfilled);
  }
  .bom-editor-empty td {
    padding: 0.9rem 0.5rem;
    color: var(--text-secondary);
    font-style: italic;
  }
  /* Column widths, so the table doesn't rebalance itself every time a re-render
     swaps a longer description in. Percentages rather than pixels: the page is
     read on laptops and on the shop floor's wider screens. */
  /* These sum to 100 WITH the section column. They did before it existed too --
     adding a column without taking the width from somewhere left section at 74px
     and its select clipped to "FRAM...", because the browser scales an
     over-100% set down proportionally. Keep the total at 100 when editing. */
  /* CAD (Acc.) (ticket 21517) sits after the part number: a checkbox on
     INSTALLATION rows, empty elsewhere, so it is as narrow as its short heading
     ("CAD" over "(ACC.)", which may wrap; the full name is the heading's title).
     Its 5% came a point each from Description, UM, Unit Cost, Total and the
     remove column. */
  .bom-editor-list .bom-col-part {
    width: 14%;
  }
  .bom-editor-list .bom-col-cad {
    width: 5%;
    text-align: center;
    padding-left: 2px;
    padding-right: 2px;
  }
  .bom-editor-list .bom-col-desc {
    width: 20%;
  }
  .bom-editor-list .bom-col-um {
    width: 6%;
  }
  .bom-editor-list .bom-col-qty {
    width: 9%;
    text-align: right;
  }
  .bom-editor-list .bom-col-waste {
    width: 8%;
    text-align: right;
  }
  .bom-editor-list .bom-col-price {
    width: 10%;
    text-align: right;
  }
  .bom-editor-list .bom-col-total {
    width: 10%;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .bom-editor-list .bom-col-section {
    width: 14%;
  }
  .bom-editor-list .bom-col-tool {
    width: 4%;
  }
  .bom-editor-list th.bom-col-cad {
    white-space: normal;
  }
  .bom-editor-list .bom-cad-input {
    margin: 0;
    vertical-align: middle;
  }
  /* The costing panel is capped at 64rem (.bom-panel), where 14% of it clips a
     section select to "EXPOSED WOOI". It takes the room from Part and
     Description, and still sums to 100. */
  .bom-panel .bom-editor-list .bom-col-part {
    width: 13%;
  }
  .bom-panel .bom-editor-list .bom-col-desc {
    width: 17%;
  }
  .bom-panel .bom-editor-list .bom-col-section {
    width: 18%;
  }
  /* A catalogue variant's BOM page (ticket 21307) adds KANBAN and Catalog, which
     the catalogue's BOM has always shown. They take their room from Description
     and Section, and the row still sums to 100. */
  .bom-variant-editor .bom-editor-list .bom-col-part {
    width: 11%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-kanban {
    width: 9%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-desc {
    width: 15%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-qty {
    width: 8%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-waste {
    width: 7%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-price {
    width: 10%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-total {
    width: 9%;
  }
  .bom-variant-editor .bom-editor-list .bom-col-catalog {
    width: 5%;
    text-align: center;
  }
  .bom-variant-editor .bom-editor-list .bom-col-section {
    width: 11%;
  }
  /* The item's rows on a variant's BOM: shared by every variant of the item, so
     edged and labelled in blue, and a change asks first (data-bom-confirm). The
     edge rather than a tint: the list's own zebra background wins over a tint. */
  .bom-editor-list tr.bom-row-shared > td:first-child {
    box-shadow: inset 3px 0 0 var(--status-shipped);
  }
  .bom-shared-marker {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.7rem;
    font-size: 0.72rem;
    font-style: normal;
    white-space: nowrap;
    vertical-align: middle;
    background: var(--status-shipped-bg);
    color: var(--status-shipped);
    cursor: help;
  }
  .bom-variant-note {
    margin: 0.2rem 0 0.5rem;
    max-width: 60rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  /* Every cell is an input, and they carry .pretty so they read as the same
     control as a field anywhere else in the app -- outlined, white, walnut focus
     ring. An earlier draft here left them borderless until hover, on the theory
     that forty outlined boxes would read as chrome rather than as a table; in
     the app's own idiom an editable field looks editable, and a box you cannot
     see is a box nobody types in. .pretty owns the border, radius, focus and
     disabled treatment; only the sizing belongs to the table. */
  .bom-editor-list .bom-field {
    width: 100%;
    padding: 0.25rem 0.4rem;
    height: 28px;
  }
  .bom-editor-list .bom-qty-input,
  .bom-editor-list .bom-price-input,
  .bom-editor-list .bom-waste-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  /* The part cell reads as the part number first; Change is the affordance that
     swaps in the catalog picker, and stays quiet until the row is hovered. */
  /* It wraps: beside a number it would squeeze, Change drops under it. The cell
     can then be as narrow as the number alone, which is the room the CAD
     column needs on a 1024px screen, where the table has no slack at all. */
  .bom-part-display {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.4rem;
  }
  .bom-part-number {
    font-variant-numeric: tabular-nums;
  }
  .bom-part-change {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-walnut);
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0;
  }
  .bom-editor-list tr:hover .bom-part-change,
  .bom-part-change:focus {
    opacity: 1;
  }
  .bom-price-source.manual {
    background: var(--status-shipped-bg);
    color: var(--status-shipped);
  }
  /* Add-a-material form. A row of labelled fields rather than a placeholder-only
     strip: it has a part search in it, and a bare select2 with no label beside
     four bare inputs reads as a filter bar. */
  .bom-editor-add {
    margin-top: 1rem;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-subtle);
  }
  .bom-editor-add h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
  }
  .bom-editor-add form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.6rem;
  }
  .bom-add-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  .bom-add-field label {
    font-size: 0.75rem;
    color: var(--text-secondary);
  }
  .bom-add-field input {
    padding: 0.25rem 0.4rem;
    height: 30px;
  }
  .bom-add-narrow input {
    width: 6rem;
  }
  .bom-add-field input[type=text] {
    min-width: 14rem;
  }
  .bom-editor-hint {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: var(--text-tertiary);
  }
  /* See the comment on .bom-editor-costable in order_lines/_bom_page_header:
     the shared costable header pins itself to the top on the costing worksheet
     pages, and the BOM editor page cannot afford the height. */
  .bom-editor-costable .costing-costable {
    position: static;
  }
  /* Title row on the BOM editor page. */
  .bom-page-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.9rem;
  }
  /* ---------------------------------------------------------------------------
     BOM section bars (order_lines/_bom_section, ticket 21305). A solid walnut
     bar spanning the table opens each section -- FRAME, EXPOSED WOOD, METAL,
     UPHOLSTERY, INSTALLATION, PACKAGING -- with a chevron that shows or hides
     it, the section's name, and its total cost of materials on the right.

     Rendered only when a BOM actually has sections: every row imported before
     they existed comes back as one unlabelled group, which is the flat table
     those pages always showed.
     --------------------------------------------------------------------------- */
  tr.bom-section-row th.bom-section-cell,
  tr.bom-section-row:hover th.bom-section-cell {
    padding: 0;
    border-top: 3px solid var(--bg-card);
    background: var(--accent-walnut);
    color: var(--text-inverse);
    font-size: 0.85rem;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
  }
  .bom-section-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
  }
  /* Show/hide per section (bom_sections_controller.js): a collapsed section
     keeps its bar, total included, and hides its rows. */
  tbody.bom-section.collapsed > tr:not(.bom-section-row) {
    display: none;
  }
  .bom-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }
  /* The chevron: pointing down while open, right while collapsed. */
  .bom-section-toggle::before {
    content: "";
    width: 0.45em;
    height: 0.45em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15em) rotate(45deg);
    transition: transform 0.15s;
  }
  tbody.bom-section.collapsed .bom-section-toggle::before {
    transform: rotate(-45deg);
  }
  .bom-section-toggle:focus-visible {
    outline: 2px solid var(--accent-brass-light);
    outline-offset: 3px;
  }
  .bom-section-count {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.75;
  }
  .bom-section-total {
    margin-left: auto;
    padding-left: 0.75rem;
    border-left: 1px solid currentColor;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
  }
  .bom-section-total strong {
    margin-left: 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .bom-section-tools {
    display: flex;
    gap: 0.5rem;
    margin: 0.3rem 0;
  }
  .bom-section-tool {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-walnut);
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
  }
  /* The BOM's total under its sections, lined up under the Total column. */
  .bom-total td {
    border-top: 2px solid var(--border-light);
    font-weight: 700;
  }
  .bom-total-label,
  .bom-total-amount {
    text-align: right;
  }
  .bom-total-amount {
    font-variant-numeric: tabular-nums;
  }
  /* The Waste % cell (FB 21224): the row's figure, an "override" pill when it
     differs from the part's, or the uplift an imported total implies. */
  .bom-waste-value.implied,
  .bom-waste-value.none {
    color: var(--text-tertiary);
    cursor: help;
  }
  .bom-waste-value.none {
    cursor: default;
  }
  .bom-waste-flag {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 0.7rem;
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-size: 0.7rem;
    cursor: help;
  }
  /* The editor's per-row section picker. Its column width lives with the other
     .bom-col-* rules above, so they can be kept summing to 100 in one place. */
  .bom-editor-list .bom-section-select {
    width: 100%;
    padding: 0.25rem 0.3rem;
    height: 28px;
    font-size: 0.8rem;
  }
  /* The order line's fabrics at the top of a BOM's UPHOLSTERY section (ticket
     21515, order_lines/_bom_fabric_rows): read-only rows drawn from the line's
     fabrics. Edged and labelled so they read as deliberately not editable. */
  .bom-editor-list tr.bom-fabric-row > td:first-child,
  .bom-materials-list tr.bom-fabric-row > td:first-child {
    box-shadow: inset 3px 0 0 var(--text-tertiary, #999);
  }
  .bom-materials-list tr.bom-fabric-row .bom-col-qty,
  .bom-materials-list tr.bom-fabric-row .bom-col-waste,
  .bom-materials-list tr.bom-fabric-row .bom-col-price,
  .bom-materials-list tr.bom-fabric-row .bom-col-total {
    text-align: right;
  }
  /* A fabric received in many lots carries many control numbers (21 at most
     so far): the list wraps between numbers, never inside one, and is capped
     so it cannot widen the Part # column of an auto-layout table. */
  .bom-fabric-part {
    display: block;
    max-width: 16em;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .bom-fabric-number {
    display: inline-block;
    white-space: nowrap;
  }
  .bom-fabric-pending {
    display: block;
    color: var(--text-tertiary);
    font-style: italic;
  }
  /* "Order line fabric": the words stay together, a pill after the description. */
  .bom-fabric-marker {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.7rem;
    font-size: 0.72rem;
    font-style: normal;
    white-space: nowrap;
    vertical-align: middle;
    background: var(--muted-bg, #eee);
    color: var(--text-secondary);
  }
  /* Where the fabric goes ("Inside Back, Outside Back, Inside Arm, ..."), on a
     line of its own. width: 0 with min-width: 100% takes the column's width
     without asking for any: these tables size their columns from their content,
     and a long list held on one line squeezed every stored row's inputs. */
  .bom-fabric-placement {
    display: block;
    width: 0;
    min-width: 100%;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    font-style: normal;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
  }
  /* "2 typed fabric rows replaced by the order line's fabrics", above a BOM
     table that leaves those rows out. */
  .bom-superseded-note {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
}
@layer components {
  .customs-imports .customs-note, .customs-import .customs-note, .pick-list .customs-note, .customs-popup .customs-note {
    color: var(--text-secondary);
    font-size: 13px;
  }
  .customs-imports .customs-heading-count, .customs-import .customs-heading-count, .pick-list .customs-heading-count, .customs-popup .customs-heading-count {
    color: var(--text-secondary);
    font-weight: 400;
  }
  .customs-imports h1, .customs-imports h2, .customs-imports .customs-heading-count, .customs-import h1, .customs-import h2, .customs-import .customs-heading-count, .pick-list h1, .pick-list h2, .pick-list .customs-heading-count, .customs-popup h1, .customs-popup h2, .customs-popup .customs-heading-count {
    font-variant-numeric: lining-nums;
  }
  .customs-imports .customs-fibre-misfit, .customs-imports .customs-off-load-order, .customs-import .customs-fibre-misfit, .customs-import .customs-off-load-order, .pick-list .customs-fibre-misfit, .pick-list .customs-off-load-order, .customs-popup .customs-fibre-misfit, .customs-popup .customs-off-load-order {
    color: var(--unfulfilled);
  }
  .customs-imports table.list td.num, .customs-imports table.list th.num, .customs-import table.list td.num, .customs-import table.list th.num, .pick-list table.list td.num, .pick-list table.list th.num, .customs-popup table.list td.num, .customs-popup table.list th.num {
    text-align: right;
    white-space: nowrap;
  }
  .customs-imports table.customs-factura td.customs-receiver, .customs-import table.customs-factura td.customs-receiver, .pick-list table.customs-factura td.customs-receiver, .customs-popup table.customs-factura td.customs-receiver {
    white-space: nowrap;
  }
  .customs-special-badge {
    vertical-align: middle;
  }
  h1 .customs-special-badge {
    font-family: var(--font-body);
  }
  .customs-pending, .customs-packing-list, .customs-suggestion, .customs-translation, form.customs-pattern-fill {
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .customs-import-head input[type=text], .customs-import-head input[type=number], .customs-import-head select, .customs-import-head textarea, .customs-filter input[type=text], .customs-filter input[type=number], .customs-filter select, .customs-filter textarea, .customs-line-fields input[type=text], .customs-line-fields input[type=number], .customs-line-fields select, .customs-line-fields textarea, form.customs-skip-form input[type=text], form.customs-skip-form input[type=number], form.customs-skip-form select, form.customs-skip-form textarea, .customs-add input[type=text], .customs-add input[type=number], .customs-add select, .customs-add textarea,
  .customs-packing-list input[type=text],
  .customs-packing-list input[type=number],
  .customs-packing-list select,
  .customs-packing-list textarea, .customs-popup-head input[type=text], .customs-popup-head input[type=number], .customs-popup-head select, .customs-popup-head textarea, .customs-popup-notes input[type=text], .customs-popup-notes input[type=number], .customs-popup-notes select, .customs-popup-notes textarea {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .customs-import-head input[type=text]:hover, .customs-import-head input[type=number]:hover, .customs-import-head select:hover, .customs-import-head textarea:hover, .customs-filter input[type=text]:hover, .customs-filter input[type=number]:hover, .customs-filter select:hover, .customs-filter textarea:hover, .customs-line-fields input[type=text]:hover, .customs-line-fields input[type=number]:hover, .customs-line-fields select:hover, .customs-line-fields textarea:hover, form.customs-skip-form input[type=text]:hover, form.customs-skip-form input[type=number]:hover, form.customs-skip-form select:hover, form.customs-skip-form textarea:hover, .customs-add input[type=text]:hover, .customs-add input[type=number]:hover, .customs-add select:hover, .customs-add textarea:hover,
  .customs-packing-list input[type=text]:hover,
  .customs-packing-list input[type=number]:hover,
  .customs-packing-list select:hover,
  .customs-packing-list textarea:hover, .customs-popup-head input[type=text]:hover, .customs-popup-head input[type=number]:hover, .customs-popup-head select:hover, .customs-popup-head textarea:hover, .customs-popup-notes input[type=text]:hover, .customs-popup-notes input[type=number]:hover, .customs-popup-notes select:hover, .customs-popup-notes textarea:hover {
    border-color: var(--border-medium);
  }
  .customs-import-head input[type=text]:focus, .customs-import-head input[type=text].focus, .customs-import-head input[type=number]:focus, .customs-import-head input[type=number].focus, .customs-import-head select:focus, .customs-import-head select.focus, .customs-import-head textarea:focus, .customs-import-head textarea.focus, .customs-filter input[type=text]:focus, .customs-filter input[type=text].focus, .customs-filter input[type=number]:focus, .customs-filter input[type=number].focus, .customs-filter select:focus, .customs-filter select.focus, .customs-filter textarea:focus, .customs-filter textarea.focus, .customs-line-fields input[type=text]:focus, .customs-line-fields input[type=text].focus, .customs-line-fields input[type=number]:focus, .customs-line-fields input[type=number].focus, .customs-line-fields select:focus, .customs-line-fields select.focus, .customs-line-fields textarea:focus, .customs-line-fields textarea.focus, form.customs-skip-form input[type=text]:focus, form.customs-skip-form input[type=text].focus, form.customs-skip-form input[type=number]:focus, form.customs-skip-form input[type=number].focus, form.customs-skip-form select:focus, form.customs-skip-form select.focus, form.customs-skip-form textarea:focus, form.customs-skip-form textarea.focus, .customs-add input[type=text]:focus, .customs-add input[type=text].focus, .customs-add input[type=number]:focus, .customs-add input[type=number].focus, .customs-add select:focus, .customs-add select.focus, .customs-add textarea:focus, .customs-add textarea.focus,
  .customs-packing-list input[type=text]:focus,
  .customs-packing-list input[type=text].focus,
  .customs-packing-list input[type=number]:focus,
  .customs-packing-list input[type=number].focus,
  .customs-packing-list select:focus,
  .customs-packing-list select.focus,
  .customs-packing-list textarea:focus,
  .customs-packing-list textarea.focus, .customs-popup-head input[type=text]:focus, .customs-popup-head input[type=text].focus, .customs-popup-head input[type=number]:focus, .customs-popup-head input[type=number].focus, .customs-popup-head select:focus, .customs-popup-head select.focus, .customs-popup-head textarea:focus, .customs-popup-head textarea.focus, .customs-popup-notes input[type=text]:focus, .customs-popup-notes input[type=text].focus, .customs-popup-notes input[type=number]:focus, .customs-popup-notes input[type=number].focus, .customs-popup-notes select:focus, .customs-popup-notes select.focus, .customs-popup-notes textarea:focus, .customs-popup-notes textarea.focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .customs-import-head input[type=text][disabled], .customs-import-head input[type=number][disabled], .customs-import-head select[disabled], .customs-import-head textarea[disabled], .customs-filter input[type=text][disabled], .customs-filter input[type=number][disabled], .customs-filter select[disabled], .customs-filter textarea[disabled], .customs-line-fields input[type=text][disabled], .customs-line-fields input[type=number][disabled], .customs-line-fields select[disabled], .customs-line-fields textarea[disabled], form.customs-skip-form input[type=text][disabled], form.customs-skip-form input[type=number][disabled], form.customs-skip-form select[disabled], form.customs-skip-form textarea[disabled], .customs-add input[type=text][disabled], .customs-add input[type=number][disabled], .customs-add select[disabled], .customs-add textarea[disabled],
  .customs-packing-list input[type=text][disabled],
  .customs-packing-list input[type=number][disabled],
  .customs-packing-list select[disabled],
  .customs-packing-list textarea[disabled], .customs-popup-head input[type=text][disabled], .customs-popup-head input[type=number][disabled], .customs-popup-head select[disabled], .customs-popup-head textarea[disabled], .customs-popup-notes input[type=text][disabled], .customs-popup-notes input[type=number][disabled], .customs-popup-notes select[disabled], .customs-popup-notes textarea[disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .customs-import-head input[type=text][disabled]:hover, .customs-import-head input[type=number][disabled]:hover, .customs-import-head select[disabled]:hover, .customs-import-head textarea[disabled]:hover, .customs-filter input[type=text][disabled]:hover, .customs-filter input[type=number][disabled]:hover, .customs-filter select[disabled]:hover, .customs-filter textarea[disabled]:hover, .customs-line-fields input[type=text][disabled]:hover, .customs-line-fields input[type=number][disabled]:hover, .customs-line-fields select[disabled]:hover, .customs-line-fields textarea[disabled]:hover, form.customs-skip-form input[type=text][disabled]:hover, form.customs-skip-form input[type=number][disabled]:hover, form.customs-skip-form select[disabled]:hover, form.customs-skip-form textarea[disabled]:hover, .customs-add input[type=text][disabled]:hover, .customs-add input[type=number][disabled]:hover, .customs-add select[disabled]:hover, .customs-add textarea[disabled]:hover,
  .customs-packing-list input[type=text][disabled]:hover,
  .customs-packing-list input[type=number][disabled]:hover,
  .customs-packing-list select[disabled]:hover,
  .customs-packing-list textarea[disabled]:hover, .customs-popup-head input[type=text][disabled]:hover, .customs-popup-head input[type=number][disabled]:hover, .customs-popup-head select[disabled]:hover, .customs-popup-head textarea[disabled]:hover, .customs-popup-notes input[type=text][disabled]:hover, .customs-popup-notes input[type=number][disabled]:hover, .customs-popup-notes select[disabled]:hover, .customs-popup-notes textarea[disabled]:hover {
    border-color: var(--border-light);
  }
  .customs-import-head input[type=text].error, .customs-import-head input[type=number].error, .customs-import-head select.error, .customs-import-head textarea.error, .customs-filter input[type=text].error, .customs-filter input[type=number].error, .customs-filter select.error, .customs-filter textarea.error, .customs-line-fields input[type=text].error, .customs-line-fields input[type=number].error, .customs-line-fields select.error, .customs-line-fields textarea.error, form.customs-skip-form input[type=text].error, form.customs-skip-form input[type=number].error, form.customs-skip-form select.error, form.customs-skip-form textarea.error, .customs-add input[type=text].error, .customs-add input[type=number].error, .customs-add select.error, .customs-add textarea.error,
  .customs-packing-list input[type=text].error,
  .customs-packing-list input[type=number].error,
  .customs-packing-list select.error,
  .customs-packing-list textarea.error, .customs-popup-head input[type=text].error, .customs-popup-head input[type=number].error, .customs-popup-head select.error, .customs-popup-head textarea.error, .customs-popup-notes input[type=text].error, .customs-popup-notes input[type=number].error, .customs-popup-notes select.error, .customs-popup-notes textarea.error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .customs-import-head input[type=text].error:hover, .customs-import-head input[type=number].error:hover, .customs-import-head select.error:hover, .customs-import-head textarea.error:hover, .customs-filter input[type=text].error:hover, .customs-filter input[type=number].error:hover, .customs-filter select.error:hover, .customs-filter textarea.error:hover, .customs-line-fields input[type=text].error:hover, .customs-line-fields input[type=number].error:hover, .customs-line-fields select.error:hover, .customs-line-fields textarea.error:hover, form.customs-skip-form input[type=text].error:hover, form.customs-skip-form input[type=number].error:hover, form.customs-skip-form select.error:hover, form.customs-skip-form textarea.error:hover, .customs-add input[type=text].error:hover, .customs-add input[type=number].error:hover, .customs-add select.error:hover, .customs-add textarea.error:hover,
  .customs-packing-list input[type=text].error:hover,
  .customs-packing-list input[type=number].error:hover,
  .customs-packing-list select.error:hover,
  .customs-packing-list textarea.error:hover, .customs-popup-head input[type=text].error:hover, .customs-popup-head input[type=number].error:hover, .customs-popup-head select.error:hover, .customs-popup-head textarea.error:hover, .customs-popup-notes input[type=text].error:hover, .customs-popup-notes input[type=number].error:hover, .customs-popup-notes select.error:hover, .customs-popup-notes textarea.error:hover {
    border-color: var(--unfulfilled);
  }
  .customs-import-head input[type=text].error:focus, .customs-import-head input[type=number].error:focus, .customs-import-head select.error:focus, .customs-import-head textarea.error:focus, .customs-filter input[type=text].error:focus, .customs-filter input[type=number].error:focus, .customs-filter select.error:focus, .customs-filter textarea.error:focus, .customs-line-fields input[type=text].error:focus, .customs-line-fields input[type=number].error:focus, .customs-line-fields select.error:focus, .customs-line-fields textarea.error:focus, form.customs-skip-form input[type=text].error:focus, form.customs-skip-form input[type=number].error:focus, form.customs-skip-form select.error:focus, form.customs-skip-form textarea.error:focus, .customs-add input[type=text].error:focus, .customs-add input[type=number].error:focus, .customs-add select.error:focus, .customs-add textarea.error:focus,
  .customs-packing-list input[type=text].error:focus,
  .customs-packing-list input[type=number].error:focus,
  .customs-packing-list select.error:focus,
  .customs-packing-list textarea.error:focus, .customs-popup-head input[type=text].error:focus, .customs-popup-head input[type=number].error:focus, .customs-popup-head select.error:focus, .customs-popup-head textarea.error:focus, .customs-popup-notes input[type=text].error:focus, .customs-popup-notes input[type=number].error:focus, .customs-popup-notes select.error:focus, .customs-popup-notes textarea.error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .customs-import-head input[type=text]::-webkit-outer-spin-button, .customs-import-head input[type=text]::-webkit-inner-spin-button, .customs-import-head input[type=number]::-webkit-outer-spin-button, .customs-import-head input[type=number]::-webkit-inner-spin-button, .customs-import-head select::-webkit-outer-spin-button, .customs-import-head select::-webkit-inner-spin-button, .customs-import-head textarea::-webkit-outer-spin-button, .customs-import-head textarea::-webkit-inner-spin-button, .customs-filter input[type=text]::-webkit-outer-spin-button, .customs-filter input[type=text]::-webkit-inner-spin-button, .customs-filter input[type=number]::-webkit-outer-spin-button, .customs-filter input[type=number]::-webkit-inner-spin-button, .customs-filter select::-webkit-outer-spin-button, .customs-filter select::-webkit-inner-spin-button, .customs-filter textarea::-webkit-outer-spin-button, .customs-filter textarea::-webkit-inner-spin-button, .customs-line-fields input[type=text]::-webkit-outer-spin-button, .customs-line-fields input[type=text]::-webkit-inner-spin-button, .customs-line-fields input[type=number]::-webkit-outer-spin-button, .customs-line-fields input[type=number]::-webkit-inner-spin-button, .customs-line-fields select::-webkit-outer-spin-button, .customs-line-fields select::-webkit-inner-spin-button, .customs-line-fields textarea::-webkit-outer-spin-button, .customs-line-fields textarea::-webkit-inner-spin-button, form.customs-skip-form input[type=text]::-webkit-outer-spin-button, form.customs-skip-form input[type=text]::-webkit-inner-spin-button, form.customs-skip-form input[type=number]::-webkit-outer-spin-button, form.customs-skip-form input[type=number]::-webkit-inner-spin-button, form.customs-skip-form select::-webkit-outer-spin-button, form.customs-skip-form select::-webkit-inner-spin-button, form.customs-skip-form textarea::-webkit-outer-spin-button, form.customs-skip-form textarea::-webkit-inner-spin-button, .customs-add input[type=text]::-webkit-outer-spin-button, .customs-add input[type=text]::-webkit-inner-spin-button, .customs-add input[type=number]::-webkit-outer-spin-button, .customs-add input[type=number]::-webkit-inner-spin-button, .customs-add select::-webkit-outer-spin-button, .customs-add select::-webkit-inner-spin-button, .customs-add textarea::-webkit-outer-spin-button, .customs-add textarea::-webkit-inner-spin-button,
  .customs-packing-list input[type=text]::-webkit-outer-spin-button,
  .customs-packing-list input[type=text]::-webkit-inner-spin-button,
  .customs-packing-list input[type=number]::-webkit-outer-spin-button,
  .customs-packing-list input[type=number]::-webkit-inner-spin-button,
  .customs-packing-list select::-webkit-outer-spin-button,
  .customs-packing-list select::-webkit-inner-spin-button,
  .customs-packing-list textarea::-webkit-outer-spin-button,
  .customs-packing-list textarea::-webkit-inner-spin-button, .customs-popup-head input[type=text]::-webkit-outer-spin-button, .customs-popup-head input[type=text]::-webkit-inner-spin-button, .customs-popup-head input[type=number]::-webkit-outer-spin-button, .customs-popup-head input[type=number]::-webkit-inner-spin-button, .customs-popup-head select::-webkit-outer-spin-button, .customs-popup-head select::-webkit-inner-spin-button, .customs-popup-head textarea::-webkit-outer-spin-button, .customs-popup-head textarea::-webkit-inner-spin-button, .customs-popup-notes input[type=text]::-webkit-outer-spin-button, .customs-popup-notes input[type=text]::-webkit-inner-spin-button, .customs-popup-notes input[type=number]::-webkit-outer-spin-button, .customs-popup-notes input[type=number]::-webkit-inner-spin-button, .customs-popup-notes select::-webkit-outer-spin-button, .customs-popup-notes select::-webkit-inner-spin-button, .customs-popup-notes textarea::-webkit-outer-spin-button, .customs-popup-notes textarea::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .customs-import-head input[type=text], .customs-import-head input[type=number], .customs-import-head select, .customs-import-head textarea, .customs-filter input[type=text], .customs-filter input[type=number], .customs-filter select, .customs-filter textarea, .customs-line-fields input[type=text], .customs-line-fields input[type=number], .customs-line-fields select, .customs-line-fields textarea, form.customs-skip-form input[type=text], form.customs-skip-form input[type=number], form.customs-skip-form select, form.customs-skip-form textarea, .customs-add input[type=text], .customs-add input[type=number], .customs-add select, .customs-add textarea,
  .customs-packing-list input[type=text],
  .customs-packing-list input[type=number],
  .customs-packing-list select,
  .customs-packing-list textarea, .customs-popup-head input[type=text], .customs-popup-head input[type=number], .customs-popup-head select, .customs-popup-head textarea, .customs-popup-notes input[type=text], .customs-popup-notes input[type=number], .customs-popup-notes select, .customs-popup-notes textarea {
    height: 28px;
    padding: 2px 6px;
    font-size: 12px;
  }
  .customs-import-head label, .customs-line-fields label, .customs-add label, .customs-popup-notes label {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    color: var(--text-secondary);
  }
  .customs-imports .customs-pending {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 20px;
    padding: 12px 16px;
  }
  .customs-imports .customs-pending-count {
    font-size: 22px;
    font-weight: 600;
  }
  .customs-imports h2 {
    margin-top: 24px;
  }
  .customs-imports form.customs-history-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
  }
  .customs-imports form.customs-history-search input[type=text] {
    width: 28em;
    max-width: 100%;
  }
  .customs-import .customs-import-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: flex-end;
    margin: 8px 0 16px;
  }
  .customs-import .customs-import-head .customs-head-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0;
  }
  .customs-import .customs-import-head .customs-head-field label, .customs-import .customs-import-head dt {
    margin: 0;
    font-size: 11px;
    line-height: 14px;
    color: var(--text-secondary);
  }
  .customs-import .customs-import-head input[type=text], .customs-import .customs-import-head input[type=date], .customs-import .customs-import-head textarea {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .customs-import .customs-import-head input[type=text]:hover, .customs-import .customs-import-head input[type=date]:hover, .customs-import .customs-import-head textarea:hover {
    border-color: var(--border-medium);
  }
  .customs-import .customs-import-head input[type=text]:focus, .customs-import .customs-import-head input[type=text].focus, .customs-import .customs-import-head input[type=date]:focus, .customs-import .customs-import-head input[type=date].focus, .customs-import .customs-import-head textarea:focus, .customs-import .customs-import-head textarea.focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .customs-import .customs-import-head input[type=text][disabled], .customs-import .customs-import-head input[type=date][disabled], .customs-import .customs-import-head textarea[disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .customs-import .customs-import-head input[type=text][disabled]:hover, .customs-import .customs-import-head input[type=date][disabled]:hover, .customs-import .customs-import-head textarea[disabled]:hover {
    border-color: var(--border-light);
  }
  .customs-import .customs-import-head input[type=text].error, .customs-import .customs-import-head input[type=date].error, .customs-import .customs-import-head textarea.error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .customs-import .customs-import-head input[type=text].error:hover, .customs-import .customs-import-head input[type=date].error:hover, .customs-import .customs-import-head textarea.error:hover {
    border-color: var(--unfulfilled);
  }
  .customs-import .customs-import-head input[type=text].error:focus, .customs-import .customs-import-head input[type=date].error:focus, .customs-import .customs-import-head textarea.error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .customs-import .customs-import-head input[type=text]::-webkit-outer-spin-button, .customs-import .customs-import-head input[type=text]::-webkit-inner-spin-button, .customs-import .customs-import-head input[type=date]::-webkit-outer-spin-button, .customs-import .customs-import-head input[type=date]::-webkit-inner-spin-button, .customs-import .customs-import-head textarea::-webkit-outer-spin-button, .customs-import .customs-import-head textarea::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .customs-import .customs-import-head input[type=text], .customs-import .customs-import-head input[type=date], .customs-import .customs-import-head textarea {
    box-sizing: border-box;
    height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 20px;
  }
  .customs-import .customs-import-head input[type=text] {
    width: 160px;
  }
  .customs-import .customs-import-head input[type=date] {
    width: 150px;
  }
  .customs-import .customs-import-head .customs-head-notes {
    flex: 1 1 280px;
    max-width: 560px;
  }
  .customs-import .customs-import-head textarea {
    width: 100%;
    min-height: 30px;
    resize: vertical;
  }
  .customs-import .customs-import-head .customs-head-save {
    display: flex;
    gap: 8px;
  }
  .customs-import .customs-import-head .customs-head-save .rb-btn {
    height: 30px;
  }
  .customs-import .customs-import-head dd {
    margin: 0;
    font-size: 13px;
  }
  .customs-import .customs-import-head.customs-import-facts {
    align-items: flex-start;
  }
  .customs-import .customs-send-refusal {
    margin: 0 0 16px;
    border-radius: var(--radius-md);
  }
  .customs-import .customs-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 8px;
    font-size: 13px;
  }
  .customs-import .customs-load-order {
    margin: 0 0 8px;
    font-size: 13px;
  }
  .customs-import .customs-load-order summary {
    cursor: pointer;
  }
  .customs-import .customs-load-order form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    margin: 6px 0 0;
  }
  .customs-import .customs-load-order label {
    flex-basis: 100%;
    font-size: 11px;
    color: var(--text-secondary);
  }
  .customs-import .customs-load-order textarea {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .customs-import .customs-load-order textarea:hover {
    border-color: var(--border-medium);
  }
  .customs-import .customs-load-order textarea:focus, .customs-import .customs-load-order textarea.focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .customs-import .customs-load-order textarea[disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .customs-import .customs-load-order textarea[disabled]:hover {
    border-color: var(--border-light);
  }
  .customs-import .customs-load-order textarea.error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .customs-import .customs-load-order textarea.error:hover {
    border-color: var(--unfulfilled);
  }
  .customs-import .customs-load-order textarea.error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .customs-import .customs-load-order textarea::-webkit-outer-spin-button, .customs-import .customs-load-order textarea::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .customs-import .customs-load-order textarea {
    width: 320px;
    height: auto;
    padding: 4px 6px;
    font-size: 12px;
  }
  .customs-import .customs-load-order-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 8px;
    font-size: 13px;
  }
  .customs-import .customs-load-order-status p, .customs-import .customs-load-order-status form {
    margin: 0;
  }
  .customs-import .customs-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 240px);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .customs-import table.customs-factura {
    font-size: 12px;
    margin: 0;
  }
  .customs-import table.customs-factura td {
    vertical-align: top;
  }
  .customs-import table.customs-factura td.customs-desc {
    min-width: 180px;
  }
  .customs-import table.customs-factura td.customs-seq form {
    margin: 0;
  }
  .customs-import table.customs-factura td.customs-seq input[type=number] {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .customs-import table.customs-factura td.customs-seq input[type=number]:hover {
    border-color: var(--border-medium);
  }
  .customs-import table.customs-factura td.customs-seq input[type=number]:focus, .customs-import table.customs-factura td.customs-seq input[type=number].focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .customs-import table.customs-factura td.customs-seq input[type=number][disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .customs-import table.customs-factura td.customs-seq input[type=number][disabled]:hover {
    border-color: var(--border-light);
  }
  .customs-import table.customs-factura td.customs-seq input[type=number].error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .customs-import table.customs-factura td.customs-seq input[type=number].error:hover {
    border-color: var(--unfulfilled);
  }
  .customs-import table.customs-factura td.customs-seq input[type=number].error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .customs-import table.customs-factura td.customs-seq input[type=number]::-webkit-outer-spin-button, .customs-import table.customs-factura td.customs-seq input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .customs-import table.customs-factura td.customs-seq input[type=number] {
    width: 64px;
    height: 26px;
    padding: 2px 4px;
    font-size: 12px;
    text-align: right;
  }
  .customs-import table.customs-factura td.customs-empty {
    padding: 16px;
    color: var(--text-secondary);
    font-size: 13px;
  }
  .customs-import table.customs-factura thead th {
    position: sticky;
    top: -1px;
    z-index: 2;
    background: var(--bg-secondary);
    box-shadow: inset 0 -1.5px 0 var(--border-light);
  }
  .customs-import table.customs-factura td.tool, .customs-import table.customs-factura th.tool {
    position: sticky;
    right: 0;
    z-index: 1;
    white-space: nowrap;
    background: var(--bg-card);
    box-shadow: inset 1.5px 0 0 var(--border-light), -6px 0 8px -6px rgba(44, 36, 32, 0.18);
  }
  .customs-import table.customs-factura thead th.tool {
    z-index: 3;
    background: var(--bg-secondary);
  }
  .customs-import table.customs-factura td.tool .customs-row-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .customs-import table.customs-factura td.tool .customs-row-actions form {
    margin: 0;
  }
  .customs-import table.customs-factura td.tool .customs-row-actions .rb-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 0 12px;
  }
  .customs-import table.customs-factura td.tool .rb-status {
    display: block;
    margin-bottom: 4px;
    text-align: center;
  }
  .customs-import table.customs-factura td.tool .customs-corrected {
    white-space: normal;
    max-width: 8em;
    margin-top: 4px;
    font-size: 11px;
  }
  .customs-import table.customs-factura td.customs-gap {
    background: var(--unfulfilled-bg);
    box-shadow: inset 0 0 0 1px var(--unfulfilled);
  }
  .customs-import table.customs-factura td.customs-gap:empty::after {
    content: "missing";
    color: var(--unfulfilled);
    font-style: italic;
  }
  .customs-import table.customs-factura tbody.customs-line.customs-hidden {
    display: none;
  }
  .customs-import table.customs-factura tbody.customs-section.customs-hidden {
    display: none;
  }
  .customs-import table.customs-factura th.customs-seq {
    min-width: 84px;
  }
  .customs-import table.customs-factura tbody.customs-section th.customs-section-cell,
  .customs-import table.customs-factura tbody.customs-section tr:hover th.customs-section-cell {
    padding: 0;
    background: var(--bg-secondary);
    box-shadow: inset 0 1.5px 0 var(--border-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
  }
  .customs-import table.customs-factura tbody.customs-section button.customs-section-toggle {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
  }
  .customs-import table.customs-factura tbody.customs-section button.customs-section-toggle:hover {
    color: var(--accent-walnut);
  }
  .customs-import table.customs-factura tbody.customs-section button.customs-section-toggle:focus-visible {
    outline: 2px solid var(--accent-brass-light);
    outline-offset: -2px;
  }
  .customs-import table.customs-factura .customs-section-name {
    position: sticky;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
  }
  .customs-import table.customs-factura .customs-section-name::before {
    content: "";
    width: 0.42em;
    height: 0.42em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15em) rotate(45deg);
    transition: transform var(--transition-fast);
  }
  .customs-import table.customs-factura .customs-section-toggle[aria-expanded=false] .customs-section-name::before {
    transform: rotate(-45deg);
  }
  .customs-import table.customs-factura .customs-section-count {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
  }
  .customs-import table.customs-factura.customs-collapse-parts tbody.customs-line[data-section=parts] {
    display: none;
  }
  .customs-import table.customs-factura.customs-collapse-fabric tbody.customs-line[data-section=fabric] {
    display: none;
  }
  .customs-import table.customs-factura.customs-collapse-other tbody.customs-line[data-section=other] {
    display: none;
  }
  .customs-import tbody.customs-line {
    scroll-margin-top: 56px;
  }
  .customs-import .customs-row-note {
    white-space: pre-line;
  }
  .customs-import .customs-add {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .customs-import .customs-add form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
  }
  .customs-import .customs-add summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }
  .customs-import .customs-add input[type=text] {
    width: 220px;
  }
  .customs-import .customs-add form#customs-po-receive {
    flex-direction: column;
    align-items: flex-start;
  }
  .customs-import .customs-add .customs-po-error {
    color: var(--unfulfilled);
    margin: 0;
  }
  .customs-import table.customs-po-lines {
    font-size: 12px;
    margin: 0;
    width: auto;
  }
  .customs-import table.customs-po-lines input[type=number] {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .customs-import table.customs-po-lines input[type=number]:hover {
    border-color: var(--border-medium);
  }
  .customs-import table.customs-po-lines input[type=number]:focus, .customs-import table.customs-po-lines input[type=number].focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .customs-import table.customs-po-lines input[type=number][disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .customs-import table.customs-po-lines input[type=number][disabled]:hover {
    border-color: var(--border-light);
  }
  .customs-import table.customs-po-lines input[type=number].error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .customs-import table.customs-po-lines input[type=number].error:hover {
    border-color: var(--unfulfilled);
  }
  .customs-import table.customs-po-lines input[type=number].error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .customs-import table.customs-po-lines input[type=number]::-webkit-outer-spin-button, .customs-import table.customs-po-lines input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .customs-import table.customs-po-lines input[type=number] {
    width: 90px;
    height: 26px;
    padding: 2px 6px;
    font-size: 12px;
    text-align: right;
  }
  .customs-popup {
    padding: 14px 18px 18px;
    font-size: 12px;
  }
  .customs-popup .customs-popup-saved {
    margin: 0 0 10px;
    border-radius: var(--radius-md);
  }
  .customs-popup .customs-line-errors {
    color: var(--unfulfilled);
    margin-bottom: 8px;
  }
  .customs-popup .customs-popup-gaps {
    margin: 0 0 8px;
    color: var(--unfulfilled);
  }
  .customs-popup .customs-popup-label {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    color: var(--text-secondary);
  }
  .customs-popup .customs-popup-value {
    display: block;
    min-height: 28px;
    line-height: 28px;
    font-variant-numeric: tabular-nums;
  }
  .customs-popup .customs-popup-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
  }
  .customs-popup .customs-popup-head .customs-popup-label {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .customs-popup .customs-popup-head .customs-popup-value {
    font-weight: 600;
  }
  .customs-popup .customs-popup-head .customs-popup-seq input[type=number] {
    width: 64px;
    text-align: right;
  }
  .customs-popup .customs-popup-wide {
    flex: 1 1 220px;
    min-width: 180px;
  }
  .customs-popup .customs-popup-wide input[type=text] {
    width: 100%;
    box-sizing: border-box;
  }
  .customs-popup .customs-line-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: flex-start;
    margin-top: 12px;
  }
  .customs-popup .customs-line-fields > div {
    min-width: 90px;
  }
  .customs-popup .customs-line-fields input.wide {
    width: 280px;
  }
  .customs-popup .customs-line-fields input.narrow {
    width: 110px;
  }
  .customs-popup .customs-line-fields .customs-field-class {
    flex: 1 1 260px;
    min-width: 240px;
    max-width: 340px;
  }
  .customs-popup .customs-line-fields select[name$="[country_of_origin]"], .customs-popup .customs-line-fields select[name$="[origin]"] {
    width: 170px;
  }
  .customs-popup .customs-line-fields .customs-fibre-misfit {
    margin: 4px 0 0;
  }
  .customs-popup .customs-line-fields .customs-origin-not-found {
    margin-left: 6px;
  }
  .customs-popup .customs-popup-item-note {
    margin: 8px 0 0;
  }
  .customs-popup .customs-popup-notes {
    margin-top: 12px;
  }
  .customs-popup .customs-popup-notes textarea {
    width: 100%;
    height: auto;
    box-sizing: border-box;
    resize: vertical;
  }
  .customs-popup .customs-suggestion, .customs-popup .customs-translation {
    padding: 4px 8px;
    margin-top: 10px;
  }
  .customs-popup form.customs-pattern-fill {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding: 6px 10px;
  }
  .customs-popup form.customs-skip-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
  }
  .customs-popup form.customs-skip-form input[type=text] {
    width: 260px;
  }
  .customs-popup .customs-packing-list {
    margin-top: 12px;
    padding: 10px 12px;
  }
  .customs-popup .customs-packing-list-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }
  .customs-popup .customs-packing-list-reason {
    color: var(--status-hold);
  }
  .customs-popup .customs-packing-list-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin: 0 0 8px;
  }
  .customs-popup .customs-packing-list-facts dt {
    font-size: 11px;
    color: var(--text-secondary);
  }
  .customs-popup .customs-packing-list-facts dd {
    margin: 0;
  }
  .customs-popup form.customs-packing-list-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
  }
  .customs-popup form.customs-packing-list-form input[type=text] {
    width: 280px;
  }
  .customs-popup .customs-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1.5px solid var(--border-light);
  }
  .customs-popup .customs-popup-actions form.customs-popup-delete, .customs-popup .customs-popup-actions .customs-pending-selected {
    margin: 0 auto 0 0;
  }
  .customs-popup .customs-pending-selected {
    color: var(--text-secondary);
    font-size: 13px;
  }
  .customs-popup.customs-pending-list > p.customs-note {
    margin: 0 0 8px;
  }
  .customs-popup.customs-pending-list .customs-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 8px;
    font-size: 13px;
  }
  .customs-popup.customs-pending-list input.customs-pending-search {
    flex: 1 1 360px;
    max-width: 100%;
    height: 32px;
    font-size: 13px;
  }
  .customs-popup.customs-pending-list form {
    margin: 0;
  }
  .customs-popup .customs-pending-wrap {
    overflow: auto;
    max-height: 50vh;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .customs-popup table.customs-pending-table {
    font-size: 12px;
    margin: 0;
  }
  .customs-popup table.customs-pending-table td {
    vertical-align: top;
  }
  .customs-popup table.customs-pending-table td.customs-desc {
    min-width: 220px;
  }
  .customs-popup table.customs-pending-table thead th {
    position: sticky;
    top: -1px;
    z-index: 1;
    background: var(--bg-secondary);
    box-shadow: inset 0 -1.5px 0 var(--border-light);
  }
  .customs-popup table.customs-pending-table .customs-pending-tick {
    width: 24px;
    text-align: center;
  }
  .customs-popup table.customs-pending-table td.customs-receiver label {
    cursor: pointer;
  }
  .customs-popup table.customs-pending-table tbody.customs-hidden {
    display: none;
  }
  .pick-list {
    font-size: 12px;
  }
  .pick-list h2 {
    margin-top: 1.5em;
  }
  .pick-list table.list th, .pick-list table.list td {
    padding: 3px 6px;
  }
  .pick-list tr {
    break-inside: avoid;
  }
  .pick-list .pick-check {
    width: 18px;
  }
  .pick-list .pick-box {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 1.5px solid var(--text-primary);
    border-radius: 2px;
  }
  .pick-list .pick-signoff {
    display: flex;
    gap: 32px;
    margin-top: 28px;
    font-size: 13px;
  }
  .pick-list .pick-signoff span {
    display: inline-block;
    min-width: 180px;
    border-bottom: 1px solid var(--text-primary);
  }
}
@layer components {
  .emp-page.esig-page-wrap {
    max-width: 960px;
  }
  .esig-pages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 20px;
  }
  .esig-page {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
  }
  .esig-card {
    margin-top: 12px;
  }
  .esig-role {
    margin: 0 0 4px;
    color: var(--text-secondary);
    font-size: 1rem;
  }
  .esig-signer-name {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    overflow-wrap: anywhere;
  }
  .esig-hand-over {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 4px solid var(--accent-brass);
    background: var(--bg-secondary);
    font-size: 1.05rem;
    font-weight: 600;
  }
  .esig-pad {
    position: relative;
    width: 100%;
    height: clamp(200px, 32vh, 340px);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .esig-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
  }
  .esig-pad-line {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 48px;
    border-bottom: 1px solid var(--border-light);
    pointer-events: none;
  }
  .esig-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
  }
  .esig-button {
    min-width: 140px;
    min-height: 48px;
    font-size: 1.05rem;
  }
  .esig-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  .emp-fieldset.esig-outcomes {
    margin: 0;
    padding: 8px 16px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  }
  .esig-outcomes legend {
    font-size: 0.95rem;
  }
  .esig-outcome {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-weight: normal;
    cursor: pointer;
  }
  .esig-line-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
  }
  .esig-line-actions .rb-btn {
    padding: 4px 10px;
    font-size: 0.85rem;
  }
  .esig-errors {
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid rgba(127, 29, 34, 0.2);
    border-radius: var(--radius-md);
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-weight: 600;
  }
  .esig-errors p {
    margin: 0 0 4px;
  }
  .esig-errors ul {
    margin: 0;
    padding-left: 20px;
    font-weight: normal;
  }
  .esig-cancelled {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 4px solid var(--status-rush);
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-weight: 600;
  }
  .esig-cancel {
    margin-top: 16px;
  }
  .esig-cancel .emp-form {
    gap: 10px;
  }
  .esig-figure.esig-figure {
    margin: 0;
  }
  .esig-figure figcaption {
    margin-top: 4px;
    font-size: 0.85rem;
  }
  .esig-page-link {
    color: var(--accent-walnut);
  }
  .emp-subtitle {
    margin: 4px 0 0;
    color: var(--text-secondary);
  }
  .esig-bottom-actions {
    margin-top: 16px;
  }
  .esig-preview-title {
    margin-top: 24px;
  }
  .esig-signer-select {
    min-width: 16rem;
    max-width: 100%;
  }
  .esig-how {
    margin: 2px 0 0;
    font-size: 0.85rem;
  }
  .esig-out-request {
    padding: 8px 0;
    border-top: 1px solid var(--border-light);
  }
  .esig-out-request:first-of-type {
    border-top: 0;
    padding-top: 0;
  }
  .esig-out-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
  }
  .esig-out-head .emp-hint {
    margin: 0;
  }
  .esig-out-head .emp-link {
    margin-left: auto;
  }
  .emp-table.esig-out-table {
    margin-top: 6px;
    box-shadow: none;
    table-layout: fixed;
    font-size: 0.9rem;
  }
  .esig-out-table th, .esig-out-table td {
    padding: 4px 8px;
  }
  .esig-out-table th:nth-child(1), .esig-out-table td:nth-child(1) {
    width: 36%;
  }
  .esig-out-table th:nth-child(2), .esig-out-table td:nth-child(2) {
    width: 34%;
  }
  .esig-out-role {
    color: var(--text-secondary);
  }
  .esig-state-signed {
    color: var(--fulfilled);
  }
  .esig-state-refused, .esig-state-unable {
    color: var(--status-rush);
  }
  #contracts .emp-row-actions {
    white-space: normal;
  }
  #contracts .emp-row-actions .emp-link {
    display: block;
    margin: 2px 0;
  }
  #contracts .esig-contract-term > span:not(.rb-status) {
    display: block;
    white-space: nowrap;
  }
  #contracts .esig-contract-term .rb-status {
    margin: 4px 0 0;
  }
  .esig-contracts-scroll {
    overflow-x: auto;
    container-type: inline-size;
  }
  @container (max-width: 520px) {
    #contracts .emp-table th, #contracts .emp-table td {
      padding-left: 8px;
      padding-right: 8px;
    }
  }
  .esig-reason {
    max-width: 40rem;
    overflow-wrap: anywhere;
  }
  details.esig-reason summary {
    cursor: pointer;
  }
  details.esig-reason p {
    margin: 4px 0 0;
    white-space: pre-wrap;
  }
  .esig-pay-note {
    margin-top: 16px;
  }
  .esig-status-table td {
    overflow-wrap: anywhere;
  }
  @media (max-width: 600px) {
    .emp-table.esig-stack,
    .emp-table.esig-stack tbody,
    .emp-table.esig-stack tr,
    .emp-table.esig-stack td {
      display: block;
      width: 100%;
    }
    .emp-table.esig-stack {
      table-layout: auto;
    }
    .emp-table.esig-stack thead {
      display: none;
    }
    .emp-table.esig-stack tr {
      padding: 8px 0;
      border-top: 1px solid var(--border-light);
    }
    .emp-table.esig-stack tbody tr:first-child {
      border-top: 0;
    }
    .emp-table.esig-stack td {
      padding: 3px 12px;
      border-bottom: 0;
      overflow-wrap: anywhere;
    }
    .emp-table.esig-stack td[data-label]::before {
      content: attr(data-label);
      display: block;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--text-tertiary);
    }
    .emp-table.esig-stack .esig-stack-actions {
      padding-top: 6px;
    }
  }
}
@charset "UTF-8";
@layer components {
  .emp-page {
    max-width: 1200px;
    padding: 8px 4px 32px;
  }
  .emp-page-narrow {
    max-width: 760px;
  }
  .emp-header, .emp-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .emp-header {
    margin-bottom: 16px;
  }
  .emp-subheader {
    margin: 16px 0 8px;
  }
  .emp-subheader h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
  }
  .emp-subheader-top {
    margin-top: 0;
  }
  .emp-subheader-top .emp-card-title {
    margin: 0;
  }
  .emp-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 0;
    color: var(--text-primary);
  }
  .emp-back {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--text-secondary);
    text-decoration: none;
  }
  .emp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
  }
  .emp-filters .pretty {
    height: 36px;
    padding: 6px 10px;
  }
  .emp-filters input[type=text].pretty {
    width: 280px;
  }
  .emp-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
  .emp-bulk-bar label {
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
  .emp-bulk-bar .pretty {
    height: 34px;
    padding: 4px 8px;
  }
  .emp-bulk-count {
    font-weight: 600;
    margin-right: 8px;
    min-width: 9em;
  }
  .emp-table .emp-select-cell {
    width: 1%;
    padding-right: 0;
  }
  .emp-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }
  .emp-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
  }
  .emp-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
  }
  .emp-table tbody tr:last-child td {
    border-bottom: none;
  }
  .emp-table tbody tr:hover {
    background: var(--row-hover);
  }
  .emp-row-actions {
    white-space: nowrap;
    text-align: right;
  }
  .emp-nowrap {
    white-space: nowrap;
  }
  .emp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 700;
  }
  .emp-avatar-small {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  .emp-avatar-large {
    width: 96px;
    height: 96px;
    font-size: 1.8rem;
  }
  .emp-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
  }
  .emp-profile-heading {
    flex: 1;
    min-width: 0;
  }
  .emp-profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 6px 0 0;
    color: var(--text-secondary);
  }
  .emp-profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .emp-settings-link {
    margin-left: 4px;
    white-space: nowrap;
  }
  .emp-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 196px;
    align-items: start;
    gap: 16px;
  }
  .emp-profile-layout > .emp-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    min-width: 0;
  }
  .emp-profile-photo {
    text-align: center;
  }
  .emp-avatar-profile {
    width: 160px;
    height: 160px;
    max-width: 100%;
    border-radius: var(--radius-md);
    font-size: 3rem;
  }
  @media (max-width: 600px) {
    .emp-profile-layout {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .emp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
  }
  .emp-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 16px 18px;
  }
  .emp-card-wide {
    grid-column: 1/-1;
  }
  .emp-card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 0 0 12px;
    color: var(--text-primary);
  }
  .emp-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
  }
  .emp-details dt {
    color: var(--text-tertiary);
    font-size: 0.85rem;
  }
  .emp-details dd {
    margin: 0;
    color: var(--text-primary);
    overflow-wrap: anywhere;
  }
  .emp-empty {
    margin: 4px 0;
    color: var(--text-tertiary);
    font-style: italic;
  }
  .emp-hidden {
    display: none;
  }
  .emp-link-button {
    margin-left: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--accent-walnut);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
  }
  .emp-link {
    margin-left: 10px;
    color: var(--accent-walnut);
  }
  .emp-link-danger {
    color: var(--status-rush);
  }
  .emp-comment-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .emp-comment-form textarea.pretty {
    width: 100%;
    padding: 8px 10px;
  }
  .emp-comment {
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
  }
  .emp-comment-body p {
    margin: 0 0 6px;
  }
  .emp-comment-meta {
    color: var(--text-tertiary);
    font-size: 0.8rem;
  }
  .emp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .emp-fieldset {
    margin: 0;
    padding: 12px 16px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .emp-fieldset legend {
    padding: 0 6px;
    font-family: var(--font-display);
    font-weight: 600;
  }
  .emp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
  }
  .emp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .emp-field-wide {
    grid-column: 1/-1;
  }
  .emp-field label, .emp-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .emp-form .emp-field .pretty {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
  }
  .emp-form .emp-field textarea.pretty {
    height: auto;
    min-height: 90px;
  }
  .emp-form .emp-field-error .pretty {
    border-color: var(--status-rush);
  }
  .emp-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media (max-width: 480px) {
    .emp-form-grid-2 {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  /* INFONAVIT and FONACOT rows (employees/form/_credits): the FONACOT deduction
     sits under INFONAVIT's. */
  .emp-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .emp-form-grid-3 + .emp-form-grid-3 {
    margin-top: 12px;
  }
  .emp-form-grid-3 > .emp-field:nth-child(2):last-child {
    grid-column: 3;
  }
  @media (max-width: 720px) {
    .emp-form-grid-3 {
      grid-template-columns: minmax(0, 1fr);
    }
    .emp-form-grid-3 > .emp-field:nth-child(2):last-child {
      grid-column: auto;
    }
  }
  .emp-fieldset-hint {
    margin: 0 0 12px;
  }
  .emp-field-note {
    margin: 0;
    font-size: 0.8rem;
  }
  .emp-field-missing {
    color: var(--status-rush);
  }
  .emp-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 24px 0 16px;
  }
  .emp-own-request {
    margin: 0 0 12px;
  }
  .emp-form-actions {
    display: flex;
    gap: 8px;
  }
  /* In the sfr modal, sit bottom-right with Save rightmost, like every other
     modal footer (row-reverse keeps the DOM order, so the full page is unchanged). */
  .sfr-modal .emp-form-actions {
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 12px;
  }
  /* Explanatory line under a page title. */
  .emp-hint {
    color: var(--text-secondary);
    margin: 8px 0 16px;
  }
  /* Documents menu on the profile header (employees/show/_documents_menu). */
  .emp-menu {
    position: relative;
  }
  .emp-menu > summary {
    list-style: none;
    cursor: pointer;
  }
  .emp-menu > summary::-webkit-details-marker {
    display: none;
  }
  .emp-menu > summary::after {
    content: " ▾";
  }
  .emp-menu-list {
    position: absolute;
    right: 0;
    z-index: 20;
    min-width: 240px;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }
  .emp-menu-item {
    display: block;
    padding: 6px 12px;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
  }
  .emp-menu-item:hover {
    background: var(--bg-secondary);
  }
  .emp-tab-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
  }
  .emp-card-subtitle {
    margin-left: 8px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
  }
  .emp-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    min-height: 36px;
    align-items: center;
  }
  .emp-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    color: var(--text-primary);
  }
  .emp-history td {
    vertical-align: top;
  }
  .emp-history-note {
    color: var(--text-tertiary);
    font-style: italic;
  }
  .emp-signature-pages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }
  .emp-signature-page {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-light);
  }
  .emp-signature-state {
    font-weight: 600;
  }
}
@layer components {
  .ef-tab {
    padding: 4px 0 24px;
  }
  .ef-tab .ef-intro {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-secondary);
  }
  .ef-tab .ef-setup {
    margin: 0 0 14px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-size: 12px;
  }
  .ef-tab .ef-line {
    margin: 0 0 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-card);
    overflow: hidden;
  }
  .ef-tab .ef-line-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
  }
  .ef-tab .ef-line-head h3 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--text-primary);
  }
  .ef-tab .ef-line-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }
  .ef-tab .ef-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .ef-tab .ef-chip {
    display: inline-flex;
    flex-direction: column;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11.5px;
    line-height: 1.35;
  }
  .ef-tab .ef-chip-type {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .ef-tab .ef-chip-approved {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .ef-tab .ef-chip-pending {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .ef-tab .ef-chip-not_needed {
    background: var(--row-stripe);
    color: var(--text-tertiary);
  }
  .ef-tab .ef-status {
    margin: 10px 0 0;
    font-size: 12.5px;
    font-weight: 600;
  }
  .ef-tab .ef-status-waiting {
    color: var(--status-hold);
  }
  .ef-tab .ef-status-released {
    color: var(--status-open);
  }
  .ef-tab .ef-files {
    width: 100%;
    border-collapse: collapse !important;
    font-size: 12.5px;
  }
  .ef-tab .ef-files th, .ef-tab .ef-files td {
    padding: 9px 16px;
    border-top: 1px solid var(--border-light);
    text-align: left;
    vertical-align: top;
  }
  .ef-tab .ef-files thead th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--bg-secondary);
  }
  .ef-tab .ef-files tr.ef-approved td {
    background: var(--status-open-bg);
  }
  .ef-tab .ef-files .ef-file a {
    color: var(--accent-walnut);
    text-decoration: underline;
  }
  .ef-tab .ef-meta, .ef-tab .ef-note {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-secondary);
  }
  .ef-tab .ef-type {
    min-width: 180px;
  }
  .ef-tab .ef-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    background: var(--status-open-bg);
    color: var(--status-open);
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid var(--status-open);
  }
  .ef-tab .ef-state {
    font-size: 11.5px;
    color: var(--text-secondary);
  }
  .ef-tab .ef-row-actions {
    white-space: nowrap;
    text-align: right !important;
  }
  .ef-tab .ef-row-actions .rb-btn {
    margin-left: 6px;
  }
  .ef-tab .ef-delete {
    color: var(--status-rush);
  }
  .ef-tab .ef-history {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    font-size: 12px;
  }
  .ef-tab .ef-history h4 {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .ef-tab .ef-history td {
    padding: 3px 18px 3px 0;
    vertical-align: top;
  }
  .ef-tab .ef-history-at {
    white-space: nowrap;
    color: var(--text-secondary);
  }
  .ef-tab .ef-history-who {
    white-space: nowrap;
    font-weight: 600;
  }
  .ef-tab .ef-history-empty {
    margin: 0;
    color: var(--text-secondary);
  }
  .ef-set {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 9px;
    border-radius: 10px;
    vertical-align: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .ef-set.ef-set-sample {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .ef-set.ef-set-production {
    background: var(--row-stripe);
    color: var(--text-secondary);
  }
  .ef-dialog {
    padding: 4px 20px 16px;
  }
  .ef-dialog .ef-dialog-line {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ef-dialog .ef-dialog-error {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 5px;
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 12px;
  }
  .ef-dialog .ef-field {
    margin: 0 0 12px;
  }
  .ef-dialog .ef-field label {
    display: block;
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 12.5px;
  }
  .ef-dialog .ef-field select, .ef-dialog .ef-field input[type=text] {
    width: 100%;
    box-sizing: border-box;
  }
  .ef-dialog .ef-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ef-dialog .ef-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .ef-dialog .ef-import-intro {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-secondary);
  }
  .ef-dialog .ef-import-source {
    margin: 14px 0;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-secondary);
    font-size: 12.5px;
  }
  .ef-dialog .ef-import-source:empty {
    display: none;
  }
  .ef-dialog .ef-import-source h4 {
    margin: 0 0 8px;
    font-size: 13px;
  }
  .ef-dialog .ef-import-file {
    display: grid;
    grid-template-columns: 20px minmax(110px, 1fr) minmax(90px, 0.8fr) minmax(0, 1.6fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 8px;
    padding: 6px 0;
  }
  .ef-dialog .ef-import-type {
    font-weight: 600;
  }
  .ef-dialog .ef-import-lands {
    font-size: 11.5px;
    color: var(--text-secondary);
  }
  .ef-dialog .ef-import-name {
    overflow-wrap: anywhere;
  }
  .ef-dialog .ef-import-approve {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--border-light);
  }
  .ef-dialog .ef-import-none {
    margin: 0;
    color: var(--text-secondary);
  }
}
@layer components {
  .equip-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-md);
    vertical-align: middle;
  }
  .equip-items .equip-thumb {
    display: block;
  }
  .equip-check {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .equip-movements {
    margin-top: 8px;
  }
  .equip-header {
    flex-wrap: wrap;
  }
  .equip-summary {
    display: flex;
    gap: 24px;
    margin: 0 0 0 auto;
  }
  .equip-summary-item {
    text-align: center;
  }
  .equip-summary-item dt {
    font-size: 12px;
    color: var(--text-secondary);
  }
  .equip-summary-count {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
  }
  .equipment-eol-past {
    color: var(--unfulfilled);
    font-weight: 600;
  }
  .equip-actions {
    width: 1%;
    white-space: nowrap;
  }
  .equip-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
  }
  .equip-row-menu > summary {
    padding: 2px 10px;
  }
  .equip-row-menu > summary::after {
    content: none;
  }
  .equip-item-choices {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
  }
  .equip-item-choices legend {
    padding: 0;
    margin-bottom: 4px;
    font-weight: 600;
  }
  .equip-new-item {
    margin-top: 16px;
  }
  .sfr-modal .equip-modal-body {
    padding: 12px 14px 14px;
  }
}
@layer components {
.fabric-contents-source {
  color: var(--text-secondary);
  font-size: 11px;
}
}
@layer components {
.fabric-merge h2 {
  margin-top: 32px;
}

.fabric-merge h3 {
  margin-top: 24px;
}

.fabric-merge table.list {
  margin-bottom: 12px;
}

.fabric-merge #merge-fields label {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
}
@charset "UTF-8";
@layer components {
  /* ============================================================
     has_many widget — Kovet Design System
     ------------------------------------------------------------
     The sfr-ui form builder renders `f.has_many` as nested tables
     (table.deletable > table.field-pair) with a left-hand label
     column, and its `.pretty` picker absolutely-positions the
     link over a fixed-height field. That markup is built for the
     legacy sfr-ui forms and looks cramped inside the new
     card-style forms.

     Opt in by wrapping the has_many in a `.has-many-field`
     element — this restyles it to the new look and feel:

       <div class="has-many-field">
         <%= fields_for :model, @model, builder: SfrUi::FormBuilder do |hf| %>
           <%= hf.has_many :children, add: "Add..", delete: true do |cf| %>
             <%= cf.hidden_field :id %>
             <%= cf.picker_field :user, { label: "Rep" }, { user_type: "rep" } %>
           <% end %>
         <% end %>
       </div>

     Single-field rows can pass `label_style: :none` to drop the
     redundant per-field label; rows with multiple fields keep
     their labels (rendered small + stacked above each field).

     Scoped to `.has-many-field` so the legacy sfr-ui forms are
     left untouched. Uses the global design tokens from
     design_system/tokens.scss :root.
     ============================================================ */
  .has-many-field {
    /* ----- Layout: linearize the nested sfr-ui tables ----- */
  }
  .has-many-field .has-many > table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
  }
  .sfr-form .has-many-field .has-many {
    overflow: visible;
  }
  .has-many-field table.deletable {
    margin: 0 0 6px;
  }
  .has-many-field table.deletable > tbody {
    display: block;
  }
  .has-many-field table.deletable > tbody > tr {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .has-many-field table.deletable > tbody > tr > td {
    display: block;
    flex: 1 1 auto;
    padding: 0;
  }
  .has-many-field table.deletable > tbody > tr > td.tool {
    flex: 0 0 auto;
    width: auto;
    text-align: left;
  }
  .has-many-field .sub {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .has-many-field .sub table.field-pair,
  .has-many-field .sub table.field-pair tbody,
  .has-many-field .sub table.field-pair tr {
    display: block;
    width: 100%;
  }
  .has-many-field .sub table.field-pair td {
    display: block;
    width: 100%;
    padding: 0;
  }
  .has-many-field .sub th.sfr-left-label {
    display: block;
    width: auto;
    padding: 0 0 2px;
    text-align: left;
  }
  .has-many-field .sub th.sfr-left-label label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
  }
  .has-many-field .sub input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
  .has-many-field .sub select,
  .has-many-field .sub textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 0.84rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .has-many-field .sub input:not([type=hidden]):not([type=checkbox]):not([type=radio]):focus,
  .has-many-field .sub select:focus,
  .has-many-field .sub textarea:focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 2px rgba(90, 45, 28, 0.08);
  }
  .has-many-field {
    /* ----- Pickers: match the bordered design-system input ----- */
  }
  .has-many-field .picker-field {
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 33px;
    box-sizing: border-box;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    background-image: none;
    background-repeat: no-repeat;
    padding: 0;
    overflow: visible;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .has-many-field .picker-field:hover {
    border-color: var(--accent-walnut);
    background-image: none;
  }
  .has-many-field .picker-field .picker-link {
    position: static;
    display: block;
    flex: 1 1 auto;
    height: auto;
    overflow: visible;
    white-space: normal;
    padding: 7px 10px;
    font-size: 0.84rem;
    line-height: 1.3;
    font-family: var(--font-body);
    color: var(--text-primary);
    text-decoration: none;
  }
  .has-many-field .picker-field .picker-link .empty {
    color: var(--text-tertiary);
  }
  .has-many-field .picker-field .picker-clear {
    display: none;
  }
  .has-many-field {
    /* ----- Add / delete controls ----- */
  }
  .has-many-field table.add-link-wrapper {
    margin: 0;
  }
  .has-many-field table.add-link-wrapper th.sfr-left-label {
    display: none;
  }
  .has-many-field table.add-link-wrapper td {
    padding: 0;
  }
  .has-many-field a.add-button {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .has-many-field a.add-button:hover {
    opacity: 0.75;
  }
  .has-many-field a.delete-button {
    cursor: pointer;
  }
  .has-many-field.has-many-field--inline .sub {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }
  .has-many-field.has-many-field--inline .sub > table.field-pair {
    flex: 0 0 7rem;
    width: auto;
  }
  .has-many-field.has-many-field--inline .sub > table.field-pair:first-child {
    flex: 1 1 auto;
  }
  .has-many-field.has-many-field--inline .sub > table.field-pair:has(input[type=checkbox]) {
    flex: 0 0 auto;
  }
  .has-many-field.has-many-field--inline .sub input[type=checkbox] {
    margin: 9px 0;
  }
  .has-many-field.has-many-field--inline table.deletable > tbody > tr {
    align-items: flex-end;
  }
  .has-many-field.has-many-field--inline table.deletable > tbody > tr > td.tool {
    padding-bottom: 8px;
  }
  .has-many-field a:hover {
    text-decoration: none;
  }
}
@layer components {
.item-pattern-files {
  margin: 4px 0 12px;
  padding: 0 8px;
}
.item-pattern-files-empty {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.item-pattern-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.item-pattern-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 104px;
  padding: 6px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
  text-align: center;
}
.item-pattern-file img,
.item-pattern-file-doc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  object-fit: contain;
}
.item-pattern-file-doc {
  border: 1px dashed var(--border-light);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.item-pattern-file-label,
.item-pattern-file-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.item-pattern-file-name {
  color: var(--text-secondary);
}
}
@layer components {
  /* Lead Time Calculator (the COM calculator).
     Rendered both as a full page and inside an sfr modal, so everything here is
     scoped to .ltc and sized in relative units -- the modal is narrower than the
     page and the panels have to stack in it. */
  .ltc {
    font-family: var(--font-body);
    color: var(--text-primary);
  }
  .ltc-order {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
  }
  .ltc-order-project {
    margin-left: 0.5rem;
    color: var(--text-tertiary);
  }
  .ltc-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.5rem;
    align-items: start;
    /* Above this the panels only add dead space between the lead time and its
       date. Chosen to sit above a 1280px viewport, so only ultrawide is capped. */
    max-width: 80rem;
  }
  .ltc-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.125rem 1.125rem;
  }
  .ltc-panel-title {
    margin: 0 0 0.875rem;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--accent-walnut);
    border-bottom: none;
  }
  .ltc-field {
    margin-bottom: 1rem;
  }
  .ltc-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .ltc-field {
    /* sfr-ui sizes date fields off its own form layout; inside a grid panel they
       need to fill the column instead -- but capped, since a 10-character date
       stretched to the full width of an ultrawide panel looks unfinished and is
       out of step with the date inputs on neighbouring screens. */
    /* .pretty carries the border, radius and font but sets no box metrics, since
       sfr normally sizes its fields from the form-builder layout this one is not
       part of. */
  }
  .ltc-field input[type=text] {
    width: 100%;
    max-width: 13rem;
    height: 32px;
    padding: 4px 8px;
    box-sizing: border-box;
  }
  .ltc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
  }
  .ltc-table th,
  .ltc-table td {
    padding: 0.4375rem 0.5rem;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border-light);
    background: none;
  }
  .ltc-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-medium);
  }
  .ltc-table tbody th {
    font-weight: 600;
    white-space: nowrap;
  }
  .ltc-table tbody tr:last-child th,
  .ltc-table tbody tr:last-child td {
    border-bottom: none;
  }
  .ltc-days {
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    width: 3.5rem;
  }
  .ltc-result {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  /* The row matching the order's own lead time. */
  .ltc-table tbody tr.is-highlighted th,
  .ltc-table tbody tr.is-highlighted td {
    background: var(--status-open-bg);
    color: var(--text-primary);
  }
  .ltc-table tbody tr.is-highlighted .ltc-result {
    font-weight: 700;
  }
  .ltc-note {
    margin: 1.25rem 0 0;
    font-size: 0.75rem;
    color: var(--text-tertiary);
  }
  /* Inside a modal the panels are already framed by the dialog, so their own
     card chrome is a white box on a white surface. Strip it and let the grid gap
     do the separating, the way the app's other modals present their content. */
  .ltc-in-modal {
    /* The modal supplies no body padding of its own -- sfr's forms bring their
       own -- so without this the content sits flush against the dialog edge and
       misaligns with the title above it. 18px matches the h1's horizontal
       padding, so the content lines up with "COM Calculator". */
    padding: 0.25rem 18px 18px;
  }
  .ltc-in-modal .ltc-panel {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
  }
  .ltc-in-modal .ltc-panels {
    gap: 1.25rem 2.25rem;
  }
  .ltc-in-modal .ltc-order {
    margin-bottom: 1.25rem;
  }
  .ltc-in-modal .ltc-note {
    margin-top: 1rem;
  }
  /* Modal only -- the full page has nothing to close. */
  .ltc-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
  }
}
@layer components {
  .locale-toggle {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
  }
  .locale-toggle strong {
    color: var(--text-primary);
  }
}
@charset "UTF-8";
@layer components {
  .master-schedule {
    --ms-dept-done: var(--status-open);
    --ms-dept-done-bg: var(--status-open-bg);
    --ms-dept-working: var(--status-hold);
    --ms-dept-working-bg: var(--status-hold-bg);
    --ms-cell-line: rgba(200, 189, 178, .35);
    --ms-sample-row-bg: #f3ecfb;
    --ms-sample-row-hover-bg: #ebdff8;
    --ms-head-row: 24px;
    --ms-head-sections: 34px;
    --ms-week-head: 37px;
    container-type: inline-size;
    min-width: 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    padding: 4px 0 16px;
  }
  .master-schedule *, .master-schedule *::before, .master-schedule *::after {
    box-sizing: border-box;
  }
  .master-schedule h1, .master-schedule p {
    margin: 0;
  }
  .master-schedule .ms-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .master-schedule .ms-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 4px;
  }
  .master-schedule h1 {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.2;
  }
  .master-schedule .ms-intro {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
  }
  .master-schedule .ms-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
  .master-schedule .ms-tools .rb-btn {
    margin: 0;
  }
  .master-schedule .ms-search {
    position: relative;
    display: flex;
    align-items: center;
  }
  .master-schedule .ms-search input {
    width: 290px;
    max-width: 70vw;
    height: 34px;
    margin: 0;
    padding: 0 34px 0 30px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    font: 12px var(--font-body);
  }
  .master-schedule .ms-search svg {
    position: absolute;
    left: 9px;
    width: 14px;
    height: 14px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
  }
  .master-schedule .ms-search kbd {
    position: absolute;
    right: 8px;
    font: 10px var(--font-mono);
    color: var(--text-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    padding: 0 5px;
  }
  .master-schedule .ms-hitnav {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
  }
  .master-schedule .ms-hitnav .ms-count {
    min-width: 92px;
  }
  .master-schedule .ms-step {
    padding: 4px 9px;
  }
  .master-schedule .ms-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .master-schedule .ms-check input {
    margin: 0;
    accent-color: var(--accent-walnut);
  }
  .master-schedule .ms-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
  }
  .master-schedule .ms-filters-on {
    border-color: var(--accent-walnut);
    box-shadow: inset 3px 0 0 var(--accent-walnut);
  }
  .master-schedule .ms-filters-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .master-schedule .ms-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .master-schedule .ms-filter-label {
    float: left;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .master-schedule .ms-filter input[type=radio], .master-schedule .ms-filter input[type=checkbox] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
  }
  .master-schedule .ms-seg {
    display: inline-flex;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
  }
  .master-schedule .ms-seg label + label span {
    border-left: 1px solid var(--border-light);
  }
  .master-schedule .ms-seg span, .master-schedule .ms-chip span {
    display: inline-block;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    background: var(--bg-card);
    cursor: pointer;
    user-select: none;
  }
  .master-schedule .ms-chip span {
    border: 1px solid var(--border-light);
    border-radius: 999px;
  }
  .master-schedule .ms-seg span:hover, .master-schedule .ms-chip span:hover {
    background: var(--row-stripe);
  }
  .master-schedule .ms-seg input:checked + span, .master-schedule .ms-chip input:checked + span {
    color: var(--text-inverse);
    background: var(--accent-walnut);
    border-color: var(--accent-walnut);
  }
  .master-schedule .ms-chip input:checked + span::after {
    content: " ✕";
  }
  .master-schedule .ms-filter input:focus-visible + span {
    outline: 2px solid var(--accent-walnut);
    outline-offset: 2px;
  }
  .master-schedule .ms-filter-select {
    height: 30px;
    margin: 0;
    padding: 0 8px;
    min-width: 170px;
    max-width: 260px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font: 12px var(--font-body);
  }
  .master-schedule .ms-filter-select.ms-filter-set {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 1px var(--accent-walnut);
    font-weight: 700;
  }
  .master-schedule .ms-filters-clear {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-walnut);
  }
  .master-schedule .ms-filters-note {
    font-size: 12px;
    color: var(--text-secondary);
  }
  .master-schedule .ms-filters-tag {
    padding: 1px 5px;
    border-radius: 3px;
    font: 700 11px var(--font-mono);
    color: var(--text-inverse);
    background: var(--accent-walnut);
  }
  .master-schedule .ms-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 10.5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
  }
  .master-schedule .ms-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .master-schedule .ms-sw {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    font: 800 9px/1 var(--font-body);
    font-style: normal;
  }
  .master-schedule .ms-legend .ms-legend-eng-key {
    gap: 6px;
  }
  .master-schedule .ms-legend-eng-key b {
    font-weight: 600;
    color: var(--text-primary, inherit);
  }
  .master-schedule .ms-legend-eng {
    width: auto;
    min-width: 15px;
    padding: 0 3px;
    font-weight: 700;
  }
  .master-schedule .ms-legend-eng-none {
    background: #fbeeee;
    color: #c47a7a;
  }
  .master-schedule .ms-legend-eng-wait {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .master-schedule .ms-legend-eng-done {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .master-schedule .ms-legend-eng-na {
    background: var(--row-stripe);
    color: var(--text-tertiary);
  }
  .master-schedule .ms-legend-eng-plain {
    box-shadow: inset 0 0 0 1px var(--border-light);
    color: var(--text-tertiary);
  }
  .master-schedule .ms-legend-eng-rev {
    background-image: linear-gradient(225deg, var(--status-rush) 0 7px, transparent 7px);
    box-shadow: inset 0 0 0 1px var(--border-light);
  }
  .master-schedule .ms-alert {
    margin-bottom: 10px;
    padding: 9px 12px;
    border: 1px solid var(--status-rush);
    border-radius: 6px;
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 12px;
    font-weight: 600;
  }
  .master-schedule .ms-main {
    display: grid;
    grid-template-columns: 158px minmax(0, 1fr);
    gap: 12px;
    height: calc(100vh - 340px);
    min-height: 360px;
  }
  .master-schedule .ms-rail {
    overflow: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
  }
  .master-schedule .ms-rail-label {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .master-schedule .ms-rail-week {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0 8px;
    width: 100%;
    text-align: left;
    padding: 7px 12px;
    border: 0;
    border-bottom: 1px solid var(--ms-cell-line);
    background: transparent;
    cursor: pointer;
  }
  .master-schedule .ms-rail-week:hover {
    background: var(--row-stripe);
  }
  .master-schedule .ms-rail-week.ms-on {
    background: var(--row-stripe);
    box-shadow: inset 3px 0 0 var(--accent-walnut);
  }
  .master-schedule .ms-rail-week.ms-dim {
    opacity: 0.4;
  }
  .master-schedule .ms-rail-name {
    font: 700 16px/1 var(--font-display);
  }
  .master-schedule .ms-rail-now {
    font: 800 9px/1 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-brass);
    margin-left: 6px;
  }
  .master-schedule .ms-rail-count {
    font: 11px var(--font-mono);
    color: var(--text-tertiary);
  }
  .master-schedule .ms-rail-dates {
    grid-column: 1/-1;
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 3px;
  }
  .master-schedule .ms-sheet {
    overflow-anchor: none;
    overflow: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overscroll-behavior: contain;
  }
  .master-schedule .ms-grid {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 1150px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }
  .master-schedule .ms-col-wo {
    width: 172px;
  }
  .master-schedule .ms-col-thumb {
    width: 40px;
  }
  .master-schedule .ms-col-article-no {
    width: 104px;
  }
  .master-schedule .ms-col-article {
    width: 150px;
  }
  .master-schedule .ms-col-pcs {
    width: 44px;
  }
  .master-schedule .ms-col-dept {
    width: 46px;
  }
  .master-schedule .ms-col-units {
    width: 48px;
  }
  .master-schedule .ms-col-pillows {
    width: 60px;
  }
  .master-schedule .ms-col-truck {
    width: 44px;
  }
  .master-schedule .ms-col-mat {
    width: 74px;
  }
  .master-schedule .ms-col-fs {
    width: 88px;
  }
  .master-schedule thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 6px 7px;
    background: var(--bg-secondary);
    border-bottom: 1.5px solid var(--border-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .master-schedule thead tr:first-child th:not([rowspan]) {
    height: var(--ms-head-row);
  }
  .master-schedule thead tr.ms-head-sections th {
    top: var(--ms-head-row);
    height: var(--ms-head-sections);
  }
  .master-schedule th.ms-dept-group {
    padding: 3px 2px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    cursor: help;
    border-bottom: 1px solid var(--border-light);
  }
  .master-schedule th.ms-num, .master-schedule td.ms-num {
    text-align: right;
  }
  .master-schedule .ms-week-head th {
    position: sticky;
    top: calc(var(--ms-head-row) + var(--ms-head-sections));
    z-index: 3;
    height: var(--ms-week-head);
    padding: 6px 10px;
    text-align: left;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1.5px solid var(--border-light);
    text-transform: none;
    letter-spacing: 0;
  }
  .master-schedule .ms-week-inner {
    position: sticky;
    left: 10px;
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
  }
  .master-schedule .ms-week-label {
    font: 700 18px/1.2 var(--font-display);
    color: var(--text-primary);
  }
  .master-schedule .ms-week-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .master-schedule .ms-week-pill {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-brass);
  }
  .master-schedule .ms-week-wip .ms-week-head th {
    background: var(--status-rush-bg);
  }
  .master-schedule .ms-week-wip .ms-week-label {
    color: var(--status-rush);
  }
  .master-schedule td {
    padding: 4px 7px;
    height: 26px;
    border-bottom: 1px solid var(--ms-cell-line);
    vertical-align: middle;
    white-space: nowrap;
    background: var(--bg-card);
  }
  .master-schedule .ms-block:hover td:not(.ms-dept):not(.ms-eng-task):not([class*=ms-truck-]):not([class*=ms-fsc-]) {
    background: var(--row-stripe);
  }
  .master-schedule .ms-run-sample-live > td:not(.ms-dept):not(.ms-wo):not(.ms-eng-task):not([class*=ms-truck-]):not([class*=ms-fsc-]) {
    background: var(--ms-sample-row-bg);
  }
  .master-schedule .ms-block:hover .ms-run-sample-live > td:not(.ms-dept):not(.ms-wo):not(.ms-eng-task):not([class*=ms-truck-]):not([class*=ms-fsc-]) {
    background: var(--ms-sample-row-hover-bg);
  }
  .master-schedule .ms-block .ms-run:first-child td {
    border-top: 1px solid var(--border-light);
  }
  .master-schedule .mono {
    font-family: var(--font-mono);
    font-size: 11px;
  }
  .master-schedule .ms-wo a, .master-schedule .ms-wo-plain {
    font: 700 12px var(--font-mono);
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .master-schedule .ms-wo-plain {
    color: var(--text-primary);
  }
  .master-schedule .ms-wo a:hover {
    text-decoration: underline;
  }
  .master-schedule .ms-order-ship {
    display: block;
    font-size: 10px;
    color: var(--text-tertiary);
  }
  .master-schedule .ms-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 4px;
    font: 800 9px/1.4 var(--font-body);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .master-schedule .ms-tag-hold {
    color: var(--status-hold);
    background: var(--status-hold-bg);
  }
  .master-schedule .ms-tag-shipped {
    color: var(--status-open);
    background: var(--status-open-bg);
  }
  .master-schedule .ms-tag-unpaid {
    color: var(--status-rush);
    background: var(--status-rush-bg);
  }
  .master-schedule .ms-article {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
  }
  .master-schedule .ms-article-no a {
    color: var(--text-secondary);
    text-decoration: none;
  }
  .master-schedule .ms-article-no a:hover {
    color: var(--accent-walnut);
    text-decoration: underline;
  }
  .master-schedule .ms-thumb-cell {
    padding: 2px;
    text-align: center;
  }
  .master-schedule .ms-thumb {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-subtle);
    vertical-align: middle;
  }
  .master-schedule .ms-thumb-empty {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px dashed var(--border-light);
    border-radius: 4px;
    color: var(--text-tertiary);
    font-size: 10px;
  }
  .master-schedule .ms-date {
    width: 118px;
    height: 22px;
    margin: 0;
    padding: 1px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font: 600 11px var(--font-mono);
    color: var(--text-primary);
  }
  .master-schedule .ms-date:hover {
    border-color: var(--border-light);
    background: var(--bg-card);
  }
  .master-schedule .ms-date:focus-visible {
    border-color: var(--accent-walnut);
    background: var(--bg-card);
    outline: 2px solid var(--accent-walnut);
    outline-offset: 1px;
  }
  .master-schedule .ms-date-readonly {
    color: var(--text-primary);
  }
  .master-schedule .ms-date.ms-changed {
    border-color: var(--accent-brass);
    background: #FBF3DE;
    font-weight: 700;
  }
  .master-schedule .ms-error {
    display: block;
    margin-top: 2px;
    color: var(--status-rush);
    font-size: 10.5px;
    font-weight: 600;
    white-space: normal;
  }
  .master-schedule .ms-ack {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--status-rush);
    white-space: normal;
  }
  .master-schedule .ms-ack input {
    margin: 0;
    accent-color: var(--accent-walnut);
  }
  .master-schedule .ms-ship-late .ms-date, .master-schedule .ms-ship-late .ms-date-readonly {
    color: var(--status-rush);
    text-decoration: underline;
  }
  .master-schedule .ms-wo-client {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .master-schedule .ms-wo-project {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    color: var(--text-tertiary);
  }
  .master-schedule .ms-wo-pm, .master-schedule .ms-wo-rsd {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .master-schedule .ms-wo-etc {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .master-schedule .ms-wo-etc .ms-date {
    width: 104px;
    height: 16px;
  }
  .master-schedule .ms-wo-key {
    display: inline-block;
    min-width: 26px;
    font: 800 9px var(--font-body);
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
  }
  .master-schedule td.ms-mat {
    text-align: center;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
  }
  .master-schedule th.ms-wo, .master-schedule td.ms-wo {
    left: 0;
    width: 172px;
    min-width: 172px;
    max-width: 172px;
  }
  .master-schedule th.ms-article-no, .master-schedule td.ms-article-no {
    left: 172px;
    width: 104px;
    min-width: 104px;
    max-width: 104px;
  }
  .master-schedule th.ms-article, .master-schedule td.ms-article {
    left: 276px;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    box-shadow: inset -1px 0 0 var(--border-light);
  }
  .master-schedule td.ms-wo, .master-schedule td.ms-article-no, .master-schedule td.ms-article {
    position: sticky;
    z-index: 2;
  }
  .master-schedule thead th.ms-wo, .master-schedule thead th.ms-article-no, .master-schedule thead th.ms-article {
    z-index: 5;
    white-space: normal;
  }
  .master-schedule td.ms-wo, .master-schedule td.ms-article-no {
    white-space: normal;
  }
  .master-schedule td.ms-wo[rowspan] {
    vertical-align: top;
  }
  .master-schedule .ms-wo-in {
    position: sticky;
    top: calc(var(--ms-head-row) + var(--ms-head-sections) + var(--ms-week-head) + 4px);
  }
  .master-schedule td.ms-article-no:has(> .ms-seq-run) {
    padding-top: 2px;
    padding-bottom: 2px;
    line-height: 1.1;
  }
  .master-schedule td.ms-article-no:has(> .ms-seq-run) > .ms-seq-run {
    margin-left: 0;
  }
  .master-schedule td.ms-article-no:has(> .ms-seq-run) > .ms-menu {
    position: absolute;
    top: 2px;
    right: 5px;
    margin: 0;
  }
  .master-schedule td.ms-article-no:has(> .ms-seq-run) > a:first-child {
    display: inline-block;
    max-width: calc(100% - 22px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
  }
  .master-schedule td.ms-article-no:has(> .ms-menu[open]) {
    z-index: 4;
  }
  @container (min-width: 1360px) {
    .master-schedule th.ms-wo, .master-schedule td.ms-wo {
      position: sticky;
      left: 0px;
      width: 172px;
      min-width: 172px;
      max-width: 172px;
      box-shadow: none;
    }
    .master-schedule td.ms-wo {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-wo {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-thumb-cell, .master-schedule td.ms-thumb-cell {
      position: sticky;
      left: 172px;
      width: 40px;
      min-width: 40px;
      max-width: 40px;
      box-shadow: none;
    }
    .master-schedule td.ms-thumb-cell {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-thumb-cell {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-article-no, .master-schedule td.ms-article-no {
      position: sticky;
      left: 212px;
      width: 104px;
      min-width: 104px;
      max-width: 104px;
      box-shadow: none;
    }
    .master-schedule td.ms-article-no {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-article-no {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-article, .master-schedule td.ms-article {
      position: sticky;
      left: 316px;
      width: 150px;
      min-width: 150px;
      max-width: 150px;
      box-shadow: none;
    }
    .master-schedule td.ms-article {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-article {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-pcs, .master-schedule td.ms-pcs {
      position: sticky;
      left: 466px;
      width: 44px;
      min-width: 44px;
      max-width: 44px;
      box-shadow: none;
    }
    .master-schedule td.ms-pcs {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-pcs {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-units, .master-schedule td.ms-units {
      position: sticky;
      left: 510px;
      width: 48px;
      min-width: 48px;
      max-width: 48px;
      box-shadow: none;
    }
    .master-schedule td.ms-units {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-units {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-pillows, .master-schedule td.ms-pillows {
      position: sticky;
      left: 558px;
      width: 60px;
      min-width: 60px;
      max-width: 60px;
      box-shadow: none;
    }
    .master-schedule td.ms-pillows {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-pillows {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-truck, .master-schedule td.ms-truck {
      position: sticky;
      left: 618px;
      width: 44px;
      min-width: 44px;
      max-width: 44px;
      box-shadow: none;
    }
    .master-schedule td.ms-truck {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-truck {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-mat, .master-schedule td.ms-mat {
      position: sticky;
      left: 662px;
      width: 74px;
      min-width: 74px;
      max-width: 74px;
      box-shadow: none;
    }
    .master-schedule td.ms-mat {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-mat {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-fs-now, .master-schedule td.ms-fs-now {
      position: sticky;
      left: 736px;
      width: 88px;
      min-width: 88px;
      max-width: 88px;
      box-shadow: none;
    }
    .master-schedule td.ms-fs-now {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-fs-now {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-fs-next, .master-schedule td.ms-fs-next {
      position: sticky;
      left: 824px;
      width: 88px;
      min-width: 88px;
      max-width: 88px;
      box-shadow: none;
    }
    .master-schedule td.ms-fs-next {
      z-index: 2;
      overflow: clip;
      text-overflow: ellipsis;
    }
    .master-schedule thead th.ms-fs-next {
      z-index: 5;
      white-space: normal;
    }
    .master-schedule th.ms-fs-next, .master-schedule td.ms-fs-next {
      box-shadow: inset -1px 0 0 var(--border-light);
    }
    .master-schedule td.ms-wo, .master-schedule td.ms-article-no {
      overflow: visible;
    }
  }
  .master-schedule th.ms-dept {
    min-width: 40px;
    padding: 3px 1px;
    text-align: center;
    white-space: normal;
    text-transform: none;
    letter-spacing: 0;
    font: 600 9.5px/1.1 var(--font-body);
    vertical-align: middle;
    cursor: help;
  }
  .master-schedule th.ms-dept-first {
    border-left: 2px solid var(--border-light);
  }
  .master-schedule td.ms-dept {
    padding: 0;
    text-align: center;
    font: 700 11px var(--font-mono);
    border-left: 1px solid var(--ms-cell-line);
    cursor: pointer;
  }
  .master-schedule td.ms-dept:hover {
    outline: 2px solid var(--accent-walnut);
    outline-offset: -2px;
  }
  .master-schedule td.ms-dept-na {
    cursor: default;
  }
  .master-schedule td.ms-dept-na:hover {
    outline: none;
  }
  .master-schedule td.ms-dept.ms-tag-hit {
    box-shadow: inset 0 0 0 2px var(--accent-walnut);
  }
  .master-schedule .ms-col-eng {
    width: 48px;
    min-width: 48px;
  }
  .master-schedule th.ms-eng-group {
    padding: 3px 2px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    cursor: help;
    border-bottom: 1px solid var(--border-light);
    border-left: 2px solid var(--border-light);
  }
  .master-schedule th.ms-eng {
    min-width: 48px;
    padding: 3px 1px;
    text-align: center;
    white-space: normal;
    text-transform: none;
    letter-spacing: 0;
    font: 600 9.5px/1.1 var(--font-body);
    vertical-align: middle;
    cursor: help;
  }
  .master-schedule tr.ms-head-sections th.ms-eng:first-child {
    border-left: 2px solid var(--border-light);
  }
  .master-schedule td.ms-eng {
    min-width: 48px;
    padding: 0 1px;
    text-align: center;
    font: 700 10px var(--font-mono);
    color: var(--text-tertiary);
    border-left: 1px solid var(--ms-cell-line);
    white-space: nowrap;
  }
  .master-schedule tr.ms-run > td:not(.ms-eng) + td.ms-eng {
    border-left: 2px solid var(--border-light);
  }
  .master-schedule td.ms-eng-task {
    position: relative;
    line-height: 1.15;
  }
  .master-schedule td.ms-eng-task .ms-eng-main, .master-schedule td.ms-eng-task .ms-eng-tag {
    display: block;
  }
  .master-schedule td.ms-eng-task .ms-eng-tag {
    font: 600 9px/1.2 var(--font-body);
  }
  .master-schedule td.ms-eng-task .ms-eng-file {
    position: absolute;
    top: 1px;
    right: 3px;
    font: 800 9px/1 var(--font-body);
    color: var(--status-open);
  }
  .master-schedule td.ms-eng-task.ms-eng-done .ms-eng-file {
    color: inherit;
  }
  .master-schedule td.ms-eng-task.ms-eng-none, .master-schedule td.ms-eng-task.ms-eng-assigned {
    background-color: #fbeeee;
    color: #c47a7a;
  }
  .master-schedule td.ms-eng-task.ms-eng-wait {
    background-color: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .master-schedule td.ms-eng-task.ms-eng-done {
    background-color: var(--status-open-bg);
    color: var(--status-open);
  }
  .master-schedule td.ms-eng-task.ms-eng-na {
    background-color: var(--row-stripe);
    color: var(--text-tertiary);
  }
  .master-schedule td.ms-eng-task.ms-eng-rev {
    background-image: linear-gradient(225deg, var(--status-rush) 0 7px, transparent 7px);
  }
  .master-schedule tr.ms-eng-untracked td.ms-eng-none {
    background-color: transparent;
    color: var(--text-tertiary);
  }
  .master-schedule[data-engineering-task-url] td.ms-eng-task {
    cursor: pointer;
  }
  .master-schedule[data-engineering-task-url] td.ms-eng-task:hover {
    outline: 2px solid var(--accent-walnut);
    outline-offset: -2px;
  }
  .master-schedule.ms-editing-dates td.ms-dept {
    cursor: not-allowed;
  }
  .master-schedule.ms-editing-dates td.ms-dept:hover {
    outline: none;
  }
  .master-schedule td.ms-dept i, .master-schedule td.ms-dept::after, .master-schedule .ms-legend-tag {
    font: 600 9px/1.2 var(--font-body);
    letter-spacing: 0;
    white-space: nowrap;
  }
  .master-schedule td.ms-dept i, .master-schedule td.ms-dept::after {
    display: block;
  }
  .master-schedule td.ms-dept i, .master-schedule .ms-legend-assigned {
    width: fit-content;
    margin: 0 auto;
    font-style: normal;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 1px solid;
  }
  .master-schedule td.ms-dept::after, .master-schedule .ms-legend-default {
    font-style: italic;
    font-weight: 500;
    color: var(--text-tertiary);
  }
  .master-schedule .ms-legend-tag {
    display: inline-block;
    margin: 0;
  }
  .master-schedule td.ms-truck {
    padding: 0 2px;
    text-align: center;
    font-weight: 800;
    font-size: 11px;
  }
  .master-schedule[data-truck-url] td.ms-truck {
    cursor: pointer;
  }
  .master-schedule[data-truck-url] td.ms-truck:hover {
    outline: 2px solid var(--accent-walnut);
    outline-offset: -2px;
  }
  .master-schedule.ms-editing-dates td.ms-truck {
    cursor: not-allowed;
  }
  .master-schedule.ms-editing-dates td.ms-truck:hover {
    outline: none;
  }
  .master-schedule td.ms-fs-now, .master-schedule td.ms-fs-next {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    padding: 0 3px;
    text-align: center;
    font: 800 9px/1.1 var(--font-body);
    letter-spacing: 0.02em;
    white-space: normal;
    overflow: hidden;
  }
  .master-schedule td.ms-fs-now:empty::after, .master-schedule td.ms-fs-next:empty::after {
    content: "—";
    color: var(--text-tertiary);
    font-weight: 400;
  }
  .master-schedule td.ms-fs-unknown {
    color: var(--text-tertiary);
    font-weight: 400;
  }
  .master-schedule[data-floor-status-url] td.ms-fs-now, .master-schedule[data-floor-status-url] td.ms-fs-next {
    cursor: pointer;
  }
  .master-schedule[data-floor-status-url] td.ms-fs-now:hover, .master-schedule[data-floor-status-url] td.ms-fs-next:hover {
    outline: 2px solid var(--accent-walnut);
    outline-offset: -2px;
  }
  .master-schedule .ms-dept-completed {
    background: var(--ms-dept-done-bg);
    color: var(--ms-dept-done);
  }
  .master-schedule .ms-dept-working {
    background: var(--ms-dept-working-bg);
    color: var(--ms-dept-working);
  }
  .master-schedule .ms-dept-on_hold {
    background: var(--status-closed-bg);
    color: var(--status-closed);
  }
  .master-schedule td.ms-dept.ms-dept-rework, .master-schedule .ms-sw.ms-dept-rework {
    background: var(--status-rework);
    color: var(--text-inverse);
    background-image: none;
    font-weight: 800;
  }
  .master-schedule td.ms-dept.ms-dept-rework i {
    color: inherit;
  }
  .master-schedule .ms-dept-pending {
    background: #fdeeee;
    color: #b5575a;
    box-shadow: inset 0 0 0 2px var(--bg-card), inset 0 0 0 3px #f2c9ca;
  }
  .master-schedule .ms-dept-na {
    background: repeating-linear-gradient(135deg, var(--bg-card) 0 4px, #f5f2ee 4px 5px);
  }
  .master-schedule .ms-sw.ms-dept-pending {
    box-shadow: inset 0 0 0 1px #f2c9ca;
  }
  .master-schedule .ms-sub:not(.ms-dept-completed):not(.ms-dept-on_hold):not(.ms-dept-rework):not(.ms-dept-na) {
    background-color: #FFD9B3;
    color: #9A3412;
  }
  .master-schedule .ms-sub:not(.ms-dept-completed):not(.ms-dept-on_hold):not(.ms-dept-rework):not(.ms-dept-na):not(.ms-tag-hit) {
    box-shadow: none;
  }
  .master-schedule td.ms-dept.ms-sub:not(.ms-assigned):not(.ms-dept-completed)::after {
    content: "SUB";
    color: inherit;
  }
  .master-schedule .ms-empty {
    padding: 40px 12px;
    text-align: center;
    color: var(--text-tertiary);
  }
  .master-schedule .ms-pending-cell {
    padding: 14px 12px;
    text-align: left;
    background: repeating-linear-gradient(135deg, var(--bg-card) 0 6px, var(--bg-subtle) 6px 7px);
  }
  .master-schedule .ms-pending-link {
    display: inline-block;
    position: sticky;
    left: 12px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
  }
  .master-schedule .ms-parked-cell {
    padding: 0;
    border: 0;
    background: repeating-linear-gradient(135deg, var(--bg-card) 0 6px, var(--bg-subtle) 6px 7px);
  }
  .master-schedule .ms-loading .ms-pending-link {
    color: var(--text-tertiary);
    pointer-events: none;
  }
  .master-schedule .ms-loading .ms-pending-cell::after {
    content: " " attr(data-loading);
    color: var(--text-tertiary);
    font-size: 11px;
  }
  .master-schedule .ms-failed .ms-pending-cell::after {
    content: " " attr(data-failed);
    color: var(--status-rush);
    font-size: 11px;
  }
  .master-schedule .ms-tray {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 12px;
    padding: 9px 12px;
    background: var(--bg-card);
    border: 1.5px solid var(--accent-walnut);
    border-radius: 8px;
    font-size: 12px;
  }
  .master-schedule .ms-tray[hidden] {
    display: none;
  }
  .master-schedule .ms-tray .rb-btn {
    margin: 0;
  }
  .master-schedule .ms-tray-list {
    flex: 1;
    min-width: 180px;
    color: var(--text-secondary);
    font: 11px var(--font-mono);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  @container (max-width: 860px) {
    .master-schedule .ms-main {
      grid-template-columns: minmax(0, 1fr);
      height: auto;
    }
    .master-schedule .ms-rail {
      display: none;
    }
    .master-schedule .ms-sheet {
      max-height: 70vh;
    }
  }
  .master-schedule.ms-full {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background: var(--bg-primary);
  }
  .master-schedule.ms-full .ms-eyebrow, .master-schedule.ms-full .ms-intro, .master-schedule.ms-full .ms-filters, .master-schedule.ms-full .ms-legend, .master-schedule.ms-full .ms-rail {
    display: none;
  }
  .master-schedule.ms-full .ms-heading {
    align-items: center;
    margin-bottom: 8px;
  }
  .master-schedule.ms-full h1 {
    font-size: 20px;
  }
  .master-schedule.ms-full .ms-heading > div {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .master-schedule.ms-full .ms-full-filtered {
    display: inline-block;
  }
  .master-schedule.ms-full .ms-week-jump {
    display: block;
  }
  .master-schedule.ms-full .ms-search input {
    width: 210px;
  }
  .master-schedule.ms-full #ms-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .master-schedule.ms-full .ms-main {
    flex: 1;
    min-height: 0;
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .master-schedule.ms-full .ms-sheet {
    max-height: none;
  }
  .master-schedule.ms-full .ms-tray {
    margin-top: 8px;
  }
  .master-schedule .ms-full-toggle[hidden] {
    display: none;
  }
  .master-schedule .ms-full-toggle {
    margin-left: 8px;
  }
  .master-schedule .ms-week-jump {
    display: none;
  }
  .master-schedule .ms-week-jump select {
    height: 30px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    font: 600 12px var(--font-body);
    color: var(--text-primary);
    cursor: pointer;
  }
  .master-schedule .ms-full-filtered {
    display: none;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .master-schedule .ms-place {
    display: contents;
  }
  .master-schedule .ms-seq {
    display: inline-flex;
    gap: 1px;
    vertical-align: middle;
    margin-left: 4px;
  }
  .master-schedule .ms-arrow {
    width: 16px;
    height: 14px;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font: 8px/1 var(--font-body);
    cursor: pointer;
  }
  .master-schedule .ms-arrow:hover:not(:disabled) {
    color: var(--accent-walnut);
    border-color: var(--accent-walnut);
  }
  .master-schedule .ms-arrow:disabled {
    opacity: 0.3;
    cursor: default;
  }
  .master-schedule .ms-seq-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 3px 0 0;
  }
  .master-schedule .ms-move-btn {
    display: inline-block;
    height: 14px;
    margin-left: 3px;
    padding: 0 5px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font: 600 10px/12px var(--font-body);
    text-decoration: none;
    white-space: nowrap;
  }
  .master-schedule .ms-wo a.ms-move-btn, .master-schedule .ms-article-no a.ms-move-btn {
    font: 600 10px/12px var(--font-body);
    color: var(--text-secondary);
    text-decoration: none;
  }
  .master-schedule .ms-wo a.ms-move-btn:hover, .master-schedule .ms-article-no a.ms-move-btn:hover {
    color: var(--accent-walnut);
    border-color: var(--accent-walnut);
    text-decoration: none;
  }
  .master-schedule a.ms-move-btn.ms-disabled {
    opacity: 0.35;
    pointer-events: none;
  }
  .master-schedule.ms-editing-dates .ms-seq, .master-schedule.ms-editing-dates .ms-menu {
    opacity: 0.35;
    pointer-events: none;
  }
  .master-schedule .ms-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;
    padding: 9px 14px;
    background: var(--text-primary);
    color: var(--bg-card);
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }
  .master-schedule .ms-flash td:not(.ms-dept-rework) {
    animation: ms-flash 2.4s ease-out;
  }
  @keyframes ms-flash {
    0%, 40% {
      background: var(--status-hold-bg);
    }
    100% {
      background: var(--bg-card);
    }
  }
  .master-schedule .ms-menu-panel a.ms-disabled {
    opacity: 0.4;
    pointer-events: none;
  }
  .master-schedule tbody.ms-batch td:first-child, .master-schedule tbody.ms-batch th:first-child {
    box-shadow: inset 4px 0 0 #8b5fc7;
  }
  .master-schedule tbody.ms-batch {
    background: #faf7fe;
  }
  .master-schedule tr.ms-batch-head th {
    padding: 6px 10px;
    background: #efe6fb;
    border-top: 1px solid #d8c6f2;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
  }
  .master-schedule .ms-batch-inner {
    position: sticky;
    left: 10px;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .master-schedule .ms-batch-name {
    font: 800 12px var(--font-body);
    color: #5b2d91;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .master-schedule .ms-batch-depts-list {
    font: 700 10px var(--font-mono);
    color: #5b2d91;
  }
  .master-schedule .ms-batch-due {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
  }
  .master-schedule td.ms-dept-batched:not(.ms-dept-rework) {
    background-image: linear-gradient(rgba(139, 95, 199, 0.28), rgba(139, 95, 199, 0.28));
    color: #4b2380;
  }
  html.ms-full-page {
    overflow: hidden;
  }
  html.ms-full-page .rb-flash {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  }
  .ms-run-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eadcf7;
    color: #5b2d91;
    font: 700 9.5px/1.5 var(--font-body);
    white-space: nowrap;
  }
  .ms-expedite {
    margin-left: 3px;
    color: var(--status-rush);
    font-weight: 800;
  }
  .ms-menu {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
  }
  .ms-menu summary {
    list-style: none;
    cursor: pointer;
    width: 18px;
    height: 14px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    text-align: center;
    font: 700 11px/12px var(--font-body);
    color: var(--text-secondary);
    background: var(--bg-card);
  }
  .ms-menu summary::-webkit-details-marker {
    display: none;
  }
  .ms-menu[open] summary {
    color: var(--accent-walnut);
    border-color: var(--accent-walnut);
  }
  .ms-menu-panel {
    position: absolute;
    left: 0;
    top: 16px;
    z-index: 20;
    min-width: 160px;
    padding: 4px 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  }
  .ms-menu-panel a {
    display: block;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
  }
  .ms-menu-panel a:hover {
    background: var(--row-stripe);
  }
  .ms-popup {
    padding: 12px 18px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-primary);
  }
  .ms-popup .ms-popup-what {
    margin: 0 0 10px;
  }
  .ms-popup .ms-popup-errors {
    margin: 0 0 10px;
    padding: 8px 12px 8px 26px;
    background: var(--status-hold-bg);
    border-radius: 5px;
  }
  .ms-popup .ms-popup-field {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
  }
  .ms-popup .ms-popup-field select, .ms-popup .ms-popup-field input {
    display: block;
    margin-top: 4px;
    width: 100%;
  }
  .ms-popup .ms-popup-list {
    max-height: 50vh;
    overflow: auto;
    border: 1px solid var(--border-light);
    border-radius: 6px;
  }
  .ms-popup .ms-slot {
    display: grid;
    grid-template-columns: 18px 44px 90px 84px 30px 1fr 1fr 60px 44px;
    gap: 6px;
    align-items: center;
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
  }
  .ms-popup .ms-slot:last-child {
    border-bottom: 0;
  }
  .ms-popup .ms-slot:hover {
    background: var(--row-stripe);
  }
  .ms-popup .ms-slot input {
    margin: 0;
  }
  .ms-popup .ms-slot-client, .ms-popup .ms-slot-project {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ms-popup .ms-slot-combine {
    grid-template-columns: 18px 60px 90px 60px 1fr;
  }
  .ms-popup .ms-popup-total {
    margin: 8px 0;
  }
  .ms-popup .ms-popup-note {
    margin: 0 0 10px;
    color: var(--text-secondary);
  }
  .ms-popup .ms-popup-late {
    margin: 10px 0 0;
    padding: 8px 12px;
    background: var(--status-hold-bg);
    border-radius: 5px;
  }
  .ms-popup .ms-popup-late label {
    display: block;
    margin-top: 6px;
    font-weight: 600;
  }
  .ms-popup .ms-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
  }
  .ms-popup .ms-popup-actions .rb-btn {
    margin: 0;
  }
  .ms-popup .ms-popup-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
  }
  .ms-popup .ms-popup-footer .ms-popup-actions {
    margin-top: 0;
    padding-left: 16px;
    border-left: 1px solid var(--border-light);
  }
  .ms-popup .ms-complete .ms-popup-field {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
  }
  .ms-popup .ms-complete .ms-required {
    color: var(--status-rush);
  }
  .ms-popup .ms-complete-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .ms-popup .ms-complete-row .rb-btn {
    margin: 0;
  }
  .ms-popup .ms-complete-count {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary);
  }
  .ms-popup.ms-truck-popup {
    padding: 6px 20px 18px;
  }
  .ms-popup.ms-truck-popup input[type=text] {
    box-sizing: border-box;
    height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font: 13px var(--font-body);
    background: var(--bg-card);
  }
  .ms-popup .ms-truck-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -2px 0 10px;
  }
  .ms-popup .ms-truck-chip {
    border: 0;
    border-radius: 999px;
    padding: 3px 10px;
    font: 700 11px var(--font-mono);
    cursor: pointer;
  }
  .ms-popup .ms-truck-scope {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
  }
  .ms-popup .ms-truck-scope label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-weight: 600;
  }
  .ms-popup .ms-truck-scope input {
    margin: 0;
  }
  .ms-popup .ms-truck-hint {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11px;
  }
  .ms-popup.ms-fs-popup {
    padding: 6px 20px 18px;
  }
  .ms-popup .ms-fs-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: start;
  }
  .ms-popup .ms-fs-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .ms-popup .ms-fs-option {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 6px 4px;
    font: 800 10.5px/1.2 var(--font-body);
    cursor: pointer;
  }
  .ms-popup .ms-fs-option:hover, .ms-popup .ms-fs-option:focus-visible {
    outline: 2px solid var(--accent-walnut);
    outline-offset: 1px;
  }
  .ms-popup .ms-fs-option.ms-fs-current {
    outline: 3px solid var(--accent-walnut);
    outline-offset: 1px;
  }
  .ms-popup.ms-log {
    padding: 6px 12px 18px;
  }
  .ms-popup .ms-log-head {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
  }
  .ms-popup .ms-log-photo {
    display: block;
    width: 64px;
    height: 64px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-secondary);
  }
  .ms-popup .ms-log-wo {
    font-size: 16px;
    margin-right: 6px;
  }
  .ms-popup .ms-log-article {
    text-align: right;
  }
  .ms-popup .ms-log-muted {
    color: var(--text-tertiary);
    font-size: 12px;
  }
  .ms-popup .ms-log-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin: 4px 0 8px;
  }
  .ms-popup .ms-log-docs {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .ms-popup .ms-log-print {
    font-weight: 600;
  }
  .ms-popup .ms-log-packet {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ms-popup .ms-log-remove {
    margin-left: 8px;
    font-size: 11px;
    color: var(--text-secondary);
  }
  .ms-popup .ms-log-actions form {
    display: inline;
  }
  .ms-popup .ms-log-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
  }
  .ms-popup .ms-log-totals {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 12px;
  }
  .ms-popup .ms-log-tile {
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bg-muted);
  }
  .ms-popup .ms-log-tile-qty {
    background: var(--bg-secondary);
  }
  .ms-popup .ms-log-totals dt {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .ms-popup .ms-log-totals dd {
    margin: 2px 0 0;
    font: 700 24px/1.2 var(--font-body);
    color: var(--text-primary);
  }
  .ms-popup .ms-log-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .ms-popup .ms-log-actions .rb-btn {
    margin: 0;
  }
  .ms-popup .ms-log-hold-form, .ms-popup .ms-log-resume-form {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-subtle);
  }
  .ms-popup .ms-log-hold-form h3 {
    margin: 0 0 4px;
    font-size: 15px;
  }
  .ms-popup .ms-log-hold-form .ms-log-muted {
    margin: 0 0 10px;
  }
  .ms-popup .ms-log-hold-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
  }
  .ms-popup .ms-log-held {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-left: 5px solid var(--status-closed);
    border-radius: 8px;
    background: var(--status-closed-bg);
    color: var(--status-closed);
  }
  .ms-popup .ms-log-held-state {
    font-size: 18px;
    white-space: nowrap;
  }
  .ms-popup .ms-log-held-facts {
    flex: 1 1 16rem;
    margin: 0;
    font-size: 12px;
  }
  .ms-popup .ms-log-held-facts div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 8px;
  }
  .ms-popup .ms-log-held-facts dt {
    font-weight: 700;
  }
  .ms-popup .ms-log-held-facts dd {
    margin: 0;
    color: var(--text-primary);
    overflow-wrap: anywhere;
  }
  .ms-popup .ms-log-held .rb-btn {
    margin: 0;
  }
  .ms-popup .ms-log-resume-form {
    flex: 1 1 100%;
    margin: 0;
    color: var(--text-primary);
    background: var(--bg-card);
  }
  .ms-popup .ms-log-resume-form p {
    margin: 0 0 8px;
  }
  .ms-popup .ms-log-rework-form {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--status-rework);
    border-radius: 8px;
    background: var(--bg-subtle);
  }
  .ms-popup .ms-log-rework-form h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--status-rework);
  }
  .ms-popup .ms-log-rework-form .ms-log-muted {
    margin: 0 0 10px;
  }
  .ms-popup .ms-log-rework-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
  }
  .ms-popup .ms-log-rework-fields {
    display: grid;
    grid-template-columns: 1fr 7rem;
    gap: 12px;
  }
  .ms-popup .ms-log-rework-fields input {
    display: block;
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
  }
  .ms-popup .ms-log-rework {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 10px 20px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-left: 5px solid var(--status-rework);
    border-radius: 8px;
    background: var(--status-rework-bg);
  }
  .ms-popup .ms-log-rework-badge, .ms-popup .ms-res-table tr.ms-rework-row .rb-status-rework {
    background: var(--status-rework);
    color: var(--text-inverse);
  }
  .ms-popup .ms-log-rework-state {
    background: var(--bg-card);
  }
  .ms-popup .ms-log-rework-badge {
    align-self: center;
  }
  .ms-popup .ms-log-rework-qty {
    margin: 0;
  }
  .ms-popup .ms-log-rework-qty dt {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .ms-popup .ms-log-rework-qty dd {
    margin: 2px 0 0;
    font: 700 24px/1.2 var(--font-body);
    color: var(--status-rework);
    white-space: nowrap;
  }
  .ms-popup .ms-log-rework-requests {
    min-width: 0;
    margin: 0;
    padding: 0 0 0 20px;
    border-left: 1px solid var(--status-rework);
    list-style: none;
    font-size: 12px;
  }
  .ms-popup .ms-log-rework-request {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
  }
  .ms-popup .ms-log-rework-request + .ms-log-rework-request {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }
  .ms-popup .ms-log-rework-summary {
    flex: 1 1 14rem;
    min-width: 0;
  }
  .ms-popup .ms-log-rework-summary strong {
    font-size: 13px;
  }
  .ms-popup .ms-log-rework-description {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .ms-popup .ms-log-rework-sep {
    margin: 0 6px;
    color: var(--text-tertiary);
  }
  .ms-popup .ms-log-rework-view > summary {
    list-style: none;
    cursor: pointer;
  }
  .ms-popup .ms-log-rework-view > summary::-webkit-details-marker {
    display: none;
  }
  .ms-popup .ms-log-rework-view[open] {
    flex: 1 1 100%;
  }
  .ms-popup .ms-log-rework-facts {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--bg-card);
  }
  .ms-popup .ms-log-rework-facts div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 8px;
  }
  .ms-popup .ms-log-rework-facts dt {
    font-weight: 700;
  }
  .ms-popup .ms-log-rework-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
  }
  .ms-popup .ms-log-rework-state {
    align-self: start;
  }
  .ms-popup .ms-res-table tr.ms-rework-row td {
    background: var(--status-rework-bg);
  }
  .ms-popup .ms-rework-total {
    color: var(--status-rework);
  }
  .ms-popup .ms-log-report-fields {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .ms-popup .ms-log-report-fields:disabled .ms-res-table {
    opacity: 0.6;
  }
  .ms-popup .ms-log-held-note {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--status-closed);
  }
  .ms-popup.ms-log input[type=datetime-local], .ms-popup.ms-log input[type=number], .ms-popup.ms-log input[type=text] {
    box-sizing: border-box;
    height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font: 13px var(--font-body);
    background: var(--bg-card);
  }
  .ms-popup.ms-log .ms-log-notes-head input[type=text] {
    width: 220px;
  }
  .ms-popup .ms-log-done {
    margin: 8px 0 12px;
    font-weight: 600;
    color: var(--status-open);
  }
  .ms-popup .ms-log-notes {
    margin-top: 14px;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
  }
  .ms-popup .ms-log-notes-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .ms-popup .ms-log-notes-head h3 {
    margin: 0;
    font-size: 15px;
  }
  .ms-popup .ms-log-notes-head form {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .ms-popup .ms-log-table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
    font-size: 12px;
  }
  .ms-popup .ms-log-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-light);
    padding: 6px;
  }
  .ms-popup .ms-log-table td {
    padding: 6px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
  }
  .ms-popup .ms-log-editing td {
    vertical-align: middle;
  }
  .ms-popup .ms-log-table .ms-log-edit-errors td {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .ms-popup .ms-log-edit-errors .ms-popup-errors {
    margin: 0;
  }
  .ms-popup.ms-log .ms-log-editing input[type=number] {
    width: 64px;
  }
  .ms-popup.ms-log .ms-log-editing input[type=datetime-local] {
    width: 164px;
    padding: 6px 4px;
    font-size: 12px;
  }
  .ms-popup.ms-log .ms-log-editing input[type=text] {
    width: 100%;
    min-width: 8rem;
  }
  .ms-popup .ms-log-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 0;
  }
  .ms-popup .ms-log-edit .rb-btn {
    margin: 0;
  }
  .ms-popup .ms-log-edit-cancel {
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ms-popup .ms-log-count {
    text-align: right;
    margin: 6px 0 0;
  }
  .ms-popup .ms-log-batch-strip {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #efe6fb;
    color: #4b2380;
  }
  .ms-popup .ms-log-batch-strip ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
  }
  .ms-popup .ms-log-batch-strip li.ms-on a {
    font-weight: 800;
    text-decoration: underline;
  }
  .ms-popup .ms-res-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 6px;
  }
  .ms-popup .ms-res-head h3 {
    margin: 0;
    font-size: 14px;
  }
  .ms-popup .ms-res-help {
    margin-right: auto;
  }
  .ms-popup .ms-res-scroll {
    overflow-x: auto;
  }
  .ms-popup .ms-res-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .ms-popup .ms-res-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    padding: 4px 2px;
    border-bottom: 1px solid var(--border-light);
  }
  .ms-popup .ms-res-table td {
    padding: 4px 2px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
  }
  .ms-popup.ms-log .ms-res-table input[type=number] {
    width: 44px;
    padding: 6px 4px;
    font-size: 12px;
    appearance: textfield;
    -moz-appearance: textfield;
  }
  .ms-popup.ms-log .ms-res-table input[type=number]::-webkit-inner-spin-button, .ms-popup.ms-log .ms-res-table input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .ms-popup.ms-log .ms-res-table input[type=datetime-local] {
    width: 164px;
    padding: 6px 4px;
    font-size: 12px;
  }
  .ms-popup .ms-res-table select {
    width: 10rem;
    max-width: 10rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .ms-popup .ms-res-tag {
    white-space: nowrap;
  }
  .ms-popup .ms-res-remove {
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 14px;
  }
  .ms-popup .ms-tip {
    position: relative;
    display: inline-block;
    vertical-align: middle;
  }
  .ms-popup .ms-tip summary {
    list-style: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-secondary);
    font: 700 11px/1 var(--font-body);
    color: var(--text-secondary);
    cursor: pointer;
  }
  .ms-popup .ms-tip summary::-webkit-details-marker {
    display: none;
  }
  .ms-popup .ms-tip[open] summary {
    background: var(--accent-walnut);
    color: var(--text-inverse);
  }
  .ms-popup .ms-tip-body {
    position: absolute;
    z-index: 20;
    left: 0;
    top: calc(100% + 4px);
    width: max-content;
    max-width: 20rem;
    margin: 0;
    padding: 7px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
    font: 400 12px/1.45 var(--font-body);
    color: var(--text-primary);
    white-space: normal;
  }
  .ms-popup .ms-tip-start .ms-tip-body {
    left: auto;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
  }
  .ms-popup .ms-res-total {
    margin: 8px 0;
    padding: 7px 10px;
    background: var(--bg-secondary);
    border-radius: 5px;
  }
  .ms-popup .ms-res-total.ms-res-total-over {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .ms-popup #ms-res-over {
    font-weight: 700;
  }
  .ms-popup #ms-res-completes {
    color: var(--status-open);
    font-weight: 700;
  }
  @media (max-width: 640px) {
    .ms-popup .ms-log-rework {
      grid-template-columns: auto 1fr auto;
    }
    .ms-popup .ms-log-rework-badge, .ms-popup .ms-log-rework-qty, .ms-popup .ms-log-rework-state {
      grid-row: 1;
    }
    .ms-popup .ms-log-rework-state {
      grid-column: 3;
      align-self: center;
    }
    .ms-popup .ms-log-rework-requests {
      grid-column: 1/-1;
      grid-row: 2;
      padding: 10px 0 0;
      border-left: 0;
      border-top: 1px solid var(--status-rework);
    }
    .ms-popup .ms-res-head {
      flex-wrap: wrap;
    }
    .ms-popup .ms-res-head {
      position: relative;
    }
    .ms-popup .ms-res-help {
      position: static;
    }
    .ms-popup .ms-res-help .ms-tip-body {
      left: 0;
      right: 0;
      width: auto;
      max-width: none;
    }
    .ms-popup .ms-log-notes-head {
      flex-wrap: wrap;
    }
    .ms-popup .ms-log-notes-head form {
      flex: 1 1 100%;
    }
    .ms-popup.ms-log .ms-log-notes-head input[type=text] {
      flex: 1 1 auto;
      width: auto;
      min-width: 0;
    }
    .ms-popup .ms-log-scroll {
      overflow-x: auto;
      padding-bottom: 20px;
    }
    .ms-popup .ms-log-scroll .ms-log-table {
      min-width: 640px;
    }
    .ms-popup .ms-res-scroll, .ms-popup .ms-log-scroll {
      position: relative;
    }
    .ms-popup .ms-log-scroll .ms-menu-panel {
      right: calc(100% + 4px);
      top: 50%;
      bottom: auto;
      transform: translateY(-50%);
    }
  }
  .ms-popup.ms-batch-popup {
    min-width: 680px;
    padding: 6px 20px 18px;
  }
  .ms-popup .ms-batch-top {
    display: grid;
    grid-template-columns: 64px 1fr 1.2fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 10px;
  }
  .ms-popup .ms-batch-orders strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
  }
  .ms-popup .ms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .ms-popup .ms-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 5px;
    background: var(--bg-secondary);
    font: 600 12px var(--font-mono);
  }
  .ms-popup .ms-chip-remove {
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--text-secondary);
    padding: 0;
  }
  .ms-popup .ms-batch-add {
    display: flex;
    gap: 8px;
    margin: 6px 0;
  }
  .ms-popup .ms-batch-add input {
    flex: 1;
    box-sizing: border-box;
    height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
  }
  .ms-popup .ms-batch-suggestions {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    max-height: 150px;
    overflow: auto;
    border: 1px solid var(--border-light);
    border-radius: 6px;
  }
  .ms-popup .ms-batch-suggestions li {
    display: grid;
    grid-template-columns: 70px 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-light);
  }
  .ms-popup .ms-tabs {
    display: flex;
    gap: 18px;
    margin: 12px 0 10px;
    border-bottom: 1px solid var(--border-light);
  }
  .ms-popup .ms-tab {
    border: 0;
    background: none;
    padding: 6px 0;
    cursor: pointer;
    font: 600 12.5px var(--font-body);
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
  }
  .ms-popup .ms-tab.ms-on {
    color: var(--accent-walnut);
    border-bottom-color: var(--accent-walnut);
  }
  .ms-popup .ms-tab-panel h3 {
    margin: 0 0 2px;
    font-size: 14px;
  }
  .ms-popup .ms-batch-depts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 12px;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
  }
  .ms-popup .ms-batch-dept {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
  }
  .ms-popup .ms-batch-dept.ms-disabled {
    opacity: 0.45;
  }
  .ms-popup .ms-batch-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
  }
  .ms-popup.ms-batch-popup input[type=text], .ms-popup.ms-batch-popup input[type=date] {
    box-sizing: border-box;
    height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
  }
  .ms-popup .ms-batch-total {
    display: block;
    margin-top: 8px;
    font-size: 15px;
  }
  .ms-popup .ms-batch-summary {
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid #c9d6ef;
    border-radius: 6px;
    background: #f1f5fd;
    color: #1e3a6e;
  }
  .ms-popup .ms-batch-summary ul {
    margin: 6px 0 0;
    padding-left: 18px;
    font-weight: 600;
  }
  .ms-popup .ms-menu-panel {
    left: auto;
    right: 0;
    top: auto;
    bottom: 18px;
  }
  .master-schedule .ms-mat-ok, .ms-mat-popup .ms-mat-ok {
    color: var(--status-open);
  }
  .master-schedule .ms-mat-missing, .ms-mat-popup .ms-mat-missing {
    color: var(--status-rush);
  }
  .master-schedule .ms-mat-unknown, .ms-mat-popup .ms-mat-unknown {
    color: var(--text-tertiary);
  }
  .ms-eng-popup .ms-eng-popup-wo-row {
    margin: 0 0 10px;
  }
  .ms-eng-popup .ms-eng-popup-wo {
    display: inline-block;
    padding: 2px 12px;
    border: 1px solid var(--status-rush);
    border-radius: 12px;
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 13px;
    font-weight: 700;
  }
  .ms-eng-popup .ms-eng-popup-head {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 6px;
    background: var(--row-stripe);
  }
  .ms-eng-popup .ms-mat-photo img, .ms-eng-popup .ms-mat-photo .ms-thumb-empty {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    text-align: center;
    line-height: 72px;
  }
  .ms-eng-popup .ms-eng-popup-article {
    font-size: 16px;
    font-weight: 700;
  }
  .ms-eng-popup .ms-mat-what > span {
    display: block;
  }
  .ms-eng-popup .ms-eng-popup-client {
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-eng-popup-variant {
    display: flex;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 12px;
  }
  .ms-eng-popup .ms-eng-popup-variant dt {
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-eng-popup-variant dd {
    margin: 0;
  }
  .ms-eng-popup .ms-eng-popup-stats {
    display: flex;
    gap: 18px;
    margin: 0;
  }
  .ms-eng-popup .ms-eng-popup-stats div {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ms-eng-popup .ms-eng-popup-stats dt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    text-transform: uppercase;
  }
  .ms-eng-popup .ms-eng-popup-stats dd {
    margin: 0;
    font-size: 14px;
  }
  .ms-eng-popup .ms-eng-popup-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fbeeee;
  }
  .ms-eng-popup .ms-eng-popup-section h3 {
    margin: 0;
    font-size: 16px;
  }
  .ms-eng-popup .ms-bom-view {
    margin: 0 0 0 auto;
  }
  .ms-eng-popup .ms-eng-popup-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-card);
    color: #c47a7a;
    box-shadow: inset 0 0 0 1px #e8c4c4;
  }
  .ms-eng-popup .ms-eng-popup-badge-in_progress {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .ms-eng-popup .ms-eng-popup-badge-completed {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .ms-eng-popup .ms-eng-popup-badge-not_needed {
    background: var(--row-stripe);
    color: var(--text-tertiary);
  }
  .ms-eng-popup .ms-bom-data-state {
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-bom-requests h4 {
    margin: 6px 0 4px;
    font-size: 12px;
  }
  .ms-eng-popup .ms-bom-requests ul {
    margin: 0 0 10px;
    padding-left: 18px;
    font-size: 12px;
  }
  .ms-eng-popup .ms-eng-manual, .ms-eng-popup .ms-eng-cad {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-eng-manual strong {
    color: var(--text-primary);
  }
  .ms-eng-popup .ms-eng-manual-wait {
    margin-left: 6px;
    color: var(--status-hold);
    font-weight: 600;
  }
  .ms-eng-popup .ms-eng-popup-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .ms-eng-popup .ms-eng-popup-apply {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-popup-field input:disabled, .ms-eng-popup .ms-popup-field select:disabled {
    background: var(--row-stripe);
  }
  .ms-eng-popup .ms-eng-popup-notes-title {
    margin: 14px 0 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
  }
  .ms-eng-popup .ms-eng-popup-note-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .ms-eng-popup .ms-eng-popup-note-form .ms-eng-popup-note-count {
    display: block;
    text-align: right;
    font-size: 11px;
    color: var(--text-tertiary);
  }
  .ms-eng-popup .ms-eng-popup-note-form input[type=submit] {
    margin: 4px 0 10px;
  }
  .ms-eng-popup .ms-eng-popup-note {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    align-items: start;
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
  }
  .ms-eng-popup .ms-eng-popup-note-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--row-stripe);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    line-height: 30px;
    text-align: center;
  }
  .ms-eng-popup .ms-eng-popup-note-body header {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: baseline;
    font-size: 12px;
  }
  .ms-eng-popup .ms-eng-popup-note-body time {
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-eng-popup-note-column {
    padding: 0 8px;
    border-radius: 10px;
    background: var(--row-stripe);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
  }
  .ms-eng-popup .ms-eng-popup-note-text {
    margin: 4px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .ms-eng-popup .ms-eng-popup-note-delete-form {
    margin: 0;
  }
  .ms-eng-popup .ms-eng-popup-note-delete {
    border: 0;
    background: none;
    padding: 0;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
  }
  .ms-eng-popup .ms-eng-popup-note-delete:hover {
    color: var(--status-rush);
    text-decoration: underline;
  }
  .ms-eng-popup .ms-eng-popup-notes-other {
    margin: 12px 0 6px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .ms-eng-popup .ms-eng-popup-notes-capped {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
  }
  .ms-mat-popup .ms-mat-head {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
  }
  .ms-mat-popup .ms-mat-photo img, .ms-mat-popup .ms-mat-photo .ms-thumb-empty {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    text-align: center;
    line-height: 72px;
  }
  .ms-mat-popup .ms-mat-what strong {
    display: block;
    font-size: 16px;
  }
  .ms-mat-popup .ms-mat-what dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    margin: 6px 0 0;
    font-size: 12px;
  }
  .ms-mat-popup .ms-mat-what dt {
    color: var(--text-secondary);
  }
  .ms-mat-popup .ms-mat-what dd {
    margin: 0;
  }
  .ms-mat-popup .ms-mat-state {
    text-align: right;
  }
  .ms-mat-popup .ms-mat-state small {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .ms-mat-popup .ms-mat-state strong {
    font-size: 18px;
  }
  .ms-mat-popup .ms-mat-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
  }
  .ms-mat-popup .ms-mat-tab {
    padding: 6px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
  }
  .ms-mat-popup .ms-mat-tab[aria-selected=true] {
    color: var(--accent-walnut);
    border-bottom-color: var(--accent-walnut);
  }
  .ms-mat-popup .ms-mat-table {
    width: 100%;
  }
  .ms-mat-popup .ms-mat-table .ms-num {
    text-align: right;
  }
  .ms-mat-popup .ms-mat-short {
    color: var(--status-rush);
    font-weight: 700;
  }
  .ms-mat-popup .ms-mat-part-thumb {
    vertical-align: middle;
    object-fit: contain;
  }
  .ms-mat-popup .ms-mat-note, .ms-mat-popup .ms-mat-empty {
    margin: 8px 0;
    font-size: 11.5px;
    color: var(--text-secondary);
  }
  .ms-mat-popup .ms-bom-requests h4 {
    margin: 10px 0 4px;
    font-size: 12px;
  }
  .ms-mat-popup .ms-bom-requests ul {
    margin: 0 0 8px;
    padding-left: 18px;
    font-size: 12px;
  }
  .ms-mat-popup textarea {
    width: 100%;
  }
  .ms-mat-popup .ms-bom-note-count {
    display: block;
    text-align: right;
    font-size: 11px;
    color: var(--text-tertiary);
  }
  .ms-mat-popup .ms-bom-sent {
    margin: 6px 0 0;
    color: var(--status-open);
  }
  .ms-truck-0, .master-schedule td.ms-truck-0 {
    background: #ece4fb;
    color: #5b3a99;
  }
  .ms-truck-1, .master-schedule td.ms-truck-1 {
    background: #dff3e4;
    color: #23633a;
  }
  .ms-truck-2, .master-schedule td.ms-truck-2 {
    background: #e0effa;
    color: #1f5a85;
  }
  .ms-truck-3, .master-schedule td.ms-truck-3 {
    background: #fde7d6;
    color: #8a4a17;
  }
  .ms-truck-4, .master-schedule td.ms-truck-4 {
    background: #fbe3ea;
    color: #8c2f4c;
  }
  .ms-truck-5, .master-schedule td.ms-truck-5 {
    background: #f4ecd8;
    color: #6b5518;
  }
  .ms-truck-6, .master-schedule td.ms-truck-6 {
    background: #dcf1f0;
    color: #1d5f5c;
  }
  .ms-truck-7, .master-schedule td.ms-truck-7 {
    background: #e7e9ee;
    color: #3c4454;
  }
  .ms-fsc-red, .master-schedule td.ms-fsc-red {
    background: #ff0000;
    color: #000000;
  }
  .ms-fsc-magenta, .master-schedule td.ms-fsc-magenta {
    background: #ff00ff;
    color: #000000;
  }
  .ms-fsc-maroon, .master-schedule td.ms-fsc-maroon {
    background: #b10202;
    color: #ffcfc9;
  }
  .ms-fsc-white, .master-schedule td.ms-fsc-white {
    background: #ffffff;
    color: #000000;
  }
  .ms-fsc-white-muted, .master-schedule td.ms-fsc-white-muted {
    background: #ffffff;
    color: #3d3d3d;
  }
  .ms-fsc-purple, .master-schedule td.ms-fsc-purple {
    background: #9900ff;
    color: #000000;
  }
  .ms-fsc-gray, .master-schedule td.ms-fsc-gray {
    background: #999999;
    color: #000000;
  }
  .ms-fsc-pink, .master-schedule td.ms-fsc-pink {
    background: #ead1dc;
    color: #000000;
  }
  .ms-fsc-orange, .master-schedule td.ms-fsc-orange {
    background: #ff9900;
    color: #000000;
  }
  .ms-fsc-cream, .master-schedule td.ms-fsc-cream {
    background: #fff2cc;
    color: #a61c00;
  }
  .ms-fsc-green, .master-schedule td.ms-fsc-green {
    background: #00ff00;
    color: #000000;
  }
  .ms-fsc-blue, .master-schedule td.ms-fsc-blue {
    background: #4a86e8;
    color: #000000;
  }
  .ms-fsc-cyan, .master-schedule td.ms-fsc-cyan {
    background: #00ffff;
    color: #000000;
  }
  .ms-fsc-slate, .master-schedule td.ms-fsc-slate {
    background: #666666;
    color: #ffffff;
  }
  .ms-fsc-charcoal, .master-schedule td.ms-fsc-charcoal {
    background: #3d3d3d;
    color: #e5e5e5;
  }
  .ms-fsc-charcoal-white, .master-schedule td.ms-fsc-charcoal-white {
    background: #3d3d3d;
    color: #ffffff;
  }
}
@layer components {
  .oauth-page {
    max-width: 560px;
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .oauth-page h1 {
    margin: 0 0 12px;
  }
  .oauth-page p {
    margin: 0 0 12px;
    line-height: 1.5;
  }
  .oauth-page .oauth-warning {
    font-weight: 700;
  }
  .oauth-page .oauth-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 16px 0;
  }
  .oauth-page .oauth-facts dt {
    color: var(--text-secondary);
  }
  .oauth-page .oauth-facts dd {
    margin: 0;
    font-weight: 600;
    word-break: break-word;
  }
  .oauth-page .oauth-password {
    margin: 16px 0;
  }
  .oauth-page .oauth-password label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .oauth-page .oauth-password input[type=password] {
    box-sizing: border-box;
    width: 280px;
    max-width: 100%;
    height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 14px;
  }
  .oauth-page .oauth-error {
    margin: 8px 0 0;
    color: var(--unfulfilled);
  }
  .oauth-page .oauth-actions {
    display: flex;
    gap: 12px;
    margin: 16px 0;
  }
  .oauth-page .oauth-note {
    color: var(--text-secondary);
    font-size: 13px;
  }
}
@charset "UTF-8";
@layer components {
  A.popup-trigger {
    border-bottom: 1px dotted var(--border-medium);
  }
  /* The line under an engineer-content CAD on the CADs tab and on its edit
     form (ticket 21517): which drawing its links open. */
  .cad-shop-drawing-note {
    font-size: 0.88rem;
    color: var(--text-tertiary);
  }
  .orders_index .order, .orders_all_cad .order {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
  }
  .orders_index .order .status, .orders_all_cad .order .status {
    position: absolute;
    top: 9px;
    padding: 3px 0;
    width: 40px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    /* Neutral default (no status set) */
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    line-height: 1.45;
  }
  .orders_index .order .status strong, .orders_all_cad .order .status strong {
    font-weight: inherit;
  }
  .orders_index .order .status, .orders_all_cad .order .status {
    /* 3 pills × 40px + 2 gaps × 8px = 136px.
       Rightmost starts at right:120 to clear the Order Details link
       (which sits at right:12 with ~90px width). There is no ACC pill:
       it only repeated the order's status. */
  }
  .orders_index .order .status.cad, .orders_all_cad .order .status.cad {
    right: 120px;
  }
  .orders_index .order .status.fin, .orders_all_cad .order .status.fin {
    right: 168px;
  }
  .orders_index .order .status.fab-us, .orders_all_cad .order .status.fab-us {
    right: 216px;
  }
  .orders_index .order .status.all, .orders_all_cad .order .status.all {
    background-color: var(--status-open-bg);
    color: var(--status-open);
    border-color: rgba(21, 94, 62, 0.2);
  }
  .orders_index .order .status.none, .orders_all_cad .order .status.none {
    background-color: var(--status-rush-bg);
    color: var(--status-rush);
    border-color: rgba(127, 29, 34, 0.2);
  }
  .orders_index .order .status.partial, .orders_all_cad .order .status.partial {
    background-color: var(--status-hold-bg);
    color: var(--status-hold);
    border-color: rgba(146, 64, 14, 0.2);
  }
  .orders_index .order, .orders_all_cad .order {
    /* Mobile: pills and details link render inline at the top of the card
       (natural DOM order), then the h2 title and meta below. */
  }
  @media (max-width: 700px) {
    .orders_index .order, .orders_all_cad .order {
      padding: 10px 12px 4px;
    }
    .orders_index .order .status, .orders_all_cad .order .status {
      position: static !important;
      right: auto !important;
      display: inline-block;
      margin: 0 6px 6px 0;
      vertical-align: middle;
    }
    .orders_index .order .order-details-link, .orders_all_cad .order .order-details-link {
      position: static !important;
      top: auto !important;
      right: auto !important;
      display: inline-block;
      margin: 0 0 6px 4px;
      vertical-align: middle;
      padding-left: 18px;
    }
    .orders_index .order H2, .orders_all_cad .order H2 {
      padding: 8px 12px !important;
      margin: 4px -12px 0 !important; /* edge-to-edge against card padding */
      font-size: 0.88rem;
    }
    .orders_index .order > p, .orders_all_cad .order > p {
      padding-left: 12px !important;
    }
  }
  .orders_index .order .order-details-link, .orders_all_cad .order .order-details-link {
    position: absolute;
    top: 11px;
    right: 12px;
    padding-left: 18px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-walnut);
    text-decoration: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A2D1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4.35-4.35'/%3E%3C/svg%3E") left center no-repeat;
    background-size: 14px 14px;
  }
  .orders_index .order .order-details-link:hover, .orders_all_cad .order .order-details-link:hover {
    text-decoration: underline;
  }
  .orders_index .order H2, .orders_all_cad .order H2 {
    margin: 0;
    /* Right padding leaves room for 4 status pills + Order Details link
       (~340px total). */
    padding: 10px 340px 10px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
  }
  .orders_index .order TABLE.items, .orders_all_cad .order TABLE.items {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
  }
  .orders_index .order TABLE.items TH, .orders_all_cad .order TABLE.items TH {
    background: rgba(240, 240, 240, 0.5);
    color: rgba(0, 0, 0, 0.7);
    font-weight: normal;
    padding: 7px 4px 4px 4px;
    font-size: 11px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }
  .orders_index .order TABLE.items TH:last-child, .orders_all_cad .order TABLE.items TH:last-child {
    border-right: none;
  }
  .orders_index .order TABLE.items TD, .orders_all_cad .order TABLE.items TD {
    border: 1px solid var(--border-light);
    padding: 4px;
  }
  .orders_index .order TABLE.items TD.yards, .orders_all_cad .order TABLE.items TD.yards {
    text-align: center;
    width: 1px;
    white-space: nowrap;
    padding: 4px 12px;
  }
  .orders_index .order TABLE.items TD.item, .orders_all_cad .order TABLE.items TD.item {
    padding: 16px 4px 4px 4px !important;
    font-weight: bold;
  }
  .orders_index .order TABLE.items TD.tool, .orders_all_cad .order TABLE.items TD.tool {
    background: rgba(228, 232, 147, 0.3);
    width: 1px;
  }
  .orders_index .order TABLE.items TD.icon, .orders_all_cad .order TABLE.items TD.icon {
    padding-left: 20px;
    border-left: none;
    border-right: none;
    width: 1px;
  }
  .orders_index .order TABLE.items TD.display, .orders_all_cad .order TABLE.items TD.display {
    border-left: none;
  }
  .orders_index .order TABLE.items TD.top, .orders_all_cad .order TABLE.items TD.top {
    border-bottom-color: var(--bg-subtle);
  }
  .orders_index .order TABLE.items TD:last-child, .orders_all_cad .order TABLE.items TD:last-child {
    border-right: none;
  }
  .orders_index .order TABLE.items TR.needed TD.yards, .orders_all_cad .order TABLE.items TR.needed TD.yards {
    color: var(--text-tertiary);
  }
  .orders_index .order TABLE.items TR.needed TD.yards.unfulfilled, .orders_all_cad .order TABLE.items TR.needed TD.yards.unfulfilled {
    color: var(--unfulfilled);
  }
  TABLE.items TD {
    border-right: 1px solid var(--border-light);
  }
  TABLE.items TD.yards {
    text-align: center;
    width: 1px;
  }
  TABLE.items TD DIV.needed {
    text-align: center;
    padding: 8px 0 0 0;
    color: var(--text-tertiary);
  }
  TABLE.items TD.unfulfilled DIV.needed {
    color: var(--unfulfilled);
  }
  /* Scoped with .legacy-content + compound .items.list to beat
     `TABLE.list TR.odd TD, TABLE.list TR.even TD { background-color: transparent !important }`
     in legacy_ui/base.scss, which otherwise wipes the cell colors on tables
     that carry both `.items` and `.list` classes (e.g. the order show page). */
  .legacy-content TABLE.items.list TR TD.fulfilled,
  .legacy-content TABLE.items TR TD.fulfilled {
    background: rgb(230, 251, 229) !important;
  }
  .legacy-content TABLE.items.list TR TD.unfulfilled,
  .legacy-content TABLE.items TR TD.unfulfilled {
    background: rgb(255, 221, 221) !important;
  }
  .legacy-content TABLE.items.list TR TD.partial,
  .legacy-content TABLE.items TR TD.partial {
    background: rgb(255, 254, 204) !important;
  }
  .legacy-content TABLE.items.list TR TD.overage,
  .legacy-content TABLE.items TR TD.overage {
    background: rgb(221, 238, 255) !important;
  }
  /* ── Order show: BOM tab ──
     The tab's table carries wide imported content (plantilla filenames, import
     status text, a nested materials table). Desktop scrolls it inside its
     .legacy-table-scroll wrapper; ≤700px switches to the labeled-card layout
     via the shared responsive-record-table pattern. */
  #bom-tab-content {
    /* legacy_ui/tab_set.scss sets `.tab-set .tab .scroll { overflow: visible }`,
       which would beat .legacy-table-scroll's containment on specificity — the
       ID restores the sideways scroll for this tab's wide table. */
  }
  #bom-tab-content .legacy-table-scroll {
    overflow-x: auto;
  }
  #bom-tab-content {
    /* The BOM Link column carries the workbook filename plus the import status
       line. Without a floor, table auto-layout squeezes it to ~120px and the
       text stacks 20 lines tall. */
  }
  #bom-tab-content .bom-list td.bom-link-cell {
    min-width: 240px;
    overflow-wrap: anywhere;
  }
  #bom-tab-content {
    /* Keeps the Edit/Costing/Approve links on one line now that the inline
       nowrap style moved here (mobile needs to override it below). */
  }
  #bom-tab-content td.tool {
    white-space: nowrap;
  }
  #bom-tab-content {
    /* Percent and dollars are one figure read together, and table auto-layout
       otherwise squeezes the column until they break across two lines. */
  }
  #bom-tab-content .bom-list td.bom-gross-profit {
    white-space: nowrap;
  }
  #bom-tab-content {
    /* The estimate's own margin, under the per-unit rows it aggregates. The
       rule and the bold type are what stop it from reading as one more line. */
  }
  #bom-tab-content .bom-list tr.bom-totals-row > td {
    border-top: 2px solid var(--border-medium);
    font-weight: bold;
  }
  #bom-tab-content .bom-list td.bom-totals-label {
    text-align: right;
  }
  #bom-tab-content .bom-list td.bom-totals-label small {
    font-weight: normal;
  }
  @media (max-width: 700px) {
    #bom-tab-content td.tool {
      white-space: normal;
    }
    #bom-tab-content .bom-list td.bom-link-cell {
      min-width: 0;
    }
    #bom-tab-content {
      /* Card cells are 2-column grids (label ∷ value). Left to auto-placement,
         a cell with several children (link + <br> + <small>, or three action
         links) spills its later children into the label column — pin everything
         to the value column, drop the <br>s (each would occupy a grid cell of
         its own), and let the import-status line use the card's full width. */
    }
    #bom-tab-content .bom-list > tbody > tr > td > br {
      display: none;
    }
    #bom-tab-content .bom-list td.bom-link-cell > a {
      grid-column: 2;
    }
    #bom-tab-content .bom-list td.bom-link-cell > small {
      grid-column: 1/-1;
      margin-top: 4px;
    }
    #bom-tab-content .bom-list td[data-label="Approved By"] > small {
      grid-column: 2;
    }
    #bom-tab-content .bom-list td.tool > a {
      grid-column: 2;
    }
    #bom-tab-content {
      /* The inline center alignment of the No/Qty columns would center the
         card labels too. */
    }
    #bom-tab-content .bom-list > tbody > tr > td {
      text-align: left !important;
    }
    #bom-tab-content {
      /* Card mode renders each tr as its own box; pull a line's note and
         materials rows up against the line's card so they read as one record
         (same trick as .movement-note-row). */
    }
    #bom-tab-content .bom-list tr.bom-note-row,
    #bom-tab-content .bom-list tr.bom-materials-row {
      margin-top: -13px;
    }
    #bom-tab-content {
      /* The materials cell holds the <details> block, not a label/value pair —
         let it span the card full-width instead of the label∷value grid. */
    }
    #bom-tab-content td.bom-materials-cell {
      display: block;
    }
    #bom-tab-content {
      /* Card mode turns every cell into its own labelled row, so the totals
         row's desktop label and its trailing spacer would render as two stray
         cards above the figure. The figure's own cell carries the label. */
    }
    #bom-tab-content .bom-list tr.bom-totals-row > td.bom-totals-label,
    #bom-tab-content .bom-list tr.bom-totals-row > td:last-child {
      display: none;
    }
    #bom-tab-content {
      /* The card's grid already labels the cell "Pricing Note". */
    }
    #bom-tab-content .bom-note-prefix {
      display: none;
    }
  }
}
/* Same layer as layout.scss's `table.list { min-width: 0 !important }`: an
   !important in a later layer would lose to it, so the ID wins here instead. */
@layer layout {
  @media (max-width: 700px) {
    /* Keep the materials table wide enough to stay legible; it pans sideways
       inside its own .legacy-table-scroll wrapper. */
    #bom-tab-content table.list.bom-materials-list {
      min-width: 560px !important;
    }
  }
}
@layer components {
  .order-assistant {
    max-width: 860px;
    color: var(--text-primary);
  }
  .order-assistant .order-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .order-assistant .order-assistant-header h2 {
    margin: 0;
  }
  .order-assistant .order-assistant-help,
  .order-assistant .order-assistant-hint,
  .order-assistant .order-assistant-empty,
  .order-assistant .order-assistant-pending,
  .order-assistant .order-assistant-lookups {
    color: var(--text-secondary);
    font-size: 13px;
  }
  .order-assistant .order-assistant-log {
    min-height: 220px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    margin: 12px 0;
    padding: 12px 16px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-card);
  }
  .order-assistant .order-assistant-turn {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
  }
  .order-assistant .order-assistant-user {
    margin-left: 15%;
    background: var(--bg-secondary);
  }
  .order-assistant .order-assistant-assistant {
    margin-right: 8%;
    border: 1px solid var(--border-medium);
  }
  .order-assistant .order-assistant-incomplete {
    border-style: dashed;
  }
  .order-assistant .order-assistant-who {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .order-assistant .order-assistant-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.5;
  }
  .order-assistant .order-assistant-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--status-hold);
  }
  .order-assistant .order-assistant-lookups {
    margin: 8px 0 0;
    font-size: 12px;
  }
  .order-assistant .order-assistant-pending {
    margin: 0;
    font-style: italic;
  }
  .order-assistant .order-assistant-error {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--status-rush);
  }
  .order-assistant .order-assistant-thumbs,
  .order-assistant .order-assistant-links {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
  }
  .order-assistant .order-assistant-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .order-assistant .order-assistant-thumbs li {
    width: 120px;
  }
  .order-assistant .order-assistant-thumbs a {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-decoration: none;
  }
  .order-assistant .order-assistant-thumbs img {
    display: block;
    width: 120px;
    height: 90px;
    margin-bottom: 4px;
    object-fit: cover;
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    background: var(--bg-secondary);
  }
  .order-assistant .order-assistant-links li {
    font-size: 13px;
  }
  .order-assistant .order-assistant-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .order-assistant .order-assistant-entry {
    display: flex;
    align-items: flex-end;
    gap: 10px;
  }
  .order-assistant textarea {
    flex: 1;
    box-sizing: border-box;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm, 4px);
    font: inherit;
    font-size: 14px;
    resize: vertical;
  }
  .order-assistant .order-assistant-hint {
    margin: 4px 0 0;
    font-size: 12px;
  }
  .order-assistant [hidden] {
    display: none;
  }
}
@layer components {
  .order-invoicing-flag,
  .order-invoice-unsent-flag {
    margin: 4px 0 8px;
    text-align: center;
  }
  .order-invoicing {
    margin: 0 0 20px;
  }
  .order-invoicing .rb-section-header form,
  .order-invoicing .order-invoicing-started,
  .order-invoicing .order-invoicing-flags,
  .order-invoicing .order-invoice-actions,
  .order-invoicing .order-invoice-actions form,
  .order-invoicing .order-invoicing-start-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .order-invoicing .order-invoicing-started,
  .order-invoicing .order-invoicing-flags {
    margin: 0 0 10px;
  }
  .order-invoicing .order-invoicing-note {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--text-tertiary);
  }
  .order-invoicing .order-invoicing-start-form .order-invoicing-note {
    flex-basis: 100%;
  }
  .order-invoicing .order-invoicing-input {
    box-sizing: border-box;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
    font-size: 12px;
  }
  .order-invoicing .order-invoicing-input:focus {
    border-color: var(--border-medium);
    outline: none;
  }
  .order-invoicing .order-invoices-wrap {
    max-width: 100%;
    overflow-x: auto;
    container-type: inline-size;
  }
  .order-invoicing .order-invoice-row td:last-child {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 9em;
  }
  .order-invoicing .order-invoice-actions-row td {
    border-top: 0;
    padding-top: 0;
  }
  .order-invoicing .order-invoice-under {
    position: sticky;
    left: 0;
    box-sizing: border-box;
    max-width: 100%;
    max-width: calc(100cqw - 16px);
  }
  .order-invoicing .order-invoice-sends {
    margin-bottom: 6px;
  }
  .order-invoicing .order-invoice-unsent {
    margin-bottom: 6px;
    font-size: 12px;
  }
  .order-invoicing .order-invoice-email-unconfirmed,
  .order-invoicing .order-invoice-email-warranty_queued,
  .order-invoicing .order-invoice-email-warranty_unconfirmed,
  .order-invoicing .order-invoice-message-lost {
    color: var(--unfulfilled);
  }
  .order-invoicing .order-invoice-actions .order-invoicing-input {
    flex: 1 1 140px;
    min-width: 0;
    max-width: 240px;
  }
  .order-invoicing .order-invoice-email {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .order-invoicing .order-invoice-email .order-invoicing-note {
    margin: 0;
  }
  .order-invoicing .order-invoice-email-failed,
  .order-invoicing .order-invoice-email-missing {
    color: var(--unfulfilled);
  }
  .order-invoicing .order-invoice-confirm-form {
    display: inline-block;
    margin-left: 6px;
  }
  .order-shipping-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 8px 0;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font-size: 13px;
    color: var(--text-primary);
  }
  .order-shipping-block-slot .order-shipping-block {
    margin: 8px 12px;
  }
  .order-shipping-block.order-shipping-block-refused {
    border-color: var(--status-rush);
  }
  .order-shipping-block .order-shipping-block-who,
  .order-shipping-block .order-shipping-block-help {
    color: var(--text-secondary);
    font-size: 12px;
  }
  .order-shipping-block .order-shipping-block-release {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    flex: 1 1 100%;
  }
  .order-shipping-block .order-shipping-block-reason {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 360px;
  }
  .order-shipment-unpaid {
    font-size: 12px;
    color: var(--text-secondary);
  }
  .order-shipment-unpaid-row td {
    padding-top: 0;
    border-top: 0;
  }
  .order-invoicing .order-invoicing-negative {
    color: var(--unfulfilled);
  }
  .order-invoicing .order-invoicing-settlement {
    margin: 0 0 16px;
  }
  .order-invoicing .order-invoicing-settlement .order-invoicing-subtitle {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .order-invoicing .order-invoicing-settlement .order-invoicing-settle-field {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 6px;
  }
  .order-invoicing .order-invoicing-shipments {
    margin: 0 0 12px;
  }
  .order-invoicing .order-invoicing-shipments .order-invoicing-subtitle {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .order-invoicing .order-invoicing-shipments .order-invoicing-shipment {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 4px 0;
    border-top: 1px solid var(--border-light);
  }
  .order-invoicing .order-invoicing-shipments .order-invoicing-note {
    margin: 0;
  }
  .order-invoicing .order-invoicing-settled {
    padding: 4px 0;
    border-top: 1px solid var(--border-light);
  }
  .order-invoicing .order-invoicing-settled summary {
    cursor: pointer;
  }
  .order-invoicing .order-invoicing-flags {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .order-invoicing .order-invoicing-flags .rb-status {
    white-space: normal;
    height: auto;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .order-shipment-invoiced {
    display: inline-block;
    color: var(--text-primary);
  }
  .order-shipment-invoiced .order-shipment-invoiced-help {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
  }
}
@layer components {
  /* Copy-mode chrome on the item search, shown only when the page was reached
     from a costing worksheet (app/views/order_lines/_image_search_results.html.erb). */
  .ol-bom-scope {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.9rem;
  }
  .ol-bom-scope-note {
    color: var(--text-secondary);
    margin-right: 0.5rem;
  }
  /* button_to emits a form per row; without this each one forces its own line and
     pushes the Copy button below the View BOM link. */
  .ol-bom-copy {
    display: inline-block;
    margin: 0.2rem 0 0;
  }
  /* Only 0.58% of order lines carry a BOM, so an empty result is a normal
     outcome here and has to read as a place to go next rather than a dead end. */
  .ol-image-search-empty {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    max-width: 40rem;
  }
  .ol-image-search-empty p {
    margin: 0 0 0.5rem;
    font-weight: 600;
  }
  .ol-image-search-empty ul {
    margin: 0;
    padding-left: 1.1rem;
  }
  /* A fallback explanation ("no indexed photo yet"), not a failure. Same muted
     treatment as the rest of the read-only annotations rather than error red. */
  .ol-image-search-note {
    color: var(--text-secondary);
  }
  /* Shown when the target's BOM is approved: the candidate list renders in full
     but every Copy button is suppressed, and without a word here that reads as
     the page being broken. */
  .ol-bom-locked {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 40rem;
  }
  /* The Materials row's flag column (app/views/order_lines/_materials_fields.html.erb).
     Best Yield, Program, External, and Purchase Rush (COM only) all live in one
     cell, stacked, so the boxes line up in a single column and adding a flag is
     one more line rather than another table cell.

     Fenced to .ol-materials: the items/edit modal renders its own fabric rows
     with several of the same class names and must not pick these up. */
  .ol-materials .material-flags {
    vertical-align: middle;
    white-space: nowrap;
    /* Shrink-to-fit: the flags are the narrowest thing in the row, and without
       this the table hands the column an equal share and strands the labels in
       the middle of a wide cell. */
    width: 1%;
  }
  .ol-materials .material-flags label {
    /* flex, not block: keeps the box and its wording on one baseline whatever the
       browser's default checkbox metrics are, and jQuery's .show() on the
       Purchase Rush row clears the inline display rather than forcing "block". */
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: normal;
    line-height: 1.7;
    cursor: pointer;
  }
  .ol-materials .material-flags input[type=checkbox] {
    /* flex: none so the box keeps its intrinsic size instead of being stretched
       by the flex container; margin 0 so the stack's rhythm comes from
       line-height alone. */
    flex: none;
    margin: 0;
  }
  /* Sits beside the flags. Unlike them it empties out on a COM row (the price is
     replaced by the Purchase Rush flag), so it carries no fixed width and
     collapses instead of leaving a gap in the row. */
  .ol-materials .material-price {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
  }
}
@layer components {
  .op-tab {
    padding: 4px 0 24px;
  }
  .op-tab .op-heading h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-primary);
  }
  .op-tab .op-subhead {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 6px 0 14px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .op-tab .op-subhead a {
    color: var(--accent-walnut);
    text-decoration: underline;
  }
  .op-tab .op-hold-banner {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-size: 12px;
  }
  .op-tab .op-empty {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--text-tertiary);
  }
  .op-tab .op-scroll {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-card);
  }
  .op-tab .op-grid {
    width: 100%;
    border-collapse: collapse !important;
    font-size: 12px;
  }
  .op-tab .op-grid th, .op-tab .op-grid td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
  }
  .op-tab .op-grid thead th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent-walnut);
    background: var(--bg-secondary);
  }
  .op-tab .op-grid tbody tr:nth-child(even) td {
    background: var(--bg-secondary);
  }
  .op-tab .op-grid tfoot td {
    font-weight: 700;
    background: var(--bg-secondary);
  }
  .op-tab .op-num, .op-tab .op-flag-col, .op-tab .op-run-head, .op-tab .op-cell, .op-tab .op-menu-col, .op-tab .op-add-head {
    text-align: center !important;
  }
  .op-tab .op-num {
    font-variant-numeric: tabular-nums;
  }
  .op-tab .op-total {
    font-weight: 700;
  }
  .op-tab .op-scheduled {
    color: var(--accent-walnut);
  }
  .op-tab .op-image {
    width: 64px;
  }
  .op-tab .op-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
  }
  .op-tab .op-desc {
    white-space: normal !important;
    min-width: 140px;
  }
  .op-tab .op-grid .op-item {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
  }
  .op-tab .op-grid tbody tr:nth-child(even) .op-item, .op-tab .op-grid thead .op-item {
    background: var(--bg-secondary);
  }
  .op-tab .op-foot-label {
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .op-tab .op-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
  }
  .op-tab .op-flag-done {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .op-tab .op-flag-open {
    border: 1.5px solid var(--status-hold);
  }
  .op-tab .op-flag-partial {
    border: 1.5px solid var(--status-hold);
    background: linear-gradient(90deg, var(--status-hold-bg) 50%, transparent 50%);
  }
  .op-tab .op-run-name, .op-tab .op-run-date {
    display: block;
  }
  .op-tab .op-run-date {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
  }
  .op-tab .op-run-head.op-late .op-etc {
    color: var(--status-rush);
    text-decoration: underline;
  }
  .op-tab .op-qty {
    font-weight: 600;
    color: var(--text-primary);
  }
  .op-tab .op-run-links {
    display: block;
    font-size: 10.5px;
  }
  .op-tab .op-run-links a {
    color: var(--text-secondary);
    text-decoration: underline;
    margin: 0 2px;
  }
  .op-tab .op-run-links a.op-run-done, .op-tab .op-cell-done .op-qty {
    color: var(--text-tertiary);
  }
  .op-tab .op-none {
    color: var(--text-tertiary);
  }
  .op-tab .op-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
    vertical-align: 1px;
  }
  .op-tab .op-badge-sample {
    background: #8b6fd6;
  }
  .op-tab .op-badge-design {
    background: var(--accent-brass);
  }
  .op-tab .op-status {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
  }
  .op-tab .op-line-link {
    display: block;
    font-size: 10.5px;
    color: var(--text-secondary);
    text-decoration: underline;
  }
  .op-tab .op-variant {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-walnut);
  }
  .op-tab .op-boo-note {
    display: block;
    font-size: 10.5px;
    color: var(--text-tertiary);
  }
  .op-tab .op-edit {
    margin-left: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
  }
  .op-tab .op-edit:hover {
    color: var(--accent-walnut);
  }
  .op-tab .op-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    font-size: 16px;
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .op-over {
    color: var(--status-rush);
    font-weight: 700;
  }
  .op-status-queued {
    color: var(--text-secondary);
  }
  .op-status-in-production {
    color: var(--status-open);
  }
  .op-status-hold {
    color: var(--status-hold);
  }
  .op-status-completed {
    color: var(--status-closed);
  }
  .op-popup {
    padding: 4px 18px 16px;
  }
  .op-popup input[type=number], .op-popup input[type=date] {
    box-sizing: border-box;
    height: 30px;
    padding: 5px 8px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font: inherit;
  }
  .op-popup.ms-popup .ms-popup-what {
    font-size: 13px;
  }
  .op-popup.ms-popup .ms-popup-errors {
    background: var(--status-rush-bg);
    color: var(--status-rush);
  }
  .op-popup.ms-popup .ms-popup-late {
    color: var(--status-hold);
  }
  .op-popup .op-status {
    font-weight: 600;
  }
  .op-popup .op-popup-date {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px 16px;
    margin-bottom: 10px;
  }
  .op-popup .op-popup-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .op-popup .op-popup-hint {
    margin: 0;
    color: var(--text-tertiary);
  }
  .op-popup .op-popup-table {
    width: 100%;
    border-collapse: collapse !important;
  }
  .op-popup .op-popup-table th, .op-popup .op-popup-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: top;
  }
  .op-popup .op-popup-table th {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-walnut);
  }
  .op-popup .op-qty-input {
    width: 72px !important;
  }
  .op-popup .op-entry-note, .op-popup .op-entry-error {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
  }
  .op-popup .op-entry-note {
    color: var(--text-tertiary);
  }
  .op-popup .op-entry-error {
    color: var(--status-rush);
  }
  .op-popup .op-remaining {
    font-variant-numeric: tabular-nums;
  }
  .op-popup .op-sample {
    text-align: center !important;
  }
  .op-popup .op-popup-spacer {
    flex: 1;
  }
  .lv-popup {
    padding: 12px 18px 16px;
  }
  .lv-popup .lv-group {
    margin: 0 0 10px;
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
  }
  .lv-popup .lv-option {
    display: block;
    padding: 2px 0;
  }
  .lv-popup .lv-name {
    display: block;
    margin-top: 4px;
  }
}
@layer components {
  .change-order input[type=text], .change-order input[type=file], .change-order select, .change-order textarea {
    outline: none;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
  }
  .change-order input[type=text]:hover, .change-order input[type=file]:hover, .change-order select:hover, .change-order textarea:hover {
    border-color: var(--border-medium);
  }
  .change-order input[type=text]:focus, .change-order input[type=text].focus, .change-order input[type=file]:focus, .change-order input[type=file].focus, .change-order select:focus, .change-order select.focus, .change-order textarea:focus, .change-order textarea.focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
    outline: none;
  }
  .change-order input[type=text][disabled], .change-order input[type=file][disabled], .change-order select[disabled], .change-order textarea[disabled] {
    background: var(--row-stripe) !important;
    color: var(--text-tertiary);
    box-shadow: none !important;
  }
  .change-order input[type=text][disabled]:hover, .change-order input[type=file][disabled]:hover, .change-order select[disabled]:hover, .change-order textarea[disabled]:hover {
    border-color: var(--border-light);
  }
  .change-order input[type=text].error, .change-order input[type=file].error, .change-order select.error, .change-order textarea.error {
    background: rgba(254, 205, 205, 0.25);
    border-color: var(--unfulfilled);
  }
  .change-order input[type=text].error:hover, .change-order input[type=file].error:hover, .change-order select.error:hover, .change-order textarea.error:hover {
    border-color: var(--unfulfilled);
  }
  .change-order input[type=text].error:focus, .change-order input[type=file].error:focus, .change-order select.error:focus, .change-order textarea.error:focus {
    border-color: var(--unfulfilled);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  }
  .change-order input[type=text]::-webkit-outer-spin-button, .change-order input[type=text]::-webkit-inner-spin-button, .change-order input[type=file]::-webkit-outer-spin-button, .change-order input[type=file]::-webkit-inner-spin-button, .change-order select::-webkit-outer-spin-button, .change-order select::-webkit-inner-spin-button, .change-order textarea::-webkit-outer-spin-button, .change-order textarea::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .change-order input[type=text], .change-order input[type=file], .change-order select, .change-order textarea {
    padding: 6px 9px;
    line-height: 1.4;
  }
  .change-order input[type=text], .change-order select {
    min-height: 34px;
  }
  .change-order input[type=file] {
    background: var(--bg-card);
  }
  .change-order label {
    font-weight: 600;
    color: var(--text-secondary);
  }
  .change-order .alert {
    padding: 10px 14px;
    color: var(--status-hold);
    background: var(--status-hold-bg);
    border: 1px solid var(--accent-brass-light);
    border-radius: var(--radius-sm);
  }
  .change-order .change-order-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
  }
  .change-order .change-order-actions form {
    display: contents;
  }
  .change-order .change-order-actions form.change-order-void {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
    padding-left: 24px;
    border-left: 1px solid var(--border-light);
  }
  .change-order .change-order-customer {
    margin-top: 24px;
  }
  .change-order .change-order-customer summary {
    cursor: pointer;
    font-weight: 600;
    margin: 8px 0;
  }
  .change-order #change-order-acceptance-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 320px));
    gap: 14px 20px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  }
  .change-order #change-order-acceptance-form .hint, .change-order #change-order-acceptance-form input[type=submit] {
    grid-column: 1/-1;
  }
  .change-order #change-order-acceptance-form .hint {
    margin: 0;
    color: var(--text-tertiary);
  }
  .change-order #change-order-acceptance-form input[type=submit] {
    justify-self: start;
  }
  .change-order #change-order-acceptance-form p {
    margin: 0;
  }
  .change-order #change-order-acceptance-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .change-order #change-order-acceptance-form input[type=text], .change-order #change-order-acceptance-form select {
    width: 100%;
  }
  @media (max-width: 650px) {
    .change-order .change-order-actions form.change-order-void {
      margin-left: 0;
      padding-left: 0;
      border-left: none;
    }
    .change-order #change-order-acceptance-form {
      grid-template-columns: minmax(0, 1fr);
    }
  }
}
@layer components {
  .vendor-duplicates {
    margin: 0.25rem 0 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .vendor-duplicates[hidden] {
    display: none;
  }
  .vendor-duplicates ul {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
  }
  .vendor-duplicates a {
    color: inherit;
    text-decoration: underline;
  }
  .vendor-duplicates-badge {
    margin-left: 0.25rem;
    padding: 0 0.375rem;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-size: 0.85em;
  }
}
@layer components {
  /* Parts screens. */
  /* "Preferred" marker on the show page's Suppliers table. Reads as a quiet
     badge, not a control -- the preferred supplier is chosen by the Preferred
     Supplier select on the edit modal, and the edit modal's supplier rows list
     only the others, so nothing there is badged. */
  .part-supplier-preferred {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.45rem;
    border-radius: 0.7rem;
    background: var(--status-open-bg);
    color: var(--status-open);
    font-size: 0.72rem;
    font-style: normal;
    white-space: nowrap;
    vertical-align: middle;
  }
  /* Each supplier row carries a labelled vendor select and a labelled supplier
     part number; without a width the select2 widget stretches the modal. */
  .part-supplier-rows .select2-container {
    max-width: 22rem;
  }
  /* The edit modal's landed-cost expense rows, laid out like the supplier rows
     above: labelled fields stacked per row. Per Unit and Share are read-only
     figures the server renders and the modal's script recomputes. */
  .part-expense-rows {
    /* The read-only columns' headings are plain th text (label_and_value),
       not a <label>, so they take the other headings' look here. */
  }
  .part-expense-rows th.sfr-left-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    text-align: left;
    white-space: nowrap;
  }
  .part-expense-rows {
    /* Padding matches the inputs' so the figure sits on their baseline. */
  }
  .part-expense-rows .part-expense-per-unit,
  .part-expense-rows .part-expense-share {
    display: block;
    padding: 7px 0;
    text-align: right;
    white-space: nowrap;
  }
  .part-expense-rows .part-expense-uom {
    margin-left: 0.35rem;
    color: var(--text-tertiary);
  }
  .part-expense-rows .part-expense-share {
    color: var(--text-tertiary);
  }
  .part-expense-total {
    margin: 6px 0 0;
    font-weight: bold;
  }
  /* The show page's Additional Expenses table. */
  .part-expense-table .part-expense-figure {
    text-align: right;
    white-space: nowrap;
  }
  .part-expense-table .part-expense-basis {
    white-space: nowrap;
  }
  .part-expense-table .part-expense-total-row td {
    font-weight: bold;
  }
  /* The edit modal's unit conversions: one line per unit system, quantity and
     unit in fixed columns, so "1 PZ = 500 EA = 12.5 KG" reads down the grid
     instead of running off the modal's width and wrapping mid-equation. The
     inputs fill their cell rather than carrying inline widths -- the columns
     are what keeps the three lines aligned. */
  .part-units {
    display: grid;
    grid-template-columns: max-content 6.5em 6.5em;
    gap: 4px 8px;
    align-items: center;
  }
  .part-units input[type=text].pretty {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }
  .part-units-leg {
    color: var(--text-tertiary);
    white-space: nowrap;
  }
  /* The "1" of "1 purchasing unit". Sits in the quantity column so it lines up
     under the numbers it is being compared with. */
  .part-units-fixed-qty {
    text-align: center;
    color: var(--text-secondary);
  }
  .part-units-note {
    margin: 4px 0 0;
    color: var(--text-tertiary);
    font-style: italic;
  }
  /* The derived per-unit prices, on the modal and the show page both. Two
     columns -- the name of the unit being priced, then the price -- because
     three amounts joined by dots do not say which unit each one prices.
     part_pricing.js builds this same shape while the modal is open. */
  .part-unit-prices {
    display: inline-grid;
    grid-template-columns: max-content max-content;
    gap: 2px 10px;
    align-items: baseline;
  }
  .part-unit-price-label {
    color: var(--text-tertiary);
    white-space: nowrap;
  }
  .part-unit-price-amount {
    white-space: nowrap;
  }
  .part-unit-price-uom {
    color: var(--text-tertiary);
  }
}
@layer components {
.people-picker { width: 460px; max-width: 100%; box-sizing: border-box; padding: 16px; }
.people-picker-label { display: block; margin-bottom: 8px; font-weight: 600; }
.people-picker input.people-picker-search { width: 100%; box-sizing: border-box; padding: 10px 12px; height: 40px; }
.people-picker-hint, .people-picker-status, .people-picker-paging { font-size: 12px; color: var(--text-tertiary); }
.people-picker-hint { margin: 8px 0; }
.people-picker-status:empty { display: none; }
.people-picker .people-picker-list { list-style: none; padding: 0; margin: 12px 0; }
.people-picker-list li + li { border-top: 1px solid var(--bg-secondary); }
.people-picker-option { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--text-primary); text-align: left; font: inherit; cursor: pointer; }
.people-picker-option strong, .people-picker-option span { display: block; overflow-wrap: anywhere; }
.people-picker-option span { margin-top: 3px; color: var(--text-tertiary); font-size: 12px; }
.people-picker-option:hover, .people-picker-option:focus-visible { background: var(--row-hover); outline: 2px solid var(--accent-walnut); outline-offset: -2px; }
.people-picker-option:disabled { opacity: .45; cursor: wait; }
.people-picker-empty { padding: 24px 12px; text-align: center; color: var(--text-tertiary); }
.people-picker-paging { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.people-picker-results[aria-busy="true"] .people-picker-paging { pointer-events: none; }
}
@charset "UTF-8";
@layer components {
  /* Price recommendation panel (on the costing worksheet form/show — see
     docs/superpowers/specs/2026-09-16-pricing-sheet-design.md) — the advisory
     selling-price panel beside the markup price.

     Everything is scoped under .price-recommendation (the panel wraps its
     content in it). Colours are the app's existing tokens — --status-rush for
     "needs attention", --status-hold for advisory, --status-open for a price
     above the recommendation.

     Trimmed from the removed standalone Pricing Sheet's pricing_sheets.css.scss
     down to what the worksheet panel reuses: flags, signed differences, the
     headline price block and inline notices. The sheet-page-only rules (page
     layout, the New checklist grid, the live-total line, figure-changed
     highlighting) were dropped with that page. */
  /* ---- Flags and signed differences ---- */
  .price-recommendation .pricing-flag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .price-recommendation .pricing-diff {
    font-weight: 700;
    white-space: nowrap;
  }
  .price-recommendation .pricing-comparisons .pricing-flag {
    margin-top: 0.25rem;
  }
  .price-recommendation .pricing-diff-positive {
    color: var(--status-open);
  }
  .price-recommendation .pricing-diff-negative {
    color: var(--status-rush);
  }
  /* ---- Inline notices ----
     .rb-flash is the page-wide banner (full-bleed padding, no radius, a flex row
     that squashes a list); these sit inside the content column instead. */
  .price-recommendation .pricing-notice {
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
  }
  .price-recommendation .pricing-notice p {
    margin: 0 0 0.5rem;
  }
  .price-recommendation .pricing-notice p:last-child {
    margin-bottom: 0;
  }
  .price-recommendation .pricing-notice ul {
    margin: 0;
    padding-left: 1.1rem;
  }
  .price-recommendation .pricing-notice li {
    margin: 0.2rem 0;
  }
  .price-recommendation .pricing-notice .rb-btn {
    margin-top: 0.1rem;
  }
  .price-recommendation .pricing-notice-advisory {
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-weight: 500;
  }
  .price-recommendation .pricing-notice-title {
    font-weight: 700;
  }
  /* ---- The headline price block ---- */
  .price-recommendation .pricing-headline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2.5rem;
    align-items: flex-start;
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
  }
  .price-recommendation .pricing-headline-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .price-recommendation .pricing-headline-amount {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
  }
  .price-recommendation .pricing-headline-recommended .pricing-headline-amount {
    font-size: 2.2rem;
  }
  .price-recommendation .pricing-headline-floor .pricing-headline-amount {
    font-size: 1.4rem;
  }
  .price-recommendation .pricing-headline-unit {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
  }
  .price-recommendation .pricing-headline-floor {
    max-width: 18rem;
  }
  .price-recommendation .pricing-headline-note {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--text-tertiary);
  }
  .price-recommendation .pricing-headline-sub {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  /* ---- The worksheet panel ----
     Sits under the ledger inside #costing_results, capped to the ledger's own
     40rem so the two read as one column. */
  .price-recommendation.costing-price-recommendation {
    max-width: 40rem;
    margin: 0.5rem 0 1.25rem;
  }
  .price-recommendation .costing-price-recommendation-heading {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
  }
  .price-recommendation .costing-price-recommendation-intro {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  /* The headline wraps its two prices onto separate lines on a phone rather
     than overflowing: the big figure keeps its size, the gap shrinks. */
  .price-recommendation .pricing-headline-amount {
    overflow-wrap: anywhere;
  }
  .price-recommendation .price-recommendation-details th {
    white-space: normal;
  }
  .price-recommendation .price-recommendation-details td {
    text-align: right;
  }
  /* The ledger shades a computed cell to set it apart from the inputs beside
     it; this table has no inputs, so every value reads the same. */
  .price-recommendation .price-recommendation-details td.costing-computed {
    background: none;
  }
  .price-recommendation .price-recommendation-details td.pricing-comparisons {
    line-height: 1.6;
  }
  .price-recommendation .price-recommendation-compared {
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
  }
  .price-recommendation .price-recommendation-muted {
    color: var(--text-tertiary);
  }
  /* ---- The complexity checklist (New/Edit form) ---- */
  .price-recommendation.costing-complexity {
    max-width: 40rem;
    margin: 0 0 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
  }
  .price-recommendation.costing-complexity legend {
    padding: 0 0.3rem;
    font-weight: 700;
  }
  .price-recommendation .costing-complexity-hint {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .price-recommendation .costing-complexity-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.15rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .price-recommendation .costing-complexity-items label {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.25rem 0;
    font-weight: 400;
    cursor: pointer;
  }
  /* "None of these apply": set apart under the items, since ticking it is a
     deliberate answer rather than one more item. */
  .price-recommendation .costing-complexity-none {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding: 0.45rem 0 0.1rem;
    border-top: 1px solid var(--border-light);
    font-weight: 400;
    cursor: pointer;
  }
  .price-recommendation .costing-complexity-label {
    flex: 1 1 auto;
  }
  .price-recommendation .costing-complexity-points {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    white-space: nowrap;
  }
  @media (max-width: 480px) {
    .price-recommendation .pricing-headline {
      padding: 0.8rem;
      gap: 0.75rem 1.5rem;
    }
    .price-recommendation .pricing-headline-recommended .pricing-headline-amount {
      font-size: 1.8rem;
    }
    .price-recommendation .costing-complexity-items {
      grid-template-columns: 1fr;
    }
  }
}
@charset "UTF-8";
@layer components {
  /* Pricing Rules admin page (app/views/pricing_rules/show.html.erb).

     Scoped under .pricing-rules. */
  .pricing-rules h2 {
    margin-top: 1.75rem;
  }
  .pricing-rules .pricing-rules-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
  }
  .pricing-rules p.pricing-rules-hint {
    margin: 0.25rem 0 0;
  }
  /* ---- Legend ---- */
  .pricing-rules .pricing-rules-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 0.85rem;
  }
  .pricing-rules .pricing-rules-legend ul {
    flex: 1 1 26rem;
    margin: 0;
    padding-left: 1.1rem;
  }
  .pricing-rules .pricing-rules-legend li {
    margin: 0.15rem 0;
  }
  .pricing-rules .pricing-rules-key {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
  }
  .pricing-rules .pricing-rules-key-caption {
    font-weight: 700;
  }
  .pricing-rules .pricing-rules-key-cell {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 3px;
  }
  .pricing-rules .pricing-rules-key-cell span {
    padding: 2px 6px;
    border: 1px solid var(--border-light);
  }
  .pricing-rules .pricing-rules-key-cell span:nth-child(2), .pricing-rules .pricing-rules-key-cell span:nth-child(4) {
    border-style: dashed;
  }
  .pricing-rules .pricing-rules-key-cell span {
    border-radius: 3px;
    background: var(--bg-secondary);
    text-align: right;
    white-space: nowrap;
  }
  /* ---- Errors ----
     The look of the layout's .rb-flash.rb-flash-alert, copied rather than
     reused: application.js removes the first .rb-flash after 4 seconds, which
     would take this list with it. Sized for the content column, with room for
     a list. */
  .pricing-rules .pricing-rules-errors {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(127, 29, 34, 0.2);
    border-radius: var(--radius-sm);
  }
  .pricing-rules .pricing-rules-errors svg {
    flex: none;
    margin-top: 2px;
  }
  .pricing-rules .pricing-rules-errors p.pricing-rules-errors-title {
    margin: 0 0 0.35rem;
    font-weight: 700;
  }
  .pricing-rules .pricing-rules-errors ul {
    margin: 0;
    padding-left: 1.1rem;
  }
  .pricing-rules .pricing-rules-errors li {
    margin: 0.15rem 0;
  }
  .pricing-rules .pricing-rules-errors a.pricing-rules-error-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
  }
  /* ---- Save buttons ----
     One above the checklist, one at the end of the form that stays pinned to
     the bottom of the window while any of the form is on screen. */
  .pricing-rules .pricing-rules-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    color: var(--text-tertiary);
  }
  /* .legacy-content is overflow-x: auto so wide legacy tables scroll, which also
     makes it the scroll container a sticky child sticks within — and it never
     scrolls vertically, so the bar would never stick. This page's only wide
     content (the grids) scrolls in its own wrapper, so let the window be the
     scroll container here. */
  body#pricing_rules #sfr-content.legacy-content {
    overflow: visible;
  }
  .pricing-rules .pricing-rules-actions-bottom {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 1rem 0 0;
    padding: 0.6rem 0;
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
  }
  /* ---- Inputs ---- */
  .pricing-rules form.sfr-form input.pretty.pricing-rules-number {
    width: 5.5em;
    text-align: right;
  }
  .pricing-rules form.sfr-form input.pretty.pricing-rules-label {
    width: 100%;
    max-width: 28rem;
  }
  .pricing-rules form.sfr-form input.pretty.is-invalid {
    border-color: var(--status-rush);
    background: var(--status-rush-bg);
  }
  .pricing-rules .pricing-rules-fixed {
    display: inline-block;
    width: 5.5em;
    padding: 0 5px;
    text-align: right;
    font-weight: 700;
  }
  .pricing-rules .pricing-rules-fixed.is-invalid {
    color: var(--status-rush);
    outline: 2px solid var(--status-rush);
  }
  .pricing-rules table.list tr.pricing-rules-invalid-row th:first-child,
  .pricing-rules table.list tr.pricing-rules-invalid-row td:first-child {
    box-shadow: inset 3px 0 0 var(--status-rush);
  }
  /* ---- The price grids ----
     The wrapper scrolls sideways on its own (not the whole page) and the grade
     column stays put while it does. Each cell is a 2×2 of compact boxes:
     Target % / Floor % over Min GP $ / Floor min GP $, each box with a fixed
     slot for "$" before and "%" after so the numbers line up. */
  .pricing-rules .pricing-rules-grid-wrap {
    max-width: 100%;
    overflow-x: auto;
  }
  .pricing-rules table.list.pricing-rules-grid {
    width: auto;
    margin-top: 0.5rem;
  }
  .pricing-rules table.list.pricing-rules-grid th.pricing-rules-grade {
    position: sticky;
    left: 0;
    z-index: 2;
    padding-left: 4px;
    padding-right: 4px;
    background: var(--bg-card);
    text-align: center;
  }
  .pricing-rules table.list.pricing-rules-grid th.pricing-rules-quantity,
  .pricing-rules table.list.pricing-rules-grid th.pricing-rules-band {
    text-align: center;
  }
  .pricing-rules table.list.pricing-rules-grid th.pricing-rules-quantity {
    padding-top: 6px;
    border-bottom-width: 1px;
  }
  .pricing-rules table.list.pricing-rules-grid th.pricing-rules-band {
    padding-top: 4px;
  }
  .pricing-rules table.list.pricing-rules-grid td {
    padding: 4px 1px;
    vertical-align: middle;
  }
  .pricing-rules table.list.pricing-rules-grid td.pricing-rules-invalid-cell {
    box-shadow: inset 0 0 0 2px var(--status-rush);
  }
  .pricing-rules .pricing-rule-cell {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 2px 1px;
  }
  .pricing-rules .pricing-rule-field {
    display: grid;
    grid-template-columns: 0.55em max-content 0.7em;
    align-items: center;
    font-size: 12px;
  }
  .pricing-rules .pricing-rule-unit {
    font-size: 11px;
    color: var(--text-tertiary);
  }
  .pricing-rules .pricing-rule-unit-before {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
    padding-right: 1px;
  }
  .pricing-rules .pricing-rule-unit-after {
    grid-column: 3;
    grid-row: 1;
    padding-left: 1px;
  }
  .pricing-rules form.sfr-form .pricing-rule-field input.pretty.pricing-rule-input {
    grid-column: 2;
    grid-row: 1;
    /* A fixed 3.25em box in a max-content column; a long typed value widens
       it through the inline min-width pricing_rules_field_width sets. */
    width: 39px; /* 3.25em of the cell's 12px text; the input's own font is larger */
    padding: 3px 3px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .pricing-rules form.sfr-form .pricing-rule-field-floor input.pretty.pricing-rule-input:not(.is-invalid) {
    border-style: dashed;
  }
}
@layer components {
  .production-blocked {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
    white-space: nowrap;
    color: var(--status-rush);
    background: var(--status-rush-bg);
  }
}
@charset "UTF-8";
@layer components {
  .production-run {
    container-type: inline-size;
    min-width: 0;
    padding: 4px 0 32px;
  }
  .production-run .pw-heading {
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 18px;
  }
  .production-run .pw-heading > div {
    min-width: 0;
  }
  .production-run .pw-heading h1 {
    font-size: 28px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .production-run .pw-heading p {
    font-size: 12px;
    margin: 7px 0 0;
  }
  .production-run .pw-heading .pw-eyebrow {
    margin: 0 0 7px;
    font-size: 0.65rem;
  }
  .production-run .pw-heading .pw-actions {
    margin: 0;
    gap: 12px;
    font-size: 12px;
  }
  .production-run .pw-card {
    margin: 0 0 14px;
  }
  .production-run .run-package-row[hidden] {
    display: none;
  }
  .production-run .pw-card-body {
    padding: 16px;
    overflow-wrap: anywhere;
  }
  .production-run .pw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    font-size: 12px;
  }
  .production-run .pw-grid > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .production-run .pw-grid > div > strong {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
  }
  .production-run .pw-block {
    margin-top: 5px;
    color: var(--text-primary);
  }
  .production-run .pr-overview {
    background: var(--bg-subtle);
  }
  .production-run .pr-expedited {
    color: var(--status-rush);
    font-weight: 800;
  }
  .production-run > .production-materials {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 12px;
    margin-bottom: 22px;
  }
  .production-run .production-materials > summary {
    cursor: pointer;
    font-weight: 700;
  }
  .production-run .production-materials .hint {
    color: var(--text-secondary);
    font-size: 11px;
    margin: 10px 0;
  }
  .production-run .production-materials .scroll {
    overflow-x: auto;
    max-width: 100%;
  }
  .production-run .production-materials th, .production-run .production-materials td {
    padding: 8px;
  }
  .production-run .pr-section-heading {
    display: flex;
    gap: 6px 16px;
    flex-wrap: wrap;
    align-items: baseline;
    margin: 20px 0 12px;
  }
  .production-run .pr-section-heading h2 {
    font-size: 21px;
    margin: 0;
  }
  .production-run .pr-section-heading > span {
    font-size: 11px;
    color: var(--text-secondary);
  }
  .production-run .pr-department > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-subtle);
  }
  .production-run .pr-department > summary::before {
    content: "›";
    font-size: 20px;
    line-height: 1;
    color: var(--text-secondary);
  }
  .production-run .pr-department[open] > summary::before {
    transform: rotate(90deg);
  }
  .production-run .pr-department > summary::-webkit-details-marker {
    display: none;
  }
  .production-run .pr-department[open] > summary {
    border-bottom: 1px solid var(--border-light);
  }
  .production-run .pr-department-name {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
    min-width: 0;
    font-size: 13px;
  }
  .production-run .pr-department-name > span {
    color: var(--text-secondary);
    font-size: 12px;
  }
  .production-run .pr-department-state {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 10px;
    flex-wrap: wrap;
    margin-left: auto;
  }
  .production-run .pw-meta {
    margin: 0;
    font-size: 11px;
  }
  .production-run .pr-requirement-count, .production-run .pr-approval-label {
    font-size: 10px;
    color: var(--text-secondary);
  }
  .production-run .pr-requirement-count {
    color: var(--unfulfilled);
  }
  .production-run .pr-department .pw-card-body > p {
    font-size: 12px;
    line-height: 1.6;
    margin: 12px 0;
  }
  .production-run .pw-blockers {
    margin: 14px 0;
    font-size: 12px;
    border-radius: 0 5px 5px 0;
  }
  .production-run .pw-blockers ul {
    margin: 5px 0 0;
    padding-left: 18px;
  }
  .production-run .pw-actions:empty {
    display: none;
  }
  .production-run .pw-actions {
    gap: 8px;
  }
  .production-run .pw-actions form {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .production-run .pr-hold > summary {
    list-style: none;
    cursor: pointer;
    padding: 6px 15px;
    background: var(--bg-card);
  }
  .production-run .pr-hold > summary:hover {
    background: var(--bg-secondary);
  }
  .production-run .pr-hold > summary::-webkit-details-marker {
    display: none;
  }
  .production-run .pr-hold[open] {
    flex-basis: 100%;
  }
  .production-run .pr-hold-form, .production-run .pr-resume-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
  }
  .production-run .pr-hold-form {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-subtle);
  }
  .production-run .pr-resume-form input[type=text] {
    min-width: 16rem;
  }
  .production-run .pr-rework-note {
    padding: 8px 12px;
    border-left: 4px solid var(--status-rework);
    border-radius: 5px;
    background: var(--status-rework-bg);
  }
  .production-run .pr-hold-note {
    padding: 8px 12px;
    border-left: 4px solid var(--status-closed);
    border-radius: 5px;
    background: var(--status-closed-bg);
  }
  .production-run .pr-details-form {
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin: 16px 0;
    background: var(--bg-subtle);
  }
  .production-run .pr-details-form .pw-actions {
    margin-bottom: 0;
  }
  .production-run .pw-field, .production-run .pr-time-form label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
  }
  .production-run input[type=number], .production-run input[type=text], .production-run input[type=datetime-local] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font: 12px var(--font-body);
  }
  .production-run .pr-operations {
    margin-top: 20px;
  }
  .production-run .pr-operations > h3 {
    font-size: 15px;
    margin: 0 0 10px;
  }
  .production-run .pr-operation {
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
  }
  .production-run .pr-operation:last-child {
    padding-bottom: 0;
  }
  .production-run .pr-operation-heading h4 {
    font-size: 13px;
    margin: 0;
  }
  .production-run .pr-operation-heading p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 5px 0;
  }
  .production-run .pr-operation-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 0;
  }
  .production-run .pr-operation-facts dt {
    font-size: 10px;
    color: var(--text-secondary);
  }
  .production-run .pr-operation-facts dd {
    font-size: 12px;
    margin: 4px 0 0;
  }
  .production-run .pr-time-form {
    display: grid;
    grid-template-columns: 85px 85px minmax(100px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 12px 0 0;
  }
  .production-run .pr-time-form input[type=submit] {
    margin: 0;
  }
  .production-run .pr-time-history {
    margin-top: 10px;
    font-size: 11px;
  }
  .production-run .pr-time-history > summary {
    padding: 0;
    background: transparent;
    font-size: 11px;
  }
  .production-run .pr-time-history ul {
    padding-left: 18px;
    margin: 8px 0;
    color: var(--text-secondary);
  }
  @container (max-width: 700px) {
    .production-run .pw-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .production-run .pr-details-form .pw-field:last-child {
      grid-column: 1/-1;
    }
    .production-run .pr-time-form {
      grid-template-columns: 1fr 1fr;
    }
    .production-run .pr-time-form .pr-work-note {
      grid-column: 1/-1;
    }
    .production-run .pr-time-form input[type=submit] {
      justify-self: start;
    }
  }
  @container (max-width: 420px) {
    .production-run .pw-card-body {
      padding: 12px;
    }
    .production-run .pr-department > summary {
      padding: 12px;
      gap: 8px;
      flex-wrap: wrap;
    }
    .production-run .pr-department-state {
      flex-basis: 100%;
      justify-content: flex-start;
      padding-left: 17px;
    }
    .production-run .pr-details-form .pw-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    .production-run .pr-operation-facts {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .production-run .pr-details-form {
      padding: 10px;
    }
  }
}
@layer layout {
  .production-run .production-materials table.list {
    min-width: 620px !important;
  }
}
@layer components {
  .pw-page {
    color: var(--text-primary);
    padding: 12px 4px 32px;
    font-family: var(--font-body);
  }
  .pw-page fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
  }
  .pw-page .rb-btn:disabled {
    opacity: 0.6;
    cursor: wait;
  }
  .pw-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin: 0 0 24px;
  }
  .pw-heading h1,
  .pw-heading h2 {
    font-family: var(--font-display);
    margin: 0;
    font-size: 2rem;
  }
  .pw-heading p {
    color: var(--text-secondary);
    margin: 8px 0;
  }
  .pw-eyebrow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
  }
  .pw-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
  }
  .pw-card summary {
    padding: 16px 20px;
    cursor: pointer;
    background: var(--surface-inset);
  }
  .pw-card-body {
    padding: 16px 20px;
  }
  .pw-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-left: 12px;
  }
  .pw-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 12px 0;
  }
  .pw-scroll {
    overflow-x: auto;
  }
  .pw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
  }
  .pw-table th,
  .pw-table td {
    border-bottom: 1px solid var(--border-light);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
  }
  .pw-table thead {
    background: var(--surface-inset);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .pw-table th {
    font-weight: 700;
  }
  .pw-table td:last-child {
    width: 1%;
    white-space: nowrap;
  }
  .pw-table input:not([type=hidden]),
  .pw-table textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
  }
  .pw-block {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
  }
  .pw-run-list {
    line-height: 1.9;
    padding-left: 18px;
  }
  .pw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
  .pw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
  }
  .pw-field input,
  .pw-field select,
  .pw-field textarea {
    padding: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-sizing: border-box;
    max-width: 100%;
  }
  .pw-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
  }
  .pw-checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
  }
  .pw-inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }
  .pw-field .pw-checklist input,
  .pw-field .pw-inline-check input {
    padding: 0;
    margin: 0;
    width: auto;
  }
  .boo-prerequisite-group {
    margin: 16px 0;
  }
  .boo-prerequisites {
    padding: 0;
  }
  .pw-blockers {
    border-left: 3px solid #b9483c;
    padding: 8px 12px;
    background: rgba(185, 72, 60, 0.06);
    font-size: 0.78rem;
    line-height: 1.6;
  }
  .pw-errors {
    color: #a33129;
  }
  .pw-empty {
    padding: 20px;
    color: var(--text-secondary);
  }
}
@layer components {
/* The program catalog renders through table.list like the rest of the app, so
   only a few things need styling here. */

/* A main object (an area) is a parent: its name and actions sit together on one
   row, and its children (items) nest beneath it — indented and rule-bordered so
   the parent/child relationship reads at a glance. */
.program-object-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-light);
}
.program-object-head h3 {
  margin: 0;
}
.program-object-children {
  margin: 0.6rem 0 1.6rem 0.4rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--border-light);
}

/* The price grid is a table.list like everywhere else, centered, with the cell
   inputs styled like the app's other form fields instead of raw browser boxes. */
.program-price-grid-wrap {
  display: flex;
  justify-content: center;
}
.program-price-grid { margin: 0 auto; }
.price-input {
  width: 100%;
  min-width: 5rem;
  padding: 4px 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font: inherit;
  text-align: right;
  background: var(--bg-card);
}
.price-input:focus {
  outline: none;
  border-color: var(--text-tertiary);
}

/* A material row is an inline form — a label, its control, and the row's Save/
   Clear actions on one line. It's laid out like every other edit form in the
   app: the row's label sits in a fixed, right-aligned column the width of sfr's
   field-pair TH (150px), so the controls line up down the modal whatever each
   label reads. */
.program-material-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
/* The primary label — the BOM placement (fabrics) or location (finishes) — is
   that field-pair column. The fabric row's second label ("Yards") is left as a
   plain inline label sitting between its two fields. */
.program-material-form > label:first-of-type {
  flex: 0 0 150px;
  text-align: right;
}
/* The row's SELECTs carry .pretty; the text/number inputs can't — .pretty pulls
   in width: 100% (via .sfr-full-width) and would stack every field on its own
   line — so they're hand-styled to match, the same trade .price-input and
   .qty-input below make. 1.5px border, not 1px: that's .pretty's border, and
   these sit beside .pretty selects where a thinner edge reads as a mismatch. */
.program-material-form input[type="text"],
.program-material-form input[type="number"] {
  padding: 4px 6px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg-card);
}
.program-material-form input[type="text"]:focus,
.program-material-form input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-walnut);
}

/* A swatch is for identifying a fabric in a row, not admiring it — the PDF is
   where the material gets shown properly. */
.swatch {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  display: block;
}

/* The Generate Estimate modal's item table: prices and quantities read as numbers,
   so right-align them; the quantity input matches the app's other form fields. */
#generation-items .num { text-align: right; }
#generation-items .qty-input {
  width: 4.5em;
  text-align: right;
  padding: 4px 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font: inherit;
}

/* Dense production references stay readable on a narrow screen by scrolling. */
.program-items-scroll { max-width: 100%; overflow-x: auto; }
.program-items-table { width: 100%; min-width: 1500px; }
.program-items-table th { font-size: 0.78rem; text-transform: uppercase; }
.program-items-table td, .program-items-table th { padding: 6px 9px; vertical-align: middle; }
.program-items-table td { white-space: nowrap; }
.program-items-table .program-item-name { min-width: 220px; max-width: 340px; white-space: normal; }
.program-items-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.program-items-table .program-item-image { width: 44px; text-align: center; }
.program-item-image img { width: 38px; height: 38px; object-fit: contain; display: block; }
.program-document { text-align: center; }
.program-document-ready { color: var(--status-open); }
.program-document-edit { display: inline-block; min-width: 16px; min-height: 18px; }
.program-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.program-bom-editor input[type="text"] { width: 100%; min-width: 60px; box-sizing: border-box; }
.program-bom-editor td:nth-child(2) { min-width: 200px; }
/* The part picker fills its cell, so without a floor the column collapses
   to the clear and search glyphs and clips the part's name. */
.program-bom-editor td:first-child { min-width: 200px; }

/* The Catalogue page: one table per brand owner. */
.catalogue-owner {
  margin: 0 0 1.8rem;
}
.catalogue-owner h2 {
  margin: 0 0 0.5rem;
}
.catalogue-breadcrumb {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* The Items tab: filters, then a card per item. */
.catalogue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0 1rem;
}
.catalogue-filters input[type="search"] {
  min-width: 16rem;
}
.catalogue-refresh-error {
  color: var(--status-rush);
  margin: 0 0 0.75rem;
}
.catalogue-refresh-error[hidden] {
  display: none;
}
.catalogue-grid-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.catalogue-count {
  color: var(--text-secondary);
  font-weight: 600;
}
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.catalogue-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  color: var(--text-primary);
  text-decoration: none;
}
a.catalogue-card:hover,
a.catalogue-card:focus-visible {
  border-color: var(--accent-walnut-light);
}
.catalogue-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--row-stripe);
}
.catalogue-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.catalogue-placeholder {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}
.catalogue-card-body {
  padding: 0.6rem 0.75rem 0.75rem;
}
.catalogue-card-body p {
  margin: 0 0 0.2rem;
}
.catalogue-card-numbers {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.catalogue-card-name {
  font-weight: 600;
}
.catalogue-card-dims {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* A grid card is a link: room for its chevron. */
a.catalogue-card .catalogue-card-body {
  padding-right: 1.75rem;
}
.catalogue-card-chevron {
  position: absolute;
  right: 0.6rem;
  bottom: 0.55rem;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-tertiary);
}
a.catalogue-card:hover .catalogue-card-chevron,
a.catalogue-card:focus-visible .catalogue-card-chevron {
  color: var(--accent-walnut-light);
}

/* A catalogue item's page: the image beside its facts. */
.catalogue-item-header {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr;
  gap: 1.5rem;
  margin: 0.5rem 0 1.5rem;
}
@media (max-width: 700px) {
  .catalogue-item-header {
    grid-template-columns: 1fr;
  }
}
.catalogue-item-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--row-stripe);
  border: 1px solid var(--border-light);
  border-radius: 6px;
}
.catalogue-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.catalogue-item-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
.catalogue-item-facts dt {
  font-weight: 600;
  color: var(--text-secondary);
}
.catalogue-item-facts dd {
  margin: 0;
}
#catalogue-sku-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

/* The catalogue item page's Variants tab. */
.catalogue-variants-table .catalogue-variant-image {
  width: 64px;
}
.catalogue-variants-table .catalogue-variant-image img {
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}
.catalogue-variants-table .catalogue-variant-image .catalogue-placeholder {
  font-size: 0.75rem;
}
.catalogue-variants-table .catalogue-variant-number {
  font-weight: 600;
  white-space: nowrap;
}
.catalogue-variants-table tr.catalogue-variant-archived-row {
  opacity: 0.55;
}
}
@layer components {
  /* Full-page purchase order editor. Keep table controls aligned with the BOM editor. */
  .po-line-list {
    width: 100%;
    table-layout: fixed;
  }
  .po-line-list .po-col-part {
    width: 27%;
  }
  .po-line-list .po-col-sales-order {
    width: 24%;
  }
  .po-line-list .po-col-due {
    width: 12%;
  }
  .po-line-list .po-col-lead {
    width: 9%;
  }
  .po-line-list .po-col-qty {
    width: 13%;
    text-align: right;
  }
  .po-line-list .po-col-price {
    width: 12%;
    text-align: right;
  }
  .po-line-list .po-col-tool,
  .po-line-list td.tool {
    width: 3%;
  }
  .po-line-list td input[type=text],
  .po-line-list .po-field,
  .po-line-list select {
    width: 100% !important;
    padding: 0.25rem 0.4rem;
    height: 28px;
  }
  .po-line-list select {
    padding: 2px 0.4rem;
  }
  .po-line-list .pol-quantity,
  .po-line-list .po-col-price input {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .po-line-list .pol-qty-cell {
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }
  .po-line-list .po-col-qty .pol-quantity {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
  }
  .po-line-list .pol-uom {
    flex: 0 0 auto;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--text-secondary);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 4em;
  }
  .po-line-list .pol-description {
    margin-top: 0.25rem;
  }
  .po-line-list .pol-category-wrap {
    display: block;
    margin-top: 0.25rem;
  }
  .po-line-list .pol-category {
    width: 100%;
  }
  .po-line-hint {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
  }
  .po-no-order {
    color: var(--text-secondary);
    font-style: italic;
  }
  .po-unapproved {
    color: var(--unfulfilled);
    font-weight: bold;
  }
  .po-approved {
    color: var(--text-secondary);
  }
  .qb-list-status {
    min-width: 10rem;
  }
  .qb-list-status strong,
  .qb-list-status small {
    display: block;
  }
  .qb-list-status small {
    margin-top: 0.2rem;
    color: var(--text-secondary);
    line-height: 1.25;
  }
  .qb-list-status--sent strong,
  .qb-list-status--ready strong {
    color: var(--status-open);
  }
  .qb-list-status--queued strong {
    color: var(--status-hold);
  }
  .qb-list-status--error strong {
    color: var(--unfulfilled);
  }
  .qb-list-status--unavailable strong {
    color: var(--text-secondary);
  }
  #purchase-order-editor {
    padding: 1rem;
  }
  #purchase-order-editor .po-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 1.5rem;
    align-items: start;
    margin: 1rem 0 1.5rem;
  }
  #purchase-order-editor .po-details input[type=text],
  #purchase-order-editor .po-details select,
  #purchase-order-editor .po-details .picker-field {
    height: 36px;
  }
  #purchase-order-editor .po-details .picker-field a {
    display: flex;
    align-items: center;
  }
  #purchase-order-editor .po-notes-field {
    margin: 0 0 1.5rem;
  }
  #purchase-order-editor .po-notes-field textarea {
    width: 100%;
  }
  #purchase-order-editor .po-line-list {
    min-width: 1000px;
  }
  .po-notes p {
    margin: 0 0 0.4rem;
  }
  .po-notes p:last-child {
    margin-bottom: 0;
  }
  #purchase-order-editor .order-line-id-select {
    width: 100%;
    margin-top: 0.4rem;
  }
  #purchase-order-editor .po-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
  }
  @media (max-width: 1000px) {
    #purchase-order-editor .po-details {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 650px) {
    #purchase-order-editor .po-details {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .po-state-banner {
    max-width: 60rem;
    margin: 0 auto 1rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-align: center;
  }
  .po-state-banner--voided {
    background: var(--status-rush-bg);
    border: 1px solid var(--unfulfilled);
    color: var(--status-rush);
  }
  .po-state-banner--closed {
    background: var(--row-stripe);
    border: 1px solid var(--border-light);
  }
  .po-state-banner--reapproval {
    background: var(--status-hold-bg);
    border: 1px solid var(--accent-brass-light);
    color: var(--status-hold);
  }
  .po-state-banner__note {
    margin-top: 0.25rem;
    font-size: 0.85em;
    color: var(--text-secondary);
  }
  .po-voided-note {
    color: var(--status-rush);
  }
  .po-modal-hint {
    margin: 0 0 1rem;
    color: var(--text-secondary);
  }
  .po-section-heading {
    margin: 1.5rem 0 0.5rem;
  }
  .po-receive {
    padding: 0 0.5rem 2rem;
  }
  .po-receive__title h1 {
    margin: 0;
    border-bottom: none;
  }
  .po-receive__subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  .po-receive__errors {
    margin-bottom: 1rem;
  }
  .po-receive__errors p {
    margin: 0.2rem 0;
  }
  .po-receive__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 2rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  }
  .po-receive__details dl {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    align-content: start;
    gap: 0.35rem 1rem;
    margin: 0;
  }
  .po-receive__details dl + dl {
    border-left: 1px solid var(--border-light);
    padding-left: 2rem;
  }
  .po-receive__details dt {
    font-weight: 600;
  }
  .po-receive__details dd {
    margin: 0;
  }
  .po-receive__status {
    display: inline-block;
    padding: 0.05rem 0.6rem;
    border-radius: 999px;
    background: var(--partial-bg);
    color: var(--partial);
  }
  .po-receive__lines th.num,
  .po-receive__lines td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .po-receive__lines {
    min-width: 850px;
  }
  .po-receive__image {
    width: 44px;
  }
  .po-receive__image img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: var(--radius-sm);
  }
  .po-receive__qty {
    width: 7em !important;
    text-align: right;
  }
  .po-receive__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
  }
  .po-receive__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
  }
  .po-receive__field label,
  .po-receive__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .po-receive__static {
    display: flex;
    align-items: center;
    height: 36px;
  }
  .po-receive__field .pretty {
    width: 100%;
    min-width: 0;
    height: 36px;
  }
  .po-receive__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
  }
  .po-receive__receipts td:first-child {
    white-space: nowrap;
  }
  .po-receive__file {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
  }
  .po-receive__file-name {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .po-receive__file-remove {
    color: var(--text-tertiary);
    text-decoration: none;
  }
  .po-receive__file-remove:hover {
    color: var(--text-primary);
  }
  .po-receive__file + .po-receive__file {
    margin-top: 0.25rem;
  }
  .po-receive__upload {
    margin: 0.35rem 0 0;
  }
  .po-receive__upload label {
    cursor: pointer;
    white-space: nowrap;
  }
  .po-receive__upload label.is-uploading {
    opacity: 0.6;
    pointer-events: none;
  }
  .po-receive__upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .po-receive__upload label:focus-within {
    outline: 2px solid var(--accent-walnut);
    outline-offset: 2px;
  }
  .po-receive__row-actions {
    white-space: nowrap;
  }
  .po-receipt-docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
  }
  .po-receipt-docs__kind {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
  }
  .po-receipt-docs__file {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    overflow-wrap: anywhere;
  }
  .po-receipt-docs__remove {
    flex: none;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  @media (max-width: 900px) {
    .po-receive__details {
      grid-template-columns: minmax(0, 1fr);
    }
    .po-receive__fields {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .po-receive__details dl + dl {
      border-left: none;
      padding-left: 0;
    }
  }
  @media (max-width: 650px) {
    .po-receive__fields {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .sfr-toolbar .po-filter-control {
    height: 32px;
    width: auto;
    max-width: 100%;
    padding: 4px 8px;
  }
  .sfr-toolbar input.po-filter-control {
    width: 18em;
  }
  @media (max-width: 650px) {
    #purchase_orders .sfr-toolbar.page {
      overflow-x: visible;
    }
    #purchase_orders .sfr-toolbar.page ul.items.right {
      width: 100%;
      flex-wrap: wrap;
      gap: 8px;
    }
  }
}
/* select2's own theme (select2.css) is unlayered, so these overrides of it
   stay unlayered too. */
.po-line-list .select2-container {
  width: 100% !important;
}

.po-line-list .select2-container .select2-selection--single,
.po-list-filter .select2-container .select2-selection--single {
  outline: none;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: white;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}
.po-line-list .select2-container .select2-selection--single:hover,
.po-list-filter .select2-container .select2-selection--single:hover {
  border-color: var(--border-medium);
}
.po-line-list .select2-container .select2-selection--single:focus, .po-line-list .select2-container .select2-selection--single.focus,
.po-list-filter .select2-container .select2-selection--single:focus,
.po-list-filter .select2-container .select2-selection--single.focus {
  border-color: var(--accent-walnut);
  box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
  outline: none;
}
.po-line-list .select2-container .select2-selection--single[disabled],
.po-list-filter .select2-container .select2-selection--single[disabled] {
  background: var(--row-stripe) !important;
  color: var(--text-tertiary);
  box-shadow: none !important;
}
.po-line-list .select2-container .select2-selection--single[disabled]:hover,
.po-list-filter .select2-container .select2-selection--single[disabled]:hover {
  border-color: var(--border-light);
}
.po-line-list .select2-container .select2-selection--single.error,
.po-list-filter .select2-container .select2-selection--single.error {
  background: rgba(254, 205, 205, 0.25);
  border-color: var(--unfulfilled);
}
.po-line-list .select2-container .select2-selection--single.error:hover,
.po-list-filter .select2-container .select2-selection--single.error:hover {
  border-color: var(--unfulfilled);
}
.po-line-list .select2-container .select2-selection--single.error:focus,
.po-list-filter .select2-container .select2-selection--single.error:focus {
  border-color: var(--unfulfilled);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}
.po-line-list .select2-container .select2-selection--single::-webkit-outer-spin-button, .po-line-list .select2-container .select2-selection--single::-webkit-inner-spin-button,
.po-list-filter .select2-container .select2-selection--single::-webkit-outer-spin-button,
.po-list-filter .select2-container .select2-selection--single::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.po-line-list .select2-container--focus .select2-selection--single, .po-line-list .select2-container--focus .select2-selection--single:hover,
.po-line-list .select2-container--open .select2-selection--single,
.po-line-list .select2-container--open .select2-selection--single:hover,
.po-list-filter .select2-container--focus .select2-selection--single,
.po-list-filter .select2-container--focus .select2-selection--single:hover,
.po-list-filter .select2-container--open .select2-selection--single,
.po-list-filter .select2-container--open .select2-selection--single:hover {
  border-color: var(--accent-walnut);
  box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
  outline: none;
}

.po-line-list .select2-container .select2-selection--single {
  height: 28px;
}

.po-line-list .select2-container .select2-selection__rendered,
.po-list-filter .select2-container .select2-selection__rendered {
  color: var(--text-primary);
  font-size: 0.85rem;
  padding-left: 8px;
}

.po-line-list .select2-container .select2-selection__rendered {
  line-height: 25px;
}

.po-line-list .select2-container .select2-selection__arrow {
  height: 25px;
}

.po-list-filter .select2-container {
  max-width: 100%;
}

.po-list-filter .select2-container .select2-selection--single {
  height: 32px;
}

.po-list-filter .select2-container .select2-selection__rendered {
  line-height: 29px;
}

.po-list-filter .select2-container .select2-selection__arrow {
  height: 29px;
}
@layer components {
  .purchasing-report {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .purchasing-report > *, .purchasing-report form > *, .purchasing-report .purchasing-report-breakdown > * {
    min-width: 0;
  }
  .purchasing-report .purchasing-report-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 16px;
  }
  .purchasing-report .purchasing-report-header .rb-section-title {
    font-size: 1.9rem;
  }
  .purchasing-report .purchasing-report-period {
    display: grid;
    gap: 8px;
  }
  .purchasing-report .purchasing-report-quick-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .purchasing-report .purchasing-report-range {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
  }
  .purchasing-report .purchasing-report-range-label,
  .purchasing-report .purchasing-report-range-sep {
    padding-top: 7px;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .purchasing-report .purchasing-report-date {
    display: grid;
    gap: 2px;
  }
  .purchasing-report .purchasing-report-date input {
    width: 9.5em;
  }
  .purchasing-report .purchasing-report-day {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-tertiary);
  }
  .purchasing-report .purchasing-report-filters,
  .purchasing-report .purchasing-report-chart {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px 18px;
  }
  .purchasing-report .purchasing-report-filters .rb-section-header {
    margin-bottom: 10px;
  }
  .purchasing-report .purchasing-report-panel-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .purchasing-report .purchasing-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 10px 24px;
  }
  .purchasing-report .purchasing-report-field {
    display: grid;
    grid-template-columns: 9em minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }
  .purchasing-report .purchasing-report-field label {
    justify-self: end;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .purchasing-report .purchasing-report-field select,
  .purchasing-report .purchasing-report-field input {
    width: 100%;
    min-width: 0;
  }
  .purchasing-report .purchasing-report-search {
    grid-column: 1/-1;
    grid-template-columns: 9em minmax(0, 36em) auto;
    justify-content: start;
  }
  .purchasing-report .purchasing-report-notice {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-weight: 700;
  }
  .purchasing-report .purchasing-report-group-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
  }
  .purchasing-report .purchasing-report-group-by-label {
    font-weight: 700;
    color: var(--text-secondary);
  }
  .purchasing-report .purchasing-report-breakdown {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 20px;
  }
  @media (min-width: 1600px) {
    .purchasing-report .purchasing-report-breakdown:not(.purchasing-report-breakdown--empty) {
      grid-template-columns: minmax(min-content, 5fr) minmax(0, 7fr);
    }
    .purchasing-report .purchasing-report-summary-panel {
      order: -1;
    }
    .purchasing-report .purchasing-report-breakdown.purchasing-report-breakdown--details-hidden {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .purchasing-report .purchasing-report-breakdown--details-hidden:not(.purchasing-report-breakdown--empty) .purchasing-report-summary-panel {
    display: none;
  }
  .purchasing-report .purchasing-report-summary-panel .rb-table-wrap,
  .purchasing-report .purchasing-report-pos-panel .rb-table-wrap {
    overflow-x: auto;
  }
  .purchasing-report .purchasing-report-summary-panel .rb-table-wrap {
    max-height: 30rem;
    overflow-y: auto;
  }
  .purchasing-report .purchasing-report-summary thead th {
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .purchasing-report .purchasing-report-summary tfoot th {
    position: sticky;
    bottom: 0;
    z-index: 1;
    box-shadow: 0 -1.5px 0 var(--border-light);
  }
  .purchasing-report .rb-table .purchasing-report-wrap {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .purchasing-report .purchasing-report-nowrap {
    white-space: nowrap;
  }
  .purchasing-report .purchasing-report-summary tfoot th {
    padding: 12px 14px;
    background: var(--bg-secondary);
    font-family: var(--font-display);
    font-size: 1.05rem;
    text-align: left;
    color: var(--text-primary);
  }
  .purchasing-report .purchasing-report-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .purchasing-report .rb-table th.purchasing-report-num,
  .purchasing-report .purchasing-report-summary tfoot th.purchasing-report-num {
    text-align: right;
  }
  .purchasing-report .purchasing-report-chart .rb-section-header {
    flex-wrap: wrap;
    margin-bottom: 0;
  }
  .purchasing-report .purchasing-report-chart-types,
  .purchasing-report .purchasing-report-chart-view {
    display: flex;
    gap: 4px;
  }
  .purchasing-report .purchasing-report-chart-types {
    margin-left: auto;
  }
  .purchasing-report .purchasing-report-chart .rb-bar-chart {
    grid-auto-columns: minmax(64px, 1fr);
    margin-top: 12px;
  }
  .purchasing-report .purchasing-report-pie {
    position: relative;
    height: 340px;
    margin-top: 12px;
  }
  .purchasing-report .purchasing-report-pie--unavailable {
    height: auto;
  }
  .purchasing-report a.rb-bar-chart__bar {
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-sm);
  }
  .purchasing-report a.rb-bar-chart__bar:hover .rb-bar-chart__fill,
  .purchasing-report a.rb-bar-chart__bar:focus-visible .rb-bar-chart__fill,
  .purchasing-report a.rb-bar-chart__bar[aria-current] .rb-bar-chart__fill {
    background: var(--accent-walnut);
  }
  .purchasing-report a.rb-bar-chart__bar:focus-visible {
    outline: 2px solid var(--accent-walnut);
    outline-offset: 2px;
  }
  .purchasing-report a.rb-bar-chart__bar[aria-current] .rb-bar-chart__label {
    border-top-color: var(--accent-walnut);
    color: var(--text-primary);
  }
  .purchasing-report .purchasing-report-pie-links:not(:focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .purchasing-report .purchasing-report-pie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 8px;
    font-size: 0.85rem;
  }
  .purchasing-report .purchasing-report-pie-links [aria-current] {
    font-weight: 700;
  }
  .purchasing-report .purchasing-report-po-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
    margin-bottom: 10px;
  }
  .purchasing-report .purchasing-report-po-filter {
    display: grid;
    gap: 2px;
    width: 12em;
  }
  .purchasing-report .purchasing-report-po-filter--search {
    width: 18em;
  }
  .purchasing-report .purchasing-report-po-filter label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .purchasing-report .purchasing-report-po-filter select,
  .purchasing-report .purchasing-report-po-filter input {
    width: 100%;
  }
  .purchasing-report .purchasing-report-po-filter-actions {
    display: flex;
    gap: 4px;
  }
  .purchasing-report .purchasing-report-list-filtered {
    margin: 0 0 10px;
  }
  .purchasing-report .purchasing-report-breakdown--large .rb-bar-chart {
    --rb-bar-plot: 440px;
  }
  .purchasing-report .purchasing-report-breakdown--large .purchasing-report-pie:not(.purchasing-report-pie--unavailable) {
    height: 620px;
  }
  .purchasing-report .purchasing-report-muted {
    font-weight: 600;
    color: var(--text-tertiary);
  }
  .purchasing-report .purchasing-report-pos-panel {
    scroll-margin-top: calc(var(--header-height) + 12px);
  }
  .purchasing-report .purchasing-report-pos-panel .rb-section-header {
    margin-bottom: 10px;
  }
  .purchasing-report .purchasing-report-pager {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 600;
  }
  .purchasing-report .purchasing-report-pager .rb-pagination {
    padding: 0;
  }
  .purchasing-report .purchasing-report-empty,
  .purchasing-report .purchasing-report-note {
    color: var(--text-tertiary);
    font-weight: 600;
  }
  .purchasing-report .purchasing-report-note {
    margin-top: 8px;
  }
}
@charset "UTF-8";
@layer components {
  /* ============================================================
     Quote Requests — Kovet Design System
     Uses global CSS vars from design_system/tokens.scss :root
     ============================================================ */
  /* ===== INDEX PAGE ===== */
  .qr-page {
    min-height: 100vh;
    background: var(--bg-primary);
  }
  /* ===== TOP BAR ===== */
  .qr-top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(224, 216, 206, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1.5px solid var(--border-medium);
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .qr-top-bar-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
  }
  .qr-top-bar-search {
    position: relative;
    flex: 1;
    max-width: 280px;
    /* Text fields only: a Search/Filter submit in the bar is an .rb-btn. */
  }
  .qr-top-bar-search input:not([type=submit]):not([type=button]) {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px 6px 32px;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .qr-top-bar-search input:not([type=submit]):not([type=button]):focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 2px rgba(90, 45, 28, 0.08);
  }
  .qr-top-bar-search input:not([type=submit]):not([type=button])::placeholder {
    color: var(--text-tertiary);
    font-weight: 600;
  }
  .qr-top-bar-search svg {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    color: var(--text-tertiary);
    pointer-events: none;
  }
  .qr-top-bar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  /* ===== FILTER DROPDOWNS (index top bar) ===== */
  .qr-filter-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .qr-filter-select {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 26px 6px 10px;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%238B7F73' stroke-width='1.5'><polyline points='1 1 5 5 9 1'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
  }
  .qr-filter-select:focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 2px rgba(90, 45, 28, 0.08);
  }
  /* ===== DRAG / DROP ===== */
  .qr-dragging {
    opacity: 0.5;
  }
  .qr-drop-target td {
    background: rgba(90, 45, 28, 0.06) !important;
  }
  .qr-order-row[draggable=true] {
    cursor: grab;
  }
  .qr-order-row[draggable=true]:active {
    cursor: grabbing;
  }
  /* Buttons are the shared .rb-btn family (design_system/components.scss). */
  /* ===== TABLE ===== */
  .qr-table-wrapper {
    padding: 12px 24px 40px;
  }
  .qr-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  /* Column headers */
  .qr-col-head {
    background: var(--bg-secondary);
    border-top: 1.5px solid var(--border-medium);
    border-bottom: 1.5px solid var(--border-medium);
    position: sticky;
    top: 52px;
    z-index: 40;
  }
  .qr-col-head th {
    padding: 6px 8px;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    text-align: left;
    white-space: normal;
    line-height: 1.2;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid rgba(200, 189, 178, 0.4);
  }
  .qr-col-head th:last-child {
    border-right: none;
  }
  /* ===== GROUP HEADERS ===== */
  .qr-group-spacer td {
    height: 18px;
    background: var(--bg-primary);
    border: none;
    padding: 0;
  }
  .qr-group-header td {
    padding: 0;
    border: none;
    background: var(--bg-primary);
  }
  .qr-group-header-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-left: 3px solid transparent;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 0;
    transition: filter 100ms ease;
  }
  .qr-group-header-inner:hover {
    filter: brightness(0.96);
  }
  .qr-group-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.4;
  }
  .qr-group-collapse-icon {
    margin-left: auto;
    width: 12px;
    height: 12px;
    opacity: 0.5;
    transition: transform 200ms ease, opacity 100ms ease;
  }
  .qr-group-collapse-icon.collapsed {
    transform: rotate(-90deg);
  }
  .qr-group-header-inner:hover .qr-group-collapse-icon {
    opacity: 0.8;
  }
  /* ===== DATA ROWS ===== */
  .qr-order-row {
    border-left: 3px solid transparent;
    transition: background 80ms ease;
    cursor: pointer;
  }
  .qr-order-row:hover td {
    background: rgba(90, 45, 28, 0.03);
  }
  .qr-order-row td {
    padding: 0 8px;
    height: 36px;
    border-bottom: 1px solid rgba(200, 189, 178, 0.35);
    vertical-align: middle;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-card);
    transition: background 80ms ease;
  }
  .qr-overdue-row {
    border-left-color: var(--unfulfilled) !important;
  }
  .qr-overdue-row td {
    background: #FFF8F8;
  }
  .qr-overdue-row:hover td {
    background: rgba(185, 28, 28, 0.04);
  }
  /* Cell styles */
  .qr-id-cell {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
  }
  .qr-id-link {
    color: var(--accent-walnut);
    text-decoration: none;
    font-weight: 600;
  }
  .qr-id-link:hover {
    text-decoration: underline;
  }
  .qr-client-cell {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.82rem;
  }
  .qr-desc-cell {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.78rem;
  }
  .qr-list-primary {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Note row — spans Customer → Costing by quoter */
  .qr-order-note-row {
    cursor: pointer;
  }
  .qr-order-note-row td {
    background: var(--bg-card);
    border-bottom: 1px solid rgba(200, 189, 178, 0.35);
    padding: 0;
    white-space: normal;
    overflow: visible;
  }
  .qr-order-note-row:hover td {
    background: rgba(90, 45, 28, 0.03);
  }
  .qr-order-row:has(+ .qr-order-note-row) td {
    border-bottom: none;
  }
  .qr-order-row + .qr-order-note-row td {
    border-top: none;
  }
  .qr-order-note-filler {
    padding: 0 !important;
  }
  .qr-order-note-cell {
    padding: 0 8px 8px !important;
  }
  .qr-overdue-row.qr-order-note-row td {
    background: #FFF8F8;
  }
  .qr-overdue-row.qr-order-note-row:hover td {
    background: rgba(185, 28, 28, 0.04);
  }
  .qr-list-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 12px;
    background: rgba(217, 179, 76, 0.1);
    border-left: 3px solid rgba(184, 134, 11, 0.55);
    border-radius: 3px;
    font-size: 0.74rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.45;
    color: #7a5f1f;
  }
  .qr-list-note span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
  }
  .qr-list-note-icon {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    margin-top: 2px;
    opacity: 0.8;
    color: #a47d1f;
  }
  .qr-overdue-row .qr-list-note {
    background: rgba(185, 28, 28, 0.06);
    border-left-color: rgba(185, 28, 28, 0.5);
    color: #7a2e2e;
  }
  .qr-overdue-row .qr-list-note-icon {
    color: #a84141;
  }
  .qr-user-cell {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .qr-rep-cell {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
  }
  .qr-age-cell {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-align: center;
  }
  .qr-overdue-cell {
    text-align: center;
  }
  .qr-overdue-flag {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--unfulfilled-bg);
    color: var(--unfulfilled);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
  }
  .qr-est-cell {
    font-family: var(--font-mono);
    font-size: 0.74rem;
  }
  .qr-est-cell a {
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .qr-est-cell a:hover {
    text-decoration: underline;
  }
  .qr-empty-group td {
    padding: 8px 12px;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-card);
    border-bottom: 1px solid rgba(200, 189, 178, 0.35);
    font-style: italic;
  }
  .cadwf-create-field {
    min-height: 34px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 10px;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
  }
  .cadwf-create-field:focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 2px rgba(90, 45, 28, 0.08);
  }
  /* ===== NEW WORKFLOW MODAL ===== */
  .cadwf-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .cadwf-modal.is-hidden {
    display: none;
  }
  body.cadwf-modal-open {
    overflow: hidden;
  }
  .cadwf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 18, 16, 0.55);
    backdrop-filter: blur(2px);
    animation: cadwf-fade-in 0.16s ease-out;
  }
  .cadwf-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(26, 18, 16, 0.35);
    animation: cadwf-pop-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    overflow: hidden;
  }
  @keyframes cadwf-fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes cadwf-pop-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  .cadwf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
  }
  .cadwf-modal-title {
    margin: 0;
    font-family: var(--font-display, var(--font-body));
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-primary);
  }
  .cadwf-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .cadwf-modal-close:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
    color: var(--text-primary);
  }
  .cadwf-modal-close svg {
    width: 16px;
    height: 16px;
  }
  .cadwf-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  .cadwf-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
  }
  .cadwf-modal-note {
    margin: 0 0 16px 0;
    color: var(--text-tertiary);
    font-size: 0.86rem;
    font-style: italic;
  }
  .cadwf-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
  }
  .cadwf-modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .cadwf-modal-field-full {
    grid-column: 1/-1;
  }
  .cadwf-modal-field label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .cadwf-modal-field .cadwf-create-field {
    width: 100%;
    min-height: 36px;
  }
  .cadwf-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
  }
  @media (max-width: 600px) {
    .cadwf-modal-grid {
      grid-template-columns: 1fr;
    }
    .cadwf-modal {
      padding: 12px;
    }
    .cadwf-modal-dialog {
      max-height: calc(100vh - 24px);
    }
  }
  /* ===== STATUS PILL ===== */
  .qr-status-pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 1.3;
  }
  /* ===== SHOW PAGE ===== */
  .qr-show-page {
    padding-bottom: 40px;
    background: var(--bg-primary);
    min-height: 100vh;
  }
  .qr-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: rgba(224, 216, 206, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1.5px solid var(--border-medium);
    padding: 14px 24px;
  }
  .qr-show-header h1 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3px 0;
    letter-spacing: -0.01em;
  }
  .qr-show-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
  }
  .qr-back-link {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent-walnut) !important;
    text-decoration: none;
    letter-spacing: 0.01em;
  }
  .qr-back-link:hover {
    text-decoration: underline;
  }
  .qr-show-meta {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .qr-show-id {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-tertiary);
  }
  .qr-show-grid {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .qr-show-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
  }
  .qr-section-title {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(200, 189, 178, 0.4);
  }
  .qr-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 20px;
  }
  .qr-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .qr-detail-full {
    grid-column: 1/-1;
  }
  .qr-detail-label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
  }
  .qr-detail-value {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
  }
  .qr-linked-estimate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .qr-unlink-estimate {
    display: inline-flex;
    align-items: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color 0.12s ease;
  }
  .qr-unlink-estimate svg {
    width: 14px;
    height: 14px;
  }
  .qr-unlink-estimate:hover {
    color: var(--accent-walnut);
  }
  .qr-description-box {
    margin-top: 14px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 5px;
    border: 1px solid rgba(200, 189, 178, 0.3);
  }
  .qr-description-box h3 {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 4px;
  }
  .qr-description-box p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
  }
  /* ===== TABLES (BOM, Docs, Notes) ===== */
  .qr-bom-table {
    width: 100%;
    border-collapse: collapse;
  }
  .qr-bom-table thead th {
    padding: 6px 8px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    text-align: left;
  }
  .qr-bom-table tbody td {
    padding: 7px 8px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(200, 189, 178, 0.25);
    vertical-align: middle;
    color: var(--text-secondary);
  }
  .qr-bom-table tbody tr:last-child td {
    border-bottom: none;
  }
  .qr-num-cell {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
  }
  .qr-bom-total-row td {
    border-top: 1.5px solid var(--border-medium) !important;
    border-bottom: none !important;
    background: var(--bg-secondary);
    font-weight: 700;
  }
  .qr-empty-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
    padding: 4px 0;
  }
  /* ===== ACTION SECTION ===== */
  .qr-actions-section {
    background: var(--bg-secondary) !important;
    border-color: var(--border-light) !important;
  }
  .qr-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  @media (max-width: 720px) {
    .qr-show-header {
      flex-direction: column;
      align-items: stretch;
    }
    .qr-show-header-actions {
      justify-content: flex-start;
    }
  }
  .qr-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .qr-link {
    color: var(--accent-walnut);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
  }
  .qr-link:hover {
    text-decoration: underline;
  }
  /* ===== FORM PAGE ===== */
  .qr-form-page {
    padding-bottom: 40px;
    background: var(--bg-primary);
    min-height: 100vh;
  }
  .qr-form {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .qr-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
  }
  .qr-form-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
  }
  .qr-form-label-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .qr-input {
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 0.84rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .qr-input:focus {
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 2px rgba(90, 45, 28, 0.08);
  }
  .qr-input-full {
    width: 100%;
  }
  .qr-input-sm {
    width: 100px;
  }
  .qr-select {
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 0.84rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: border-color 150ms ease;
  }
  .qr-select:focus {
    border-color: var(--accent-walnut);
  }
  .qr-nested-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }
  .qr-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 2px dashed var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
  }
  .qr-dropzone:hover, .qr-dropzone:focus {
    border-color: var(--accent-walnut);
    color: var(--accent-walnut);
    outline: none;
  }
  .qr-dropzone-active {
    border-color: var(--accent-walnut) !important;
    background: rgba(90, 45, 28, 0.06) !important;
    color: var(--accent-walnut) !important;
  }
  .qr-form-actions {
    display: flex;
    gap: 8px;
    padding: 0 24px;
  }
  /* ===== FLASH MESSAGES ===== */
  .qr-flash {
    margin: 12px 24px 0;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
  }
  .qr-flash-notice {
    background: var(--fulfilled-bg);
    color: var(--fulfilled);
    border: 1px solid rgba(21, 94, 62, 0.15);
  }
  .qr-flash-alert {
    background: var(--unfulfilled-bg);
    color: var(--unfulfilled);
    border: 1px solid rgba(185, 28, 28, 0.15);
  }
  .qr-spec-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
  }
  .qr-spec-pick-intro {
    margin: 0 0 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 760px;
  }
  .qr-spec-pick-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: var(--bg-subtle);
    border-radius: 6px;
  }
  .qr-spec-pick-toolbar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
  }
  .qr-spec-pick-counter {
    font-size: 13px;
    color: var(--text-secondary);
  }
  .qr-spec-pick-table tbody tr.qr-spec-pick-row-disabled {
    background: rgba(0, 0, 0, 0.025);
    color: var(--text-secondary);
  }
  .qr-spec-pick-table tbody tr.qr-spec-pick-row-disabled .qr-spec-pick-filename {
    text-decoration: line-through;
    text-decoration-color: rgba(0, 0, 0, 0.2);
  }
  .qr-spec-pick-filename {
    font-weight: 500;
    cursor: pointer;
  }
  .qr-spec-pick-row-disabled .qr-spec-pick-filename {
    cursor: default;
  }
  .qr-spec-pick-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
  }
  .qr-spec-pick-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
  }
  .qr-spec-pick-type-ok {
    background: rgba(21, 94, 62, 0.1);
    color: var(--fulfilled);
  }
  .qr-spec-pick-type-blocked {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
  }
  .qr-spec-pick-status-ok {
    color: var(--fulfilled);
    font-size: 13px;
  }
  .qr-spec-pick-status-blocked {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
  }
  .qr-spec-pick-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
  }
}
@layer components {
  .roles-admin {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 32px 64px;
    font-family: var(--font-body);
    color: var(--text-primary);
  }
  .roles-admin .is-hidden {
    display: none !important;
  }
  .roles-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-medium);
  }
  .roles-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .roles-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    margin: 4px 0 0;
  }
  .roles-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .roles-search {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    width: 220px;
    outline: none;
    transition: border-color var(--transition-fast);
  }
  .roles-search:focus {
    border-color: var(--accent-walnut);
  }
  .roles-subrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 2px 12px;
  }
  .roles-lede {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 560px;
    text-wrap: pretty;
  }
  .roles-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-tertiary);
    white-space: nowrap;
  }
  .roles-table {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .roles-thead, .roles-row {
    display: grid;
    grid-template-columns: 250px 1fr 92px 132px;
    align-items: center;
    gap: 16px;
  }
  .roles-thead {
    padding: 11px 18px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
  }
  .roles-th {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .roles-th--right {
    text-align: right;
  }
  .roles-row {
    padding: 13px 18px;
    border-bottom: 1px solid rgba(232, 226, 219, 0.9);
    transition: background var(--transition-fast);
  }
  .roles-row:last-child {
    border-bottom: 0;
  }
  .roles-row:hover {
    background: rgba(237, 232, 225, 0.5);
  }
  .roles-role {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .roles-role-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.15;
  }
  .roles-role-users {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-tertiary);
  }
  .roles-role-types {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
  }
  .roles-chip--type {
    height: 18px;
    padding: 0 7px;
    font-size: 0.66rem;
  }
  .roles-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }
  .roles-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 22px;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    background: var(--row-stripe);
    border: 1px solid var(--bg-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .roles-chip-count {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.68rem;
    color: var(--text-tertiary);
  }
  .roles-chip--all {
    gap: 0;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    background: rgba(21, 94, 62, 0.1);
    border: 0;
    color: var(--status-open);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .roles-total {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--text-primary);
  }
  .roles-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .roles-empty-rows {
    padding: 28px 18px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
  }
  .roles-edit-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-medium);
  }
  .roles-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
  }
  .roles-crumbs .roles-crumb-current {
    color: var(--text-secondary);
  }
  .roles-edit-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 18px;
  }
  .roles-granted {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-tertiary);
    margin-right: 6px;
    white-space: nowrap;
  }
  .roles-layout {
    display: grid;
    grid-template-columns: 252px 1fr;
    gap: 20px;
    align-items: start;
    padding-top: 20px;
  }
  .roles-side {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .roles-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .roles-name-card {
    padding: 14px 16px 16px;
  }
  .roles-field-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
  }
  .roles-name-input {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    outline: none;
    transition: border-color var(--transition-fast);
  }
  .roles-name-input:focus {
    border-color: var(--accent-walnut);
  }
  .roles-grant-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(232, 226, 219, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
  }
  .roles-grant-toggle input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent-walnut);
  }
  .roles-types {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(232, 226, 219, 0.9);
  }
  .roles-types .roles-grant-toggle {
    margin-top: 6px;
    padding-top: 0;
    border-top: 0;
  }
  .roles-grant-toggle input:disabled {
    cursor: not-allowed;
  }
  .roles-grant-help {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-top: 5px;
    text-wrap: pretty;
  }
  .roles-areas {
    overflow: hidden;
    transition: opacity var(--transition-fast);
  }
  .roles-areas-title {
    padding: 12px 16px 9px;
    border-bottom: 1px solid rgba(232, 226, 219, 0.9);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .roles-area {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: var(--bg-card);
    border: 0;
    border-bottom: 1px solid rgba(232, 226, 219, 0.9);
    border-left: 3px solid transparent;
    padding: 9px 16px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: background var(--transition-fast);
  }
  .roles-area:last-child {
    border-bottom: 0;
  }
  .roles-area:hover {
    background: var(--surface-inset);
  }
  .roles-area.is-active {
    background: var(--row-stripe);
    border-left-color: var(--accent-walnut);
  }
  .roles-area-count {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.72rem;
    color: var(--text-tertiary);
  }
  .roles-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: opacity var(--transition-fast);
  }
  .roles-filterbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
  }
  .roles-filter-input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    outline: none;
    transition: border-color var(--transition-fast);
  }
  .roles-filter-input:focus {
    border-color: var(--accent-walnut);
  }
  .roles-result {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-tertiary);
    padding-left: 4px;
    white-space: nowrap;
  }
  .roles-group {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .roles-group-head {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 18px 10px;
    border-bottom: 1px solid rgba(232, 226, 219, 0.9);
    background: var(--bg-subtle);
  }
  .roles-group-name {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .roles-group-count {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-tertiary);
  }
  .roles-group-toggle {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-walnut);
    background: transparent;
    border: 0;
    padding: 2px 0;
    cursor: pointer;
  }
  .roles-group-toggle:hover {
    text-decoration: underline;
  }
  .roles-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 0 18px;
    padding: 8px 18px 14px;
  }
  .roles-auth {
    display: grid;
    grid-template-columns: 16px 1fr;
    align-items: start;
    gap: 10px;
    padding: 6px;
    margin: 0 -6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    text-wrap: pretty;
    transition: background var(--transition-fast);
  }
  .roles-auth-note {
    grid-column: 2;
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-tertiary);
  }
  .roles-auth input:disabled {
    cursor: not-allowed;
  }
  .roles-auth:hover {
    background: rgba(237, 232, 225, 0.6);
  }
  .roles-auth input {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    cursor: pointer;
    accent-color: var(--accent-walnut);
  }
  .roles-empty {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
  }
  .roles-empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
  }
  .roles-empty-sub {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-top: 4px;
  }
  .roles-layout.is-grant-all .roles-areas,
  .roles-layout.is-grant-all .roles-main {
    opacity: 0.45;
    pointer-events: none;
  }
  @media (max-width: 860px) {
    .roles-admin {
      padding: 20px 16px 48px;
    }
    .roles-thead, .roles-row {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    .roles-th:not(:first-child) {
      display: none;
    }
    .roles-total {
      text-align: left;
    }
    .roles-row-actions {
      justify-content: flex-start;
    }
    .roles-layout {
      grid-template-columns: 1fr;
    }
    .roles-side {
      position: static;
    }
  }
}
@layer components {
.sales-line-report-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 12px 0 16px;
}

.sales-line-report-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-tertiary);
}

.sales-line-report-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  white-space: nowrap;
}

.sales-line-report-customers {
  min-width: 320px;
  flex: 1 1 320px;
  max-width: 640px;
}

.sales-line-report-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.sales-line-report-totals > div {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 14px;
}

.sales-line-report-totals dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-tertiary);
}

.sales-line-report-totals dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sales-line-report-scroll {
  overflow-x: auto;
}

.sales-line-report-table th.num,
.sales-line-report-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sales-line-report-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
}
}
@charset "UTF-8";
.fixed-container {
  position: relative;
}
.fixed-container .schedule-container {
  overflow: auto;
  position: relative;
}
.fixed-container TABLE.schedule, .fixed-container TABLE.fixed-process-column {
  border-collapse: collapse;
  table-layout: fixed;
}
.fixed-container TABLE.schedule THEAD TH, .fixed-container TABLE.fixed-process-column THEAD TH {
  background: #eee;
  border: 1px solid #ccc;
  text-align: left;
  padding: 2px 4px;
}
.fixed-container TABLE.schedule THEAD TR.days TH, .fixed-container TABLE.fixed-process-column THEAD TR.days TH {
  font-size: 10px;
  text-align: center;
  font-weight: normal;
  color: #333;
  padding: 2px 0;
}
.fixed-container TABLE.schedule TBODY TH, .fixed-container TABLE.fixed-process-column TBODY TH {
  text-align: right;
  font-size: 12px;
  border: 1px solid #ccc;
  background: white;
}
.fixed-container TABLE.schedule TBODY TH.order-header, .fixed-container TABLE.fixed-process-column TBODY TH.order-header {
  background: beige !important;
}
.fixed-container TABLE.schedule TBODY TD, .fixed-container TABLE.fixed-process-column TBODY TD {
  position: relative;
  border: 1px solid #ccc;
  padding: 0;
  height: 62px;
  background-image: -moz-linear-gradient(left, transparent 0px, transparent 20px, rgba(160, 160, 160, 0.2) 21px); /* FF3.6+ */
  background-image: -webkit-gradient(linear, left top, right top, color-stop(0px, transparent), color-stop(20px, transparent), color-stop(21px, rgba(160, 160, 160, 0.2)), color-stop(21px, transparent)); /* Chrome,Safari4+ */
  background-image: -webkit-linear-gradient(left, transparent 0px, transparent 20px, rgba(160, 160, 160, 0.2) 21px); /* Chrome10+,Safari5.1+ */
  background-image: -o-linear-gradient(left, transparent 0px, transparent 20px, rgba(160, 160, 160, 0.2) 21px); /* Opera 11.10+ */
  background-image: -ms-linear-gradient(left, transparent 0px, transparent 20px, rgba(160, 160, 160, 0.2) 21px); /* IE10+ */
  background-image: linear-gradient(to right, transparent 0px, transparent 20px, rgba(160, 160, 160, 0.2) 21px); /* W3C */
  background-size: 21px 100%;
}
.fixed-container TABLE.fixed-process-column {
  position: absolute;
  left: 0;
  top: 0;
}
.fixed-container TABLE.fixed-process-column.pop {
  -webkit-box-shadow: 4px 0px 4px -4px rgba(0, 0, 0, 0.85);
  -moz-box-shadow: 4px 0px 4px -4px rgba(0, 0, 0, 0.85);
  box-shadow: 4px 0px 4px -4px rgba(0, 0, 0, 0.85);
}
.fixed-container .skip, .fixed-container .process, .fixed-container .order {
  float: left;
  height: 60px;
}
.fixed-container .order-cell {
  cursor: pointer;
  background: beige;
  height: 25px !important;
}
.fixed-container .process {
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
  /* default for process names without an explicit color mapping below
     (CUT, SEW, DESIGN, ...) — otherwise the bar is transparent and its
     white text renders as an invisible box */
}
.fixed-container .process .liner {
  background: var(--accent-walnut-light);
}
.fixed-container .process.color-red .liner {
  background: red;
}
.fixed-container .process.color-CAD .liner {
  background: #803E75;
}
.fixed-container .process.color-FRAME .liner {
  background: #FF6800;
}
.fixed-container .process.color-FINISHING .liner {
  background: #A6BDD7;
}
.fixed-container .process.color-UPHOLSTERY .liner {
  background: #C10020;
}
.fixed-container .process.color-PACKAGING .liner {
  background: #CEA262;
}
.fixed-container .process.color-ORDER-MATERIALS .liner {
  background: green;
}
.fixed-container .process.color-7 .liner {
  background: #817066;
}
.fixed-container .process.hover {
  border-left: 2px solid blue;
  margin-left: -2px;
}
.fixed-container .process.selected {
  background: blue;
}
.fixed-container .process .liner {
  margin: 1px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 4px;
  height: 48px;
}
.fixed-container .process .liner .job {
  display: block;
  font-weight: bold;
}
.fixed-container .process .liner .hours {
  display: block;
  font-size: 11px;
}
.fixed-container .process .liner .process {
  display: none;
}
.fixed-container .mask {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
}

.process-detail-popup {
  position: absolute;
}
.process-detail-popup .content {
  border: 3px solid black;
  border-radius: 4px;
  background: white;
  padding: 8px;
  box-shadow: 0px 1px 4px black;
}
.process-detail-popup .content .job {
  display: block;
  font-weight: bold;
}
.process-detail-popup .content .hours {
  display: block;
  font-size: 11px;
}
.process-detail-popup .content .process {
  display: block;
}
.process-detail-popup .content .order {
  display: block;
}
.process-detail-popup .arrow {
  display: block;
  position: absolute;
  height: 6px;
  width: 100%;
  top: -6px;
  /* the popup-arrow-up/down.png files referenced here no longer exist
     anywhere (the refs 404ed silently), so the pointer nub is gone —
     the popover renders fine without it */
  background: transparent;
}
.process-detail-popup.down .arrow {
  top: auto;
  bottom: -6px;
}
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}

/* ── sfr-ui theme ──────────────────────────────────────────────────────────
   select2 ships styled for a generic Bootstrap-ish form; these rules bring it
   in line with the legacy_ui field styling the rest of this app's filter
   panels use.

   Deliberately NOT wrapped in @layer: select2's own rules above are
   unlayered, and an unlayered rule beats any layered one regardless of
   specificity, so a @layer components block here would silently lose.
   ------------------------------------------------------------------------ */
.select2-container .select2-selection--single {
  height: 26px;
  border: 1px solid #b4b4b4;
  border-radius: 2px;
  background: #fff;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 24px;
  padding-left: 6px;
  font-size: 12px;
  color: #333;
}

.select2-container .select2-selection--single .select2-selection__arrow {
  height: 24px;
}

.select2-container--open .select2-dropdown {
  border-color: #b4b4b4;
  font-size: 12px;
}

/* The filter panel sits inside the legacy field grid, whose columns are
   narrow; without this the widget collapses to its content width. */
.search-form .select2-container {
  width: 100% !important;
}
@layer components {
  .shipment-map {
    --sm-ready: var(--status-open);
    --sm-in-production: var(--status-shipped);
    --sm-late: var(--status-rush);
    --sm-on-hold: var(--status-hold);
    --sm-origin: var(--accent-walnut);
    color: var(--text-primary);
    font-family: var(--font-body);
    padding: 4px 0 16px;
  }
  .shipment-map *, .shipment-map *::before, .shipment-map *::after {
    box-sizing: border-box;
  }
  .shipment-map h1, .shipment-map p {
    margin: 0;
  }
  .shipment-map .sm-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .shipment-map .sm-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 4px;
  }
  .shipment-map h1 {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.2;
  }
  .shipment-map .sm-intro {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
    max-width: 640px;
  }
  .shipment-map .sm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
    color: var(--text-secondary);
  }
  .shipment-map .sm-legend li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .shipment-map .sm-swatch {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 0 1px var(--border-light);
  }
  .shipment-map .sm-swatch.sm-ready {
    background: var(--sm-ready);
  }
  .shipment-map .sm-swatch.sm-in-production {
    background: var(--sm-in-production);
  }
  .shipment-map .sm-swatch.sm-late {
    background: var(--sm-late);
  }
  .shipment-map .sm-swatch.sm-on-hold {
    background: var(--sm-on-hold);
  }
  .shipment-map .sm-swatch.sm-origin {
    background: var(--sm-origin);
    border-radius: 2px;
  }
  .shipment-map .sm-weeks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
  }
  .shipment-map .sm-weeks legend {
    float: left;
    margin-right: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .shipment-map .sm-week {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }
  .shipment-map .sm-week input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .shipment-map .sm-week span {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-card);
    font-size: 12px;
    color: var(--text-secondary);
  }
  .shipment-map .sm-week small {
    font-size: 10px;
    color: var(--text-tertiary);
  }
  .shipment-map .sm-week em {
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .shipment-map .sm-week input:checked + span {
    border-color: var(--accent-walnut);
    box-shadow: inset 0 0 0 1px var(--accent-walnut);
    background: color-mix(in srgb, var(--accent-walnut) 9%, var(--bg-card));
    color: var(--text-primary);
  }
  .shipment-map .sm-week input:focus-visible + span {
    outline: 2px solid var(--accent-brass);
    outline-offset: 1px;
  }
  .shipment-map .sm-week-tools {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
  }
  .shipment-map .sm-week-tools .rb-btn {
    margin: 0;
    padding: 4px 9px;
  }
  .shipment-map .sm-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 12px;
    height: calc(100vh - 250px);
    min-height: 420px;
  }
  .shipment-map .sm-map {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    min-height: 360px;
    z-index: 0;
  }
  .shipment-map .sm-map-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    min-height: 0;
  }
  .shipment-map .sm-map-col .sm-map {
    flex: 1;
  }
  .shipment-map .sm-trucks {
    flex: none;
    min-width: 0;
  }
  .shipment-map .sm-trucks-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
  }
  .shipment-map .sm-trucks-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .shipment-map .sm-trucks-title .sm-hint {
    margin-left: 4px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
  }
  .shipment-map .sm-truck-cards {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .shipment-map .sm-truck-card {
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font: inherit;
    font-size: 11px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
  }
  .shipment-map .sm-truck-card:hover {
    background: var(--row-stripe);
  }
  .shipment-map .sm-truck-card:focus-visible {
    outline: 2px solid var(--accent-brass);
    outline-offset: 1px;
  }
  .shipment-map .sm-truck-card.sm-active {
    border-color: var(--accent-walnut);
    box-shadow: inset 0 3px 0 var(--accent-walnut);
    color: var(--text-primary);
  }
  .shipment-map .sm-truck-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px 6px;
  }
  .shipment-map .sm-truck-top .sm-chip {
    white-space: nowrap;
  }
  .shipment-map .sm-truck-name {
    color: var(--text-primary);
    font-size: 12px;
    white-space: nowrap;
  }
  .shipment-map .sm-truck-stops {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .shipment-map .sm-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
  }
  .shipment-map .sm-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .shipment-map .sm-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .shipment-map .sm-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font-size: 11.5px;
    line-height: 1.45;
    cursor: pointer;
  }
  .shipment-map .sm-row:hover {
    background: var(--row-stripe);
  }
  .shipment-map .sm-row.sm-selected {
    border-color: var(--accent-walnut);
    box-shadow: inset 3px 0 0 var(--accent-walnut);
  }
  .shipment-map .sm-pick {
    margin: 2px 0 0;
    accent-color: var(--accent-walnut);
  }
  .shipment-map .sm-row-body {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .shipment-map .sm-selection {
    padding: 10px;
    border: 1px solid var(--accent-walnut);
    border-radius: 6px;
    background: var(--bg-card);
    font-size: 12px;
  }
  .shipment-map .sm-selection[hidden] {
    display: none;
  }
  .shipment-map .sm-selection p + * {
    margin-top: 6px;
  }
  .shipment-map .sm-selection-totals {
    color: var(--text-secondary);
    font-size: 11px;
  }
  .shipment-map .sm-truck {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .shipment-map .sm-truck label {
    font-weight: 700;
  }
  .shipment-map .sm-truck input {
    width: 90px;
    height: 30px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font: 12px var(--font-mono);
    text-transform: uppercase;
  }
  .shipment-map .sm-truck .rb-btn {
    margin: 0;
  }
  .shipment-map .sm-hint {
    font-size: 10.5px;
    color: var(--text-tertiary);
  }
  .shipment-map .sm-error {
    color: var(--status-rush);
    font-weight: 600;
    font-size: 11px;
  }
  .shipment-map .sm-saved {
    color: var(--status-open);
    font-weight: 600;
    font-size: 11px;
  }
  .shipment-map .sm-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--accent-walnut);
    font: inherit;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
  }
  .shipment-map .sm-planner {
    margin-top: 12px;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
  }
  .shipment-map .sm-planner summary {
    font-weight: 700;
    cursor: pointer;
  }
  .shipment-map .sm-planner p, .shipment-map .sm-planner form, .shipment-map .sm-plan-limits {
    margin-top: 8px;
  }
  .shipment-map .sm-plan-limits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .shipment-map .sm-planner label {
    display: block;
    font-size: 11px;
  }
  .shipment-map .sm-planner input:not([type=checkbox]) {
    display: block;
    width: 100%;
    min-width: 0;
    height: 30px;
    margin: 3px 0 0;
    padding: 4px 6px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
  }
  .shipment-map .sm-plan-stop {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }
  .shipment-map .sm-plan-stop b {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
  }
  .shipment-map .sm-planner .rb-btn {
    margin: 8px 0 0;
  }
  .shipment-map .sm-plan-confirm {
    margin-top: 10px;
    line-height: 1.5;
  }
  .shipment-map #sm-plan-summary {
    margin-bottom: 8px;
    font-weight: 700;
  }
  .shipment-map #sm-plan-result[hidden], .shipment-map #sm-plan-error[hidden], .shipment-map #sm-plan-saved[hidden] {
    display: none;
  }
  .shipment-map .sm-exceptions summary {
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
  }
  .shipment-map .sm-exceptions .sm-row {
    cursor: default;
  }
  @media (max-width: 900px) {
    .shipment-map .sm-main {
      grid-template-columns: 1fr;
      height: auto;
    }
    .shipment-map .sm-map {
      height: 60vh;
      flex: none;
    }
  }
  .shipment-map .sm-chip, .leaflet-popup-content .sm-chip {
    display: inline-block;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
  }
  .shipment-map .sm-chip.sm-ready, .leaflet-popup-content .sm-chip.sm-ready {
    background: var(--status-open);
  }
  .shipment-map .sm-chip.sm-in-production, .leaflet-popup-content .sm-chip.sm-in-production {
    background: var(--status-shipped);
  }
  .shipment-map .sm-chip.sm-late, .leaflet-popup-content .sm-chip.sm-late {
    background: var(--status-rush);
  }
  .shipment-map .sm-chip.sm-on-hold, .leaflet-popup-content .sm-chip.sm-on-hold {
    background: var(--status-hold);
  }
  .shipment-map .sm-problem, .leaflet-popup-content .sm-problem {
    color: var(--status-rush);
    font-weight: 700;
  }
  .sm-dot {
    stroke: #fff;
  }
  .sm-dot.sm-ready {
    fill: var(--status-open);
  }
  .sm-dot.sm-in-production {
    fill: var(--status-shipped);
  }
  .sm-dot.sm-late {
    fill: var(--status-rush);
  }
  .sm-dot.sm-on-hold {
    fill: var(--status-hold);
  }
  .sm-dot.sm-origin {
    fill: var(--accent-walnut);
    stroke: var(--accent-brass);
  }
  .sm-dot.sm-selected {
    stroke: var(--accent-brass);
    stroke-width: 4px;
  }
}
@charset "UTF-8";
@layer components {
  .rb-spec {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 32px 112px;
    font-family: var(--font-body);
    color: var(--text-primary);
  }
  .rb-spec-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
  }
  .rb-spec-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .rb-spec-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    color: var(--text-primary);
  }
  .rb-spec-source {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    max-width: 820px;
  }
  .rb-spec-source-label {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
  }
  .rb-spec-source-file {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-secondary);
    background: rgba(90, 45, 28, 0.07);
    border-radius: 4px;
    padding: 2px 7px;
  }
  .rb-spec-source-pdf {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-walnut);
  }
  .rb-spec-source-pdf svg {
    width: 13px;
    height: 13px;
  }
  .rb-spec-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .rb-spec-header-card {
    margin-bottom: 4px;
  }
  .rb-spec-card-title {
    padding: 13px 18px 10px;
    border-bottom: 1px solid rgba(232, 226, 219, 0.9);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .rb-spec-header-grid {
    padding: 16px 18px 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .rb-spec-section-title {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .rb-spec-section-title-sp {
    margin-top: 4px;
  }
  .rb-spec-microlabel {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 5px;
  }
  .rb-spec-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 6px 0 0;
    padding: 0 2px;
  }
  .rb-spec-toolbar-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .rb-spec-toolbar-total {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-spec-toolbar-unit {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .rb-spec-toolbar-dot {
    color: var(--border-medium);
  }
  .rb-spec-toolbar-matched {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .rb-spec-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .rb-spec-toolbar-sep {
    color: var(--border-medium);
  }
  .rb-spec-textbtn {
    border: 0;
    background: none;
    cursor: pointer;
    padding: 2px 1px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent-walnut);
    transition: opacity var(--transition-fast);
  }
  .rb-spec-textbtn:hover {
    opacity: 0.6;
    text-decoration: underline;
  }
  .rb-spec-colhead {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 40px 0 17px;
    margin: 12px 0 8px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .rb-spec-colhead-gutter {
    flex: 0 0 18px;
  }
  .rb-spec-colhead-item {
    flex: 1 1 auto;
    min-width: 0;
  }
  .rb-spec-colhead-match {
    flex: 0 0 96px;
  }
  .rb-spec-colhead-type {
    flex: 0 0 96px;
  }
  .rb-spec-colhead-qty {
    flex: 0 0 52px;
    text-align: right;
  }
  .rb-spec-colhead-price {
    flex: 0 0 96px;
    text-align: right;
  }
  .rb-spec-colhead-x {
    display: none;
  }
  .rb-spec-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .rb-spec-item {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: opacity var(--transition-fast);
  }
  .rb-spec-stripe {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-brass-light);
  }
  .rb-spec-item.is-matched .rb-spec-stripe {
    background: var(--status-open);
  }
  .rb-spec-item.is-excluded {
    opacity: 0.55;
  }
  .rb-spec-item.is-excluded .rb-spec-stripe {
    background: var(--border-medium);
  }
  .rb-spec-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 40px 11px 16px;
    min-width: 0;
  }
  .rb-spec-grip {
    flex: 0 0 14px;
    width: 14px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 -6px 0 -4px;
    border: 0;
    background: none;
    cursor: grab;
    color: var(--border-medium);
    border-radius: 4px;
    transition: color var(--transition-fast);
  }
  .rb-spec-grip svg {
    width: 14px;
    height: 14px;
  }
  .rb-spec-grip:hover,
  .rb-spec-grip:focus-visible {
    color: var(--accent-walnut);
  }
  .rb-spec-grip:active {
    cursor: grabbing;
  }
  .rb-spec-item.is-dragging {
    opacity: 0.4;
    border-style: dashed;
  }
  .rb-spec-caret {
    flex: 0 0 18px;
    width: 18px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--text-tertiary);
    border-radius: 4px;
    transition: color var(--transition-fast);
  }
  .rb-spec-caret svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
  }
  .rb-spec-caret:hover {
    color: var(--accent-walnut);
  }
  .rb-spec-item:not(.is-collapsed) .rb-spec-caret svg {
    transform: rotate(90deg);
  }
  .rb-spec-check {
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
  }
  .rb-spec-idcell {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .rb-spec-idtext {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .rb-spec-name {
    min-width: 0;
  }
  .rb-spec-name input {
    width: 100%;
    border-color: transparent !important;
    background: transparent !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.3;
    padding: 3px 6px !important;
    color: var(--text-primary);
  }
  .rb-spec-name input:hover {
    border-color: var(--border-light) !important;
    background: var(--bg-card) !important;
  }
  .rb-spec-name input:focus {
    border-color: var(--accent-walnut) !important;
    background: var(--bg-card) !important;
  }
  .rb-spec-idmeta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-left: 6px;
  }
  .rb-spec-code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-walnut);
    background: rgba(90, 45, 28, 0.07);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
  }
  .rb-spec-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rb-spec-cell-match {
    flex: 0 0 96px;
  }
  .rb-spec-cell-type {
    flex: 0 0 96px;
  }
  .rb-spec-cell-qty {
    flex: 0 0 52px;
  }
  .rb-spec-cell-price {
    flex: 0 0 96px;
  }
  .rb-spec-cell-type input,
  .rb-spec-cell-qty input,
  .rb-spec-cell-price input {
    width: 100%;
    height: 32px;
    padding: 0 9px !important;
    font-size: 0.78rem;
    font-weight: 700;
  }
  .rb-spec-cell-qty input,
  .rb-spec-cell-price input {
    font-family: var(--font-mono);
    text-align: right;
  }
  .rb-spec-cell-type input {
    color: var(--text-secondary);
  }
  .rb-spec-detail {
    border-top: 1px solid rgba(232, 226, 219, 0.9);
    background: var(--bg-card-hover);
    padding: 16px 18px 18px 46px;
  }
  .rb-spec-item.is-collapsed .rb-spec-detail {
    display: none;
  }
  .rb-spec-detail-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 1fr);
    gap: 24px;
  }
  .rb-spec-detail-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .rb-spec-detail-wide {
    margin-top: 16px;
  }
  @media (max-width: 860px) {
    .rb-spec-detail-grid {
      grid-template-columns: 1fr;
    }
  }
  .rb-spec-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .rb-spec-dims-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .rb-spec-source-panel {
    border: 1px solid rgba(232, 226, 219, 0.9);
    background: var(--surface-inset);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
  }
  .rb-spec-source-text {
    display: block;
    margin: 0;
    max-height: 180px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    tab-size: 2;
  }
  .rb-spec-source-empty {
    font-style: italic;
  }
  .rb-spec-suggested-note {
    padding: 10px 12px;
    background: var(--surface-inset);
    border-radius: var(--radius-sm);
  }
  .rb-spec-suggested-note p {
    margin: 5px 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .rb-spec-fieldgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px 14px;
  }
  .rb-spec .field-pair {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    border-collapse: collapse;
    margin: 0;
  }
  .rb-spec .field-pair tbody,
  .rb-spec .field-pair tr {
    display: block;
  }
  .rb-spec .field-pair th,
  .rb-spec .field-pair td {
    display: block;
    width: auto;
    padding: 0;
    text-align: left;
  }
  .rb-spec .field-pair label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 5px;
    display: block;
    text-align: left;
  }
  .rb-spec input[type=text],
  .rb-spec input[type=number],
  .rb-spec input[type=email],
  .rb-spec select,
  .rb-spec textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  }
  .rb-spec textarea {
    min-height: 52px;
    resize: vertical;
  }
  .rb-spec textarea.rb-spec-item-notes {
    min-height: 140px;
  }
  .rb-spec-placements {
    grid-column: 1/-1;
  }
  .rb-spec-placements summary {
    cursor: pointer;
    font-weight: 600;
  }
  .rb-spec-placement-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
  }
  .rb-spec-placement-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
  }
  .rb-spec-placement-option input {
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0;
  }
  .rb-spec-placements p {
    margin: 6px 0 0;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }
  .rb-spec input:focus,
  .rb-spec select:focus,
  .rb-spec textarea:focus {
    outline: none;
    border-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
  }
  .rb-spec label.checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }
  .rb-spec label.checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-walnut);
    cursor: pointer;
  }
  .rb-spec .rb-spec-check label.checkbox .label {
    display: none;
  }
  .rb-spec-confirm-match {
    align-self: flex-start;
  }
  .rb-spec-confirm-match[hidden] {
    display: none;
  }
  .rb-spec-match-help {
    margin: 0;
    flex: 1;
    font-size: 0.74rem;
    color: var(--text-secondary);
  }
  .rb-spec-catalog-fields {
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
  }
  .rb-spec [data-match-picker].is-disabled {
    opacity: 0.55;
  }
  .rb-spec [data-match-picker].is-disabled .picker-link {
    cursor: not-allowed;
  }
  .rb-spec-review-errors {
    background: var(--status-hold-bg);
    color: var(--status-hold);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
  }
  .rb-spec-review-errors ul {
    margin: 8px 0 0;
    padding-left: 20px;
  }
  .rb-spec-nestgroup {
    margin-top: 18px;
  }
  .rb-spec-nest {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }
  .rb-spec-nest-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
  }
  .rb-spec-nest-row > [data-match-badge] {
    margin-left: auto;
  }
  .rb-spec-nest-row .rb-spec-fieldgrid {
    flex: 1 1 100%;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .rb-spec-nest-row .picker-wrapper {
    min-width: 0;
    max-width: 100%;
  }
  .rb-spec-thumb-sm {
    flex: none;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
  }
  .rb-spec-thumb-sm.is-empty {
    background: repeating-linear-gradient(45deg, var(--bg-secondary), var(--bg-secondary) 4px, transparent 4px, transparent 8px);
  }
  .rb-spec-thumb {
    flex: none;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--surface-inset);
  }
  .rb-spec-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    background: repeating-linear-gradient(45deg, var(--surface-inset), var(--surface-inset) 4px, transparent 4px, transparent 8px);
  }
  .rb-spec-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: rgba(237, 232, 225, 0.92);
    backdrop-filter: blur(12px);
    border-top: 2px solid var(--border-medium);
    padding: 14px 4px;
  }
  .rb-spec-footer-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .rb-spec-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .rb-spec-footer-actions form {
    margin: 0;
  }
  .rb-spec-created-note {
    align-self: center;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--status-open);
  }
  .rb-spec-dirty-note {
    font-size: 0.74rem;
    color: var(--status-hold);
  }
  .rb-spec-state {
    max-width: 520px;
    margin: 72px auto;
    text-align: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 44px 34px;
  }
  .rb-spec-state.is-error {
    border-color: var(--status-rush);
  }
  .rb-spec-state-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px;
  }
  .rb-spec-state-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 20px;
  }
  .rb-spec-retry-note {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin: 12px 0 0;
  }
  .rb-spec-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
  }
  .rb-spec-progress span {
    font-size: 0.8rem;
    color: var(--text-tertiary);
  }
  .rb-spec-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-walnut);
    animation: rb-spec-spin 0.8s linear infinite;
  }
  @keyframes rb-spec-spin {
    to {
      transform: rotate(360deg);
    }
  }
  .rb-spec-sub {
    margin: 7px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .rb-spec-index {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 32px 80px;
    font-family: var(--font-body);
    color: var(--text-primary);
  }
  .rb-spec-index-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
  }
  .rb-spec-index-link {
    font-weight: 600;
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .rb-spec-index-link:hover {
    text-decoration: underline;
  }
  .rb-spec .has-many {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
  }
  .rb-spec-nest .has-many {
    gap: 9px;
  }
  .rb-spec .has-many .rb-spec-item {
    margin-bottom: 0;
  }
  .rb-spec .sub {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .rb-spec .deletable {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
  }
  .rb-spec .deletable > tbody {
    display: block;
  }
  .rb-spec .deletable > tbody > tr {
    display: block;
  }
  .rb-spec .deletable > tbody > tr > td {
    display: block;
    padding: 0;
    min-width: 0;
  }
  .rb-spec .deletable > tbody > tr > td.tool {
    position: absolute;
    top: 15px;
    right: 12px;
    width: auto;
    padding: 0;
    z-index: 2;
  }
  .rb-spec-nest .deletable > tbody > tr {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .rb-spec-nest .deletable > tbody > tr > td {
    flex: 1 1 auto;
    min-width: 0;
  }
  .rb-spec-nest .deletable > tbody > tr > td.tool {
    position: static;
    flex: 0 0 auto;
    width: auto;
    transform: none;
    top: auto;
    right: auto;
  }
  .rb-spec .deletable .delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    background-image: none;
    color: var(--text-tertiary);
    font-size: 0;
    line-height: 0;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast);
  }
  .rb-spec .deletable .delete-button::before {
    content: "✕";
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
  }
  .rb-spec .deletable .delete-button:hover {
    color: var(--status-rush);
  }
  .rb-spec-nest .deletable .delete-button {
    width: 20px;
    height: 20px;
  }
  .rb-spec-nest .deletable .delete-button::before {
    font-size: 0.85rem;
  }
  .rb-spec .has-many-destroy {
    display: none;
  }
  .rb-spec-pages {
    margin-top: 24px;
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
  }
  .rb-spec-pages > summary {
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
  .rb-spec-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 16px;
  }
  .rb-spec-page {
    display: block;
    text-decoration: none;
    color: var(--text-tertiary);
  }
  .rb-spec-page img {
    width: 100%;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    transition: border-color var(--transition-fast);
  }
  .rb-spec-page:hover img {
    border-color: var(--accent-walnut);
  }
  .rb-spec-page span {
    display: block;
    margin-top: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
  }
  .rb-spec-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }
  @media (max-width: 960px) {
    .rb-spec-layout {
      grid-template-columns: 1fr;
    }
  }
  .rb-spec-layout-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .rb-spec-tray-sticky {
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    background: var(--bg-card);
  }
  @media (max-width: 960px) {
    .rb-spec-tray-sticky {
      position: static;
      max-height: none;
    }
  }
  .rb-spec-tray-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  .rb-spec-tray-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
  }
  .rb-spec-tray-filter label {
    min-width: 50px;
    color: var(--text-secondary);
  }
  .rb-spec-tray-filter select {
    flex: 1;
    padding: 4px 8px;
  }
  .rb-spec-tray-page-section {
    margin-bottom: 12px;
  }
  .rb-spec-tray-page-section-head {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
  }
  .rb-spec-tray-img-wrapper {
    display: inline-block;
    margin: 2px;
    text-align: center;
  }
  .rb-spec-tray-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    cursor: grab;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
  }
  .rb-spec-tray-img:hover {
    border-color: var(--accent-walnut);
    transform: scale(1.06);
  }
  .rb-spec-tray-img:active {
    cursor: grabbing;
  }
  .rb-spec-tray-img-chip {
    display: block;
    font-size: 0.58rem;
    color: var(--text-tertiary);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rb-spec-thumb-slot {
    flex: none;
    border-radius: var(--radius-sm);
    outline: 2px dashed transparent;
    outline-offset: 2px;
    transition: outline-color var(--transition-fast), box-shadow var(--transition-fast);
  }
  .rb-spec-thumb-slot.is-drop-over {
    outline-color: var(--accent-walnut);
    box-shadow: 0 0 0 3px rgba(90, 45, 28, 0.12);
  }
  .rb-spec-thumb-slot.is-saving {
    opacity: 0.5;
  }
  .rb-spec-thumb-slot.is-saved {
    outline-color: var(--status-open);
  }
  .rb-spec-thumb-slot.is-error {
    outline-color: var(--status-rush);
  }
  img.rb-spec-thumb, img.rb-spec-thumb-sm, img.rb-spec-tray-img {
    cursor: zoom-in;
  }
  #spec-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 15, 0.88);
    cursor: zoom-out;
  }
  #spec-lightbox[hidden] {
    display: none;
  }
  #spec-lightbox img {
    min-width: min(360px, 92vw);
    max-width: 92vw;
    max-height: 84vh;
    object-fit: contain;
    background: var(--bg-card);
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  }
  #spec-lightbox-caption {
    color: #d8d2c6;
    margin-top: 14px;
    font-size: 13px;
    letter-spacing: 0.05em;
  }
  #spec-lightbox-close {
    position: absolute;
    top: 16px;
    right: 28px;
    background: none;
    border: 0;
    color: var(--text-inverse);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
  }
  .rb-spec-source-warnings {
    margin: 0 18px 14px 44px;
    padding: 12px 14px;
    border-left: 3px solid var(--accent-brass-light);
    background: var(--status-hold-bg);
    color: var(--status-hold);
    font-size: 13px;
    line-height: 1.5;
  }
  .rb-spec-source-warnings p {
    margin: 0 0 6px;
  }
  .rb-spec-source-warnings ul {
    margin: 0 0 8px;
    padding-left: 18px;
  }
  .rb-spec-source-warnings label.checkbox {
    gap: 8px;
  }
  .rb-spec-item.is-excluded .rb-spec-source-warnings {
    opacity: 0.55;
  }
  .rb-spec-review-needed {
    max-width: 230px;
    font-size: 12px;
    color: var(--status-hold);
  }
  .rb-spec-status-note {
    margin-top: 4px;
    font-size: 12px;
    color: var(--status-hold);
  }
}
@layer components {
/* Send Status Report's preview modal and the order page's send history
   (ticket 21391). */
.status-report-preview-frame {
  display: block;
  width: 100%;
  height: 480px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  margin-bottom: 12px;
}

.status-report-recipients {
  border: 1px solid var(--border-light);
  padding: 8px 12px;
  margin: 0 0 12px 0;
}

.status-report-recipients label {
  display: block;
  padding: 2px 0;
}

.status-report-history-block {
  margin-bottom: 12px;
}

.status-report-history {
  margin: 4px 0 0 0;
  padding-left: 18px;
}

.status-report-history-empty {
  margin: 4px 0 0 0;
  color: var(--text-secondary);
}

.status-report-history li {
  margin: 2px 0;
}

/* The emailed opt-out link's page, seen without a login. */
.status-report-opt-out {
  max-width: 560px;
  margin: 48px auto;
  padding: 0 16px;
}

.status-report-opt-out-material {
  border: 1px solid var(--border-light);
  padding: 10px 12px;
}

.status-report-recipient-email {
  color: var(--text-secondary);
}
}
@layer components {
  /* Style guide pages (/style_guide, /style_guide/icons). All classes are
     sg- prefixed so nothing leaks into real pages. */
  .sg-page {
    max-width: 980px;
    padding: 8px 4px 48px;
  }
  .sg-page .sg-title {
    font-family: var(--font-display);
    font-size: 2rem;
    border-bottom: none;
    margin-bottom: 4px;
  }
  .sg-page .sg-intro {
    color: var(--text-secondary);
    max-width: 70ch;
  }
  .sg-page .sg-section {
    margin-top: 36px;
  }
  .sg-page .sg-section > h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    border-bottom: 1.5px solid var(--border-light);
    padding-bottom: 6px;
    margin-bottom: 12px;
  }
  .sg-page .sg-note {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    max-width: 80ch;
  }
  .sg-page .sg-note code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--row-stripe);
    padding: 1px 5px;
    border-radius: 4px;
  }
  .sg-page .sg-sample {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    margin: 10px 0;
  }
  .sg-page .sg-sample.sg-sample-flush {
    padding: 0;
    overflow: hidden;
  }
  .sg-page .sg-sample {
    /* The menu hangs below and leftward of its button (right: 0), so the
       button sits at the right with room underneath. */
  }
  .sg-page .sg-sample.sg-sample-menu {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 190px;
  }
  .sg-page .sg-sample.sg-sample-rows {
    min-height: 160px;
  }
  .sg-page .sg-rules {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 80ch;
    padding-left: 20px;
  }
  .sg-page .sg-rules li {
    margin: 6px 0;
  }
  .sg-page .sg-rules code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--row-stripe);
    padding: 1px 5px;
    border-radius: 4px;
  }
  .sg-page .sg-code {
    background: #2A2320;
    color: #E8E0D8;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.55;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    overflow-x: auto;
    white-space: pre;
  }
  .sg-page {
    /* tokens */
  }
  .sg-page .sg-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin: 12px 0;
  }
  .sg-page .sg-swatch {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .sg-page .sg-swatch .sg-swatch-chip {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex: none;
  }
  .sg-page .sg-swatch .sg-swatch-name code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
  }
  .sg-page .sg-swatch .sg-swatch-label {
    color: var(--text-tertiary);
    margin-left: auto;
    text-align: right;
  }
  .sg-page .sg-type-samples {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
  }
  .sg-page .sg-type-samples p {
    margin: 6px 0;
  }
  .sg-page {
    /* icons page */
  }
  .sg-page .sg-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 8px;
  }
  .sg-page .sg-icon-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
  }
  .sg-page .sg-icon-cell .icon.no-label {
    /* give the bare glyph a visible box in the grid */
    width: 16px;
    height: 16px;
    background-position: center;
    background-size: 15px 15px;
    padding: 0;
    flex: none;
  }
  .sg-page .sg-icon-cell .sg-icon-name {
    font-size: 0.8rem;
    font-weight: 600;
    flex: none;
  }
  .sg-page .sg-icon-cell .sg-icon-class {
    margin-left: auto;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-tertiary);
    text-align: right;
    overflow-wrap: anywhere;
  }
  .sg-page .sg-icon-cell.sg-icon-cell-dark {
    background: var(--accent-walnut);
  }
  .sg-page .sg-icon-cell.sg-icon-cell-dark .sg-icon-name {
    color: var(--text-inverse);
  }
  .sg-page .sg-icon-cell.sg-icon-cell-dark .sg-icon-class {
    color: rgba(245, 240, 235, 0.75);
  }
}
@layer components {
  .payment-term-settings-scroll {
    overflow-x: auto;
  }
  .sfr-form table.payment-term-settings {
    width: 100%;
    min-width: 700px;
  }
  .sfr-form table.payment-term-settings th {
    white-space: normal;
  }
  .sfr-form table.payment-term-settings td {
    text-align: center;
  }
  .sfr-form table.payment-term-settings td:first-child {
    min-width: 170px;
    text-align: left;
  }
  .sfr-form table.payment-term-settings input[type=text], .sfr-form table.payment-term-settings input[type=number] {
    width: 100%;
    box-sizing: border-box;
  }
  .sfr-form table.payment-term-settings input[type=number] {
    min-width: 70px;
  }
}
@layer components {
  .user-history-hint {
    margin: 0.5rem 0.5rem 1rem;
    color: var(--text-secondary);
  }
  .user-history-note {
    color: var(--text-secondary);
    font-style: italic;
  }
}
@charset "UTF-8";
/*
 * Kovet — unified stylesheet
 *
 * This file is the manifest: it sets the load order. The rules live in the
 * files it requires.
 *
 * 1. design_system/layer_order — the cascade layers, lowest first:
 *    base, legacy, layout, components, utilities. It must come first.
 * 2. legacy_ui/* — the sfr-ui 2.0.153 stylesheets kovet actually uses, in the
 *    order of the gem's old sfr-ui.css manifest (the gem's advanced_search,
 *    audits and uploadify styles were dead and are gone), then
 *    legacy_ui/compat, Kovet's overrides that make those views work inside the
 *    new layout shell. All of it is in @layer legacy: it beats the reset and
 *    tokens, and loses to layout, components, utilities and unlayered rules.
 * 3. design_system/* — tokens, layout, components, utilities.
 * 4. pages/* — the pages whose styles are not in a feature file of their own.
 *    Their layered rules share @layer components, so they load after
 *    design_system/components and in this order.
 * 5. Everything else in this directory, alphabetically (require_tree).
 *
 * Every file above is required explicitly, not left to require_tree, because
 * the cascade depends on the order.
 *





















 */
