/* Scope Control — High-Vis Field Command */

@media screen {
  :root {
    color-scheme: light;
    --carbon: #0c0d0f;
    --carbon-soft: #15171a;
    --carbon-muted: #24272b;
    --bone: #efe9df;
    --bone-light: #f8f5ee;
    --signal: #ffd400;
    --signal-deep: #8c6f00;
    --signal-pale: #fff7c2;
    --ink: #111214;
    --forest: #0c0d0f;
    --pine: #15171a;
    --pine-soft: #24272b;
    --mint: #ffd400;
    --mint-deep: #8c6f00;
    --mint-pale: #fff7c2;
    --ivory: #efe9df;
    --paper: #f8f5ee;
    --white: #ffffff;
    --gold: #ffd400;
    --gold-pale: #fff7c2;
    --text: #181a1d;
    --muted: #6f7275;
    --muted-light: #aeb1b4;
    --line: #d1c9bd;
    --line-dark: rgba(255, 255, 255, 0.12);
    --warning: #9a6000;
    --warning-pale: #fff5d6;
    --shadow-sm: 0 8px 22px rgba(12, 13, 15, 0.08);
    --shadow-md: 0 24px 65px rgba(0, 0, 0, 0.3);
    --radius-sm: 5px;
    --radius: 7px;
    --radius-lg: 10px;
    --sidebar-width: 290px;
  }

  body {
    background: var(--carbon);
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 3px;
  }

  .app-shell {
    background: var(--carbon);
  }

  .sidebar {
    width: var(--sidebar-width);
    padding: 30px 18px 24px;
    color: var(--bone-light);
    background: #090a0b;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
  }

  .brand-lockup {
    gap: 15px;
    padding: 5px 12px 69px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    overflow: hidden;
    background: #000000;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-mark img {
    width: 62px;
    height: 62px;
    object-fit: cover;
  }

  .brand-lockup strong {
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 0.88;
    text-transform: uppercase;
  }

  .brand-lockup small {
    margin-top: 9px;
    color: #a8aaad;
    font-size: 0.59rem;
    line-height: 1.25;
    letter-spacing: 0.08em;
  }

  .primary-nav {
    gap: 8px;
  }

  .nav-item {
    min-height: 68px;
    gap: 17px;
    padding: 13px 18px;
    color: #f2f2f0;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 1.36rem;
    font-weight: 600;
    letter-spacing: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
  }

  .nav-item:hover {
    color: #ffffff;
    background: #17191c;
  }

  .nav-item.is-active {
    color: #08090a;
    background: var(--signal);
    border-color: var(--signal);
    box-shadow: 0 10px 28px rgba(255, 212, 0, 0.16);
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .nav-icon img {
    width: 25px;
    height: 25px;
    filter: invert(1);
    opacity: 1;
  }

  .nav-item.is-active .nav-icon img {
    filter: none;
  }

  .sidebar-card {
    padding: 18px 16px 19px;
    background: transparent;
    border: 0;
    border-left: 3px solid var(--signal);
    border-radius: 0;
  }

  .sidebar-card .eyebrow {
    color: var(--signal);
    font-size: 0.67rem;
  }

  .sidebar-card p {
    color: #b3b5b8;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 1rem;
    line-height: 1.48;
  }

  .sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 7px 0;
    color: #d2d3d4;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .sidebar-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #888b8e;
  }

  .trust-dot {
    width: 7px;
    height: 7px;
    background: #6bd45d;
    box-shadow: none;
  }

  .workspace {
    background: var(--bone);
  }

  .topbar {
    min-height: 82px;
    background: rgba(239, 233, 223, 0.96);
    border-bottom: 1px solid rgba(12, 13, 15, 0.14);
    box-shadow: none;
  }

  .topbar h1,
  .builder-intro h2,
  .page-intro h2,
  .panel-heading h2,
  .section-heading h3 {
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
  }

  .demo-pill {
    color: #55585b;
    background: #f8f5ee;
    border-color: #cbc3b8;
    border-radius: 4px;
  }

  #main-content {
    background: var(--bone);
  }

  .button {
    border-radius: 4px;
  }

  .button-primary,
  .button-mint,
  .button-mint-dark {
    color: #08090a;
    background: var(--signal);
    border-color: var(--signal);
    box-shadow: 0 10px 25px rgba(255, 212, 0, 0.14);
  }

  .button-primary:hover:not(:disabled),
  .button-mint:hover:not(:disabled),
  .button-mint-dark:hover:not(:disabled) {
    color: #08090a;
    background: #ffe14a;
    border-color: #ffe14a;
    box-shadow: 0 12px 30px rgba(255, 212, 0, 0.2);
  }

  .button-secondary {
    border-radius: 4px;
  }

  .button-smart {
    color: #191400;
    background: var(--signal-pale);
    border-color: #d8bd38;
  }

  .text-button,
  .back-button {
    color: #725b00;
  }

  .section-number,
  .suggestion-icon,
  .empty-icon,
  .open-job {
    background: var(--signal);
    border-color: var(--signal);
    border-radius: 4px;
  }

  .step-badge,
  .photo-count {
    color: #5f4c00;
    background: var(--signal-pale);
    border-color: #ddc346;
    border-radius: 4px;
  }

  .photo-capture {
    background: #e5ded2;
    border-color: #c8bfb1;
    border-left: 4px solid var(--signal);
    border-radius: 5px;
  }

  .summary-card,
  .approval-card,
  .confirmation-panel {
    border-top-color: var(--signal);
    border-radius: 6px;
  }

  .summary-card::before {
    background: var(--signal);
  }

  .summary-totals .summary-total dd,
  .approval-card .eyebrow,
  .safety-list span {
    color: var(--signal);
  }

  #view-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 0;
  }

  .command-hero {
    position: relative;
    order: 0;
    display: block;
    min-height: 738px;
    overflow: hidden;
    color: #ffffff;
    background: #0d0f11;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: none;
  }

  .command-hero::after {
    display: none;
  }

  .command-hero-photo {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 0;
    display: block;
    width: 76%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .command-hero .hero-copy {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    display: flex;
    width: 57%;
    max-width: 650px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 22px 22px 43px 40px;
  }

  .command-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--signal);
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 0.83rem;
    letter-spacing: 0.14em;
  }

  .command-hero .eyebrow img {
    width: 19px;
    height: 19px;
    filter: brightness(0) saturate(100%) invert(87%) sepia(98%) saturate(1703%) hue-rotate(3deg) brightness(104%) contrast(102%);
  }

  .command-hero .hero-copy h2 {
    max-width: none;
    margin: 22px 0 0;
    color: #f6f4ed;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: clamp(6.75rem, 9.4vw, 8.7rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 0.95;
    text-transform: uppercase;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.3);
    transform: scaleX(0.86);
    transform-origin: left top;
    width: 116%;
  }

  .command-hero .hero-copy h2 span {
    color: var(--signal);
  }

  .command-hero .hero-copy p {
    display: none;
    max-width: 460px;
    margin: 24px 0 23px;
    color: #c3c5c7;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .command-hero .hero-actions {
    display: block;
    width: min(100%, 400px);
    margin-top: 38px;
  }

  .command-hero .hero-actions .button {
    min-width: 400px;
    min-height: 92px;
    gap: 15px;
    padding: 14px 23px;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border-radius: 5px;
  }

  .command-hero .hero-actions .button-icon {
    width: 30px;
    height: 30px;
  }

  .hero-sequence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: #b8babc;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .hero-sequence b {
    color: var(--signal);
    font-size: 1.1rem;
  }

  .command-hero .hero-visual {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    display: block;
    width: min(60%, 690px);
    padding: 0;
  }

  .command-hero .hero-total {
    min-height: 242px;
    padding: 18px 21px 19px;
    color: #ffffff;
    background: #15171a;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    box-shadow: 0 20px 58px rgba(0, 0, 0, 0.42);
    transform: none;
  }

  .hero-total-heading,
  .hero-total-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .hero-total-heading {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.19);
  }

  .command-hero .hero-total .hero-total-label,
  .command-hero .hero-draft-status {
    color: var(--signal);
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 0.69rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .hero-total-label i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    vertical-align: 1px;
    background: var(--signal);
    border-radius: 50%;
  }

  .command-hero .hero-draft-status {
    padding: 5px 8px;
    color: #15171a;
    background: var(--signal);
    border-radius: 3px;
  }

  .command-hero .hero-draft-status.is-approved {
    background: #6bd45d;
  }

  .hero-job-name {
    padding: 13px 0 15px;
  }

  .hero-job-name b,
  .hero-job-name small {
    display: block;
    font-family: "Barlow Condensed", Inter, sans-serif;
  }

  .hero-job-name b {
    color: #ffffff;
    font-size: 1.43rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .hero-job-name small {
    margin-top: 3px;
    color: #aeb1b4;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .hero-total-value {
    align-items: flex-end;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero-total-value > span {
    align-self: flex-start;
    color: #a4a7aa;
    font-size: 0.61rem;
    letter-spacing: 0.12em;
  }

  .command-hero .hero-total-value > strong {
    margin: 0 auto 0 0;
    color: var(--signal);
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: clamp(4.4rem, 6.3vw, 6.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.78;
  }

  .command-hero .hero-total-status {
    min-width: 120px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
  }

  .command-hero .hero-total-status > img {
    width: 28px;
    height: 28px;
    filter: brightness(0) saturate(100%) invert(87%) sepia(98%) saturate(1703%) hue-rotate(3deg) brightness(104%) contrast(102%);
  }

  .command-hero .hero-total-status b {
    color: #ffffff;
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .command-hero .hero-total-status small {
    color: #999da0;
    font-size: 0.59rem;
  }

  .field-flow-strip {
    display: grid;
    order: 1;
    min-height: 112px;
    grid-template-columns: 1.22fr 1fr 1fr;
    overflow: hidden;
    background: #141619;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    margin-inline: 20px;
  }

  .field-flow-step {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    color: #ffffff;
    text-align: left;
    background: transparent;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
  }

  .field-flow-photos {
    grid-template-columns: auto minmax(0, 1fr) 145px auto;
  }

  .field-flow-step:last-child {
    border-right: 0;
  }

  .field-flow-step:hover {
    background: #1d2023;
  }

  .field-flow-count {
    color: var(--signal);
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 3.15rem;
    font-weight: 800;
    line-height: 0.8;
  }

  .field-flow-label b,
  .field-flow-label small {
    display: block;
    font-family: "Barlow Condensed", Inter, sans-serif;
  }

  .field-flow-label b {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .field-flow-label small {
    margin-top: 4px;
    color: #a6a9ac;
    font-size: 0.75rem;
    line-height: 1.25;
  }

  .field-flow-icon {
    width: 39px;
    height: 39px;
    filter: brightness(0) saturate(100%) invert(87%) sepia(98%) saturate(1703%) hue-rotate(3deg) brightness(104%) contrast(102%);
  }

  .field-flow-arrow {
    width: 21px;
    height: 21px;
    filter: invert(1);
    opacity: 0.5;
  }

  .field-photo-stack {
    width: 145px;
    height: 72px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 3px;
  }

  .field-photo-stack img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #view-dashboard .setup-alert {
    order: 3;
    min-height: 54px;
    margin: 0;
    padding: 10px 14px;
    color: #171300;
    background: #f3cb00;
    border: 0;
    border-radius: 5px;
    margin-inline: 20px;
  }

  #view-dashboard .setup-alert p {
    color: #4a3e00;
  }

  #view-dashboard .setup-icon {
    color: #171300;
    background: rgba(0, 0, 0, 0.1);
  }

  #view-dashboard .setup-icon img {
    filter: none;
  }

  #view-dashboard .setup-alert .button-secondary {
    color: #ffffff;
    background: #111315;
    border-color: #111315;
  }

  .dashboard-lower-grid {
    display: grid;
    order: 2;
    grid-template-columns: minmax(0, 2.2fr) minmax(250px, 0.8fr);
    gap: 12px;
    margin-inline: 20px;
  }

  #view-dashboard .recent-panel {
    order: initial;
    min-width: 0;
    margin: 0;
    padding: 17px 20px;
    color: #f6f5f1;
    background: #141619;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: none;
  }

  #view-dashboard .panel-heading {
    margin-bottom: 8px;
  }

  #view-dashboard .panel-heading .eyebrow,
  #view-dashboard .text-button {
    color: var(--signal);
  }

  #view-dashboard .panel-heading h2 {
    margin-top: 2px;
    color: #ffffff;
    font-size: 1.25rem;
  }

  #view-dashboard .data-table th,
  #view-dashboard .data-table td {
    padding: 10px 9px;
    color: #d8d9d9;
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  #view-dashboard .data-table th {
    color: #8d9194;
  }

  #view-dashboard .customer-cell strong {
    color: #ffffff;
  }

  #view-dashboard .customer-cell small {
    color: #929598;
  }

  #view-dashboard .data-table tbody tr:hover {
    background: #1d2023;
  }

  #view-dashboard .status-pill {
    border-radius: 3px;
  }

  #view-dashboard .open-job {
    color: #0b0c0d;
    background: var(--signal);
    border-color: var(--signal);
  }

  #view-dashboard .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
  }

  #view-dashboard .stat-card,
  #view-dashboard .stat-card-accent {
    min-height: 105px;
    padding: 15px;
    color: #ffffff;
    background: #141619;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    box-shadow: none;
  }

  #view-dashboard .stat-card-accent::after {
    display: none;
  }

  #view-dashboard .stat-label,
  #view-dashboard .stat-card small,
  #view-dashboard .stat-card-accent .stat-label,
  #view-dashboard .stat-card-accent small {
    color: #8f9295;
  }

  #view-dashboard .stat-card strong,
  #view-dashboard .stat-card-accent strong {
    margin: 6px 0 2px;
    color: var(--signal);
    font-size: 2rem;
  }

  .mobile-nav {
    background: #111315;
    border-color: rgba(255, 255, 255, 0.14);
    border-radius: 8px;
  }

  .mobile-nav-item.is-active {
    color: var(--signal);
    background: rgba(255, 212, 0, 0.12);
  }

  .mobile-nav-item.is-active img {
    filter: brightness(0) saturate(100%) invert(87%) sepia(98%) saturate(1703%) hue-rotate(3deg) brightness(104%) contrast(102%);
  }

  .mobile-nav-create,
  .mobile-nav-create.is-active {
    color: #0b0c0d;
    background: var(--signal);
  }

  .mobile-nav-create img,
  .mobile-nav-create.is-active img {
    filter: none;
  }

  .quote-header {
    border-bottom-color: var(--signal);
  }

  .quote-scope-summary {
    background: var(--signal-pale);
    border-left-color: var(--signal);
  }
}

