/* Pooja Hospital HMS v2 — Deep Navy + Electric Blue */
:root {
  --sidebar-bg: #0b1437;
  --sidebar-active: #1e3a8a;
  --sidebar-muted: #5b7fbd;
  --sidebar-text-active: #93c5fd;
  --sidebar-accent: #3b82f6;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --page-bg: #f0f4ff;
  --card: #ffffff;
  --card-border: #e2e8f0;
  --table-head: #f8faff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --waiting-bg: #fef3c7;
  --waiting-text: #92400e;
  --process-bg: #dbeafe;
  --process-text: #1e40af;
  --done-bg: #d1fae5;
  --done-text: #065f46;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --sidebar-w: 240px;
  --sidebar-collapsed: 64px;
  --header-h: 60px;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-input: 8px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.5;
  font-weight: 400;
  padding-bottom: env(safe-area-inset-bottom);
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-muted);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: width 0.2s ease, transform 0.2s ease;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-section-title {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--sidebar-text-active);
}
.sidebar-brand-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0 1rem;
}
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 0.75rem 1rem 0.35rem;
  opacity: 0.85;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  margin: 0 0.5rem 0.15rem;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-weight: 500;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text-active);
  text-decoration: none;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-accent);
}
.nav-item svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.2s ease;
}
.sidebar.collapsed ~ .main-wrap {
  margin-left: var(--sidebar-collapsed);
}

.top-header {
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
  height: var(--header-h);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-card);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.sidebar-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--card-border);
  background: var(--table-head);
  border-radius: var(--radius-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.page-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.header-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.header-user strong {
  color: var(--text);
  font-weight: 600;
}
.badge-role {
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--table-head);
  color: var(--primary);
  font-weight: 600;
  text-transform: capitalize;
}

.content-area {
  padding: 1.25rem;
  flex: 1;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-btn);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.flash.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.flash.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--card-border);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.15rem;
}
.card-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 1100px) {
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .grid-stats {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--primary);
  position: relative;
}
.stat-card.stat-wait {
  border-left-color: var(--warning);
}
.stat-card.stat-done {
  border-left-color: var(--success);
}
.stat-card.stat-follow {
  border-left-color: #8b5cf6;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  font-weight: 500;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.stat-trend {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table thead th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  background: var(--table-head);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table tbody tr:nth-child(even) {
  background: var(--table-head);
}
.data-table tbody tr:nth-child(odd) {
  background: #fff;
}
.data-table tbody td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: #eff6ff !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 38px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
/* Anchor styled as primary: global a:hover must not turn label blue on blue */
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:focus-visible {
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.btn-secondary:hover {
  background: #f8fafc;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  filter: brightness(0.92);
}
.user-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.user-delete-form {
  display: inline;
  margin: 0;
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: #eff6ff;
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-btn);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.req::after {
  content: " *";
  color: var(--danger);
  font-weight: 700;
}
.input,
select.input,
textarea.input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.input:focus,
select.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #3b82f6;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-badge.waiting {
  background: var(--waiting-bg);
  color: var(--waiting-text);
}
.status-badge.in_process {
  background: var(--process-bg);
  color: var(--process-text);
}
.status-badge.completed {
  background: var(--done-bg);
  color: var(--done-text);
}
.status-badge.neutral {
  background: #e5e7eb;
  color: #475569;
}
.status-badge.active-doc {
  background: var(--done-bg);
  color: var(--done-text);
}

.pill-overdue {
  background: #fee2e2;
  color: #b91c1c;
}
.pill-today {
  background: #fef3c7;
  color: var(--waiting-text);
}
.pill-upcoming {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 1.25rem;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.filter-tag button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
  opacity: 0.7;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}
.empty-state img {
  max-width: 220px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}
.empty-state h3 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ——— Visit queue (board + table) ——— */
.queue-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.queue-page__intro {
  margin-bottom: 0;
}
.queue-page__intro-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}
.queue-page__intro-muted {
  color: var(--text-muted);
  font-weight: 400;
}

