/*!
 * jQuery UI CSS Framework 1.14.1
 * 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.1
 * 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";
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: #F5F3F0;
  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 {
  background: #F5F3F0 !important;
  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.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, 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. */
  background: var(--row-hover) !important;
  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;
}

BODY TABLE.naked {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
BODY TABLE.naked TBODY TR TD, BODY TABLE.naked TBODY TR TH, BODY TABLE.naked TBODY TR:nth-child(odd) TD, BODY TABLE.naked TBODY TR:nth-child(odd) TH, BODY TABLE.naked TBODY TD[onclick]:hover TD, BODY TABLE.naked TBODY TD[onclick]:hover TH, BODY TABLE.naked TBODY.highlight TD, BODY TABLE.naked TBODY.highlight TH {
  padding: 0;
  margin: 0;
  border: none;
  text-align: left;
  vertical-align: center;
  font-weight: normal;
  background: transparent;
}

.tab TABLE.list, TABLE.fixed-list-header.inner {
  margin-top: 0;
}

TABLE.fixed-list-header {
  position: fixed;
  background: white;
  margin-top: 0 !important;
  box-shadow: var(--shadow-sm);
}

/* ── List metadata bar (result counts, paging) ── */
.list-info {
  background: #F5F3F0;
  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: #F5F3F0;
  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: #F5F3F0;
  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;
}
@charset "UTF-8";
.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: #F5F3F0;
  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;
  }
}
.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;
  background: #F5F3F0 !important;
  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: #F8F6F3;
  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 {
  color: var(--accent-walnut) !important;
  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;
}
#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 TABLE.list {
  margin-top: 0;
  border: none;
}
.sfr-modal TABLE.list TR.add-link-wrapper TD {
  background: #F5F3F0;
  border-bottom: 1.5px solid var(--border-light);
}
.sfr-modal TABLE.list TR TD {
  background: white;
}
.sfr-modal .modal-main-panel {
  margin-bottom: 0;
}
.sfr-modal .modal-main-panel .panel-footer {
  text-align: right;
}

@media (max-width: 600px) {
  .sfr-modal {
    left: 12px !important;
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }
}
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 {
  background-image: none !important;
  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);
  }
}
@charset "UTF-8";
.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, .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: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: #F5F3F0;
  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";
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: #F5F3F0;
  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 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, DIV.sfr-form input, DIV.sfr-form textarea, DIV.sfr-form select, DIV.sfr-form button, 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, DIV.sfr-form input:hover, DIV.sfr-form textarea:hover, DIV.sfr-form select:hover, DIV.sfr-form button:hover, 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, DIV.sfr-form input:focus, DIV.sfr-form textarea:focus, DIV.sfr-form select:focus, DIV.sfr-form button:focus, 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, DIV.sfr-form input.focus, DIV.sfr-form textarea.focus, DIV.sfr-form select.focus, DIV.sfr-form button.focus, 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], DIV.sfr-form input[disabled], DIV.sfr-form textarea[disabled], DIV.sfr-form select[disabled], DIV.sfr-form button[disabled], 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: #F5F3F0 !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, DIV.sfr-form input[disabled]:hover, DIV.sfr-form textarea[disabled]:hover, DIV.sfr-form select[disabled]:hover, DIV.sfr-form button[disabled]:hover, 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, DIV.sfr-form input.error, DIV.sfr-form textarea.error, DIV.sfr-form select.error, DIV.sfr-form button.error, 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, DIV.sfr-form input.error:hover, DIV.sfr-form textarea.error:hover, DIV.sfr-form select.error:hover, DIV.sfr-form button.error:hover, 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, DIV.sfr-form input.error:focus, DIV.sfr-form textarea.error:focus, DIV.sfr-form select.error:focus, DIV.sfr-form button.error:focus, 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::-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::-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::-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::-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, DIV.sfr-form input.picker-field, DIV.sfr-form textarea.picker-field, DIV.sfr-form select.picker-field, DIV.sfr-form button.picker-field, 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 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 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, 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, 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 .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 .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 .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 .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 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 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 .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 .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: #F5F3F0;
  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: #F5F3F0;
  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;
  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: #F5F3F0;
  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: #F5F3F0;
}
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;
}

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;
  padding: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
TABLE.upload-field TD.button {
  /* wide enough for "Choose File..." beside the attach glyph */
  width: 132px;
}
TABLE.upload-field TD.info {
  padding-left: 6px !important;
}
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: #F5F3F0;
  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: #F5F3F0;
  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;
  text-align: center !important;
}
.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;
}
/* 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: #F5F3F0;
  color: var(--text-primary);
}
@charset "UTF-8";
/*
 * Kovet — unified stylesheet
 * Loads the legacy UI styles (ported from the deprecated sfr-ui gem CSS),
 * then the rebuild design system.
 *
 * legacy_ui/* are verbatim copies of the sfr-ui 2.0.153 stylesheets kovet
 * actually uses (order matters — it mirrors the gem's old sfr-ui.css
 * manifest). The gem's advanced_search, audits, and uploadify styles were
 * dead and are gone. They are required explicitly (not via require_tree)
 * so they load BEFORE require_self — the legacy-compat overrides below
 * rely on that cascade order.












 */
/* ============================================================
   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: #FFFFFF;
  /* 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. */
  padding: 4px 16px 24px !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: #F5F3F0;
  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, .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 {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
}
.legacy-content a {
  color: var(--accent-walnut);
}
.legacy-content a:visited {
  color: var(--accent-walnut-light);
}
.legacy-content h1, .legacy-content h2, .legacy-content h3 {
  font-family: var(--font-display) !important;
  color: var(--text-primary);
}
.legacy-content {
  /* ── sfr-ui columns (detail layout) ──
     The sfr_columns helper renders a table-based layout. */
}
.legacy-content .sfr-columns {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 8px 0 !important;
}
.legacy-content .sfr-columns > TBODY > TR > TD {
  vertical-align: top !important;
  padding: 0 !important;
}
.legacy-content {
  /* ── Pagination ── */
}
.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: #F5F3F0 !important;
  color: var(--text-primary) !important;
}
.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;
  text-decoration: none !important;
}