@media screen and (max-width: 1180px) {
  :root {
    --sidebar-width: 242px;
  }

  .brand-lockup strong {
    font-size: 1.22rem;
  }

  .brand-lockup small {
    font-size: 0.48rem;
  }

  .nav-item {
    min-height: 58px;
    font-size: 1.08rem;
  }

  .command-hero {
    min-height: 660px;
  }

  .command-hero .hero-actions .button {
    min-width: 320px;
    min-height: 72px;
    font-size: 1.35rem;
  }

  .command-hero .hero-actions {
    margin-top: 0;
  }

  .command-hero .hero-copy p {
    display: block;
  }

  .command-hero-photo {
    width: 88%;
    opacity: 0.76;
  }

  .command-hero .hero-copy {
    width: 72%;
    padding-left: 24px;
  }

  .command-hero .hero-copy h2 {
    font-size: clamp(4.6rem, 8.4vw, 6.25rem);
    transform: none;
    width: auto;
  }

  .command-hero .hero-visual {
    width: calc(100% - 36px);
  }

  .field-flow-strip {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .field-photo-stack {
    display: none;
  }

  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }

  #view-dashboard .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media screen and (max-width: 920px) {
  :root {
    --sidebar-width: 218px;
  }

  .command-hero {
    min-height: 850px;
  }

  .command-hero-photo {
    width: 100%;
    opacity: 0.6;
  }

  .command-hero .hero-copy {
    inset: 0 0 auto 0;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 36px 25px;
  }

  .command-hero .hero-copy h2 {
    font-size: clamp(4.15rem, 10vw, 5.35rem);
  }

  .command-hero .hero-copy p {
    max-width: 420px;
    color: #e1e2e2;
  }

  .command-hero .hero-visual {
    right: 15px;
    bottom: 15px;
    width: calc(100% - 30px);
  }

  .command-hero .hero-total-value {
    flex-wrap: wrap;
  }

  .command-hero .hero-total-status {
    min-width: 104px;
  }

  .field-flow-step {
    gap: 9px;
    padding: 12px 10px;
  }

  .field-flow-photos {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .field-flow-count {
    font-size: 2.45rem;
  }

  .field-flow-icon {
    width: 31px;
    height: 31px;
  }

  .field-flow-arrow {
    display: none;
  }

  .field-flow-label small {
    display: none;
  }

  #view-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 720px) {
  .command-hero {
    min-height: 680px;
    border-radius: 0 0 7px 7px;
  }

  .field-flow-strip,
  .dashboard-lower-grid,
  #view-dashboard .setup-alert {
    margin-inline: 0;
  }

  .command-hero-photo {
    height: 48%;
    opacity: 0.82;
    object-position: 67% center;
  }

  .command-hero .hero-copy {
    padding: 30px 20px;
  }

  .command-hero .eyebrow {
    font-size: 0.68rem;
  }

  .command-hero .hero-copy h2 {
    margin-top: 16px;
    font-size: clamp(3.4rem, 16vw, 4.6rem);
    line-height: 0.8;
  }

  .command-hero .hero-copy p {
    max-width: 340px;
    margin: 17px 0;
    font-size: 0.78rem;
  }

  .command-hero .hero-actions .button {
    min-width: 0;
    width: 100%;
    min-height: 56px;
    padding: 12px 17px;
    font-size: 1.05rem;
  }

  .hero-sequence {
    font-size: 0.7rem;
  }

  .command-hero .hero-visual {
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
  }

  .command-hero .hero-total {
    padding: 15px;
  }

  .hero-job-name b {
    font-size: 1.05rem;
  }

  .command-hero .hero-total-value > strong {
    width: 100%;
    margin-top: 2px;
    font-size: 3.4rem;
  }

  .command-hero .hero-total-status {
    width: 100%;
    margin-top: 10px;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
  }

  .field-flow-strip {
    min-height: 96px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-flow-step {
    display: flex;
    min-height: 96px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 10px 6px;
    text-align: center;
  }

  .field-flow-count {
    font-size: 2rem;
  }

  .field-flow-icon {
    width: 25px;
    height: 25px;
  }

  .field-flow-label b {
    font-size: 0.73rem;
  }

  #view-dashboard .setup-alert {
    grid-template-columns: auto 1fr;
  }

  #view-dashboard .setup-alert .button {
    grid-column: 1 / -1;
  }

  #view-dashboard .recent-panel {
    padding: 16px 13px;
  }

  #view-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-dashboard .stat-card,
  #view-dashboard .stat-card-accent {
    min-height: 96px;
  }
}

