/* Visual-acuity workspace, unified with LUMIQ clinical theme while preserving stage geometry. */
body.vision-page {
  background: radial-gradient(circle at 90% 10%, rgba(13, 122, 111, 0.06), transparent 40%), var(--bg, #f3f6f9);
  font-family: var(--font-sans, 'Inter', 'Segoe UI', Arial, sans-serif);
  color: var(--ink, #0f172a);
}

body.vision-page #sidebar {
  width: 248px;
  padding: 20px 14px 52px;
  background: #ffffff;
}

body.vision-page .workspace {
  margin-left: 248px;
}

body.vision-page #sidebar .brand {
  margin: 0 0 8px;
  padding: 2px 8px 18px;
  border-bottom: 1px solid var(--line-soft, #eef2f6);
}

body.vision-page #sidebar .brand-mark {
  background: var(--teal, #0d7a6f);
  color: #ffffff;
}

body.vision-page #sidebar .nav-item {
  padding: 9px 11px;
  color: #475569;
  font-size: 13px;
}

body.vision-page #sidebar .nav-item.active {
  color: var(--teal-dark, #095c53);
  background: var(--mint, #e6f5f2);
}

body.vision-page #sidebar .nav-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--subtle, #94a3b8);
  margin: 18px 10px 7px;
}

body.vision-page .sidebar-bottom {
  margin-top: 12px;
  padding-top: 10px;
}

body.vision-page #topbar {
  height: 68px;
  padding: 0 28px;
  gap: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line, #e2e8f0);
}

body.vision-page #main {
  padding: 20px 28px 28px;
  min-height: calc(100vh - 68px);
}

body.vision-page footer {
  display: none;
}

body.vision-page.vision-menu-collapsed #sidebar {
  transform: translateX(-100%);
}

body.vision-page.vision-menu-collapsed .workspace {
  margin-left: 0;
}

.vision-page-title {
  min-width: 100px;
  flex: 1;
  overflow: hidden;
}

.vision-page-title h1 {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--teal-dark, #095c53);
  line-height: 1.3;
  white-space: nowrap;
}

.vision-page-title p {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted, #64748b);
  margin-top: 2px;
}

.vision-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

