/* ============================================================
   Quote Manager — restyled to match the sliding/rolling configurator
   wizards (wizard-shell.css). Global + version-busted (see index.html)
   so it never gets blocked by scoped-CSS caching, matching door-card.css.
   Covers the page shell (QuoteManager.razor) and the details panel
   (QuoteDetailsPanel.razor); the door cards live in door-card.css.
   ============================================================ */

.qm-wrapper {
  --qm-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Roboto Mono', monospace;
  --qm-raised: linear-gradient(180deg, var(--lxc-surface) 0%, var(--lxc-panel) 160%);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-height: calc(100vh - 150px);
  font-family: var(--lxc-font);
}

/* Shared wizard-style section header (mono, uppercase, ruled). */
.qm-sec-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--qm-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--lxc-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--lxc-soft-border);
  margin-bottom: 14px;
}
.qm-sec-h .qm-sec-actions { margin-left: auto; display: inline-flex; gap: 8px; }

/* ── Sidebar (mirrors the wizard's side rail) ── */
.qm-sidebar {
  width: 300px;
  flex: 0 0 300px;
  align-self: stretch;
  background: var(--qm-raised);
  border: 1px solid var(--lxc-border);
  border-radius: var(--lxc-radius-lg);
  box-shadow: var(--lxc-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .15s ease, flex-basis .15s ease;
}

.qm-sidebar--collapsed { width: 0; flex-basis: 0; border-width: 0; box-shadow: none; }

.qm-sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 52px;
  background: var(--qm-raised);
  border-bottom: 1px solid var(--lxc-border);
}

.qm-sidebar-title {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--lxc-ink);
  white-space: nowrap;
}
/* Brand mark before the title, like the wizard's brand-mark. */
.qm-sidebar-title::before {
  content: "LX";
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--lxc-blue);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qm-sidebar-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.qm-tree { flex: 1; overflow-y: auto; margin: 4px -14px 0; padding: 0 8px; }
.qm-full { width: 100%; }

.qm-expand {
  align-self: flex-start;
  margin-top: 2px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--lxc-blue);
  border-radius: var(--lxc-radius);
  background: var(--lxc-blue);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--lxc-shadow);
}

/* ── Icon button ── */
.qm-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lxc-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.qm-icon-btn:hover { background: var(--lxc-panel); color: var(--lxc-blue); }

/* ── Content ── */
.qm-content { flex: 1; min-width: 0; }

.qm-mobile-detail-bar { display: none; }
.qm-revisions-table { max-width: 100%; overflow-x: auto; }

/* Job header — technical, mono job number chip. */
.qm-jobhead { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.qm-jobname-wrap { min-width: 0; flex: 1; }
.qm-jobname-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qm-jobname { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--lxc-blue); }
.qm-jobnum {
  font-family: var(--qm-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--lxc-muted);
  background: var(--lxc-panel);
  border: 1px solid var(--lxc-border);
  border-radius: 100px;
  padding: 4px 10px;
}

.qm-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.qm-rowclick { cursor: pointer; transition: background .1s; }
.qm-rowclick:hover { background: var(--lxc-panel); }

/* ── Empty state ── */
.qm-empty { max-width: 480px; margin: 7vh auto 0; text-align: center; }
.qm-empty-card {
  background: var(--qm-raised);
  border: 1px solid var(--lxc-border);
  border-radius: var(--lxc-radius-lg);
  box-shadow: var(--lxc-shadow);
  padding: 44px 30px;
}

/* ── Skeleton ── */
.qm-skel { background: var(--lxc-panel); border-radius: var(--lxc-radius-lg); animation: qm-pulse 1.3s ease-in-out infinite; }
@keyframes qm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ============================================================
   Quote details panel (qd-*) — wizard-flavoured hero, stats, actions.
   ============================================================ */

.quote-details-panel { font-family: var(--lxc-font); }

.qd-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 300px; }