.model-room {
  color: blue;
  background-color: lightcyan;
  border: 1px solid blue;
  padding-left: 2px;
  padding-right: 2px;
  text-decoration: none !important;
}

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;
}

/* A.icon.bin now lives in legacy_ui/icons.scss with the rest of the set. */
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-padding TD {
  padding-top: 15px;
}

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

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

.same-wiw-order td {
  background: white !important;
}

/* ============================================================
   CASCADE LAYERS — explicit ordering prevents leakage
   ============================================================ */
@layer base, layout, components, utilities;
/* ============================================================
   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;
    /* 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 — Rush */
    --status-rush: #7F1D22;
    --status-rush-bg: #FECDCD;
    /* Fulfillment */
    --fulfilled: #155E3E;
    --fulfilled-bg: #BBEDD8;
    --partial: #92400E;
    --partial-bg: #FDE8B6;
    --unfulfilled: #B91C1C;
    --unfulfilled-bg: #FECDCD;
    /* 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;
  }
}
/* ============================================================
   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) !important;
    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 {
    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 {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
  }
  .rb-sidebar-logout 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: #FFFFFF;
  }
  .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;
  }
  /* ---- PAGE BODY ---- */
  .rb-page-body {
    flex: 1;
    padding: 32px;
  }
  /* ---- RESPONSIVE: tablet — tighten horizontal padding ---- */
  @media (max-width: 1100px) {
    .rb-top-bar {
      padding: 0 20px;
    }
    .rb-flash {
      padding: 12px 20px;
    }
    .rb-masquerade-banner {
      padding: 8px 20px;
    }
    .rb-filter-bar {
      padding: 10px 20px;
    }
    .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;
    }
    .rb-tabs-scroll {
      padding: 0 20px;
    }
    .rb-tab-content {
      padding: 20px 20px 40px;
    }
    .rb-order-header {
      padding: 24px 20px 20px;
    }
    .rb-pagination {
      padding: 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,
    .legacy-content .sfr-columns > tbody > tr > td {
      float: none !important;
      width: 100% !important;
      display: block !important;
      max-width: 100% !important;
    }
    .legacy-content .info-box .column + .column {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-light);
    }
    /* Legacy sfr-columns table (detail layout) — collapse to single column */
    .legacy-content .sfr-columns,
    .legacy-content .sfr-columns > tbody,
    .legacy-content .sfr-columns > tbody > tr {
      display: block !important;
    }
    /* .fields tables — let them fill the column instead of 126px fixed width */
    .legacy-content table.fields {
      width: 100% !important;
      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 !important;
      line-height: 1.25 !important;
    }
    /* The "Order Details" centered h1 on show page — scale down */
    .legacy-content > #sfr-body > h1 {
      font-size: 1.3rem !important;
      line-height: 1.3 !important;
    }
    /* 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 !important;
    }
    .legacy-content .sfr-toolbar.page ul.items li {
      flex-shrink: 0 !important;
    }
    /* The search/filter inputs inside toolbar shouldn't stretch the row */
    .legacy-content .sfr-toolbar.page input[type=text] {
      width: 120px !important;
    }
    /* 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 !important;
    }
    body.inventories_index .legacy-content .sfr-toolbar.page ul.items li.inventory-filter-item {
      order: 99;
      width: 100%;
      flex: 1 0 100% !important;
    }
    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% !important;
      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 !important;
    }
    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% !important;
    }
    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% !important;
      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 !important;
    }
    /* 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 !important;
      scrollbar-width: none;
    }
    .legacy-content .tab-set .tab-control::-webkit-scrollbar {
      display: none;
    }
    /* Wide tables inside tabs — allow horizontal scroll on their wrapper */
    .legacy-content table.list,
    .legacy-content table.fixed-list-header,
    .legacy-content table.tab-list {
      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 !important;
      grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      width: 100% !important;
      min-height: 38px;
      padding: 8px 10px !important;
      box-sizing: border-box;
      overflow-wrap: anywhere;
      border-right: 0 !important;
      border-left: 0 !important;
      border-bottom: 1px solid rgba(200, 189, 178, 0.3);
    }
    .legacy-content table.responsive-record-table td:empty {
      display: none !important;
    }
    .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;
    }
    .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;
    }
    .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 !important;
      width: auto !important;
      min-height: 0;
      padding: 6px 8px !important;
      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 !important;
    }
    .legacy-content table.incoming-stock-responsive input,
    .legacy-content table.incoming-stock-responsive select,
    .legacy-content table.incoming-stock-responsive form {
      width: 100% !important;
      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;
      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 !important;
    }
    /* Page headings already provide context at this width; hiding the full
       breadcrumb prevents it from squeezing Reports and Switch user off-screen. */
    .rb-top-bar-left .rb-breadcrumb {
      display: none !important;
    }
    .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;
    }
    .rb-flash {
      padding: 10px 14px;
    }
    .rb-masquerade-banner {
      padding: 8px 14px;
      font-size: 0.76rem;
    }
    .rb-filter-bar {
      padding: 8px 14px;
    }
    .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;
    }
    .rb-tabs-scroll {
      padding: 0 14px;
    }
    .rb-tab-content {
      padding: 16px 14px 32px;
    }
    .rb-order-header {
      padding: 18px 14px 16px;
    }
    .rb-pagination {
      padding: 16px 14px;
    }
    /* Legacy views: let wide tables scroll inside main instead of pushing layout.
       !important needed — the base .legacy-content rule is unlayered (higher
       priority than @layer rules). */
    .legacy-content {
      overflow-x: auto;
    }
    .legacy-content #sfr-body {
      min-width: 0 !important;
      padding: 4px 12px 20px !important;
    }
  }
}
/* ============================================================
   COMPONENTS
   ============================================================ */