.q-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 720px) {
  .q-summary {
    grid-template-columns: 1fr;
  }
}
.q-summary-card {
  border: none;
  cursor: pointer;
  text-align: left;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s ease, box-shadow 0.12s ease, outline 0.12s ease;
  outline: 2px solid transparent;
}
.q-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.q-summary-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.q-summary-card.is-active {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}
.q-summary-card--waiting.is-active {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}
.q-summary-card--in_process.is-active {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
.q-summary-card--completed.is-active {
  outline: 3px solid #10b981;
  outline-offset: 2px;
}
.q-summary-card--waiting {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  color: #78350f;
  border: 1px solid #fde68a;
}
.q-summary-card--in_process {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}
.q-summary-card--completed {
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.q-summary-card__count {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.q-summary-card__label {
  font-size: 1rem;
  font-weight: 700;
}
.q-summary-card__hint {
  font-size: 0.6875rem;
  opacity: 0.75;
  margin-top: 0.15rem;
}

.q-filter-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #1e40af;
}
.q-filter-banner[hidden] {
  display: none !important;
}

.q-kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
@media (max-width: 1024px) {
  .q-kanban {
    grid-template-columns: 1fr;
  }
}
.q-kanban__col {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-card);
  min-height: 0;
  max-height: min(56vh, 520px);
}
.q-kanban__col--waiting {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 28%);
}
.q-kanban__col--in_process {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 28%);
}
.q-kanban__col--completed {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 28%);
}
.q-kanban__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  font-weight: 700;
  font-size: 0.875rem;
}
.q-kanban__title {
  color: var(--text);
}
.q-kanban__badge {
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text-secondary);
}
.q-kanban__col--waiting .q-kanban__badge {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.q-kanban__col--in_process .q-kanban__badge {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.q-kanban__col--completed .q-kanban__badge {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}
.q-kanban__body {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.q-kanban__body::-webkit-scrollbar {
  width: 8px;
}
.q-kanban__body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 8px;
}
.q-kanban__empty {
  margin: 0;
  padding: 1.25rem 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.q-patient-card {
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: #fff;
  margin-bottom: 0.65rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.q-patient-card:last-child {
  margin-bottom: 0;
}
.q-patient-card__link {
  display: block;
  padding: 0.75rem 0.85rem 0.35rem;
  color: inherit;
  text-decoration: none;
}
.q-patient-card__link:hover {
  background: rgba(248, 250, 252, 0.95);
  color: inherit;
}
.q-patient-card__token {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}
.q-patient-card__name {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.3;
}
.q-patient-card__meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}
.q-patient-card__sep {
  margin: 0 0.2rem;
  opacity: 0.5;
}
.q-patient-card__wait {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}
.q-patient-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0.75rem;
  border-top: 1px solid var(--card-border);
  background: var(--table-head);
}
.q-patient-card__form {
  display: inline;
}

.queue-table-card {
  margin-top: 0.25rem;
}
.queue-table-card__sub {
  margin: -0.35rem 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.q-table-row.is-filtered-out {
  display: none;
}

/* Queue table (modern): row tint + token + service time */
.queue-table-modern .q-queue-token-cell {
  vertical-align: middle;
}
.queue-table-modern .q-queue-token {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.queue-table-modern tr.q-table-row--waiting {
  background: rgba(254, 243, 199, 0.45);
}
.queue-table-modern tr.q-table-row--completed {
  background: rgba(209, 250, 229, 0.45);
}
.queue-table-modern .q-table-actions {
  white-space: nowrap;
}
.queue-table-modern .q-inline-form {
  display: inline;
}
.q-action-ico {
  margin-right: 0.15rem;
  font-style: normal;
}
.queue-svc {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}
.queue-svc--fast {
  color: #15803d;
}
.queue-svc--warn {
  color: #a16207;
}
.queue-svc--slow {
  color: #b91c1c;
}
.status-badge.status-badge--queue.waiting {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #eab308;
}
.status-badge.status-badge--queue.in_process {
  background: #bfdbfe;
  color: #1e40af;
  border: 1px solid #3b82f6;
}
.status-badge.status-badge--queue.completed {
  background: #bbf7d0;
  color: #166534;
  border: 1px solid #22c55e;
}

/* Legacy queue list (if used elsewhere) */
.queue-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 960px) {
  .queue-columns {
    grid-template-columns: 1fr;
  }
}
.queue-col {
  background: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  min-height: 160px;
}
.queue-col-head {
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.queue-col-body {
  padding: 0.65rem;
}
.queue-card {
  background: var(--table-head);
  border-radius: 8px;
  padding: 0.65rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--card-border);
  font-size: 0.8125rem;
}
.queue-card .name {
  font-weight: 600;
  color: var(--text);
}
.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.wait-live {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--primary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: var(--radius-card);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}
.modal h3 {
  margin: 0 0 1rem;
  font-weight: 600;
}
.modal--sm {
  max-width: 22rem;
  padding: 1.1rem 1.15rem 1.15rem;
  text-align: center;
}
.visit-thank-pop__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}
.visit-thank-pop__line {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.visit-thank-pop__token {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary, #2563eb);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.visit-thank-pop__sub {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.visit-thank-pop__hint {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.visit-thank-pop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.15rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--table-head);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 99;
}
.sidebar-backdrop.show {
  display: block;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--sidebar-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 150;
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  color: var(--sidebar-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.35rem 0.15rem;
  text-decoration: none;
}
.bottom-nav a:hover,
.bottom-nav a.active {
  color: var(--sidebar-text-active);
}
.bottom-nav svg {
  display: block;
  margin: 0 auto 0.15rem;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrap {
    margin-left: 0 !important;
  }
  .bottom-nav {
    display: flex;
  }
  .content-area {
    padding-bottom: 4.5rem;
  }
}

@media (min-width: 901px) {
  .bottom-nav {
    display: none !important;
  }
}

.quick-search {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 480px;
}
.quick-search .input {
  flex: 1;
  min-width: 160px;
}

.dashboard-quick-card {
  margin-bottom: 0.25rem;
}
.dashboard-quick-title {
  margin: 0 0 1rem;
}
.dashboard-quick-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem 1.25rem;
  width: 100%;
}
.dashboard-quick-row--search-only .dashboard-quick-col--search {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}
.dashboard-quick-col {
  box-sizing: border-box;
  min-width: 0;
}
.dashboard-quick-col--search {
  flex: 1 1 50%;
  width: 50%;
  display: flex;
  align-items: center;
}
.dashboard-quick-col--actions {
  flex: 1 1 50%;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.dashboard-quick-search-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}
.dashboard-quick-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0.65rem 0.95rem;
  font-size: 0.9375rem;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-quick-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}
.dashboard-quick-submit {
  flex-shrink: 0;
  min-height: 48px;
  border-radius: 10px;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  font-weight: 600;
}
.dashboard-quick-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.dashboard-btn-new-patient {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.dashboard-btn-plus {
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .dashboard-quick-row:not(.dashboard-quick-row--search-only) {
    flex-direction: column;
  }
  .dashboard-quick-col--search,
  .dashboard-quick-col--actions {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
  .dashboard-quick-col--actions {
    justify-content: flex-start;
  }
  .dashboard-quick-actions {
    justify-content: flex-start;
  }
}

/* —— Reports / analytics dashboard —— */
.rep-dashboard {
  max-width: 1200px;
  margin: 0 auto;
}
.rep-head {
  margin-bottom: 0.65rem;
}
.rep-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.rep-lead {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.rep-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}
.rep-filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.rep-filter-btn {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.rep-filter-btn:hover {
  background: #e2e8f0;
  color: #334155;
}
.rep-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.rep-filter-btn--custom .rep-chevron {
  font-size: 0.65rem;
  margin-left: 0.15rem;
  opacity: 0.85;
}
.rep-custom-wrap {
  position: relative;
}
.rep-custom-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  min-width: 280px;
  padding: 0.65rem 0.75rem 0.75rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.65rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}
.rep-custom-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
}
.rep-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.rep-field label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.rep-filter-tags {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.15rem;
}
.rep-range-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-weight: 500;
}
.rep-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
@media (max-width: 900px) {
  .rep-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .rep-kpi-grid {
    grid-template-columns: 1fr;
  }
}
.rep-kpi-card {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.rep-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.rep-kpi-icon {
  display: flex;
  color: var(--primary);
  opacity: 0.9;
}
.rep-kpi-trend {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.rep-kpi-trend--good {
  color: #059669;
}
.rep-kpi-trend--bad {
  color: #dc2626;
}
.rep-kpi-trend--neutral {
  color: #64748b;
}
.rep-kpi-value {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}
.rep-kpi-label {
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.rep-kpi-sub {
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  color: #94a3b8;
}
.rep-insight-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 0.75rem 1rem 0.85rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.06);
}
.rep-insight-head {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.rep-insight-list {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  font-size: 0.8125rem;
  color: #334155;
  line-height: 1.55;
}
.rep-insight-narr {
  margin: 0;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
}
.rep-section {
  margin-bottom: 0.75rem;
}
.rep-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.rep-section-title--inline {
  margin: 0;
}
.rep-section-lead {
  margin: -0.15rem 0 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.rep-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.rep-chart-grid--single {
  grid-template-columns: 1fr;
  max-width: 52rem;
}
@media (max-width: 900px) {
  .rep-chart-grid {
    grid-template-columns: 1fr;
  }
}
.rep-chart-card {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  padding: 14px 16px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  min-height: 0;
}
.rep-chart-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}
.rep-chart-hint {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.6875rem;
  color: #94a3b8;
  line-height: 1.35;
}
.rep-chart-canvas {
  position: relative;
  width: 100%;
  height: 220px;
  min-height: 200px;
}
.rep-chart-canvas--wide {
  height: 260px;
  min-height: 220px;
}
.rep-chart-canvas canvas {
  max-width: 100% !important;
}
.rep-table-card {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  padding: 0.5rem 0.65rem 0.65rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.rep-doc-table tbody tr:hover {
  background: #f8fafc;
}
.rep-table-empty {
  color: #94a3b8;
  text-align: center;
  padding: 1rem !important;
}
.rep-follow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.rep-empty-note {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.rep-section--followups {
  margin-bottom: 1.25rem;
}

.data-table--dense thead th {
  padding: 0.4rem 0.55rem;
  font-size: 0.68rem;
}
.data-table--dense tbody td {
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 800px) {
  .metric-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
.metric-pill {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.metric-pill .v {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}
.metric-pill .l {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.refraction-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 800px) {
  .refraction-grid {
    grid-template-columns: 1fr;
  }
}
.refraction-block h4 {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Refraction page header (premium) */
.refraction-page-head--lux {
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 48%, #eef2ff 100%);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.refraction-page-head-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.refraction-page-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.refraction-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.refraction-page-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 42rem;
}
.refraction-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Primary action on refraction page — stands out from Queue / Patient */
.btn.btn-dry-ref-highlight {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid #1d4ed8;
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(37, 99, 235, 0.38);
}
.btn.btn-dry-ref-highlight:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-color: #1e40af;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
}
.btn.btn-dry-ref-highlight:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* Prescription sheet — production clinical */
.refraction-card--rx {
  position: relative;
  border: 1px solid #d4d4d8;
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.refraction-card--rx::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #3b82f6;
  opacity: 0.85;
  pointer-events: none;
}
.ref-rx-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e4e4e7;
}
.ref-rx-toolbar-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}
.ref-rx-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #1e40af;
  background: #e8f0fe;
  border: 1px solid #bfdbfe;
}
.ref-rx-heading {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.ref-rx-toolbar-hint {
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 38rem;
}
.ref-rx-toolbar-hint strong {
  color: #1e3a8a;
  font-weight: 600;
}
.ref-rx-kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  margin: 0 0.1rem;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 0 #e4e4e7;
  vertical-align: middle;
}
.ref-rx-copy-btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: #1e40af;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.ref-rx-copy-btn:hover {
  border-color: var(--primary);
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.ref-rx-copy-btn:active {
  transform: translateY(1px);
}

.ref-rx-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.25rem;
  border-radius: 8px;
  border: 1px solid #d4d4d8;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ref-rx-col-corner {
  width: 3.25rem;
  min-width: 2.75rem;
  max-width: 4rem;
}
/* Six data columns share remaining width equally (table-layout: fixed). */
.ref-rx-col-data {
  width: auto;
}
.ref-rx-table {
  width: 100%;
  min-width: 420px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.ref-rx-table th,
.ref-rx-table td {
  border-bottom: 1px solid #d4d4d8;
  border-right: 1px solid #d4d4d8;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}
.ref-rx-table thead th {
  border-top: none;
}
.ref-rx-table tbody tr:last-child th,
.ref-rx-table tbody tr:last-child td {
  border-bottom: none;
}
.ref-rx-table th:last-child,
.ref-rx-table td:last-child {
  border-right: none;
}
.ref-rx-th-corner {
  width: 3.25rem;
  min-width: 2.75rem;
  background: #f4f4f5;
  border-right: 1px solid #d4d4d8 !important;
}
.ref-rx-th-eye {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  padding: 0.5rem 0.35rem;
}
.ref-rx-th-eye--re {
  background: #e8f0fe;
  color: #1e3a8a;
  border-bottom: 1px solid #cbd5e1 !important;
}
.ref-rx-th-eye--le {
  background: #eef1f5;
  color: #334155;
  border-bottom: 1px solid #cbd5e1 !important;
}
.ref-rx-th-metric,
.ref-rx-td {
  padding: 0.42rem 0.4rem;
}
.ref-rx-th-metric {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #52525b;
  background: #fafafa;
  border-bottom: 1px solid #d4d4d8 !important;
}
.ref-rx-th-metric--re {
  color: #1d4ed8;
  background: #f8fafc;
}
.ref-rx-th-metric--le {
  color: #475569;
  background: #fafafa;
}
.ref-rx-td--re {
  background: #fafdff;
}
.ref-rx-td--le {
  background: #ffffff;
}
.ref-rx-td--re-last {
  border-right: 2px solid #94a3b8;
}
.ref-rx-row-label {
  text-align: left !important;
  padding: 0.55rem 0.65rem;
  border-right: 1px solid #d4d4d8 !important;
  vertical-align: middle;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: #0f172a;
  background: #fafafa;
}
.ref-rx-row--dist .ref-rx-row-label {
  background: #f4f4f5;
}
.ref-rx-row--near .ref-rx-row-label {
  background: #fafafa;
}
.ref-rx-input-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.ref-rx-auto-hint {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}
.ref-rx-input {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: inherit;
  line-height: 1.25;
  padding: 0.42rem 0.35rem;
  border-radius: 6px;
  border: 1px solid #d4d4d8;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.ref-rx-td > .ref-rx-input {
  display: block;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}
.ref-rx-td .ref-rx-input-stack {
  width: 50%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.ref-rx-td .ref-rx-input-stack .ref-rx-input {
  width: 100%;
}
.ref-rx-input:hover {
  border-color: #a1a1aa;
  background: #fff;
}
.ref-rx-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.ref-rx-input--auto-filled {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}
.ref-rx-row--near .ref-rx-input:not(.ref-rx-input--auto-filled) {
  background: #fff;
}

@media (max-width: 640px) {
  .ref-rx-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ref-rx-copy-btn {
    width: 100%;
  }
  .ref-rx-table {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .ref-rx-table thead {
    display: none;
  }
  .ref-rx-table tbody {
    display: block;
  }
  .ref-rx-row {
    display: block;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    margin-bottom: 0.65rem;
    overflow: hidden;
    background: #fff;
  }
  .ref-rx-row-label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-right: none !important;
    border-bottom: 1px solid #e4e4e7;
  }
  .ref-rx-td {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
    border-right: none !important;
    border-bottom: 1px solid #e4e4e7;
    text-align: left;
    padding: 0.5rem 0.65rem;
  }
  .ref-rx-row .ref-rx-td:last-of-type {
    border-bottom: none;
  }
  .ref-rx-td::before {
    content: attr(data-eye) " · " attr(data-field);
    flex: 0 0 5.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
  }
  .ref-rx-td > .ref-rx-input {
    flex: 1 1 auto;
    width: 50%;
    max-width: min(50%, 9.5rem);
    margin-left: auto;
    margin-right: auto;
  }
  .ref-rx-td > .ref-rx-input-stack {
    flex: 1 1 auto;
    width: 50%;
    max-width: min(50%, 9.5rem);
    margin-left: auto;
    margin-right: auto;
  }
  .ref-rx-td--re-last {
    border-right: none !important;
  }
}

@media (max-width: 480px) {
  .ref-rx-input {
    font-size: 0.875rem;
    padding: 0.4rem 0.28rem;
  }
}

.refraction-eyes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
@media (max-width: 800px) {
  .refraction-eyes {
    grid-template-columns: 1fr;
  }
}
.refraction-eyes .refraction-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-input);
  padding: 0.75rem 0.85rem 0.85rem;
}
.ref-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 5.5rem));
  gap: 0.5rem 0.65rem;
  align-items: end;
}
.ref-metric-field {
  margin-bottom: 0 !important;
}
.ref-metric-field label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.2rem;
}
.input-ref {
  width: 100%;
  max-width: 5.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0.42rem 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.ref-va-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: flex-end;
}
.ref-va-field {
  margin-bottom: 0 !important;
}
.input-ref-va {
  width: 100%;
  max-width: 7.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0.42rem 0.5rem;
  font-size: 0.875rem;
}
.refraction-hint {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.ref-fu-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

/* Refraction: VA + follow-up + remarks clinical panel */
.ref-clinical-panel {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
}
.ref-clinical-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: stretch;
}
@media (max-width: 820px) {
  .ref-clinical-grid {
    grid-template-columns: 1fr;
  }
}
.ref-clinical-col--stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.ref-clinical-col--remarks {
  display: flex;
  min-width: 0;
}
.ref-clinical-card {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-card);
  padding: 0.7rem 0.95rem 0.8rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.04);
}
.ref-clinical-card-title {
  margin: 0 0 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e8edf4;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.ref-va-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
}
.ref-va-eye {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}
.ref-va-eye-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.ref-va-input {
  width: 100%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
}
.ref-fu-date-row {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.45rem;
}
.ref-fu-date-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}
.ref-fu-date-input {
  width: 100%;
  max-width: 100%;
  border-radius: 0.5rem;
  padding: 0.42rem 0.55rem;
}
.ref-clinical-card .ref-fu-quick {
  margin-top: 0.15rem;
}
.ref-fu-quick-btn {
  appearance: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.ref-fu-quick-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #334155;
}
.ref-fu-quick-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.ref-fu-quick-btn--active {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.28);
}
.ref-clinical-footnote {
  margin: 0.45rem 0 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.ref-remarks-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ref-remarks-textarea {
  flex: 1;
  min-height: 6.5rem;
  resize: vertical;
  border-radius: 0.65rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.55rem 0.7rem;
  font-size: 0.875rem;
  line-height: 1.45;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.ref-remarks-textarea:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}
.ref-remarks-textarea::placeholder {
  color: #94a3b8;
}
.ref-clinical-actions {
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--card-border);
}
.btn-ref-save {
  padding: 0.5rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.refraction-form .refraction-card .form-group {
  margin-bottom: 0.65rem;
}

/* Patient registry — premium SaaS */
.patient-registry-card--premium {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 28px rgba(15, 23, 42, 0.06);
  border: 1px solid #e8ecf2;
  padding: 1.15rem 1.25rem 1.2rem;
}
.pr-registry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  margin-bottom: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
}
.pr-registry-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.pr-registry-sub {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36rem;
}
.pr-registry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pr-btn-new-patient {
  flex-shrink: 0;
  height: 40px;
  padding: 0 1.1rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.pr-btn-old-patient {
  flex-shrink: 0;
  height: 40px;
  padding: 0 1rem;
  font-weight: 600;
}
.modal--register {
  max-width: 520px;
}
/* Native [hidden] is overridden by our flex/block rules — force hide for modal panels and footers. */
.modal--register [hidden] {
  display: none !important;
}
.np-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}
.np-old-fee-row {
  margin-top: 0.85rem;
}
.np-mid-group .np-mid-input {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #eff6ff 0%, #e0e7ff 100%);
  border-color: #c7d2fe;
  color: #1e3a8a;
}
.np-old-lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.np-old-search-wrap {
  position: relative;
}
.np-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
.np-dd-empty {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.np-dd-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.np-dd-row:last-child {
  border-bottom: none;
}
.np-dd-row:hover {
  background: #f8fafc;
}
.np-dd-main {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.np-dd-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.np-dd-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}
.np-dd-row--blocked {
  cursor: not-allowed;
  opacity: 0.72;
  background: #fafafa;
}
.np-dd-row--blocked:hover {
  background: #fafafa;
}
.np-dd-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.08rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  vertical-align: middle;
}
.pr-visit-locked {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  max-width: 7rem;
  line-height: 1.25;
  text-align: center;
}
.np-old-summary {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
}
.np-old-summary .np-old-v {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
.np-old-start-main {
  margin-top: 0.75rem;
  width: 100%;
}

/* Documents visit — simple upload + preview */
.doc-visit-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.doc-visit-title {
  margin: 0;
}
.doc-visit-meta {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.doc-upload-card {
  text-align: center;
}
.doc-upload-hint {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}
.doc-file-input-hidden {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}
.doc-upload-hero {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.75rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.22);
}
.doc-upload-hero:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.doc-upload-hero__icon {
  display: flex;
  color: rgba(255, 255, 255, 0.95);
}
.doc-upload-hero__label {
  line-height: 1.3;
}
.doc-upload-status {
  margin-top: 1rem;
  min-height: 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--success, #15803d);
}
.doc-upload-status--err {
  color: var(--danger, #b91c1c);
}
.doc-upload-spinner {
  display: none;
  margin-top: 0.75rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.doc-upload-spinner.doc-upload-spinner--visible {
  display: inline-flex;
}
.doc-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #e2e8f0;
  border-top-color: var(--primary, #2563eb);
  border-radius: 50%;
  animation: doc-spin 0.75s linear infinite;
}
@keyframes doc-spin {
  to {
    transform: rotate(360deg);
  }
}
.doc-files-title {
  margin-bottom: 0.75rem;
}
.doc-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.doc-file-list-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.doc-file-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.doc-file-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.doc-file-card__name {
  flex: 1 1 12rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.doc-file-card__meta {
  flex: 1 1 100%;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.doc-file-card__action {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary, #2563eb);
}
.modal--doc-preview {
  max-width: min(960px, 100vw - 2rem);
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.doc-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}
.doc-preview-title {
  margin: 0;
  font-size: 1.05rem;
}
.doc-preview-close {
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}
.doc-preview-close:hover {
  background: #f1f5f9;
  color: var(--text);
}
.doc-preview-filename {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  word-break: break-all;
  border-bottom: 1px solid #f1f5f9;
}
.doc-preview-body {
  flex: 1;
  min-height: 50vh;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.doc-preview-img {
  max-width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  display: block;
}
.doc-preview-iframe {
  width: 100%;
  min-height: min(78vh, 900px);
  height: 78vh;
  border: 0;
  background: #fff;
}

.pr-icon-plus {
  flex-shrink: 0;
  display: block;
}
.patient-filter-tags.pr-filter-tags {
  margin-bottom: 0.65rem;
  min-height: 0;
}
.filter-tag.pr-filter-tag {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.45rem 0.2rem 0.65rem;
  font-weight: 600;
  font-size: 0.75rem;
}
.pr-filter-tag-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.85rem;
  line-height: 1;
  color: #64748b;
  border-radius: 4px;
}
.pr-filter-tag-remove:hover {
  color: var(--danger);
  background: #fef2f2;
}
.patient-filters-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.patient-filters-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}
.patient-filters-toggle:hover {
  background: rgba(241, 245, 249, 0.8);
}
.patient-filters-chevron {
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.2s ease;
}
.patient-filters-card.is-open .patient-filters-chevron {
  transform: rotate(180deg);
}
.patient-filters-body {
  padding: 0 0.9rem 0.85rem;
  border-top: 1px solid #eef2f7;
}
.patient-filters-form {
  padding-top: 0.65rem;
}
.patient-filters-row {
  display: grid;
  gap: 0.5rem 0.75rem;
  align-items: end;
}
.patient-filters-row--r1 {
  grid-template-columns: minmax(8rem, 2fr) minmax(5.5rem, 0.75fr) minmax(7rem, 1.15fr) minmax(8rem, 1fr);
}
.patient-filters-row--r2 {
  margin-top: 0.5rem;
  grid-template-columns: minmax(7rem, 1fr) minmax(7rem, 1fr) minmax(12rem, 1.5fr);
}
.patient-filters-form .form-group {
  margin-bottom: 0;
}
.patient-filters-form .form-group label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.28rem;
}
.patient-filters-row .fg-follow--check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.15rem;
}
@media (max-width: 960px) {
  .patient-filters-row--r1 {
    grid-template-columns: 1fr 1fr;
  }
  .patient-filters-row--r1 .fg-search {
    grid-column: 1 / -1;
  }
  .patient-filters-row--r2 {
    grid-template-columns: 1fr 1fr;
  }
  .patient-filters-row--r2 .fg-follow--check {
    grid-column: 1 / -1;
  }
}
@media (max-width: 520px) {
  .patient-filters-row--r1,
  .patient-filters-row--r2 {
    grid-template-columns: 1fr;
  }
}
.patient-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.patient-checkbox-label input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}
.input--compact {
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
}
.pr-table-shell {
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  overflow: hidden;
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.pr-data-table tbody tr:nth-child(odd) {
  background: #fff;
}
.pr-data-table tbody tr:nth-child(even) {
  background: #f6f8fc;
}
.pr-data-table tbody tr:hover {
  background: #e8f1ff !important;
}
.pr-data-table tbody td {
  padding: 0.58rem 0.75rem;
  font-size: 0.8125rem;
  vertical-align: middle;
  border-bottom: 1px solid #e8ecf2;
}
.pr-data-table thead th {
  padding: 0.55rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--card-border);
}
.pr-data-table .th-num,
.pr-data-table .th-actions {
  text-align: right;
}
.pr-data-table thead th:nth-child(8),
.pr-data-table tbody td:nth-child(8) {
  text-align: center;
}
.pr-data-table td:last-child {
  text-align: right;
}
.pr-mid {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.pr-name-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.pr-name-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}
/* Mobile: readable digits, no “input chip” — matches row height & clinical grid */
.pr-mobile {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 500;
  font-size: 0.8125rem;
  color: #475569;
  letter-spacing: 0.03em;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.35;
}
.pr-fu-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.pr-fu-badge--none {
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 600;
}
.pr-fu-badge--today {
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.15);
}
.pr-fu-badge--overdue {
  background: #fecaca;
  color: #7f1d1d;
}
.pr-fu-badge--upcoming {
  background: #fef3c7;
  color: #92400e;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}
.pr-fu-badge--future {
  background: #f1f5f9;
  color: #64748b;
}
.pr-visits-cell {
  text-align: center;
}
.pr-visits-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: #e0e7ff;
  color: #3730a3;
  font-variant-numeric: tabular-nums;
}
.pr-table-row {
  cursor: pointer;
  transition: background 0.1s ease;
}
.pr-table-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.pr-actions-cell {
  cursor: default;
}
.pr-actions-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.55rem;
}
.pr-btn-visit {
  height: 30px;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}