/* Hero — gradient raised bar with a coloured status accent, like .wiz-top. */
.qd-hero {
  background: var(--qm-raised);
  border: 1px solid var(--lxc-border);
  border-radius: var(--lxc-radius-lg);
  box-shadow: var(--lxc-shadow);
  border-top: 3px solid var(--lxc-border-strong);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.qd-hero--draft { border-top-color: #94A3B8; }
.qd-hero--pendingapproval { border-top-color: var(--lxc-pending); }
.qd-hero--senttocustomer { border-top-color: var(--lxc-blue); }
.qd-hero--accepted { border-top-color: var(--lxc-success); }
.qd-hero--rejected { border-top-color: var(--lxc-danger); }

.qd-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.qd-name { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.02em; color: var(--lxc-blue); }
.qd-qnum {
  font-family: var(--qm-mono);
  font-size: 11px;
  color: var(--lxc-muted);
  margin-top: 3px;
  letter-spacing: .02em;
}

.qd-iconbtn { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--lxc-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qd-iconbtn:hover { background: var(--lxc-panel); color: var(--lxc-blue); }

.qd-status-wrap { display: flex; align-items: center; gap: 8px; position: relative; }
.qd-menu-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--lxc-panel); color: var(--lxc-btn-fg);
  border: 1px solid var(--lxc-border); border-radius: var(--lxc-radius);
  padding: 6px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--qm-mono); text-transform: uppercase; letter-spacing: .04em;
}
.qd-menu-btn:hover { border-color: var(--lxc-border-strong); }
.qd-menu {
  position: absolute; top: 100%; right: 0; margin-top: 6px; min-width: 190px;
  background: var(--lxc-surface); border: 1px solid var(--lxc-border);
  border-radius: var(--lxc-radius); box-shadow: var(--lxc-shadow-hover);
  overflow: hidden; z-index: 30; padding: 4px;
}
.qd-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 11px;
  border: 0; border-radius: var(--lxc-radius-sm); background: transparent;
  font-size: 13px; color: var(--lxc-ink); cursor: pointer;
}
.qd-menu button:hover:not(:disabled) { background: var(--lxc-panel); }
.qd-menu button:disabled { color: var(--lxc-muted); opacity: .5; cursor: default; }

/* Stats row — wizard .stat boxes with mono labels. */
.qd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.qd-stat { background: var(--lxc-panel); border: 1px solid var(--lxc-soft-border); border-radius: var(--lxc-radius); padding: 10px 12px; }
.qd-stat .lab { font-family: var(--qm-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--lxc-muted); }
.qd-stat .val { font-size: 16px; font-weight: 700; color: var(--lxc-ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.qd-stat .val.price { font-size: 19px; color: var(--lxc-blue); }

/* Action bar. */
.qd-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 16px; }
.qd-spacer { flex: 1; }
.qd-coming-soon-group { display: inline-flex; align-items: center; gap: 8px; }

/* Door grid + empty/skeleton. */
.qd-doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: stretch; }
.qd-empty-doors {
  text-align: center; background: var(--qm-raised);
  border: 1px dashed var(--lxc-border); border-radius: var(--lxc-radius-lg); padding: 40px 24px;
}
.qd-skel { height: 220px; background: var(--lxc-panel); border-radius: var(--lxc-radius-lg); animation: qm-pulse 1.3s ease-in-out infinite; }