@layer components {
  /* ---- 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;
  }
  /* ---- BUTTONS ---- */
  .rb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    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);
  }
  .rb-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
  }
  .rb-btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  .rb-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast);
  }
  .rb-btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-medium);
  }
  .rb-btn-icon svg {
    width: 16px;
    height: 16px;
  }
  /* ---- 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;
  }
  .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. The !importants are for the vendored sfr list-table rules,
     which are unlayered and so beat this @layer whatever the specificity. */
  .row-actions {
    display: inline-block;
  }
  .row-actions > summary {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    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:hover {
    text-decoration: none;
    background: var(--bg-secondary);
  }
  .sfr-toolbar ul.items li .rb-dropdown-item:hover {
    text-decoration: none;
    background: var(--bg-secondary) !important;
  }
  /* ---- 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: #FDE8B6;
    color: #92400E;
    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;
  }
  /* ---- DETAIL CARDS GRID ---- */
  .rb-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
  .rb-detail-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
  }
  .rb-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
  }
  .rb-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    font-size: 0.82rem;
    gap: 8px;
  }
  .rb-card-row-label {
    color: var(--text-tertiary);
    font-weight: 600;
    flex-shrink: 0;
  }
  .rb-card-row-value {
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
  }
  /* ---- 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);
  }
  /* ---- 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-fulfilled {
    background: var(--fulfilled-bg);
    color: var(--fulfilled);
    border: 1px solid rgba(21, 94, 62, 0.15);
  }
  .rb-partial {
    background: var(--partial-bg);
    color: var(--partial);
    border: 1px solid rgba(146, 64, 14, 0.15);
  }
  .rb-unfulfilled {
    background: var(--unfulfilled-bg);
    color: var(--unfulfilled);
    border: 1px solid rgba(185, 28, 28, 0.15);
  }
  /* ---- TABS ---- */
  .rb-tabs-section {
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-card);
    position: sticky;
    top: var(--header-height);
    z-index: 40;
  }
  .rb-tabs-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 32px;
    gap: 2px;
    scrollbar-width: none;
  }
  .rb-tabs-scroll::-webkit-scrollbar {
    display: none;
  }
  .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);
  }
  /* ---- RUSH BANNER ---- */
  .rb-rush-banner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 14px;
    border-radius: 4px;
    background: var(--status-rush-bg);
    color: var(--status-rush);
    border: 1px solid rgba(155, 34, 38, 0.15);
    animation: rush-pulse 2.5s ease-in-out infinite;
  }
  @keyframes rush-pulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.65;
    }
  }
  .rb-rush-banner svg {
    width: 13px;
    height: 13px;
  }
  /* ---- NOTES BANNER ---- */
  .rb-notes-banner {
    background: #FFF8E7;
    border: 1px solid #F0D87A;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.82rem;
    color: #7A5E16;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .rb-notes-banner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #B8860B;
  }
  /* ---- 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);
  }
  /* ---- MONO / CODE SPANS ---- */
  .rb-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
  }
  /* ---- FADE-IN ANIMATIONS ---- */
  .rb-fade-in {
    animation: rbFadeInUp 0.35s ease-out both;
  }
  .rb-fade-in-delay {
    animation: rbFadeInUp 0.4s ease-out 0.1s both;
  }
  @keyframes rbFadeInUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
/* ============================================================
   ORDER LIST PAGE
   ============================================================ */
@layer components {
  /* ---- STATS STRIP ---- */
  .rb-stats-strip {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1.5px solid var(--border-light);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .rb-stats-strip::-webkit-scrollbar {
    display: none;
  }
  .rb-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 28px;
    border-right: 1px solid var(--border-light);
    gap: 2px;
    flex-shrink: 0;
    text-decoration: none;
    transition: background var(--transition-fast);
  }
  .rb-stat-item:hover {
    background: var(--bg-secondary);
  }
  .rb-stat-item:last-child {
    border-right: none;
  }
  .rb-stat-count {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
  }
  .rb-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
  }
  .rb-stat-item.is-rush .rb-stat-count {
    color: var(--status-rush);
  }
  .rb-stat-item.is-hold .rb-stat-count {
    color: var(--status-hold);
  }
  .rb-stat-item.is-open .rb-stat-count {
    color: var(--status-open);
  }
  /* ---- FILTER BAR ---- */
  .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;
  }
  /* ---- TAB BAR ---- */
  .rb-tab-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 32px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
  }
  .rb-tab-btn {
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-right: 4px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .rb-tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
  }
  .rb-tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-light);
    position: relative;
    top: 1px;
  }
  .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);
  }
  /* ---- 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);
  }
  /* ---- 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 legacy sfr form styles are unlayered, so they win over this layer no
     matter the specificity. 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 !important;
    margin: 0 !important;
  }
  .rb-adv-filter-foot input.submit {
    float: none !important;
    margin: 0 !important;
  }
  /* ---- 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);
  }
  .rb-order-card[data-status=open]::before {
    background: var(--status-open);
  }
  .rb-order-card[data-status=hold]::before {
    background: var(--status-hold);
  }
  .rb-order-card[data-status=shipped]::before {
    background: var(--status-shipped);
  }
  .rb-order-card[data-status=closed]::before {
    background: var(--status-closed);
  }
  .rb-order-card[data-status=rush]::before {
    background: var(--status-rush);
  }
  .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-value.overdue {
    color: var(--status-rush);
  }
  .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(--accent-brass);
    font-weight: 600;
    font-style: italic;
    padding: 4px 8px;
    background: rgba(158, 110, 0, 0.05);
    border-radius: 4px;
    border-left: 2px solid var(--accent-brass-light);
  }
  .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-rush-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--status-rush-bg);
    color: var(--status-rush);
    border: 1px solid rgba(127, 29, 34, 0.2);
    animation: rush-pulse 2.5s ease-in-out infinite;
  }
  .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);
  }
  /* Card load animation with stagger */
  .rb-order-card {
    animation: rbFadeInUp 0.3s ease-out both;
  }
  .rb-order-card:nth-child(1) {
    animation-delay: 0s;
  }
  .rb-order-card:nth-child(2) {
    animation-delay: 0.03s;
  }
  .rb-order-card:nth-child(3) {
    animation-delay: 0.06s;
  }
  .rb-order-card:nth-child(4) {
    animation-delay: 0.09s;
  }
  .rb-order-card:nth-child(5) {
    animation-delay: 0.12s;
  }
  .rb-order-card:nth-child(6) {
    animation-delay: 0.15s;
  }
  .rb-order-card:nth-child(7) {
    animation-delay: 0.18s;
  }
  .rb-order-card:nth-child(8) {
    animation-delay: 0.21s;
  }
  .rb-order-card:nth-child(9) {
    animation-delay: 0.24s;
  }
  .rb-order-card:nth-child(10) {
    animation-delay: 0.27s;
  }
  .rb-order-card:nth-child(11) {
    animation-delay: 0.3s;
  }
  .rb-order-card:nth-child(12) {
    animation-delay: 0.33s;
  }
  .rb-order-card:nth-child(13) {
    animation-delay: 0.36s;
  }
  .rb-order-card:nth-child(14) {
    animation-delay: 0.39s;
  }
  .rb-order-card:nth-child(15) {
    animation-delay: 0.42s;
  }
  .rb-order-card:nth-child(16) {
    animation-delay: 0.45s;
  }
  .rb-order-card:nth-child(17) {
    animation-delay: 0.48s;
  }
  .rb-order-card:nth-child(18) {
    animation-delay: 0.51s;
  }
  .rb-order-card:nth-child(19) {
    animation-delay: 0.54s;
  }
  .rb-order-card:nth-child(20) {
    animation-delay: 0.57s;
  }
  /* ---- 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;
  }
  /* ---- 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;
  }
}
/* ============================================================
   ORDER SHOW PAGE
   Components from design/order-show.html mockup.
   ============================================================ */