.pr-history-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 0.15rem 0.1rem;
  border-radius: 4px;
}
.pr-history-link:hover {
  text-decoration: underline;
  background: rgba(37, 99, 235, 0.06);
}
.patient-loading-cell {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}
.patient-empty-wrap {
  padding: 0 !important;
  border: none !important;
  vertical-align: middle;
}
.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.pr-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
}
.pr-pager-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 28rem;
}
.pr-pager-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pr-pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
}
.pr-pager-btn {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.pr-pager-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}
.pr-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pr-pager-page {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.pr-pager-page strong {
  color: var(--text);
  font-weight: 700;
}
.pr-empty-state {
  text-align: center;
  padding: 2.25rem 1.25rem 2.5rem;
}
.pr-empty-illustration {
  margin-bottom: 0.75rem;
}
.pr-empty-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.pr-empty-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.doctor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.badge-count {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--table-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Standalone login — premium SaaS */
body:has(.login-page) {
  background: #f1f5f9;
}
.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 460px);
  font-family: var(--font);
}
.login-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #0c1929 0%, #1e3a8a 42%, #2563eb 78%, #3b82f6 100%);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 15% 85%, rgba(147, 197, 253, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 12%, rgba(96, 165, 250, 0.25), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.12), transparent 65%);
  pointer-events: none;
}
.login-visual-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  opacity: 0.55;
}
.login-shape--1 {
  width: 220px;
  height: 220px;
  left: -8%;
  top: 10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
}
.login-shape--2 {
  width: 160px;
  height: 160px;
  right: 5%;
  bottom: 18%;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.2), transparent 65%);
}
.login-shape--3 {
  width: 100px;
  height: 100px;
  right: 22%;
  top: 22%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}