body.vision-page .clinic {
  display: flex;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 99px;
  padding: 5px 12px;
  color: var(--ink-soft, #334155);
}

.vision-language {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 99px;
  padding: 5px 10px;
  color: var(--ink-soft, #334155);
}

.vision-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0d7a6f, #2563eb);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(13, 122, 111, 0.25);
  padding: 0;
  position: relative;
}

.vision-avatar::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.vision-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.vision-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  min-height: 158px;
  gap: 0;
  padding: 22px;
  border-radius: 16px;
  white-space: normal;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: var(--shadow, 0 1px 3px rgba(15, 23, 42, 0.05));
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.vision-card:nth-child(1) {
  background: linear-gradient(155deg, #ffffff 0%, #f0f9f7 100%);
  border-color: #bce3dc;
}

.vision-card:nth-child(2) {
  background: linear-gradient(155deg, #ffffff 0%, #eff6ff 100%);
  border-color: #bfdbfe;
}

.vision-card:nth-child(3) {
  background: linear-gradient(155deg, #ffffff 0%, #f5f3ff 100%);
  border-color: #ddd6fe;
}

.vision-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 8px 20px rgba(15, 23, 42, 0.08));
  border-color: var(--teal, #0d7a6f);
}

.vision-card:nth-child(2):hover {
  border-color: #3b82f6;
}

.vision-card:nth-child(3):hover {
  border-color: #7c3aed;
}

.vision-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d1eae4;
  background: #e6f5f2;
  border-radius: 12px;
  color: #0d7a6f;
  margin-bottom: 14px;
}

.vision-card:nth-child(2) .vision-card-icon {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.vision-card:nth-child(3) .vision-card-icon {
  background: #ede9fe;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.vision-card-icon .icon {
  width: 22px;
  height: 22px;
}

.vision-card strong {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 5px;
}

.vision-card > span:last-child {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  font-weight: 400;
}

.vision-page-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
  margin: 18px 0 0;
  max-width: 1200px;
}

.vision-page-note a {
  color: var(--teal, #0d7a6f);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vision-page-note kbd {
  font: 11px inherit;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2px 6px;
  border-radius: 5px;
  color: #0f172a;
}

.vision-extras {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.vision-extras > details {
  font-size: 13px;
  font-weight: 550;
  color: #334155;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 16px;
  box-shadow: var(--shadow-xs);
}

.vision-extras summary {
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.vision-extras summary .icon {
  width: 16px;
  height: 16px;
  color: var(--teal, #0d7a6f);
}

.vision-extras > details[open] {
  padding: 16px;
  width: 100%;
}

.vision-extras details[open] summary {
  margin-bottom: 14px;
}

.vision-gallery-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.vision-gallery-list button {
  font-size: 12.5px;
  text-align: left;
  white-space: normal;
  justify-content: flex-start;
}

.vision-overlay {
  width: 100%;
  background: #ffffff;
  border: 1px solid #dbe4ec;
  border-radius: 18px;
  box-shadow: var(--shadow-md, 0 6px 24px rgba(15, 23, 42, 0.06));
  overflow: hidden;
}

.vision-overlay button {
  font-family: inherit;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.35;
  padding: 8px 14px;
  border-color: #d5dee7;
  background: #ffffff;
  color: #0f172a;
}

.vision-overlay button.primary {
  background: linear-gradient(180deg, #0f877b 0%, #0d7a6f 100%);
  border-color: #0d7a6f;
  color: #ffffff;
  font-weight: 600;
}

.vision-overlay button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #0d7a6f 0%, #095c53 100%);
}

.vision-overlay button.primary:disabled {
  background: #9fd0c9;
  border-color: #9fd0c9;
  opacity: 1;
  color: #ffffff;
}

.vision-overlay .icon {
  width: 17px;
  height: 17px;
}

.vision-header {
  height: 54px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  background: #ffffff;
  z-index: 3;
}

.vision-overlay button.vision-back {
  border: 0;
  box-shadow: none;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: transparent;
}

.vision-overlay button.vision-back:hover:not(:disabled) {
  color: #0f172a;
  background: #f1f5f9;
}

.vision-overlay button.vision-fullscreen {
  padding: 6px 11px;
  font-size: 12px;
  gap: 6px;
}

.vision-fullscreen .icon {
  width: 14px;
  height: 14px;
}

.vision-settings {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px;
}

.vision-settings h2 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.vision-settings h3 {
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 650;
}

.vision-subtitle {
  font-size: 13.5px;
  color: #475569;
  margin: 5px 0 18px;
}

.vision-config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vision-inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 550;
  color: #334155;
  min-width: 0;
}

.vision-inline-field > span {
  white-space: nowrap;
  flex-shrink: 0;
}

.vision-overlay input,
.vision-overlay select,
.vision-overlay textarea {
  font-family: inherit;
  font-size: 13.5px;
  color: #0f172a;
  border: 1px solid #d5dee7;
  border-radius: 9px;
  background: #ffffff;
  padding: 7px 10px;
  min-width: 0;
}

.vision-inline-field input,
.vision-inline-field select {
  width: 100%;
  height: 37px;
}

.vision-config-note {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 14px 0 16px;
}

.vision-screen-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.vision-screen-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.vision-screen-title h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vision-screen-title .icon {
  color: var(--teal, #0d7a6f);
}

#vision-ppi {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 99px;
}

.screen-presets {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.vision-overlay .screen-presets button {
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}

.vision-overlay .screen-presets .detect {
  color: var(--teal-dark, #095c53);
  background: #e6f5f2;
  border-color: #bce3dc;
  font-weight: 600;
}

.vision-resolution {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.vision-resolution input {
  background: #ffffff;
}

.vision-calibrated {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  border-radius: 13px;
  padding: 16px;
  color: #065f46;
  margin: 16px 0;
}

.vision-calibrated b {
  font-size: 14px;
}

.vision-calibrated p {
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 3px;
}

.vision-overlay .vision-calibrated button {
  font-size: 12.5px;
  padding: 6px 12px;
  color: #047857;
  border-color: #6ee7b7;
}

.vision-calibration {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
}

.vision-calibration > p {
  font-size: 12.5px;
  line-height: 1.5;
  color: #64748b;
  margin-top: 6px;
}

.vision-calibration-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.vision-overlay .vision-calibration-tabs button {
  border-radius: 99px;
  font-size: 12.5px;
  padding: 6px 14px;
}

.vision-overlay .vision-calibration-tabs .active {
  color: #ffffff;
  background: #0d7a6f;
  border-color: #0d7a6f;
  font-weight: 600;
}

.vision-calibration > p.vision-calibration-tip {
  font-size: 11.5px;
  color: #64748b;
}

.vision-ruler-box {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  margin: 14px 0;
}

.vision-ruler-box > p {
  font-size: 12.5px;
  text-align: center;
  color: #475569;
  margin: 12px 0 0;
}

.vision-ruler-scroll {
  overflow-x: auto;
  max-height: 450px;
  overflow: auto;
  padding: 0 0 5px;
}

.physical-ruler {
  height: 40px;
  border-radius: 5px;
  background: linear-gradient(90deg, #0d7a6f, #2563eb);
  max-width: none;
  flex-shrink: 0;
}

.physical-ruler.bank-card {
  height: auto;
  aspect-ratio: 85.6/53.98;
  background: linear-gradient(125deg, #0d7a6f, #2563eb);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 10px;
}

.physical-ruler.bank-card span {
  font-size: 13px;
}

.physical-ruler.bank-card b {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 3px;
}

.vision-ruler-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8e9aad;
  margin-top: 3px;
}

.vision-calibration-size {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #334155;
}

.vision-overlay #calibration-pixels {
  width: 70px;
  background: #ffffff;
  padding: 3px 6px;
  border: 1px solid #d5dee7;
  font-size: 13px;
  font-weight: 700;
}

.vision-overlay input[type=range] {
  width: 100%;
  accent-color: #0d7a6f;
  border: 0;
  padding: 0;
  margin: 8px 0 12px;
  cursor: ew-resize;
}

#calibration-estimate {
  margin-bottom: 14px;
  font-size: 12.5px;
}

.vision-recommendations {
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
  margin-top: 16px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.65;
}

.vision-recommendations > b {
  color: #0f172a;
  font-weight: 650;
}

.vision-recommendations p + p {
  margin-top: 5px;
}

.vision-recommendations .fits {
  color: #059669;
}

.vision-recommendations .limited {
  color: #dc2626;
}

.vision-fit-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}

.vision-config-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.vision-instructions h2 {
  text-align: center;
  margin: 0 0 16px;
  font-size: 19px;
}

.vision-instructions .vision-calibrated {
  margin: 0 0 16px;
}

.vision-instructions ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.vision-instructions li {
  padding-left: 4px;
  margin: 8px 0;
}

.vision-instructions b {
  color: #0f172a;
}

.vision-instruction-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 0;
}

.vision-clinical-note {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 16px;
  text-align: center;
}

.vision-clinical-note a {
  color: #475569;
  text-decoration: underline;
}

.vision-overlay.is-test {
  border-radius: 10px;
}

.vision-stage{position:relative;min-height:0;background:white;display:flex;flex-direction:column;overflow:hidden}

.stage-top {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  display: flex;
  gap: 7px;
}

.vision-board {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

#optotype-canvas {
  display: block;
  position: absolute;
  inset: 0;
}

.vision-level-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 29px;
  font-weight: 750;
  color: #111827;
  line-height: 1;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.vision-level-label.left {
  left: 32px;
}

.vision-level-label.right {
  right: 32px;
}

.vision-size-alert {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 60px;
  font-size: 12.5px;
  font-weight: 600;
  color: #b45309;
  text-align: center;
  z-index: 2;
}

.vision-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
  color: #475569;
  font-size: 12px;
  min-height: 48px;
  flex-shrink: 0;
  z-index: 2;
}

.vision-toolbar b {
  font-weight: 650;
  color: #0f172a;
}

.vision-hint {
  font-size: 10.5px;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  padding: 4px 8px;
  background: #ffffff;
  white-space: nowrap;
}

.vision-toolbar .answers {
  display: flex;
  gap: 5px;
  align-items: center;
}

.vision-overlay .vision-answer {
  width: 36px;
  height: 32px;
  border-radius: 6px;
  font-size: 15px;
  padding: 3px;
  text-align: center;
  text-transform: uppercase;
  color: #0f172a;
}

.vision-overlay .vision-symbol-answer {
  height: 32px;
  width: 38px;
  padding: 4px 7px;
  border-radius: 6px;
}

.vision-symbol-answer img {
  display: block;
}

.vision-overlay .vision-toolbar button {
  font-size: 12px;
  padding: 6px 10px;
}

.vision-overlay button.vision-random {
  border-color: #f0cf67;
  color: #92400e;
  background: #fffbeb;
}

.vision-overlay button.vision-unreadable {
  font-size: 11px;
  color: #64748b;
  border: 0;
  background: none;
  box-shadow: none;
  padding: 4px 6px;
}

.vision-overlay:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  overflow: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
}

.vision-overlay:fullscreen .vision-stage {
  height: 100vh !important;
  min-height: 0;
}

.vision-overlay:fullscreen .vision-header {
  position: sticky;
  top: 0;
}

.vision-overlay.is-expanded {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 80;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.vision-overlay.is-expanded .vision-stage {
  height: 100vh !important;
  min-height: 0;
}

.vision-result {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 36px;
  text-align: center;
  color: #475569;
  font-size: 14px;
}

.vision-success {
  color: #059669;
  margin: 0 auto 18px;
  height: 54px;
}

.vision-success .icon {
  width: 54px;
  height: 54px;
  stroke-width: 1.8;
}

.vision-result h2 {
  font-size: 20px;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 6px;
}

.vision-result-subtitle {
  color: #64748b;
  font-size: 14px;
}

.vision-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 700px;
  margin: 24px auto 22px;
}

.vision-result-grid.one {
  grid-template-columns: 1fr;
  max-width: 342px;
}

.vision-eye-result {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: var(--shadow, 0 2px 10px rgba(15, 23, 42, 0.05));
  background: #ffffff;
  text-align: center;
  min-width: 0;
}

.vision-eye-result > span {
  font-size: 13px;
  font-weight: 550;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.vision-eye-result > span .icon {
  width: 15px;
  height: 15px;
}

.vision-eye-result strong {
  display: block;
  font-size: 32px;
  color: #1d4ed8;
  line-height: 1.3;
  margin-top: 8px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.vision-eye-result strong.left-eye {
  color: #059669;
}

.vision-eye-result small {
  display: block;
  color: #92400e;
  font-size: 11px;
  line-height: 1.45;
  margin: 8px auto 0;
  max-width: 270px;
}

.vision-result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.vision-result-help {
  font-size: 12px;
  color: #64748b;
  margin-top: 18px;
}

.vision-trial-details,
.vision-save-details {
  max-width: 700px;
  margin: 22px auto 0;
  text-align: left;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
  font-size: 13px;
}

.vision-trial-details summary,
.vision-save-details summary {
  cursor: pointer;
  color: #334155;
  font-weight: 600;
}

.vision-trial-details > p {
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
  color: #64748b;
}

.vision-answer-history summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--teal-dark, #095c53);
  font-weight: 550;
}

.vision-answer-history ol {
  padding-left: 16px;
  margin-top: 8px;
  line-height: 1.8;
  font-size: 12px;
  white-space: nowrap;
}

#vision-save {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

#vision-save .field {
  font-size: 13px;
}

#vision-save button {
  justify-self: end;
}

.vision-gallery {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #ffffff;
  overflow: hidden;
}

.vision-gallery canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.vision-gallery-controls {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
}

.vision-physical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.vision-scale-field {
  margin-top: 14px;
}

.vision-scale-field select {
  max-width: 380px;
}

.vision-overlay .physical-ruler {
  box-sizing: border-box;
  border: 1.5px solid #0d7a6f;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  background: linear-gradient(135deg, #e6f5f2, #e0eefb);
  color: #0f172a;
  font-weight: 600;
  border-radius: 0;
  font-size: 12.5px;
}

.vision-overlay .physical-ruler.bank-card {
  border-radius: 10px;
}

.physical-ruler.bank-card span {
  font-size: 12.5px;
}

.vision-confirm-measure {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}

.vision-overlay .vision-confirm-measure input {
  width: 17px;
  height: 17px;
  flex: none;
  padding: 0;
  accent-color: #0d7a6f;
  margin-top: 2px;
}

.vision-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.vision-metrics span {
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
}

.vision-metrics strong {
  font-size: 17px;
  color: #095c53;
  font-variant-numeric: tabular-nums;
}

.vision-geometry {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vision-calibration .limited {
  color: #b45309;
}

.vision-result-conversion {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1000px) {
  .vision-resolution {
    grid-template-columns: 1fr;
  }
  .vision-resolution .vision-inline-field > span {
    min-width: 120px;
  }
  body.vision-page .clinic {
    max-width: 170px;
  }
  .vision-toolbar .vision-hint {
    font-size: 9.5px;
  }
}

@media (max-width: 767px) {
  body.vision-page #sidebar {
    transform: translateX(-100%);
  }
  body.vision-page .workspace {
    margin-left: 0;
  }
  body.vision-page.vision-menu-collapsed #sidebar {
    transform: none;
    z-index: 60;
  }
  body.vision-page #topbar {
    padding: 0 14px;
    gap: 12px;
  }
  .vision-top-actions {
    gap: 8px;
  }
  body.vision-page .clinic,
  .vision-language {
    display: none;
  }
  .vision-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .vision-card {
    min-height: 134px;
  }
  .vision-card strong {
    font-size: 15px;
  }
  body.vision-page #main {
    padding: 14px;
  }
  .vision-config-row,
  .vision-physical-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .vision-settings {
    padding: 16px;
  }
  .vision-inline-field > span {
    min-width: 118px;
  }
  .vision-inline-field > .muted {
    min-width: 0;
  }
  .vision-calibrated {
    flex-wrap: wrap;
  }
  .vision-gallery-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .vision-instruction-actions {
    flex-wrap: wrap;
  }
  .vision-page-title h1 {
    font-size: 14.5px;
  }
  .vision-level-label {
    font-size: 22px;
  }
  .vision-level-label.left {
    left: 20px;
  }
  .vision-level-label.right {
    right: 20px;
  }
  .vision-toolbar {
    padding: 8px 6px;
    gap: 6px;
  }
  .vision-result-grid {
    gap: 12px;
  }
  .vision-eye-result {
    padding: 18px 10px;
  }
  .vision-eye-result strong {
    font-size: 26px;
  }
  .vision-gallery-controls {
    width: 95%;
    justify-content: center;
  }
  .vision-metrics {
    gap: 6px;
  }
  .vision-metrics span {
    padding: 8px;
  }
  .vision-metrics strong {
    font-size: 14px;
  }
  .stage-top {
    gap: 4px;
  }
  .vision-stage .stage-top button {
    font-size: 11px;
  }
}

@media print {
  .vision-page .vision-top-actions,
  .vision-header,
  .vision-result-actions,
  .vision-save-details {
    display: none !important;
  }
  .vision-eye-result {
    box-shadow: none;
  }
}

@font-face {
  font-family: 'Care Snellen MK';
  src: url('fonts/snellen/SnellenMK.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: 'Care Reference Latin';
  src: url('fonts/visiond-reference/OptomDangLatinChart.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: 'Care Reference E';
  src: url('fonts/visiond-reference/OptomDangELetterChart-abcdef.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: 'Care Reference C';
  src: url('fonts/visiond-reference/OptomDangLandotC-abcdefgh.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: 'Care Reference Shapes';
  src: url('fonts/visiond-reference/OptomDangLeaChart-abcdef.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: 'Care Reference Numbers';
  src: url('fonts/visiond-reference/OptomDangNumber-1234567890.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}