@layer components {
  /* ---- ORDER HEADER ---- */
  .rb-order-header {
    padding: 28px 32px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    animation: rbFadeInUp 0.35s ease-out both;
  }
  .rb-order-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
  }
  .rb-order-header-left {
    flex: 1;
  }
  .rb-order-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .rb-order-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
  }
  .rb-order-so-number {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-walnut);
    background: rgba(107, 58, 42, 0.06);
    padding: 3px 12px;
    border-radius: 4px;
  }
  .rb-order-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 12px;
    border-radius: 4px;
    background: rgba(107, 58, 42, 0.08);
    color: var(--accent-walnut);
  }
  .rb-order-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 600;
  }
  .rb-order-subtitle a {
    color: var(--accent-walnut);
    text-decoration: none;
    font-weight: 600;
  }
  .rb-order-subtitle a:hover {
    text-decoration: underline;
  }
  .rb-order-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  .rb-order-status-pill {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .rb-status-badges-row {
    display: flex;
    gap: 6px;
  }
  /* ---- LEAD TIME CALLOUT ---- */
  .rb-lead-time-callout {
    background: rgba(107, 58, 42, 0.05);
    border: 1px solid rgba(107, 58, 42, 0.12);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.82rem;
    color: var(--accent-walnut);
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
  }
  /* ---- DETAIL CARDS GRID (enhanced) ---- */
  .rb-detail-card-header {
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .rb-detail-card-header svg {
    width: 15px;
    height: 15px;
    color: var(--text-tertiary);
  }
  .rb-detail-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
  }
  .rb-detail-card-body {
    padding: 14px 18px 18px;
  }
  /* ---- FIELD ROWS (key-value pairs inside cards) ---- */
  .rb-field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid rgba(232, 226, 219, 0.5);
  }
  .rb-field-row:last-child {
    border-bottom: none;
  }
  .rb-field-label {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    font-weight: 600;
    flex-shrink: 0;
  }
  .rb-field-value {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
  }
  .rb-field-value a {
    color: var(--accent-walnut);
    text-decoration: none;
  }
  .rb-field-value a:hover {
    text-decoration: underline;
  }
  .rb-field-value-mono {
    font-family: var(--font-mono);
    font-size: 0.8rem;
  }
  .rb-field-value-highlight {
    font-weight: 700;
    color: var(--accent-walnut);
  }
  /* ---- ADDRESS BLOCK ---- */
  .rb-address-block {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 4px 0;
  }
  .rb-address-block .addr-name {
    font-weight: 700;
    margin-bottom: 2px;
  }
  .rb-address-block .addr-line {
    color: var(--text-secondary);
  }
  /* ---- PEOPLE TAGS ---- */
  .rb-people-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
  }
  .rb-person-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 20px;
  }
  .rb-person-tag-label {
    font-size: 0.74rem;
    color: var(--text-tertiary);
    font-weight: 700;
    text-transform: uppercase;
  }
  /* ---- FINANCIAL CARD ---- */
  .rb-financial-card .rb-field-row {
    padding: 6px 0;
  }
  .rb-financial-total {
    padding: 10px 0 4px;
    margin-top: 6px;
    border-top: 2px solid var(--text-primary);
  }
  .rb-financial-total .rb-field-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-financial-total .rb-field-value {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-financial-balance .rb-field-value {
    color: var(--status-rush);
  }
  .rb-financial-paid .rb-field-value {
    color: var(--fulfilled);
  }
  /* ---- PRIORITY DOT ---- */
  .rb-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .rb-priority-dot.gold {
    background: #D4A83A;
    box-shadow: 0 0 8px rgba(212, 168, 58, 0.4);
  }
  /* ---- 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: #B91C1C;
  }
  .rb-filter-priority.medium .rb-priority-dot {
    background: #C49020;
  }
  .rb-filter-priority.low .rb-priority-dot {
    background: #3F6643;
  }
  .rb-filter-priority.high.active {
    background: #B91C1C;
    border-color: #7F1D22;
    color: #FFF1F1;
  }
  .rb-filter-priority.medium.active {
    background: #F5C557;
    border-color: #B07A00;
    color: #4A2D00;
  }
  .rb-filter-priority.low.active {
    background: #3F6643;
    border-color: #2F4A33;
    color: #F1F7F2;
  }
  .rb-filter-priority.high.active .rb-priority-dot {
    background: #FFE3E3;
  }
  .rb-filter-priority.medium.active .rb-priority-dot {
    background: #4A2D00;
  }
  .rb-filter-priority.low.active .rb-priority-dot {
    background: #C8E0CC;
  }
  .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: #B91C1C;
  }
  .rb-task-card[data-priority=medium] {
    --task-accent: #C49020;
  }
  .rb-task-card[data-priority=low] {
    --task-accent: #4A6E4F;
  }
  .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-resolved .rb-task-body p {
    color: var(--text-tertiary);
  }
  .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: #FFF1F1;
    background: #B91C1C;
    border-color: #7F1D22;
  }
  .rb-priority-pill[data-priority=high] .rb-priority-dot {
    background: #FFE3E3;
  }
  .rb-priority-pill[data-priority=medium] {
    color: #4A2D00;
    background: #F5C557;
    border-color: #B07A00;
  }
  .rb-priority-pill[data-priority=medium] .rb-priority-dot {
    background: #4A2D00;
  }
  .rb-priority-pill[data-priority=low] {
    color: #F1F7F2;
    background: #3F6643;
    border-color: #2F4A33;
  }
  .rb-priority-pill[data-priority=low] .rb-priority-dot {
    background: #C8E0CC;
  }
  .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: #155E3E;
    color: #EAF7EF;
    border-color: #0E4A30;
  }
  .rb-task-status.resolved {
    background: #3F4755;
    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;
  }
  .rb-btn-danger {
    color: var(--unfulfilled);
  }
  .rb-btn-danger:hover {
    color: var(--bg-card);
    background: var(--unfulfilled);
    border-color: var(--unfulfilled);
  }
  /* compact action button */
  .rb-btn-sm {
    height: 28px;
    padding: 0 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
  }
  @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: #B91C1C;
  }
  .rb-task-show-card[data-priority=medium] {
    --task-accent: #C49020;
  }
  .rb-task-show-card[data-priority=low] {
    --task-accent: #3F6643;
  }
  .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: #7F1D22;
    background: #FECDCD;
    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-overdue-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-inverse);
    background: var(--unfulfilled);
    border-radius: 999px;
  }
  .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;
  }
  /* ---- ORDER TABLE (line items) ---- */
  .rb-order-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .rb-order-table thead th {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-secondary);
    white-space: nowrap;
  }
  .rb-order-table tbody td {
    font-size: 0.82rem;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
  }
  .rb-order-table tbody tr:last-child td {
    border-bottom: none;
  }
  .rb-order-table tbody tr:hover {
    background: rgba(247, 245, 242, 0.5);
  }
  .rb-order-table .col-mono {
    font-family: var(--font-mono);
    font-size: 0.78rem;
  }
  .rb-order-table .col-right {
    text-align: right;
  }
  .rb-item-name {
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-item-desc {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 2px;
  }
  .rb-fabric-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
  }
  .rb-finish-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(107, 58, 42, 0.06);
    color: var(--accent-walnut-light);
  }
  .rb-line-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
  }
  .rb-line-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
  }
  .rb-line-status-dot.green {
    background: var(--fulfilled);
  }
  .rb-line-status-dot.amber {
    background: var(--partial);
  }
  .rb-line-status-dot.red {
    background: var(--unfulfilled);
  }
  /* ---- TABLE TOOLBAR ---- */
  .rb-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  .rb-table-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .rb-table-toolbar-left h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .rb-item-count {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 2px 9px;
    border-radius: 12px;
  }
  /* ---- LEGEND ---- */
  .rb-legend {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-top: 16px;
    flex-wrap: wrap;
  }
  .rb-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-secondary);
  }
  .rb-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }
  .rb-legend-dot.green {
    background: var(--fulfilled);
  }
  .rb-legend-dot.amber {
    background: var(--partial);
  }
  .rb-legend-dot.red {
    background: var(--unfulfilled);
  }
  /* ---- TAB CONTENT AREA ---- */
  .rb-tab-content {
    padding: 24px 32px 48px;
    animation: rbFadeInUp 0.3s ease-out both;
  }
  /* ---- TAB BADGE ---- */
  .rb-tab-badge {
    background: var(--status-rush-bg);
    color: var(--status-rush);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 5px;
  }
  /* ---- 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;
  }
}
/* ============================================================
   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;
  }
  .rb-text-mono {
    font-family: var(--font-mono);
  }
  .rb-text-display {
    font-family: var(--font-display);
  }
  .rb-text-muted {
    color: var(--text-tertiary);
  }
  .rb-text-walnut {
    color: var(--accent-walnut);
  }
  .rb-text-sm {
    font-size: 0.82rem;
  }
  .rb-text-xs {
    font-size: 0.74rem;
  }
  .rb-flex {
    display: flex;
  }
  .rb-flex-center {
    display: flex;
    align-items: center;
  }
  .rb-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .rb-gap-2 {
    gap: 8px;
  }
  .rb-gap-3 {
    gap: 12px;
  }
  .rb-gap-4 {
    gap: 16px;
  }
  .rb-mt-4 {
    margin-top: 16px;
  }
  .rb-mt-6 {
    margin-top: 24px;
  }
  .rb-mb-4 {
    margin-bottom: 16px;
  }
  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
}
.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);
}

/* 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 #999;
  border-radius: 4px;
  color: #555;
  font-size: 0.9em;
  white-space: nowrap;
  vertical-align: middle;
}

.ol-image-drop.dragover {
  border-color: #06c;
  background: #eef4ff;
  color: #06c;
}

.ol-image-drop-label::before {
  content: "⬇ ";
}

.ol-image-browse {
  color: #06c;
  cursor: pointer;
  text-decoration: underline;
}

.ol-image-drop-spinner {
  color: #06c;
  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: #555;
}

.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 #999;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.85em;
  color: #555;
  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: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333;
  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 #ddd;
  border-radius: 6px;
  background: #fafafa;
}

.ol-image-search-query-label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

.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: #b00;
}

.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: #666;
}

.ol-recent-searches-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85em;
  color: #888;
}

.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 #ddd;
  border-radius: 4px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
}

.ol-recent-search-link:hover {
  border-color: #06c;
  background: #eef4ff;
}

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: #777;
  white-space: nowrap;
}

.ol-recent-searches-all {
  font-size: 0.9em;
}

.ol-recent-searches-note {
  color: #666;
}

/* 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 #ddd;
  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: #06c;
}

.ol-image-search-results th.ol-sortable::after {
  content: " ⇅";
  color: #bbb;
}

.ol-image-search-results th.ol-sortable.sort-asc::after {
  content: " ▲";
  color: #06c;
}

.ol-image-search-results th.ol-sortable.sort-desc::after {
  content: " ▼";
  color: #06c;
}

.ol-image-search-results td.ol-image-rank {
  text-align: center;
  color: #666;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   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;
  }
  /* Group band row: one coloured bar per contiguous same-group run of columns.
     Band colours are applied inline per <th>; this styles the shared typography.
     max-width is cleared because a band <th> spans several columns. */
  .pm-table thead .pm-band-row th.pm-band {
    max-width: none;
    padding: 3px 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    border-right: 1px solid var(--border-light);
  }
  .pm-table thead .pm-band-row th.pm-band-info {
    text-align: left;
  }
  .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-hold {
    background: var(--status-hold-bg);
    color: var(--status-hold);
    text-transform: uppercase;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }
  .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;
  }
}
/* Expanded sibling rows sit visually under their representative rather than
   reading as a flat list of equals. Deliberately OUTSIDE any @layer: the
   vendored sfr-ui stylesheet is unlayered and so beats layered rules whatever
   their specificity. */
