/* Supplied TT Hoves Pro variable webfont. */
@font-face {
  font-family: "TT Hoves";
  src: url("assets/fonts/tt-hoves-pro-vf-trial.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
/* One interface size;
hierarchy uses spacing, color, and weight. */
:root {
  --font-size-ui: 16px;
  --font-weight-ui: 430;
  --line-height-ui: 20px;
  --accent: #263c4b;
  --border: #f0f1f3;
  --muted: #96989d;
  --ink: #24262b;
  --surface: #f5f6f7;
}
* {
  font-size: inherit;
  font-weight: var(--font-weight-ui);
  line-height: var(--line-height-ui);
}
body {
  font-size: var(--font-size-ui);
}

*{
  box-sizing:border-box}
body{
  margin:0;
  font-family:"TT Hoves",Arial,sans-serif;
  color:var(--ink);
  background:white}
button,input,select,textarea{
  font:inherit}
button,select{
  cursor:pointer}
button{
  padding:8px 11px;
  border:1px solid var(--border);
  border-radius:5px;
  background:white;
  color:inherit}
button:hover{
  background:var(--surface)}
button:disabled{
  opacity:.45;
  cursor:not-allowed}
input,select,textarea{
  border:1px solid var(--border);
  border-radius:5px;
  padding:9px;
  background:white;
  color:inherit;
  min-width:0}
input[type="checkbox"]:focus-visible,button:focus-visible,select:focus{
  outline:2px solid #738e9f;
  outline-offset:2px}
h1,h2,h3,p{
  margin:0}

small{
  display:block;
  color:var(--muted);}
strong{
  display:block;}
.shell{
  height:100dvh;
  display:flex;
  }
.rail{
  width:60px;
  flex-shrink:0;
  border-right:1px solid var(--border);
  display:flex;
  align-items:center;
  flex-direction:column;
  }

.rail-label{
  margin-top:auto;
  color:var(--muted);
}
.workspace{
  display:grid;
  width:100%;
  min-width:0}
.registry,.editor{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0}
.registry{
  border-right:1px solid var(--border)}
header{
  min-height:64px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 24px;
  flex-wrap:wrap}
header select{
  border:0}
.push{
  margin-left:auto}
.search{
  padding:18px 24px}
.search input{
  width:100%}
.table-scroll{
  overflow:auto}
table{
  border-collapse:collapse;
  width:100%;
  text-align:left}
th{
  color:var(--muted);
  }
th,td{
  padding:15px 14px;
  border-bottom:1px solid var(--border);
  vertical-align:top}
th:first-child,td:first-child{
  padding-left:24px}
.numeric{
  text-align:right;
  white-space:nowrap}
.selected{
  background:#f0f4f6}
.link{
  border:0;
  background:none;
  padding:0;
  }
.badge{

  border-radius:4px;
  white-space:nowrap;
  display:inline-block;
  margin-bottom:5px}
.sync{
  color:var(--muted);
  }
.timer{
  font-variant-numeric:tabular-nums;
}
.editor-scroll{
  overflow:auto;
  flex:1}
.notice{
  background:#f4f6f7;
  color:#52616b;
  padding:12px 24px;}
.details{
  margin:0;
  border:0;
  grid-template-columns:1fr 1fr;
  }
.details label{
  flex-direction:column;
  color:var(--muted);
}
.details input{
  width:100%;
}
.full{
  grid-column:1/-1}
.section-heading{
  display:flex;
  align-items:center;

  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border)}
.section-heading h3{
  margin-right:auto}
.muted{
  color:var(--muted)}
.actions{
  display:flex;
  flex-wrap:wrap}
.actions button,.actions select{
  padding:6px;
  max-width:150px}
.conflict td:first-child small:first-child{
  color:#a82e35}
.warning{

  border:1px solid #ecd5cb;
  border-radius:5px}
.error{
  color:#a82e35;
  padding:16px 24px}
.empty{
  padding:36px 24px;
  color:var(--muted)}
footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-top:1px solid var(--border);
  margin-top:auto;
}
.summary{
  background:white;
  min-height:86px}
.primary{
  background:var(--accent);
  color:white;
  border-color:var(--accent)}
.primary:hover{
  background:#385464}
.workflow{
  padding:24px;
  display:flex;
  gap:10px;
  flex-wrap:wrap}
.workflow h3{
  width:100%}
.dialog{
  background:white;
  border-radius:8px;
  width:640px;
  max-height:85vh;
  overflow:auto;
  box-shadow:0 20px 80px #0002;
  padding:0 24px 24px}
.dialog header{
  padding-left:0;
  padding-right:0;
  margin-bottom:20px;
  justify-content:space-between}
.dialog>input,.dialog textarea{
  width:100%;
  margin-bottom:16px}
.dialog p{
  margin-bottom:16px}
.catalog-row{
  padding:14px 0;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px}
@media(max-width:1050px){
  .workspace{
    grid-template-columns:310px minmax(490px,1fr)}
  .rail{
    width:45px}
  header{
    padding:12px 16px}
  .registry td,.registry th{
    padding:12px 8px}
  .registry td:nth-child(3),.registry th:nth-child(3){
    display:none}
}
@media(max-width:760px){
  .shell{
    height:auto;
    min-height:100dvh}
  .workspace{
    display:flex;
    flex-direction:column}
  .rail{
    display:none}
  .registry{
    max-height:300px;
    border-bottom:2px solid var(--border)}
  .registry .table-scroll{
    max-height:170px}
  .editor-scroll{
    overflow:visible}
  .details{
    padding:18px;
    gap:12px}
  .section-heading{
    padding:18px}
  .summary{
    position:sticky;
    bottom:0}
  .summary .primary{
    max-width:180px}
  .sync{
    margin-left:0}
}

/* Native HTML visibility must win over flex/grid layout declarations. */
[hidden] {
  display: none !important;
}
dialog.dialog {
  border: 1px solid var(--border);
  color: var(--ink);
}
dialog.dialog::backdrop {
  background: #18212b66;
}
/* Sketch alignment: 60px rail, 972px registry, 888px editor at 1920px. */
.shell {
  padding-bottom: 0;
}
.rail {
  padding: 18px;
  gap: 16px;
}
.rail .rail-mark {
  display: block;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #f3f4f6;
}
.rail .rail-bottom {
  margin-top: auto;
}
.workspace {
  grid-template-columns: minmax(0, 972fr) minmax(0, 888fr);
}
.workspace.panel-closed {
  grid-template-columns: 1fr;
}
.editor[hidden] {
  display: none;
}
.workspace header {
  height: 60px;
  min-height: 60px;
  padding: 0 28px;
  gap: 20px;
  flex-wrap: nowrap;
}

.workspace header button, .section-heading button, .actions button,
.actions select, .availability, .pricing-toggle {
  border: 0;
  background: transparent;
  border-radius: 3px;
  padding: 5px 0;
}
.workspace header button:hover, .section-heading button:hover, .actions button:hover {
  background: var(--surface);
}
.registry header select {
  padding: 5px 0;
}
.registry .search {
  border-bottom: 1px solid var(--border);
}
.registry > .table-scroll {
  flex: 1;
}
th {
  background: white;
}
th, td {
  padding: 10px 10px;
  vertical-align: middle;
}
th:first-child, td:first-child {
  padding-left: 28px;
}
th:last-child, td:last-child {
  padding-right: 28px;
}
thead {
  height: 60px;
}
tbody tr {
  height: 40px;
}
tbody td {
  border-bottom: 0;
}
.registry .selected {
  background: #fafbfc;
}
.badge {
  background: transparent;
  padding: 0;
  margin: 0;
}
.link {
  color: inherit;
  text-decoration: none;
}
.registry [data-action="select"]:hover {
  background: transparent;
}
.project-name {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.date-cell {
  white-space: nowrap;
}
.sync {
  margin-left: 0;
  white-space: nowrap;
}
.timer {
  white-space: nowrap;
}
.details {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.details label {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 18px;
}
.details input {
  height: 45px;
  padding: 12px 16px;
}
.date-pair {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.date-pair input {
  width: 50%;
  padding: 10px;
}
.pricing {
  margin: 0 28px;
  color: #73777e;
}
.pricing summary {
  padding: 8px 0;
  cursor: pointer;
}
.pricing-fields {
  border: 0;
  padding: 12px 0;
  display: grid;
  gap: 14px;
}
.pricing-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section-heading {
  height: 60px;
  padding: 0 28px;
  gap: 24px;
}
.equipment th, .equipment td {
  padding: 10px 8px;
}
.equipment th:first-child, .equipment td:first-child {
  padding-left: 28px;
}
.equipment th:last-child, .equipment td:last-child {
  padding-right: 28px;
}
.equipment-name {
  display: block;
  min-width: 90px;
  max-width: 170px;
}
.equipment input {
  width: 50px;
  padding: 4px;
  border-color: transparent;
}
.equipment input:hover, .equipment input:focus {
  border-color: var(--border);
}
.availability {
  white-space: nowrap;
  text-align: left;
}
.conflict {
  background: transparent;
}
.conflict .availability {
  color: #ff2852;
}
.pending {
  background: #fffbed;
}
.actions {
  gap: 12px;
  align-items: center;
}
.actions select {
  max-width: 108px;
}
.warning {
  background: #fffafa;
  border-color: #f6e8eb;
  margin: 12px 28px;
  padding: 10px 12px;
}
.warning p {
  margin: 3px 0 8px;
}
footer {
  min-height: 60px;
  padding: 14px 28px;
}
.summary {
  flex-wrap: wrap;
  gap: 12px;
}
.summary strong {
  margin-left: auto;
}
.pricing-toggle {
  margin-left: auto;
  color: #73777e;
}
.calendar-overlay {
  position: fixed;
  right: 28px;
  bottom: 105px;
  z-index: 12;
  width: 330px;
}
.calendar-popover {
  width: 100%;
  max-height: 65vh;
  padding: 0 16px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px #17212b12;
}
.calendar-popover header {
  min-height: 42px;
  margin-bottom: 8px;
  gap: 8px;
}
.calendar-popover header button {
  border: 0;
}
.month-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.month-heading button {
  padding: 3px 9px;
  border: 0;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 4px;
  padding: 12px 0;
}
.calendar-grid span {
  padding: 8px 0;
}
.calendar-grid .weekday {
  color: var(--muted);
}
.calendar-grid .day-shortage {
  color: #ff2852;
}
.calendar-legend {
  margin-bottom: 12px;
}
@media (max-width: 1400px) and (min-width: 761px) {
  .workspace {
    grid-template-columns: minmax(360px, 1fr) minmax(550px, 1fr);
  }
  .workspace header {
    padding: 0 18px;
    gap: 12px;
  }
  .sync {
    max-width: 60px;
    white-space: normal;
  }
  .registry td, .registry th {
    padding: 10px 7px;
  }
  .registry .project-name {
    max-width: 130px;
  }
  .registry td:nth-child(4), .registry th:nth-child(4) {
    display: none;
  }
  .registry td:nth-child(3), .registry th:nth-child(3) {
    display: table-cell;
  }
  .details {
    padding: 20px 18px;
  }
  .details label {
    grid-template-columns: 140px minmax(0,1fr);
    gap: 10px;
  }
  .date-pair {
    flex-direction: column;
  }
  .date-pair input {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .shell {
    padding-bottom: 0;
  }
  .workspace {
    display: flex;
  }
  .workspace header {
    padding: 0 16px;
    gap: 10px;
  }
  .registry {
    max-height: 300px;
  }
  .details {
    padding: 18px 16px;
  }
  .details label {
    grid-template-columns: 110px minmax(0,1fr);
    gap: 10px;
  }
  .date-pair {
    flex-direction: column;
  }
  .date-pair input {
    width: 100%;
  }
  .summary {
    bottom: 0;
  }
  .summary .primary {
    max-width: none;
  }
  .registry td:nth-child(4), .registry th:nth-child(4) {
    display: none;
  }
  .registry td:nth-child(3), .registry th:nth-child(3) {
    display: table-cell;
  }
  .workspace.panel-closed .registry {
    max-height: none;
  }
}
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
  margin: 16px 0;
}
.date-picker-grid button {
  padding: 8px 4px;
}
.date-picker-grid .chosen {
  background: var(--accent);
  color: white;
}
.date-picker-grid .weekday {
  color: var(--muted);
  padding: 8px 0;
}
.date-picker-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.date-picker-footer input {
  width: 70px;
}
.date-picker-footer .primary {
  margin-left: auto;
}
.date-pair input[readonly] {
  cursor: pointer;
}
/* One chevron asset, always trailing its control label. */
.chevron {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  mask: url("assets/icons/chevron.svg") center / 16px 16px no-repeat;
}
.chevron-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.month-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.month-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}
select, .registry header select, .actions select {
  appearance: none;
  background-image: url("assets/icons/chevron.svg");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: right 4px center;
  padding-right: 28px;
}
.registry header select {
  width: auto;
  max-width: 230px;
}
.pricing summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  list-style: none;
}
.pricing summary::-webkit-details-marker {
  display: none;
}
.pricing summary::after {
  content: "";

  flex: 0 0 16px;
  background: currentColor;
}
/* Fit the filter to its selected label, not its longest option. */
.registry header #status-filter {
  flex: 0 0 auto;
  max-width: none;
  padding-left: 0;
  padding-right: 28px;
}
/* Match both bottom bars to the 60px workspace headers. */
.workspace > .registry > footer,
.workspace > .editor > footer.summary {
  height: 60px;
  min-height: 60px;
  flex: 0 0 60px;
  margin-top: auto;
  padding-top: 0;
  padding-bottom: 0;
  flex-wrap: nowrap;
}
@media (max-width: 760px) {
  .workspace > .editor > footer.summary {
    height: auto;
    min-height: 60px;
    flex-basis: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
/* Original Figma vector 112:34;
export includes the stroke bounds. */
.chevron, .pricing summary::after, .select-chevron::after {
  width: 7.3px;
  height: 3.67868px;
  flex: 0 0 7.3px;
  mask: url("assets/icons/chevron.svg") center / 7.3px 3.67868px no-repeat;
  transform: rotate(180deg);
}
.chevron-left {
  transform: rotate(-90deg);
}
.chevron-right {
  transform: rotate(90deg);
}
.chevron-control .chevron {
  margin-left: auto;
}
.select-chevron {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.select-chevron::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(50% - 1.83934px);
  background: currentColor;
  pointer-events: none;
}
select, .registry header select, .actions select,
.registry header #status-filter {
  background-image: none;
  padding-right: 15.3px;
}
/* Resizable desktop split;
the registry adapts to its own width. */
.registry {
  position: relative;
  container-type: inline-size;
  container-name: orders;
}
@media (min-width: 971px) {
  .workspace {
    grid-template-columns: minmax(0, 972fr) minmax(0, 888fr);
  }
  .workspace.panel-closed {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 970px) {
  .shell {
    height: auto;
    min-height: 100dvh;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .registry {
    max-height: 300px;
    border-bottom: 1px solid var(--border);
  }
  .registry > .table-scroll {
    max-height: 180px;
  }
  .registry > header, .registry > footer {
    flex-shrink: 0;
  }
  .editor-scroll {
    overflow: visible;
  }
  .workspace.panel-closed .registry {
    max-height: none;
  }
  .workspace.panel-closed .registry > .table-scroll {
    max-height: none;
  }
}
/* Align pricing controls;
helper text follows its input. */
.pricing-fields {
  margin: 0;
  min-inline-size: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.pricing-fields label {
  min-width: 0;
}
.pricing-fields input {
  width: 100%;
  height: 45px;
  padding: 12px 16px;
}
/* Order selection and explicit batch editing. */
.selection-cell {
  width: 48px;
}
input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: #f3f4f6;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}
input[type="checkbox"]:checked {
  background: radial-gradient(circle, #287bb5 0 4px, #f3f4f6 4.5px);
}
.registry .batch-selected input[type="checkbox"]:checked {
  background: radial-gradient(circle, #287bb5 0 4px, white 4.5px);
}
input[type="checkbox"]:indeterminate {
  background: linear-gradient(#287bb5,#287bb5) center / 10px 2px no-repeat #f3f4f6;
}
input[type="checkbox"]:disabled {
  opacity: .45;
  cursor: not-allowed;
}
input[type="checkbox"]:focus:not(:focus-visible) {
  outline: none;
}
.batch-content summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  list-style: none;
  cursor: pointer;
}
.batch-content summary::-webkit-details-marker { display: none; }
.batch-content summary::after {
  content: '';
  width: 7.3px;
  height: 3.67868px;
  flex-shrink: 0;
  background: currentColor;
  mask: url("assets/icons/chevron.svg") center / contain no-repeat;
  transform: rotate(180deg);
}
.batch-content details[open] > summary::after { transform: none; }
.registry .batch-selected {
  background: #f3f4f6;
}
.registry .batch-selected td:first-child {
  border-radius: 8px 0 0 8px;
}
.registry .batch-selected td:last-child {
  border-radius: 0 8px 8px 0;
}
.batch-editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.batch-editor > footer {
  height: 60px;
  flex: 0 0 60px;
}
.batch-content {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.batch-content label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.batch-content .batch-enable {
  flex-direction: row;
  align-items: center;
}
#batch-preview p, #batch-orders p {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
#batch-error {
  color: #a82e35;
}
.registry th:nth-child(n), .registry td:nth-child(n) {
  display: table-cell;
}
@container orders (max-width: 849px) {
  .registry th:nth-child(5), .registry td:nth-child(5) {
    display: none;
  }
}
@container orders (max-width: 719px) {
  .registry th:nth-child(6), .registry td:nth-child(6) {
    display: none;
  }
}
@container orders (max-width: 589px) {
  .registry th:nth-child(7), .registry td:nth-child(7) {
    display: none;
  }
}
@container orders (max-width: 479px) {
  .registry th:nth-child(3), .registry td:nth-child(3) {
    display: none;
  }
  .registry th:first-child, .registry td:first-child {
    width: 48px;
    padding-left: 16px;
    padding-right: 12px;
  }
  .registry th:nth-child(2), .registry td:nth-child(2) {
    width: 82px;
  }
}
/* Summary: label and pricing adjustments grouped at the leading edge. */
.summary .pricing-toggle {
  margin-left: 0;
  text-align: left;
}
.summary .primary, #batch-apply {
  background: #f3f4f6;
  border-color: #f3f4f6;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 6px;
}
.summary .primary:hover:not(:disabled), #batch-apply:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: #e5e7eb;
}
.summary .primary:disabled, #batch-apply:disabled {
  opacity: 1;
  color: var(--muted);
  cursor: not-allowed;
}
/* Header status and reservation countdown follow the design's reading order. */
.order-status-control {
  flex: 0 0 auto;
}
.workspace header #order-status {
  border: 0;
  padding: 5px 15.3px 5px 0;
  background-color: transparent;
  background-image: none;
  appearance: none;
  max-width: none;
  flex: 0 0 auto;
}
.editor header .timer {
  flex-shrink: 0;
}
/* Entered order data stays distinct from muted labels and placeholders. */
.details input {
  color: #000;
  -webkit-text-fill-color: #000;
}
.details input::placeholder {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  opacity: 1;
}
.registry [data-order-row] {
  cursor: pointer;
}
/* Scroll only the table body: the header occupies a separate fixed row. */
.registry > .table-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.registry > .table-scroll > table {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.registry thead {
  display: table;
  table-layout: fixed;
  flex: 0 0 60px;
}
.registry #order-rows {
  display: block;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.registry #order-rows tr {
  display: table;
  table-layout: fixed;
  width: 100%;
}
.registry th:first-child, .registry td:first-child {
  width: 48px;
}
.registry th, .registry td {
  overflow-wrap: anywhere;
}
.registry .project-name {
  max-width: 100%;
}
.registry .date-cell {
  white-space: normal;
}
/* Full-width header divider and unbroken order identifiers. */
.registry > .table-scroll {
  position: relative;
}
.registry thead {
  position: relative;
}
.registry thead::after {
  content: '';
  position: absolute;

  bottom: 0;
  height: 1px;
  background: var(--border);
}
.registry th:nth-child(2), .registry td:nth-child(2) {
  width: 94px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.registry #order-rows {
  scrollbar-width: none;
  scrollbar-gutter: auto;
  padding-right: 6px;
}
.registry #order-rows::-webkit-scrollbar {
  display: none;
  width: 0;
}
.registry-scroll-track {
  position: absolute;
  top: 60px;
  bottom: 0;
  right: 0;
  width: 6px;
  opacity: 0;
  transition: opacity 100ms;
}
.registry > .table-scroll:hover .registry-scroll-track,
.registry > .table-scroll:focus-within .registry-scroll-track,
.registry-scroll-track.dragging {
  opacity: 1;
}
.registry-scroll-thumb {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 144px;
  border-radius: 100px 0 0 100px;
  background: #f3f4f6;
  touch-action: none;
  cursor: grab;
}
.registry-scroll-thumb:hover {
  background: #e5e7eb;
}
.registry-scroll-thumb:active {
  cursor: grabbing;
  background: #d5d8de;
}
.registry-scroll-thumb:focus-visible {
  outline: 2px solid #738e9f;
  outline-offset: -2px;
}
@media (hover: none) {
  .registry-scroll-track {
    opacity: 1;
  }
}
/* The closed-editor view uses available width for useful order details. */
.registry th.expanded-order-column, .registry td.expanded-order-column,
.expanded-dates {
  display: none;
}
@container orders (min-width: 1100px) {
  .panel-closed .registry th.expanded-order-column,
  .panel-closed .registry td.expanded-order-column {
    display: table-cell;
  }
  .panel-closed .compact-dates {
    display: none;
  }
  .panel-closed .expanded-dates, .panel-closed .expanded-dates > span {
    display: block;
    white-space: nowrap;
  }
  .panel-closed .registry th:nth-child(7), .panel-closed .registry td:nth-child(7) {
    width: 230px;
  }
  .panel-closed .registry th:nth-child(8), .panel-closed .registry td:nth-child(8) {
    width: 230px;
    white-space: nowrap;
  }
  .panel-closed .registry .project-name {
    white-space: normal;
    overflow: visible;
  }
  .panel-closed .registry td {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}
/* Reveal extra data progressively when the full-width registry has room. */
.registry th.wide-extra, .registry td.wide-extra {
  display: none;
}
@container orders (min-width: 1450px) {
  .panel-closed .registry th:nth-child(9), .panel-closed .registry td:nth-child(9),
  .panel-closed .registry th:nth-child(10), .panel-closed .registry td:nth-child(10) {
    display: table-cell;
  }
}
@container orders (min-width: 1700px) {
  .panel-closed .registry th:nth-child(11), .panel-closed .registry td:nth-child(11),
  .panel-closed .registry th:nth-child(12), .panel-closed .registry td:nth-child(12) {
    display: table-cell;
    width: 100px;
  }
  .panel-closed [data-registry-hold] {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
}
/* Balanced wide-table proportions shared by headings and data rows. */
@container orders (min-width: 1100px) {
  .panel-closed .registry th:nth-child(1), .panel-closed .registry td:nth-child(1) {
    width: 4%;
  }
  .panel-closed .registry th:nth-child(2), .panel-closed .registry td:nth-child(2) {
    width: 8%;
  }
  .panel-closed .registry th:nth-child(3), .panel-closed .registry td:nth-child(3) {
    width: 15%;
  }
  .panel-closed .registry th:nth-child(4), .panel-closed .registry td:nth-child(4) {
    width: 19%;
  }
  .panel-closed .registry th:nth-child(5), .panel-closed .registry td:nth-child(5) {
    width: 12%;
  }
  .panel-closed .registry th:nth-child(6), .panel-closed .registry td:nth-child(6) {
    width: 10%;
  }
  .panel-closed .registry th:nth-child(7), .panel-closed .registry td:nth-child(7),
  .panel-closed .registry th:nth-child(8), .panel-closed .registry td:nth-child(8) {
    width: 16%;
    white-space: nowrap;
  }
}
@container orders (min-width: 1450px) {
  .panel-closed .registry th:nth-child(1), .panel-closed .registry td:nth-child(1) {
    width: 3%;
  }
  .panel-closed .registry th:nth-child(2), .panel-closed .registry td:nth-child(2) {
    width: 7%;
  }
  .panel-closed .registry th:nth-child(3), .panel-closed .registry td:nth-child(3) {
    width: 13%;
  }
  .panel-closed .registry th:nth-child(4), .panel-closed .registry td:nth-child(4) {
    width: 15%;
  }
  .panel-closed .registry th:nth-child(5), .panel-closed .registry td:nth-child(5) {
    width: 10%;
  }
  .panel-closed .registry th:nth-child(6), .panel-closed .registry td:nth-child(6) {
    width: 9%;
  }
  .panel-closed .registry th:nth-child(7), .panel-closed .registry td:nth-child(7),
  .panel-closed .registry th:nth-child(8), .panel-closed .registry td:nth-child(8) {
    width: 12%;
  }
  .panel-closed .registry th:nth-child(9), .panel-closed .registry td:nth-child(9) {
    width: 13%;
  }
  .panel-closed .registry th:nth-child(10), .panel-closed .registry td:nth-child(10) {
    width: 6%;
  }
}
@container orders (min-width: 1700px) {
  .panel-closed .registry th:nth-child(2), .panel-closed .registry td:nth-child(2) {
    width: 6%;
  }
  .panel-closed .registry th:nth-child(3), .panel-closed .registry td:nth-child(3) {
    width: 10%;
  }
  .panel-closed .registry th:nth-child(4), .panel-closed .registry td:nth-child(4) {
    width: 12%;
  }
  .panel-closed .registry th:nth-child(5), .panel-closed .registry td:nth-child(5) {
    width: 8%;
  }
  .panel-closed .registry th:nth-child(6), .panel-closed .registry td:nth-child(6) {
    width: 8%;
  }
  .panel-closed .registry th:nth-child(7), .panel-closed .registry td:nth-child(7),
  .panel-closed .registry th:nth-child(8), .panel-closed .registry td:nth-child(8) {
    width: 10%;
  }
  .panel-closed .registry th:nth-child(9), .panel-closed .registry td:nth-child(9) {
    width: 11%;
  }
  .panel-closed .registry th:nth-child(10), .panel-closed .registry td:nth-child(10),
  .panel-closed .registry th:nth-child(11), .panel-closed .registry td:nth-child(11) {
    width: 6%;
  }
  .panel-closed .registry th:nth-child(12), .panel-closed .registry td:nth-child(12) {
    width: 10%;
  }
}
/* Tables use one line per value; full strings are available on hover. */
.registry th, .registry td,
.panel-closed .registry td,
.registry .date-cell,
.panel-closed .registry .project-name,
.registry .project-name,
.equipment th, .equipment td, .equipment-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

/* Order-list spacing from the annotated row reference. */
.registry #order-rows {
  padding: 10px 10px 10px 10px;
  overscroll-behavior: contain;
  overflow-x: hidden;
  flex-basis: 0;
}
.registry thead {
  margin-inline: 10px;
  width: calc(100% - 20px);
}
.registry thead::after {
  left: -10px;
  right: -10px;
}
.registry #order-rows tr {
  margin-bottom: 4px;
  border-radius: 8px;
  overflow: hidden;
}
.registry #order-rows td {
  padding-top: 18px;
  padding-bottom: 18px;
}
.registry #order-rows td:first-child,
.registry thead th:first-child {
  padding-left: 18px;
}
.registry #order-rows td:last-child,
.registry thead th:last-child {
  padding-right: 18px;
}

/* Split table: identical tracks and insets for the header and every row.
   Track widths include 10px cell padding on each side (20px between values). */
.workspace:not(.panel-closed) .registry {
  --status-track: 160px;
  --manager-track: 130px;
  --amount-track: 110px;
  --dates-track: 135px;
}
.workspace:not(.panel-closed) .registry thead {
  display: block;
}
.workspace:not(.panel-closed) .registry thead tr,
.workspace:not(.panel-closed) .registry #order-rows tr {
  display: grid;
  grid-template-columns: 48px 94px var(--status-track) minmax(0, 1fr) var(--manager-track) var(--amount-track) var(--dates-track) 50px;
}
.workspace:not(.panel-closed) .registry th:nth-child(n),
.workspace:not(.panel-closed) .registry td:nth-child(n) {
  width: auto;
  min-width: 0;
  padding-inline: 10px;
}
.workspace:not(.panel-closed) .registry th:first-child,
.workspace:not(.panel-closed) .registry td:first-child:not([colspan]) {
  padding-left: 18px;
  padding-right: 10px;
  text-align: left;
}
.workspace:not(.panel-closed) .registry .project-name {
  max-width: 100%;
}
/* Grid rows must grow around their padding; the legacy table row height
   otherwise clips the 18px top/bottom inset. */
.workspace:not(.panel-closed) .registry #order-rows tr {
  height: auto;
  min-height: 56px;
}
.workspace:not(.panel-closed) .registry thead tr {
  height: 60px;
}
.workspace:not(.panel-closed) .registry thead th {
  padding-block: 0;
  align-content: center;
  border-bottom: 0;
}
.workspace:not(.panel-closed) .registry td[colspan] {
  grid-column: 1 / -1;
}
@container orders (max-width: 849px) {
  .workspace:not(.panel-closed) .registry thead tr,
  .workspace:not(.panel-closed) .registry #order-rows tr {
    --manager-track: 0px;
  }
}
@container orders (max-width: 719px) {
  .workspace:not(.panel-closed) .registry thead tr,
  .workspace:not(.panel-closed) .registry #order-rows tr {
    --amount-track: 0px;
  }
}
@container orders (max-width: 589px) {
  .workspace:not(.panel-closed) .registry thead tr,
  .workspace:not(.panel-closed) .registry #order-rows tr {
    --dates-track: 0px;
  }
}
@container orders (max-width: 479px) {
  .workspace:not(.panel-closed) .registry thead tr,
  .workspace:not(.panel-closed) .registry #order-rows tr {
    --status-track: 0px;
  }
}