/* v20 — keep each company's primary trade in focus without hiding preserved services. */
.pricebook-heading-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.pricebook-trade-filter {
  display: grid;
  gap: 5px;
  min-width: 190px;
}

.pricebook-trade-filter > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.pricebook-trade-filter select {
  min-height: 42px;
  padding: 8px 34px 8px 11px;
  font-size: 0.76rem;
  font-weight: 600;
}

.pricebook-empty {
  margin-top: 10px;
}

@media screen and (max-width: 720px) {
  .pricebook-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .pricebook-trade-filter,
  .pricebook-heading-actions .button {
    width: 100%;
  }
}

/* Trade-first onboarding */
@media screen {
  #view-setup {
    max-width: 1140px;
    margin: 0 auto;
  }

  .onboarding-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(480px, 1.18fr);
    gap: clamp(36px, 6vw, 76px);
    align-items: start;
    padding: clamp(24px, 5vh, 58px) 0 40px;
  }

  .onboarding-intro {
    padding-top: 18px;
  }

  .onboarding-intro h2 {
    max-width: 520px;
    margin: 12px 0 18px;
    font-size: clamp(3rem, 5vw, 4.7rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 0.93;
  }

  .onboarding-intro > p {
    max-width: 510px;
    margin: 0;
    color: #5e6164;
    font-size: 1rem;
    line-height: 1.65;
  }

  .onboarding-principles {
    margin-top: 36px;
    border-top: 1px solid var(--line);
  }

  .onboarding-principles > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .onboarding-principles > div > b {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #0b0c0d;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--signal);
    border-radius: 4px;
  }

  .onboarding-principles span,
  .onboarding-principles strong,
  .onboarding-principles small {
    display: block;
  }

  .onboarding-principles strong {
    color: #191b1e;
    font-size: 0.91rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .onboarding-principles small {
    margin-top: 4px;
    color: #74777a;
    font-size: 0.77rem;
    line-height: 1.45;
  }

  .onboarding-panel {
    overflow: hidden;
    padding: clamp(24px, 3vw, 34px);
    border-top: 5px solid var(--signal);
    box-shadow: 0 26px 70px rgba(12, 13, 15, 0.16);
  }

  .onboarding-panel-heading {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }

  .onboarding-panel-heading .setup-step {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    place-items: center;
    color: #0b0c0d;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    background: var(--signal);
    border-radius: 5px;
  }

  .onboarding-panel-heading h3 {
    margin: 0;
    color: #181a1d;
    font-family: Inter, sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.25;
  }

  .onboarding-panel-heading p {
    margin: 5px 0 0;
    color: #737679;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .starter-preview {
    margin-top: 24px;
    overflow: hidden;
    color: #f7f6f1;
    background: #111315;
    border: 1px solid #272a2e;
    border-radius: 7px;
  }

  .starter-preview-heading {
    display: flex;
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .starter-preview-heading span,
  .starter-preview-heading strong {
    display: block;
  }

  .starter-preview-heading div > span {
    color: #9da0a4;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.065em;
    text-transform: uppercase;
  }

  .starter-preview-heading strong {
    margin-top: 4px;
    font-size: 0.98rem;
    font-weight: 700;
  }

  #starter-preview-count {
    color: var(--signal);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .starter-preview ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .starter-preview li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px 70px;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .starter-preview li:last-child {
    border-bottom: 0;
  }

  .starter-preview li > span {
    overflow: hidden;
    font-size: 0.79rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .starter-preview li small {
    color: #aeb1b4;
    font-size: 0.68rem;
  }

  .starter-preview li b {
    color: var(--signal);
    font-size: 0.67rem;
    font-weight: 600;
    text-align: right;
  }

  .starter-safety-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--signal-pale);
    border: 1px solid rgba(140, 111, 0, 0.26);
    border-radius: 5px;
  }

  .starter-safety-note img {
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }

  .starter-safety-note p {
    margin: 0;
    color: #4f461d;
    font-size: 0.73rem;
    line-height: 1.5;
  }

  .starter-safety-note strong {
    font-weight: 700;
  }

  .onboarding-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
  }

  .onboarding-actions .button {
    min-width: 235px;
  }

  .business-panel-heading {
    align-items: center;
  }
}