table.list tr.ol-expanded-row > td:first-child {
  padding-left: 24px;
}

table.list tr.ol-expanded-row {
  background-color: #f7f9fc;
}

.ol-more-badge {
  margin-left: 6px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 16px;
  color: #06c;
  background: #eef;
  border: 1px solid #ccd;
  border-radius: 3px;
  cursor: pointer;
}

.ol-more-badge:hover {
  background: #dde;
}

.ol-more-badge[disabled] {
  color: #999;
  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: #666;
}
@charset "UTF-8";
/*
 * DEPRECATED — rebuild CSS has been merged into application.css.scss
 * This file is kept empty to avoid Sprockets errors from any lingering references.
 */
.commission-item-ul {
  list-style-type: none;
  margin: 0;
  padding: 5px 0px 5px 0px;
  overflow: hidden;
  width: 100%;
  border-bottom: 1px solid #ccc;
}
.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 !important;
}

.legend TABLE {
  border-spacing: 0;
  width: 100%;
}
.legend TABLE TD {
  padding: 4px;
  border: 1px solid #ccc;
}
.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: #222;
  background-position-4: 2px;
  background-position-y: 2px;
  color: #eee !important;
  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 #222;
  background: #eee;
  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;
}

.blank-cell {
  background: none !important;
  border-bottom: none !important;
}

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") !important;
}

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: #555;
  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 !important;
}
table#notes-table TR.client-note TD {
  background-color: #FF7878 !important;
}
table#notes-table TR.top {
  background-color: #ffe;
}