/* Give the pricing section breathing room above the equipment divider. */
.pricing { padding-bottom: 16px; }

/* Pricing disclosure uses the same trailing, centered Figma chevron. */
.pricing summary { position: relative;  }
.pricing summary::after {
  right: 0;
  top: calc(50% - 1.83934px);
  width: 7.3px;
  height: 3.67868px;
  mask: url("assets/icons/chevron.svg") center / 7.3px 3.67868px no-repeat;
  transform: rotate(180deg);
}
.pricing[open] summary::after { transform: none; }

/* Pricing is a content-sized disclosure: chevron follows its label by 8px. */
.pricing summary { width: fit-content; max-width: 100%; padding-right: 0; gap: 8px; }
.pricing summary::after { position: static; margin-left: 0; align-self: center; }

/* Hidden columns retain their track positions in the split table. */
.workspace:not(.panel-closed) .registry th:nth-child(1), .workspace:not(.panel-closed) .registry td:nth-child(1):not([colspan]) { grid-column: 1; }
.workspace:not(.panel-closed) .registry th:nth-child(2), .workspace:not(.panel-closed) .registry td:nth-child(2):not([colspan]) { grid-column: 2; }
.workspace:not(.panel-closed) .registry th:nth-child(3), .workspace:not(.panel-closed) .registry td:nth-child(3):not([colspan]) { grid-column: 3; }
.workspace:not(.panel-closed) .registry th:nth-child(4), .workspace:not(.panel-closed) .registry td:nth-child(4):not([colspan]) { grid-column: 4; }
.workspace:not(.panel-closed) .registry th:nth-child(5), .workspace:not(.panel-closed) .registry td:nth-child(5):not([colspan]) { grid-column: 5; }
.workspace:not(.panel-closed) .registry th:nth-child(6), .workspace:not(.panel-closed) .registry td:nth-child(6):not([colspan]) { grid-column: 6; }
.workspace:not(.panel-closed) .registry th:nth-child(7), .workspace:not(.panel-closed) .registry td:nth-child(7):not([colspan]) { grid-column: 7; }