@media screen and (max-width: 980px) {
  .onboarding-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 680px;
    margin: 0 auto;
    padding-top: 14px;
  }

  .onboarding-intro {
    padding-top: 0;
  }

  .onboarding-intro h2 {
    max-width: 600px;
    font-size: clamp(2.8rem, 9vw, 4.2rem);
  }

  .onboarding-principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .onboarding-principles > div {
    grid-template-columns: 30px 1fr;
    padding: 14px 12px;
    border-right: 1px solid var(--line);
  }

  .onboarding-principles > div:first-child {
    padding-left: 0;
  }

  .onboarding-principles > div:last-child {
    padding-right: 0;
    border-right: 0;
  }
}

@media screen and (max-width: 720px) {
  .onboarding-layout {
    gap: 22px;
    padding: 6px 0 104px;
  }

  .onboarding-intro h2 {
    margin-top: 8px;
    font-size: 2.65rem;
  }

  .onboarding-intro > p {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .onboarding-principles {
    display: block;
    margin-top: 24px;
  }

  .onboarding-principles > div,
  .onboarding-principles > div:first-child,
  .onboarding-principles > div:last-child {
    padding: 13px 0;
    border-right: 0;
  }

  .onboarding-panel {
    margin: 0 -2px;
    padding: 20px 16px;
  }

  .onboarding-panel-heading {
    align-items: flex-start;
  }

  .onboarding-panel-heading .setup-step {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 0.65rem;
  }

  .starter-preview-heading,
  .starter-preview li {
    padding-right: 14px;
    padding-left: 14px;
  }

  .starter-preview li {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .starter-preview li b {
    display: none;
  }

  .onboarding-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-actions .button {
    width: 100%;
    min-width: 0;
  }

  .onboarding-actions .text-button {
    min-height: 44px;
    justify-content: center;
  }

  .business-panel-heading {
    align-items: flex-start;
  }

  .business-panel-heading .button {
    min-height: 42px;
  }
}

@media print {
  .command-hero-photo,
  .field-flow-strip {
    display: none !important;
  }
}

/* Operational application layout */
#view-dashboard {
  gap: 14px;
}

#view-dashboard .command-hero {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.78fr);
  gap: 24px;
  margin: 0 20px;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 212, 0, 0.13), transparent 30%),
    linear-gradient(135deg, #101214 0%, #090a0b 72%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

#view-dashboard .command-hero::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: var(--signal);
}