@media (max-width: 760px) {
  .qm-wrapper { flex-direction: column; }
  .qm-sidebar { width: 100%; flex-basis: auto; }

  .qm-wrapper--job-list .qm-content { display: none; }

  .qm-wrapper--job-detail,
  .qm-wrapper--quote-detail { gap: 10px; }
  .qm-wrapper--job-detail .qm-sidebar,
  .qm-wrapper--job-detail .qm-expand,
  .qm-wrapper--quote-detail .qm-sidebar,
  .qm-wrapper--quote-detail .qm-expand { display: none; }
  .qm-wrapper--job-detail .qm-content,
  .qm-wrapper--quote-detail .qm-content { width: 100%; }
  .qm-wrapper--job-detail .qm-jobhead { display: none; }

  .qm-mobile-detail-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin-bottom: 10px;
    padding: 7px 10px;
    background: var(--qm-raised);
    border: 1px solid var(--lxc-border);
    border-radius: var(--lxc-radius-lg);
    box-shadow: var(--lxc-shadow);
  }

  .qm-mobile-detail-back {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 0 9px 0 5px;
    border: 0;
    border-radius: var(--lxc-radius);
    background: var(--lxc-blue);
    color: #fff;
    font: 700 11px var(--qm-mono);
    cursor: pointer;
  }

  .qm-mobile-detail-title {
    min-width: 0;
    display: grid;
    gap: 1px;
    margin-left: auto;
    text-align: right;
  }

  .qm-mobile-detail-title strong,
  .qm-mobile-detail-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .qm-mobile-detail-title strong {
    color: var(--lxc-ink);
    font-size: 13px;
  }

  .qm-mobile-detail-title span {
    color: var(--lxc-muted);
    font-size: 11px;
  }
}

@media (max-width: 340px) {
  .qm-mobile-detail-back span { display: none; }
  .qm-mobile-detail-back { width: 34px; padding: 0; justify-content: center; }
}