/* Reserve the trailing action slot even when its icon is hidden. */
.registry th.row-actions-heading, .registry td.row-actions {
  width: 50px;
  padding: 0 18px 0 10px;
  vertical-align: middle;
}
.workspace:not(.panel-closed) .registry th.row-actions-heading,
.workspace:not(.panel-closed) .registry td.row-actions {
  grid-column: 8;
  padding: 0 18px 0 10px;
  align-content: center;
}
.workspace:not(.panel-closed) .registry th:nth-child(7),
.workspace:not(.panel-closed) .registry td:nth-child(7) {
  padding-right: 10px;
}
.registry .order-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}
.order-download img { display: block; }
.registry tr:hover .order-download,
.registry tr:focus-within .order-download,
.registry tr.selected .order-download,
.registry tr.batch-selected .order-download {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: none) {
  .registry .order-download { opacity: 1; pointer-events: auto; }
}
.registry #order-rows td.row-actions { padding-block: 0; }

/* Order values and headings share a left edge; downloads sit at the right. */
.registry th, .registry td { text-align: left; }
.registry th.row-actions-heading, .registry td.row-actions { text-align: right; }
.registry .order-download { margin-left: auto; }

/* Focus changes the field's existing stroke without an extra outer ring. */
input:not([type="checkbox"]):focus, textarea:focus {
  outline: none;
  border-color: #738e9f;
}

/* Pointer dragging uses the thumb fill; keyboard focus keeps its indicator. */
.registry-scroll-thumb.pointer-focus { outline: none; }

#quote-body { white-space: pre-wrap; font: inherit; }
@media print {
  body:has(#quote-dialog[open]) > :not(#quote-dialog) { display: none; }
  #quote-dialog[open] { position: static; width: auto; max-height: none; border: 0; overflow: visible; }
  #quote-dialog button { display: none; }
}

dialog.calendar-overlay { margin: auto 28px 105px auto; padding: 0; border: 0; max-width: calc(100vw - 32px); }
.calendar-grid button { padding: 6px 0; }
#amend-dialog, #parser-dialog, #quote-dialog { max-height: 88vh; overflow: auto; }
.client-copy { max-width: 42rem; margin: auto; padding: 24px; }
@media print { #client-quote, #quote-dialog label { display: none; } }