.login-shape--4 {
  width: 140px;
  height: 140px;
  left: 18%;
  bottom: 8%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 40% 60% 55% 45%;
  opacity: 0.7;
}
.login-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: linear-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}
.login-illo {
  margin-bottom: 0.25rem;
}
.login-illo-svg {
  width: min(200px, 42vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}
.login-brand-title {
  margin: 1rem 0 0.55rem;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.login-brand-sub {
  margin: 0 0 1.35rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.9);
  max-width: 26rem;
}
.login-features {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(241, 245, 249, 0.95);
}
.login-features li {
  position: relative;
  padding-left: 1.65rem;
  margin-bottom: 0.55rem;
  line-height: 1.45;
}
.login-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.75rem);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 24px 48px -12px rgba(15, 23, 42, 0.14);
  padding: 2rem 1.85rem 1.75rem;
}
.login-form-title {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.login-card .sub {
  margin: 0 0 1.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.login-flash {
  margin-bottom: 1rem;
}
.login-field-group {
  margin-bottom: 1rem;
}
.login-input-wrap {
  position: relative;
  display: block;
}
.login-input-wrap .login-input {
  width: 100%;
  padding-left: 2.75rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  pointer-events: none;
  transition: color 0.15s ease;
}
.login-input-wrap:focus-within .login-input-icon {
  color: #2563eb;
}
.login-input-wrap .login-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.login-submit {
  width: 100%;
  margin-top: 0.25rem;
  height: 44px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8) !important;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
  filter: brightness(1.03);
}
.login-submit:active:not(:disabled) {
  transform: translateY(0);
}
.login-submit:disabled {
  opacity: 0.88;
  cursor: wait;
  transform: none;
}
.login-demo {
  margin: 1.35rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid #e8ecf2;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.55;
}
.login-demo code {
  font-size: 0.7rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.login-trust {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none !important;
  }
  .login-panel {
    min-height: 100vh;
    align-items: center;
    padding: 1.5rem 1rem;
  }
}

/* ----- Dry refraction (clinical quick-pick) ----- */
body.dry-ref-modal-open {
  overflow: hidden;
}

.dry-ref-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
}
.dry-ref-modal.is-open {
  display: flex;
}
.dry-ref-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 20, 55, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.dry-ref-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1360px, 98vw);
  max-height: min(96vh, 940px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.dry-ref-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #1e3a8a 45%, var(--primary) 100%);
  color: #e8f0ff;
  flex-shrink: 0;
}
.dry-ref-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dry-ref-modal-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.92;
  font-weight: 500;
  line-height: 1.35;
}
.dry-ref-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: -0.15rem -0.25rem 0 0;
  border: none;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.dry-ref-modal-close:hover {
  background: rgba(59, 130, 246, 0.45);
}
.dry-ref-modal-close:active {
  transform: scale(0.96);
}
.dry-ref-modal-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.dry-ref-modal-scroll > .dry-refraction--modal {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
@media (max-height: 720px) {
  .dry-ref-modal-scroll {
    overflow-y: auto;
  }
}
.dry-ref-modal-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid var(--card-border);
  background: var(--card);
}
.dry-ref-add-btn.btn {
  min-width: 7.5rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.28);
}
.dry-ref-modal-clinical {
  margin: 0 1rem 1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
}
.dry-ref-modal .dry-ref-col--chart {
  flex: 1 1 0;
  min-width: 200px;
  max-width: 35%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  min-height: 0;
  padding: 0.55rem 0.6rem 0.55rem;
  margin: 0;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8edf4 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 2px 8px rgba(15, 23, 42, 0.06);
}
.dry-ref-modal .dry-ref-col--entry {
  flex: 2 1 0;
  min-width: 0;
  align-self: flex-start;
  padding: 0.45rem 0.55rem 0.5rem;
  border-right: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 3px rgba(15, 23, 42, 0.04);
}
@media (max-width: 900px) {
  .dry-ref-modal .dry-ref-col--entry {
    align-self: stretch;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.65rem;
    margin-bottom: 0.25rem;
  }
}
.dry-ref-eyes-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  flex: 0 1 auto;
  min-width: 0;
}
.dry-ref-eye-slot {
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  padding: 0.4rem 0.45rem 0.5rem;
  border: 1px solid #d1d9e6;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 6px 18px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.04);
  position: relative;
  z-index: 0;
}
.dry-ref-modal .dry-ref-eye-slot .dry-ref-table {
  margin: 0;
}

