﻿:root {
  color-scheme: light;
  --ink: #172f40;
  --muted: #4b6274;
  --canvas: #f5f8fb;
  --surface: #fff;
  --line: #d7e2ea;
  /* FentonShutters.com theme colors. */
  --navy: #0c3652;
  --navy-deep: #08283e;
  --slate-blue: #889eae;
  --light-blue: #b5d2dd;
  --blue-wash: #ecf2f8;
  --field: #f8fbfd;
  --focus: #32739f;
  --nav-text: #dce9f2;
  --nav-hover: #1a4563;
  --nav-active: #23516e;
  --nav-active-border: #48738e;
  --radius: 0.8rem;
  --shadow: 0 4px 18px rgba(12, 54, 82, 0.055);
  --display-font: Georgia, 'Times New Roman', serif;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
a { color: var(--navy); text-underline-offset: 0.2em; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 {
  font: 400 clamp(2.25rem, 4vw, 3.3rem)/1.05 var(--display-font);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
h2 { font-size: 1.22rem; font-weight: 690; letter-spacing: -0.025em; }
h3 { font-size: 1.12rem; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: 0.7rem 1rem; background: white; }

.app-shell { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); min-height: 100vh; }
.app-shell.sales-shell { display: block; }
.site-header {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0 1rem 2rem;
  background: linear-gradient(152deg, var(--navy) 0%, var(--navy-deep) 78%);
  color: var(--surface);
}
.brand { display: grid; place-items: center; margin: 0 -1rem 1.3rem; padding: 1.1rem 0.8rem; background: var(--surface); }
.brand:focus-visible { outline-offset: -5px; }
.brand img { display: block; width: auto; height: 5.8rem; }
.primary-nav { display: grid; gap: 0.35rem; }
.primary-nav a {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--nav-text);
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--nav-hover); color: white; }
.primary-nav a[aria-current] { background: var(--nav-active); border-color: var(--nav-active-border); color: white; }
.nav-icon { display: inline-block; flex: 0 0 auto; width: 1rem; height: 1rem; }
.list-icon {
  border: 1.5px solid currentColor;
  border-radius: 0.17rem;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 3px) center / 0.45rem 0.42rem no-repeat;
}
.production-icon { border: 1.5px solid currentColor; border-radius: 0.17rem; box-shadow: inset 0 3px rgba(181, 210, 221, 0.45); }
.dealer-icon { border: 1.5px solid currentColor; border-radius: 0.22rem 0.22rem 0 0; }
.inventory-icon {
  border: 1.5px solid currentColor;
  border-radius: 0.17rem;
  background: linear-gradient(currentColor, currentColor) center 0.25rem / 100% 1px no-repeat;
}
.utility-actions { display: flex; align-items: center; gap: 0.75rem; width: min(100%, 29rem); }
.sign-out { flex: 0 0 auto; }
.account-entry { max-width: 31rem; margin: clamp(0.5rem, 4vw, 3rem) auto 0; }
.account-entry .helptext { display: block; margin-top: 0.35rem; color: var(--muted); }
.account-entry .helptext ul { margin: 0.3rem 0; padding-left: 1.25rem; }
.account-help { margin: 1rem 0 0; color: var(--muted); }

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.35rem;
  padding: 0.55rem clamp(1rem, 3.4vw, 3rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.workspace-name { font-weight: 650; color: var(--muted); }
.global-search {
  display: flex;
  align-items: center;
  width: min(100%, 22rem);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.global-search:focus-within { border-color: #64869e; }
.global-search input { width: 100%; min-width: 0; padding: 0.61rem 0.8rem; border: 0; background: transparent; color: var(--ink); font: inherit; }
.global-search input::placeholder { color: var(--muted); }
.global-search button { display: grid; place-items: center; width: 2.65rem; min-height: 2.5rem; flex: 0 0 auto; border: 0; border-radius: 0.4rem; background: transparent; color: var(--navy); cursor: pointer; }
.global-search button:hover { background: var(--blue-wash); }
.search-icon { position: relative; width: 0.72rem; height: 0.72rem; border: 1.5px solid currentColor; border-radius: 50%; margin: -0.12rem 0.12rem 0 0; }
.search-icon::after { position: absolute; content: ""; height: 1.5px; width: 0.34rem; top: 0.57rem; left: 0.51rem; background: currentColor; transform: rotate(45deg); }

.shell { width: min(100%, 88rem); margin-inline: auto; }
.workspace { padding: clamp(1rem, 3.4vw, 3rem); }
.sales-header { background: var(--surface); border-top: 3px solid var(--quote-accent, var(--navy)); border-bottom: 1px solid var(--line); }
.sales-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.85rem; padding: 0.7rem clamp(1rem, 3.4vw, 3rem); }
.sales-header-branded { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.sales-brand { display: flex; align-items: center; justify-self: start; gap: 0.75rem; max-width: 100%; min-width: 0; color: var(--navy); font-weight: 700; text-decoration: none; }
.sales-brand img { display: block; width: auto; height: 3.2rem; flex: 0 0 auto; }
.sales-brand .quote-logo { width: 9.5rem; max-width: 100%; height: auto; }
.sales-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-header .global-search { width: min(35vw, 22rem); min-width: 0; }
.sales-header-inner > .button, .sales-menu { grid-column: -2 / -1; justify-self: end; }
.sales-header-inner > .fenton-workspace-link { grid-column: -3 / -2; white-space: nowrap; }
.sales-menu { position: relative; }
.sales-menu > summary { list-style: none; }
.sales-menu > summary::-webkit-details-marker { display: none; }
.sales-menu > summary::after { content: ""; width: 0.44rem; height: 0.44rem; margin: 0 0.1rem 0.17rem 0.25rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sales-menu[open] > summary::after { transform: translateY(0.22rem) rotate(225deg); }
.sales-menu-panel { position: absolute; inset: calc(100% + 0.45rem) 0 auto auto; z-index: 4; width: 13rem; padding: 0.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 26px #172f402e; }
.sales-menu-panel a, .sales-menu-panel button { display: block; width: 100%; padding: 0.6rem 0.75rem; border: 0; border-radius: 0.4rem; background: transparent; color: var(--navy); font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.sales-menu-panel a:hover, .sales-menu-panel a[aria-current], .sales-menu-panel button:hover { background: var(--blue-wash); }
.sales-menu-panel .sales-menu-section { margin-top: 0.3rem; padding-top: 0.55rem; border-top: 1px solid var(--line); }
.account-details { display: grid; gap: 1rem; max-width: 38rem; padding: 1.15rem; overflow-wrap: anywhere; }
.account-details dt { font-weight: 700; }
.account-details dd { margin: 0.25rem 0 0; color: var(--muted); }
.crm-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; gap: 1.15rem; }
.crm-contact { margin: 0; }
.crm-map { display: grid; gap: 0.55rem; padding: 1.15rem; border-top: 1px solid var(--line); }
.crm-map iframe, .crm-address-lookup iframe { width: 100%; min-height: 17rem; border: 1px solid var(--line); border-radius: 0.5rem; }
.crm-address-lookup { display: grid; gap: 0.55rem; }
.crm-address-lookup:has([data-address-status]:empty) { display: none; }
.address-suggestions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.address-suggestions:empty { display: none; }
.address-suggestions .button { text-align: left; }
.crm-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; }
.crm-filter select { padding: 0.6rem; border: 1px solid var(--line); border-radius: 0.4rem; font: inherit; }
.crm-list { display: grid; gap: 0.8rem; padding: 1rem 1.25rem; overflow-wrap: anywhere; }
ul.crm-list { margin: 0; padding-inline-start: 2.4rem; }
.crm-list details p { margin-block-start: 0.55rem; }
.crm-list summary { cursor: pointer; }
.order-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 14.25rem;
  overflow: hidden;
  padding: clamp(1.8rem, 4.3vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--blue-wash);
}
.order-hero-copy { position: relative; z-index: 1; max-width: 28rem; }
.order-hero h1 { font-size: clamp(2.55rem, 4.8vw, 4rem); color: var(--navy); }
.order-hero p { margin: 0.8rem 0 1.35rem; max-width: 28rem; font-size: 1.05rem; color: var(--muted); }
.order-hero-photo {
  position: absolute;
  inset: 0 0 0 41%;
  background: linear-gradient(90deg, var(--blue-wash) 0%, rgba(236, 242, 248, 0.42) 35%, transparent 62%),
              url("shutter-gallery.c3a99e8a94f9.jpg") 69% 48% / cover no-repeat, var(--light-blue);
}
.stage-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.65rem; margin: 1.2rem 0; }
.stage-card {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
  min-height: 6rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}
.stage-card span { color: var(--muted); font-weight: 640; }
.stage-card strong { font: 400 1.9rem/1.1 var(--display-font); font-variant-numeric: tabular-nums; }
.stage-card:hover { border-color: var(--slate-blue); background: var(--field); }
.stage-card[aria-current] { border-color: var(--slate-blue); background: var(--blue-wash); color: var(--navy); }
.pricing-switch { display: inline-flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.2rem; border: 1px solid var(--line); border-radius: 0.55rem; background: var(--surface); }
.pricing-switch a { padding: 0.4rem 0.7rem; border-radius: 0.35rem; color: var(--navy); text-decoration: none; font-weight: 640; }
.pricing-switch a:hover { background: var(--field); }
.pricing-switch a[aria-current] { background: var(--navy); color: white; }
.quote-view-controls, .queue-pricing-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.order-hero + .queue-pricing-controls { margin-top: 1rem; }
.quote-view-controls { margin-bottom: 1rem; }

.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.page-heading { margin-bottom: 1.55rem; }
.heading-with-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem 0.9rem; }
.section-heading { padding: 1.22rem clamp(1rem, 2.35vw, 1.45rem); border-bottom: 1px solid var(--line); }
.dealer, .section-heading p, .empty p { color: var(--muted); margin-top: 0.3rem; overflow-wrap: anywhere; }
.back { display: inline-block; margin-bottom: 0.9rem; font-size: 0.9rem; font-weight: 650; overflow-wrap: anywhere; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty { padding: clamp(1.5rem, 3vw, 2.6rem); }
.empty .button { margin-top: 0.8rem; }
.notices { margin-bottom: 1.25rem; padding: 0.65rem 0.9rem; background: var(--blue-wash); border: 1px solid var(--light-blue); border-radius: var(--radius); overflow-wrap: anywhere; }
.notice.error { color: #952c23; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.66rem;
  padding: 0.5rem 0.87rem;
  border: 1px solid #c0cfdb;
  border-radius: 0.43rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--blue-wash); }
.button.primary { border-color: var(--navy); background: var(--navy); color: white; }
.button.primary:hover { background: var(--navy-deep); }
.plus { font-size: 1.2em; line-height: 1; font-weight: 500; }
.status { display: inline-block; padding: 0.19rem 0.57rem; border-radius: 999px; font-size: 0.875rem; line-height: 1.35; font-weight: 675; white-space: nowrap; }
.status.draft { background: #edf0f3; color: #465b6b; }
.status.submitted { background: #f7edd9; color: #624719; }
.status.changes { background: #f8e8e3; color: #842f24; }
.status.approved { background: var(--blue-wash); color: #275574; }
.status.released { background: #d6e8f1; color: var(--navy); }

.table-scroll { overflow-x: auto; }
.shop-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); align-items: start; gap: 1rem; }
.shop-job { display: grid; gap: 0.5rem; padding: 1rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.shop-job p, .shop-job h3 { margin: 0; }
.shop-monitor .shop-job { font-size: 1.2rem; }
.shop-edit-form { max-width: none; min-width: 0; }
.shop-edit-form > *, .table-scroll { min-width: 0; }
.schedule-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.55rem; margin: 1rem 0 1.2rem; }
.schedule-day { display: grid; justify-items: start; gap: 0.1rem; padding: 0.68rem 0.85rem; text-decoration: none; }
.schedule-day strong { font-size: 1.35rem; line-height: 1.2; }
.schedule-day small { color: var(--muted); white-space: nowrap; }
.schedule-day[aria-current] { border-color: var(--navy); background: var(--blue-wash); box-shadow: inset 0 -3px var(--navy); }
.schedule-jump { margin: -0.55rem 0 1rem; }
.schedule-jump input { min-height: 2.66rem; min-width: 0; padding: 0.4rem 0.55rem; border: 1px solid #c0cfdb; border-radius: 0.43rem; font: inherit; color: var(--ink); background: var(--surface); }
.schedule-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.15rem; align-items: start; }
.schedule-backlog { margin-top: 1.15rem; }
.schedule-visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.55rem 1.15rem; padding: 1rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.schedule-visit:first-of-type { border-top: 0; }
.schedule-visit > .form-actions { grid-column: 1 / -1; }
.schedule-visit h3 { margin: 0.14rem 0 0.2rem; }
.schedule-brand { display: inline-block; border-radius: 0.32rem; padding: 0.14rem 0.45rem; font-size: 0.77rem; font-weight: 700; background: var(--blue-wash); color: var(--navy); }
.schedule-brand-sunshine { background: #e3f0e8; color: #215744; }
.schedule-brand-millennium { background: #efedf6; color: #504269; }
.schedule-map-controls { padding: 1rem; }
.schedule-map-controls > p { margin-top: 0.55rem; }
.schedule-map-controls button[aria-pressed="true"] { border-color: var(--navy); background: var(--blue-wash); }
.schedule-map-controls button:disabled { opacity: 0.65; cursor: default; }
.route-map { height: clamp(17rem, 37vw, 26rem); color: var(--ink); }
.route-map .route-pin { display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: #174b6b; color: white; font-weight: 700; box-shadow: 0 1px 4px #172f4080; }
.route-map .route-pin-sunshine { background: #287a61; }
.route-map .route-pin-millennium { background: #624c80; }
.route-map .leaflet-popup-content p { margin: 0.25rem 0; overflow-wrap: anywhere; white-space: pre-line; }
.schedule-routes { border-top: 1px solid var(--line); }
.schedule-routes > div { margin-top: 0.55rem; }
.station-task span { flex: 1 1 9rem; align-self: center; }
.opening-more a { display: block; }
.opening-more summary { cursor: pointer; }

@media screen and (max-width: 40rem) {
  .responsive-records, .responsive-records tbody { display: block; width: 100%; min-width: 0; }
  .responsive-records thead { position: absolute; display: block; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .responsive-records tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
  .responsive-records tbody td:not(.wide-cell), .responsive-records tbody th { display: block; min-width: 0; padding: 0.45rem 0.8rem; border: 0; text-align: start; overflow-wrap: anywhere; white-space: normal; }
  .responsive-records tbody td[data-label]:not(.wide-cell)::before { display: block; content: attr(data-label); font-size: 0.8rem; font-weight: 650; color: var(--muted); }
  .responsive-records :is(input, textarea, select) { max-width: 100%; }
  .responsive-records tfoot { display: block; }
  .shop-edit-form .table-scroll { overflow: visible; }
  #shop-progress input:not([type="hidden"]) { width: 100%; min-height: 2.6rem; }
}
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.88rem clamp(0.75rem, 1.8vw, 1.3rem); border-bottom: 1px solid var(--line); vertical-align: top; }
thead { background: var(--blue-wash); }
thead th { color: var(--navy); font-size: 0.875rem; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: var(--field); }
tbody th { font-weight: 650; overflow-wrap: anywhere; }
.queue-meta { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.9rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1.2rem; border-top: 1px solid var(--line); color: var(--muted); }
.pagination > div { display: flex; gap: 0.4rem; }
.compact-meta { display: none; }

.detail-grid, .editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); align-items: start; gap: 1.2rem; }
.opening-table th:first-child { width: 28%; }
.line-item-note { margin: 0.65rem 0 0; font-weight: 400; overflow-wrap: anywhere; }
.opening-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.85rem; margin-top: 0.25rem; font-size: 0.85rem; font-weight: 550; }
.opening-item-actions a, .opening-item-actions button { padding-block: 0.18rem; }
.opening-item-actions button { border: 0; background: transparent; color: var(--navy); padding-inline: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.line-item-attachments { margin-top: 0.55rem; font-weight: 400; }
.line-item-attachments summary { color: var(--navy); cursor: pointer; }
.order-attachments { margin: 1.25rem 0; }
.attachment-list { display: grid; gap: 0.65rem; list-style: none; margin: 0; padding: 1rem 1.25rem; }
.line-item-attachments .attachment-list { padding: 0.65rem 0; }
.attachment-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.6rem; }
.attachment-list li a { min-width: 0; overflow-wrap: anywhere; }
.attachment-size, .attachment-remove { font-size: 0.84rem; }
.attachment-remove { padding: 0.2rem 0.35rem; border: 0; background: transparent; color: var(--navy); cursor: pointer; text-decoration: underline; }
.measurement { white-space: nowrap; font-variant-numeric: tabular-nums; }
.configuration-name { display: block; font-weight: 650; }
.secondary-line { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.875rem; }
.estimate-cell { min-width: 9rem; }
.estimate-cell summary { color: var(--navy); font-weight: 700; cursor: pointer; white-space: nowrap; }
.estimate-cell summary span { color: var(--muted); font-size: 0.875rem; font-weight: 550; text-decoration: underline; }
.estimate-cell details[open] { min-width: 13.5rem; }
.estimate-details { margin: 0.7rem 0 0; font-size: 0.875rem; }
.estimate-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding-block: 0.2rem; border-bottom: 1px solid var(--line); }
.estimate-details dd { margin: 0; text-align: right; }
.estimate-issues { margin: 0.4rem 0 0; padding-inline-start: 1rem; font-size: 0.875rem; color: var(--muted); }
.pending { font-weight: 650; }
.estimate-subtotal { display: grid; gap: 0.25rem; margin-bottom: 1.05rem; padding-bottom: 0.95rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.estimate-subtotal strong { font: 400 2.05rem/1.15 var(--display-font); color: var(--navy); font-variant-numeric: tabular-nums; }
.line-number { display: inline-block; min-width: 1.4rem; margin-right: 0.32rem; border-radius: 0.25rem; background: var(--blue-wash); color: var(--navy); text-align: center; font-size: 0.88rem; font-weight: 650; }
.release-panel { padding: 1.15rem; border-top: 2px solid var(--slate-blue); }
.release-panel p { margin-top: 0.4rem; color: var(--muted); }
.packet-actions { display: grid; gap: 0.45rem; }
.packet-actions > :first-child { margin-top: 1rem; }
.packet-actions button { width: 100%; }
.correction-note, .correction-history { padding: 1rem 1.15rem; overflow-wrap: anywhere; }
.correction-note { margin-bottom: 1.2rem; border-inline-start: 3px solid #a84a3d; }
.correction-note p, .correction-history p { margin-top: 0.45rem; }
.correction-note small { display: block; margin-top: 0.45rem; }
.correction-note small, .correction-history small { color: var(--muted); }
.correction-history { margin-top: 1.2rem; }
.correction-history ol { margin: 0.65rem 0 0; padding-inline-start: 1.25rem; }
.correction-history li + li { margin-top: 0.75rem; }
.correction-history summary { font-weight: 650; cursor: pointer; }
.inventory-history { margin-top: 1.2rem; }
.invoice-summary td, .invoice-summary th:last-child { text-align: right; }
.payment-reference { overflow-wrap: anywhere; }
.rules-editor { max-width: none; }
.publish-rules { display: grid; gap: 0.9rem; margin-top: 1rem; }
.publish-rules label { font-size: 0.94rem; }
.rules-comparison { display: grid; gap: 0.75rem; padding: 1rem 1.15rem; }
.rules-comparison.has-candidate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rule-price { padding: 0.85rem; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); }
.rules-summary { display: flex; flex-wrap: wrap; gap: 1rem 2rem; padding: 1rem 1.15rem; }
.rules-summary div { display: grid; gap: 0.15rem; }
.theme-sunshine {
  --navy: #17362b;
  --navy-deep: #102920;
  --ink: #171f1c;
  --muted: #466256;
  --canvas: #f5faf8;
  --field: #f7fbf9;
  --line: #cfe4db;
  --blue-wash: #eaf6f2;
  --light-blue: #8dd9bf;
  --slate-blue: #74a697;
  --quote-accent: #8dd9bf;
  --focus: #08766e;
  --shadow: 0 4px 18px rgb(23 54 43 / 7%);
  --display-font: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.theme-millennium {
  --navy: #575c70;
  --navy-deep: #383d4e;
  --ink: #262b39;
  --muted: #575c70;
  --canvas: #f5f6f8;
  --field: #f8f9fb;
  --line: #d5d6db;
  --blue-wash: #ecedf0;
  --light-blue: #b1b3bc;
  --slate-blue: #858896;
  --quote-accent: #6dd0e8;
  --focus: #4d5f82;
  --shadow: 0 4px 18px rgb(87 92 112 / 9%);
  --display-font: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.brand-select { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.brand-select a { padding: 0.35rem 0.65rem; color: var(--navy); font-size: 0.9rem; border-radius: 0.35rem; text-decoration: none; }
.brand-select a[aria-current] { background: var(--blue-wash); font-weight: 700; }
.quote-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.15rem; border-top: 3px solid var(--quote-accent, var(--navy)); padding: clamp(1rem, 3vw, 2rem); background: var(--blue-wash); }
.quote-heading p { color: var(--navy); font-weight: 650; margin: 0.25rem 0; }
.quote-document-identity { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.quote-document-mark { padding: 0.55rem 0.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.45rem; }
.quote-document-mark .quote-logo { display: block; width: 10.5rem; max-width: 100%; height: auto; }
.inventory-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; padding: 1rem 1.15rem; }
.inventory-filter label { display: block; margin-bottom: 0.3rem; font-weight: 650; }
.traveler-line + .traveler-line { margin-top: 1.25rem; }
.cut-note { margin-top: 0.25rem; font-size: 0.9em; color: var(--muted); }

.edit-form { display: grid; gap: 1.15rem; max-width: 44rem; padding: clamp(1.05rem, 3vw, 1.85rem); }
.opening-editor { max-width: none; }
.opening-editor [hidden] { display: none; }
.choice-picker { margin-top: 0.45rem; }
.choice-picker > summary { width: fit-content; color: var(--navy); font-size: 0.9rem; font-weight: 650; cursor: pointer; }
.choice-hint { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.85rem; }
[data-illustrated-choice]:has(.choice-picker[open]:not([hidden])) { grid-column: 1 / -1; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 0.55rem; margin-top: 0.55rem; }
.choice-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; min-width: 0; min-height: 2.6rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--surface); color: var(--navy); font: inherit; font-size: 0.85rem; font-weight: 650; cursor: pointer; }
.choice-card:hover, .choice-card[aria-pressed="true"] { border-color: var(--navy); background: var(--blue-wash); }
.choice-card[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--navy); }
.choice-card img { display: block; width: 100%; height: 5.2rem; object-fit: contain; border-radius: 0.25rem; background: white; }
.shutter-preview-link { display: block; padding: 0.2rem 0; border: 0; background: none; color: var(--navy); font: inherit; font-size: 0.88rem; font-weight: 650; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.shutter-dialog { width: min(46rem, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.shutter-dialog::backdrop { background: rgb(15 30 43 / 66%); }
.shutter-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); }
.shutter-dialog-header h2 { margin: 0; }
.shutter-dialog-body { padding: 0.8rem clamp(0.8rem, 3vw, 1.1rem) 1rem; }
.shutter-dialog-body > p { margin: 0 0 0.6rem; color: var(--muted); }
.shutter-dialog figure { margin: 0; }
.shutter-dialog canvas { display: block; width: min(100%, 59vh); height: auto; margin-inline: auto; border-radius: 0.5rem; }
.shutter-dialog figcaption { display: grid; gap: 0.2rem; margin-top: 0.65rem; color: var(--muted); overflow-wrap: anywhere; }
.shutter-dialog figcaption strong { color: var(--ink); }
.optional-opening-options { padding-block: 0.7rem; border-top: 1px solid var(--line); }
.optional-opening-options summary { cursor: pointer; color: var(--navy); font-weight: 650; }
.optional-opening-fields { margin-top: 0.8rem; }
.opening-calculations { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.85rem; }
.opening-calculations[aria-busy="true"] dl { opacity: 0.65; }
.constraint-warning { padding: 0.85rem; border: 1px solid #b8a26c; border-radius: var(--radius); background: #fff8e4; color: #41330f; }
.constraint-warning p, .constraint-warning ul { margin-top: 0.5rem; }
.constraint-approval { display: block; padding-bottom: 0.65rem; font-size: 0.92rem; }
.edit-form label { display: block; font-weight: 650; margin-bottom: 0.38rem; }
.edit-form input:not([type="checkbox"]):not([type="radio"]), .edit-form select, .edit-form textarea,
.inventory-filter input, .inventory-filter select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #a6bbca;
  border-radius: 0.43rem;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
.edit-form input[aria-invalid="true"], .edit-form select[aria-invalid="true"], .edit-form textarea[aria-invalid="true"] { border-color: #a82720; }
.edit-form textarea { display: block; resize: vertical; }
.edit-form fieldset { min-width: 0; margin: 0; padding: 0.72rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--field); }
.edit-form legend { padding-inline: 0.2rem; font-weight: 690; }
.dimension-inputs, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.dimension-inputs label { font-size: 0.875rem; }
.form-section { display: grid; gap: 0.8rem; padding-top: 0.95rem; border-top: 1px solid var(--line); }
.fulfillment-choices label { display: flex; align-items: baseline; gap: 0.55rem; padding-block: 0.25rem; }
.fulfillment-choices input { accent-color: var(--navy); flex: 0 0 auto; }
#delivery-fee-preview { margin-block: 0.5rem 0.8rem; font-weight: 650; }
.queue-total { text-align: right; font-variant-numeric: tabular-nums; }
td.queue-total { white-space: nowrap; }
.fulfillment-summary { display: grid; gap: 0.35rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; padding-top: 0.65rem; }
.errorlist { margin: 0.3rem 0; padding: 0; list-style: none; color: #952c23; font-size: 0.9rem; }
.opening-preview { overflow: hidden; }
.opening-preview img { display: block; width: 100%; height: auto; max-height: 12rem; aspect-ratio: 3 / 2; object-fit: cover; object-position: 68% 50%; background: var(--blue-wash); }
.opening-preview-body { padding: 1.12rem; }
.opening-preview dl { margin: 0.7rem 0 0; }
.opening-preview dl > div { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; padding-block: 0.48rem; border-bottom: 1px solid var(--line); }
.opening-preview dl > div:last-child { border: 0; }
.opening-preview dt { color: var(--muted); font-size: 0.9rem; }
.opening-preview dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }

@media (max-width: 75rem) {
  .stage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .release-panel { max-width: 30rem; }
}
@media (max-width: 63rem) {
  .app-shell { grid-template-columns: 11.25rem minmax(0, 1fr); }
  .order-hero-copy { max-width: min(100%, 20rem); }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .opening-preview { max-width: 33rem; }
}
@media (max-width: 48rem) {
  .schedule-layout { grid-template-columns: minmax(0, 1fr); }
  .crm-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .app-shell { display: block; }
  .site-header { position: static; height: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.45rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); }
  .brand { margin: 0; padding: 0; }
  .brand img { height: 3.4rem; }
  .primary-nav { display: flex; flex-wrap: wrap; }
  .primary-nav a { min-height: 2.55rem; color: var(--navy); }
  .primary-nav a:hover { background: var(--field); color: var(--navy-deep); }
  .primary-nav a[aria-current] { background: var(--blue-wash); border-color: var(--line); color: var(--navy); }
  .utility-bar { min-height: 3.6rem; }
  .order-hero { min-height: 12.75rem; }
  .order-hero-copy { max-width: min(100%, 17rem); }
  .order-hero-photo { left: 35%; opacity: 0.82; }
}
@media (max-width: 44rem) {
  .sales-header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .sales-header-branded { grid-template-columns: minmax(0, 1fr) auto auto; }
  .sales-header .global-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
}
@media (max-width: 35rem) {
  .schedule-heading h1 { font-size: 1.9rem; }
  .schedule-jump label { width: 100%; }
  .schedule-week { gap: 0.24rem; }
  .schedule-day { justify-items: center; padding: 0.45rem 0.1rem; }
  .schedule-day strong { font-size: 1.05rem; }
  .schedule-day small { font-size: 0.63rem; white-space: normal; text-align: center; }
  .schedule-visit { grid-template-columns: minmax(0, 1fr); }
  .site-header { flex-wrap: wrap; }
  .primary-nav a { gap: 0.4rem; padding-inline: 0.45rem; font-size: 0.9rem; }
  .workspace-name { display: none; }
  .global-search { width: 100%; }
  .order-hero-photo { left: 25%; opacity: 0.42; }
  .order-hero h1 { font-size: 2.55rem; }
  .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .stage-card { min-height: 5.4rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .rules-comparison.has-candidate { grid-template-columns: minmax(0, 1fr); }
  th, td { padding-inline: 0.75rem; }
  .queue-meta { width: 100%; }
  .queue-table, .opening-table { table-layout: fixed; }
  .queue-table th:first-child { width: 43%; }
  .queue-table .queue-total { width: 28%; }
  .queue-table .queue-dealer { display: none; }
  .queue-table th, .queue-table td { padding-inline: 0.55rem; overflow-wrap: anywhere; }
  .wide-cell, .wide-label { display: none; }
  .compact-meta { display: block; margin-top: 0.23rem; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
  .compact-meta.compact-label { margin: 0; color: inherit; font-weight: inherit; }
  .opening-table th:first-child { width: 51%; }
  .estimate-cell, .estimate-cell details[open] { min-width: 0; }
  .estimate-cell summary { white-space: normal; }
  .estimate-details > div { flex-wrap: wrap; gap: 0.15rem 0.5rem; }
  .inventory-filter > div:first-child { width: 100%; }
}
@media print {
  body { background: white; }
  .site-header, .utility-bar, .print-hidden, .notices, .skip-link { display: none; }
  .app-shell { display: block; }
  .workspace { width: 100%; padding: 0; }
  .panel { box-shadow: none; }
  .quote-document-heading { break-inside: avoid; border-top-color: var(--navy); background: white; }
  .quote-document-mark { border: 0; padding: 0; }
  .traveler-line + .traveler-line { break-before: page; }
  .traveler-line .section-heading, .traveler-line tr { break-inside: avoid; }
  .traveler-line .table-scroll { overflow: visible; }
  .traveler-line th, .traveler-line td { padding: 0.3rem; font-size: 10pt; }
}