#view-dashboard .command-hero .hero-copy {
  position: static;
  display: flex;
  width: auto;
  max-width: 620px;
  height: auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 4px 0 2px 8px;
}

#view-dashboard .command-hero .hero-copy h2 {
  width: auto;
  max-width: 620px;
  margin: 14px 0 0;
  font-size: clamp(3.4rem, 5.2vw, 5.25rem);
  line-height: 0.9;
  transform: none;
}

#view-dashboard .command-hero .hero-copy p {
  display: block;
  max-width: 540px;
  margin: 15px 0 0;
  color: #c9cbcd;
  font-size: 0.95rem;
  line-height: 1.5;
}

#view-dashboard .command-hero .hero-actions {
  width: auto;
  margin-top: 20px;
}

#view-dashboard .command-hero .hero-actions .button {
  width: auto;
  min-width: 250px;
  min-height: 56px;
  padding: 12px 18px;
  font-size: 1.12rem;
}

#view-dashboard .command-hero .hero-actions .button-icon {
  width: 22px;
  height: 22px;
}

#view-dashboard .hero-sequence {
  margin-top: 13px;
  font-size: 0.72rem;
}

#view-dashboard .command-hero .hero-visual {
  position: static;
  display: block;
  width: auto;
  padding: 0;
}

#view-dashboard .command-hero .hero-total {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 20px;
  background: #181a1d;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: none;
}

#view-dashboard .hero-job-name {
  padding: 14px 0 12px;
}

#view-dashboard .hero-job-name b {
  font-size: 1.28rem;
}

#view-dashboard .hero-total-value {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 10px;
  padding-top: 13px;
}

#view-dashboard .command-hero .hero-total-value > strong {
  width: auto;
  margin: 0;
  font-size: clamp(3rem, 4.6vw, 4.7rem);
  line-height: 0.9;
}

.active-job-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 17px;
}

.active-job-progress > span {
  min-width: 0;
  padding: 10px;
  background: #101214;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
}

.active-job-progress b,
.active-job-progress small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-job-progress b {
  color: var(--signal);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.active-job-progress small {
  margin-top: 2px;
  color: #aeb1b4;
  font-size: 0.68rem;
}

.active-job-open {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 14px;
  color: #0b0c0d;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--signal);
  border: 1px solid var(--signal);
  border-radius: 4px;
  cursor: pointer;
}

.active-job-open img {
  width: 20px;
  height: 20px;
}

.dashboard-actions {
  display: grid;
  order: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 20px;
}

.dashboard-action {
  display: grid;
  min-width: 0;
  min-height: 82px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  color: #ffffff;
  text-align: left;
  background: #141619;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  cursor: pointer;
}

.dashboard-action:hover,
.dashboard-action:focus-visible {
  background: #1d2023;
  border-color: var(--signal);
}

.dashboard-action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--signal);
  border-radius: 5px;
}

.dashboard-action-icon img {
  width: 23px;
  height: 23px;
}

.dashboard-action b,
.dashboard-action small {
  display: block;
  font-family: "Barlow Condensed", Inter, sans-serif;
}

.dashboard-action b {
  font-size: 1.05rem;
  text-transform: uppercase;
}

.dashboard-action small {
  margin-top: 2px;
  color: #a8abad;
  font-size: 0.78rem;
}

.dashboard-action-arrow {
  width: 18px;
  height: 18px;
  filter: invert(1);
  opacity: 0.55;
}

#view-dashboard .dashboard-lower-grid {
  order: 2;
}

/* Guided field workflow */
#view-new .builder-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: 20px;
}

body[data-current-view="new"] .topbar-new {
  display: none;
}

#view-new .builder-main {
  gap: 14px;
}

#view-new .builder-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0 4px;
}

#view-new .builder-intro h2 {
  margin-top: 4px;
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  line-height: 0.95;
}

#builder-stage-title:focus {
  outline: none;
}

#view-new .builder-intro p {
  max-width: 620px;
  margin-top: 8px;
  color: #525558;
  font-size: 0.94rem;
}

.autosave-chip {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: #404345;
  font-size: 0.76rem;
  font-weight: 700;
  background: #f7f4ed;
  border: 1px solid #cbc4b9;
  border-radius: 999px;
}

.autosave-chip i {
  width: 8px;
  height: 8px;
  background: #67c85a;
  border-radius: 50%;
}

.autosave-chip.is-saving i {
  background: var(--signal);
}