.dry-refraction {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card), 0 12px 40px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.dry-refraction--modal {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  overflow: visible;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.dry-refraction--modal .dry-ref-body {
  flex: 1 1 auto;
  min-height: 0;
}
.dry-ref-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(90deg, #0f6b45 0%, #148f5c 48%, #0d5a3a 100%);
  color: #ecfdf5;
}
.dry-ref-bar-title {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dry-ref-bar-hint {
  font-size: 0.75rem;
  opacity: 0.92;
}
.dry-ref-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  gap: 0;
  min-height: 420px;
}
.dry-ref-modal .dry-ref-body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.65rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.55rem 0.75rem 0.45rem;
}
.dry-ref-modal .dry-ref-chart {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  flex: 1 1 auto;
  align-self: stretch;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}
.dry-ref-modal .dry-ref-chart-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.3rem 0.35rem;
}
.dry-ref-modal .dry-ref-chart-row {
  display: grid;
  grid-template-columns: 50% 50%;
  gap: 0.16rem;
  margin-bottom: 0.06rem;
}
.dry-ref-modal .dry-ref-chart-cell {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 0.12rem 0.18rem;
  border-radius: 5px;
}
.dry-ref-modal .dry-ref-chart-cell:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 5px rgba(37, 99, 235, 0.2);
}
.dry-ref-modal .dry-ref-chart-head {
  padding: 0.28rem 0.45rem;
  font-size: 0.6875rem;
  flex-shrink: 0;
}
.dry-ref-modal .dry-ref-chart-toggle {
  padding: 0.2rem 0.45rem;
  gap: 0.85rem;
  flex-shrink: 0;
}
.dry-ref-modal .dry-ref-radio {
  font-size: 0.7rem;
}
.dry-ref-modal .dry-ref-chart-grid--single {
  gap: 0.12rem;
}
.dry-ref-modal .dry-ref-col--entry .dry-ref-table {
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: 0.75rem;
}
.dry-ref-modal .dry-ref-table + .dry-ref-table {
  margin-top: 0;
}
.dry-ref-modal .dry-ref-input {
  font-size: 0.75rem;
  padding: 0.26rem 0.32rem;
}
.dry-ref-modal .dry-ref-navbtn {
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
}
.dry-ref-modal .dry-ref-ghostbtn {
  font-size: 0.68rem;
  padding: 0.26rem 0.45rem;
}
.dry-ref-modal .dry-ref-toolbar {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .dry-ref-body {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .dry-ref-modal .dry-ref-body {
    flex-direction: column;
    align-items: stretch;
  }
  .dry-ref-modal .dry-ref-col--entry {
    flex: 0 1 auto;
    max-width: none;
  }
  .dry-ref-modal .dry-ref-col--chart {
    flex: 1 1 auto;
    max-width: none;
    min-height: min(52vh, 480px);
  }
}
.dry-ref-col--entry {
  padding: 1.1rem 1.15rem 1rem;
  border-right: 1px solid var(--card-border);
}
@media (max-width: 1024px) {
  .dry-ref-col--entry {
    border-right: none;
    border-bottom: 1px solid var(--card-border);
  }
}
.dry-ref-col--chart {
  padding: 1rem 1rem 1.1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.dry-ref-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dry-ref-table + .dry-ref-table {
  margin-top: 0.35rem;
}
.dry-ref-th-eye {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  color: #0f172a;
  font-weight: 700;
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #93c5fd;
  letter-spacing: 0.02em;
}
.dry-ref-th-corner {
  width: 5.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.dry-ref-th-metric {
  background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 100%);
  color: #0c4a6e;
  font-weight: 600;
  text-align: center;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid #bae6fd;
  font-size: 0.8125rem;
}
.dry-ref-row-label {
  background: #f8fafc;
  font-weight: 600;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid #e2e8f0;
  color: #1e293b;
  white-space: nowrap;
}
.dry-ref-hash {
  color: #dc2626;
  font-weight: 700;
}
.dry-ref-table td {
  padding: 0.35rem 0.4rem;
  border-top: 1px solid #e2e8f0;
  vertical-align: middle;
  background: #fff;
}
.dry-ref-na {
  background: #e5e7eb !important;
  text-align: center;
  padding: 0 !important;
}
.dry-ref-na-inner {
  display: block;
  color: #9ca3af;
  font-size: 1rem;
  padding: 0.5rem;
  user-select: none;
}
.dry-ref-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  font-size: 0.875rem;
  font-family: var(--font);
  text-align: center;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dry-ref-input:hover {
  border-color: #94a3b8;
}
.dry-ref-input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}
.dry-ref-input--active {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22) !important;
  background: #f0fdfa !important;
}
.dry-ref-input--computed {
  background: #f1f5f9 !important;
  color: #334155 !important;
  cursor: default;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}
