/* 左右眼光度表：验配单与独立验光登记共用这一套排版 */
.eye-form-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.eye-form-title h3 { margin: 0; font-size: 18px; font-weight: 600; }
/* 录入表格：项目一列、左右眼两列输入框。三列在 390px 上也放得下，
   以前是两只眼各一竖列共 14 个框，滚两屏才填完 */
.eye-form__grid { width: 100%; border-collapse: collapse; }
.eye-form__grid th, .eye-form__grid td { padding: 7px 6px; text-align: right; vertical-align: middle; }
.eye-form__grid thead th { font-size: 15px; color: var(--app-text-secondary); font-weight: 600; padding-bottom: 12px; }
.eye-form__grid tbody th { text-align: left; font-size: 15px; color: var(--app-text-secondary); font-weight: 400; }
.eye-form__grid td { width: 33%; }
.eye-form__grid .app-input { width: 100%; text-align: right; }
.eye-form__error { display: block; margin-top: 6px; color: var(--app-danger-text); font-size: 14px; text-align: left; }
.eye-form__error[hidden] { display: none; }

/* 新登记：列头对齐左右眼输入，保留公用表单的字号和触屏高度。 */
.eye-form--compact .eye-form__grid { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.eye-form--compact .eye-form__grid :is(th, td) { padding: 5px 4px; }
.eye-form--compact .eye-form__grid thead th { padding-block: 10px; text-align: center; background: var(--app-surface); }
.eye-form--compact .eye-form__grid thead th:first-child { width: 34%; text-align: left; border-radius: var(--app-radius) 0 0 var(--app-radius); }
.eye-form--compact .eye-form__grid thead th:last-child { border-radius: 0 var(--app-radius) var(--app-radius) 0; }
.eye-form--compact .eye-form__grid tbody th { padding-block-start: 17px; color: var(--app-text); font-weight: 500; }
.eye-form--compact .eye-form__grid tbody :is(th, td) { vertical-align: top; }
.eye-form--compact .eye-form__grid .app-input { text-align: center; font-variant-numeric: tabular-nums; appearance: textfield; }
.eye-form--compact .app-input::-webkit-inner-spin-button,
.eye-form--compact .app-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.eye-form__unit { display: inline-block; color: var(--app-text-secondary); white-space: nowrap; }
.eye-form__more { width: 100%; margin-top: 8px; gap: 8px; }
.eye-form__more::after { content: ''; width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.eye-form__more[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(225deg); }

/* 项目与双眼数值纵向对照，长字段名允许在项目列换行。 */
.eye-summary { min-width: 0; }
.eye-summary__table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.eye-summary__table th, .eye-summary__table td { padding: 12px 10px; text-align: right;
  border-bottom: 1px solid var(--app-line); }
.eye-summary__table th:first-child { width: 40%; text-align: left; }
.eye-summary__table thead th { font-size: 15px; color: var(--app-text-secondary); font-weight: 600; }
.eye-summary__table tbody th { text-align: left; font-size: 15px; font-weight: 400; overflow-wrap: anywhere; }
.eye-summary__table td { font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.eye-summary__unit { display: inline-block; font-size: 14px; color: var(--app-text-secondary); }
.eye-summary__table tr:last-child th, .eye-summary__table tr:last-child td { border-bottom: 0; }
.eye-summary__empty { margin: 0; font-size: 16px; color: var(--app-text-secondary); }
@media (max-width: 359px) {
  .eye-form-title { flex-wrap: wrap; }
  .eye-form__grid th, .eye-form__grid td { padding-inline: 4px; }
  .app .app-modal .eye-form--compact .eye-form__grid .app-input { padding-inline: 8px; }
  .eye-summary__table th, .eye-summary__table td { padding-inline: 6px; }
}

/* 验光单宽表：只有表格能横向滚动，滚过去仍保留眼别。 */
.eye-summary--horizontal { max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  border: 1px solid var(--app-line); border-radius: var(--app-radius); scrollbar-width: thin; }
.eye-summary--horizontal .eye-summary__table { table-layout: auto; border-collapse: separate; border-spacing: 0; }
.eye-summary--horizontal .eye-summary__table :is(th, td) { padding: 10px; text-align: center; white-space: nowrap; }
.eye-summary--horizontal .eye-summary__table thead th { background: var(--app-surface); line-height: 1.35;
  border-bottom: 1px solid var(--app-line); }
.eye-summary--horizontal .eye-summary__unit { display: block; margin-top: 3px; }
.eye-summary--horizontal .eye-summary__table th:first-child { position: sticky; inset-inline-start: 0; z-index: 1;
  width: 1%; background: var(--app-white); border-inline-end: 1px solid var(--app-line); font-weight: 600; }
.eye-summary--horizontal .eye-summary__table thead th:first-child { background: var(--app-surface); }

.eye-sign-wrap { display: flex; align-items: stretch; gap: 4px; }
.eye-sign-wrap .app-input { flex: 1; min-width: 0; }
.eye-sign-btn {
  flex: 0 0 36px; min-height: 44px; padding: 0;
  border: 1px solid var(--app-line); border-radius: var(--app-radius);
  background: var(--app-surface); color: var(--app-text);
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.eye-sign-btn:active { background: var(--app-hover); transform: scale(0.95); }