.autosave-chip.is-error i {
  background: #c44931;
}

.builder-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: #141619;
  border: 1px solid #2f3235;
  border-radius: 8px;
}

.builder-step {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: #aeb1b4;
  font-family: "Barlow Condensed", Inter, sans-serif;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

button.builder-step {
  cursor: pointer;
}

.builder-step:last-child {
  border-right: 0;
}

.builder-step > span {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  color: #0b0c0d;
  font-weight: 800;
  background: #777b7f;
  border-radius: 50%;
}

.builder-step b {
  overflow: hidden;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.builder-step.is-active {
  color: #0b0c0d;
  background: var(--signal);
}

.builder-step.is-active > span {
  color: var(--signal);
  background: #0b0c0d;
}

.builder-step.is-complete {
  color: #ffffff;
}

.builder-step.is-complete > span {
  background: #67c85a;
}

.builder-step-review {
  opacity: 0.72;
}

.builder-step-panel[hidden] {
  display: none !important;
}

#view-new .form-card {
  padding: 24px;
  border: 1px solid #d7d0c5;
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(40, 34, 23, 0.06);
}

.optional-contact {
  margin-top: 16px;
  border-top: 1px solid #ded8ce;
}

.optional-contact summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3f4244;
  font-weight: 700;
  cursor: pointer;
}

.optional-contact summary span {
  color: #66696b;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.optional-contact-grid {
  padding-top: 6px;
}

.builder-capture-panel {
  flex-direction: column;
}

.builder-capture-panel:not([hidden]) {
  display: flex;
}

.builder-capture-panel .section-heading {
  order: 0;
}

.builder-capture-panel .photo-capture {
  order: 1;
  margin-top: 2px;
}

.builder-capture-panel .photo-empty {
  order: 2;
}

.builder-capture-panel .photo-grid {
  order: 3;
}

.builder-capture-panel .voice-capture {
  order: 4;
  margin-top: 18px;
}

.builder-capture-panel > .field {
  order: 5;
}

.builder-price-panel:not([hidden]) {
  display: grid;
  gap: 14px;
}

.builder-error-summary {
  padding: 12px 14px;
  color: #7b2415;
  font-weight: 700;
  background: #fff0eb;
  border: 1px solid #d78572;
  border-left: 4px solid #b93720;
  border-radius: 5px;
}

.builder-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #e4ddd2;
  border: 1px solid #cec5b7;
  border-radius: 8px;
}

.builder-actions #builder-next-button,
.builder-actions #preview-quote-button {
  margin-left: auto;
}

.builder-action-total {
  display: none;
}

#view-new .builder-summary {
  position: sticky;
  top: 102px;
}

#view-new .summary-card {
  box-shadow: 0 18px 38px rgba(31, 28, 22, 0.14);
}

#view-new input[aria-invalid="true"],
#view-new textarea[aria-invalid="true"],
#view-new button[aria-invalid="true"] {
  border-color: #b93720;
  box-shadow: 0 0 0 3px rgba(185, 55, 32, 0.16);
}

#review-prices-button {
  margin: 12px 0;
}

@media screen and (max-width: 1120px) {
  #view-dashboard .command-hero {
    grid-template-columns: 1fr;
  }

  #view-dashboard .command-hero .hero-copy {
    max-width: none;
  }

  #view-dashboard .command-hero .hero-total {
    min-height: 0;
  }

  #view-dashboard .dashboard-actions {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 920px) {
  #view-new .builder-layout {
    grid-template-columns: 1fr;
  }

  #view-new .builder-summary {
    display: none;
  }

  .builder-action-total {
    display: none;
  }
}