.dry-ref-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
  margin-top: 0.25rem;
}
.dry-ref-navbtn {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.dry-ref-navbtn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.dry-ref-navbtn:active {
  transform: translateY(0);
}
.dry-ref-navbtn--clear {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #64748b;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  margin-right: auto;
}
.dry-ref-navbtn--clear:hover {
  background: #fff1f2;
  border-color: #fecaca;
  color: #e11d48;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.12);
}
.dry-ref-ghostbtn {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px dashed #94a3b8;
  background: #fff;
  color: #475569;
  cursor: pointer;
  margin-right: auto;
}
.dry-ref-ghostbtn:hover {
  border-color: #64748b;
  color: #0f172a;
}
.dry-ref-chart {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dry-ref-chart--idle {
  background: #fff;
}
.dry-ref-chart-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
}
/* HTML [hidden] loses to `display:flex` above — force hide when toggled off in JS */
.dry-ref-chart-toggle[hidden] {
  display: none !important;
  padding: 0;
  margin: 0;
  border: none;
  min-height: 0;
  overflow: hidden;
}
.dry-ref-chart--sph.dry-ref-chart--sign-plus .dry-ref-chart-toggle {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-bottom-color: #93c5fd;
}
.dry-ref-chart--sph.dry-ref-chart--sign-minus .dry-ref-chart-toggle {
  background: linear-gradient(180deg, #e0e7ff 0%, #c7d2fe 100%);
  border-bottom-color: #a5b4fc;
}
.dry-ref-chart--cyl.dry-ref-chart--sign-plus .dry-ref-chart-toggle,
.dry-ref-chart--cyl.dry-ref-chart--sign-minus .dry-ref-chart-toggle {
  background: #e8eaf6;
  border-bottom-color: #c5cae9;
}
.dry-ref-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
}
.dry-ref-radio input {
  accent-color: var(--primary, #2563eb);
}
.dry-ref-chart-head {
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  font-size: 0.8125rem;
  text-align: center;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.dry-ref-chart--sph.dry-ref-chart--sign-plus .dry-ref-chart-head {
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
}
.dry-ref-chart--sph.dry-ref-chart--sign-minus .dry-ref-chart-head {
  background: linear-gradient(90deg, #1e40af, #1e3a8a);
}
.dry-ref-chart--cyl.dry-ref-chart--sign-plus .dry-ref-chart-head {
  background: linear-gradient(90deg, #5c6bc0, #3949ab);
}
.dry-ref-chart--cyl.dry-ref-chart--sign-minus .dry-ref-chart-head {
  background: linear-gradient(90deg, #3949ab, #283593);
}
.dry-ref-chart--axis .dry-ref-chart-head {
  background: linear-gradient(90deg, #475569, #334155);
  color: #f8fafc;
}
.dry-ref-chart--distantVision .dry-ref-chart-head {
  background: linear-gradient(90deg, #0284c7, #0369a1);
}
.dry-ref-chart--nearVision .dry-ref-chart-head {
  background: linear-gradient(90deg, #0d9488, #0f766e);
}
.dry-ref-chart--addSph .dry-ref-chart-head {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
}
.dry-ref-chart--addSph .dry-ref-chart-grid {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}
.dry-ref-chart--idle .dry-ref-chart-head {
  background: #64748b;
  color: #f8fafc;
  text-shadow: none;
}
.dry-ref-chart-grid {
  flex: 1;
  overflow: auto;
  padding: 0.5rem;
  max-height: min(58vh, 520px);
}
.dry-ref-chart--sph.dry-ref-chart--sign-plus .dry-ref-chart-grid {
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 55%, #dbeafe 100%);
}
.dry-ref-chart--sph.dry-ref-chart--sign-minus .dry-ref-chart-grid {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 55%, #e0e7ff 100%);
}
.dry-ref-chart--cyl.dry-ref-chart--sign-plus .dry-ref-chart-grid,
.dry-ref-chart--cyl.dry-ref-chart--sign-minus .dry-ref-chart-grid {
  background: #eef2ff;
}
.dry-ref-chart--axis .dry-ref-chart-grid {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.dry-ref-chart--distantVision .dry-ref-chart-grid {
  background: #f0f9ff;
}
.dry-ref-chart--nearVision .dry-ref-chart-grid {
  background: #ecfdf5;
}
.dry-ref-chart--idle .dry-ref-chart-grid {
  background: #f8fafc;
}
.dry-ref-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.dry-ref-chart-grid--single {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.dry-ref-chart-cell {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.42rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  text-align: center;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease, box-shadow 0.12s ease;
}
.dry-ref-chart-cell:hover {
  background: #fff;
  border-color: #0f766e;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}
.dry-ref-chart-cell:active {
  transform: translateY(0);
}
.dry-ref-chart-cell--row {
  width: 100%;
  text-align: center;
}
.dry-ref-chart-cell--empty {
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.dry-ref-bottom-card {
  margin-top: 0;
}
.dry-ref-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--card-border);
}
.dry-ref-save.btn {
  min-width: 9rem;
  font-weight: 600;
  background: linear-gradient(180deg, #059669, #047857) !important;
  border: none !important;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.35);
}
.dry-ref-save.btn:hover {
  filter: brightness(1.04);
}

.refraction-narrow-column {
  width: min(1200px, 96%);
  margin: 0 auto 1.5rem;
}
@media (max-width: 768px) {
  .refraction-narrow-column {
    width: 94%;
  }
}

.refraction-summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(37, 99, 235, 0.06);
  padding: 0;
  margin-bottom: 1rem;
  overflow: hidden;
}
.refraction-summary-head {
  padding: 1rem 1.2rem 0.85rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(11, 20, 55, 0.04) 100%);
  border-bottom: 1px solid var(--card-border);
}
.refraction-summary-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.refraction-summary-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  align-items: start;
  padding: 0.85rem 1rem 1.15rem;
}
.refraction-summary-col {
  min-width: 0;
}
.refraction-summary-col .dry-ref-table--summary {
  width: 100%;
  margin: 0;
}
@media (max-width: 720px) {
  .refraction-summary-body {
    grid-template-columns: 1fr;
  }
}
.dry-ref-table--summary {
  font-size: 0.8125rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.dry-ref-table--summary tbody tr:nth-child(odd) td {
  background: #fafbfc;
}
.dry-ref-table--summary .dry-ref-sum-val {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.95rem;
  padding: 0.3rem 0.35rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text);
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ——— Patient detail (show) ——— */
.patient-show {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.patient-show > .card {
  margin-bottom: 0;
}
.ps-header-card {
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
  border: 1px solid #e2e8f0;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}
.ps-header-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}
.ps-header-main {
  min-width: 0;
  flex: 1 1 16rem;
}
.ps-header-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ps-header-name {
  margin: 0 0 0.85rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}
.ps-header-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.5rem;
}
@media (max-width: 520px) {
  .ps-header-meta {
    grid-template-columns: 1fr;
  }
}
.ps-header-meta-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.35rem 0.65rem;
  font-size: 0.875rem;
  align-items: baseline;
}
.ps-header-meta-row dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
}
.ps-header-meta-row dd {
  margin: 0;
  color: var(--text);
}
.ps-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}
.ps-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 640px) {
  .ps-stats-grid {
    grid-template-columns: 1fr;
  }
}
.ps-stat-card {
  margin: 0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--card-border);
}
.ps-stat-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-stat-value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}
.ps-stat-value--sm {
  font-size: 1.1rem;
  font-weight: 700;
}
.ps-section-card {
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--card-border);
}
.ps-section-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.ps-empty {
  padding: 1.5rem 1rem;
}
.ps-muted-lead {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.ps-visit-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ps-visit-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
.ps-visit-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.ps-visit-card--latest {
  border-color: #93c5fd;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.12);
  border-left: 4px solid var(--primary);
}
.ps-visit-card__bar {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  border-bottom: 1px solid transparent;
}
.ps-visit-card.is-open .ps-visit-card__bar {
  border-bottom-color: #e2e8f0;
}
.ps-visit-card__toggle {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.55rem 0.85rem 0.55rem 1rem;
  margin: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.ps-visit-card__toggle:hover {
  background: rgba(248, 250, 252, 0.95);
}
.ps-visit-card__toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.ps-visit-card__toggle-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  min-width: 0;
}
.ps-visit-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1e40af;
}
.ps-visit-card--latest .ps-visit-pill {
  background: #dbeafe;
}
.ps-visit-date {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}
.ps-visit-doctor {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.ps-visit-chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.15rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.ps-visit-card.is-open .ps-visit-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.ps-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  margin: 0.2rem 0.35rem 0.2rem 0;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--primary);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ps-icon-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--primary-hover);
}
.ps-visit-card__body {
  display: none;
  padding: 0.85rem 1rem 1rem;
  background: #fafbfc;
}
.ps-visit-card.is-open .ps-visit-card__body {
  display: block;
}
.ps-visit-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 640px) {
  .ps-visit-detail-grid {
    grid-template-columns: 1fr;
  }
}
.ps-dt-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.ps-dt-val {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.ps-visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.ps-inline-form {
  display: inline;
}
.ps-rx-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ps-rx-card {
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}
.ps-rx-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}
.ps-rx-card__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}
.ps-rx-card__sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.ps-rx-remarks {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text);
}
.ps-rx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}
@media (max-width: 720px) {
  .ps-rx-grid {
    grid-template-columns: 1fr;
  }
}
.ps-rx-eye-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.ps-rx-mini-table {
  font-size: 0.75rem;
}
.ps-rx-mini-table th,
.ps-rx-mini-table td {
  padding: 0.28rem 0.2rem;
}

.refraction-hx-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.refraction-hx-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem 1rem 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.refraction-hx-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}
.refraction-hx-card__meta {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.refraction-hx-card__remarks {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.45;
  max-width: min(52rem, 100%);
}
.refraction-hx-card__rx {
  margin-top: 0.25rem;
}
.refraction-hx-card__rx .dry-ref-table--summary {
  width: 100%;
}
.refraction-remarks-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  padding: 1rem 1.15rem 1.15rem;
  margin-bottom: 0;
}
.refraction-remarks-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.refraction-remarks-textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
}
.refraction-save-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.dry-ref-save-main.btn {
  min-width: 10rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
}

/* --- Queue UI Enhancement --- */
.q-table-row--priority {
  border-left: 5px solid var(--danger) !important;
  background: #fff5f5 !important;
}
.queue-svc {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.queue-svc--fast {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.queue-svc--warn {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}
.queue-svc--slow {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.q-queue-token--bold {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  background: #eff6ff;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #dbeafe;
}
.q-wait-timer {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}
.q-wait-timer--high {
  color: var(--danger);
  font-weight: 700;
}
.btn-queue-action {
  white-space: nowrap;
  min-width: 130px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