/* New job entry dialog */
.new-job-dialog .mud-dialog-content { padding: 0 24px 12px; background: var(--lxc-bg, #f7f8fa); }
.new-job-dialog .mud-dialog-actions { padding: 14px 24px; border-top: 1px solid var(--lxc-border, #dce1e7); background: var(--lxc-surface, #fff); }
/* Quote workspace: a full-width jobs browser and focused quote workspace. */
.qm-wrapper.qm-quote-workspace { display: block; min-height: 0; height: auto; width: 100%; min-width: 0; margin: 0; color: var(--ds-ink, var(--lxc-ink)); }
.qm-quote-workspace [hidden] { display: none !important; }
.qm-quote-workspace .qm-content { width: 100%; min-width: 0; padding: 0; overflow: visible; }
.qm-quote-workspace .qm-context { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.qm-quote-workspace .qm-breadcrumbs, .qm-quote-workspace .qm-context-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.qm-quote-workspace .qm-breadcrumbs { font-size: 13px; color: var(--ds-muted, var(--lxc-muted)); overflow-wrap: anywhere; }
.qm-quote-workspace .qm-breadcrumbs .mud-icon-root { width: 16px; }
.qm-quote-workspace .qm-text-link { border: 0; background: transparent; color: var(--ds-navy, var(--lxc-blue)); font: inherit; cursor: pointer; min-height: 44px; padding: 6px 0; text-align: left; }
.qm-quote-workspace .qm-quote-switcher { min-width: 0; max-width: 300px; }
.qm-quote-workspace .qm-quote-switcher select { max-width: 100%; min-height: 44px; }
.qm-quote-workspace .qm-job-browser { margin-bottom: 28px; }
.qm-quote-workspace .qm-page-heading, .qm-quote-workspace.qm-wrapper--job-detail .qm-jobhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.qm-quote-workspace .qm-eyebrow { font-size: 12px; color: var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-page-heading h1 { margin: 5px 0 6px; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; font-weight: 600; color: var(--ds-navy, var(--lxc-blue)); overflow-wrap: anywhere; }
.qm-quote-workspace .qm-page-heading p { margin: 0; color: var(--ds-muted, var(--lxc-muted)); font-size: 14px; }
.qm-quote-workspace .qm-jobs-toolbar, .qm-quote-workspace .qm-job-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.qm-quote-workspace .qm-jobs-toolbar { justify-content: space-between; margin-bottom: 12px; }
.qm-quote-workspace .qm-job-search { width: min(100%, 380px); margin: 0; }
.qm-job-grid .qm-jobs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.qm-job-grid .qm-job-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; min-height: 260px; text-align: left; padding: 20px; border: 1px solid var(--ds-line, var(--lxc-border)); border-radius: 14px; background: var(--ds-paper, var(--lxc-surface, #fff)); color: var(--ds-ink, var(--lxc-ink)); font: 14px 'Segoe UI', sans-serif; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 35, 70, .025); overflow-wrap: anywhere; }
.qm-job-grid .qm-job-card { align-items: stretch; }
.qm-job-grid .qm-job-card:hover, .qm-job-grid .qm-job-card--selected { border-color: var(--ds-navy, var(--lxc-blue)); }
.qm-job-grid .qm-job-card-location { color: var(--ds-muted, var(--lxc-muted)); font-size: 12px; }
.qm-job-grid .qm-job-card-name { color: var(--ds-navy, var(--lxc-blue)); font-size: 20px; font-weight: 600; line-height: 1.25; }
.qm-job-grid .qm-job-card-preview { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 100px; margin-block: 5px; padding: 14px; background: var(--ds-stage, var(--lxc-info-bg, #edf4fa)); border-radius: 9px; color: var(--ds-navy, var(--lxc-blue)); }
.qm-job-grid .qm-job-card-preview .mud-icon-root { width: 40px; height: 40px; opacity: .65; }
.qm-job-grid .qm-job-card-reference { color: var(--ds-muted, var(--lxc-muted)); font-size: 12px; }
.qm-job-grid .qm-job-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--ds-line, var(--lxc-border)); padding-top: 13px; font-size: 12px; }
.qm-job-grid .qm-job-card-open { display: flex; align-items: center; gap: 6px; color: var(--ds-navy, var(--lxc-blue)); font-weight: 600; }
.qm-job-grid .qm-job-card-open .mud-icon-root { width: 17px; }
.qm-quote-workspace .qm-job-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.qm-quote-workspace .qm-quotes-surface, .qm-quote-workspace .qm-job-surface { min-width: 0; padding: 22px; border: 1px solid var(--ds-line, var(--lxc-border)); border-radius: 14px; background: var(--ds-paper, var(--lxc-surface, #fff)); }
.qm-quote-workspace .qm-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.qm-quote-workspace .qm-section-heading h2 { margin: 0; color: var(--ds-navy, var(--lxc-blue)); font-size: 18px; font-weight: 600; }
.qm-quote-workspace .qm-section-heading > span { font-size: 12px; color: var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-quote-list { padding: 0; margin: 0; list-style: none; }
.qm-quote-workspace .qm-quote-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 20px; padding: 16px 0; border-top: 1px solid var(--ds-line, var(--lxc-border)); }
.qm-quote-workspace .qm-quote-row-name { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.qm-quote-workspace .qm-quote-name-link { display: block; width: fit-content; max-width: 100%; font: inherit; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ds-ink, var(--lxc-ink)); background: none; border: 0; text-align: left; padding: 0; min-height: 44px; cursor: pointer; overflow-wrap: anywhere; }
.qm-quote-workspace .qm-quote-name-link:hover { color: var(--ds-navy, var(--lxc-blue)); text-decoration: underline; }
.qm-quote-workspace .qm-quote-row-name > span { font-size: 12px; color: var(--ds-muted, var(--lxc-muted)); overflow-wrap: anywhere; }
.qm-quote-workspace .qm-quote-row-price { display: flex; flex-direction: column; gap: 4px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qm-quote-workspace .qm-quote-row-price > span { font-size: 11px; color: var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-quote-row-price > strong { font-size: 17px; font-weight: 600; color: var(--ds-ink, var(--lxc-ink)); }
.qm-quote-workspace .qm-quote-row > button { min-height: 44px; }
.qm-quote-workspace .qm-job-facts { margin: 0; }
.qm-quote-workspace .qm-job-facts > div { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--ds-line, var(--lxc-border)); overflow-wrap: anywhere; }
.qm-quote-workspace .qm-job-facts dt { font-size: 12px; color: var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-job-facts dd { margin: 0; font-size: 14px; }
.qm-quote-workspace .qm-job-help { color: var(--ds-muted, var(--lxc-muted)); font-size: 13px; line-height: 1.6; }
.qm-quote-workspace .qm-empty-quotes, .qm-quote-workspace .qm-load-error { padding: 32px 18px; text-align: center; background: var(--ds-paper, var(--lxc-surface, #fff)); border-radius: 14px; }
.qm-quote-workspace .qm-empty-quotes p, .qm-quote-workspace .qm-load-error p { color: var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-skel--title { height: 90px; margin-bottom: 24px; }
.qm-quote-workspace .qm-skel--doors { height: 260px; margin-bottom: 24px; }
.qm-quote-workspace .qm-skel--details { height: 240px; }
.qm-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.qm-quote-workspace button:focus-visible, .qm-job-grid button:focus-visible { outline: 3px solid var(--ds-navy, var(--lxc-blue)); outline-offset: 3px; }
@media (max-width: 1100px) { .qm-job-grid .qm-jobs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qm-quote-workspace .qm-job-overview { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .qm-job-grid .qm-jobs-grid { grid-template-columns: 1fr; gap: 14px; }
  .qm-job-grid .qm-job-card { padding: 17px; }
  .qm-quote-workspace .qm-page-heading, .qm-quote-workspace.qm-wrapper--job-detail .qm-jobhead { flex-direction: column; }
  .qm-quote-workspace .qm-context-actions, .qm-quote-workspace .qm-quote-switcher { width: 100%; max-width: none; }
  .qm-quote-workspace .qm-quote-switcher select { width: 100%; }
  .qm-quote-workspace .qm-quotes-surface, .qm-quote-workspace .qm-job-surface { padding: 16px; }
  .qm-quote-workspace .qm-quote-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; }
  .qm-quote-workspace .qm-quote-row-name { grid-column: 1 / -1; }
  .qm-quote-workspace .qm-quote-row > .lxc-badge { justify-self: start; }
}

.nj-intro { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding: 8px 2px 18px; }
.nj-intro h2 { margin: 0 0 4px; color: var(--lxc-blue); font-size: 22px; }
.nj-intro p { margin: 0; color: var(--lxc-muted); }
.nj-intro > span { color: var(--lxc-muted); font-size: 12px; white-space: nowrap; padding-top: 6px; }
.nj-section { background: var(--lxc-surface, #fff); border: 1px solid var(--lxc-border); border-radius: var(--lxc-radius-lg, 10px); padding: 20px; margin-bottom: 14px; }
.nj-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.nj-section-head h3 { margin: 0; color: var(--lxc-ink); font-size: 17px; font-weight: 750; }
.nj-section-head p { margin: 2px 0 0; color: var(--lxc-muted); font-size: 13px; }
.nj-step { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 50%; background: var(--lxc-blue); color: #fff; font: 700 12px var(--qm-mono, monospace); }
.nj-grid { display: grid; gap: 14px 16px; }
.nj-grid--2, .nj-grid--address { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nj-span-2 { grid-column: 1 / -1; }
.nj-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nj-choice { position: relative; display: grid; gap: 5px; text-align: left; padding: 17px 18px 17px 48px; min-height: 92px; border: 1px solid var(--lxc-border); border-radius: 9px; background: var(--lxc-surface, #fff); color: var(--lxc-ink); font-family: inherit; cursor: pointer; }
.nj-choice:hover { border-color: var(--lxc-blue); background: var(--lxc-panel, #f7fbff); }
.nj-choice--selected { border: 2px solid var(--lxc-blue); background: var(--lxc-info-bg, #f2f8ff); padding: 16px 17px 16px 47px; }
.nj-choice strong { font-size: 14px; }
.nj-choice small { color: var(--lxc-muted); line-height: 1.4; }
.nj-choice-mark { position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; border: 2px solid var(--lxc-border-strong, #aab4c0); border-radius: 50%; }
.nj-choice--selected .nj-choice-mark { border: 5px solid var(--lxc-blue); }
.nj-shipping { border-top: 1px solid var(--lxc-soft-border, #e8ebef); margin-top: 20px; padding-top: 20px; }
.nj-shipping h4 { margin: 0 0 14px; color: var(--lxc-ink); font-size: 14px; }
.nj-shipping h4:not(:first-child) { margin-top: 20px; }
.nj-same-address { margin-top: 12px; }
.nj-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; }
.nj-pickup-note { display: grid; gap: 4px; margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--lxc-blue); background: var(--lxc-info-bg, #f2f8ff); border-radius: 5px; font-size: 13px; }
.nj-pickup-note span { color: var(--lxc-muted); }
@media (max-width: 700px) {
  .nj-grid--2, .nj-grid--address, .nj-choice-grid, .nj-check-grid { grid-template-columns: 1fr; }
  .nj-span-2 { grid-column: auto; }
  .nj-intro { display: block; }
  .nj-intro > span { display: block; margin-top: 8px; }
  .new-job-dialog .mud-dialog-content { padding-inline: 12px; }
  .nj-section { padding: 16px 14px; }
}
/* Compact jobs and revision lists; keep horizontal scrolling inside the table on narrow screens. */
.qm-quote-workspace .qm-list-scroll { position:relative; box-sizing:border-box; max-width:100%; overflow-x:auto; border:1px solid var(--ds-line, var(--lxc-border)); border-radius:10px; background:var(--ds-paper, var(--lxc-surface)); }
.qm-quote-workspace .qm-data-list { width:100%; min-width:720px; border-collapse:collapse; text-align:left; font-size:13px; color:var(--ds-ink, var(--lxc-ink)); }
.qm-quote-workspace .qm-data-list th { padding:13px 16px; background:var(--ds-soft, var(--lxc-panel)); color:var(--ds-muted, var(--lxc-muted)); font-size:11px; font-weight:600; white-space:nowrap; }
.qm-quote-workspace .qm-data-list td { padding:12px 16px; border-top:1px solid var(--ds-line, var(--lxc-border)); vertical-align:middle; }
.qm-quote-workspace .qm-data-list td:first-child { width:32%; min-width:180px; }
.qm-quote-workspace .qm-data-list tbody tr:hover, .qm-quote-workspace .qm-data-list .qm-list-selected { background:var(--ds-soft, var(--lxc-panel)); }
.qm-quote-workspace .qm-list-clickable { cursor:pointer; }
.qm-quote-workspace .qm-data-list .qm-quote-name-link { text-align:left; font-size:14px; font-weight:600; line-height:1.5; min-height:28px; }
.qm-quote-workspace .qm-list-secondary { display:block; margin-top:2px; font-size:11px; color:var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-list-date { white-space:nowrap; color:var(--ds-muted, var(--lxc-muted)); font-size:12px; }
.qm-quote-workspace .qm-data-list .qm-list-money { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.qm-quote-workspace .qm-list-status { display:inline-block; padding:4px 8px; border-radius:5px; background:var(--ds-soft, var(--lxc-panel)); color:var(--ds-navy, var(--lxc-blue)); font-size:11px; }
.qm-quote-workspace .qm-list-action { text-align:right; white-space:nowrap; }
.qm-quote-workspace .qm-list-action button { min-height:32px; }
.qm-quote-workspace .qm-list-count { color:var(--ds-muted, var(--lxc-muted)); font-size:12px; margin:12px 0; }
.qm-quote-workspace .qm-quotes-surface { padding:0; border:0; border-radius:0; background:transparent; }
.qm-quote-workspace .qm-job-details { padding:16px 20px; border-radius:10px; }
.qm-quote-workspace .qm-job-details summary { cursor:pointer; font-size:14px; font-weight:600; color:var(--ds-ink, var(--lxc-ink)); }
.qm-quote-workspace .qm-job-details summary span { margin-left:12px; font-size:12px; font-weight:400; color:var(--ds-muted, var(--lxc-muted)); }
.qm-quote-workspace .qm-job-details[open] summary { margin-bottom:16px; }
.qm-quote-workspace .qm-job-details .qm-job-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.qm-quote-workspace .qm-list-scroll:focus-visible, .qm-quote-workspace .qm-job-details summary:focus-visible { outline:3px solid var(--ds-navy, var(--lxc-blue)); outline-offset:3px; }
@media(max-width:650px) {
 .qm-quote-workspace .qm-job-details .qm-job-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .qm-quote-workspace .qm-job-details summary span { display:block; margin:5px 0 0; }
}
@media(pointer:coarse) { .qm-quote-workspace .qm-list-action button, .qm-quote-workspace .qm-data-list .qm-quote-name-link { min-height:44px; } }

/* Proposal revision and option cards. */
.qm-proposal-customer { display:block; color:var(--ds-ink,#24445f); font-size:13px; line-height:1.5; margin-top:6px; overflow-wrap:anywhere; }
.qm-proposal-customer strong { font-weight:600; }
.qm-proposal-customer > span { color:var(--ds-muted,#536b80); }
.qm-revision-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr)); gap:18px; align-items:stretch; }
.qm-revision-cards > .qm-revision-card { display:flex; flex-direction:column; min-width:0; box-shadow:0 4px 14px #17324d08; }
.qm-revision-cards .qm-section-heading { flex-wrap:wrap; align-items:center; }
.qm-revision-cards .qm-section-heading h3 { margin:0; font-size:24px; color:var(--lxc-blue,#073c70); }
.qm-revision-cards .qm-option-row { flex-wrap:wrap; gap:4px 12px; overflow-wrap:anywhere; }
.qm-revision-cards .qm-option-row span:last-child { color:var(--lxc-muted,#536b80); font-size:13px; }
.qm-revision-cards .qm-revision-open { margin-top:auto; padding-top:16px; }
.qm-revision-cards .qm-revision-open button { width:100%; }
.qm-revision-card { padding:22px; border:1px solid var(--lxc-border,#d5dfed); border-radius:16px; background:var(--lxc-surface,#fff); }
.qm-revision-cards .qm-revision-card { position:relative; }
.qm-revision-cards .qm-section-heading { padding-right:32px; }
.qm-revision-menu-open { z-index:50; }
.qm-revision-actions { position:absolute; top:16px; right:16px; z-index:42; }
.qm-revision-actions .dc-menu { top:calc(100% + 6px); bottom:auto; }
.qm-revision-actions .dc-menu button { min-height:44px; }
.qm-revision-menu-dismiss { position:fixed; inset:0; z-index:41; border:0; padding:0; background:transparent; cursor:default; }
.qm-revision-latest { border:2px solid var(--lxc-blue,#245aa8); }
.qm-source-badge { display:inline-block; padding:4px 9px; border-radius:20px; background:#dcecff; color:#153e75; font-size:12px; font-weight:650; }
.qm-source-legacy { background:#f1e7cf; color:#6f5115; }
.qm-option-row { display:flex; width:100%; gap:12px; justify-content:space-between; padding:14px 4px; border:0; border-top:1px solid var(--lxc-border,#d5dfed); background:transparent; color:inherit; cursor:pointer; text-align:left; }
.qm-option-row:hover,.qm-option-row:focus-visible { background:var(--lxc-blue-soft,#edf5ff); }
.qm-legacy-door { border-top:1px solid var(--lxc-border,#d5dfed); padding:16px 0; }
.qm-revision-card p { margin:8px 0; }

@media(max-width:650px) {
 .qm-quote-workspace .qm-proposal-table { min-width:0; table-layout:fixed; }
 .qm-quote-workspace .qm-proposal-table th:first-child,
 .qm-quote-workspace .qm-proposal-table td:first-child { width:60%; min-width:0; overflow-wrap:anywhere; }
 .qm-quote-workspace .qm-proposal-table th:nth-child(n+3),
 .qm-quote-workspace .qm-proposal-table td:nth-child(n+3) { display:none; }
 .qm-proposal-table .qm-source-badge { white-space:normal; }
}

/* Read-only Linx estimate: use the same workspace scope as Portal proposals. */
.qm-legacy-proposal { width:100%; max-width:1320px; margin-inline:auto; padding:24px; }
.qm-legacy-proposal .qm-context { margin-bottom:20px; }
.qm-legacy-proposal .qm-page-heading > div { min-width:0; }
.qm-legacy-proposal .qm-page-heading { align-items:center; margin-bottom:18px; }
.qm-legacy-import { flex-shrink:0; min-height:44px; }
.qm-legacy-notice { margin:0 0 24px; padding:14px 18px; border-radius:10px; background:#e7eff8; color:#3e5672; font-size:14px; line-height:1.6; }
.qm-legacy-alert { padding:14px 18px; border:1px solid #e6b8b8; border-radius:10px; color:#8b2020; background:#fff3f3; }
.qm-legacy-revisions { display:grid; gap:24px; }
.qm-legacy-proposal .qm-revision-card { min-width:0; padding:0; overflow:hidden; }
.qm-legacy-latest { border-top:3px solid #245aa8; }
.qm-legacy-revision-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:22px 26px; background:#f8fbff; border-bottom:1px solid #d5dfed; }
.qm-legacy-revision-title { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.qm-legacy-revision-title h2 { margin:0; font-size:22px; line-height:1.3; }
.qm-legacy-proposal .qm-legacy-muted { color:#526780; font-size:13px; line-height:1.5; }
.qm-legacy-total,.qm-legacy-door-price { display:flex; flex-direction:column; gap:5px; text-align:right; flex-shrink:0; font-variant-numeric:tabular-nums; }
.qm-legacy-total > span,.qm-legacy-door-price > span { color:#526780; font-size:12px; }
.qm-legacy-total strong { font-size:25px; font-weight:650; }
.qm-legacy-doors { padding:24px 26px; display:grid; gap:20px; }
.qm-legacy-door-card { min-width:0; border:1px solid #dce5ef; border-radius:12px; padding:22px; }
.qm-legacy-door-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.qm-legacy-door-identity { display:flex; gap:14px; align-items:center; min-width:0; }
.qm-legacy-door-tag { display:grid; place-items:center; flex-shrink:0; min-width:44px; min-height:44px; padding:8px; border-radius:9px; background:#e7eff8; color:#153e75; font-size:20px; font-weight:650; }
.qm-legacy-door-identity h3 { margin:3px 0 0; font-size:18px; line-height:1.35; font-weight:600; overflow-wrap:anywhere; }
.qm-legacy-door-price strong { font-size:19px; }
.qm-legacy-door-facts { display:flex; flex-wrap:wrap; gap:20px 48px; margin:22px 0; padding:16px 0; border-block:1px solid #e5ecf3; }
.qm-legacy-door-facts dt { margin-bottom:5px; font-size:12px; color:#526780; }
.qm-legacy-door-facts dd { margin:0; font-size:14px; font-weight:550; }
.qm-legacy-door-facts dd span { font-weight:400; }
.qm-legacy-specification summary { cursor:pointer; font-size:13px; font-weight:600; min-height:32px; padding-block:7px; }
.qm-legacy-proposal .qm-legacy-specification p { margin:10px 0 0; font-size:14px; line-height:1.75; color:#405570; white-space:pre-line; overflow-wrap:anywhere; }
.qm-legacy-files { margin-top:18px; padding-top:16px; border-top:1px solid #e5ecf3; }
.qm-legacy-files h4 { margin:0 0 6px; font-size:13px; font-weight:600; }
.qm-legacy-files .qm-text-link { display:block; overflow-wrap:anywhere; }
.qm-legacy-proposal :is(a,button,summary):focus-visible { outline:3px solid #245aa8; outline-offset:3px; }
@media(max-width:650px) {
 .qm-legacy-proposal { padding:16px 8px; }
 .qm-legacy-proposal .qm-page-heading { flex-direction:column; align-items:stretch; }
 .qm-legacy-import { width:100%; }
 .qm-legacy-revision-heading { padding:18px 16px; flex-wrap:wrap; }
 .qm-legacy-total { text-align:left; }
 .qm-legacy-doors { padding:16px 12px; }
 .qm-legacy-door-card { padding:16px; }
 .qm-legacy-door-heading { flex-direction:column; gap:16px; }
 .qm-legacy-door-price { text-align:left; }
 .qm-legacy-door-facts { gap:16px 24px; }
}