DIV.note-doc {
  margin-bottom: 2px;
  padding: 3px;
  background: #eee;
  border: 1px solid #ddd;
}

.resolvable {
  background-color: #FF7878;
}

TR.even TD {
  background-color: white !important;
}

TR.odd TD {
  background-color: #ffe !important;
}

a.asc {
  padding: 4px 18px 4px 14px !important;
  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 !important;
  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: #ccc;
}

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 !important;
}

.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;
}

.highlight_green {
  color: rgb(32, 182, 42);
}

.highlight_red {
  color: rgb(250, 69, 69);
}
@charset "UTF-8";
/* 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
   application.css.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;
}

.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;
}

.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;
}

.costing-locale-toggle {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.costing-locale-toggle strong {
  color: var(--text-primary);
}

/* .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;
}

/* .rb-btn-primary's own `color: var(--text-inverse)` is inside
   `@layer components`, and `.legacy-content a` is not — an unlayered rule beats
   a layered one whatever their specificity, so on these pages a primary button
   rendered as a LINK came out walnut text on a walnut background: invisible.
   Restated here, where the file is itself unlayered and the selector outweighs
   `.legacy-content a`. */
.costing-new-worksheets .rb-btn-primary,
.bom-panel-find .rb-btn-primary {
  color: var(--text-inverse);
}

/* 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);
}

/* 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;
}

/* 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(--link, #06c);
  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 the Current BOM table's Description
   cell (app/views/costing_worksheets/_current_bom.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(--success-bg, #e3f6e8);
  color: var(--success-text, #1a7a35);
}

.bom-price-source.imported {
  background: var(--muted-bg, #eee);
  color: var(--text-secondary);
}

.bom-waste {
  background: var(--warning-bg, #fff3cd);
  color: var(--warning-text, #8a6116);
  cursor: help;
}

/* Inline qty editor and row-delete button on an editable Current BOM row. */
.bom-qty-input {
  width: 5rem;
  text-align: right;
}

.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(--danger-text, #c0392b);
}

/* Free-text add-row form under the Current BOM table. */
.bom-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* 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 {
  margin: 0.75rem 0 0.25rem;
}
@charset "UTF-8";
/* ============================================================
   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
   application.css.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 a:hover {
  text-decoration: none;
}
/* 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.

   The vendored sfr-ui table styles are unlayered and win on the cascade
   regardless of specificity, so the table rules below carry !important where
   they contradict them. */