@media screen and (max-width: 720px) {
  #view-dashboard .command-hero {
    gap: 16px;
    margin: 0;
    padding: 20px 16px 16px;
    border-radius: 8px;
  }

  #view-dashboard .command-hero .hero-copy {
    padding-left: 3px;
  }

  #view-dashboard .command-hero .hero-copy h2 {
    margin-top: 10px;
    font-size: clamp(2.8rem, 13vw, 3.6rem);
    line-height: 0.88;
  }

  #view-dashboard .command-hero .hero-copy p {
    margin-top: 10px;
    font-size: 0.84rem;
  }

  #view-dashboard .command-hero .hero-actions {
    width: 100%;
    margin-top: 14px;
  }

  #view-dashboard .command-hero .hero-actions .button {
    width: 100%;
    min-width: 0;
  }

  #view-dashboard .hero-sequence {
    display: none;
  }

  #view-dashboard .command-hero .hero-total {
    min-height: 0;
    padding: 15px;
  }

  #view-dashboard .hero-job-name {
    padding: 11px 0;
  }

  #view-dashboard .hero-total-value {
    padding-top: 11px;
  }

  #view-dashboard .command-hero .hero-total-value > strong {
    font-size: 3.15rem;
  }

  .active-job-progress {
    margin-top: 13px;
  }

  .active-job-progress > span {
    padding: 8px;
  }

  .active-job-progress b {
    font-size: 0.9rem;
  }

  #view-dashboard .dashboard-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
  }

  .dashboard-action {
    display: flex;
    min-height: 78px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 8px 5px;
    text-align: center;
  }

  .dashboard-action-icon {
    width: 32px;
    height: 32px;
  }

  .dashboard-action-icon img {
    width: 18px;
    height: 18px;
  }

  .dashboard-action b {
    font-size: 0.78rem;
  }

  .dashboard-action small,
  .dashboard-action-arrow {
    display: none;
  }

  body[data-current-view="new"] #main-content {
    padding-bottom: calc(190px + env(safe-area-inset-bottom));
  }

  #view-new .builder-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  #view-new .builder-intro h2 {
    font-size: 2.55rem;
  }

  #view-new .builder-intro p {
    font-size: 0.86rem;
  }

  .autosave-chip {
    min-height: 32px;
  }

  .builder-step {
    min-height: 56px;
    justify-content: center;
    gap: 5px;
    padding: 7px 3px;
  }

  .builder-step > span {
    width: 25px;
    height: 25px;
    font-size: 0.72rem;
  }

  .builder-step b {
    font-size: 0.72rem;
  }

  #view-new .form-card {
    padding: 18px 16px;
  }

  #view-new .section-heading {
    align-items: flex-start;
  }

  #view-new .section-heading h3 {
    font-size: 1.4rem;
  }

  #view-new .field > span,
  #view-new .photo-device-note,
  #view-new .voice-support {
    color: #4e5153;
  }

  #view-new input,
  #view-new select,
  #view-new textarea,
  #view-new button,
  #view-new .upload-button {
    min-height: 48px;
  }

  #view-new .photo-actions {
    grid-template-columns: 1fr;
  }

  #view-new .line-items-table,
  #view-new .line-items-table tbody,
  #view-new .line-items-table tr,
  #view-new .line-items-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  #view-new .line-items-table thead {
    display: none;
  }

  #view-new .line-items-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px;
    background: #f7f4ed;
    border: 1px solid #cec7bd;
    border-radius: 7px;
  }

  #view-new .line-items-table td {
    padding: 0;
    border: 0;
  }

  #view-new .line-items-table td:first-child {
    grid-column: 1 / -1;
  }

  #view-new .line-items-table td::before {
    display: block;
    margin-bottom: 5px;
    color: #5c5f61;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    content: attr(data-label);
    text-transform: uppercase;
  }

  #view-new .line-items-table td:nth-child(4) {
    align-self: center;
    color: #17191b;
    font-weight: 800;
  }

  #view-new .line-items-table td:nth-child(5) {
    display: flex;
    align-items: flex-end;
  }

  #view-new .remove-line {
    width: 48px;
    height: 48px;
    margin-left: auto;
  }

  .builder-actions {
    position: fixed;
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 21;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
    background: rgba(20, 22, 25, 0.97);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  }

  .builder-actions #save-draft-button {
    display: none;
  }

  .builder-actions #builder-back-button {
    width: 50px;
    min-width: 50px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .builder-actions #builder-back-button .button-icon {
    width: 21px;
    height: 21px;
    margin: auto;
    filter: invert(1);
  }

  .builder-actions #builder-next-button,
  .builder-actions #preview-quote-button {
    width: 100%;
    margin: 0;
  }

  body[data-builder-step="1"] .builder-actions {
    grid-template-columns: 1fr;
  }

  body[data-builder-step="1"] .builder-actions #builder-next-button {
    grid-column: 1 / -1;
  }

  .builder-action-total {
    display: none;
  }

  body[data-builder-step="3"] .builder-actions {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  body[data-builder-step="3"] .builder-action-total {
    display: flex;
    min-width: 82px;
    flex-direction: column;
    justify-content: center;
    padding: 0 6px;
    color: #ffffff;
  }

  .builder-action-total span {
    color: #aeb1b4;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .builder-action-total strong {
    margin-top: 2px;
    color: var(--signal);
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 1.15rem;
  }
}

/* Calm operational typography — brand voice stays bold, work surfaces stay clear. */
@media screen {
  .nav-item,
  .sidebar-card p,
  .sidebar-footer,
  .command-hero .eyebrow,
  .command-hero .hero-actions .button,
  .hero-sequence,
  .command-hero .hero-total .hero-total-label,
  .command-hero .hero-draft-status,
  .hero-job-name b,
  .hero-job-name small,
  .command-hero .hero-total-value > strong,
  .command-hero .hero-total-status b,
  .active-job-progress b,
  .active-job-open,
  .dashboard-action b,
  .dashboard-action small,
  .builder-step,
  .builder-action-total strong,
  #view-dashboard .stat-card strong,
  #view-dashboard .stat-card-accent strong {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  .topbar h1,
  #view-new .builder-intro h2,
  .page-intro h2,
  .panel-heading h2,
  .section-heading h3,
  .approval-card h2 {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-transform: none;
  }

  .nav-item {
    min-height: 54px;
    gap: 14px;
    padding: 11px 15px;
    font-size: 0.94rem;
    font-weight: 600;
  }

  .sidebar-card p {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .sidebar-footer {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.01em;
  }

  .button {
    font-weight: 600;
  }

  .button-primary,
  .button-mint,
  .button-mint-dark,
  .button-smart {
    font-weight: 700;
  }

  .eyebrow,
  .stat-label,
  .data-table th,
  .line-items-table th,
  .optional-contact summary span,
  #view-new .line-items-table td::before,
  .builder-action-total span {
    font-weight: 600;
    letter-spacing: 0.055em;
  }

  #view-dashboard .command-hero .eyebrow {
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.08em;
  }

  #view-dashboard .command-hero .hero-copy h2 {
    max-width: 560px;
    font-size: clamp(3.35rem, 4.4vw, 4.35rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 0.94;
  }

  #view-dashboard .command-hero .hero-copy p {
    max-width: 520px;
    color: #d1d3d4;
    font-size: 0.93rem;
  }

  #view-dashboard .command-hero .hero-actions .button {
    min-width: 224px;
    min-height: 52px;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
  }

  #view-dashboard .hero-sequence {
    color: #aeb1b4;
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: none;
  }

  #view-dashboard .hero-sequence b {
    font-size: 0.84rem;
  }

  #view-dashboard .command-hero .hero-total .hero-total-label,
  #view-dashboard .command-hero .hero-draft-status {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: none;
  }

  #view-dashboard .hero-job-name b {
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    text-transform: none;
  }

  #view-dashboard .hero-job-name small {
    margin-top: 5px;
    color: #aeb1b4;
    font-size: 0.69rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
  }

  #view-dashboard .command-hero .hero-total-value > strong,
  #view-dashboard .stat-card strong,
  #view-dashboard .stat-card-accent strong,
  .builder-action-total strong,
  .job-total-cell {
    font-variant-numeric: tabular-nums;
  }

  #view-dashboard .command-hero .hero-total-value > strong {
    font-size: clamp(2.6rem, 3.7vw, 3.7rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    white-space: nowrap;
  }

  #view-dashboard .command-hero .hero-total-status b {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  .active-job-progress b {
    color: #ffffff;
    font-size: 0.93rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
  }

  .active-job-progress small {
    color: #aeb1b4;
    font-size: 0.66rem;
  }

  .active-job-open {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
  }

  .dashboard-action b {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
  }

  .dashboard-action small {
    font-size: 0.73rem;
    font-weight: 400;
    line-height: 1.35;
  }

  #view-dashboard .panel-heading h2 {
    font-size: 1.14rem;
  }

  #view-dashboard .data-table th {
    font-size: 0.62rem;
    letter-spacing: 0.055em;
  }

  #view-dashboard .customer-cell strong,
  #view-dashboard .job-total-cell {
    font-weight: 700;
  }

  #view-dashboard .status-pill {
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  #view-dashboard .stat-label {
    letter-spacing: 0.045em;
  }

  #view-dashboard .stat-card strong,
  #view-dashboard .stat-card-accent strong {
    font-size: 1.72rem;
    font-weight: 700;
    letter-spacing: -0.035em;
  }

  #view-dashboard .stat-card strong {
    color: #ffffff;
  }

  #view-dashboard .stat-card-accent strong {
    color: var(--signal);
  }

  #view-new .builder-intro h2 {
    font-size: clamp(2rem, 3vw, 2.65rem);
    line-height: 1.02;
  }

  .approval-card h2 {
    font-size: 1.42rem;
    line-height: 1.16;
  }

  .builder-step {
    font-weight: 600;
  }

  .builder-step > span {
    font-weight: 700;
  }

  .builder-step b {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  .builder-action-total strong {
    font-weight: 700;
    letter-spacing: -0.025em;
  }
}

