
/* Build 155: long-session theme + side-by-side workstation modes */
:root{
  --wb155-page:#eef3f8;
  --wb155-panel:#ffffff;
  --wb155-panel2:#f7f9fd;
  --wb155-input:#ffffff;
  --wb155-text:#13284e;
  --wb155-muted:#65758d;
  --wb155-line:#cfd9e7;
  --wb155-blue:#214aa8;
  --wb155-positive:#16853b;
  --wb155-negative:#b33a19;
}
body{background:var(--wb155-page)}
.workstation-controls{
  position:fixed;right:14px;bottom:14px;z-index:2600;
  display:flex;gap:5px;padding:5px;
  background:rgba(255,255,255,.94);border:1px solid #cbd7e6;border-radius:11px;
  box-shadow:0 5px 18px rgba(15,35,70,.18);backdrop-filter:blur(8px)
}
.workstation-controls button{
  min-width:56px;padding:7px 10px;border-radius:7px;font-size:.72rem;
  background:#f5f8fc;color:#173b78;border:1px solid #b7c6db
}
.workstation-controls button.active{background:#214aa8;color:#fff;border-color:#214aa8}

/* Order-level shipping */
.order-shipping-card{border:1px solid #d5dfec;border-radius:10px;background:#fbfcff;overflow:hidden}
.order-shipping-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;border:0;border-radius:0;background:#f5f8fd;padding:9px 12px}
.order-shipping-toggle>span{display:flex;flex-direction:column;gap:2px}
.order-shipping-toggle strong{color:#173f83;font-size:.76rem}
.order-shipping-toggle small{font-size:.62rem;color:#64748b;font-weight:600}
.order-shipping-toggle>b{font-size:1rem;color:#214aa8}
.order-shipping-body{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px 12px}
.shipping-option{border:1px solid #dbe3ee;border-radius:8px;padding:8px;background:#fff}
.shipping-check{display:flex!important;align-items:center;gap:7px!important;font-weight:800;color:#173f83}
.shipping-check input{width:auto!important}
.shipping-option textarea,.shipping-option input[type="text"]{width:100%;margin-top:6px}
.shipping-option label>span{font-size:.63rem;text-transform:uppercase;font-weight:800;color:#60718a}

/* Compact workstation: retain the engineering grid, shed secondary ink */
body.compact-workstation .app-shell{max-width:none;padding-left:8px;padding-right:8px}
body.compact-workstation .workbench-dashboard{grid-template-columns:minmax(230px,260px) minmax(0,1fr)!important;gap:8px!important}
body.compact-workstation .optical-card{padding:9px!important}
body.compact-workstation .workspace-topbar{padding:10px 14px!important;min-height:64px!important}
body.compact-workstation .workspace-topbar h2{font-size:1.3rem!important}
body.compact-workstation .workspace-parameters{grid-template-columns:185px minmax(170px,1.3fr) 95px 88px minmax(135px,.8fr) minmax(150px,.9fr)!important}
body.compact-workstation .workspace-parameters>div{padding:8px 9px!important}
body.compact-workstation .workspace-parameters strong{font-size:1.12rem!important}
body.compact-workstation .dynamic-designer-grid .design-cell>small,
body.compact-workstation .dynamic-designer-grid .sag-cell em{display:none}
body.compact-workstation .dynamic-designer-grid .design-cell{padding:5px 4px!important}
body.compact-workstation .dynamic-designer-grid .radius-line{gap:3px!important}
body.compact-workstation .final-fp-values>div>small{display:none}
body.compact-workstation .adjustment-guide{display:none}
body.compact-workstation .workspace-footer{justify-content:flex-end!important}
body.compact-workstation .workspace-actions{flex-wrap:wrap;justify-content:flex-end}
body.compact-workstation .optical-note{display:none!important}

/* Focus Mode: workspace owns the window. Optics can pop over it on demand. */
body.focus-mode{overflow-x:hidden}
body.focus-mode .app-shell{max-width:none!important;padding:4px 6px 62px!important}
body.focus-mode .workbench-hero,
body.focus-mode #patient-workbench-bar,
body.focus-mode .top-workbench,
body.focus-mode #lens-features-card,
body.focus-mode .workbench-footer{display:none!important}
body.focus-mode .workbench-dashboard{display:block!important;margin-top:0!important}
body.focus-mode .workspace-card{width:100%!important;margin:0!important}
body.focus-mode .optical-card{
  position:fixed!important;left:10px!important;top:10px!important;z-index:2400!important;
  width:min(310px,calc(100vw - 20px))!important;max-height:calc(100vh - 80px)!important;
  box-shadow:0 12px 36px rgba(0,0,0,.32)!important
}
body.focus-mode .optical-card.focus-hidden{display:none!important}
body.focus-mode .workspace-footer{
  position:sticky;bottom:0;z-index:20;background:rgba(255,255,255,.96);
  border-top:1px solid #d6e0ec;backdrop-filter:blur(8px)
}
body.focus-mode .status{background:rgba(255,255,255,.96)}
body.focus-mode .final-fp-values{margin-bottom:4px}

/* Narrow window treatment. Do not stack the clinical zones; allow controlled horizontal scroll. */
@media(max-width:1080px){
  body:not(.focus-mode) .workbench-dashboard{grid-template-columns:1fr!important}
  body:not(.focus-mode) .optical-card{position:static!important;grid-column:1!important;max-height:none!important}
  .dynamic-designer-wrap{overflow-x:auto!important}
  .dynamic-designer-grid{min-width:760px!important}
  .workspace-parameters{min-width:760px}
  .workspace-card{overflow-x:hidden!important}
}
@media(max-width:780px){
  .order-shipping-body{grid-template-columns:1fr}
  .workstation-controls{right:8px;bottom:8px}
  body.focus-mode .dynamic-designer-grid{min-width:720px!important}
  body.focus-mode .workspace-parameters{min-width:720px}
}

/* Dark mode: preserve clinical green/red/blue meaning rather than inverting colors. */
body.theme-dark{
  color-scheme:dark;
  --blue:#66a8ff;--blue2:#3b82f6;--ink:#e6edf7;--muted:#91a2b8;--line:#2b3d52;
  --wb-line:#2b3d52;--success:#52c97b;--danger:#ff856c;--orange:#ff8d66;
  background:#07111c;color:#e6edf7
}
body.theme-dark .app-shell{background:#07111c}
body.theme-dark .card,
body.theme-dark .patient-workbench-bar,
body.theme-dark .order-review-modal,
body.theme-dark .trial-modal,
body.theme-dark .diameter-modal,
body.theme-dark .lens-comparison-modal{background:#0c1724!important;border-color:#2b3d52!important;color:#e6edf7!important;box-shadow:0 4px 16px rgba(0,0,0,.28)}
body.theme-dark .patient-eye-card,
body.theme-dark .collapsed-lens-summary,
body.theme-dark .parameter-strip,
body.theme-dark .workspace-parameters,
body.theme-dark .optical-inputs,
body.theme-dark .optical-result,
body.theme-dark .optical-applied,
body.theme-dark .review-core-grid>div,
body.theme-dark .profilometry-lab-controls .calculated-design-name,
body.theme-dark .main-vault-row,
body.theme-dark .order-meta-card,
body.theme-dark .order-shipping-card,
body.theme-dark .shipping-option{background:#101d2b!important;border-color:#2b3d52!important;color:#e6edf7!important}
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .unit-input input{
  background:#0a1521!important;color:#eef4fb!important;border-color:#35495f!important
}
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder{color:#71849b!important}
body.theme-dark button:not(.primary-button):not(.workspace-eye-button.active):not(.mode-button.active):not(.feature-mode-buttons .active){
  background:#101d2b;color:#d9e6f5;border-color:#3a5068
}
body.theme-dark button:not(.primary-button):hover{background:#17283a}
body.theme-dark .primary-button{background:#2457c8;border-color:#3973e3}
body.theme-dark .mode-help,
body.theme-dark .eye-gate-note{background:#10233a!important;color:#9db9dc!important;border-color:#3973e3!important}
body.theme-dark .region-peripheral,
body.theme-dark .zone-family-peripheral,
body.theme-dark .dynamic-designer-grid .design-cell.region-peripheral,
body.theme-dark .dynamic-designer-grid .width-output.region-peripheral{background:#0e1b2a!important}
body.theme-dark .region-limbal,
body.theme-dark .zone-family-limbal,
body.theme-dark .dynamic-designer-grid .design-cell.region-limbal,
body.theme-dark .dynamic-designer-grid .width-output.region-limbal{background:#181827!important}
body.theme-dark .region-haptic,
body.theme-dark .zone-family-haptic,
body.theme-dark .dynamic-designer-grid .design-cell.region-haptic,
body.theme-dark .dynamic-designer-grid .width-output.region-haptic{background:#0d211f!important}
body.theme-dark .dg-head,
body.theme-dark .meridian-label,
body.theme-dark .width-label,
body.theme-dark .sag-summary,
body.theme-dark .sag-cell{background:#101b29!important;color:#d7e4f4!important}
body.theme-dark .cell-change-positive,
body.theme-dark .design-cell.adjust-positive,
body.theme-dark .sag-cell.adjust-positive{background:#0d251b!important}
body.theme-dark .cell-change-negative,
body.theme-dark .design-cell.adjust-negative,
body.theme-dark .sag-cell.adjust-negative{background:#2b1713!important}
body.theme-dark .design-cell.adjust-positive .radius-line strong,
body.theme-dark .design-cell.adjust-positive>small,
body.theme-dark .sag-cell.adjust-positive strong,
body.theme-dark .sag-cell.adjust-positive small{color:#58d985!important}
body.theme-dark .design-cell.adjust-negative .radius-line strong,
body.theme-dark .design-cell.adjust-negative>small,
body.theme-dark .sag-cell.adjust-negative strong,
body.theme-dark .sag-cell.adjust-negative small{color:#ff896f!important}
body.theme-dark .inline-adjust button,
body.theme-dark .bc-inline-adjust button{background:#142540!important;color:#79adff!important;border-color:#2e4f7c!important}
body.theme-dark .workspace-parameters .fp-highlight,
body.theme-dark .sag-cell.steepest{background:#10291e!important}
body.theme-dark .workspace-parameters .fp-highlight strong,
body.theme-dark .sag-cell.steepest strong{color:#68da8d!important}
body.theme-dark .current-rx-chip,
body.theme-dark .optical-compact-summary{background:#12223a!important;color:#cfe1ff!important}
body.theme-dark .workstation-controls{background:rgba(9,20,31,.95);border-color:#31465e}
body.theme-dark .workstation-controls button{background:#102030;color:#dbe8f6;border-color:#38516b}
body.theme-dark .workstation-controls button.active{background:#2457c8;color:#fff}
body.theme-dark .workspace-footer,
body.theme-dark .status{background:#0c1724!important}
body.theme-dark .order-shipping-toggle{background:#122033!important;color:#dce8f6}
body.theme-dark .order-shipping-toggle strong{color:#8fbcff}
body.theme-dark .order-shipping-toggle small{color:#91a2b8}
body.theme-dark .feature-block-label,
body.theme-dark .review-zone-line span,
body.theme-dark .review-zone-line small,
body.theme-dark .section-heading p,
body.theme-dark .adjustment-guide{color:#91a2b8!important}
body.theme-dark .review-zone-line,
body.theme-dark .order-card-notes,
body.theme-dark .review-feature-summary{border-color:#2b3d52!important}
body.theme-dark .modal-backdrop{background:rgba(0,0,0,.72)!important}
body.theme-dark .comparison-canvas-wrap svg text{fill:#526986}
body.theme-dark .eye-circle{fill:#0c1724}
body.theme-dark .axis-label{fill:#94a8bf}

/* Never darken generated print/PDF surfaces. */
@media print{
  .workstation-controls{display:none!important}
  body.theme-dark,body.theme-dark .app-shell,body.theme-dark .lab-print-sheet,body.theme-dark .lab-print-page{background:#fff!important;color:#111!important}
  body.theme-dark .lab-print-page *{color:#111}
  body.theme-dark .print-eye-title *{color:#fff!important}
  body.theme-dark .print-hydrapeg{color:#173f83!important}
  .lab-rush-banner{font:900 13px/1.2 Arial,sans-serif;text-align:center;padding:5px 8px;border:2px solid #b42318;color:#b42318!important;margin:5px 0 0;letter-spacing:.03em}
  .lab-ship-patient{display:grid;grid-template-columns:100px 1fr;gap:8px;align-items:start;padding:5px 7px;border:1px solid #aaa;border-top:0;font:8px/1.25 Arial,sans-serif}
  .lab-ship-patient b{font-size:7px}
}


/* Build 156: physical-print legibility pass. Keep bilateral lab order within ~half a Letter page. */
@media print {
  body.print-lab-order .lab-print-page{
    padding:12px 20px 8px!important;
    color:#050505!important;
    max-height:5.25in!important;
    overflow:hidden!important;
  }
  body.print-lab-order .lab-clean-header>div>strong{font-size:14px!important;color:#111!important}
  body.print-lab-order .lab-clean-header>strong{font-size:13px!important;color:#111!important}
  body.print-lab-order .lab-case-five span{font-size:10px!important;padding:5px 7px!important;color:#111!important}
  body.print-lab-order .lab-case-five b{font-size:7.5px!important;color:#222!important}
  body.print-lab-order .lab-eyes{gap:10px!important;margin-top:7px!important}
  body.print-lab-order .print-eye{font-size:9.5px!important;color:#050505!important}
  body.print-lab-order .print-eye-title{padding:5px 7px!important;background:#fff!important;color:#111!important;border-bottom:1.5px solid #555!important}
  body.print-lab-order .print-eye-title h2{font-size:12px!important;color:#111!important}
  body.print-lab-order .print-eye-title small{font-size:8px!important;color:#222!important}
  body.print-lab-order .print-lens-meta>div{padding:4px 5px!important}
  body.print-lab-order .print-lens-meta span,
  body.print-lab-order .print-core span,
  body.print-lab-order .print-notes>span{font-size:7px!important;color:#222!important}
  body.print-lab-order .print-lens-meta strong{font-size:9.5px!important;color:#050505!important}
  body.print-lab-order .print-hydrapeg{font-size:9px!important;color:#111!important}
  body.print-lab-order .print-core>div{padding:4px 5px!important}
  body.print-lab-order .print-core strong{font-size:10.5px!important;color:#050505!important}
  body.print-lab-order .print-zone-table{font-size:9.5px!important;color:#050505!important}
  body.print-lab-order .print-zone-table th,
  body.print-lab-order .print-zone-table td{padding:3.5px 4px!important;border-bottom:1px solid #999!important}
  body.print-lab-order .print-feature-line{font-size:9.5px!important;padding:4px 6px!important;color:#050505!important}
  body.print-lab-order .print-feature-line:before{font-size:7px!important;color:#222!important}
  body.print-lab-order .print-notes{padding:4px 6px!important;min-height:34px!important;font-size:9px!important}
  body.print-lab-order .note-line{height:9px!important;border-color:#888!important}
  body.print-lab-order .lab-rush-banner{
    font:900 16px/1.15 Arial,sans-serif!important;
    padding:6px 8px!important;
    border:3px solid #111!important;
    color:#000!important;
    margin:5px 0 0!important;
    letter-spacing:.055em!important;
  }
  body.print-lab-order .lab-ship-patient{
    grid-template-columns:112px 1fr!important;
    margin-top:6px!important;
    padding:5px 7px!important;
    border:1.5px solid #555!important;
    font:9.5px/1.2 Arial,sans-serif!important;
    color:#050505!important;
  }
  body.print-lab-order .lab-ship-patient b{font-size:8px!important;color:#111!important}
  body.print-lab-order .lab-print-page footer{font-size:7.5px!important;color:#333!important;margin-top:5px!important}
}


/* Build 157: physical lab-sheet hierarchy refinement.
   Labels recede; manufacturing values become the visual target.
   Bilateral lab orders remain constrained to roughly the upper half of Letter paper. */
@media print {
  body.print-lab-order .lab-print-page{
    padding:11px 18px 7px!important;
    max-height:5.25in!important;
    overflow:hidden!important;
  }

  body.print-lab-order .lab-clean-header{
    padding-bottom:4px!important;
  }
  body.print-lab-order .lab-clean-header>div>strong{
    font-size:15px!important;
    color:#111!important;
  }
  body.print-lab-order .lab-clean-header>strong{
    font-size:14px!important;
    color:#111!important;
  }

  /* Order identity */
  body.print-lab-order .lab-case-five span{
    font-size:10.8px!important;
    padding:5px 7px!important;
    color:#080808!important;
    line-height:1.12!important;
  }
  body.print-lab-order .lab-case-five b{
    font-size:7.8px!important;
    color:#666!important;
    font-weight:700!important;
    letter-spacing:.025em!important;
  }

  body.print-lab-order .lab-eyes{
    gap:9px!important;
    margin-top:6px!important;
  }
  body.print-lab-order .print-eye{
    font-size:10.4px!important;
    color:#050505!important;
  }

  /* Eye title */
  body.print-lab-order .print-eye-title{
    padding:5px 7px!important;
    background:#fff!important;
    color:#111!important;
    border-bottom:1.5px solid #555!important;
  }
  body.print-lab-order .print-eye-title h2{
    font-size:12.8px!important;
    line-height:1.08!important;
    color:#111!important;
    font-weight:800!important;
  }
  body.print-lab-order .print-eye-title small{
    font-size:8.7px!important;
    color:#555!important;
    font-weight:700!important;
  }

  /* Manufacturing labels are quiet; values are prominent. */
  body.print-lab-order .print-lens-meta>div{
    padding:4px 5px!important;
    min-height:31px!important;
  }
  body.print-lab-order .print-lens-meta span,
  body.print-lab-order .print-core span,
  body.print-lab-order .print-notes>span{
    font-size:7.7px!important;
    color:#6b6b6b!important;
    font-weight:700!important;
    letter-spacing:.02em!important;
  }
  body.print-lab-order .print-lens-meta strong{
    font-size:10.8px!important;
    line-height:1.08!important;
    color:#000!important;
    font-weight:800!important;
  }
  body.print-lab-order .print-hydrapeg{
    font-size:10.5px!important;
    color:#000!important;
    font-weight:900!important;
  }

  body.print-lab-order .print-core>div{
    padding:4px 5px!important;
    min-height:31px!important;
  }
  body.print-lab-order .print-core strong{
    font-size:12px!important;
    line-height:1.05!important;
    color:#000!important;
    font-weight:900!important;
  }

  /* Zone row labels identify; radii are the manufacturing target. */
  body.print-lab-order .print-zone-table{
    font-size:10.7px!important;
    color:#050505!important;
  }
  body.print-lab-order .print-zone-table thead th{
    font-size:8.2px!important;
    color:#666!important;
    font-weight:700!important;
  }
  body.print-lab-order .print-zone-table tbody th{
    font-size:9.5px!important;
    color:#555!important;
    font-weight:700!important;
  }
  body.print-lab-order .print-zone-table tbody td{
    font-size:11px!important;
    color:#000!important;
    font-weight:800!important;
  }
  body.print-lab-order .print-zone-table th,
  body.print-lab-order .print-zone-table td{
    padding:3.6px 4px!important;
    border-bottom:1px solid #aaa!important;
  }

  body.print-lab-order .print-feature-line{
    font-size:10.7px!important;
    line-height:1.16!important;
    padding:4px 6px!important;
    color:#000!important;
    font-weight:800!important;
  }
  body.print-lab-order .print-feature-line:before{
    font-size:7.7px!important;
    color:#666!important;
    font-weight:700!important;
  }

  body.print-lab-order .print-notes{
    padding:4px 6px!important;
    min-height:28px!important;
    font-size:10.5px!important;
    line-height:1.15!important;
    color:#000!important;
  }
  body.print-lab-order .print-notes p{
    font-size:10.5px!important;
    font-weight:700!important;
    color:#000!important;
    margin:2px 0!important;
  }
  body.print-lab-order .note-line{
    height:7px!important;
    border-color:#999!important;
  }

  /* Rush should be obvious from arm's length. */
  body.print-lab-order .lab-rush-banner{
    font:900 17px/1.1 Arial,sans-serif!important;
    padding:6px 8px!important;
    border:3px solid #000!important;
    color:#000!important;
    margin:5px 0 0!important;
    letter-spacing:.065em!important;
  }

  /* Final instruction at bottom of the half-sheet order. */
  body.print-lab-order .lab-ship-patient{
    grid-template-columns:118px 1fr!important;
    margin-top:6px!important;
    padding:5px 7px!important;
    border:1.5px solid #555!important;
    font:10.8px/1.18 Arial,sans-serif!important;
    color:#000!important;
  }
  body.print-lab-order .lab-ship-patient b{
    font-size:8px!important;
    color:#666!important;
    font-weight:800!important;
  }
  body.print-lab-order .lab-ship-patient span{
    font-size:10.8px!important;
    color:#000!important;
    font-weight:800!important;
  }

  body.print-lab-order .lab-print-page footer{
    font-size:7.2px!important;
    color:#666!important;
    margin-top:4px!important;
  }
}

/* Build 158: lab-order scan hierarchy.
   Enlarge only the values the lab must act on; keep labels and peripheral system quiet. */
@media print {
  /* Lens identity must be obvious before the tech reads geometry. */
  body.print-lab-order .print-eye-title h2{
    font-size:14.2px!important;
    line-height:1.08!important;
    font-weight:900!important;
  }
  body.print-lab-order .print-lens-meta>div:first-child strong{
    font-size:12.8px!important;
    line-height:1.05!important;
    font-weight:900!important;
  }

  /* Critical lens geometry: BC, Power, Diameter/OAD, OZ and FP Sag. */
  body.print-lab-order .print-core>div:nth-child(1) strong,
  body.print-lab-order .print-core>div:nth-child(2) strong,
  body.print-lab-order .print-core>div:nth-child(3) strong,
  body.print-lab-order .print-core>div:nth-child(4) strong,
  body.print-lab-order .print-core>div:nth-child(6) strong{
    font-size:14.4px!important;
    line-height:1!important;
    font-weight:900!important;
  }
  /* Offset remains useful but is not allowed to compete with the core manufacturing values. */
  body.print-lab-order .print-core>div:nth-child(5) strong{
    font-size:11.2px!important;
  }

  /* Peripheral curve system stays intentionally compact/reference-level. */
  body.print-lab-order .print-zone-table thead th{font-size:7.8px!important}
  body.print-lab-order .print-zone-table tbody th{font-size:8.8px!important}
  body.print-lab-order .print-zone-table tbody td{font-size:9.6px!important;font-weight:700!important}
  body.print-lab-order .print-zone-table th,
  body.print-lab-order .print-zone-table td{padding:3px 4px!important}

  /* Programmed add-ons are manufacturing instructions, not footnotes. */
  body.print-lab-order .print-feature-line{
    font-size:12.4px!important;
    line-height:1.16!important;
    font-weight:900!important;
    padding:5px 6px!important;
  }
  body.print-lab-order .print-feature-line span{display:block!important;margin:1px 0!important}

  /* Free-text notes must survive a quick tray scan. */
  body.print-lab-order .print-notes p{
    font-size:12px!important;
    line-height:1.15!important;
    font-weight:800!important;
  }

  /* Shipping address is a final-action instruction. */
  body.print-lab-order .lab-ship-patient{
    font-size:12px!important;
    line-height:1.16!important;
  }
  body.print-lab-order .lab-ship-patient span{
    font-size:12px!important;
    font-weight:900!important;
  }
}

/* Build 159: unified AccuLens lab-order print language, modeled on the Profilometry Designer order. */
@media print {
  body.print-lab-order .lab-print-page{width:100%!important;max-width:none!important;padding:0 5mm!important;font-family:Arial,sans-serif!important}
  body.print-lab-order .lab-clean-header{border-bottom:2px solid #234da8!important;padding:3px 0 6px!important;margin-bottom:0!important}
  body.print-lab-order .lab-clean-header>div>strong{font-size:15px!important;color:#173f98!important}
  body.print-lab-order .lab-clean-header>strong{font-size:12px!important;color:#111!important}
  body.print-lab-order .lab-case-unified{display:grid!important;grid-template-columns:1.25fr 1.25fr 1fr .75fr!important;border:1px solid #777!important;border-top:0!important}
  body.print-lab-order .lab-case-unified span{display:flex!important;flex-direction:column!important;gap:2px!important;padding:7px 8px!important;border-right:1px solid #999!important;min-height:36px!important}
  body.print-lab-order .lab-case-unified span:last-child{border-right:0!important}
  body.print-lab-order .lab-case-unified b{font-size:7.5px!important;color:#666!important;font-weight:700!important;letter-spacing:.02em!important}
  body.print-lab-order .lab-case-unified strong{font-size:12px!important;line-height:1.05!important;color:#050505!important;font-weight:900!important}
  body.print-lab-order .lab-order-type.exchange strong{font-size:13px!important;color:#111!important}
  body.print-lab-order .lab-eyes{gap:10px!important;margin-top:8px!important;align-items:start!important}
  body.print-lab-order .print-eye{border:1px solid #777!important}
  body.print-lab-order .print-eye-title{background:#234da8!important;color:#fff!important;border:0!important;padding:7px 9px!important;min-height:32px!important}
  body.print-lab-order .print-eye-title h2{font-size:13.5px!important;line-height:1.08!important;color:#fff!important;font-weight:900!important}
  body.print-lab-order .print-eye-title small{font-size:8.5px!important;color:#fff!important;font-weight:700!important}
  body.print-lab-order .print-lens-meta{min-height:58px!important}
  body.print-lab-order .print-lens-meta>div{padding:7px 6px!important}
  body.print-lab-order .print-lens-meta span{font-size:7.5px!important;color:#666!important;margin-bottom:3px!important}
  body.print-lab-order .print-lens-meta strong{font-size:10.5px!important;line-height:1.1!important;color:#050505!important;font-weight:900!important}
  body.print-lab-order .print-lens-meta>div:first-child strong{font-size:12px!important}
  body.print-lab-order .print-core{min-height:62px!important}
  body.print-lab-order .print-core>div{padding:8px 7px 9px!important}
  body.print-lab-order .print-core span{font-size:7.5px!important;color:#666!important;margin-bottom:4px!important}
  body.print-lab-order .print-core strong{font-size:14.5px!important;line-height:1.05!important;color:#050505!important;font-weight:900!important}
  body.print-lab-order .print-core>div:nth-child(5) strong{font-size:12px!important}
  body.print-lab-order .print-zone-table{font-size:9px!important;margin-top:1px!important}
  body.print-lab-order .print-zone-table th,body.print-lab-order .print-zone-table td{padding:4px 5px!important}
  body.print-lab-order .print-zone-table tbody td{font-size:9.2px!important;font-weight:600!important}
  body.print-lab-order .print-feature-line{padding:7px 8px!important;font-size:11.5px!important;line-height:1.2!important;background:#fafafa!important}
  body.print-lab-order .print-notes{padding:7px 8px!important;min-height:52px!important}
  body.print-lab-order .print-notes>span{font-size:7.5px!important;color:#666!important}
  body.print-lab-order .print-notes p{font-size:11.5px!important;line-height:1.2!important;margin:4px 0!important;font-weight:800!important}
  body.print-lab-order .note-line{height:13px!important}
  body.print-lab-order .lab-rush-banner{font-size:14px!important;padding:7px 8px!important;border:2px solid #111!important;color:#111!important;font-weight:900!important}
  body.print-lab-order .lab-ship-patient{margin-top:6px!important;padding:7px 9px!important;font-size:11.5px!important;border:1px solid #777!important;grid-template-columns:110px 1fr!important}
  body.print-lab-order .lab-ship-patient b{font-size:8px!important;color:#666!important}
  body.print-lab-order .lab-ship-patient span{font-size:11.5px!important;font-weight:900!important}
}

/* Build 160: manufacturing completeness guard */
.required-missing{
  border-color:#c64227!important;
  box-shadow:0 0 0 2px rgba(198,66,39,.14)!important;
  background:#fff6f2!important;
}
body.theme-dark .required-missing{
  border-color:#ff856c!important;
  box-shadow:0 0 0 2px rgba(255,133,108,.18)!important;
  background:#2b1713!important;
}


/* Build 161: compact initial-lens workflow + mandatory order type + print priority hierarchy */
/* Compress the pre-workspace area without hiding clinical inputs. */
.entry-card{padding-top:12px!important;padding-bottom:12px!important}
.compact-entry-heading{margin-bottom:6px!important}
.compact-entry-heading h2{font-size:1.05rem!important;margin:0!important}
.compact-entry-heading p{font-size:.72rem!important;margin:1px 0 0!important}
.streamlined-entry-toolbar{margin-top:6px!important;margin-bottom:5px!important;gap:8px!important}
.compact-eye-gate-note{padding:6px 10px!important;margin:4px 0!important;min-height:0!important;font-size:.78rem!important}
.trial-source-row{min-height:0!important;margin:0!important;padding:0!important}
.trial-library-note{display:none!important}
.mode-help{padding:5px 10px!important;margin:4px 0!important;font-size:.72rem!important;min-height:0!important}
.compact-entry-strip{margin-top:5px!important}
.parameter-strip label{padding:6px 10px!important}
.parameter-strip input{min-height:30px!important;padding-top:2px!important;padding-bottom:2px!important}
.dynamic-zone-entry{margin-top:6px!important}
.fp-page-two-fields{margin-top:6px!important;padding:7px 10px!important;min-height:0!important}
.fp-page-two-heading span{display:none!important}
.reference-toggle-button{min-width:34px!important;width:34px!important;padding-left:0!important;padding-right:0!important;font-size:1.05rem!important}
.patient-bar-heading{padding-bottom:4px!important}
.patient-bar-heading>.patient-bar-tools{margin-left:auto!important}
.order-type-field select{width:100%!important;min-height:43px!important;padding:9px 34px 9px 12px!important;border:1px solid #cbd7e6!important;border-radius:9px!important;background-color:#fff!important;color:#17345f!important;font:700 .9rem/1.1 inherit!important}
.order-type-field select:invalid{color:#7b8798!important;background:#fff8e8!important;border-color:#d5a13a!important}
body.theme-dark .order-type-field select{background:#0a1521!important;color:#eef4fb!important;border-color:#35495f!important}

@media print{
  body.print-lab-order .lab-priority-banner{font:900 16px/1.08 Arial,sans-serif!important;text-align:center!important;padding:6px 8px!important;border:2.5px solid #111!important;color:#000!important;margin:4px 0 0!important;letter-spacing:.035em!important}
  /* Lens identity now lives only in the blue eye header. */
  body.print-lab-order .print-lens-meta{grid-template-columns:1.25fr .72fr .65fr .65fr .9fr!important;min-height:43px!important}
  body.print-lab-order .print-lens-meta>div{padding:5px 6px!important;min-height:43px!important}
  body.print-lab-order .print-lens-meta strong{font-size:10.5px!important}
  body.print-lab-order .print-eye-title{padding:6px 8px!important;min-height:28px!important}
  body.print-lab-order .print-eye-title h2{font-size:13.8px!important}
  body.print-lab-order .print-core{min-height:50px!important}
  body.print-lab-order .print-core>div{padding:6px 6px 7px!important}
  body.print-lab-order .print-zone-table th,body.print-lab-order .print-zone-table td{padding:3px 4px!important}
  body.print-lab-order .print-feature-line{padding:5px 7px!important;font-size:11px!important}
  body.print-lab-order .print-notes{padding:5px 7px!important;min-height:38px!important}
  body.print-lab-order .note-line{height:9px!important}
  body.print-lab-order .lab-ship-patient{margin-top:4px!important;padding:5px 8px!important}
  body.print-lab-order .lab-eyes{margin-top:6px!important}
}


/* Build 163 migration-baseline safeguards */
.oz-parameter #amf-bc-split{
  display:block;
  margin-top:3px;
  font-size:.72rem;
  font-weight:800;
  color:#60728a;
  letter-spacing:.01em;
}
body.theme-dark .oz-parameter #amf-bc-split{color:#aabbd0}
@media print{
  /* Complex orders may extend beyond the traditional half-page footprint.
     Required manufacturing/shipping information must never be clipped. */
  body.print-lab-order .lab-print-page{
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
  }
  body.print-lab-order .lab-ship-patient{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
}

/* Build 164 baseline patch */
.workspace-eye-navigator{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.workspace-eye-nav-card{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:10px;text-align:left;padding:10px 12px;border:1px solid var(--line,#d8e0ea);border-radius:12px;background:var(--panel,#fff);cursor:pointer}
.workspace-eye-nav-card>span{font-weight:900;font-size:1rem}
.workspace-eye-nav-card>strong{font-size:.76rem;text-transform:uppercase;letter-spacing:.04em}
.workspace-eye-nav-card>small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted,#667085)}
.workspace-eye-nav-card.complete{border-color:#8dbca8}
.workspace-eye-nav-card.active{outline:2px solid rgba(36,92,150,.22)}
.lab-acculens-logo{display:block;width:116px;height:auto;max-height:34px;object-fit:contain;object-position:left center}
.required-missing{outline:2px solid #b42318!important;outline-offset:1px}
@media(max-width:850px){.workspace-eye-navigator{grid-template-columns:1fr}.workspace-eye-nav-card{grid-template-columns:auto auto;}.workspace-eye-nav-card>small{grid-column:1/-1}}

/* Build 164b workflow patch */
.workspace-case-controls{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line,#d8e0ea)}
.workspace-case-controls label{display:grid;grid-template-columns:auto 112px;align-items:center;gap:8px;font-size:.75rem;font-weight:800;letter-spacing:.03em}
.workspace-case-controls input{width:112px;padding:8px 10px;border:1px solid var(--line,#cbd5e1);border-radius:9px;font:inherit;font-size:.95rem}
.workspace-case-controls small{grid-column:2;font-size:.65rem;font-weight:400;letter-spacing:0;color:var(--muted,#667085);margin-top:-5px}
.lab-clean-header:empty{display:none!important;height:0!important;margin:0!important;padding:0!important}
.lab-priority{position:relative;display:flex!important;align-items:center;justify-content:center}
.lab-priority-logo{position:absolute;left:5px;width:55px;max-height:16px;object-fit:contain;object-position:left center}
.lab-priority span{display:block;text-align:center}
@media(max-width:850px){.workspace-case-controls{justify-content:stretch;flex-wrap:wrap}.workspace-case-controls label{flex:1}}

/* Build 165: visual cleanup + dark-mode surface hierarchy */
.patient-eye-card.reference:before{display:none!important;content:none!important}
.status#status-message{display:none!important}
.final-fp-values>div>span{font-weight:900}

/* Two-line fellow-eye cards: state first, consultant shorthand beneath. */
.patient-eye-card,.workspace-eye-nav-card{grid-template-columns:auto 1fr!important;grid-template-rows:auto auto!important;column-gap:10px!important;row-gap:2px!important}
.patient-eye-card .patient-eye-name,.workspace-eye-nav-card>span{grid-column:1;grid-row:1;font-weight:900}
.patient-eye-card .patient-eye-status,.workspace-eye-nav-card>strong{grid-column:2;grid-row:1}
.patient-eye-card small,.workspace-eye-nav-card>small{grid-column:1/-1!important;grid-row:2;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;padding-left:0;color:var(--muted,#667085)}

/* Lens comparison: annotation hierarchy shared with the PDF map. */
.comparison-vault-arc{stroke:#1561d2;stroke-width:5;stroke-linecap:round;fill:none}
.comparison-vault-label{fill:#0d47a1;font-size:11px;font-weight:900}
.comparison-region-label{fill:#445a78;font-size:10px;font-weight:800}
.comparison-map-note{font-size:10px;font-weight:700}
.comparison-orientation-guide{display:flex;align-items:center;gap:7px;padding:3px 8px 3px 10px;border:1px solid #d7e0ed;border-radius:10px;background:#fff;min-height:56px}
.comparison-orientation-copy{display:flex;flex-direction:column;min-width:70px;line-height:1.15}
.comparison-orientation-copy span{font-size:.58rem;font-weight:850;letter-spacing:.04em;text-transform:uppercase;color:#61728a}
.comparison-orientation-copy strong{margin-top:3px;font-size:.72rem;color:#173867}
.comparison-orientation-mini{width:70px;height:54px;overflow:visible}
.comparison-orientation-mini>circle:first-child{fill:#fff;stroke:#17253c;stroke-width:1.5}
.comparison-orientation-mini .mini-axis{stroke:#9aa6b7;stroke-width:.8;stroke-dasharray:2 2}
.comparison-orientation-mini .mini-center{fill:#17253c}
.comparison-orientation-mini .mini-anatomy{font-size:12px!important;font-weight:950;fill:#17253c;paint-order:stroke;stroke:#fff;stroke-width:2.5px;stroke-linejoin:round}
.comparison-pair-segment button{display:flex;align-items:center;gap:6px}
.comparison-pair-dots{display:inline-flex;gap:2px}
.comparison-pair-dots i{display:block;width:7px;height:7px;border-radius:50%;border:1px solid rgba(255,255,255,.7);box-shadow:0 0 0 1px rgba(23,37,60,.12)}
.comparison-pair-segment button:not(.active) .comparison-pair-dots i{border-color:#fff}
.comparison-boundary-pill{fill:#fff;stroke:#cfd9e7;stroke-width:.8}
.comparison-boundary-label{font-size:9px;font-weight:900;letter-spacing:-.01em}

body.theme-dark .trial-family-picker,
body.theme-dark .trial-finder-stage,
body.theme-dark .trial-selected-header,
body.theme-dark .comparison-toolbar,
body.theme-dark .comparison-summary,
body.theme-dark .comparison-footer,
body.theme-dark .final-fp-values,
body.theme-dark .fp-page-two-fields,
body.theme-dark .width-label,
body.theme-dark .workspace-case-controls{
  background:#101d2b!important;color:#e6edf7!important;border-color:#2b3d52!important
}
body.theme-dark .trial-family-card,
body.theme-dark .trial-selected-brand,
body.theme-dark .comparison-summary>span{
  background:#132233!important;color:#e6edf7!important;border-color:#334a63!important
}
body.theme-dark .comparison-orientation-guide{background:#132233!important;border-color:#334a63!important}
body.theme-dark .comparison-orientation-copy span{color:#9fb0c4!important}
body.theme-dark .comparison-orientation-copy strong{color:#e6edf7!important}
body.theme-dark .trial-family-card strong,
body.theme-dark .trial-selected-brand strong,
body.theme-dark .trial-library-meta strong{color:#72adff!important}
body.theme-dark .trial-family-card small,
body.theme-dark .trial-library-meta,
body.theme-dark .comparison-footer{color:#9fb0c4!important}

/* Keep branded logo plates intentional, but remove accidental light UI islands. */
body.theme-dark .trial-family-logo,
body.theme-dark .trial-selected-logo-plate{background:#f8fafc!important}
body.theme-dark .final-fp-values input,
body.theme-dark .fp-page-two-fields input{background:#0a1521!important;color:#eef4fb!important;border-color:#35495f!important}
body.theme-dark .dynamic-designer-grid .dg-head,
body.theme-dark .dynamic-designer-grid .width-label{color:#d7e4f4!important}
body.theme-dark .dynamic-designer-grid .dg-head.region-peripheral{background:#142235!important}
body.theme-dark .dynamic-designer-grid .dg-head.region-limbal{background:#211d31!important}
body.theme-dark .dynamic-designer-grid .dg-head.region-haptic{background:#112925!important}
body.theme-dark .dynamic-designer-grid .dg-head strong,
body.theme-dark .dynamic-designer-grid .dg-head span{color:#8dbbff!important}

/* Clinical warning states stay dark. Color carries meaning without a white/peach flash. */
body.theme-dark .bc-inline-param.adjust-negative,
body.theme-dark #workspace-bc-param.adjust-negative,
body.theme-dark .bc-inline-param.warning{background:#291a16!important;border-color:#b9684e!important;color:#f5e8e3!important}
body.theme-dark .bc-inline-param.adjust-negative strong,
body.theme-dark #workspace-bc-param.adjust-negative strong,
body.theme-dark .bc-inline-param.warning strong{color:#ff9a79!important}

/* Visualization canvases are intentionally white in both themes. Their own palette wins. */
body.theme-dark .comparison-canvas-wrap{background:#0c1724!important}
body.theme-dark .comparison-canvas-wrap svg{background:#fff!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-anatomy-label{fill:#1d2d46!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-meridian-label{fill:#5c6f89!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-zone-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-small,
body.theme-dark .comparison-canvas-wrap svg .comparison-axis-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-legend-text{fill:#526986!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-region-label{fill:#445a78!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-map-note{fill:#5c6f89!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-delta-positive{fill:#087a38!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-delta-negative{fill:#b94325!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-delta-zero{fill:#526986!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-vault-label{fill:#0d47a1!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-map-ring,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-ray,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-edge,
body.theme-dark .comparison-canvas-wrap svg .comparison-centerline,
body.theme-dark .comparison-canvas-wrap svg .comparison-axis,
body.theme-dark .comparison-canvas-wrap svg .comparison-zone-guide{stroke:#9fb2cb!important}

/* Build 178 - fixed shipping panel and staged comparison editing */
.order-shipping-heading{display:flex;justify-content:space-between;align-items:center;background:#f5f8fd;padding:9px 12px}
.order-shipping-heading>span{display:flex;flex-direction:column;gap:2px}
.order-shipping-heading strong{color:#173f83;font-size:.76rem}
.order-shipping-heading small{font-size:.62rem;color:#64748b;font-weight:600}
.comparison-footer>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.comparison-footer #comparison-edit-status{font-size:.66rem;font-weight:800;color:#1f56b3}
.comparison-edit-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.comparison-spinner{cursor:default;overflow:visible}
.comparison-spinner-box{box-sizing:border-box;height:24px;display:grid;grid-template-columns:1fr 15px;align-items:center;border:1px solid #9eb4d2;border-radius:6px;background:#fff;color:#102f63;font:800 9px/1 Arial,sans-serif;box-shadow:0 1px 2px rgba(15,47,99,.12);overflow:hidden}
.comparison-spinner-box>span:first-child{text-align:center;white-space:nowrap}
.comparison-spinner-arrows{display:grid;height:100%;border-left:1px solid #9eb4d2}
.comparison-spinner-arrows button{appearance:none;border:0;border-radius:0;padding:0;background:#eaf1ff;color:#173f83;font:900 6px/1 Arial,sans-serif;cursor:pointer;min-width:0}
.comparison-spinner-arrows button+button{border-top:1px solid #b8c8de}
.comparison-spinner-arrows button:hover{background:#d9e7ff}
body.theme-dark .order-shipping-heading{background:#122033!important}
body.theme-dark .order-shipping-heading strong{color:#8fbcff}
body.theme-dark .order-shipping-heading small{color:#91a2b8}
body.theme-dark .comparison-footer #comparison-edit-status{color:#8fbcff}
@media(max-width:760px){.comparison-edit-actions{width:100%;flex-wrap:wrap}.comparison-edit-actions button{flex:1}}

@media(max-width:760px){
  .comparison-orientation-guide{order:3}
  .comparison-profile-controls{order:4}
}

/* The optical history should read as one quiet record, not a stack of white tiles. */
body.theme-dark .optical-applied-grid>div{background:#122030!important;color:#dbe7f5!important;border-color:#30465f!important}
body.theme-dark .optical-applied-grid>div span,
body.theme-dark .optical-applied-grid>div small{color:#9fb0c4!important}
body.theme-dark .optical-applied-grid>div b{color:#eef4fb!important}

@media(max-width:850px){.patient-eye-card,.workspace-eye-nav-card{grid-template-columns:auto 1fr!important}}
body.theme-dark .trial-family-button,
body.theme-dark .trial-library-card{background:#132233!important;color:#e6edf7!important;border-color:#334a63!important}
body.theme-dark .trial-library-card:hover,
body.theme-dark .trial-library-card:focus{background:#172a3e!important;border-color:#5b91dd!important}
body.theme-dark .trial-library-card strong{color:#72adff!important}
body.theme-dark .trial-library-card small{color:#9fb0c4!important}
body.theme-dark .trial-library-card>b{color:#72adff!important}
body.theme-dark .trial-selected-header{background:#101d2b!important;border-color:#2b3d52!important}

/* Build 166 review-pass refinements */
.fp-page-two-fields{grid-template-columns:1fr 1fr!important;align-items:end!important}.fp-page-two-fields>label{border:1px solid #cbd8e8;border-radius:10px;padding:7px 10px}.final-fp-values{grid-template-columns:minmax(180px,.7fr) 1fr 1fr!important}.final-fp-values .reset-slot{display:flex;align-items:center}.undo-style,#undo-optical{background:#fff7ed!important;border-color:#e6b98b!important;color:#7a4319!important}body.theme-dark .undo-style,body.theme-dark #undo-optical{background:#2b211a!important;border-color:#8b6547!important;color:#ffd2a8!important}.active-lens-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.active-lens-actions small{font-weight:900;letter-spacing:.08em;color:#58708f}.lab-clean-header img{width:112px;height:auto;display:block}body.theme-dark .review-feature-summary{background:#101d2a!important;color:#dbe7f5!important}body.theme-dark .order-review-actions{background:#dfe6ee!important}@media print{body.print-lab-order .lab-clean-header:has(img){display:block!important;height:auto!important;padding:2px 0 5px!important;margin:0 0 3px!important;border-bottom:1px solid #333!important}body.print-lab-order .lab-clean-header img{width:88px!important}}

#diameter-check{display:none!important}

/* Build 166a critical workflow fixes */
@media print{
  body.print-lab-order .lab-priority-banner{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:28px!important;
    padding:4px 64px!important;
    margin:0!important;
  }
  body.print-lab-order .lab-priority-banner .lab-priority-logo{
    display:block!important;
    position:absolute!important;
    left:5px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:50px!important;
    height:auto!important;
    max-height:18px!important;
    object-fit:contain!important;
  }
  body.print-lab-order .lab-priority-banner span{
    display:block!important;
    width:100%!important;
    text-align:center!important;
  }
}


/* Build 167 orientation language + compact engineering header */
.dynamic-designer-grid .compact-workspace-head{min-height:44px!important;height:44px!important;padding:6px 9px!important}
.dynamic-designer-grid .region-group-heading.compact-workspace-head{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
.dynamic-designer-grid .region-group-heading.compact-workspace-head strong{font-size:.74rem!important;white-space:nowrap}
.dynamic-designer-grid .region-group-heading.compact-workspace-head small{font-size:.56rem!important;font-weight:800!important;opacity:.68;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meridian-label[class*="orientation-"]{position:relative;padding-left:14px!important}
.meridian-label[class*="orientation-"]::before{content:"";position:absolute;left:4px;top:8px;bottom:8px;width:4px;border-radius:4px;background:#64748b}
.meridian-label.orientation-dual.orientation-m0::before{background:#2563eb}.meridian-label.orientation-dual.orientation-m90::before{background:#d97706}
.meridian-label.orientation-quadrant.orientation-m0::before{background:#2563eb}.meridian-label.orientation-quadrant.orientation-m90::before{background:#d97706}.meridian-label.orientation-quadrant.orientation-m180::before{background:#c026d3}.meridian-label.orientation-quadrant.orientation-m270::before{background:#0891b2}
body.theme-dark .dynamic-designer-grid .region-group-heading.compact-workspace-head small{color:#9fb0c4!important}


/* Build 168 cleanup patch */
/* Display controls belong to the application header, not over clinical content. */
.workbench-hero .workstation-controls{position:static!important;right:auto!important;bottom:auto!important;z-index:auto!important;box-shadow:none!important;backdrop-filter:none!important;background:transparent!important;border:0!important;padding:0!important;margin-left:4px!important}
.workbench-hero .workstation-controls button{min-width:54px!important}
body.focus-mode .workbench-hero{display:flex!important;min-height:42px!important;padding:5px 12px!important}
body.focus-mode .workbench-hero .hero-brand,body.focus-mode .workbench-hero .workbench-wordmark,body.focus-mode .workbench-hero .hero-actions>a{display:none!important}
body.focus-mode .workbench-hero .hero-actions{margin-left:auto!important}

/* Rotation translator must stay dark in dark mode. */
body.theme-dark .rotation-translator{background:#101d2b!important;border-color:#334a63!important;color:#e6edf7!important}
body.theme-dark .rotation-translator-head strong{color:#72adff!important}
body.theme-dark .rotation-translator-head small,body.theme-dark .rotation-translation small,body.theme-dark .translator-preview small{color:#9fb0c4!important}
body.theme-dark .rotation-translator select,body.theme-dark .rotation-translator input{background:#0a1521!important;color:#eef4fb!important;border-color:#38516b!important}
body.theme-dark .rotation-translation{background:#132233!important;border-color:#334a63!important}
body.theme-dark .translator-preview{background:#101d2b!important;border-color:#334a63!important}
body.theme-dark .spherical-equivalent-option{background:#101d2b!important;border-color:#334a63!important;color:#dbe7f5!important}

/* Print-safe lab lens titles: dark ink, medium weight, compact wrapping. */
@media print{
 body.print-lab-order .print-eye-title{background:#fff!important;color:#202a36!important;border-bottom:1px solid #777!important;padding:4px 6px!important;min-height:24px!important;align-items:flex-start!important}
 body.print-lab-order .print-eye-title h2{color:#202a36!important;font-size:11.2px!important;line-height:1.08!important;font-weight:600!important;letter-spacing:0!important;max-width:82%!important}
 body.print-lab-order .print-eye-title small{color:#4b5563!important;font-size:7.2px!important;font-weight:500!important;white-space:nowrap!important;padding-top:1px!important}
}

/* Build 177: distinguish selected state from keyboard focus. */
.mode-button.active,.eye-button.active{box-shadow:none!important;border-color:#173f83!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid #f2a900!important;
  outline-offset:2px!important;
}
body.theme-dark button:focus-visible,body.theme-dark a:focus-visible,body.theme-dark input:focus-visible,body.theme-dark select:focus-visible,body.theme-dark textarea:focus-visible{
  outline-color:#ffd166!important;
}
body.theme-dark .entry-zone .width.auto{
  background:#101d2b!important;
  color:#e6edf7!important;
}

/* Build 179: clearer comparison editing, dark visualization surfaces, and a
   properly weighted entry point to the fine-tuning workspace. */
.lens-view-button{
  display:inline-flex!important;
  align-items:center;
  gap:6px;
  width:max-content;
  margin-top:7px!important;
  padding:6px 9px!important;
  border-color:#7fa1d2!important;
  color:#173f83!important;
  background:#f7faff!important;
  font-size:.66rem!important;
  line-height:1!important;
}
.lens-view-button svg{width:18px;height:12px;overflow:visible}
.lens-view-button svg path{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.lens-view-button:hover{background:#e9f2ff!important;border-color:#386cc0!important}
body.theme-dark .lens-view-button{background:#132a45!important;color:#9cc5ff!important;border-color:#42678f!important}
body.theme-dark .lens-view-button:hover{background:#193754!important;border-color:#6b9bd2!important}

.comparison-control-label{fill:#425b7c;font-size:8.5px;font-weight:900;letter-spacing:.03em;text-transform:uppercase}
.comparison-canvas-wrap #lens-comparison-svg{max-height:430px}
.comparison-profile-title{font-weight:850}
.comparison-legend-primary{font-size:10.5px;font-weight:850}
.comparison-legend-secondary{fill:#8391a5;font-size:8.5px;font-weight:650}
.comparison-spinner-box{height:26px;grid-template-columns:1fr 16px}
.comparison-spinner-box>span:first-child{font-size:9.5px}

/* The graph remains a distinct clinical surface in dark mode without becoming
   a bright white lightbox. */
body.theme-dark .comparison-canvas-wrap svg{background:#132131!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-map-edge{fill:#152536!important;stroke:#8ea7c4!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-map-center{fill:#1d3146!important;stroke:#6f89a8!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-boundary-pill{fill:#17283a!important;stroke:#49637f!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-axis-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-anatomy-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-legend-text{fill:#d6e3f2!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-zone-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-small,
body.theme-dark .comparison-canvas-wrap svg .comparison-meridian-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-region-label,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-note,
body.theme-dark .comparison-canvas-wrap svg .comparison-legend-secondary,
body.theme-dark .comparison-canvas-wrap svg .comparison-control-label{fill:#9eb2ca!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-delta-positive{fill:#66e18e!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-delta-negative{fill:#ff9278!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-delta-zero{fill:#9eb2ca!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-vault-label{fill:#7db4ff!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-profile-original{stroke:#a7b8cc!important}
body.theme-dark .comparison-canvas-wrap svg .comparison-map-ring,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-ray,
body.theme-dark .comparison-canvas-wrap svg .comparison-map-edge,
body.theme-dark .comparison-canvas-wrap svg .comparison-centerline,
body.theme-dark .comparison-canvas-wrap svg .comparison-axis,
body.theme-dark .comparison-canvas-wrap svg .comparison-zone-guide{stroke:#536a84!important}
body.theme-dark .comparison-spinner-box{background:#0d1a28;color:#ecf4ff;border-color:#587493;box-shadow:0 2px 5px rgba(0,0,0,.28)}
body.theme-dark .comparison-spinner-arrows{border-color:#587493}
body.theme-dark .comparison-spinner-arrows button{background:#18314b!important;color:#a9ceff!important;border-color:#587493!important}
body.theme-dark .comparison-spinner-arrows button:hover{background:#244666!important}

/* Optical preview details must remain readable against the dark side rail. */
body.theme-dark .translator-preview img{filter:invert(1) brightness(1.55) contrast(.9)}
body.theme-dark .clock-face-labels span{color:#9fb5ce!important}
body.theme-dark .rotation-translation b{color:#8fbcff!important}
body.theme-dark .optical-result-grid p{background:#152638!important;border:1px solid #304962!important;color:#eef4fb!important}
body.theme-dark .optical-result-grid p span{color:#9fb0c4!important}
body.theme-dark .optical-result-grid p b{color:#eef4fb!important}

/* Build 180: clinically guided diameter resize and comparison controls. */
.diameter-fit-method{margin:0 22px 14px;padding:11px 13px;border:1px solid #c9d9ee;border-left:4px solid #2c64bd;border-radius:10px;background:#f3f7fd;display:grid;gap:3px}
.diameter-fit-method>span{text-transform:uppercase;letter-spacing:.07em;font-size:.58rem;font-weight:900;color:#52709a}
.diameter-fit-method>strong{font-size:.78rem;color:#173f83}
.diameter-fit-method>p{margin:0;color:#5d6f88;font-size:.69rem;line-height:1.35}
.diameter-preview-summary{display:grid;grid-template-columns:auto repeat(3,minmax(0,1fr));gap:8px 16px}
.diameter-preview-summary span{line-height:1.3}
.diameter-preview-summary span b{display:block;margin-bottom:2px;text-transform:uppercase;letter-spacing:.07em;font-size:.63rem;color:#60738c}
.diameter-modal .danger-ghost{color:#a73321;border-color:#df9b8e;background:#fff8f6}
.diameter-modal .danger-ghost:hover{background:#fff0eb}
body.theme-dark .diameter-current-strip{background:#122235!important;border-color:#31475f!important}
body.theme-dark .diameter-current-strip span:first-child,
body.theme-dark #diameter-delta{color:#a5b8cf!important}
body.theme-dark .diameter-fit-method{background:#10243a!important;border-color:#365778!important;border-left-color:#68a7ff!important}
body.theme-dark .diameter-fit-method>span{color:#8dbbff!important}
body.theme-dark .diameter-fit-method>strong{color:#e8f1fc!important}
body.theme-dark .diameter-fit-method>p{color:#a9bbcf!important}
body.theme-dark .diameter-preview{background:#101d2b!important;border-color:#38516b!important}
body.theme-dark .diameter-preview-summary{background:#15283b!important;border-color:#38516b!important}
body.theme-dark .diameter-preview-summary strong{color:#73adff!important}
body.theme-dark .diameter-preview-summary span{color:#c5d4e6!important}
body.theme-dark .diameter-solve-head{background:#122235!important;color:#9fb1c6!important;border-color:#31475f!important}
body.theme-dark .diameter-solve-table>div:not(.diameter-solve-head){background:#101d2b!important;color:#dfeaf7!important;border-color:#2f4359!important}
body.theme-dark .diameter-solve-table strong{color:#67db91!important}
body.theme-dark .diameter-preview>small{color:#a2b5ca!important}
body.theme-dark .diameter-preview-error{background:#2a1714!important;color:#ff9b84!important}
body.theme-dark .diameter-modal .danger-ghost{background:#2a1714!important;color:#ff9b84!important;border-color:#9b4f3e!important}

.comparison-spinner-box{height:27px!important;grid-template-columns:auto minmax(34px,1fr) auto!important;border-radius:7px!important}
.comparison-spinner-box>span{text-align:center;white-space:nowrap;font-size:9px;font-weight:900;padding:0 3px}
.comparison-spinner-box>button{appearance:none;border:0;border-radius:0;align-self:stretch;min-width:18px;padding:0 4px;background:#eaf1ff;color:#173f83;font:900 9px/1 Arial,sans-serif;cursor:pointer}
.comparison-spinner-box>button:first-child{border-right:1px solid #b8c8de}
.comparison-spinner-box>button:last-child{border-left:1px solid #b8c8de}
.comparison-spinner-box>button:hover{background:#d9e7ff}
.comparison-control-leader{stroke:#8aa1bd;stroke-width:.7;stroke-dasharray:2 2}
.comparison-reference-junction{fill:#fff;stroke:#71839a;stroke-width:1.25}
.comparison-profile-segment{stroke-linejoin:round}
.comparison-visual-scale{fill:#304b70;font-size:10px;font-weight:900}
.comparison-visual-scale-note{fill:#73849a;font-size:8.5px;font-weight:700}
.comparison-blend-sector{pointer-events:none}
.comparison-region-leader{fill:none;stroke:#8093ab;stroke-width:1}
.comparison-map-legend{fill:#405978;font-size:10px;font-weight:850}
.comparison-resize-band{fill:#f4b942;fill-opacity:.15;stroke:none}
.comparison-reference-boundary{stroke:#8d9aae;stroke-width:.8;stroke-dasharray:3 3}
.comparison-resize-label{fill:#8a5b00;font-size:7px;font-weight:900;text-transform:uppercase}
.comparison-ruler-line,.comparison-ruler-tick{stroke:#8b9bb0;stroke-width:.8}
.comparison-ruler-tick.major{stroke:#526a88;stroke-width:1.15}
.comparison-ruler-label{fill:#526a88;font-size:7.5px;font-weight:850}
.comparison-ruler-note{fill:#73849a;font-size:7.5px;font-weight:700}
.order-eye-card.is-undesigned{background:#eef1f5;border-color:#b8c0cb}
.order-eye-card.is-undesigned .profilometry-eye-head{background:#687386;color:#fff}
.order-eye-card.is-undesigned .profilometry-lab-controls,
.order-eye-card.is-undesigned .order-card-notes{opacity:.48;filter:grayscale(1)}
.order-eye-card.is-undesigned .order-design-summary{background:#e4e8ed;color:#4e5968;font-weight:800}
.order-eye-card.is-undesigned :disabled{cursor:not-allowed}
body.theme-dark .comparison-spinner-box>button{background:#18314b!important;color:#b9d8ff!important;border-color:#587493!important}
body.theme-dark .comparison-spinner-box>button:hover{background:#244666!important}
body.theme-dark .comparison-control-leader{stroke:#6f88a5!important}
body.theme-dark .comparison-reference-junction{fill:#132131!important;stroke:#b2c4d8!important}
body.theme-dark .comparison-visual-scale{fill:#d6e3f2!important}
body.theme-dark .comparison-visual-scale-note{fill:#93a9c2!important}
body.theme-dark .comparison-region-leader{stroke:#7f98b5!important}
body.theme-dark .comparison-map-legend{fill:#d6e3f2!important}
body.theme-dark .comparison-resize-band{fill:#f4b942!important;fill-opacity:.18!important}
body.theme-dark .comparison-reference-boundary{stroke:#90a2b8!important}
body.theme-dark .comparison-resize-label{fill:#ffd477!important}
body.theme-dark .comparison-ruler-line,body.theme-dark .comparison-ruler-tick{stroke:#7890aa!important}
body.theme-dark .comparison-ruler-tick.major{stroke:#b1c6dd!important}
body.theme-dark .comparison-ruler-label{fill:#c5d6e8!important}
body.theme-dark .comparison-ruler-note{fill:#93a9c2!important}
body.theme-dark .order-eye-card.is-undesigned{background:#111a24!important;border-color:#465361!important}
body.theme-dark .order-eye-card.is-undesigned .profilometry-eye-head{background:#3e4a59!important;color:#e6edf7!important}
body.theme-dark .order-eye-card.is-undesigned .order-design-summary{background:#18222d!important;color:#b0bdca!important}

/* Build 187: keep the final two reference-lens inputs in the established
   left-to-right entry flow without giving short values full-row controls. */
.fp-page-two-fields{display:flex!important;justify-content:flex-end!important;align-items:end!important;gap:10px!important}
.fp-page-two-fields>label{flex:0 0 auto!important}
.fp-page-two-fields>label:first-child{width:190px!important}
.fp-page-two-fields>label:last-child{width:235px!important}
.fp-page-two-fields input{font-weight:850!important}

.consultant-change-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;border-top:1px solid #c9d8eb;border-bottom:1px solid #c9d8eb;background:#f7faff;color:#294566}
.consultant-change-strip[hidden]{display:none!important}
.consultant-change-strip>strong{text-transform:uppercase;letter-spacing:.08em;font-size:.67rem;color:#224b94}
.consultant-change-strip>span{display:inline-flex;gap:5px;align-items:center;padding:4px 8px;border:1px solid #d2dfef;border-radius:999px;background:#fff;font-size:.72rem;font-weight:750}
.consultant-change-strip b{text-transform:uppercase;letter-spacing:.06em;font-size:.61rem;color:#657892}
.consultant-change-strip .requested{border-color:#a9c5ee}
.consultant-change-strip .automatic{border-color:#d6c187;background:#fffaf0}
.consultant-change-strip .result{border-color:#a8d3b9;background:#f2fbf5}
.main-optic-options .aspheric-optics-field{max-width:220px}

body.theme-dark .consultant-change-strip{background:#101d2a!important;border-color:#354b63!important;color:#dce8f5!important}
body.theme-dark .consultant-change-strip>strong{color:#8db7ff!important}
body.theme-dark .consultant-change-strip>span{background:#172637!important;border-color:#405974!important;color:#e2edf8!important}
body.theme-dark .consultant-change-strip .automatic{background:#2b2517!important;border-color:#776434!important}
body.theme-dark .consultant-change-strip .result{background:#15291f!important;border-color:#3f7354!important}

@media(max-width:760px){.fp-page-two-fields{justify-content:stretch!important}.fp-page-two-fields>label{width:auto!important;flex:1 1 0!important}}
@media(max-width:760px){.diameter-preview-summary{grid-template-columns:1fr}.diameter-fit-method{margin-left:14px;margin-right:14px}}

/* Build 188: show the requested diameter and automatic geometry transition
   as original → final, without implying a second manual sag adjustment. */
.oad-parameter{position:relative}
.oad-change-display{display:flex;align-items:baseline;gap:5px;white-space:nowrap;margin:2px 0}
.oad-change-display small{display:inline!important;color:#6f7f95!important;font-size:.78rem!important;font-weight:750}
.oad-change-display i{font-style:normal;color:#8798ad;font-weight:850}
.oad-change-display strong{display:inline!important;color:#143f91}
.oad-change-display b{color:#60718a;font-size:.66rem}
.oad-parameter #diameter-plan-badge{display:inline-flex;margin-top:3px;padding:2px 6px;border:1px solid #d5bd79;border-radius:999px;background:#fff9e9;color:#7c5a00;font-size:.58rem;font-weight:850;letter-spacing:.03em}
.oad-change-display [hidden],.oad-parameter #diameter-plan-badge[hidden],.width-comparison [hidden]{display:none!important}
.width-comparison{display:flex;align-items:baseline;justify-content:flex-end;gap:4px}
.width-comparison .width-original{display:inline!important;margin:0!important;color:#718198;font-size:.69rem!important;font-weight:700;text-decoration:line-through;text-decoration-thickness:1px}
.width-comparison i{font-style:normal;color:#8798ad;font-size:.75rem}
.width-comparison strong{font-size:1rem;color:#133f8e}
.width-output.automatic-compensation{box-shadow:inset 0 -3px #e3b341;background:#fffaf0!important}
body.compact-workstation .workspace-parameters{grid-template-columns:185px minmax(170px,1.3fr) 145px 78px minmax(135px,.8fr) minmax(150px,.9fr)!important}
body.theme-dark .oad-change-display small,body.theme-dark .oad-change-display i{color:#9aadc3!important}
body.theme-dark .oad-change-display strong{color:#dbe9ff!important}
body.theme-dark .oad-parameter #diameter-plan-badge{background:#2b2517!important;border-color:#776434!important;color:#ffd678!important}
body.theme-dark .width-output.automatic-compensation{background:#2b2517!important;box-shadow:inset 0 -3px #d3a532!important}
body.theme-dark .width-comparison .width-original{color:#93a5ba!important}
body.theme-dark .width-comparison strong{color:#e5efff!important}