.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% !important;
  max-width: 13rem;
  height: 32px;
  padding: 4px 8px;
  box-sizing: border-box;
}

.ltc-table {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.ltc-table th,
.ltc-table td {
  padding: 0.4375rem 0.5rem !important;
  text-align: left !important;
  border: none !important;
  border-bottom: 1px solid var(--border-light) !important;
  background: none !important;
}
.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) !important;
}
.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 !important;
}

.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) !important;
  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;
}
@charset "UTF-8";
A.popup-trigger {
  border-bottom: 1px dotted #aaa;
}

.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 (e.g. ACC with 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 {
  /* 4 pills × 40px + 3 gaps × 8px = 184px.
     Rightmost starts at right:120 to clear the Order Details link
     (which sits at right:12 with ~90px width). */
}
.orders_index .order .status.acc, .orders_all_cad .order .status.acc {
  right: 120px;
}
.orders_index .order .status.cad, .orders_all_cad .order .status.cad {
  right: 168px;
}
.orders_index .order .status.fin, .orders_all_cad .order .status.fin {
  right: 216px;
}
.orders_index .order .status.fab-us, .orders_all_cad .order .status.fab-us {
  right: 264px;
}
.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;
    background-position-x: 12px !important;
    padding-left: 38px !important;
  }
  .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 40px;
  background: var(--bg-secondary) 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") 12px center no-repeat;
  background-size: 15px 15px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.orders_index .order H2.unfulfilled, .orders_all_cad .order H2.unfulfilled {
  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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E");
}
.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 #ccc;
  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: #f7f7f7;
}
.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: #aaa;
}
.orders_index .order TABLE.items TR.needed TD.yards.unfulfilled, .orders_all_cad .order TABLE.items TR.needed TD.yards.unfulfilled {
  color: #c00;
}

TABLE.items TD {
  border-right: 1px solid #ccc;
}
TABLE.items TD.yards {
  text-align: center;
  width: 1px;
}
TABLE.items TD DIV.needed {
  text-align: center;
  padding: 8px 0 0 0;
  color: #aaa;
}
TABLE.items TD.unfulfilled DIV.needed {
  color: #c00;
}

/* 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 #999;
  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 card's grid already labels the cell "Pricing Note". */
  }
  #bom-tab-content .bom-note-prefix {
    display: none;
  }
}
/* These override `!important` rules that live inside application.css.scss's
   `@layer layout` (the responsive-record-table card grid and the mobile
   `table.list { min-width: 0 }`). Important declarations in a layer beat
   unlayered important ones, so these must sit in the same layer — where the
   ID selector then wins on specificity. */
@layer layout {
  @media (max-width: 700px) {
    /* 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 !important;
    }
    /* 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;
    }
    /* 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 !important;
    }
  }
}
/* Edit BOM modal (order_lines/edit_pricing). Flex-wrapped so the summary
   items and the six cost fields reflow on narrow screens with each label
   staying attached to its value — the old fixed 6-column table clipped
   off-screen on phones. */
.bom-pricing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0 0 12px;
}

.bom-cost-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 8px 0 14px;
}
.bom-cost-fields .bom-cost-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 96px;
  min-width: 96px;
  max-width: 170px;
}
.bom-cost-fields .bom-cost-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.bom-cost-fields .bom-cost-field {
  /* sfr-ui sizes text inputs by type with fixed widths; unlayered, so
     !important is required to win. */
}
.bom-cost-fields .bom-cost-field input {
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}

.customer-priority {
  text-align: center;
  float: left;
  width: 50px;
  height: 50px;
}
.customer-priority.platinum {
  background: rgb(229, 228, 226) !important;
}
.customer-priority.gold {
  background: rgb(255, 215, 0) !important;
}
.customer-priority.silver {
  background: rgb(192, 192, 192) !important;
}
.customer-priority.bronze {
  background: rgb(205, 127, 50) !important;
}
.customer-priority.white {
  background: white !important;
}
/* 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, #ddd);
  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, #ddd);
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 40rem;
}
/* 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: #fff;
}
.price-input:focus {
  outline: none;
  border-color: var(--accent, #7a6c62);
}

/* 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: #fff;
}
.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 Order 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;
}

/* An unfilled finish slot is a gap to close, not a failure — so the amber the
   hold statuses use, not the rush red. */
.badge {
  display: inline-block;
  background: var(--status-hold-bg);
  color: var(--status-hold);
  font-size: 0.75em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  vertical-align: middle;
  white-space: nowrap;
}
@charset "UTF-8";
/* ============================================================
   Quote Requests — Kovet Design System
   Uses global CSS vars from application.css.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;
}
.qr-top-bar-search input {
  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:focus {
  border-color: var(--accent-walnut);
  box-shadow: 0 0 0 2px rgba(90, 45, 28, 0.08);
}
.qr-top-bar-search input::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 ===== */
.qr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 120ms ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
}
.qr-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.qr-btn-primary {
  background: var(--accent-walnut);
  color: var(--text-inverse) !important;
  box-shadow: 0 1px 2px rgba(90, 45, 28, 0.2);
}
.qr-btn-primary:hover, .qr-btn-primary:visited {
  background: var(--accent-walnut-light);
  color: var(--text-inverse) !important;
  box-shadow: 0 2px 4px rgba(90, 45, 28, 0.25);
  transform: translateY(-0.5px);
}
.qr-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(90, 45, 28, 0.15);
}

.qr-btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary) !important;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.qr-btn-secondary:hover, .qr-btn-secondary:visited {
  border-color: var(--border-medium);
  color: var(--text-primary) !important;
  background: #FFFFFF;
}

.qr-btn-danger {
  background: #991B1B;
  color: #FFF !important;
  box-shadow: 0 1px 2px rgba(153, 27, 27, 0.2);
}
.qr-btn-danger:hover, .qr-btn-danger:visited {
  background: #7F1D1D;
  color: #FFF !important;
  box-shadow: 0 2px 4px rgba(153, 27, 27, 0.25);
  transform: translateY(-0.5px);
}
.qr-btn-danger:active {
  transform: translateY(0);
}