@media screen and (max-width: 720px) {
  #view-dashboard .command-hero .hero-copy h2 {
    max-width: 330px;
    font-size: clamp(2.55rem, 12vw, 3.05rem);
    line-height: 0.94;
  }

  #view-dashboard .command-hero .hero-actions .button {
    min-height: 54px;
    font-size: 0.9rem;
  }

  #view-dashboard .command-hero .hero-total-value > strong {
    font-size: clamp(2.25rem, 11vw, 2.7rem);
  }

  .dashboard-action b {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  #view-new .builder-intro h2 {
    font-size: 1.95rem;
  }

  .builder-step b {
    font-size: 0.68rem;
  }

  #view-new .line-items-table td::before,
  .builder-action-total span {
    font-weight: 600;
  }
}

/* ---- Pilot-readiness additions (v21) ---- */

.field-optional {
  margin-left: 6px;
  color: #8a867e;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.suggestion-box {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
}

.suggestion-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.suggestion-list:empty {
  display: none;
}

.suggestion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 25, 28, 0.1);
  border-radius: 9px;
}

.suggestion-row label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.suggestion-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--signal);
  flex-shrink: 0;
}

.suggestion-details {
  display: grid;
  gap: 1px;
}

.suggestion-details b {
  font-size: 0.8rem;
  line-height: 1.25;
}

.suggestion-details small {
  color: #6d6961;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.suggestion-flag {
  flex-shrink: 0;
  padding: 3px 8px;
  color: #80612e;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #fdf3dd;
  border: 1px solid #eeddb7;
  border-radius: 999px;
}

.suggestion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.suggestion-footer[hidden] {
  display: none;
}

.suggestion-projected {
  color: #52504a;
  font-size: 0.78rem;
}

.suggestion-projected strong {
  color: var(--ink);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.pricebook-hint {
  margin: 10px 2px 0;
  color: #6d6961;
  font-size: 0.76rem;
  line-height: 1.5;
}

.confirm-feedback {
  margin: 8px 0 0;
  padding: 8px 10px;
  color: #ffd9c9;
  font-size: 0.76rem;
  line-height: 1.45;
  background: rgba(200, 60, 12, 0.28);
  border-radius: 8px;
}

.confirm-feedback[hidden] {
  display: none;
}

.price-row-invalid {
  border-radius: 10px;
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.backup-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(23, 25, 28, 0.1);
}

.backup-section h3 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}

.backup-section > div > p {
  margin: 0 0 12px;
  color: #6d6961;
  font-size: 0.8rem;
  line-height: 1.55;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backup-actions .button {
  margin-top: 0;
}

.backup-meta {
  margin: 12px 0 0;
  color: #8a867e;
  font-size: 0.72rem;
}

.backup-tip {
  margin: 6px 0 0;
  color: #8a867e;
  font-size: 0.72rem;
  line-height: 1.5;
}

.job-actions-cell {
  white-space: nowrap;
}

.delete-job {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-left: 6px;
  place-items: center;
  color: #b4231f;
  background: #fdefee;
  border: 1px solid #f3d9d7;
  border-radius: 9px;
  cursor: pointer;
  vertical-align: top;
}

.delete-job .ui-icon {
  width: 15px;
  height: 15px;
}

.approval-share {
  display: grid;
  gap: 10px;
}

.approval-share[hidden] {
  display: none;
}

.discard-draft {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.62);
}

.discard-draft[hidden] {
  display: none;
}

#view-dashboard .delete-job {
  color: #ff9d8f;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.sidebar-attribution {
  margin: 10px 0 0;
  padding: 0 7px;
  color: #7c7f83;
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topbar-lead {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.topbar-brand {
  display: none;
}

@media (max-width: 720px) {
  .topbar-brand {
    display: block;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    overflow: hidden;
  }

  .topbar-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

@media (max-width: 720px) {
  .topbar {
    background: rgba(10, 11, 13, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
  }

  .topbar h1 {
    color: #ffffff;
  }

  .topbar-kicker {
    color: var(--signal);
  }
}

.logo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.logo-preview {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 4px;
  background: #ffffff;
  border: 1px solid rgba(23, 25, 28, 0.14);
  border-radius: 10px;
}

.logo-preview[hidden] {
  display: none;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#quote-logo {
  object-fit: contain;
  border-radius: 6px;
}

/* Business settings view */
.business-layout {
  max-width: 880px;
}

.business-layout .settings-panel {
  padding: 24px;
}

@media screen and (max-width: 720px) {
  .mobile-nav {
    grid-template-columns: repeat(4, 1fr);
  }
}