/* ===== 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-row {
  padding: 12px 24px 0;
}

.cadwf-create-row.is-hidden {
  display: none;
}

.cadwf-create-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.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);
}

.cadwf-create-note {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* ===== 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-default, #c9c0b6);
  border-radius: 6px;
  background: var(--bg-card, #fafaf7);
  color: var(--text-secondary, #6b6358);
  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, #6b6b6b);
}

.qr-spec-pick-intro {
  margin: 0 0 16px;
  color: var(--text-secondary, #555);
  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(--surface-muted, #f6f3ee);
  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, #6b6b6b);
}

.qr-spec-pick-table tbody tr.qr-spec-pick-row-disabled {
  background: rgba(0, 0, 0, 0.025);
  color: var(--text-secondary, #888);
}

.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, #888);
  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, #155e3e);
}

.qr-spec-pick-type-blocked {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary, #777);
}

.qr-spec-pick-status-ok {
  color: var(--fulfilled, #155e3e);
  font-size: 13px;
}

.qr-spec-pick-status-blocked {
  color: var(--text-secondary, #777);
  font-size: 12px;
  font-style: italic;
}

.qr-spec-pick-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.qr-spec-pick-actions .qr-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
@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-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
  }
  .roles-btn-primary {
    color: #fff;
    background: var(--accent-walnut);
    border-color: var(--accent-walnut);
  }
  .roles-btn-primary:hover {
    background: var(--accent-walnut-light);
    border-color: var(--accent-walnut-light);
    color: #fff;
    text-decoration: none;
  }
  .roles-btn-outline {
    color: var(--accent-walnut);
    background: var(--bg-card);
    border-color: var(--border-light);
  }
  .roles-btn-outline:hover {
    background: var(--bg-secondary);
    text-decoration: none;
  }
  .roles-btn-ghost {
    color: var(--text-secondary);
    background: var(--bg-card);
    border-color: var(--border-light);
  }
  .roles-btn-ghost:hover {
    background: var(--bg-secondary);
    text-decoration: none;
  }
  .roles-btn-sm {
    font-size: 0.76rem;
    padding: 6px 14px;
  }
  .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: #F6F2ED;
    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-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: #F1ECE5;
    border: 1px solid #E0D8CE;
    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-row-actions .roles-btn-danger {
    color: var(--text-tertiary);
    background: transparent;
    border-color: transparent;
    padding: 6px 10px;
  }
  .roles-row-actions .roles-btn-danger:hover {
    color: var(--unfulfilled);
    border-color: var(--border-light);
    background: transparent;
  }
  .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-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: #F1ECE5;
    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: #FBF9F6;
    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: #FBF9F6;
  }
  .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: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;
    }
  }
}
@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;
}

TABLE.process-list TD.sort-handle, TABLE.job-list TD.sort-handle {
  width: 20px;
  cursor: ns-resize;
  padding: 0;
  border-right: 1px solid #ddd;
  background-color: #f5f5f5 !important;
  /* the old gripper.png no longer exists; use the drag chevrons from
     the icon set so the handle has a visible affordance again */
  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") !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: 12px 12px !important;
}

TABLE.job-list, TABLE.holiday-list {
  margin-top: 0;
}
TABLE.job-list TH, TABLE.holiday-list TH {
  font-size: 13px;
}
TABLE.job-list TD, TABLE.holiday-list TD {
  background: white !important;
  cursor: ns-resize;
  font-size: 13px;
}
TABLE.job-list TR:last-child TD, TABLE.holiday-list TR:last-child TD {
  border-bottom: none;
}
TABLE.job-list TR TD A.add-button, TABLE.holiday-list TR TD A.add-button {
  background-position: top left !important;
}
.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. The legacy_ui/* stylesheets are
   unlayered, and an unlayered rule beats any layered one regardless of
   specificity -- a @layer components block here would silently lose. This file
   arrives via require_tree, which runs after legacy_ui in the manifest, so
   plain rules win on source order.
   ------------------------------------------------------------------------ */
.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;
}
/* stuff that comes from the template */
#masquerade-banner {
  padding: 12px 8px;
  background: #811;
  color: white;
  text-align: center;
  z-index: 10;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #600;
  border-left: none;
  border-right: none;
}
#masquerade-banner A {
  color: #fdd !important;
}
@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-caret {
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: none !important;
    cursor: pointer;
    color: var(--text-tertiary) !important;
    border-radius: 4px !important;
    transition: color var(--transition-fast);
  }
  .rb-spec-caret svg {
    width: 14px !important;
    height: 14px !important;
    transition: transform var(--transition-fast);
  }
  .rb-spec-caret:hover {
    color: var(--accent-walnut) !important;
  }
  .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: 1fr 1fr 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-fieldgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px 14px;
  }
  .rb-spec .field-pair {
    display: block;
    width: 100%;
    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;
    padding: 0;
    text-align: left !important;
  }
  .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 !important;
  }
  .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 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 label.checkbox .label {
    display: none;
  }
  .rb-spec-pill {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    background: var(--status-closed-bg);
    color: var(--status-closed);
  }
  .rb-spec-pill.is-confirmed {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .rb-spec-pill.is-suggested,
  .rb-spec-pill.is-unmatched {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .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 > .rb-spec-pill {
    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-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-count {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-walnut);
  }
  .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-pill.is-ready,
  .rb-spec-pill.is-completed {
    background: var(--status-open-bg);
    color: var(--status-open);
  }
  .rb-spec-pill.is-processing,
  .rb-spec-pill.is-pending {
    background: var(--status-hold-bg);
    color: var(--status-hold);
  }
  .rb-spec-pill.is-failed {
    background: var(--status-rush-bg);
    color: var(--status-rush);
  }
  .rb-spec .has-many {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible !important;
  }
  .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 !important;
    background-image: none !important;
    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);
  }
}
/* 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: #F5F3F0;
  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-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);
}
