:root {
  --bg: var(--os-canvas);
  --paper: var(--os-canvas);
  --surface: var(--os-surface);
  --surface-soft: var(--os-surface-subtle);
  --surface-2: var(--os-surface-subtle);
  --surface-dark: var(--os-ink);
  --sidebar: var(--os-surface);
  --sidebar-2: var(--os-canvas);
  --text: var(--os-ink);
  --muted: var(--os-muted);
  --ink-soft: var(--os-muted);
  --text-secondary: var(--os-muted);
  --line: var(--os-border);
  --border: var(--os-border);
  --line-strong: var(--os-control-border);
  --primary: var(--os-primary);
  --primary-dark: var(--os-primary-hover);
  --primary-soft: var(--os-primary-soft);
  --success: var(--os-success);
  --success-soft: var(--os-success-soft);
  --warning: var(--os-warning);
  --warning-soft: var(--os-warning-soft);
  --danger: var(--os-danger);
  --danger-soft: var(--os-danger-soft);
  --info: var(--os-info);
  --info-soft: var(--os-info-soft);
  --aqua: var(--os-primary);
  --aqua-soft: var(--os-primary-soft);
  --focus-ring: var(--os-focus);
  --font: var(--os-font-body);
  --font-display: var(--os-font-display);
  --font-mono: var(--os-font-code);
  --radius: var(--os-radius-md);
  --radius-sm: var(--os-radius-xs);
  --shadow-md: var(--os-shadow-popover);
  --shadow-lg: var(--os-shadow-dialog);
  --shadow-sm: none;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: var(--os-text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
body.mobile-navigation-open {
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.16);
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-dark);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}
.skip-link:focus {
  transform: translateY(0);
}
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--os-focus-width) solid var(--os-focus);
  outline-offset: 3px;
}
section[id],
main[id],
h1,
h2,
h3 {
  scroll-margin-top: 92px;
}

h1,
h2,
h3,
h4,
.page-title,
.card-title {
  font-family: var(--os-font-display);
}
input,
select,
textarea {
  min-width: 0;
}
input[type='file'] {
  max-width: 100%;
  width: 100%;
}
:where(input, select, textarea)[aria-invalid='true'] {
  border-color: var(--os-danger);
}
:where(input, select, textarea):disabled {
  background: var(--os-disabled);
  color: var(--os-disabled-ink);
}
:where(input, textarea)[readonly] {
  background: var(--os-surface-subtle);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Route headings receive focus for screen readers, without resembling selected controls. */
.navigation-heading[tabindex='-1']:focus {
  outline: none;
}
h1,
h2,
h3,
.page-title,
.topbar-title,
.brand-name,
.brand-word strong {
  font-family: var(--font-display);
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.tiny {
  font-size: var(--os-text-caption);
}
.text-center {
  text-align: center;
}
.full-width {
  width: 100%;
}
.nowrap {
  white-space: nowrap;
}
.strong {
  font-weight: 700;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Buttons */
.btn {
  border: 1px solid var(--os-control-border);
  border-radius: var(--os-radius-xs);
  min-height: var(--os-control-height);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: var(--os-weight-medium);
  transition:
    background-color var(--os-duration-fast) var(--os-ease),
    border-color var(--os-duration-fast) var(--os-ease),
    color var(--os-duration-fast) var(--os-ease);
  box-shadow: none;
}
.btn:hover {
  transform: none;
  box-shadow: none;
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 1;
  background: var(--os-disabled);
  color: var(--os-disabled-ink);
  border-color: var(--os-border);
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--os-control-border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-2);
}
.notice-info {
  border-color: var(--os-info);
  background: var(--os-info-soft);
  color: var(--os-info);
}
.notice-warning {
  border-color: var(--os-warning);
  background: var(--os-warning-soft);
  color: var(--os-warning);
}
.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  background: var(--surface-soft);
  color: var(--text);
  box-shadow: none;
}
.btn-sm {
  min-height: var(--os-control-height);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: var(--os-text-body);
}
.btn-lg {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
}
.icon-btn {
  width: var(--os-control-height);
  height: var(--os-control-height);
  flex: 0 0 var(--os-control-height);
  padding: 0;
  border-radius: var(--os-radius-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:active {
  background: var(--os-primary-active);
}
.btn-danger:hover:not(:disabled) {
  background: var(--os-danger-hover);
}
.btn:disabled:hover {
  background: var(--os-disabled);
  color: var(--os-disabled-ink);
  border-color: var(--os-border);
}
/* Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--os-space-4);
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2);
}
.form-field.span-2 {
  grid-column: span 2;
}
.form-field.span-3 {
  grid-column: span 3;
}
.form-label {
  color: var(--text);
  font-weight: var(--os-weight-medium);
  font-size: var(--os-text-body);
}
.form-help {
  color: var(--muted);
  font-size: var(--os-text-small);
}
.input,
.select,
.textarea {
  width: 100%;
  font-size: var(--os-text-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--os-radius-xs);
  background: var(--surface);
  color: var(--text);
  padding: 9px 11px;
  outline: 2px solid transparent;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    outline-color 0.15s ease;
}
.input,
.select {
  min-height: var(--os-control-height);
  height: var(--os-control-height);
}
.textarea {
  min-height: 92px;
  resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.signature-pad {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.signature-pad canvas {
  display: block;
  width: 100%;
  height: 170px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(37, 99, 235, 0.06) 31px 32px);
  touch-action: none;
  cursor: crosshair;
}
.signature-pad-tools {
  min-height: 42px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.signature-preview {
  display: block;
  width: min(100%, 360px);
  height: 112px;
  margin: 10px auto;
  object-fit: contain;
  border-bottom: 1px solid var(--line-strong);
}
.signature-choice {
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.signature-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 7px;
}
.signature-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.signature-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary);
}
.signature-option input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.signature-option span,
.signature-option strong,
.signature-option small {
  display: block;
}
.signature-option small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}
.saved-signature-card {
  margin-top: 10px;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
}
.saved-signature-card .signature-preview {
  margin: 0 auto 5px;
  border-bottom-style: dashed;
}
.signature-draw-panel {
  margin-top: 10px;
}
.signature-draw-panel[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .signature-pad canvas {
    height: 230px;
  }
  .signature-pad-tools {
    min-height: 50px;
    flex-wrap: wrap;
  }
  .signature-pad-tools .btn {
    min-height: 44px;
  }
  .signature-choice-grid {
    grid-template-columns: 1fr;
  }
  .signature-option {
    min-height: 58px;
  }
}
.input::placeholder,
.textarea::placeholder {
  color: var(--os-muted);
  opacity: 1;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.search-box {
  position: relative;
}
.search-box .input {
  padding-left: 36px;
}
.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--muted);
}
/* Generic layout */
.page-container {
  max-width: var(--os-content-max);
  margin: 0 auto;
  padding: 32px 32px 56px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.page-title {
  font-size: var(--os-text-page);
  line-height: 1.2;
  margin: 0 0 5px;
  letter-spacing: -0.035em;
}
.page-subtitle {
  color: var(--muted);
  margin: 0;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.layout-main-aside {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.72fr);
  gap: 18px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.flex-wrap {
  flex-wrap: wrap;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: var(--os-space-6);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 16px;
}
.card-title {
  font-size: var(--os-text-input);
  font-weight: var(--os-weight-bold);
  margin: 0;
  letter-spacing: -0.015em;
}
.card-subtitle {
  color: var(--muted);
  font-size: var(--os-text-small);
  margin-top: 2px;
}
.card-body {
  padding: 0 24px 24px;
}
.empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  font-size: 24px;
}

.kpi-card {
  padding: 17px 18px;
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  right: -45px;
  top: -45px;
  border-radius: 50%;
  background: var(--primary-soft);
}
.kpi-label {
  color: var(--muted);
  font-size: var(--os-text-small);
  font-weight: var(--os-weight-medium);
  margin-bottom: 9px;
}
.kpi-value {
  font-size: 25px;
  line-height: 1;
  font-weight: var(--os-weight-bold);
  letter-spacing: -0.045em;
}
.kpi-value,
.mono,
.data-table td {
  font-variant-numeric: tabular-nums;
}
.kpi-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: var(--os-text-caption);
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
}
.badge-neutral {
  background: #eef1f5;
  color: #586174;
}
.badge-primary {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-info {
  background: var(--info-soft);
  color: var(--info);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.kpi-card::after {
  display: none;
}
@media (max-width: 640px) {
  .card-pad,
  .kpi-card {
    padding: var(--os-space-4);
  }
  .card-head {
    padding: 16px 16px 12px;
    flex-wrap: wrap;
  }
  .card-body {
    padding: 0 16px 16px;
  }
}
/* Tables */
.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  min-width: var(--os-table-min);
  overflow-wrap: normal;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-size: var(--os-text-small);
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr {
  transition: 0.12s ease;
}
.data-table tbody tr:hover {
  background: var(--os-primary-soft);
}
.data-table .clickable {
  cursor: pointer;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: var(--os-weight-bold);
  color: var(--primary-dark);
  background: var(--primary-soft);
  flex: 0 0 auto;
}
.avatar.sm {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: var(--os-text-caption);
}
.avatar.lg {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 18px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.identity-name {
  font-weight: 700;
  line-height: 1.25;
}
.identity-meta {
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-top: 2px;
}
.action-menu {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
/* Progress and charts */
.progress {
  height: 7px;
  background: #edf0f6;
  border-radius: 99px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.progress.success > span {
  background: var(--success);
}
.progress.warning > span {
  background: var(--warning);
}
.progress.danger > span {
  background: var(--danger);
}
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(130px, 1.5fr) 55px;
  gap: 10px;
  align-items: center;
}
.bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.bar-track {
  height: 9px;
  background: #eef1f7;
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  min-width: 3px;
}
.bar-value {
  text-align: right;
  font-size: var(--os-text-caption);
  color: var(--muted);
}
.spark-bars {
  height: 145px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 8px 3px 0;
}
.spark-column {
  flex: 1;
  min-width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
}
.spark-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--primary), #8795ff);
  min-height: 2px;
  position: relative;
}
.spark-bar:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-dark);
  color: white;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: var(--os-text-caption);
  white-space: nowrap;
  z-index: 5;
}
.spark-label {
  font-size: var(--os-text-caption);
  color: var(--muted);
  white-space: nowrap;
}
/* Admin shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--os-sidebar-width) minmax(0, 1fr);
}
.sidebar {
  background: var(--os-surface);
  color: var(--os-ink);
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--os-sidebar-width);
  z-index: 30;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}
.sidebar-scrim {
  display: none;
}
.brand {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-mark {
  width: 37px;
  height: 37px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-name {
  color: #fff;
  font-weight: var(--os-weight-bold);
  font-size: 17px;
  letter-spacing: -0.035em;
}
.brand-caption {
  margin-top: 1px;
  font-size: var(--os-text-caption);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8292b2;
}
.sidebar-scroll {
  padding: 14px 12px 20px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 99px;
}
.nav-group {
  margin-bottom: 16px;
}
.nav-group:last-child {
  margin-bottom: 0;
}
.nav-label {
  color: #7082a5;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 11px 7px;
}
.nav-item {
  border: 1px solid transparent;
  color: #aebbd4;
  background: transparent;
  width: 100%;
  min-height: var(--os-control-height);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  text-align: left;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
  font-weight: var(--os-weight-medium);
  font-size: var(--os-text-body);
  position: relative;
}
.nav-item:hover {
  background: var(--os-surface);
  border-color: rgba(255, 255, 255, 0.035);
  color: #fff;
  transform: none;
}
.nav-item.active {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.13);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 5px 14px rgba(4, 14, 40, 0.12);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 50%;
  width: 3px;
  height: var(--os-control-height);
  border-radius: 0 6px 6px 0;
  background: #60a5fa;
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.48);
}
.nav-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: var(--os-surface);
  color: #91a4c8;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.nav-icon svg {
  width: 17px;
  height: 17px;
  overflow: visible;
}
.nav-item:hover .nav-icon {
  color: #dce8ff;
  background: var(--os-surface);
  border-color: rgba(255, 255, 255, 0.08);
}
.nav-item.active .nav-icon {
  color: #fff;
  background: var(--os-primary);
  border-color: #3b82f6;
  box-shadow: 0 4px 11px rgba(3, 14, 43, 0.18);
}
.nav-count {
  margin-left: auto;
  min-width: 21px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--os-surface);
  color: #c7d3ea;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.nav-item.active .nav-count {
  background: var(--os-surface);
  color: #fff;
}
.nav-tools {
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.nav-disclosure .nav-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  display: grid;
  place-items: center;
  color: #7183a6;
  transition:
    transform 0.16s ease,
    color 0.16s ease;
}
.nav-disclosure .nav-chevron svg {
  width: 14px;
  height: 14px;
}
.nav-disclosure.expanded .nav-chevron {
  color: #dce8ff;
  transform: rotate(90deg);
}
.nav-disclosure.section-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.12);
}
.nav-more-panel {
  margin: 5px 0 8px;
  padding: 6px 0 7px 11px;
  border-left: 1px solid rgba(147, 197, 253, 0.18);
}
.nav-subgroup-label {
  padding: 8px 9px 5px;
  color: #62769c;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-item-secondary {
  min-height: var(--os-control-height);
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 11.5px;
}
.nav-item-secondary .nav-icon {
  width: 25px;
  height: var(--os-control-height);
  flex-basis: 25px;
  border-radius: 7px;
}
.nav-item-secondary .nav-icon svg {
  width: 15px;
  height: 15px;
}
.nav-help {
  margin-top: 5px;
  color: #94a8cb;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: var(--os-surface);
}
.sidebar-user .avatar {
  background: linear-gradient(135deg, var(--os-primary), #3b82f6);
  color: #fff;
}
.sidebar-user-name {
  font-size: var(--os-text-caption);
  font-weight: 720;
  color: #fff;
}
.sidebar-user-role {
  margin-top: 1px;
  font-size: var(--os-text-caption);
  color: #8394b4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sidebar-logout {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #8ea0c1;
  background: transparent;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.sidebar-logout svg {
  width: 17px;
  height: 17px;
}
.sidebar-logout:hover {
  color: #fff;
  background: var(--os-surface);
  border-color: rgba(255, 255, 255, 0.07);
}
.app-main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 246, 250, 0.9);
  backdrop-filter: none;
  border-bottom: 1px solid rgba(219, 224, 236, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-title {
  font-size: 17px;
  font-weight: var(--os-weight-bold);
  letter-spacing: -0.025em;
}
.topbar-breadcrumb {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.topbar-patient-search {
  position: relative;
  width: min(330px, 30vw);
  margin-left: auto;
}
.topbar-patient-search > svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: #7d899f;
  transform: translateY(-50%);
  pointer-events: none;
}
.topbar-patient-search > input {
  width: 100%;
  height: var(--os-control-height);
  padding: 0 12px 0 35px;
  border: 1px solid #d7dfeb;
  border-radius: 11px;
  outline: 2px solid transparent;
  background: var(--os-surface);
  color: var(--text);
  font-size: var(--os-text-body);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}
.topbar-patient-search > input::placeholder {
  color: var(--os-muted);
}
.topbar-patient-search > input:focus-visible {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.patient-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.appointment-patient-suggestions {
  position: static;
  margin-top: 6px;
  box-shadow: none;
}
.patient-search-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.patient-search-results button:hover,
.patient-search-results button:focus-visible {
  background: var(--primary-soft);
}
.patient-search-results button > span:last-child {
  min-width: 0;
}
.patient-search-results strong,
.patient-search-results small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.patient-search-results strong {
  font-size: var(--os-text-caption);
}
.patient-search-results small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.patient-search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: var(--os-text-caption);
  text-align: center;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.workspace-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 6px 10px 6px 7px;
  border: 1px solid #d5e1f5;
  border-radius: 12px;
  background: var(--os-surface);
}
.workspace-identity > span:last-child {
  display: grid;
  min-width: 0;
}
.workspace-identity strong {
  color: var(--text);
  font-size: var(--os-text-caption);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-identity small {
  color: var(--primary);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.workspace-lock {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
}
.demo-badge {
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--aqua-soft);
  color: var(--primary-dark);
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.055em;
}
.demo-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
.mobile-menu {
  display: none;
}

.help-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.help-task {
  min-height: 92px;
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 11px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    transform 0.15s ease;
}
.help-task:hover {
  border-color: #b8cdf4;
  background: #f7faff;
  transform: translateY(-1px);
}
.help-task-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.help-task strong,
.help-task small {
  display: block;
}
.help-task strong {
  font-size: var(--os-text-body);
}
.help-task small {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--os-text-caption);
  line-height: 1.45;
}
/* Guided daily workflow */
.section-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin: -6px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}
.section-switcher::-webkit-scrollbar {
  display: none;
}
.section-switcher-btn {
  min-height: var(--os-control-height);
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: 700;
  white-space: nowrap;
}
.section-switcher-btn:hover {
  color: var(--text);
  background: var(--surface-soft);
}
.section-switcher-btn.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}
.today-command {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(440px, 1.45fr);
  gap: 18px 24px;
  padding: 20px;
  margin-bottom: 18px;
  background: var(--os-surface);
}
.today-command-intro h2 {
  margin: 7px 0 5px;
  font-size: 20px;
  letter-spacing: -0.035em;
}
.today-command-intro p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.today-command-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.quick-action {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 69px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.quick-action:hover {
  border-color: #b8cdf4;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.quick-action > svg {
  width: 37px;
  height: 37px;
  padding: 9px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.quick-action strong,
.quick-action small {
  display: block;
}
.quick-action strong {
  font-size: 12px;
}
.quick-action small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}
.today-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.today-summary > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  padding: 0 16px;
  border-right: 1px solid var(--line);
}
.today-summary > div:first-child {
  padding-left: 0;
}
.today-summary > div:last-child {
  border-right: 0;
}
.today-summary strong {
  font-size: 18px;
  letter-spacing: -0.035em;
}
.today-summary span {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.dashboard-today-layout {
  align-items: stretch;
}
.dashboard-today-agenda {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dashboard-today-agenda > .table-wrap {
  flex: 1;
}
.management-summary {
  overflow: hidden;
}
.management-summary > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.management-summary > summary::-webkit-details-marker {
  display: none;
}
.management-summary > summary span {
  display: grid;
}
.management-summary > summary strong {
  font-size: 13px;
}
.management-summary > summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.management-summary > summary > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  transition: transform 0.16s ease;
}
.management-summary[open] > summary > svg {
  transform: rotate(90deg);
}
.management-summary-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px 18px;
  border-top: 1px solid var(--line);
}
.management-summary-body > div:first-child {
  display: grid;
  gap: 3px;
}
.management-summary-body > div:first-child strong {
  font-size: 20px;
}
.patient-action-list {
  display: grid;
  gap: 8px;
}
.patient-action-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.patient-action-list button:hover {
  border-color: #b8cdf4;
  background: #f8fbff;
}
.patient-action-list button > span:first-child {
  display: grid;
  min-width: 0;
}
.patient-action-list strong {
  font-size: 12px;
}
.patient-action-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.patient-action-list button > span:last-child {
  color: var(--primary);
  font-size: 16px;
}
/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  background: var(--surface);
}
@media (max-width: 600px) {
  .login-screen .login-showcase {
    padding: 20px;
    min-height: auto;
    gap: 14px;
  }
  .login-screen .login-copy h1 {
    font-size: 28px;
    margin: 8px 0;
  }
  .login-screen .login-copy p,
  .login-screen .login-features,
  .login-screen .login-showcase > .small {
    display: none;
  }
  .login-screen .login-panel {
    padding: 16px;
    align-items: flex-start;
  }
}
.login-showcase {
  background: var(--sidebar);
  color: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-showcase.staff-login-showcase {
  background:
    linear-gradient(125deg, rgba(16, 23, 42, 0.96), rgba(16, 23, 42, 0.78)),
    url('/static/brand/images/clinic-team.webp') center / cover;
}
.login-showcase.patient-login-showcase {
  background:
    linear-gradient(125deg, rgba(16, 23, 42, 0.96), rgba(16, 23, 42, 0.8)),
    url('/static/brand/images/patient-guidance.webp') center / cover;
}
.login-showcase > * {
  position: relative;
  z-index: 1;
}
.login-showcase::before,
.login-showcase::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}
.login-showcase::before {
  width: 480px;
  height: 480px;
  right: -220px;
  top: -170px;
  background: url('/static/brand/mark-master-inverse.svg') center / 68% no-repeat;
  opacity: 0.08;
}
.login-showcase::after {
  width: 420px;
  height: 420px;
  left: -210px;
  bottom: -220px;
  background: var(--aqua);
  opacity: 0.1;
}
.login-copy {
  max-width: 620px;
  position: relative;
  z-index: 1;
}
.login-copy h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  margin: 28px 0 22px;
}
.login-copy p {
  color: #aeb8d0;
  font-size: 16px;
  max-width: 520px;
}
.login-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 35px;
}
.login-feature {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--os-surface);
  border-radius: 13px;
  padding: 13px;
  color: #dce2f0;
  font-size: 12px;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.login-card {
  width: min(430px, 100%);
}
.login-card h2 {
  font-size: 29px;
  letter-spacing: -0.045em;
  margin: 0 0 8px;
}
.login-card > p {
  color: var(--muted);
  margin: 0 0 25px;
}
.session-remember {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
  color: var(--text);
  cursor: pointer;
}
.session-remember input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}
.session-remember span {
  display: grid;
  gap: 2px;
}
.session-remember strong {
  font-size: 12px;
  font-weight: 730;
}
.session-remember small {
  color: var(--muted);
  font-size: var(--os-text-caption);
  line-height: 1.4;
}
.session-remember:focus-within {
  outline: 3px solid rgba(37, 99, 235, 0.16);
  outline-offset: 4px;
  border-radius: 6px;
}
.demo-users {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.demo-user {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 10px;
  text-align: left;
}
.demo-user:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.demo-user strong {
  display: block;
  font-size: var(--os-text-caption);
}
.demo-user span {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.login-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  margin-top: 8px;
}
/* Patient directory filters */
.patient-open-action {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
  min-width: 80px;
}
.data-table td:has(> .patient-open-action) {
  width: 1%;
  white-space: nowrap;
}
.patient-list-toolbar {
  align-items: end;
  gap: 14px;
}
.patient-filter-controls {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: end;
  gap: 10px;
}
.patient-filter-controls .search-box {
  width: min(460px, 100%);
}
.patient-insurance-filter {
  width: min(270px, 100%);
  display: grid;
  gap: 5px;
}
.patient-insurance-filter > span {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.patient-insurance-filter .select {
  background-color: #f8faff;
  border-color: #ced9ec;
}
.patient-insurance-filter .select:hover {
  border-color: #9db7e6;
}
#patientResultCount {
  flex: 0 0 auto;
  margin-bottom: 9px;
}

.workspace-assurance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: -7px 0 18px;
  padding: 13px 15px;
  border: 1px solid #c9d7f1;
  border-radius: 15px;
  color: #edf4ff;
  background: var(--os-surface);
  box-shadow: 0 12px 28px rgba(17, 28, 54, 0.13);
}
.workspace-assurance-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--os-surface);
}
.workspace-assurance strong {
  display: block;
  color: #fff;
  font-size: 13px;
}
.workspace-assurance p {
  margin: 3px 0 0;
  color: #c8d6ee;
  font-size: var(--os-text-caption);
}
.workspace-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.workspace-private-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}
/* Agenda */
.agenda-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.date-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}
.date-chip {
  min-width: 165px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
}
.provider-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.provider-filter {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.provider-filter.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.next-gap-button {
  min-width: 230px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid #b8cef7;
  border-radius: 12px;
  background: #f3f7ff;
  color: #214e99;
  text-align: left;
  cursor: pointer;
}
.next-gap-button:hover {
  border-color: var(--primary);
  background: #eaf2ff;
}
.next-gap-button:disabled {
  cursor: default;
  opacity: 0.62;
}
.next-gap-button small,
.next-gap-button strong {
  display: block;
}
.next-gap-button small {
  color: #66799a;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-medium);
}
.next-gap-button strong {
  margin-top: 2px;
  font-size: 13px;
}
.next-gap-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
}
.agenda-use-hint {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
  padding: 11px 14px;
  border: 1px solid #d6e3fa;
  border-radius: 12px;
  background: #f7faff;
  color: #294f8b;
}
.agenda-use-hint > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #e4edff;
  color: var(--primary);
  font-size: 18px;
  font-weight: var(--os-weight-bold);
}
.agenda-use-hint strong,
.agenda-use-hint small {
  display: block;
}
.agenda-use-hint strong {
  font-size: 12px;
}
.agenda-use-hint small {
  margin-top: 2px;
  color: #6c7d98;
  font-size: var(--os-text-caption);
}
.schedule {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.schedule-head {
  display: grid;
  grid-template-columns: 74px repeat(var(--providers, 3), minmax(210px, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.schedule-head-cell {
  padding: 12px;
  border-left: 1px solid var(--line);
  font-weight: 700;
  font-size: 12px;
}
.schedule-head-cell:first-child {
  border-left: 0;
}
.schedule-grid {
  position: relative;
  min-width: 720px;
}
.schedule-row {
  display: grid;
  grid-template-columns: 74px repeat(var(--providers, 3), minmax(210px, 1fr));
  min-height: 70px;
  border-bottom: 1px solid #edf0f6;
}
.schedule-row:last-child {
  border-bottom: 0;
}
.schedule-time {
  padding: 12px 10px;
  color: #516078;
  font-size: 12px;
  font-weight: var(--os-weight-bold);
  text-align: right;
  border-right: 1px solid var(--line);
}
.schedule-cell {
  padding: 4px;
  border-right: 1px solid #edf0f6;
  min-height: 70px;
  position: relative;
}
.schedule-cell:hover {
  background: #fafbff;
}
.schedule.single-provider .schedule-grid {
  min-width: 0;
}
.schedule-create-slot {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed transparent;
  border-radius: 10px;
  background: transparent;
  color: #8793a7;
  font-size: var(--os-text-caption);
  font-weight: 720;
  cursor: pointer;
  opacity: 0.72;
}
.schedule-create-slot span {
  color: var(--primary);
  font-size: 17px;
}
.schedule-create-slot:hover,
.schedule-create-slot:focus-visible {
  border-color: #a9c2f0;
  background: #edf4ff;
  color: #27559d;
  opacity: 1;
  outline: none;
}
.appointment-block {
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 60px;
  background: var(--primary-soft);
  border: 1px solid #c7dafb;
  border-left: 4px solid var(--primary);
  cursor: pointer;
  overflow: hidden;
  transition: 0.12s ease;
}
.appointment-block:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.appointment-block.status-completed {
  background: var(--success-soft);
  border-left-color: var(--success);
}
.appointment-block.status-pending_deposit,
.appointment-block.status-requested {
  background: var(--warning-soft);
  border-left-color: var(--warning);
}
.appointment-block.status-cancelled_patient,
.appointment-block.status-cancelled_clinic,
.appointment-block.status-no_show {
  background: var(--danger-soft);
  border-left-color: var(--danger);
  opacity: 0.76;
}
.appt-time {
  color: #416596;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.appt-name {
  margin-top: 2px;
  color: #182947;
  font-weight: var(--os-weight-bold);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appt-meta {
  margin-top: 1px;
  color: #5f6e86;
  font-size: var(--os-text-caption);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.risk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.risk-low {
  background: var(--success);
}
.risk-medium {
  background: var(--warning);
}
.risk-high {
  background: var(--danger);
}

.timeline-list {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  padding-bottom: 15px;
}
.timeline-mark {
  position: relative;
  display: flex;
  justify-content: center;
}
.timeline-mark::before {
  content: '';
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
  z-index: 1;
}
.timeline-mark::after {
  content: '';
  position: absolute;
  width: 1px;
  top: 14px;
  bottom: -5px;
  background: var(--line);
}
.timeline-item:last-child .timeline-mark::after {
  display: none;
}
.timeline-title {
  font-weight: 700;
  font-size: 12px;
}
.timeline-meta {
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-top: 2px;
}
/* Kanban */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(245px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-column {
  background: #edf0f6;
  border-radius: 14px;
  padding: 10px;
  min-height: 420px;
}
.kanban-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 3px 10px;
}
.kanban-title {
  font-weight: var(--os-weight-bold);
  font-size: 12px;
}
.kanban-count {
  width: 23px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--os-surface);
  font-size: var(--os-text-caption);
  color: var(--muted);
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(20, 30, 55, 0.04);
  cursor: pointer;
}
.kanban-card:hover {
  border-color: #bec7dc;
  box-shadow: var(--shadow-sm);
}
.kanban-card-title {
  font-weight: 740;
  font-size: 12px;
  line-height: 1.3;
}
.kanban-card-patient {
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-top: 3px;
}
.kanban-card-value {
  margin: 11px 0 6px;
  font-weight: var(--os-weight-bold);
}
.kanban-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
/* Patient detail and odontogram */
.patient-banner {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  color: var(--os-ink);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  box-shadow: none;
}
.patient-banner .avatar {
  background: var(--os-primary-soft);
  color: var(--os-primary-active);
}
.patient-banner .identity-meta {
  color: var(--os-muted);
}
.patient-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.tabbar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 17px;
}
.tab-btn {
  min-height: var(--os-control-height);
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-weight: var(--os-weight-medium);
  font-size: 12px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn.active {
  color: var(--primary);
  border-color: var(--primary);
}
.odontogram-shell {
  overflow-x: auto;
  padding: 20px 8px 14px;
}
.odontogram-chart {
  min-width: 760px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 16px;
  border: 1px solid #dfe4ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 5px #f8fafc;
}
.odontogram-arch {
  display: grid;
  grid-template-columns: repeat(16, minmax(38px, 1fr));
  gap: 3px;
  min-width: 720px;
  margin: 8px auto 14px;
}
.odontogram-arch.primary-arch {
  grid-template-columns: repeat(10, 45px);
  justify-content: center;
  min-width: 480px;
  margin: 7px auto;
}
.tooth-card {
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.clinical-tooth-map {
  width: 42px;
  height: 42px;
  position: relative;
  display: grid;
  place-items: center;
}
.tooth-crown {
  display: block;
  width: 42px;
  height: 42px;
  overflow: visible;
  filter: drop-shadow(0 1px 1px rgba(29, 41, 62, 0.08));
}
.tooth-crown.type-incisor {
  transform: scaleX(0.78);
}
.tooth-crown.type-canine {
  transform: scaleX(0.86) scaleY(0.94);
}
.tooth-crown.type-canine .odontogram-surface {
  transform-origin: center;
}
.tooth-crown.type-premolar {
  transform: scale(0.9);
}
.tooth-crown.type-molar {
  transform: scale(1.02);
}
.odontogram-surface {
  fill: #fff;
  stroke: #68758a;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition:
    fill 0.12s ease,
    filter 0.12s ease,
    stroke-width 0.12s ease;
}
.odontogram-surface:hover {
  filter: brightness(0.92);
  stroke: #21314d;
  stroke-width: 2;
}
.odontogram-surface:focus {
  outline: none;
  stroke: var(--primary);
  stroke-width: 2.6;
}
.odontogram-surface.status-caries {
  fill: #3f7fd7;
  stroke: #2f5f9f;
}
.odontogram-surface.status-restoration,
.odontogram-surface.status-crown,
.odontogram-surface.status-implant,
.odontogram-surface.status-endodontic,
.odontogram-surface.status-orthodontic,
.odontogram-surface.status-fixed_prosthesis,
.odontogram-surface.status-removable_prosthesis {
  fill: #d95463;
  stroke: #a82f42;
}
.odontogram-surface.status-missing,
.odontogram-surface.status-missing_temporary,
.odontogram-surface.status-missing_permanent,
.odontogram-surface.status-extraction_indicated,
.odontogram-surface.status-erupting {
  fill: #fff;
  stroke: #68758a;
}
.odontogram-surface.status-watch {
  fill: #efc353;
  stroke: #b88a1b;
}
.tooth-fdi-number {
  min-width: 28px;
  height: 19px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #202b40;
  font: 800 10px/1 var(--font-mono, monospace);
  cursor: pointer;
}
.tooth-fdi-number:hover {
  background: #edf3f8;
  color: var(--primary);
}
.tooth-fdi-number:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.tooth-fdi-number.status-caries {
  color: #2764b6;
  background: #edf4ff;
}
.tooth-fdi-number.status-restoration,
.tooth-fdi-number.status-crown,
.tooth-fdi-number.status-implant,
.tooth-fdi-number.status-endodontic,
.tooth-fdi-number.status-orthodontic,
.tooth-fdi-number.status-fixed_prosthesis,
.tooth-fdi-number.status-removable_prosthesis {
  color: #bd3347;
  background: #fff0f2;
}
.tooth-fdi-number.status-missing,
.tooth-fdi-number.status-missing_permanent {
  color: #b62d42;
  background: #fff0f2;
}
.tooth-fdi-number.status-missing_temporary,
.tooth-fdi-number.status-extraction_indicated,
.tooth-fdi-number.status-erupting {
  color: #245fae;
  background: #edf4ff;
}
.tooth-fdi-number.status-crown_indicated {
  color: #245fae;
  background: #edf4ff;
}
.tooth-fdi-number.status-watch {
  color: #8f6811;
  background: #fff8df;
}
.tooth-procedure-symbol {
  position: absolute;
  z-index: 4;
  top: -4px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border-radius: 9px;
  color: #fff;
  background: #d95463;
  border: 2px solid #fff;
  font: 800 7px/1 var(--font-mono, monospace);
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(20, 31, 53, 0.18);
}
.tooth-procedure-symbol.status-healthy {
  background: #27835c;
}
.tooth-procedure-symbol.status-caries {
  background: #3f7fd7;
}
.tooth-procedure-symbol.status-missing {
  background: #28354b;
}
.tooth-procedure-symbol.status-watch {
  background: #c49423;
}
.tooth-clinical-mark {
  position: absolute;
  z-index: 5;
  inset: -2px;
  width: 46px;
  height: 46px;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 1px 1px rgba(20, 31, 53, 0.22));
}
.tooth-clinical-mark path {
  stroke: currentColor;
  stroke-width: 4.4;
  vector-effect: non-scaling-stroke;
}
.tooth-clinical-mark.mark-crown circle {
  stroke: currentColor;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}
.treatment-surface-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 6px;
}
.tooth-clinical-mark.mark-required {
  color: #1769c2;
}
.tooth-clinical-mark.mark-existing {
  color: #cf304a;
}
.tooth-clinical-mark.mark-erupting path {
  stroke-width: 4;
}
.odontogram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.odontogram-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.odontogram-legend i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  background: #fff;
}
.odontogram-legend .legend-existing {
  background: #d94c5c;
}
.odontogram-legend .legend-required {
  background: #3979d8;
}
.odontogram-legend .legend-watch {
  background: #e9b949;
}
.arch-label {
  color: #748198;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  text-align: center;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.odontogram-midline {
  min-width: 720px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 13px;
  align-items: center;
  color: #8792a6;
  font-size: var(--os-text-caption);
  text-align: center;
  margin: 6px 0;
}
.odontogram-midline i {
  height: 16px;
  background: #c8cfdb;
}
.primary-dentition {
  width: 540px;
  min-width: 540px;
  margin: 24px auto 4px;
  padding: 12px 20px 10px;
  border: 1px dashed #d9dee8;
  border-radius: 12px;
  background: #fafbfd;
}
.odontogram-symbol-reference {
  min-width: 760px;
  max-width: 1120px;
  margin: 12px auto 0;
  padding: 11px 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 17px;
  border-radius: 10px;
  background: #f6f8fb;
  color: #59677e;
  font-size: var(--os-text-caption);
}
.odontogram-symbol-reference strong {
  color: #26334a;
  margin-right: 5px;
}
.odontogram-symbol-reference b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-right: 4px;
  border-radius: 6px;
  background: #edf3ff;
  color: #2e67b5;
  font: 800 8px/1 var(--font-mono, monospace);
}
.odontogram-reference-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--os-weight-medium);
  color: #45536a;
}
.reference-mark {
  position: relative;
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 25px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  background: #fff;
}
.reference-mark .tooth-clinical-mark {
  inset: 2px;
  width: 19px;
  height: 19px;
  filter: none;
}
.reference-mark .tooth-clinical-mark path {
  stroke-width: 3.2;
}
.reference-arrow-pair {
  width: 42px;
  flex-basis: 42px;
  grid-template-columns: 1fr 1fr;
}
.reference-arrow-pair .tooth-clinical-mark {
  position: static;
  width: 17px;
  height: 19px;
}
.tooth-entry-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.tooth-entry-summary span {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: var(--os-text-caption);
}
.practice-code {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 5px 7px;
  border-radius: 7px;
  background: #edf3ff;
  color: #315fa8;
  font: 760 10px/1 var(--font-mono, monospace);
  letter-spacing: 0.04em;
}
.practice-picker {
  position: relative;
}
.practice-search-control {
  position: relative;
}
.practice-search-control > span {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 50%;
  color: #64748b;
  font-size: 18px;
  transform: translateY(-52%);
  pointer-events: none;
}
.practice-search-control .input {
  padding-left: 38px;
  padding-right: 34px;
}
.practice-search-control::after {
  content: '⌄';
  position: absolute;
  right: 13px;
  top: 50%;
  color: #64748b;
  font-size: 14px;
  transform: translateY(-55%);
  pointer-events: none;
}
.practice-results {
  position: absolute;
  z-index: 30;
  top: 61px;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #b8c9e4;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 15px 34px rgba(25, 42, 72, 0.18);
}
.practice-result {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #25324a;
  text-align: left;
  cursor: pointer;
}
.practice-result:hover,
.practice-result.is-active {
  background: #edf4ff;
}
.practice-result.is-custom {
  margin-bottom: 4px;
  border: 1px dashed #8eafe3;
  background: #f7faff;
}
.practice-result.is-custom:hover,
.practice-result.is-custom.is-active {
  background: #eaf2ff;
}
.practice-result:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.practice-result .practice-code {
  justify-self: start;
}
.practice-result strong {
  font-size: var(--os-text-caption);
  line-height: 1.35;
}
.practice-result-more,
.practice-result-empty {
  padding: 11px 10px;
  color: #68758b;
  font-size: var(--os-text-caption);
  line-height: 1.4;
}
.provider-readonly {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid #c9d9f5;
  border-radius: 10px;
  background: #f5f8ff;
}
.provider-readonly strong,
.provider-readonly small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.provider-readonly strong {
  color: #203457;
  font-size: var(--os-text-caption);
}
.provider-readonly small {
  margin-top: 2px;
  color: #73819a;
  font-size: var(--os-text-caption);
}
.appointment-booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  gap: 15px;
  align-items: start;
}
.appointment-occupancy {
  padding: 16px;
  border: 1px solid #cedbf2;
  border-radius: 14px;
  background: #f7faff;
  position: sticky;
  top: 0;
}
.find-next-slot {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 9px 11px;
  border: 1px solid #aac2ed;
  border-radius: 11px;
  background: #fff;
  color: #214f99;
  text-align: left;
  cursor: pointer;
}
.find-next-slot:hover {
  border-color: var(--primary);
  background: #edf4ff;
}
.find-next-slot > span:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
}
.find-next-slot strong,
.find-next-slot small {
  display: block;
}
.find-next-slot strong {
  font-size: var(--os-text-caption);
}
.find-next-slot small {
  margin-top: 2px;
  color: #74829a;
  font-size: var(--os-text-caption);
}
.loader.loader-sm {
  width: 21px;
  height: 21px;
  border-width: 2px;
}
.occupancy-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-bottom: 9px;
  color: #64738b;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-medium);
}
.occupancy-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.occupancy-legend i {
  width: 9px;
  height: 9px;
  border: 1px solid #d4dce9;
  border-radius: 3px;
  background: #fff;
}
.occupancy-legend .busy {
  border-color: #efabb5;
  background: #ffe9ed;
}
.occupancy-legend .chosen {
  border-color: #6c91e8;
  background: #dce8ff;
}
.occupancy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(66px, 1fr));
  gap: 5px;
}
.occupancy-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 9px;
  min-height: 49px;
  border: 1px solid #d6dfec;
  border-radius: 8px;
  background: #fff;
  color: #34445d;
  font: 800 11px/1.25 var(--font-mono, monospace);
  cursor: pointer;
}
.occupancy-slot:not(:disabled):hover {
  border-color: #7fa4eb;
  background: #edf4ff;
  transform: translateY(-1px);
}
.occupancy-slot:disabled {
  cursor: not-allowed;
  opacity: 1;
}
.occupancy-slot small {
  margin-top: 4px;
  color: #74839a;
  font: 650 8px/1 var(--font-sans, sans-serif);
}
.occupancy-slot.is-selected {
  border-color: #86a5f7;
  box-shadow: inset 0 0 0 1px #86a5f7;
  background: #eef3ff;
}
.occupancy-slot.is-occupied {
  border-color: #f0b9c1;
  background: #fff0f2;
  color: #a22c3e;
}
.occupancy-slot.is-conflict {
  background: #d94c5c;
  border-color: #d94c5c;
  color: #fff;
}
.occupancy-slot.is-conflict small {
  color: #fff;
}
.occupancy-list {
  margin-top: 10px;
}
.occupancy-list summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #405777;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  cursor: pointer;
}
.occupancy-list summary:hover {
  color: var(--primary-dark);
}
.occupancy-list summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.occupancy-appointment-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}
.occupancy-appointment {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: var(--os-text-caption);
}
.occupancy-appointment > span b,
.occupancy-appointment > span small {
  display: block;
}
.occupancy-appointment > span small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.intake-decision-actions {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}
.intake-decision-actions > .btn {
  flex: 0 0 auto;
  min-height: 42px;
}
.intake-decision-actions .form-field {
  flex: 1 1 360px;
  margin: 0;
}
.intake-decision-control {
  display: flex;
  gap: 8px;
}
.intake-decision-control .select {
  min-width: 0;
  flex: 1;
}
.intake-direct-actions {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.intake-action-block {
  display: grid;
  gap: 7px;
}
.intake-action-main {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.intake-action-main > .btn {
  min-height: 42px;
}
.intake-action-main > span {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.intake-action-label {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.intake-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.intake-action-grid-all {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.intake-action-grid .btn {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  font-size: var(--os-text-caption);
  line-height: 1.2;
  white-space: normal;
}
.intake-action-close {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.intake-action-close .intake-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 50%;
}
@media (min-width: 721px) {
  #modalBody:has(.intake-direct-actions) > .grid.grid-2 > .card.card-pad {
    padding: 15px;
  }
  #modalBody:has(.intake-direct-actions) > .grid.grid-2 .stack.small {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 16px;
  }
  #modalBody:has(.intake-direct-actions)
    > .grid.grid-2
    > .card:first-child
    .stack.small
    > div:nth-child(4) {
    grid-column: 1 / -1;
  }
}
.intake-review-note {
  margin-top: 14px;
}
.intake-review-note summary {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: 700;
  cursor: pointer;
}
.intake-review-note summary span {
  font-weight: 500;
}
.intake-review-note .form-field {
  margin-top: 10px;
}
.appointment-intake-contact {
  grid-column: span 2;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.appointment-intake-contact summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  cursor: pointer;
}
.appointment-intake-contact summary > span {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.appointment-intake-contact summary > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--os-text-caption);
}
.appointment-intake-contact[open] summary {
  border-bottom: 1px solid var(--line);
}
.appointment-intake-contact .form-grid {
  padding: 12px;
}
.intake-appointment-occupancy .occupancy-slot {
  min-height: 39px;
  padding: 7px 8px;
}
.intake-appointment-occupancy .occupancy-slot small {
  display: none;
}
.clinical-record {
  display: grid;
  gap: 12px;
}
.clinical-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px;
  background: #fff;
}
.clinical-section-title {
  font-size: 15px;
  font-weight: var(--os-weight-bold);
  color: #25314a;
  margin-bottom: 13px;
}
.clinical-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.clinical-sheet-card .card-body {
  background: #fbfcfd;
}
.clinical-sheet-card .card-head {
  flex-wrap: wrap;
  gap: 16px;
}
.clinical-sheet-card .card-head > div {
  min-width: 0;
}
.clinical-monthly-print {
  display: grid;
  grid-template-columns: minmax(180px, 240px) max-content;
  align-items: end;
  gap: 10px 14px;
  margin: 4px 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.clinical-monthly-print .form-field {
  min-width: 0;
  margin: 0;
}
.clinical-monthly-print p {
  grid-column: 1 / -1;
  max-width: 80ch;
  margin: 0;
}
.patient-signature-status {
  padding: 16px 20px;
}
.patient-signature-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.patient-signature-summary > div:first-child {
  flex: 1 1 260px;
  min-width: 0;
}
.patient-signature-summary p {
  max-width: 76ch;
  margin: 4px 0 0;
}
.patient-signature-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.patient-signature-evidence {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.patient-signature-evidence summary {
  min-height: 44px;
  display: list-item;
  align-content: center;
  cursor: pointer;
  color: var(--primary-dark);
  font-size: 13px;
}
.patient-signature-evidence .mono {
  overflow-wrap: anywhere;
}
.odontogram-heading {
  display: block;
}
.odontogram-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.odontogram-toolbar .odontogram-legend {
  flex: 1 1 380px;
  gap: 8px 16px;
}
.odontogram-temporary-action {
  color: var(--os-danger);
  white-space: nowrap;
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .clinical-monthly-print {
    grid-template-columns: minmax(0, 1fr);
  }
  .clinical-monthly-print .btn {
    width: 100%;
  }
  .patient-signature-status {
    padding: 16px;
  }
}
.patient-data-section {
  border-top: 3px solid var(--primary);
}
.clinical-demographic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}
.medical-flag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.medical-flag {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.medical-flag-answer {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  background: #e8edf3;
  color: #657188;
}
.medical-flag strong {
  display: block;
  color: #27344b;
  font-size: 12px;
}
.medical-flag small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--os-text-caption);
  line-height: 1.35;
}
.medical-flag.is-positive {
  border-color: #e6a6af;
  background: #fff5f6;
}
.medical-flag.is-positive .medical-flag-answer {
  background: #d95463;
  color: #fff;
}
.medical-flag.is-negative {
  border-color: #bfe1d7;
  background: #f4fbf8;
}
.medical-flag.is-negative .medical-flag-answer {
  background: #3c9278;
  color: #fff;
}
.medical-detail-grid {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.clinical-consent-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #cedcf4;
  border-radius: 11px;
  background: #f3f7ff;
  color: #293c62;
}
.clinical-consent-note > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dce8ff;
  color: var(--primary);
}
.clinical-consent-note strong {
  font-size: 13px;
}
.clinical-consent-note p {
  margin: 3px 0 0;
  color: #61708c;
  font-size: var(--os-text-caption);
  line-height: 1.5;
}
.clinical-field {
  min-width: 0;
}
.clinical-field.wide {
  grid-column: 1/-1;
}
.clinical-field-label {
  color: #68758b;
  font-size: var(--os-text-caption);
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.clinical-field-value {
  color: #28344c;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.history-completeness {
  height: 7px;
  border-radius: 8px;
  background: #e6eaf1;
  overflow: hidden;
  margin-top: 8px;
}
.history-completeness span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.template-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.template-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px;
  background: #fff;
}
.template-preview {
  white-space: pre-line;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fafc;
  color: #35405a;
  font-size: var(--os-text-caption);
  line-height: 1.55;
}
.form-section-title {
  margin: 18px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: #26334b;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.form-section-title:first-child {
  margin-top: 0;
}
.boolean-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.boolean-field legend {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}
.boolean-field > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.yes-no-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.yes-no-option {
  min-width: 0;
  cursor: pointer;
}
.yes-no-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.yes-no-option span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #cad4e3;
  border-radius: 10px;
  background: #fff;
  color: #56657d;
  font-size: 14px;
  font-weight: var(--os-weight-bold);
}
.yes-no-option:hover span {
  border-color: #8ba8dc;
  background: #f4f8ff;
}
.yes-no-option input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}
.yes-no-option input[value='true']:checked + span {
  border-color: #e0a0aa;
  background: #fff0f2;
  color: #a92e41;
  box-shadow: inset 0 0 0 1px #e0a0aa;
}
.yes-no-option input[value='false']:checked + span {
  border-color: #8ecab8;
  background: #eefaf6;
  color: #23725c;
  box-shadow: inset 0 0 0 1px #8ecab8;
}
.patient-tab-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.patient-tab-heading h2 {
  margin: 0;
  color: #202d45;
  font-size: 19px;
  letter-spacing: -0.025em;
}
.patient-tab-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.clinical-note {
  border-left: 3px solid var(--primary);
  padding: 12px 13px;
  background: var(--surface-soft);
  border-radius: 0 10px 10px 0;
}
.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.note-cell {
  font-size: var(--os-text-caption);
}
.note-key {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--os-text-caption);
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.locked {
  color: var(--success);
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: var(--os-text-caption);
  font-weight: 700;
}
/* Exceptions */
.exception-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exception {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.exception-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning);
}
.exception.high .exception-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.exception-title {
  font-weight: 700;
  font-size: var(--os-text-caption);
}
.exception-detail {
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-top: 2px;
}
/* Messages */
.inbox-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 650px;
  overflow: hidden;
}
.inbox-list {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  max-height: 720px;
}
.inbox-item {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 10px;
}
.inbox-item:hover,
.inbox-item.active {
  background: var(--primary-soft);
}
.inbox-preview {
  min-width: 0;
  flex: 1;
}
.inbox-name {
  font-weight: 720;
  font-size: 12px;
}
.inbox-snippet {
  font-size: var(--os-text-caption);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-head {
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.chat-body {
  padding: 18px;
  flex: 1;
  background: #f8f9fc;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  max-height: 580px;
}
.bubble {
  max-width: min(72%, 560px);
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
}
.bubble.outbound {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.bubble-meta {
  font-size: var(--os-text-caption);
  opacity: 0.72;
  margin-top: 4px;
}
.chat-compose {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 8px;
}
.chat-compose .input {
  flex: 1;
}
/* Settings */
.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child {
  border-bottom: 0;
}
.setting-name {
  font-weight: 700;
  font-size: 12px;
}
.setting-desc {
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-top: 3px;
  max-width: 620px;
}
.switch {
  width: 42px;
  height: 23px;
  background: #cdd3df;
  border-radius: 20px;
  padding: 3px;
  flex: 0 0 auto;
  transition: 0.2s;
}
.switch::after {
  content: '';
  width: 17px;
  height: 17px;
  background: #fff;
  border-radius: 50%;
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}
.switch.on {
  background: var(--primary);
}
.switch.on::after {
  transform: translateX(19px);
}
/* At browser zoom or on short screens, let fields scroll without sticky bars covering them. */
@media screen and (max-height: 500px) {
  .modal .modal-head,
  .modal .modal-foot {
    position: static;
  }
}
/* Modal & toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.56);
  backdrop-filter: none;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overscroll-behavior: contain;
}
.modal {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}
.modal.modal-lg {
  width: min(960px, 100%);
}
.modal.modal-xl {
  width: min(1180px, 100%);
}
.modal.modal-clinical {
  width: min(1280px, 100%);
}
.modal-clinical .modal-head {
  padding: 22px 26px;
}
.modal-clinical .modal-title {
  font-size: 23px;
}
.modal-clinical .modal-body {
  padding: 24px 28px 30px;
}
.modal-clinical .form-grid {
  gap: 18px;
}
.modal-clinical .form-section-title {
  margin: 28px 0 15px;
  padding-bottom: 10px;
  font-size: 17px;
}
.modal-clinical .form-label {
  font-size: 13px;
  line-height: 1.35;
}
.modal-clinical .input,
.modal-clinical .select,
.modal-clinical .textarea {
  font-size: 16px;
}
.modal-clinical .input,
.modal-clinical .select {
  min-height: 48px;
  height: 48px;
}
.modal-clinical .textarea {
  min-height: 92px;
  padding: 12px 13px;
  line-height: 1.5;
}
.modal-clinical .modal-foot {
  padding: 16px 26px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.modal-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}
.modal-body {
  padding: 20px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  position: sticky;
  bottom: 0;
}
.appointment-detail {
  display: grid;
  gap: 14px;
}
.appointment-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--os-surface);
}
.appointment-overview-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.appointment-time {
  font: 700 14px/1 var(--font-mono);
  color: var(--text);
}
.appointment-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.appointment-detail-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.appointment-detail-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.appointment-detail-value {
  font-size: 15px;
  font-weight: var(--os-weight-bold);
  line-height: 1.25;
}
.appointment-detail-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.appointment-risk {
  min-height: 20px;
}
.appointment-notes,
.appointment-flow,
.appointment-tools,
.appointment-delete {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
}
.appointment-notes > div {
  font-size: 14px;
  line-height: 1.45;
}
.appointment-notes p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}
.appointment-flow {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.035);
}
.appointment-flow-head,
.appointment-tools,
.appointment-delete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.appointment-flow h3,
.appointment-tools h3 {
  margin: 0;
  font-size: 14px;
}
.appointment-flow p,
.appointment-tools p,
.appointment-delete p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.appointment-flow-actions,
.appointment-tools-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.appointment-tools {
  align-items: center;
}
.appointment-tools-actions {
  justify-content: flex-end;
  margin-top: 0;
}
.appointment-delete {
  align-items: center;
  border-color: rgba(191, 43, 62, 0.25);
  background: rgba(191, 43, 62, 0.035);
}
#appointmentActionError {
  margin-top: 9px;
  color: var(--danger);
}
@media (max-width: 640px) {
  .appointment-overview,
  .appointment-flow-head,
  .appointment-tools,
  .appointment-delete {
    align-items: flex-start;
    flex-direction: column;
  }
  .appointment-overview-status,
  .appointment-tools-actions {
    justify-content: flex-start;
  }
  .appointment-detail-grid {
    grid-template-columns: 1fr;
  }
  .appointment-detail-card {
    min-height: 0;
  }
}
.toast-stack {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.toast {
  width: min(380px, calc(100vw - 40px));
  background: #172039;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-in 0.25s ease;
}
.toast.success {
  background: #126b4d;
}
.toast.error {
  background: #9f3040;
}
.toast-copy {
  flex: 1;
  min-width: 0;
  align-self: center;
}
.toast-close {
  flex: 0 0 var(--os-control-height);
  min-height: var(--os-control-height);
  min-width: var(--os-control-height);
  border: 1px solid currentColor;
  border-radius: var(--os-radius-xs);
  background: transparent;
  color: inherit;
  font-size: 22px;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.loader {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e8ef;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Shared public and authentication branding */
.public-body {
  background: #fff;
}
.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--os-weight-bold);
  font-size: 17px;
  letter-spacing: -0.03em;
}
.brand-word {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.brand-word strong {
  font-size: 16px;
  font-weight: var(--os-weight-bold);
  letter-spacing: -0.035em;
}
.brand-word small {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.public-brand-inverse .brand-word strong {
  color: #fff;
}
.public-brand-inverse .brand-word small {
  color: #9ca7c1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cfddf5;
  background: rgba(247, 249, 252, 0.92);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.075em;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.slot-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 8px 5px;
  font-weight: 700;
  font-size: var(--os-text-caption);
}
.slot-btn:hover,
.slot-btn.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
/* Patient portal */
.patient-shell {
  font-size: var(--os-text-input);
  min-height: 100vh;
  background: var(--bg);
}
.patient-topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - 1160px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
}
.patient-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 20px 55px;
}
.patient-welcome {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 20px;
  padding: 25px;
  color: var(--os-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  position: relative;
}
.patient-welcome::before {
  content: '';
  width: 210px;
  height: 210px;
  position: absolute;
  right: 30px;
  top: -64px;
  background: url('/static/brand/mark-master-inverse.svg') center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
.patient-welcome::after {
  content: '';
  width: 260px;
  height: 260px;
  border-radius: 50%;
  position: absolute;
  right: -150px;
  top: -150px;
  background: rgba(96, 165, 250, 0.2);
  pointer-events: none;
}
.patient-welcome > * {
  position: relative;
  z-index: 1;
}
.patient-welcome h1 {
  margin: 0 0 7px;
  font-size: 29px;
  letter-spacing: -0.045em;
  position: relative;
  z-index: 1;
}
.patient-welcome p {
  margin: 0;
  color: var(--os-muted);
  position: relative;
  z-index: 1;
}
.patient-nav {
  display: flex;
  gap: 7px;
  padding: 17px 0;
  overflow-x: auto;
}
.patient-nav button {
  min-height: var(--os-control-height);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: var(--os-weight-medium);
  font-size: var(--os-text-caption);
  white-space: nowrap;
}
.patient-nav button.active {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}
.appointment-ticket {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}
.ticket-date {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 13px;
  text-align: center;
  min-width: 90px;
}
.ticket-day {
  font-size: 28px;
  line-height: 1;
  font-weight: var(--os-weight-bold);
}
.ticket-month {
  font-size: var(--os-text-caption);
  text-transform: uppercase;
  font-weight: var(--os-weight-bold);
}
.ticket-body {
  padding: 14px 16px;
  flex: 1;
}
.ticket-actions {
  display: flex;
  gap: 7px;
  padding: 13px;
  align-items: center;
}
.treatment-visual {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  background: #fff;
}
.clinical-treatment-ledger {
  overflow: hidden;
  border-color: #ccd4df;
  box-shadow: 0 3px 12px rgba(22, 31, 52, 0.05);
}
.treatment-ledger-table {
  min-width: 980px;
  table-layout: auto;
}
.treatment-ledger-table th {
  color: #4d5668;
  background: #f3f1ea;
  border-right: 1px solid #d7d4ca;
}
.treatment-ledger-table td {
  min-width: 76px;
  border-right: 1px solid #e0ddd4;
  line-height: 1.42;
}
.treatment-ledger-table th:last-child,
.treatment-ledger-table td:last-child {
  border-right: 0;
}
.treatment-ledger-table tbody tr:nth-child(even) {
  background: #fcfcfa;
}
.treatment-ledger-table tbody tr:hover {
  background: #f8f9f4;
}
.treatment-log-date {
  white-space: nowrap;
}
.treatment-log-notes {
  min-width: 180px;
  max-width: 320px;
  white-space: normal;
}
.treatment-conformity {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  white-space: nowrap;
}
.treatment-conformity.is-confirmed {
  color: var(--success);
  border-color: #9ed9c3;
  background: var(--success-soft);
}
.treatment-entry-sheet {
  padding: 18px;
  border: 1px solid #d7d4ca;
  border-radius: 13px;
  background: var(--os-surface);
}
.treatment-cost-field {
  padding: 12px 13px;
  border: 1px solid #c9d9f5;
  border-left: 3px solid #6f96d9;
  border-radius: 10px;
  background: #f7faff;
}
.treatment-cost-field .optional-label {
  margin-left: 5px;
  color: #60708b;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-medium);
  text-transform: none;
}
.treatment-cost-control {
  position: relative;
  max-width: 260px;
}
.treatment-cost-control > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  color: #3e5f92;
  font-weight: var(--os-weight-bold);
  transform: translateY(-50%);
  pointer-events: none;
}
.treatment-cost-control .input {
  padding-left: 31px;
  background: #fff;
}
.treatment-cost-field > small {
  color: #60708b;
  font-size: var(--os-text-caption);
  font-weight: 500;
  line-height: 1.45;
}
.treatment-conformity-check {
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.treatment-conformity-check span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.treatment-conformity-check small {
  color: var(--muted);
  font-weight: 500;
}
.payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}
.payment-stat {
  background: var(--surface-soft);
  border-radius: 11px;
  padding: 11px;
}
.payment-stat span {
  display: block;
  color: var(--muted);
  font-size: var(--os-text-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.payment-stat strong {
  display: block;
  margin-top: 4px;
}
/* Responsive */
@media (max-width: 1180px) {
  .topbar-patient-search {
    width: min(290px, 28vw);
  }
  .workspace-identity {
    display: none;
  }
}
@media (max-width: 980px) {
  .today-command {
    grid-template-columns: 1fr;
  }
  .appointment-booking-layout {
    grid-template-columns: 1fr;
  }
  .appointment-occupancy {
    position: static;
  }
  .intake-decision-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .intake-decision-actions > .btn {
    width: 100%;
  }
  .intake-decision-actions .form-field {
    width: 100%;
    flex-basis: auto;
  }
  .intake-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .intake-action-grid-all {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .intake-action-close .intake-action-grid {
    max-width: none;
  }
  .template-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-scrim:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(10, 20, 42, 0.42);
    backdrop-filter: none;
  }
  .app-main {
    grid-column: 1;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .page-container {
    padding: 22px 20px 45px;
  }
  .topbar {
    padding: 0 20px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout-main-aside {
    grid-template-columns: 1fr;
  }
  .dashboard-today-agenda {
    height: auto;
  }
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-showcase {
    min-height: 380px;
    padding: 35px;
  }
  .inbox-layout {
    grid-template-columns: 280px 1fr;
  }
}
@media (max-width: 900px) {
  .clinical-treatment-ledger {
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .clinical-treatment-ledger > .card-head {
    padding-inline: 0;
  }
  .clinical-treatment-ledger .table-wrap {
    overflow: visible;
  }
  .treatment-ledger-table {
    min-width: 0;
    display: block;
  }
  .treatment-ledger-table thead {
    display: none;
  }
  .treatment-ledger-table tbody {
    display: grid;
    gap: 12px;
  }
  .treatment-ledger-table tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  .treatment-ledger-table td {
    display: grid;
    grid-template-columns: minmax(112px, 38%) 1fr;
    gap: 10px;
    min-width: 0;
    max-width: none;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .treatment-ledger-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: var(--os-text-caption);
    font-weight: var(--os-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .treatment-ledger-table td:last-child {
    border-bottom: 0;
  }
  .treatment-ledger-table td[colspan] {
    display: block;
    padding: 0;
  }
  .treatment-ledger-table td[colspan]::before {
    content: none;
  }
  .treatment-ledger-table .action-menu {
    justify-content: flex-start;
  }
  .treatment-entry-sheet {
    padding: 14px;
  }
}
@media (max-width: 720px) {
  .btn,
  .btn-sm,
  .icon-btn,
  .patient-nav button,
  .tab-btn,
  .section-switcher-btn {
    min-height: 44px;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .sidebar-logout {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .input,
  .select,
  .textarea,
  .topbar-patient-search > input,
  .chat-compose .input {
    font-size: 16px;
  }
  .input,
  .select {
    min-height: 44px;
    height: 44px;
  }
  .topbar-patient-search > input {
    min-height: 44px;
    height: 44px;
  }
  .patient-list-toolbar,
  .patient-filter-controls {
    width: 100%;
    align-items: stretch;
  }
  .patient-filter-controls {
    flex-direction: column;
  }
  .patient-filter-controls .search-box,
  .patient-insurance-filter {
    width: 100%;
    max-width: none;
  }
  #patientResultCount {
    align-self: flex-start;
    margin: 0;
  }
  .checkbox-row {
    min-height: 44px;
    align-items: center;
  }
  .tooth-fdi-number {
    min-width: 44px;
    height: 44px;
    border: 1px solid #dce4ef;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 12px;
  }
  .modal-foot {
    flex-wrap: wrap;
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
  }
  .bar-row {
    grid-template-columns: minmax(72px, 0.85fr) minmax(52px, 1.5fr) auto;
    gap: 8px;
  }
  .patient-container .card > .row-between {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }
  .form-field.span-2,
  .form-field.span-3 {
    grid-column: span 1;
  }
  .appointment-intake-contact {
    grid-column: span 1;
  }
  .intake-action-main {
    grid-template-columns: 1fr;
  }
  .intake-action-main > span {
    display: none;
  }
  #modalBody:has(.intake-resolution) {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  #modalBody:has(.intake-resolution) > .intake-resolution {
    order: -1;
    margin-top: 0 !important;
  }
  .clinical-section-grid,
  .clinical-demographic-grid,
  .template-catalog {
    grid-template-columns: 1fr;
  }
  .medical-flag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .occupancy-grid {
    grid-template-columns: repeat(3, minmax(62px, 1fr));
  }
  .occupancy-appointment {
    grid-template-columns: 72px 1fr;
  }
  .occupancy-appointment .badge {
    grid-column: 2;
    justify-self: start;
  }
  .page-head {
    flex-direction: column;
  }
  .page-actions {
    width: 100%;
  }
  .topbar-title {
    font-size: 15px;
  }
  .topbar-breadcrumb,
  .demo-badge,
  .workspace-identity {
    display: none;
  }
  .topbar-patient-search {
    width: min(250px, 45vw);
  }
  .help-task-grid {
    grid-template-columns: 1fr;
  }
  .section-switcher {
    width: 100%;
  }
  .today-command-actions {
    grid-template-columns: 1fr;
  }
  .today-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
  }
  .today-summary > div:nth-child(2) {
    border-right: 0;
  }
  .today-summary > div:nth-child(3) {
    padding-left: 0;
  }
  .management-summary-body {
    align-items: flex-start;
    flex-direction: column;
  }
  .login-showcase {
    min-height: 310px;
    padding: 28px 22px;
  }
  .login-copy h1 {
    font-size: 43px;
  }
  .login-features {
    display: none;
  }
  .workspace-assurance {
    grid-template-columns: auto 1fr;
  }
  .workspace-private-badge {
    grid-column: 2;
    justify-self: start;
  }
  .login-panel {
    padding: 30px 20px;
  }
  .login-card a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .session-remember {
    min-height: 44px;
    align-items: center;
  }
  .session-remember input {
    width: 20px;
    height: 20px;
    margin-top: 0;
  }
  .public-brand {
    min-height: 44px;
  }
  .slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .patient-welcome {
    align-items: flex-start;
    flex-direction: column;
  }
  .appointment-ticket .row {
    align-items: stretch;
  }
  .ticket-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .payment-summary {
    grid-template-columns: 1fr;
  }
  .inbox-layout {
    grid-template-columns: 1fr;
  }
  .inbox-list {
    max-height: 250px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .modal-backdrop {
    padding: 8px;
    align-items: end;
  }
  .modal {
    max-height: 95vh;
    border-radius: 18px 18px 0 0;
  }
  .modal-clinical .modal-head,
  .modal-clinical .modal-body,
  .modal-clinical .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-clinical .modal-title {
    font-size: 20px;
  }
  .patient-tab-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .patient-tab-heading .btn {
    width: 100%;
  }
  .patient-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .patient-banner > .identity {
    align-items: flex-start;
  }
  .patient-banner > .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .patient-banner > .page-actions .btn {
    width: 100%;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
  }
  .agenda-toolbar,
  .date-switcher {
    width: 100%;
  }
  .date-chip {
    min-width: 0;
    flex: 1;
  }
  .next-gap-button {
    width: 100%;
  }
  .agenda-use-hint {
    align-items: flex-start;
  }
  .schedule.single-provider .schedule-head,
  .schedule.single-provider .schedule-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .schedule.single-provider .schedule-head-cell {
    padding: 10px;
  }
  .schedule-time {
    padding-left: 5px;
    padding-right: 7px;
  }
  .occupancy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .occupancy-slot {
    min-height: 52px;
  }
  .intake-appointment-occupancy .occupancy-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .intake-appointment-occupancy .occupancy-slot {
    min-height: 39px;
  }
}

@media (max-width: 600px) {
  .topbar {
    gap: 8px;
    padding: 0 12px;
  }
  .topbar-left > div {
    display: none;
  }
  .topbar-patient-search {
    width: auto;
    flex: 1;
    margin-left: 0;
  }
  .topbar-right > a {
    display: none;
  }
  .public-brand .brand-word small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover {
    transform: none;
  }
}
/* Consultation workflow */
.pipeline-summary {
  min-height: 126px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.pipeline-summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--os-weight-bold);
}
.pipeline-summary strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.pipeline-summary small {
  color: var(--muted);
  font-size: 12px;
}
/* Public consultation intake */
.intake-body {
  min-height: 100vh;
  background: #edf3fb;
}
.intake-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(560px, 1.18fr);
}
.intake-story {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: clamp(30px, 5vw, 74px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--os-ink);
}
.intake-story::before {
  content: '';
  position: absolute;
  width: min(54vw, 720px);
  aspect-ratio: 1;
  left: -34%;
  bottom: -31%;
  background: url('/static/brand/mark-master-inverse.svg') center / contain no-repeat;
  opacity: 0.045;
  transform: rotate(9deg);
}
.intake-story::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, transparent 54%, rgba(96, 165, 250, 0.09));
}
.intake-brand,
.intake-story-copy {
  position: relative;
  z-index: 1;
}
.intake-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.intake-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.intake-brand > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.intake-brand strong {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.02em;
}
.intake-brand small {
  color: #9eacc6;
  font-size: var(--os-text-caption);
}
.intake-back-link {
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: #dce6f8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(220, 230, 248, 0.4);
  text-underline-offset: 4px;
}
.intake-back-link:hover {
  color: #fff;
  text-decoration-color: #fff;
}
.intake-story-copy {
  margin: clamp(72px, 14vh, 160px) 0 0;
  max-width: 500px;
}
.intake-kicker,
.intake-file-label {
  color: #60a5fa;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.intake-story h1 {
  margin: 16px 0 12px;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.intake-story h1 em {
  color: #93c5fd;
  font-style: normal;
  font-weight: 500;
}
.intake-story-copy > p {
  margin: 0;
  max-width: 430px;
  color: #b5c1d6;
  font-size: 16px;
  line-height: 1.5;
}
.intake-workspace {
  min-height: 100vh;
  padding: clamp(30px, 6vw, 86px);
  display: grid;
  place-items: center;
}
.intake-card,
.intake-result,
.intake-gate {
  width: min(100%, 760px);
}
.intake-card {
  padding: clamp(26px, 4.2vw, 52px);
  border: 1px solid #d9e2ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(17, 28, 54, 0.12);
}
.intake-card-head {
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.intake-card-head h2 {
  margin: 8px 0 4px;
  font-size: 30px;
  letter-spacing: -0.045em;
}
.intake-card-head p {
  margin: 0;
  color: var(--muted);
}
.intake-section {
  min-width: 0;
  margin: 0;
  padding: 28px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.intake-section legend {
  width: 100%;
  margin-bottom: 17px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #26334b;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--os-weight-bold);
}
.intake-section legend span {
  color: var(--primary);
  font-family: ui-monospace, monospace;
  font-size: var(--os-text-caption);
  letter-spacing: 0.08em;
}
.intake-emergency {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  margin: 22px 0 14px;
  padding: 13px 15px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
  color: #715029;
  font-size: 12px;
}
.intake-emergency strong {
  color: #5d3a10;
}
.intake-consent {
  padding: 7px 0 14px;
  color: #4d5870;
}
.intake-inline-cue {
  margin-top: 14px;
}
.intake-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.intake-error {
  min-height: 20px;
  margin-bottom: 7px;
  color: var(--danger);
  font-size: 12px;
}
.intake-submit {
  min-height: 54px;
  border-radius: 13px;
}
.intake-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: var(--os-text-caption);
}
.intake-gate {
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
}
.intake-gate p {
  margin: 0;
}
.intake-gate-error {
  max-width: 460px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.intake-gate-error strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}
.intake-gate-error p {
  margin: 8px 0;
}
.intake-gate-error span {
  font-size: var(--os-text-caption);
}
.intake-result {
  padding: clamp(32px, 5vw, 58px);
  border: 1px solid #cfe3dc;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(17, 28, 54, 0.12);
  text-align: center;
}
.intake-result-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 29px;
}
.intake-result h2 {
  margin: 10px auto;
  max-width: 520px;
  font-size: clamp(29px, 4vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.intake-result > p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--muted);
}
.intake-result-detail {
  margin-top: 26px;
  padding: 16px;
  border-radius: 13px;
  background: var(--surface-soft);
  text-align: left;
}
.intake-result-detail span,
.intake-result-detail strong {
  display: block;
}
.intake-result-detail span {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.intake-result-detail strong {
  margin-top: 4px;
}
.intake-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 980px) {
  .intake-shell {
    grid-template-columns: 1fr;
  }
  .intake-story {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 22px 24px 26px;
  }
  .intake-story-copy {
    margin: 34px 0 0;
  }
  .intake-story h1 {
    font-size: clamp(34px, 8vw, 46px);
  }
  .intake-workspace {
    min-height: auto;
    padding: 36px 20px 58px;
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  .intake-story {
    padding: 28px 48px;
  }
  .intake-story-copy {
    margin-top: clamp(52px, 10vh, 84px);
  }
  .intake-story h1 {
    margin: 14px 0 12px;
    font-size: clamp(38px, 4vw, 50px);
  }
  .intake-story-copy > p {
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  .intake-story {
    padding: 18px 18px 22px;
  }
  .intake-topbar {
    align-items: flex-start;
  }
  .intake-back-link {
    font-size: var(--os-text-caption);
  }
  .intake-brand strong {
    font-size: 14px;
  }
  .intake-story-copy {
    margin-top: 28px;
  }
  .intake-story h1 {
    font-size: 35px;
  }
  .intake-story-copy > p {
    font-size: 14px;
  }
  .intake-workspace {
    padding: 24px 12px 42px;
    align-items: start;
  }
  .intake-card,
  .intake-result {
    padding: 24px 18px;
    border-radius: 18px;
  }
  .intake-card-head h2 {
    font-size: 26px;
  }
  .intake-section {
    padding: 23px 0;
  }
  .intake-emergency {
    grid-template-columns: 1fr;
  }
}
/* Pablo Dodero · landing clara y minimalista */
.pd-simple {
  --ds-ink: #18322c;
  --ds-green: #1f5e4d;
  --ds-green-dark: #173f35;
  --ds-muted: #61706b;
  --ds-line: #dce4e0;
  --ds-soft: #f2f6f4;
  --ds-white: #ffffff;
  min-width: 320px;
  color: var(--ds-ink);
  background: var(--ds-white);
  font-size: 16px;
}
.pd-simple .ds-container {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}
.pd-simple .ds-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--ds-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}
.pd-simple .ds-nav {
  width: min(1208px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.pd-simple .ds-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}
.pd-simple .ds-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.pd-simple .ds-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}
.pd-simple .ds-brand strong {
  color: var(--ds-ink);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.pd-simple .ds-brand small {
  margin-top: 4px;
  color: var(--ds-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.pd-simple .ds-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #4f5f5a;
  font-size: 13px;
  font-weight: 650;
}
.pd-simple .ds-links a,
.pd-simple .ds-portal-link {
  transition: color 0.16s ease;
}
.pd-simple .ds-links a:hover,
.pd-simple .ds-portal-link:hover {
  color: var(--ds-green);
}
.pd-simple .ds-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.pd-simple .ds-portal-link {
  color: #4f5f5a;
  font-size: 13px;
  font-weight: 650;
}
.pd-simple .ds-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}
.pd-simple .ds-button:hover {
  transform: translateY(-1px);
}
.pd-simple .ds-button-primary {
  color: #fff;
  background: var(--ds-green);
  border-color: var(--ds-green);
}
.pd-simple .ds-button-primary:hover {
  background: var(--ds-green-dark);
  border-color: var(--ds-green-dark);
}
.pd-simple .ds-button-secondary {
  color: var(--ds-ink);
  background: #fff;
  border-color: #bfcac5;
}
.pd-simple .ds-button-secondary:hover {
  border-color: var(--ds-green);
  color: var(--ds-green);
}
.pd-simple .ds-button-light {
  width: 100%;
  color: var(--ds-green-dark);
  background: #fff;
  border-color: #fff;
}
.pd-simple .ds-button-light:hover {
  background: #f3f7f5;
}
.pd-simple .ds-button-small {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 13px;
}
.pd-simple .ds-menu-button {
  display: none;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--ds-line);
  border-radius: 7px;
  color: var(--ds-ink);
  background: #fff;
  font: 700 12px/1 var(--font);
}
.pd-simple .ds-mobile-menu[hidden] {
  display: none;
}
.pd-simple .ds-mobile-menu {
  width: 100%;
  padding: 10px 24px 22px;
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--ds-line);
  background: #fff;
}
.pd-simple .ds-mobile-menu > a:not(.ds-button) {
  padding: 13px 4px;
  border-bottom: 1px solid #edf1ef;
  color: #465752;
  font-size: 14px;
  font-weight: 650;
}
.pd-simple .ds-mobile-menu .ds-button {
  margin-top: 12px;
}

.pd-simple .ds-hero {
  padding: 88px 0 76px;
  background: #fbfcfb;
}
.pd-simple .ds-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: clamp(60px, 8vw, 112px);
  align-items: center;
}
.pd-simple .ds-eyebrow,
.pd-simple .ds-card-label {
  display: block;
  color: var(--ds-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.pd-simple .ds-hero h1 {
  max-width: 750px;
  margin: 20px 0 24px;
  color: var(--ds-ink);
  font-size: clamp(48px, 5.5vw, 72px);
  font-weight: 730;
  letter-spacing: -0.055em;
  line-height: 1.01;
}
.pd-simple .ds-hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: var(--ds-muted);
  font-size: 18px;
  line-height: 1.7;
}
.pd-simple .ds-hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pd-simple .ds-professional-line {
  margin-top: 44px;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  border-top: 1px solid var(--ds-line);
  color: var(--ds-muted);
  font-size: 12px;
}
.pd-simple .ds-professional-line strong {
  color: var(--ds-ink);
  font-weight: 750;
}
.pd-simple .ds-turn-card {
  padding: 38px;
  border-radius: 14px;
  color: #fff;
  background: var(--ds-green-dark);
  box-shadow: 0 18px 50px rgba(23, 63, 53, 0.13);
}
.pd-simple .ds-turn-card .ds-card-label {
  color: #a9c6bc;
}
.pd-simple .ds-turn-card h2 {
  margin: 17px 0 13px;
  color: #fff;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.pd-simple .ds-turn-card > p {
  margin: 0 0 28px;
  color: #cfddd8;
  font-size: 14px;
  line-height: 1.65;
}
.pd-simple .ds-patient-shortcut {
  margin-top: 28px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
  color: #b6cbc4;
  font-size: 12px;
}
.pd-simple .ds-patient-shortcut a {
  color: #fff;
  font-weight: 750;
}
.pd-simple .ds-facts {
  border-block: 1px solid var(--ds-line);
  background: #fff;
}
.pd-simple .ds-facts .ds-container {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1.6fr 0.75fr 0.65fr;
  align-items: center;
}
.pd-simple .ds-facts span,
.pd-simple .ds-facts a {
  min-height: 34px;
  padding: 3px 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid var(--ds-line);
  color: var(--ds-muted);
  font-size: 12px;
}
.pd-simple .ds-facts span:first-child {
  padding-left: 0;
}
.pd-simple .ds-facts span:last-child {
  padding-right: 0;
  border-right: 0;
}
.pd-simple .ds-facts strong {
  color: var(--ds-ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pd-simple .ds-section {
  padding: 96px 0;
  background: #fff;
}
.pd-simple .ds-section-soft {
  background: var(--ds-soft);
}
.pd-simple .ds-section-heading {
  max-width: 700px;
  margin-bottom: 42px;
}
.pd-simple .ds-section-heading h2,
.pd-simple .ds-care-copy h2,
.pd-simple .ds-patient-grid h2 {
  margin: 13px 0 12px;
  color: var(--ds-ink);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.pd-simple .ds-section-heading > p,
.pd-simple .ds-care-copy > p,
.pd-simple .ds-patient-grid p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 15px;
  line-height: 1.7;
}
.pd-simple .ds-treatment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  overflow: hidden;
}
.pd-simple .ds-treatment-grid article {
  min-height: 220px;
  padding: 34px;
  border-right: 1px solid var(--ds-line);
  background: #fff;
}
.pd-simple .ds-treatment-grid article:last-child {
  border-right: 0;
}
.pd-simple .ds-treatment-grid h3 {
  margin: 0 0 13px;
  color: var(--ds-ink);
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.025em;
}
.pd-simple .ds-treatment-grid p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 14px;
  line-height: 1.65;
}
.pd-simple .ds-care-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.75fr);
  gap: clamp(70px, 10vw, 145px);
  align-items: start;
}
.pd-simple .ds-care-copy > p {
  max-width: 600px;
}
.pd-simple .ds-doctor {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.pd-simple .ds-doctor-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ds-green);
  font-size: 12px;
  font-weight: 800;
}
.pd-simple .ds-doctor > span:last-child {
  display: flex;
  flex-direction: column;
}
.pd-simple .ds-doctor strong {
  font-size: 14px;
}
.pd-simple .ds-doctor small {
  margin-top: 3px;
  color: var(--ds-muted);
  font-size: 11px;
}
.pd-simple .ds-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #cdd8d3;
}
.pd-simple .ds-steps li {
  padding: 24px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 17px;
  border-bottom: 1px solid #cdd8d3;
}
.pd-simple .ds-steps li > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #9eb3ab;
  border-radius: 50%;
  color: var(--ds-green);
  font-size: 11px;
  font-weight: 800;
}
.pd-simple .ds-steps strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ds-ink);
  font-size: 15px;
}
.pd-simple .ds-steps p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 13px;
  line-height: 1.55;
}
.pd-simple .ds-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pd-simple .ds-location-grid article {
  min-height: 250px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: #fff;
}
.pd-simple .ds-location-city {
  align-self: flex-start;
  color: var(--ds-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pd-simple .ds-location-grid h3 {
  margin: 0 0 7px;
  color: var(--ds-ink);
  font-size: 27px;
  font-weight: 720;
  letter-spacing: -0.035em;
}
.pd-simple .ds-location-grid p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 13px;
}
.pd-simple .ds-location-grid article > a {
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ds-line);
  color: var(--ds-green);
  font-size: 12px;
  font-weight: 750;
}
.pd-simple .ds-contact-row {
  margin-top: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 12px;
  color: #fff;
  background: var(--ds-green-dark);
}
.pd-simple .ds-contact-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pd-simple .ds-contact-row span {
  color: #aec6be;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pd-simple .ds-contact-row strong {
  font-size: 14px;
}
.pd-simple .ds-contact-row > a {
  color: #fff;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.pd-simple .ds-patient-section {
  padding: 72px 0;
  border-top: 1px solid var(--ds-line);
  background: #f8faf9;
}
.pd-simple .ds-patient-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}
.pd-simple .ds-patient-grid > div {
  max-width: 670px;
}
.pd-simple .ds-patient-grid h2 {
  font-size: clamp(31px, 3.4vw, 44px);
}
.pd-simple .ds-patient-grid .ds-button {
  flex: 0 0 auto;
}

.pd-simple .ds-footer {
  padding: 52px 0 28px;
  color: #c4d2cd;
  background: #122e27;
}
.pd-simple .ds-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 45px;
}
.pd-simple .ds-brand-footer strong {
  color: #fff;
}
.pd-simple .ds-brand-footer small {
  color: #90aaa1;
}
.pd-simple .ds-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
  font-size: 12px;
  font-weight: 650;
}
.pd-simple .ds-footer-links a:hover {
  color: #fff;
}
.pd-simple .ds-footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #829c93;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pd-simple .ds-admin-link {
  color: #829c93;
}
.pd-simple .ds-admin-link:hover {
  color: #c4d2cd;
}
.pd-simple :where(a, button):focus-visible {
  outline-color: rgba(31, 94, 77, 0.45);
}

@media (max-width: 920px) {
  .pd-simple .ds-links,
  .pd-simple .ds-portal-link {
    display: none;
  }
  .pd-simple .ds-menu-button {
    display: inline-flex;
  }
  .pd-simple .ds-hero-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .pd-simple .ds-turn-card {
    max-width: 620px;
  }
  .pd-simple .ds-facts .ds-container {
    grid-template-columns: 1fr 1fr;
  }
  .pd-simple .ds-facts span:last-child {
    grid-column: 1 / -1;
    padding: 14px 0;
    border-top: 1px solid var(--ds-line);
  }
  .pd-simple .ds-facts span:nth-child(2) {
    border-right: 0;
  }
  .pd-simple .ds-care-grid {
    gap: 65px;
  }
}

@media (max-width: 680px) {
  .pd-simple .ds-container,
  .pd-simple .ds-nav {
    width: min(100% - 32px, 1160px);
  }
  .pd-simple .ds-nav {
    min-height: 72px;
  }
  .pd-simple .ds-brand img {
    width: 38px;
    height: 38px;
  }
  .pd-simple .ds-brand {
    min-height: 44px;
  }
  .pd-simple .ds-brand strong {
    font-size: 14px;
  }
  .pd-simple .ds-brand small {
    font-size: 8px;
  }
  .pd-simple .ds-actions > .ds-button {
    display: none;
  }
  .pd-simple .ds-menu-button {
    min-height: 44px;
  }
  .pd-simple .ds-hero {
    padding: 58px 0 54px;
  }
  .pd-simple .ds-hero h1 {
    margin-top: 16px;
    font-size: clamp(41px, 12vw, 54px);
    line-height: 1.02;
  }
  .pd-simple .ds-hero-copy > p {
    font-size: 16px;
    line-height: 1.6;
  }
  .pd-simple .ds-hero-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 28px;
  }
  .pd-simple .ds-hero-actions .ds-button {
    width: 100%;
  }
  .pd-simple .ds-professional-line {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 34px;
  }
  .pd-simple .ds-turn-card {
    padding: 28px 24px;
    border-radius: 12px;
  }
  .pd-simple .ds-turn-card h2 {
    font-size: 27px;
  }
  .pd-simple .ds-patient-shortcut {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .pd-simple .ds-patient-shortcut a,
  .pd-simple .ds-location-grid article > a,
  .pd-simple .ds-contact-row > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .pd-simple .ds-facts .ds-container {
    grid-template-columns: 1fr;
  }
  .pd-simple .ds-facts a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .pd-simple .ds-facts span,
  .pd-simple .ds-facts span:first-child {
    min-height: auto;
    padding: 15px 0;
    border-right: 0;
    border-bottom: 1px solid var(--ds-line);
  }
  .pd-simple .ds-facts span:last-child {
    grid-column: auto;
    border-top: 0;
    border-bottom: 0;
  }
  .pd-simple .ds-section {
    padding: 72px 0;
  }
  .pd-simple .ds-section-heading {
    margin-bottom: 30px;
  }
  .pd-simple .ds-section-heading h2,
  .pd-simple .ds-care-copy h2,
  .pd-simple .ds-patient-grid h2 {
    font-size: 35px;
  }
  .pd-simple .ds-treatment-grid {
    grid-template-columns: 1fr;
  }
  .pd-simple .ds-treatment-grid article {
    min-height: auto;
    padding: 28px 25px;
    border-right: 0;
    border-bottom: 1px solid var(--ds-line);
  }
  .pd-simple .ds-treatment-grid article:last-child {
    border-bottom: 0;
  }
  .pd-simple .ds-care-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .pd-simple .ds-location-grid {
    grid-template-columns: 1fr;
  }
  .pd-simple .ds-location-grid article {
    min-height: 225px;
    padding: 25px;
  }
  .pd-simple .ds-contact-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
  }
  .pd-simple .ds-patient-section {
    padding: 62px 0;
  }
  .pd-simple .ds-patient-grid {
    align-items: stretch;
    flex-direction: column;
    gap: 28px;
  }
  .pd-simple .ds-patient-grid .ds-button {
    width: 100%;
  }
  .pd-simple .ds-footer {
    padding-top: 44px;
  }
  .pd-simple .ds-footer-main {
    align-items: flex-start;
    flex-direction: column;
  }
  .pd-simple .ds-footer-links {
    justify-content: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .pd-simple .ds-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-simple .ds-button,
  .pd-simple .ds-links a,
  .pd-simple .ds-portal-link {
    transition: none;
  }
}

/* Pablo Dodero: operational layouts shared by staff and patient views. */
body {
  overflow-wrap: break-word;
}
.agenda-list {
  display: grid;
  gap: 10px;
}
.agenda-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto 20px;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--text);
  text-align: left;
  align-items: center;
}
.agenda-card:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.agenda-card strong,
.agenda-card small {
  display: block;
}
.agenda-card small {
  color: var(--muted);
  margin-top: 4px;
}
.agenda-time {
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.daily-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0 0 20px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.daily-summary strong {
  white-space: nowrap;
}
.quadrant-control {
  display: none;
}
.import-results {
  min-width: 0;
}
.invitation-message {
  width: 100%;
  min-height: 180px;
}
.patient-list-toolbar .form-field {
  flex: 1;
}
.patient-directory .identity {
  min-width: 0;
}
@media (max-width: 1200px) {
  .data-table {
    min-width: 0;
  }
  .data-table:not(.treatment-ledger-table) thead {
    display: none;
  }
  .data-table:not(.treatment-ledger-table),
  .data-table:not(.treatment-ledger-table) tbody {
    display: block;
    width: 100%;
  }
  .data-table:not(.treatment-ledger-table) tbody tr {
    display: block;
    margin: 12px;
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .data-table:not(.treatment-ledger-table) td {
    display: grid;
    grid-template-columns: minmax(95px, 32%) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 10px 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .data-table td > * {
    min-width: 0;
  }
  .data-table:not(.treatment-ledger-table) td > .badge,
  .data-table:not(.treatment-ledger-table) td > .btn {
    justify-self: start;
    width: auto;
  }
  .data-table:not(.treatment-ledger-table) td > .identity-meta:empty {
    display: none;
  }
  .data-table:not(.treatment-ledger-table) td::before {
    content: attr(data-label);
    font-size: var(--os-text-caption);
    font-weight: 700;
    color: var(--muted);
  }
  .data-table:not(.treatment-ledger-table) td[colspan] {
    display: block;
  }
  .data-table td[colspan]::before {
    display: none;
  }
  .data-table .btn {
    min-width: 44px;
    width: auto;
    white-space: normal;
  }
  .data-table .action-menu {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .table-wrap {
    overflow: visible;
  }
  .patient-directory td:first-child {
    display: block !important;
  }
  .patient-directory td:first-child::before {
    display: none;
  }
}
@media (max-width: 900px) {
  .patient-directory td:nth-child(4),
  .patient-directory td:nth-child(6),
  .patient-directory td:nth-child(7) {
    display: none !important;
  }
}
@media (max-width: 900px) {
  .page-container {
    padding: 18px 14px 36px;
  }
  .page-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-actions .btn {
    flex: 1 1 140px;
  }
  .card-head,
  .row-between {
    gap: 12px;
    flex-wrap: wrap;
  }
  .card-title {
    min-width: 0;
  }
  .agenda-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
    gap: 10px;
  }
  .agenda-card .agenda-time {
    grid-column: 1 / -1;
  }
  .agenda-card > span:last-child {
    display: none;
  }
  .agenda-card .badge {
    white-space: normal;
  }
  .date-switcher {
    flex-wrap: wrap;
  }
  .date-switcher .form-field {
    flex: 1;
    min-width: 140px;
  }
  .appointment-ticket > .row {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .ticket-date {
    min-width: 0;
    padding: 14px 8px;
  }
  .ticket-body {
    min-width: 0;
    padding: 14px;
  }
  .ticket-body .row-between {
    display: block;
  }
  .ticket-body .badge {
    margin-top: 10px;
  }
  .ticket-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
  }
  .ticket-actions .btn {
    flex: 1;
    min-width: 120px;
  }
  .patient-nav {
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px;
  }
  .patient-nav button {
    flex: 1 1 auto;
    font-size: 12px;
  }
  .patient-topbar {
    gap: 12px;
    flex-wrap: wrap;
  }
  .patient-topbar > .row {
    margin-left: auto;
  }
  .identity {
    min-width: 0;
  }
  .identity-name {
    overflow-wrap: anywhere;
  }
  .today-summary > div {
    display: block;
  }
  .today-summary strong {
    white-space: nowrap;
    font-size: 16px;
  }
  .kpi-value {
    font-size: 26px;
  }
  .kanban {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .modal {
    width: 100%;
    max-height: calc(100dvh - 16px);
  }
  .modal-head {
    flex: 0 0 auto;
  }
  .modal-body {
    min-height: 0;
    scroll-padding-top: 12px;
  }
  .modal-foot .btn {
    flex: 1 1 120px;
  }
  .quadrant-control {
    display: flex;
    margin-bottom: 16px;
  }
  .quadrant-hidden {
    display: none !important;
  }
  .odontogram-shell {
    overflow: visible;
  }
  .odontogram-chart {
    min-width: 0;
    padding: 12px 6px;
  }
  .odontogram-arch,
  .odontogram-arch.primary-arch {
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 4px;
  }
  .primary-dentition {
    min-width: 0;
    width: 100%;
    padding: 8px;
    margin: 0;
  }
  .odontogram-midline {
    display: none;
  }
  .odontogram-symbol-reference {
    min-width: 0;
    font-size: var(--os-text-caption);
  }
  .tooth-card .clinical-tooth-map {
    max-width: 100%;
  }
  .login-showcase {
    min-height: auto;
    padding: 22px;
  }
  .login-copy {
    margin: 24px 0 0;
  }
  .login-copy h1 {
    font-size: 32px;
  }
  .login-panel {
    padding: 24px 18px;
  }
}

@media (max-width: 900px) {
  .section-switcher,
  #patientTabs {
    flex-wrap: wrap;
    overflow: visible;
    height: auto;
  }
  .section-switcher > * {
    flex: 1 1 130px;
  }
  #patientTabs > * {
    flex: 1 1 100px;
    min-height: 44px;
  }
  .kanban-column {
    min-width: 0;
    width: 100%;
  }
}
/* Theme consolidated in 00–05: the approved UI kit owns colors, type and controls. */
/* Navigation remains a quiet, stable frame around clinical work. */
.sidebar {
  background: #fff;
  color: var(--text);
  border-right: 1px solid var(--line);
  box-shadow: none;
}
.brand {
  border-bottom-color: var(--line);
}
.brand-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}
.brand-caption {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.sidebar-scroll {
  scrollbar-color: #d5d1cc transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #d5d1cc;
}
.nav-label,
.nav-subgroup-label {
  color: #77716c;
  font-size: var(--os-text-caption);
  letter-spacing: 0.11em;
}
.nav-item {
  color: var(--os-muted);
  border-radius: 8px;
  font-weight: 550;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.nav-item:hover {
  transform: none;
  color: var(--text);
  background: var(--os-canvas);
  border-color: transparent;
}
.nav-item.active,
.nav-disclosure.section-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: transparent;
  box-shadow: none;
}
.nav-item.active::before {
  left: -12px;
  width: 3px;
  height: var(--os-control-height);
  background: var(--primary);
  box-shadow: none;
}
.nav-icon {
  background: transparent;
  color: #77716c;
  border-color: transparent;
}
.nav-item:hover .nav-icon {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}
.nav-item.active .nav-icon {
  color: var(--primary);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.nav-count {
  color: #6e6862;
  background: var(--os-surface-subtle);
}
.nav-item.active .nav-count {
  background: #d2e8fa;
  color: var(--primary-dark);
}
.nav-tools,
.sidebar-footer {
  border-color: var(--line);
}
.nav-disclosure .nav-chevron,
.nav-disclosure.expanded .nav-chevron {
  color: var(--muted);
}
.nav-more-panel {
  border-color: var(--line);
}
.nav-help {
  color: var(--os-muted);
}
.sidebar-user {
  background: var(--os-surface-subtle);
  border-color: var(--line);
  border-radius: 9px;
}
.sidebar-user .avatar {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.sidebar-user-name {
  color: var(--text);
}
.sidebar-user-role {
  color: var(--muted);
}
.sidebar-logout {
  color: var(--muted);
}
.sidebar-logout:hover {
  color: var(--text);
  background: var(--os-surface-subtle);
  border-color: transparent;
}
.topbar {
  background: #fff;
  backdrop-filter: none;
  border-bottom-color: var(--line);
}
.topbar-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}
.topbar-patient-search > input {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--os-surface-subtle);
}
.topbar-patient-search > input:focus-visible {
  background: #fff;
}
.workspace-identity {
  border-color: var(--line);
  background: #fff;
  border-radius: 8px;
}
.workspace-lock {
  border-radius: 7px;
}
.workspace-identity small {
  color: var(--muted);
}
.topbar-right .icon-btn svg,
.mobile-menu svg {
  width: 17px;
  height: 17px;
}
/* Daily work, agenda and charts use flat surfaces with clear dividers. */
.today-command {
  background: #fff;
  gap: 20px 24px;
  padding: 24px;
}
.today-command-intro h2 {
  font-size: 22px;
  font-weight: 700;
}
.today-command-intro p {
  font-size: 12px;
}
.quick-action,
.help-task,
.patient-action-list button {
  border-radius: 8px;
  box-shadow: none;
}
.quick-action:hover,
.help-task:hover {
  transform: none;
  box-shadow: none;
  border-color: #a6ccee;
  background: #f7fbff;
}
.quick-action > svg,
.help-task-icon {
  border-radius: 8px;
}
.patient-action-list button:hover {
  background: #f7fbff;
  border-color: #a6ccee;
}
.workspace-assurance {
  background: var(--os-surface);
  color: var(--os-ink);
  border: 1px solid var(--os-border);
  border-color: #171717;
  border-radius: 12px;
  box-shadow: none;
}
.workspace-assurance-mark {
  border-radius: 8px;
}
.workspace-assurance p {
  color: var(--os-muted);
}
.schedule-head {
  background: var(--os-surface-subtle);
}
.schedule-row,
.schedule-cell {
  border-color: var(--line);
}
.schedule-cell:hover {
  background: var(--os-surface-subtle);
}
.appointment-block:hover {
  transform: none;
  box-shadow: none;
}
.appt-name {
  color: var(--text);
}
.appt-meta {
  color: var(--muted);
}
.patient-banner {
  background: var(--os-surface);
  color: var(--os-ink);
  border: 1px solid var(--os-border);
  border-radius: 12px;
  box-shadow: none;
}
.patient-banner .identity-meta {
  color: var(--os-muted);
}
.clinical-treatment-ledger {
  border-color: var(--line);
  box-shadow: none;
}
.treatment-ledger-table th {
  background: var(--os-surface-subtle);
}
.treatment-entry-sheet {
  background: #fff;
  border-color: var(--line);
}
.kanban-column {
  background: var(--os-surface-subtle);
  border-radius: 12px;
}
.kanban-card {
  box-shadow: none;
}
.modal {
  border: 1px solid var(--line);
  border-radius: 12px;
}
.modal-foot {
  background: var(--os-surface-subtle);
}
/* Patient and intake views inherit the same paper and ink vocabulary. */
.patient-topbar {
  background: #fff;
}
.patient-welcome {
  background: var(--os-surface);
  color: var(--os-ink);
  border: 1px solid var(--os-border);
  border-radius: 12px;
}
.patient-welcome::after {
  display: none;
}
.patient-welcome p {
  color: var(--os-muted);
}
.patient-nav button {
  border-radius: 8px;
}
.patient-nav button.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: #b9dcf7;
}
.ticket-date {
  background: var(--primary-soft);
}
.login-screen {
  background: var(--paper);
}
.login-showcase.staff-login-showcase,
.login-showcase.patient-login-showcase {
  background: var(--os-surface);
  color: var(--os-ink);
  border: 1px solid var(--os-border);
}
.login-showcase::after {
  display: none;
}
.login-showcase .eyebrow {
  color: var(--os-muted);
}
.login-showcase .brand-inverse,
.login-showcase .brand {
  color: var(--os-ink);
}
.login-copy p {
  color: var(--os-muted);
}
.login-feature {
  border-radius: 8px;
  background: var(--os-surface-subtle);
  border-color: var(--os-border);
  color: var(--os-ink);
}
.login-panel {
  background: var(--paper);
}
.login-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.login-card h2 {
  font-weight: 700;
}

@media (max-width: 980px) {
  .sidebar {
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12);
  }
  .page-container {
    padding: 24px 20px 44px;
  }
}
@media (max-width: 720px) {
  .page-container {
    padding: 20px 16px 40px;
  }
  .page-head {
    align-items: flex-start;
  }
  .today-command {
    padding: 18px;
  }
  .login-card {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn,
  .nav-item,
  .quick-action,
  .help-task {
    transition-duration: 0.01ms;
  }
}
/* Reflow dense clinical content before labels or amounts become cramped. */
@media (min-width: 901px) and (max-width: 1599px) {
  .kanban {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }
  .kanban-column {
    min-height: 0;
  }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kanban {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .patient-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .patient-banner > .page-actions {
    width: 100%;
  }
  #patientTabs {
    flex-wrap: wrap;
    overflow: visible;
    height: auto;
  }
  #patientTabs > * {
    flex: 1 1 135px;
    min-height: 44px;
  }
}
@media (min-width: 901px) and (max-width: 1500px) {
  .clinical-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .clinical-layout > aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/*
 * OdontoSuite workspace language.
 * This is the visual reference used by the professional portal before UI-07:
 * soft blue light, translucent clinical surfaces and compact navigation.
 */
:root {
  --bg: var(--os-canvas);
  --surface-soft: var(--os-surface-subtle);
  --surface-2: var(--os-surface-subtle);
  --line: rgba(82, 119, 158, 0.18);
  --line-strong: #b9c9d9;
  --shadow-sm: 0 4px 15px rgba(30, 66, 112, 0.07);
  --shadow-md: 0 14px 36px rgba(30, 66, 112, 0.12);
  --paper: var(--os-canvas);
  --ink-soft: var(--os-muted);
}
body {
  background:
    radial-gradient(circle at 83% 0%, rgba(113, 201, 239, 0.23), transparent 36%),
    radial-gradient(circle at 10% 75%, rgba(135, 163, 241, 0.18), transparent 34%), var(--os-canvas);
  background-attachment: fixed;
}
.page-container {
  position: relative;
}
.card,
.schedule,
.appointment-ticket,
.treatment-visual,
.clinical-treatment-ledger {
  background: linear-gradient(142deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.77));
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--os-radius-md);
  box-shadow:
    0 2px 3px rgba(30, 66, 112, 0.035),
    0 16px 36px rgba(30, 66, 112, 0.08),
    inset 0 1px 0 #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card {
  outline: 1px solid rgba(102, 145, 185, 0.08);
}
.btn,
.icon-btn,
.quick-action,
.patient-action-list button {
  border-radius: var(--os-radius-sm);
}
.btn {
  box-shadow:
    0 2px 6px rgba(21, 65, 111, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    transform var(--os-duration-normal) var(--os-ease),
    box-shadow var(--os-duration-normal) var(--os-ease),
    background-color var(--os-duration-normal) var(--os-ease),
    border-color var(--os-duration-normal) var(--os-ease);
}
.btn:hover,
.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(25, 83, 140, 0.13);
}
.btn:active,
.quick-action:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(160deg, #289bef, var(--os-primary-active));
  border-color: #177ecf;
  box-shadow:
    0 5px 15px rgba(0, 117, 222, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(160deg, #148be1, var(--os-primary-hover));
  color: var(--os-on-primary);
}
.btn-secondary,
.icon-btn,
.quick-action {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(238, 247, 255, 0.77));
  border-color: rgba(122, 158, 196, 0.26);
}
.btn-secondary:hover,
.icon-btn:hover,
.quick-action:hover {
  background: var(--os-surface);
  border-color: rgba(0, 117, 222, 0.48);
  color: var(--os-primary-hover);
}
.input,
.select,
.textarea {
  border-radius: var(--os-radius-sm);
  background: rgba(255, 255, 255, 0.87);
}
.sidebar {
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.97), rgba(232, 242, 252, 0.92));
  border-right-color: rgba(255, 255, 255, 0.86);
  box-shadow: 8px 0 30px rgba(30, 66, 112, 0.07);
}
.brand {
  height: 70px;
  flex-shrink: 0;
  gap: 13px;
  border-bottom-color: rgba(88, 133, 177, 0.14);
}
.brand-name {
  font-size: 19px;
  letter-spacing: -0.045em;
}
.brand-mark {
  width: 38px;
  height: 38px;
}
.nav-item {
  border-radius: var(--os-radius-sm);
}
.nav-item.active,
.nav-disclosure.section-active {
  background: linear-gradient(100deg, rgba(208, 235, 255, 0.98), rgba(236, 246, 255, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 4px 11px rgba(30, 92, 158, 0.07);
}
.topbar {
  gap: 16px;
  background: rgba(246, 251, 255, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 12px rgba(30, 66, 112, 0.045);
}
.topbar-left,
.topbar-right {
  flex: 0 0 auto;
}
.topbar-patient-search {
  flex: 0 1 330px;
  min-width: 170px;
  margin-left: auto;
}
.topbar-patient-search > input {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(122, 158, 196, 0.27);
  border-radius: var(--os-radius-sm);
  box-shadow: inset 0 1px 0 #fff;
}
.workspace-identity {
  max-width: 260px;
  border-color: rgba(122, 158, 196, 0.27);
  border-radius: var(--os-radius-sm);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 #fff;
}
.workspace-identity strong {
  font-size: var(--os-text-caption);
}
.today-command {
  gap: 20px 24px;
  padding: 24px;
  background: linear-gradient(132deg, rgba(255, 255, 255, 0.91), rgba(225, 242, 255, 0.76));
}
.today-command-intro h2 {
  margin-top: 11px;
}
.quick-action {
  min-height: 74px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 9px rgba(32, 85, 138, 0.06);
}
.quick-action > svg {
  border-radius: var(--os-radius-sm);
}
.daily-summary {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.84);
  border-radius: var(--os-radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}
.date-switcher {
  align-items: flex-end;
}
.date-switcher > .form-field {
  min-width: 0;
}
.date-control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.date-control-row .input {
  width: 180px;
  min-width: 0;
}
.date-control-row .icon-btn,
.date-control-row .btn {
  height: var(--os-control-height);
  min-height: var(--os-control-height);
  flex-shrink: 0;
}
.patient-banner,
.patient-welcome {
  background: linear-gradient(125deg, #162f55, #245d91 70%, #2388b5);
  color: var(--os-on-primary);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 19px;
  box-shadow:
    0 14px 35px rgba(19, 74, 128, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.patient-banner .identity-meta,
.patient-welcome p {
  color: #dceefb;
}
.patient-banner .btn-secondary {
  color: #19324f;
}
.patient-banner h1:focus:not(:focus-visible) {
  outline: none;
}
.patient-nav button.active,
.section-switcher-btn.active {
  background: linear-gradient(150deg, #e2f3ff, #f9fcff);
  color: var(--os-primary-active);
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 7px rgba(30, 90, 154, 0.09);
}
.modal {
  border-radius: var(--os-radius-md);
  box-shadow: var(--os-shadow-dialog);
}
.sidebar .ui-sidebar-close {
  display: none;
}
.sidebar[aria-modal='true'] .ui-sidebar-close {
  display: inline-flex;
  width: 100%;
  margin-bottom: var(--os-space-4);
}
@media (max-width: 980px) {
  .topbar {
    gap: 12px;
  }
  .topbar-patient-search {
    flex: 1 1 auto;
  }
}
@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }
  .topbar {
    gap: 8px;
  }
  .date-control-row {
    gap: 8px;
  }
  .date-control-row .input {
    flex: 1 1 130px;
    width: auto;
  }
  .date-control-row .icon-btn {
    width: var(--os-control-height);
    flex-basis: var(--os-control-height);
  }
  .today-command {
    padding: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn,
  .quick-action {
    transition-duration: 0.01ms;
  }
}
/* Barra de trabajo: búsqueda centrada y una única acción de actualización. */
.topbar {
  display: grid;
  grid-template-columns: 38px minmax(280px, 560px) 38px;
  justify-content: center;
  gap: 12px;
  padding: 0 30px;
}
.topbar-left,
.topbar-right {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.topbar-patient-search {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.topbar-right {
  justify-self: end;
}
@media (max-width: 600px) {
  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 0 12px;
  }
  .topbar-left,
  .topbar-right {
    width: 44px;
    height: 44px;
  }
}

/* Consultation workspace — a calm, two-paned review surface for the daily queue. */
.dashboard-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-header-actions .dashboard-header-action {
  min-height: var(--os-control-height);
  padding: 8px 14px;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.dashboard-header-actions .dashboard-price-button {
  min-height: var(--os-control-height);
  white-space: nowrap;
}
.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
  margin: 18px 0;
  align-items: stretch;
}
.dashboard-agenda,
.dashboard-consultations {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dashboard-agenda {
  position: relative;
  overflow: hidden;
}
.dashboard-agenda::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #1c9bea 0%, #0878d2 68%, rgba(8, 120, 210, 0) 100%);
}
.dashboard-agenda-head {
  padding-bottom: 15px;
}
.dashboard-agenda-head .card-title {
  margin-top: 6px;
}
.dashboard-agenda-head .btn {
  align-self: center;
}
.dashboard-agenda-head .btn svg {
  width: 15px;
  height: 15px;
}
.dashboard-agenda-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-medium);
}
.dashboard-agenda .agenda-list {
  flex: 1;
  align-content: start;
}
.dashboard-agenda-list {
  position: relative;
  display: grid;
  align-items: start;
  padding: 0 22px 22px;
}
.dashboard-agenda-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 22px;
  left: 49px;
  width: 1px;
  background: linear-gradient(180deg, rgba(0, 117, 222, 0.25), rgba(0, 117, 222, 0.05));
}
.dashboard-agenda .empty-state {
  padding: 42px 20px;
}
.dashboard-consultations .dashboard-consultation-foot {
  margin-top: auto;
}
.operational-summary {
  display: flex;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.summary-stat {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
  flex: 1;
  padding: 15px 18px;
  text-align: left;
  display: grid;
  gap: 2px;
  border-right: 1px solid var(--line);
  font: inherit;
}
.summary-stat:last-child {
  border-right: 0;
}
.summary-stat:not(span) {
  cursor: pointer;
}
.summary-stat:not(span):hover {
  background: rgba(37, 99, 235, 0.06);
}
.summary-stat strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.summary-stat span {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.dashboard-consultations {
  overflow: hidden;
}
.consultation-mini-list {
  display: grid;
}
.consultation-mini {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  text-align: left;
  align-items: center;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.consultation-mini:hover {
  background: rgba(37, 99, 235, 0.05);
}
.consultation-mini-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}
.consultation-mini-copy strong,
.consultation-mini-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.consultation-mini-copy small,
.consultation-mini-time {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.consultation-mini-time {
  max-width: 82px;
  text-align: right;
}
.dashboard-consultation-foot {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
/* Agenda en inicio: cada turno se lee como un punto claro dentro del día. */
.agenda-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto 20px;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  align-items: center;
}
.agenda-card:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.agenda-card strong,
.agenda-card small {
  display: block;
}
.agenda-card small {
  color: var(--muted);
  margin-top: 4px;
}
.agenda-time {
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.agenda-card-copy {
  min-width: 0;
}
.agenda-card-dashboard {
  grid-template-columns: 78px minmax(0, 1fr) auto 22px;
  gap: 16px;
  min-height: 104px;
  padding: 16px 17px 16px 0;
  border: 0;
  border-radius: 14px;
  background: var(--os-surface);
  box-shadow:
    inset 0 0 0 1px rgba(86, 155, 205, 0.19),
    0 10px 23px rgba(33, 89, 141, 0.08);
}
.agenda-card-dashboard:hover {
  background: var(--os-surface);
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(0, 117, 222, 0.46),
    0 12px 27px rgba(33, 89, 141, 0.12);
}
.agenda-card-dashboard .agenda-time {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 78px;
  padding: 12px 10px;
  border-radius: 0 13px 13px 0;
  background: linear-gradient(160deg, #168ee1, #066dc6);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.agenda-card-dashboard .agenda-time strong {
  font-size: 19px;
  letter-spacing: -0.045em;
  line-height: 1;
}
.agenda-card-dashboard .agenda-time small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--os-text-caption);
  font-weight: 700;
}
.agenda-card-dashboard .agenda-card-kicker {
  margin: 0 0 4px;
  color: #3977a4;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.agenda-card-dashboard .agenda-card-copy > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.agenda-card-dashboard .agenda-card-copy > small:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--os-text-caption);
}
.agenda-card-status {
  justify-self: end;
}
.agenda-card-status .badge {
  white-space: nowrap;
}
.agenda-card-chevron {
  width: 18px;
  height: 18px;
  color: #3977a4;
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}
.agenda-card-dashboard:hover .agenda-card-chevron {
  color: var(--primary-dark);
  transform: translateX(2px);
}
@media (max-width: 640px) {
  .dashboard-agenda-head {
    align-items: flex-start;
  }
  .dashboard-agenda-head .btn {
    align-self: flex-start;
  }
  .dashboard-agenda-list {
    padding-inline: 14px;
  }
  .dashboard-agenda-list::before {
    left: 41px;
  }
  .agenda-card-dashboard {
    grid-template-columns: 64px minmax(0, 1fr) 18px;
    gap: 12px;
    min-height: 96px;
    padding-right: 12px;
  }
  .agenda-card.agenda-card-dashboard .agenda-time {
    grid-column: auto !important;
    min-width: 64px;
    padding-inline: 8px;
  }
  .agenda-card-dashboard .agenda-time strong {
    font-size: 17px;
  }
  .agenda-card-dashboard .agenda-card-status {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .agenda-card-chevron {
    transition: none;
  }
}
/* Inicio: resumen operativo compacto, construido sobre las superficies del consultorio. */
.dashboard-v32 {
  --dashboard-gap: 16px;
}
.dashboard-v32 .page-head {
  margin-bottom: 18px;
}
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--dashboard-gap);
  margin-bottom: var(--dashboard-gap);
}
.dashboard-kpi-card {
  appearance: none;
  min-width: 0;
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(102, 145, 185, 0.13);
  border-radius: 16px;
  background: var(--os-surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font: inherit;
  text-align: left;
}
button.dashboard-kpi-card {
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
button.dashboard-kpi-card:hover {
  border-color: rgba(0, 117, 222, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.dashboard-kpi-card:focus-visible,
.dashboard-agenda-item:focus-visible,
.dashboard-attention-item:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.dashboard-kpi-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.dashboard-kpi-icon svg {
  width: 20px;
  height: 20px;
}
.dashboard-kpi-icon-money {
  background: var(--success-soft);
  color: var(--success);
}
.dashboard-kpi-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.dashboard-kpi-copy small {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.dashboard-kpi-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.dashboard-kpi-copy em {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-style: normal;
}
.dashboard-workspace.dashboard-primary-row,
.dashboard-workspace.dashboard-secondary-row {
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 0.92fr);
  gap: var(--dashboard-gap);
  margin: 0 0 var(--dashboard-gap);
  align-items: stretch;
}
.dashboard-v32 .dashboard-panel {
  min-height: 0;
  border-color: rgba(102, 145, 185, 0.13);
}
.dashboard-v32 .dashboard-panel::before {
  display: none;
}
.dashboard-v32 .dashboard-agenda-list:has(> .empty-state) {
  padding: 16px 20px 24px;
  display: grid;
  place-items: center;
}
.dashboard-v32 .dashboard-agenda-list:has(> .empty-state)::before {
  display: none;
}
.dashboard-v32 .dashboard-agenda .empty-state {
  padding: 12px;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.dashboard-v32 .dashboard-agenda .empty-icon {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 12px;
  color: var(--primary);
}
.dashboard-v32 .dashboard-agenda .empty-icon svg {
  width: 24px;
  height: 24px;
}
.dashboard-v32 .dashboard-agenda .empty-state strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}
.dashboard-v32 .dashboard-agenda .empty-state p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.dashboard-panel-head {
  padding: 18px 20px 14px;
}
.dashboard-panel-head .card-title {
  font-size: 16px;
}
.dashboard-agenda-head {
  padding-bottom: 13px;
}
.dashboard-agenda-caption {
  font-size: 12px;
}
.dashboard-agenda-list {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0 20px 20px 49px;
}
.dashboard-agenda-list::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 18px;
  bottom: 39px;
  width: 1px;
  background: rgba(0, 117, 222, 0.25);
}
.dashboard-agenda-item {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 72px;
  padding: 12px 13px;
  border: 1px solid rgba(102, 145, 185, 0.14);
  border-radius: 13px;
  background: var(--os-surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.dashboard-agenda-item:hover {
  border-color: rgba(0, 117, 222, 0.34);
  background: #fff;
  box-shadow: 0 7px 18px rgba(30, 66, 112, 0.07);
}
.dashboard-agenda-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  left: -24px;
  border: 2px solid #e8f5ff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 117, 222, 0.12);
}
.dashboard-agenda-time {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 3px;
  border-right: 1px solid var(--line);
}
.dashboard-agenda-time strong {
  font-size: 16px;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.dashboard-agenda-time small,
.dashboard-agenda-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--os-text-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-agenda-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.dashboard-agenda-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.dashboard-agenda-status {
  justify-self: end;
}
.dashboard-row-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.dashboard-consultations .consultation-mini {
  padding: 12px 20px;
}
.dashboard-consultation-foot {
  padding: 13px 20px;
}
.dashboard-consultation-foot .btn {
  width: 100%;
  justify-content: center;
}
.dashboard-week-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 18px;
  align-items: end;
  padding: 6px 20px 20px;
}
.dashboard-week-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.dashboard-week-metrics > div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(102, 145, 185, 0.1);
  border-radius: 12px;
  background: rgba(244, 249, 253, 0.64);
}
.dashboard-week-metrics strong,
.dashboard-week-metrics span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-week-metrics strong {
  font-size: 17px;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.dashboard-week-metrics span {
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.dashboard-week-chart {
  height: 112px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 7px;
  padding: 0 2px;
}
.dashboard-week-figure {
  min-width: 0;
  margin: 0;
}
.dashboard-week-figure figcaption {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.dashboard-week-chart-empty {
  display: flex;
  align-items: center;
  min-height: 80px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.dashboard-week-bar {
  height: 100%;
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-rows: 14px 1fr 13px;
  gap: 3px;
  align-items: end;
  text-align: center;
}
.dashboard-week-bar span {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-variant-numeric: tabular-nums;
}
.dashboard-week-bar i {
  display: block;
  width: 100%;
  min-height: 3px;
  align-self: end;
  border-radius: 6px 6px 3px 3px;
  background: #b9def8;
}
.dashboard-week-bar i {
  background: var(--primary);
}
.dashboard-week-bar small {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.dashboard-attention-list {
  padding: 0 20px 12px;
}
.dashboard-attention-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: var(--os-weight-medium);
  text-align: left;
  cursor: pointer;
}
.dashboard-attention-item:first-child {
  border-top: 0;
}
.dashboard-attention-item:hover span:nth-child(2) {
  color: var(--primary-dark);
}
.dashboard-attention-item > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-attention-item strong {
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: var(--os-text-caption);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.dashboard-attention-item svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.dashboard-attention-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary);
}
.dashboard-attention-empty {
  padding: 20px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  .dashboard-workspace.dashboard-primary-row,
  .dashboard-workspace.dashboard-secondary-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-v32 .dashboard-consultations {
    min-height: 0;
  }
}
@media (max-width: 860px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-week-content {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-week-chart {
    max-width: 300px;
  }
}
@media (max-width: 600px) {
  .dashboard-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-header-actions .dashboard-header-action {
    flex: 1 1 auto;
  }
  .dashboard-kpis {
    grid-template-columns: 1fr;
  }
  .dashboard-kpi-card {
    min-height: 92px;
  }
  .dashboard-agenda-list {
    padding-left: 38px;
    padding-right: 14px;
  }
  .dashboard-agenda-list::before {
    left: 24px;
  }
  .dashboard-agenda-item {
    grid-template-columns: 84px minmax(0, 1fr) 16px;
    gap: 9px;
  }
  .dashboard-agenda-marker {
    left: -19px;
  }
  .dashboard-agenda-status {
    display: none;
  }
  .dashboard-agenda-time strong {
    font-size: 14px;
  }
  .dashboard-panel-head .btn {
    min-height: var(--os-control-height);
  }
  .dashboard-week-metrics {
    grid-template-columns: 1fr;
  }
  .dashboard-week-chart {
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  button.dashboard-kpi-card,
  .dashboard-agenda-item {
    transition: none;
  }
}
/* Inicio grows with its content; the document owns vertical scrolling at every height. */
@media (min-width: 1101px) {
  .app-main:has(.dashboard-v32) {
    height: auto;
    overflow: visible;
  }
  .app-main:has(.dashboard-v32) #viewRoot {
    height: auto;
    overflow: visible;
  }
  .dashboard-v32 {
    box-sizing: border-box;
    height: auto;
    max-height: none;
    display: grid;
    grid-template-rows: repeat(4, auto);
    align-content: start;
    gap: 14px;
    padding: 16px 24px 28px;
    overflow: visible;
  }
  .dashboard-v32 .page-head {
    min-height: 42px;
    margin: 0;
  }
  .dashboard-v32 .page-title {
    font-size: 24px;
  }
  .dashboard-v32 .page-subtitle {
    font-size: 12px;
  }
  .dashboard-v32 .dashboard-kpis {
    min-height: 0;
    margin: 0;
    gap: 10px;
  }
  .dashboard-v32 .dashboard-kpi-card {
    min-height: 82px;
    padding: 13px 14px;
    gap: 10px;
  }
  .dashboard-v32 .dashboard-kpi-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
  }
  .dashboard-v32 .dashboard-kpi-icon svg {
    width: 17px;
    height: 17px;
  }
  .dashboard-v32 .dashboard-kpi-copy {
    gap: 2px;
  }
  .dashboard-v32 .dashboard-kpi-copy strong {
    font-size: 22px;
  }
  .dashboard-v32 .dashboard-workspace.dashboard-primary-row,
  .dashboard-v32 .dashboard-workspace.dashboard-secondary-row {
    min-height: 0;
    height: auto;
    margin: 0;
    gap: 10px;
  }
  .dashboard-v32 .dashboard-panel {
    min-height: 0;
    overflow: hidden;
  }
  .dashboard-v32 .dashboard-panel-head {
    min-height: 45px;
    padding: 11px 15px 8px;
  }
  .dashboard-v32 .dashboard-panel-head .card-title {
    font-size: 14px;
  }
  .dashboard-v32 .dashboard-panel-head .card-subtitle,
  .dashboard-v32 .dashboard-agenda-caption {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-panel-head .btn {
    min-height: var(--os-control-height);
    padding: 6px 9px;
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-agenda-list {
    min-height: 0;
    height: auto;
    gap: 5px;
    padding: 0 15px 12px 39px;
    overflow: visible;
    scrollbar-width: thin;
  }
  .dashboard-v32 .dashboard-agenda-list::before {
    left: 24px;
    top: 13px;
    bottom: 23px;
  }
  .dashboard-v32 .dashboard-agenda-item {
    min-height: 47px;
    gap: 10px;
    padding: 7px 10px;
    grid-template-columns: 84px minmax(0, 1fr) auto 14px;
  }
  .dashboard-v32 .dashboard-agenda-marker {
    left: -19px;
    width: 8px;
    height: 8px;
  }
  .dashboard-v32 .dashboard-agenda-time strong {
    font-size: 14px;
  }
  .dashboard-v32 .dashboard-agenda-time small,
  .dashboard-v32 .dashboard-agenda-copy small {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-agenda-copy {
    gap: 2px;
  }
  .dashboard-v32 .dashboard-agenda-copy strong {
    font-size: 12px;
  }
  .dashboard-v32 .dashboard-agenda-status .badge {
    padding: 3px 6px;
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-consultations {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .dashboard-v32 .consultation-mini-list {
    min-height: 0;
    overflow: visible;
  }
  .dashboard-v32 .dashboard-consultations .consultation-mini {
    min-height: 37px;
    padding: 7px 15px;
    gap: 8px;
  }
  .dashboard-v32 .consultation-mini-copy {
    gap: 1px;
  }
  .dashboard-v32 .consultation-mini-copy strong {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .consultation-mini-copy small,
  .dashboard-v32 .consultation-mini-time {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-consultation-foot {
    padding: 8px 15px;
  }
  .dashboard-v32 .dashboard-consultation-foot .btn {
    min-height: var(--os-control-height);
    padding: 5px 8px;
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-week {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .dashboard-v32 .dashboard-week-content {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 224px;
    gap: 16px;
    padding: 0 16px 16px;
    align-items: center;
  }
  .dashboard-v32 .dashboard-week-figure {
    border-left: 1px solid var(--line);
    padding-left: 14px;
  }
  .dashboard-v32 .dashboard-week-metrics {
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr) minmax(0, 1.4fr);
    min-height: 0;
    height: auto;
  }
  .dashboard-v32 .dashboard-week-metrics > div {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 12px;
  }
  .dashboard-v32 .dashboard-week-metrics strong {
    font-size: clamp(18px, 1.6vw, 24px);
  }
  .dashboard-v32 .dashboard-week-metrics span {
    margin-top: 6px;
    font-size: 12px;
    white-space: normal;
  }
  .dashboard-v32 .dashboard-week-chart {
    height: 88px;
    min-height: 0;
    gap: 4px;
  }
  .dashboard-v32 .dashboard-attention {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .dashboard-v32 .dashboard-attention-list {
    min-height: 0;
    padding: 0 15px 7px;
    overflow: visible;
  }
  .dashboard-v32 .dashboard-attention-item {
    min-height: 30px;
    padding: 3px 0;
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-attention-icon {
    width: 21px;
    height: 21px;
  }
  .dashboard-v32 .dashboard-attention-icon svg {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 1100px) and (min-width: 601px) {
  .app-main:has(.dashboard-v32) {
    height: auto;
    overflow: visible;
  }
  .app-main:has(.dashboard-v32) #viewRoot {
    height: auto;
    overflow: visible;
  }
  .dashboard-v32 {
    box-sizing: border-box;
    height: auto;
    display: grid;
    grid-template-rows: repeat(4, auto);
    gap: 10px;
    padding: 14px 20px 28px;
    overflow: visible;
  }
  .dashboard-v32 .page-head,
  .dashboard-v32 .dashboard-kpis,
  .dashboard-v32 .dashboard-workspace {
    margin: 0 !important;
    min-height: 0;
  }
  .dashboard-v32 .dashboard-workspace.dashboard-primary-row,
  .dashboard-v32 .dashboard-workspace.dashboard-secondary-row {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dashboard-v32 .dashboard-panel {
    min-height: 0;
    overflow: hidden;
  }
  .dashboard-v32 .dashboard-agenda-list,
  .dashboard-v32 .consultation-mini-list,
  .dashboard-v32 .dashboard-attention-list {
    overflow: visible;
  }
}

@media (max-width: 600px) {
  /* En teléfono el dashboard se lee y se toca: no se encoge para forzar una pantalla. */
  .app-main:has(.dashboard-v32),
  .app-main:has(.dashboard-v32) #viewRoot {
    height: auto;
    overflow: visible;
  }
  .dashboard-v32 {
    display: block;
    height: auto;
    padding: 16px 14px calc(28px + env(safe-area-inset-bottom));
    overflow: visible;
  }
  .dashboard-v32 .page-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0 0 18px;
  }
  .dashboard-v32 .page-title {
    margin: 0 0 4px;
    font-size: 26px;
    line-height: 1.12;
  }
  .dashboard-v32 .page-subtitle {
    font-size: 14px;
  }
  .dashboard-v32 .dashboard-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .dashboard-v32 .dashboard-header-actions .dashboard-header-action {
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 13px;
  }
  .dashboard-v32 .dashboard-header-actions .dashboard-header-action:first-child {
    grid-column: 1 / -1;
  }
  .dashboard-v32 .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
  }
  .dashboard-v32 .dashboard-kpi-card {
    min-height: 116px;
    padding: 14px 12px;
    gap: 10px;
    border-radius: 15px;
  }
  .dashboard-v32 .dashboard-kpi-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
  }
  .dashboard-v32 .dashboard-kpi-icon svg {
    width: 18px;
    height: 18px;
  }
  .dashboard-v32 .dashboard-kpi-copy {
    gap: 4px;
  }
  .dashboard-v32 .dashboard-kpi-copy small {
    font-size: 12px;
  }
  .dashboard-v32 .dashboard-kpi-copy strong {
    font-size: 24px;
  }
  .dashboard-v32 .dashboard-kpi-copy em {
    white-space: normal;
    font-size: var(--os-text-caption);
    line-height: 1.3;
  }
  .dashboard-v32 .dashboard-workspace.dashboard-primary-row,
  .dashboard-v32 .dashboard-workspace.dashboard-secondary-row {
    display: grid;
    height: auto;
    min-height: 0;
    margin: 0 0 16px;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dashboard-v32 .dashboard-panel {
    display: block;
    min-height: 0;
    overflow: visible;
    border-radius: 16px;
  }
  .dashboard-v32 .dashboard-panel-head {
    min-height: 0;
    padding: 16px 16px 12px;
    gap: 12px;
  }
  .dashboard-v32 .dashboard-panel-head .card-title {
    font-size: 17px;
  }
  .dashboard-v32 .dashboard-panel-head .card-subtitle,
  .dashboard-v32 .dashboard-agenda-caption {
    font-size: 13px;
    line-height: 1.4;
  }
  .dashboard-v32 .dashboard-panel-head .btn {
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
  }
  .dashboard-v32 .dashboard-agenda-list {
    min-height: 0;
    padding: 0 14px 14px 43px;
    gap: 9px;
    overflow: visible;
  }
  .dashboard-v32 .dashboard-agenda-list::before {
    left: 26px;
    top: 15px;
    bottom: 29px;
  }
  .dashboard-v32 .dashboard-agenda-item {
    min-height: 74px;
    grid-template-columns: 84px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 11px 10px;
    border-radius: 11px;
  }
  .dashboard-v32 .dashboard-agenda-marker {
    left: -23px;
    width: 9px;
    height: 9px;
  }
  .dashboard-v32 .dashboard-agenda-time {
    gap: 3px;
  }
  .dashboard-v32 .dashboard-agenda-time strong {
    font-size: 16px;
  }
  .dashboard-v32 .dashboard-agenda-time small,
  .dashboard-v32 .dashboard-agenda-copy small {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-agenda-copy {
    gap: 3px;
  }
  .dashboard-v32 .dashboard-agenda-copy strong {
    font-size: 14px;
  }
  .dashboard-v32 .dashboard-agenda-status {
    display: none;
  }
  .dashboard-v32 .dashboard-row-chevron {
    display: block;
  }
  .dashboard-v32 .consultation-mini-list {
    min-height: 0;
    overflow: visible;
  }
  .dashboard-v32 .dashboard-consultations .consultation-mini {
    min-height: 62px;
    padding: 10px 16px;
    gap: 10px;
  }
  .dashboard-v32 .consultation-mini .avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }
  .dashboard-v32 .consultation-mini-copy {
    gap: 3px;
  }
  .dashboard-v32 .consultation-mini-copy strong {
    font-size: 14px;
  }
  .dashboard-v32 .consultation-mini-copy small,
  .dashboard-v32 .consultation-mini-time {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .consultation-mini-time {
    display: block;
  }
  .dashboard-v32 .dashboard-consultation-foot {
    padding: 12px 16px 16px;
  }
  .dashboard-v32 .dashboard-consultation-foot .btn {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
  }
  .dashboard-v32 .dashboard-week-content {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px 16px;
    overflow: visible;
  }
  .dashboard-v32 .dashboard-week-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .dashboard-v32 .dashboard-week-metrics > div {
    padding: 12px 9px;
    border-radius: 10px;
  }
  .dashboard-v32 .dashboard-week-metrics strong {
    font-size: 18px;
  }
  .dashboard-v32 .dashboard-week-metrics span {
    margin-top: 5px;
    white-space: normal;
    font-size: var(--os-text-caption);
    line-height: 1.25;
  }
  .dashboard-v32 .dashboard-week-chart {
    height: 122px;
    gap: 8px;
    padding-inline: 3px;
  }
  .dashboard-v32 .dashboard-week-bar {
    grid-template-rows: 16px 1fr 14px;
    gap: 4px;
  }
  .dashboard-v32 .dashboard-week-bar span,
  .dashboard-v32 .dashboard-week-bar small {
    font-size: var(--os-text-caption);
  }
  .dashboard-v32 .dashboard-attention-list {
    min-height: 0;
    padding: 0 16px 10px;
    overflow: visible;
  }
  .dashboard-v32 .dashboard-attention-item {
    grid-template-columns: 30px minmax(0, 1fr) auto 16px;
    min-height: 52px;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
  }
  .dashboard-v32 .dashboard-attention-item > svg {
    display: block;
  }
  .dashboard-v32 .dashboard-attention-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .dashboard-v32 .dashboard-attention-icon svg {
    width: 15px;
    height: 15px;
  }
  .dashboard-v32 .dashboard-attention-item strong {
    min-width: 23px;
    padding: 3px 7px;
    font-size: var(--os-text-caption);
  }
}
.consultation-page {
  max-width: 1500px;
}
.consultation-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  overflow: auto;
  padding-bottom: 2px;
}
.consultation-tab {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--os-surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.consultation-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: var(--os-text-caption);
  font-variant-numeric: tabular-nums;
}
.consultation-tab.is-active {
  border-color: var(--os-primary-hover);
  background: var(--os-primary-hover);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 94, 184, 0.18);
}
.consultation-tab.is-active span {
  background: var(--os-surface);
  color: var(--os-primary-active);
}
.consultation-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.consultation-filters .input {
  width: min(410px, 100%);
}
.consultation-live {
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-left: auto;
}
.consultation-workspace {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1.26fr);
  border: 1px solid rgba(102, 145, 185, 0.16);
  border-radius: 20px;
  overflow: hidden;
  background: var(--os-surface);
  box-shadow: var(--shadow-sm);
}
.consultation-list {
  max-height: calc(100vh - 275px);
  min-height: 570px;
  overflow: auto;
  padding: 8px;
  border-right: 1px solid var(--line);
  background: rgba(244, 249, 253, 0.78);
}
.consultation-list-item {
  width: 100%;
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  align-items: flex-start;
}
.consultation-list-item:hover {
  background: rgba(37, 99, 235, 0.06);
}
.consultation-list-item.is-active {
  border-color: rgba(0, 117, 222, 0.24);
  background: var(--os-surface);
  box-shadow: 0 4px 12px rgba(30, 66, 112, 0.08);
}
.consultation-list-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.consultation-list-main strong {
  font-size: 13px;
}
.consultation-list-main small {
  color: var(--muted);
  font-size: var(--os-text-caption);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.consultation-list-cue {
  color: var(--warning) !important;
  font-weight: 700;
}
.consultation-list-item .badge {
  margin-top: 2px;
  font-size: var(--os-text-caption);
  white-space: nowrap;
}
.consultation-detail {
  min-width: 0;
  padding: 22px;
}
.consultation-card {
  max-width: 780px;
  margin: auto;
  outline: none;
}
.consultation-card:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
  border-radius: 16px;
}
.consultation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.consultation-card-head h2 {
  font-size: 28px;
  margin: 5px 0 3px;
  letter-spacing: -0.03em;
}
.consultation-card-head p {
  margin: 0;
  color: var(--muted);
}
.consultation-person {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.consultation-person div,
.consultation-facts div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.consultation-person span,
.consultation-facts dt {
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.consultation-person strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.consultation-story {
  padding: 16px;
  background: rgba(237, 244, 251, 0.72);
  border: 1px solid rgba(102, 145, 185, 0.12);
  border-radius: 14px;
}
.consultation-story h3 {
  margin: 0 0 6px;
  font-size: 13px;
}
.consultation-story p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}
.consultation-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin: 20px 0;
}
.consultation-facts dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.consultation-actions {
  display: flex;
  gap: 9px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.consultation-actions .btn {
  min-height: 44px;
  flex: 1;
}
.consultation-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.consultation-tools-label {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.consultation-history {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.consultation-history summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.consultation-history ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.consultation-history li {
  padding: 10px 12px;
  border-left: 2px solid var(--line-strong);
  background: rgba(244, 249, 253, 0.58);
  font-size: 12px;
}
.consultation-history li span {
  margin-left: 6px;
  color: var(--muted);
  text-transform: capitalize;
}
.consultation-history time {
  display: block;
  color: var(--muted);
  font-size: var(--os-text-caption);
  margin-top: 3px;
}
.consultation-history p {
  margin: 6px 0 0;
}
.consultation-snooze-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.consultation-undo {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 8;
  box-shadow: var(--shadow-md);
}
@media (max-width: 1100px) {
  .dashboard-workspace {
    grid-template-columns: 1fr;
  }
  .consultation-workspace {
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  }
}
@media (max-width: 760px) {
  .dashboard-header-actions {
    justify-content: flex-start;
  }
  .dashboard-header-actions .dashboard-header-action {
    flex: 1 1 auto;
  }
  .operational-summary {
    flex-wrap: wrap;
  }
  .summary-stat {
    min-width: 50%;
    border-bottom: 1px solid var(--line);
  }
  .consultation-live {
    display: none;
  }
  .consultation-workspace {
    display: block;
    border-radius: 16px;
  }
  .consultation-list {
    min-height: 0;
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .consultation-detail {
    max-height: none;
    padding: 16px;
  }
  .consultation-person {
    grid-template-columns: 1fr 1fr;
  }
  .consultation-card-head h2 {
    font-size: 24px;
  }
  .consultation-actions {
    flex-wrap: wrap;
  }
  .consultation-actions .btn {
    min-width: calc(50% - 5px);
  }
  .consultation-snooze-options {
    grid-template-columns: 1fr;
  }
  .dashboard-consultation-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .consultation-undo {
    right: 14px;
    bottom: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .consultation-list-item,
  .consultation-tab,
  .consultation-mini {
    scroll-behavior: auto;
    transition: none;
  }
}

@media (max-width: 860px) {
  .dashboard-v32 .dashboard-kpis > .dashboard-kpi-card:last-child {
    grid-column: 1 / -1;
  }
}
/* One clear entry point for clinic administration. */
.consultorio-page {
  max-width: 1200px;
}
.consultorio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.consultorio-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-height: 205px;
  padding: 22px;
}
.consultorio-card > div:nth-child(2) {
  min-width: 0;
}
.consultorio-card .card-title {
  font-size: 17px;
}
.consultorio-card .card-subtitle {
  margin: 5px 0 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.consultorio-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 117, 222, 0.12);
  border-radius: 13px;
  background: var(--os-surface);
  color: var(--primary);
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 8px rgba(19, 80, 138, 0.07);
}
.consultorio-card-icon svg {
  width: 21px;
  height: 21px;
}
.consultorio-clinic-name {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.consultorio-card-foot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
.consultorio-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 2px 0;
}
.consultorio-tabs {
  margin-bottom: 20px;
}
@media (max-width: 760px) {
  .consultorio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .consultorio-card {
    min-height: 0;
  }
  .consultorio-footer {
    justify-content: flex-start;
  }
}
/* Lista de precios: carga breve, progreso visible y consulta editable. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dashboard-price-button {
  min-height: 44px;
  white-space: normal;
}
.price-page {
  display: grid;
  gap: 18px;
}
.price-page .page-head {
  margin-bottom: 0;
}
.price-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: end;
  background: var(--os-surface);
}
.price-overview h2 {
  margin: 10px 0 2px;
  font-size: clamp(21px, 2.4vw, 30px);
  letter-spacing: -0.035em;
}
.price-overview p {
  margin: 0;
  color: var(--muted);
}
.price-overview .price-source-note {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--os-text-caption);
  line-height: 1.5;
}
.price-source-note a,
.price-reference a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.price-overview-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  color: var(--muted);
}
.price-overview-stats strong {
  color: var(--primary-dark);
  font-size: 31px;
  line-height: 1;
}
.price-overview-stats small {
  margin-top: 5px;
}
.price-progress {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8eafb;
}
.price-progress span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #58b1f4);
  transition: width 0.25s ease;
}
.price-quiz {
  display: grid;
  gap: 19px;
}
.price-section-heading,
.price-directory-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.price-section-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
}
.price-prompt {
  padding: 20px;
  border: 1px solid #d4e8f9;
  border-radius: 12px;
  background: linear-gradient(130deg, #f8fcff, #edf7ff);
}
.price-code {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
}
.price-prompt-category {
  margin-left: 9px;
  color: var(--muted);
  font-size: 12px;
}
.price-prompt h3 {
  margin: 12px 0 5px;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.22;
  letter-spacing: -0.03em;
}
.price-prompt p {
  margin: 0;
  color: var(--muted);
}
.price-reference {
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border: 1px solid #c7dff2;
  border-radius: 11px;
  background: rgba(239, 248, 255, 0.72);
  font-size: 12px;
}
.price-reference > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.price-reference strong {
  color: var(--primary-dark);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.price-reference small {
  color: var(--muted);
  line-height: 1.4;
}
.price-reference a {
  justify-self: start;
  font-size: var(--os-text-caption);
}
.price-reference-empty {
  border-style: dashed;
  background: var(--surface-soft);
  color: var(--muted);
}
.price-editor .price-reference {
  margin-top: 14px;
}
.price-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.price-form-grid > * {
  min-width: 0;
}
.price-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
#priceQuizError,
#priceEditError,
#pricePracticeError {
  min-height: 18px;
  margin-top: 8px;
  color: var(--danger);
}
.price-complete {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 36px 16px;
  border: 1px dashed #b8d6ee;
  border-radius: 12px;
  background: #f8fcff;
}
.price-complete svg {
  width: 38px;
  height: 38px;
  margin-bottom: 7px;
  color: var(--primary);
}
.price-complete h3 {
  margin: 0 0 5px;
  font-size: 18px;
}
.price-complete p {
  margin: 0;
  color: var(--muted);
}
.price-directory {
  overflow: hidden;
}
.price-directory-head {
  align-items: center;
}
.price-directory-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}
.price-directory-controls .input {
  width: min(270px, 35vw);
}
.price-directory-controls .select {
  width: 155px;
}
.price-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.price-list-item:hover {
  background: #fafcff;
}
.price-list-item-main {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.price-list-item-main strong,
.price-list-meta {
  display: block;
  overflow-wrap: anywhere;
}
.price-list-item-main strong {
  font-size: 13px;
}
.price-list-meta {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.price-list-item-end {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.price-list-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(105px, 1fr));
  gap: 8px 14px;
  min-width: 245px;
  font-variant-numeric: tabular-nums;
}
.price-list-values > span {
  display: grid;
  gap: 2px;
  text-align: right;
}
.price-list-values small {
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.price-list-values strong {
  font-size: 12px;
  white-space: nowrap;
}
.price-list-empty {
  padding: 18px;
}
@media (max-width: 720px) {
  .price-overview {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .price-form-grid {
    grid-template-columns: 1fr;
  }
  .price-directory-head,
  .price-directory-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .price-directory-controls .input,
  .price-directory-controls .select {
    width: 100%;
  }
  .price-list-item {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }
  .price-list-item-main {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .price-list-item-end {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .price-list-values {
    min-width: 0;
    flex: 1 1 225px;
  }
  .price-list-values > span {
    text-align: left;
  }
  .price-quiz-actions .btn {
    flex: 1 1 140px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .price-progress span {
    transition: none;
  }
}
/* Insurance workbench — follows the shared glass surfaces and spacing. */
.billing-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.billing-page .page-header,
.billing-page .section-switcher {
  margin-bottom: 0;
}
.billing-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 16px;
}
.billing-summary > div {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--os-radius-md);
  background: var(--os-surface);
  box-shadow: none;
}
.billing-summary span,
.billing-facts span {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}
.billing-summary strong {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.billing-mode {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.billing-mode p {
  margin: 0;
  flex: 1;
  min-width: 220px;
  font-size: 14px;
  color: var(--text-secondary);
}
.billing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}
.billing-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}
.billing-actions,
.billing-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.billing-page .btn,
.billing-modal .btn {
  min-height: 44px;
  white-space: normal;
}
.billing-page .card-subtitle {
  margin: 8px 0 16px;
}
.billing-table td {
  vertical-align: top;
  min-width: 120px;
}
.billing-table td:first-child {
  min-width: 44px;
}
.billing-table input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin: 10px;
}
.billing-table td:nth-child(2) {
  min-width: 220px;
}
.billing-table td:nth-child(5) {
  max-width: 270px;
}
.billing-table td .small {
  margin-top: 6px;
}
.billing-empty {
  text-align: center;
  padding: 44px 24px;
  max-width: 660px;
  margin: auto;
}
.billing-empty h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.billing-empty p {
  line-height: 1.65;
  margin: 0;
}
.billing-modal {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-wrap: anywhere;
}
.billing-modal p {
  margin: 0;
  line-height: 1.6;
}
.billing-modal h3 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.4;
}
.billing-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.billing-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 18px;
  padding: 18px 0;
  border-block: 1px solid var(--border);
}
.billing-facts strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.billing-checklist {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(180, 120, 20, 0.2);
  padding: 20px;
  border-radius: 16px;
}
.billing-checklist ul {
  padding-left: 20px;
  margin: 0;
}
.billing-checklist li {
  padding: 4px 0;
  line-height: 1.5;
}
.billing-file-list,
.billing-events,
.billing-config-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.billing-file-list li,
.billing-config-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.billing-file-list a {
  overflow-wrap: anywhere;
}
.billing-file-list small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
}
.billing-config-list p {
  margin: 6px 0 10px;
}
.billing-events li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.billing-error {
  color: var(--danger);
  font-size: 14px;
}
.billing-error:empty {
  display: none;
}
.billing-warning {
  color: #925a10;
  margin-top: 8px;
}
.billing-config-grid,
.billing-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 20px;
}
.billing-config-grid .card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.billing-config-grid .billing-actions {
  margin-top: auto;
}
#billContent {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.billing-batch {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.billing-batch .btn {
  align-self: flex-start;
}
.billing-batch p {
  margin: 0;
}
.billing-candidates {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.billing-candidate {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.billing-candidate > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.billing-candidate small {
  color: var(--text-secondary);
}
.billing-candidate:has(input:checked) {
  background: var(--primary-light, #e8f4ff);
}
.billing-check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.billing-report {
  min-width: 0;
}
@media (max-width: 1000px) {
  .billing-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .billing-toolbar-actions {
    grid-column: 1/-1;
  }
  .billing-summary strong {
    font-size: 24px;
  }
}
@media (max-width: 600px) {
  .billing-summary {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .billing-summary > div:last-child {
    grid-column: 1/-1;
  }
  .billing-summary > div {
    padding: 18px;
  }
  .billing-toolbar {
    grid-template-columns: 1fr;
  }
  .billing-file-list li,
  .billing-config-list li {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .billing-detail-head {
    flex-direction: column;
  }
  .billing-tabs > .btn {
    flex: 1 1 140px;
  }
  .billing-facts {
    grid-template-columns: 1fr 1fr;
  }
}
/* Agenda semanal: permite ver la disponibilidad completa sin recorrer día por día. */
.weekly-agenda-range {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--os-weight-medium);
}
.weekly-agenda-wrap {
  overflow-x: auto;
  border: 1px solid rgba(122, 158, 196, 0.26);
  border-radius: 18px;
  background: var(--os-surface);
  box-shadow: var(--shadow-sm);
}
.weekly-agenda-wrap:focus-visible {
  outline: 3px solid rgba(0, 117, 222, 0.38);
  outline-offset: 2px;
}
.weekly-agenda {
  min-width: 940px;
}
.weekly-agenda-head,
.weekly-agenda-row {
  display: grid;
  grid-template-columns: 68px repeat(var(--agenda-days, 7), minmax(124px, 1fr));
}
.weekly-agenda-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(246, 251, 255, 0.96);
  border-bottom: 1px solid rgba(122, 158, 196, 0.24);
  backdrop-filter: none;
}
.weekly-agenda-time-head,
.weekly-agenda-time {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px 9px;
  color: var(--muted);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
}
.weekly-agenda-time-head {
  align-items: center;
  font-size: var(--os-text-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.weekly-agenda-day {
  position: relative;
  min-height: 62px;
  display: grid;
  place-content: center;
  justify-items: center;
  border-left: 1px solid rgba(122, 158, 196, 0.18);
  color: var(--muted);
  line-height: 1.05;
}
.weekly-agenda-day strong {
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  text-transform: capitalize;
}
.weekly-agenda-day > span {
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
  font-weight: var(--os-weight-bold);
}
.weekly-agenda-day small {
  position: absolute;
  right: 8px;
  top: 8px;
  color: var(--primary-dark);
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.weekly-agenda-day.is-today {
  background: rgba(213, 238, 255, 0.68);
}
.weekly-agenda-row {
  min-height: 46px;
  border-bottom: 1px solid rgba(122, 158, 196, 0.14);
}
.weekly-agenda-row:last-child {
  border-bottom: 0;
}
.weekly-agenda-row > :not(.weekly-agenda-time) {
  border-left: 1px solid rgba(122, 158, 196, 0.14);
}
.weekly-agenda-slot,
.weekly-agenda-busy {
  min-width: 0;
  min-height: 46px;
}
.weekly-agenda-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 8px 9px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: #7890a8;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}
.weekly-agenda-slot span {
  display: none;
  font-size: var(--os-text-caption);
  font-variant-numeric: tabular-nums;
}
.weekly-agenda-slot small {
  opacity: 0;
  font-size: var(--os-text-caption);
  font-weight: 700;
}
.weekly-agenda-slot:hover,
.weekly-agenda-slot:focus-visible {
  background: rgba(222, 242, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(0, 117, 222, 0.38);
  color: var(--primary-dark);
  outline: none;
}
.weekly-agenda-slot:hover small,
.weekly-agenda-slot:focus-visible small {
  opacity: 1;
}
.weekly-agenda-overlaps {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.weekly-agenda-appointment {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 6px 9px;
  border: 0;
  border-left: 4px solid var(--primary);
  background: rgba(220, 240, 255, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}
.weekly-agenda-appointment:hover,
.weekly-agenda-appointment:focus-visible {
  background: #d0edff;
  box-shadow: inset 0 0 0 1px rgba(0, 117, 222, 0.38);
  outline: none;
}
.weekly-agenda-appointment > span {
  color: #2a6b9f;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
  font-variant-numeric: tabular-nums;
}
.weekly-agenda-appointment strong,
.weekly-agenda-appointment small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.weekly-agenda-appointment strong {
  margin-top: 2px;
  font-size: var(--os-text-caption);
  font-weight: var(--os-weight-bold);
}
.weekly-agenda-appointment small {
  margin-top: 1px;
  color: var(--muted);
  font-size: var(--os-text-caption);
}
.weekly-agenda-busy {
  background: rgba(220, 240, 255, 0.62);
  border-left: 4px solid var(--primary);
}
.weekly-agenda-appointment.status-completed {
  border-left-color: var(--success);
  background: var(--success-soft);
}
.weekly-agenda-appointment.status-pending_deposit,
.weekly-agenda-appointment.status-requested,
.weekly-agenda-appointment.status-held {
  border-left-color: var(--warning);
  background: var(--warning-soft);
}
@media (max-width: 720px) {
  .weekly-agenda-wrap {
    border-radius: 14px;
  }
  .weekly-agenda {
    min-width: 850px;
  }
  .weekly-agenda-head,
  .weekly-agenda-row {
    grid-template-columns: 56px repeat(var(--agenda-days, 7), minmax(113px, 1fr));
  }
  .weekly-agenda-time {
    padding-left: 5px;
    padding-right: 7px;
  }
}

/* Compact continuations and free rows; card starts always remain readable. */
.weekly-agenda-row.is-compact {
  display: none;
}
.weekly-agenda-wrap .weekly-agenda-row.is-compact > * {
  min-height: 0;
  height: 6px;
  padding: 0;
  overflow: hidden;
}
.weekly-agenda-row.is-compact .weekly-agenda-time {
  font-size: 0;
}
.weekly-agenda-row.is-compact .weekly-agenda-slot {
  visibility: hidden;
  pointer-events: none;
}
.weekly-agenda-appointment-shell {
  position: relative;
  min-width: 0;
}
.weekly-agenda-appointment-shell > .weekly-agenda-appointment {
  width: 100%;
  height: 100%;
  padding-right: 40px;
}
.weekly-agenda-duration-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
}
.weekly-agenda-duration-toggle svg {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
}
.weekly-agenda-duration-toggle[aria-expanded='true'] svg {
  transform: rotate(-90deg);
}
.weekly-agenda-duration-toggle:hover {
  background: var(--primary-soft);
}
.weekly-agenda-duration-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
#agendaExpandHours {
  flex-shrink: 0;
  margin-left: auto;
  min-height: 44px;
}

.agenda-header-actions,
.agenda-mode-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.agenda-period-label {
  margin: 0 0 14px;
}
.daily-agenda {
  min-width: 0;
}
.daily-agenda .weekly-agenda-appointment {
  min-height: 76px;
}
.daily-agenda .weekly-agenda-appointment small,
.daily-agenda .weekly-agenda-appointment strong {
  white-space: normal;
}
.monthly-agenda {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}
.monthly-agenda-weekdays,
.monthly-agenda-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.monthly-agenda-weekdays span {
  padding: 12px 4px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.monthly-agenda-day {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: transparent;
  color: var(--text);
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  cursor: pointer;
}
.monthly-agenda-day span {
  font-size: 12px;
  color: var(--muted);
}
.monthly-agenda-day.is-today {
  background: var(--primary-soft);
}
.monthly-agenda-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--primary);
}
.monthly-agenda-day:hover {
  background: var(--primary-soft);
}
.monthly-agenda-day:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}
@media (max-width: 900px) {
  .agenda-header-actions {
    width: 100%;
  }
  .agenda-header-actions .btn {
    flex: 1;
  }
  .agenda-page .agenda-toolbar {
    align-items: flex-start;
  }
  .monthly-agenda-day {
    min-height: 76px;
    padding: 8px 4px;
    gap: 6px;
  }
  .monthly-agenda-day span {
    font-size: var(--os-text-caption);
  }
}
#agendaExpandHours[hidden] {
  display: none;
}

.day-appointments {
  display: grid;
  gap: 12px;
}
.day-appointment {
  width: 100%;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.day-appointment-time,
.day-appointment-copy {
  display: grid;
  gap: 5px;
}
.day-appointment-time strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.day-appointment small {
  color: var(--muted);
}
.day-appointment-copy > strong {
  font-size: 16px;
}
.day-appointment:hover,
.agenda-change:hover {
  border-color: var(--primary);
}
.day-appointment:focus-visible,
.agenda-change:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.agenda-changes {
  margin-top: 24px;
}
.agenda-changes h2 {
  font-size: 14px;
  color: var(--muted);
}
.agenda-changes-list {
  display: grid;
  gap: 6px;
}
.agenda-change {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.monthly-agenda-day {
  min-height: 144px;
  gap: 6px;
}
.monthly-agenda-outside {
  background: var(--bg);
  color: var(--muted);
  opacity: 0.65;
}
.monthly-turn-preview {
  display: grid;
  gap: 4px;
  max-width: 100%;
}
.monthly-turn-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--os-text-caption);
}
@media (max-width: 900px) {
  .day-appointment {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .day-appointment-time strong {
    font-size: 19px;
  }
  .day-appointment-status {
    grid-column: 2;
  }
  .monthly-agenda-day {
    min-height: 94px;
  }
  .monthly-turn-preview small {
    font-size: var(--os-text-caption);
  }
}

.agenda-compact-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}
.agenda-heading h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.agenda-heading .agenda-period-label {
  margin: 7px 0 0;
  font-size: var(--os-text-caption);
  color: var(--muted);
}
.agenda-header-date {
  margin: 0;
}
.agenda-header-date .date-control-row {
  gap: 5px;
}
.agenda-header-date input {
  width: 150px;
  min-width: 0;
}
.agenda-compact-header .btn {
  padding-left: 11px;
  padding-right: 11px;
  white-space: nowrap;
}
.agenda-compact-header #agendaExpandHours {
  margin-left: 0;
}
@media (max-width: 1300px) {
  .agenda-compact-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .agenda-compact-header .agenda-heading {
    grid-column: 1;
  }
  .agenda-compact-header .agenda-header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }
  .agenda-compact-header .agenda-mode-selector {
    grid-column: 1;
    grid-row: 2;
  }
  .agenda-compact-header .agenda-header-date {
    grid-column: 2;
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  .agenda-compact-header {
    grid-template-columns: minmax(0, 1fr);
  }
  .agenda-compact-header .agenda-heading,
  .agenda-compact-header .agenda-header-actions,
  .agenda-compact-header .agenda-mode-selector,
  .agenda-compact-header .agenda-header-date {
    grid-column: 1;
    grid-row: auto;
  }
  .agenda-compact-header .agenda-header-actions {
    justify-content: flex-start;
  }
}
/* Public landing — blue clinical editorial system. Scoped so the operational app keeps its own UI. */
.pd-blue {
  --ds-primary: #1687f8;
  --ds-primary-dark: #0876e4;
  --ds-ink: #071b3a;
  --ds-muted: #5f7188;
  --ds-pale: #f1f8ff;
  --ds-sky: #eaf5ff;
  --ds-line: #d8e8f6;
  --ds-shadow: 0 12px 30px rgba(24, 100, 175, 0.09);
  min-width: 320px;
  color: var(--ds-ink);
  background: #fff;
  font-family: var(--font);
  font-size: 16px;
}
.pd-blue .ds-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.pd-blue .ds-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pd-blue .ds-container {
  width: min(1192px, calc(100% - 48px));
  margin: 0 auto;
}
.pd-blue .ds-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(216, 232, 246, 0.86);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}
.pd-blue .ds-nav {
  width: min(1192px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.pd-blue .ds-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ds-ink);
}
.pd-blue .ds-brand img {
  width: 33px;
  height: 33px;
  object-fit: contain;
  filter: invert(47%) sepia(89%) saturate(3592%) hue-rotate(185deg) brightness(101%) contrast(95%);
}
.pd-blue .ds-brand span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.05;
}
.pd-blue .ds-brand strong {
  color: var(--ds-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.pd-blue .ds-brand small {
  margin-top: 3px;
  color: #6680a3;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pd-blue .ds-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(17px, 2.25vw, 31px);
  margin-left: auto;
  color: #476383;
  font-size: 10px;
  font-weight: 700;
}
.pd-blue .ds-links a,
.pd-blue .ds-portal-link {
  transition: color 0.18s ease;
}
.pd-blue .ds-links a:hover,
.pd-blue .ds-portal-link:hover {
  color: var(--ds-primary-dark);
}
.pd-blue .ds-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-blue .ds-portal-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cbe1f6;
  border-radius: 7px;
  color: var(--ds-primary-dark);
  font-size: 10px;
  font-weight: 800;
}
.pd-blue .ds-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ds-ink);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}
.pd-blue .ds-button:hover {
  transform: translateY(-1px);
}
.pd-blue .ds-button:active {
  transform: translateY(0);
}
.pd-blue .ds-button-primary {
  color: #fff;
  border-color: var(--ds-primary);
  background: var(--ds-primary);
  box-shadow: 0 6px 16px rgba(22, 135, 248, 0.22);
}
.pd-blue .ds-button-primary:hover {
  border-color: var(--ds-primary-dark);
  background: var(--ds-primary-dark);
  box-shadow: 0 9px 21px rgba(22, 135, 248, 0.28);
}
.pd-blue .ds-button-secondary {
  border-color: #cfe2f6;
  color: var(--ds-primary-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(53, 121, 182, 0.05);
}
.pd-blue .ds-button-secondary:hover {
  border-color: #a9d3f7;
  background: #f7fbff;
}
.pd-blue .ds-button-small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 10px;
  border-radius: 7px;
}
.pd-blue .ds-button-small .ds-icon {
  width: 15px;
  height: 15px;
}
.pd-blue .ds-menu-button {
  display: none;
  width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid #cfe2f6;
  border-radius: 8px;
  color: var(--ds-primary-dark);
  background: #fff;
}
.pd-blue .ds-menu-button .ds-icon {
  width: 20px;
  height: 20px;
}
.pd-blue .ds-mobile-menu[hidden] {
  display: none;
}
.pd-blue .ds-mobile-menu {
  width: 100%;
  padding: 8px 24px 20px;
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--ds-line);
  background: #fff;
}
.pd-blue .ds-mobile-menu > a:not(.ds-button) {
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf5fc;
  color: #476383;
  font-size: 13px;
  font-weight: 700;
}
.pd-blue .ds-mobile-menu .ds-button {
  margin-top: 12px;
}

.pd-blue .ds-hero {
  position: relative;
  overflow: hidden;
  min-height: 438px;
  background: linear-gradient(102deg, #f8fcff 0%, #edf7ff 58%, #f8fbff 100%);
}
.pd-blue .ds-hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: -128px;
  left: -180px;
  width: 360px;
  height: 560px;
  border: 1px solid rgba(119, 187, 242, 0.24);
  border-radius: 48% 52% 54% 46%;
  box-shadow:
    0 0 0 68px rgba(168, 215, 250, 0.1),
    0 0 0 136px rgba(168, 215, 250, 0.06);
  transform: rotate(-21deg);
}
.pd-blue .ds-hero::after {
  content: '';
  position: absolute;
  z-index: 0;
  right: -110px;
  bottom: -160px;
  width: 390px;
  height: 300px;
  border: 1px solid rgba(119, 187, 242, 0.13);
  border-radius: 50%;
}
.pd-blue .ds-hero-grid {
  position: relative;
  z-index: 1;
  min-height: 438px;
}
.pd-blue .ds-hero-copy {
  position: relative;
  z-index: 2;
  width: 52%;
  padding: 47px 0 26px;
}
.pd-blue .ds-eyebrow,
.pd-blue .ds-card-label {
  display: block;
  color: var(--ds-primary);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.pd-blue .ds-hero h1 {
  max-width: 620px;
  margin: 12px 0 11px;
  color: var(--ds-ink);
  font-size: clamp(38px, 4.15vw, 52px);
  font-weight: 800;
  letter-spacing: -0.062em;
  line-height: 0.99;
}
.pd-blue .ds-hero h1 span {
  color: var(--ds-primary);
}
.pd-blue .ds-hero-copy > p {
  max-width: 495px;
  margin: 0;
  color: var(--ds-muted);
  font-size: 14px;
  line-height: 1.5;
}
.pd-blue .ds-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 19px;
}
.pd-blue .ds-hero-actions .ds-button {
  min-height: 39px;
  padding-inline: 15px;
}
.pd-blue .ds-professional-line {
  max-width: 620px;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pd-blue .ds-professional-line > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ds-primary);
}
.pd-blue .ds-professional-line .ds-icon {
  width: 18px;
  height: 18px;
}
.pd-blue .ds-professional-line span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.13;
}
.pd-blue .ds-professional-line strong {
  overflow-wrap: anywhere;
  color: var(--ds-ink);
  font-size: 9px;
  font-weight: 800;
}
.pd-blue .ds-professional-line small {
  margin-top: 3px;
  color: #70849d;
  font-size: 8px;
  font-weight: 600;
}
.pd-blue .ds-hero-portrait {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 39%;
  width: 49%;
  overflow: hidden;
  pointer-events: none;
}
.pd-blue .ds-hero-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(241, 248, 255, 0.9) 0%,
    rgba(241, 248, 255, 0) 28%,
    rgba(241, 248, 255, 0) 76%,
    rgba(241, 248, 255, 0.26) 100%
  );
}
.pd-blue .ds-hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
}
.pd-blue .ds-turn-card {
  position: absolute;
  z-index: 3;
  top: 42px;
  right: 0;
  width: 266px;
  padding: 22px;
  border: 1px solid rgba(212, 230, 246, 0.92);
  border-radius: 13px;
  color: var(--ds-ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--ds-shadow);
}
.pd-blue .ds-card-icon {
  width: 19px;
  height: 19px;
  margin-bottom: 9px;
  color: var(--ds-primary);
}
.pd-blue .ds-turn-card h2 {
  max-width: 195px;
  margin: 8px 0 9px;
  color: var(--ds-ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.03;
}
.pd-blue .ds-turn-card > p {
  margin: 0 0 16px;
  color: #58708d;
  font-size: 9px;
  line-height: 1.58;
}
.pd-blue .ds-turn-card .ds-button {
  width: 100%;
  min-height: 36px;
  padding: 9px 11px;
  font-size: 10px;
}
.pd-blue .ds-turn-card .ds-button .ds-icon {
  width: 14px;
  height: 14px;
}
.pd-blue .ds-patient-shortcut {
  margin-top: 15px;
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #dfecf8;
  color: #7588a1;
  font-size: 8px;
}
.pd-blue .ds-patient-shortcut a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ds-primary-dark);
  font-weight: 800;
  white-space: nowrap;
}
.pd-blue .ds-patient-shortcut .ds-icon {
  width: 13px;
  height: 13px;
}

.pd-blue .ds-section {
  padding: 50px 0;
  background: #fff;
}
.pd-blue .ds-section-soft {
  position: relative;
  overflow: hidden;
  background: #eff8ff;
}
.pd-blue .ds-section-soft::before {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -100px;
  width: 270px;
  height: 330px;
  border: 1px solid rgba(116, 188, 242, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(193, 227, 252, 0.25);
}
.pd-blue .ds-section-soft::after {
  content: '';
  position: absolute;
  top: 20px;
  right: -85px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(116, 188, 242, 0.16);
  border-radius: 50%;
}
.pd-blue .ds-section-soft .ds-container {
  position: relative;
  z-index: 1;
}
.pd-blue .ds-section-heading {
  max-width: 730px;
  margin-bottom: 20px;
}
.pd-blue .ds-section-heading-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.pd-blue .ds-section-heading h2,
.pd-blue .ds-care-copy h2,
.pd-blue .ds-patient-copy h2 {
  margin: 8px 0 6px;
  color: var(--ds-ink);
  font-size: clamp(28px, 3.15vw, 37px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.05;
}
.pd-blue .ds-section-heading > p,
.pd-blue .ds-care-copy > p,
.pd-blue .ds-patient-copy > p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 12px;
  line-height: 1.55;
}
.pd-blue .ds-text-link,
.pd-blue .ds-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ds-primary-dark);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.pd-blue .ds-text-link .ds-icon,
.pd-blue .ds-card-link .ds-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}
.pd-blue .ds-text-link:hover .ds-icon,
.pd-blue .ds-card-link:hover .ds-icon {
  transform: translateX(3px);
}
.pd-blue .ds-treatment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pd-blue .ds-treatment-grid article {
  min-height: 145px;
  padding: 17px 18px 15px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 14px;
  border: 1px solid #dcebf8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 88, 153, 0.04);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.pd-blue .ds-treatment-grid article:hover {
  border-color: #b9ddf9;
  box-shadow: 0 11px 25px rgba(23, 88, 153, 0.1);
  transform: translateY(-2px);
}
.pd-blue .ds-treatment-icon {
  width: 52px;
  height: 52px;
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ds-primary);
  background: #eaf5ff;
}
.pd-blue .ds-treatment-icon .ds-icon {
  width: 27px;
  height: 27px;
}
.pd-blue .ds-treatment-grid h3 {
  margin: 4px 0 5px;
  color: var(--ds-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pd-blue .ds-treatment-grid p {
  margin: 0;
  color: #5e738d;
  font-size: 10px;
  line-height: 1.5;
}
.pd-blue .ds-treatment-grid .ds-card-link {
  align-self: end;
  margin-top: 8px;
  font-size: 9px;
}

.pd-blue .ds-care-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(430px, 1.04fr);
  gap: clamp(48px, 8vw, 128px);
  align-items: center;
}
.pd-blue .ds-care-copy {
  max-width: 460px;
}
.pd-blue .ds-care-copy h2 {
  max-width: 410px;
}
.pd-blue .ds-doctor {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-blue .ds-doctor-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ds-primary);
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 5px 13px rgba(22, 135, 248, 0.2);
}
.pd-blue .ds-doctor > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pd-blue .ds-doctor strong {
  color: var(--ds-ink);
  font-size: 10px;
  font-weight: 800;
}
.pd-blue .ds-doctor small {
  margin-top: 2px;
  color: var(--ds-muted);
  font-size: 9px;
}
.pd-blue .ds-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-blue .ds-steps li {
  position: relative;
  min-height: 75px;
  padding: 0 0 15px;
  display: grid;
  grid-template-columns: 39px 22px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}
.pd-blue .ds-steps li::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 37px;
  bottom: -4px;
  left: 18px;
  width: 1px;
  background: #c8e4fb;
}
.pd-blue .ds-steps li:last-child {
  min-height: 58px;
  padding-bottom: 0;
}
.pd-blue .ds-steps li:last-child::before {
  display: none;
}
.pd-blue .ds-steps li > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid #bee1fb;
  border-radius: 50%;
  color: var(--ds-primary);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 3px 9px rgba(71, 139, 197, 0.08);
  font-size: 10px;
  font-weight: 850;
}
.pd-blue .ds-step-icon {
  margin-top: 9px;
  color: var(--ds-primary);
}
.pd-blue .ds-steps div {
  padding: 4px 0 15px;
  border-bottom: 1px solid rgba(191, 222, 248, 0.82);
}
.pd-blue .ds-steps li:last-child div {
  padding-bottom: 0;
  border-bottom: 0;
}
.pd-blue .ds-steps strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ds-ink);
  font-size: 11px;
  font-weight: 800;
}
.pd-blue .ds-steps p {
  margin: 0;
  color: #5e748e;
  font-size: 10px;
  line-height: 1.42;
}

.pd-blue .ds-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.pd-blue .ds-location-grid article {
  min-height: 147px;
  display: grid;
  grid-template-columns: 48% 1fr;
  overflow: hidden;
  border: 1px solid #d9eaf8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 88, 153, 0.04);
}
.pd-blue .ds-location-grid article > img {
  width: 100%;
  height: 100%;
  min-height: 147px;
  object-fit: cover;
}
.pd-blue .ds-location-grid article:first-child > img {
  object-position: center 58%;
}
.pd-blue .ds-location-grid article:nth-child(2) > img {
  object-position: center 52%;
}
.pd-blue .ds-location-content {
  min-width: 0;
  padding: 15px 17px 12px;
  display: flex;
  flex-direction: column;
}
.pd-blue .ds-location-city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ds-primary);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pd-blue .ds-location-city .ds-icon {
  width: 12px;
  height: 12px;
}
.pd-blue .ds-location-content > div {
  margin-top: 8px;
}
.pd-blue .ds-location-grid h3 {
  margin: 0 0 4px;
  color: var(--ds-ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.pd-blue .ds-location-grid p {
  margin: 0;
  color: #61758e;
  font-size: 9px;
  line-height: 1.38;
}
.pd-blue .ds-location-grid article a {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ds-primary-dark);
  font-size: 9px;
  font-weight: 800;
}
.pd-blue .ds-location-grid article a .ds-icon {
  width: 13px;
  height: 13px;
  transition: transform 0.18s ease;
}
.pd-blue .ds-location-grid article a:hover .ds-icon {
  transform: translateX(3px);
}
.pd-blue .ds-contact-row {
  min-height: 67px;
  margin-top: 11px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #cae3fa;
  border-radius: 8px;
  color: var(--ds-ink);
  background: #eaf5ff;
}
.pd-blue .ds-contact-intro {
  display: flex;
  align-items: center;
  gap: 11px;
}
.pd-blue .ds-contact-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ds-primary);
  box-shadow: 0 5px 12px rgba(22, 135, 248, 0.18);
}
.pd-blue .ds-contact-icon .ds-icon {
  width: 19px;
  height: 19px;
}
.pd-blue .ds-contact-intro > span:last-child,
.pd-blue .ds-contact-row > a > span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pd-blue .ds-contact-row small {
  color: var(--ds-primary);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pd-blue .ds-contact-row strong {
  margin-top: 3px;
  color: var(--ds-ink);
  font-size: 11px;
  font-weight: 800;
}
.pd-blue .ds-contact-row > a {
  display: inline-flex;
  align-items: center;
  gap: 19px;
  color: var(--ds-primary-dark);
}
.pd-blue .ds-contact-row > a strong {
  font-size: 18px;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.pd-blue .ds-contact-row > a small {
  color: #5f748d;
  font-size: 8px;
  letter-spacing: 0;
  text-transform: none;
}
.pd-blue .ds-contact-row > a > .ds-icon {
  width: 18px;
  height: 18px;
}

.pd-blue .ds-patient-section {
  position: relative;
  overflow: hidden;
  padding: 39px 0;
  background: linear-gradient(104deg, #f5fbff 0%, #eaf6ff 100%);
}
.pd-blue .ds-patient-section::before,
.pd-blue .ds-patient-section::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 260px;
  border-radius: 48% 52% 44% 56%;
  border: 1px solid rgba(107, 181, 239, 0.22);
}
.pd-blue .ds-patient-section::before {
  bottom: -180px;
  left: -42px;
  box-shadow: 0 0 0 20px rgba(191, 224, 247, 0.24);
  transform: rotate(22deg);
}
.pd-blue .ds-patient-section::after {
  top: -155px;
  right: -10px;
  transform: rotate(-26deg);
}
.pd-blue .ds-patient-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(206px, 0.73fr) minmax(185px, 0.55fr);
  align-items: center;
  gap: clamp(22px, 4vw, 54px);
}
.pd-blue .ds-patient-copy h2 {
  max-width: 445px;
  font-size: clamp(26px, 2.5vw, 34px);
}
.pd-blue .ds-patient-copy > p {
  max-width: 485px;
}
.pd-blue .ds-portal-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pd-blue .ds-portal-pills span {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid #d0e6fa;
  border-radius: 7px;
  color: #2a6ca6;
  background: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  font-weight: 750;
}
.pd-blue .ds-portal-pills .ds-icon {
  width: 15px;
  height: 15px;
  color: var(--ds-primary);
}
.pd-blue .ds-portal-mock {
  padding: 11px 14px;
  border: 1px solid #d5e8f9;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 11px 26px rgba(54, 119, 178, 0.13);
  transform: rotate(-0.8deg);
}
.pd-blue .ds-portal-mock-head {
  min-height: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #446684;
  font-size: 9px;
}
.pd-blue .ds-portal-mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ds-primary);
  box-shadow: 0 0 0 4px #e5f3ff;
}
.pd-blue .ds-portal-mock ul {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}
.pd-blue .ds-portal-mock li {
  min-height: 28px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 13px;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #e8f2fb;
  color: #41617e;
  font-size: 8px;
  font-weight: 700;
}
.pd-blue .ds-portal-mock li > .ds-icon {
  width: 14px;
  height: 14px;
  color: var(--ds-primary);
}
.pd-blue .ds-portal-mock li .ds-mini-arrow {
  width: 11px;
  height: 11px;
  color: #7ca5ca;
}
.pd-blue .ds-patient-action {
  display: grid;
  gap: 8px;
  align-content: center;
}
.pd-blue .ds-patient-action h3 {
  margin: 0;
  color: var(--ds-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.pd-blue .ds-patient-action p {
  margin: 0;
  color: var(--ds-muted);
  font-size: 9px;
  line-height: 1.5;
}
.pd-blue .ds-patient-action .ds-button {
  justify-self: start;
  min-height: 38px;
  margin-top: 3px;
  font-size: 10px;
}

.pd-blue .ds-footer {
  position: relative;
  overflow: hidden;
  padding: 28px 0 12px;
  border-top: 1px solid #d9eaf8;
  color: #526f8d;
  background: #fff;
}
.pd-blue .ds-footer::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -66px;
  width: 250px;
  height: 135px;
  opacity: 0.6;
  background:
    linear-gradient(144deg, transparent 43%, #e5f2fd 44% 45%, transparent 46%) 0 0 / 90px 80px,
    linear-gradient(36deg, transparent 44%, #d9edfc 45% 46%, transparent 47%) 24px 16px / 90px 80px;
}
.pd-blue .ds-footer-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pd-blue .ds-brand-footer strong {
  color: var(--ds-ink);
}
.pd-blue .ds-brand-footer small {
  color: #6680a3;
}
.pd-blue .ds-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(13px, 2vw, 25px);
  color: #4a6684;
  font-size: 8px;
  font-weight: 750;
}
.pd-blue .ds-footer-links a:hover,
.pd-blue .ds-footer-portal:hover {
  color: var(--ds-primary-dark);
}
.pd-blue .ds-footer-portal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ds-primary-dark);
  font-size: 8px;
  font-weight: 800;
}
.pd-blue .ds-footer-portal .ds-icon {
  width: 13px;
  height: 13px;
}
.pd-blue .ds-footer-bottom {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e3eef8;
  color: #86a2c0;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.45;
  text-transform: uppercase;
}
.pd-blue .ds-footer-bottom > :last-child {
  text-align: right;
}
.pd-blue .ds-admin-link {
  color: #7b96b3;
  font-size: 7px;
}
.pd-blue .ds-admin-link:hover {
  color: var(--ds-primary-dark);
}
.pd-blue .ds-footer-signoff {
  position: relative;
  z-index: 1;
  margin-top: 11px;
  color: #6c9bcb;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-align: right;
  text-transform: uppercase;
}
.pd-blue :where(a, button):focus-visible {
  outline: 3px solid rgba(22, 135, 248, 0.44);
  outline-offset: 3px;
}

@media (max-width: 1090px) {
  .pd-blue .ds-links {
    gap: 15px;
  }
  .pd-blue .ds-hero-copy {
    width: 55%;
  }
  .pd-blue .ds-hero-portrait {
    left: 40%;
    width: 51%;
  }
  .pd-blue .ds-turn-card {
    width: 245px;
  }
  .pd-blue .ds-professional-line {
    gap: 8px;
  }
  .pd-blue .ds-professional-line small {
    font-size: 7px;
  }
  .pd-blue .ds-care-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1fr);
    gap: 42px;
  }
  .pd-blue .ds-patient-grid {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr) minmax(155px, 0.5fr);
    gap: 22px;
  }
}
@media (max-width: 900px) {
  .pd-blue .ds-links,
  .pd-blue .ds-portal-link,
  .pd-blue .ds-actions > .ds-button {
    display: none;
  }
  .pd-blue .ds-menu-button {
    display: inline-flex;
  }
  .pd-blue .ds-hero {
    min-height: 0;
    padding: 38px 0 28px;
  }
  .pd-blue .ds-hero-grid {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .pd-blue .ds-hero-copy {
    width: 100%;
    padding: 0;
  }
  .pd-blue .ds-hero-portrait {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    height: min(57vw, 480px);
    border: 1px solid #d6e9fa;
    border-radius: 14px;
  }
  .pd-blue .ds-hero-portrait::after {
    background: linear-gradient(
      90deg,
      rgba(241, 248, 255, 0.22),
      transparent 42%,
      rgba(241, 248, 255, 0.08)
    );
  }
  .pd-blue .ds-hero-portrait img {
    object-position: 65% 43%;
  }
  .pd-blue .ds-turn-card {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 500px);
    padding: 25px;
  }
  .pd-blue .ds-care-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .pd-blue .ds-care-copy {
    max-width: 600px;
  }
  .pd-blue .ds-patient-grid {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.62fr);
  }
  .pd-blue .ds-patient-action {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
  }
  .pd-blue .ds-patient-action .ds-button {
    justify-self: end;
    margin-top: 0;
  }
}
@media (max-width: 680px) {
  .pd-blue .ds-container,
  .pd-blue .ds-nav {
    width: min(100% - 32px, 1192px);
  }
  .pd-blue .ds-nav {
    min-height: 60px;
  }
  .pd-blue .ds-brand img {
    width: 30px;
    height: 30px;
  }
  .pd-blue .ds-brand strong {
    font-size: 12px;
  }
  .pd-blue .ds-hero {
    padding-top: 31px;
  }
  .pd-blue .ds-hero h1 {
    max-width: 510px;
    font-size: clamp(37px, 11.6vw, 48px);
  }
  .pd-blue .ds-hero-copy > p {
    font-size: 14px;
  }
  .pd-blue .ds-hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 370px;
  }
  .pd-blue .ds-hero-actions .ds-button {
    width: 100%;
    min-height: 45px;
  }
  .pd-blue .ds-professional-line {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
  }
  .pd-blue .ds-professional-line > div {
    min-height: 28px;
  }
  .pd-blue .ds-professional-line strong {
    font-size: 10px;
  }
  .pd-blue .ds-professional-line small {
    font-size: 8px;
  }
  .pd-blue .ds-hero-portrait {
    height: 65vw;
    min-height: 250px;
  }
  .pd-blue .ds-turn-card {
    width: 100%;
  }
  .pd-blue .ds-section {
    padding: 42px 0;
  }
  .pd-blue .ds-section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .pd-blue .ds-section-heading h2,
  .pd-blue .ds-care-copy h2 {
    font-size: 31px;
  }
  .pd-blue .ds-treatment-grid,
  .pd-blue .ds-location-grid {
    grid-template-columns: 1fr;
  }
  .pd-blue .ds-treatment-grid {
    gap: 9px;
  }
  .pd-blue .ds-treatment-grid article {
    min-height: 137px;
  }
  .pd-blue .ds-location-grid article {
    min-height: 160px;
    grid-template-columns: 46% 1fr;
  }
  .pd-blue .ds-location-grid article > img {
    min-height: 160px;
  }
  .pd-blue .ds-contact-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 15px;
  }
  .pd-blue .ds-contact-row > a {
    width: 100%;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #cae3fa;
  }
  .pd-blue .ds-contact-row > a strong {
    font-size: 17px;
  }
  .pd-blue .ds-patient-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .pd-blue .ds-portal-mock {
    width: min(290px, 100%);
    justify-self: center;
  }
  .pd-blue .ds-patient-action {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .pd-blue .ds-patient-action .ds-button {
    justify-self: start;
    min-height: 44px;
  }
  .pd-blue .ds-footer-main {
    align-items: flex-start;
    flex-direction: column;
  }
  .pd-blue .ds-footer-links {
    justify-content: flex-start;
    gap: 13px 19px;
  }
  .pd-blue .ds-footer-bottom {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 6px;
  }
  .pd-blue .ds-footer-bottom > :last-child {
    text-align: left;
  }
  .pd-blue .ds-footer-signoff {
    text-align: left;
  }
}
@media (max-width: 420px) {
  .pd-blue .ds-location-grid article {
    grid-template-columns: 1fr;
  }
  .pd-blue .ds-location-grid article > img {
    height: 186px;
    min-height: 0;
  }
  .pd-blue .ds-location-content {
    min-height: 150px;
  }
  .pd-blue .ds-portal-pills span {
    flex: 1 1 calc(50% - 4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pd-blue *,
  .pd-blue *::before,
  .pd-blue *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .pd-blue .ds-button:hover,
  .pd-blue .ds-treatment-grid article:hover {
    transform: none;
  }
}

/* Demo identification stays with the account profile. */
.sidebar-user-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sidebar-user-meta .sidebar-user-role {
  margin-top: 0;
}
.sidebar-demo-label {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eaf4ff;
  color: var(--os-primary-active);
  font-size: var(--os-text-caption);
  font-weight: 700;
  line-height: 1.4;
}
.sidebar-demo-label[hidden] {
  display: none;
}
/* Consultation cards follow their content, including single and empty queues. */
.dashboard-v32 .dashboard-consultations {
  align-self: start;
  height: auto;
  max-height: 100%;
  grid-template-rows: auto minmax(0, auto) auto;
}
.dashboard-v32 .dashboard-consultations .consultation-mini-list {
  align-content: start;
  grid-auto-rows: max-content;
}
.dashboard-v32 .dashboard-consultations .compact-empty {
  min-height: 0;
  padding: 20px;
  text-align: left;
  align-items: start;
}

.daily-greeting {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 16px;
  color: var(--text-secondary, #516174);
}
.daily-greeting strong {
  font-size: 18px;
  color: var(--text-primary, #162d42);
}
.daily-greeting span {
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .daily-greeting {
    flex-direction: column;
    gap: 4px;
  }
}

/* Keep editable text legible on touch devices; iOS zooms small fields on focus.
   Shared by professional, patient, consultation and institutional forms.
   Keep user-controlled page zoom available in the viewport metadata. */
@media (max-width: 1024px), (any-pointer: coarse) {
  input,
  textarea,
  select,
  [contenteditable]:not([contenteditable='false']) {
    font-size: 16px !important;
  }
}

/* Professional production: private provenance and explicit reviewed handoff. */
.presentations-page {
  max-width: 1160px;
}
.production-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.production-privacy {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 14px;
}
.presentations-page > .card {
  margin-top: 20px;
}
.production-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.production-entry p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--muted);
}
.production-entry > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.production-entry .btn {
  flex-shrink: 0;
}
.production-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.production-submissions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.production-submission {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.production-submission h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.production-submission summary {
  cursor: pointer;
  padding: 14px 0;
  min-height: 44px;
}
.production-submission .btn {
  margin-top: 12px;
}
.production-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.production-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.production-line small {
  display: block;
  color: var(--muted);
}
.production-line strong {
  white-space: nowrap;
}
.production-error {
  color: var(--danger);
  margin-top: 12px;
}
.presentations-page .btn,
.presentations-page .input,
.presentations-page .select {
  min-height: 44px;
}
@media (max-width: 700px) {
  .production-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .production-submissions {
    grid-template-columns: 1fr;
  }
  .production-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .production-submission .row-between {
    flex-wrap: wrap;
    gap: 12px;
  }
  .production-line {
    gap: 8px;
    font-size: 14px;
  }
  .production-actions .btn {
    width: 100%;
    white-space: normal;
  }
}

.production-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
@media (max-width: 700px) {
  .production-filters > label:first-child {
    grid-column: 1/-1;
  }
  .production-filters .form-field:last-child {
    grid-column: 1/-1;
  }
}

/* One down arrow per single-select; native menu/keyboard behavior is retained. */
select:not([multiple]):not([size]),
select[size='1']:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475f78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  padding-inline-end: 42px;
}
@media (forced-colors: active) {
  select:not([multiple]):not([size]),
  select[size='1']:not([multiple]) {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
  }
}

/* Own institutional workspace stays within the clinical app shell. */
.presentations-page .production-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.presentations-page .production-financial-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.presentations-page .production-financial-totals > p {
  flex: 1 1 180px;
  min-width: min-content;
}
.presentations-page .production-money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.presentations-page .production-submission summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
}
.presentations-page .production-submission h3 {
  font-size: 16px;
  margin: 0;
}
.presentations-page .production-entry > div {
  min-width: 0;
}
.presentations-page .production-entry p {
  overflow-wrap: anywhere;
}
.presentations-page .production-actions {
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 600px) {
  .presentations-page .production-tabs .btn {
    flex: 1 1 140px;
    white-space: normal;
  }
  .presentations-page .production-entry {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* A compact professional workbench: one coverage/plan, one reviewed handoff. */
.production-simple {
  max-width: 1120px;
}
.production-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.production-heading h1 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.25;
  margin: 4px 0 0;
  letter-spacing: -0.035em;
}
.production-institution {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.production-heading-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.production-context {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.production-month {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.production-month .input {
  width: 205px;
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  cursor: pointer;
}
.production-month input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 5px;
}
.production-filter-panel {
  margin-left: auto;
  min-width: 120px;
}
.production-filter-panel > summary {
  padding: 12px;
  min-height: 44px;
  cursor: pointer;
  font-size: 14px;
  text-align: right;
}
.production-filter-panel[open] {
  flex: 1 1 100%;
  margin-left: 0;
}
.production-filter-panel[open] > summary {
  text-align: left;
  padding-left: 0;
}
.production-simple .production-filters {
  grid-template-columns: minmax(180px, 2fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 4px 0 12px;
}
.production-simple .production-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  border-bottom: 1px solid var(--line);
  margin: 8px 0 24px;
}
.production-tab {
  appearance: none;
  background: none;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 0;
  min-height: 44px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.production-tab:hover {
  color: var(--primary-dark);
}
.production-tab[aria-current] {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: var(--os-weight-medium);
}
.production-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}
.production-workbench-intro {
  margin-bottom: 16px;
}
.production-workbench-intro h2 {
  font-size: 18px;
  font-family: var(--font-display);
  margin: 0 0 4px;
}
.production-workbench-intro p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.production-coverage-list {
  display: grid;
  gap: 16px;
}
.production-coverage {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  min-width: 0;
}
.production-coverage > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.production-coverage h3 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 4px;
  font-weight: var(--os-weight-medium);
}
.production-plan {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.production-coverage .badge {
  display: inline-flex;
  margin-top: 2px;
}
.production-coverage-total {
  text-align: right;
  display: grid;
  gap: 4px;
  flex-shrink: 0;
}
.production-coverage-total strong {
  font-size: 20px;
  font-weight: var(--os-weight-medium);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.production-coverage-total small {
  color: var(--muted);
  font-size: 13px;
}
.production-code-detail > summary,
.production-private-detail > summary,
.production-patient > summary {
  min-height: 44px;
  padding: 13px 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
.production-code-detail {
  margin-top: 8px;
}
.production-code-table {
  width: 100%;
  font-size: 14px;
}
.production-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(100px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.production-code-row > :nth-child(2),
.production-code-row > :last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.production-code-row > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.production-code-row > div > strong {
  flex-shrink: 0;
}
.production-code-row > div > span {
  overflow-wrap: anywhere;
  color: var(--muted);
}
.production-code-head {
  color: var(--muted);
  font-size: 12px;
  border: 0;
  padding: 6px 0 10px;
}
.production-code-row > strong:last-child {
  font-weight: 550;
}
.production-private-detail {
  border-top: 1px solid var(--line);
}
.production-private-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
}
.production-private-row p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.production-coverage > footer {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.production-coverage > footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 58ch;
}
.production-coverage > footer .btn {
  flex-shrink: 0;
}
.production-returned {
  padding: 12px;
  background: var(--warning-soft);
  color: var(--text);
  border-radius: var(--radius-sm);
  margin: 12px 0 0;
  font-size: 14px;
}
.production-empty {
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.production-empty h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.production-empty p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}
.production-simple .production-privacy {
  font-size: 13px;
  margin: 18px 0 0;
  line-height: 1.5;
  max-width: 80ch;
}
.production-entry-modal .form-grid {
  grid-template-columns: minmax(0, 2fr) minmax(100px, 1fr);
  gap: 12px;
}
.production-entry-modal .input,
.production-entry-modal .select {
  min-height: 44px;
  border-color: var(--line-strong);
}
.production-entry-modal .production-practice-field {
  position: relative;
}
.production-entry-modal [role='listbox'] {
  position: absolute;
  top: 70px;
  left: 0;
  width: calc(150% + 12px);
  max-height: 260px;
  overflow: auto;
  padding: 4px;
  z-index: 3;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.production-entry-modal [role='listbox'][hidden] {
  display: none;
}
.production-entry-modal [role='option'] {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  border: 0;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.production-entry-modal [role='option']:is(:hover, [aria-selected='true']) {
  background: var(--primary-soft);
}
.production-entry-modal [role='option'] small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.production-field-error {
  color: var(--danger);
  font-size: 13px;
}
.production-field-error:empty {
  display: none;
}
.production-entry-modal [aria-invalid='true'] {
  border-color: var(--danger);
}
.production-valuation {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin: 16px 0 4px;
}
.production-patient {
  margin-bottom: 12px;
}
.production-patient .form-field {
  margin-bottom: 8px;
}
.production-continue {
  margin-right: auto;
  font-size: 14px;
}
.production-review-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 17px;
  padding: 16px 0;
}
@media (max-width: 800px) {
  .production-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .production-heading-actions {
    width: 100%;
  }
  .production-heading-actions .btn {
    flex: 1;
  }
  .production-simple .production-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .production-simple .production-filters .btn {
    grid-column: 1/-1;
    justify-self: start;
  }
}
@media (max-width: 520px) {
  .production-heading h1 {
    font-size: 23px;
  }
  .production-heading-actions {
    flex-direction: column-reverse;
  }
  .production-context {
    gap: 8px;
  }
  .production-month {
    width: 100%;
    justify-content: space-between;
  }
  .production-month .input {
    width: 185px;
  }
  .production-filter-panel {
    margin-left: 0;
  }
  .production-filter-panel > summary {
    text-align: left;
    padding-left: 0;
  }
  .production-simple .production-tabs {
    gap: 0 16px;
    margin-bottom: 20px;
  }
  .production-tab {
    font-size: 13px;
  }
  .production-simple .production-filters {
    grid-template-columns: 1fr;
  }
  .production-coverage {
    padding: 16px;
  }
  .production-coverage > header {
    flex-wrap: wrap;
  }
  .production-coverage-total {
    text-align: left;
  }
  .production-coverage-total strong {
    font-size: 18px;
  }
  .production-code-row {
    grid-template-columns: minmax(0, 1fr) 45px 95px;
    gap: 8px;
  }
  .production-code-row > div {
    display: block;
  }
  .production-code-row > div > span {
    display: block;
    font-size: 13px;
    margin-top: 3px;
  }
  .production-code-row > strong:last-child {
    font-size: 13px;
    white-space: normal;
  }
  .production-coverage > footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .production-coverage > footer .btn {
    width: 100%;
  }
  .production-entry-modal [role='listbox'] {
    width: calc(150% + 6px);
  }
  .production-entry-modal [role='option'] {
    grid-template-columns: 50px minmax(0, 1fr);
  }
  .production-entry-modal [role='option'] small {
    grid-column: 2;
  }
  .production-continue {
    width: 100%;
    margin: 0;
  }
}
.production-entry-modal .form-field.span-2 {
  grid-column: 1 / -1;
}
.production-coverage {
  padding: 16px 20px;
}
.production-coverage > footer {
  margin-top: 0;
  padding-top: 8px;
}
.production-code-detail {
  margin-top: 4px;
}
.production-private-detail > summary {
  font-size: 13px;
}
@media (max-width: 520px) {
  .production-coverage {
    padding: 16px;
  }
}
.production-entry-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.production-entry-modal .modal-head,
.production-entry-modal .modal-foot {
  flex-shrink: 0;
}
.production-entry-modal .modal-body {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.provider-tracking,
.provider-collections {
  display: grid;
  gap: 16px;
}
.provider-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 410px), 1fr));
  align-items: start;
  gap: 16px;
}
.provider-month-card > header {
  flex-wrap: wrap;
}
.provider-month-card header p,
.provider-month-production-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.provider-month-total {
  display: grid;
  gap: 4px;
}
.provider-month-total > span {
  font-size: 12px;
  color: var(--muted);
}
.provider-month-total strong {
  font-size: 21px;
}
.provider-month-balances {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}
.provider-month-balances > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.provider-month-balances dt {
  font-size: 13px;
  color: var(--muted);
}
.provider-month-balances dd {
  margin: 0;
}
.provider-month-details {
  border-top: 1px solid var(--line);
}
.provider-month-details > summary {
  min-height: 44px;
  padding: 14px 0 0;
  color: var(--primary-dark);
  font-size: 13px;
  cursor: pointer;
}
.provider-month-production {
  padding: 16px 0 4px;
}
.provider-month-production + .provider-month-production {
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.provider-month-production-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.provider-month-production-head h4 {
  margin: 0;
  font-size: 14px;
}
.provider-month-production .badge {
  white-space: normal;
}
.provider-month-production .production-actions {
  padding: 12px 0;
  flex-wrap: wrap;
}
.provider-month-production .provider-followup-note {
  padding: 4px 0;
  font-size: 13px;
}
.provider-month-production .production-line {
  padding: 12px 0;
  flex-wrap: wrap;
}
.provider-month-card .production-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.provider-month-adjustment {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 12px;
}
.provider-joint-payments {
  display: grid;
  gap: 12px;
}
.provider-joint-payments h3,
.provider-joint-payments p {
  margin: 0;
}
.provider-joint-payments > p {
  color: var(--muted);
  font-size: 13px;
}
.provider-joint-payments .production-entry {
  flex-wrap: wrap;
  gap: 12px;
}
.provider-joint-payments .production-entry > div:last-child {
  display: grid;
  gap: 4px;
}
.provider-tracking > h2,
.provider-collections > h2 {
  margin: 8px 0 0;
  font-size: 20px;
}
.provider-tracking > p,
.provider-collections > p {
  margin: 0;
  color: var(--muted);
}
.provider-tracking-card .production-actions {
  padding: 14px 18px;
  flex-wrap: wrap;
}
.provider-tractice-lines {
  padding: 0 18px;
}
.provider-practice-lines .production-line small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.provider-followup-note {
  padding: 0 18px 16px;
  margin: 0;
  color: var(--muted);
}
.provider-finance-grid {
  display: grid;
  gap: 14px;
}
.provider-finance-grid .production-coverage > p,
.provider-collections > .production-coverage > p {
  margin: 12px 18px;
}
.provider-payment-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px;
}
.provider-payment-totals strong {
  display: block;
  margin-top: 8px;
}
.production-coverage-empty > p {
  padding: 0 18px;
  color: var(--muted);
}
.production-coverage-empty {
  background: var(--surface);
}
@media (max-width: 600px) {
  .provider-payment-totals {
    grid-template-columns: 1fr;
  }
  .provider-tracking-card .badge {
    white-space: normal;
  }
}
/* Same-tooth pending choices use large native buttons, separate from saved marks. */
.odontogram-pending {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.tooth-selection-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-block: 12px;
}
.tooth-selection-map button {
  min-height: 44px;
  white-space: normal;
}
.odontogram-pending [aria-pressed='true'] {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Same-tooth selector: show the clinical scope before a user edits its finding. */
.modal.modal-tooth-selection {
  width: min(860px, 100%);
  max-height: min(820px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-tooth-selection .modal-head,
.modal-tooth-selection .modal-foot {
  flex: 0 0 auto;
}
.modal-tooth-selection .modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}
.odontogram-selection-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
  gap: 20px;
  align-items: start;
}
.odontogram-selection-grid .odontogram-pending {
  margin: 0;
  padding: 16px;
  background: var(--surface);
}
.tooth-selection-help,
.tooth-selection-guide {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.tooth-selection-map {
  margin-block: 12px;
}
.tooth-selection-map button:last-child {
  grid-column: 1 / -1;
}
.tooth-whole-choice {
  width: 100%;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 12px 16px;
  text-align: left;
  border-color: color-mix(in srgb, var(--primary) 58%, var(--border));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.tooth-whole-choice span {
  font-size: 17px;
  font-weight: 750;
}
.tooth-whole-choice small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tooth-whole-choice[aria-pressed='true'] {
  color: var(--os-on-primary);
  background: var(--primary);
  border-color: var(--primary);
}
.tooth-whole-choice[aria-pressed='true'] span,
.tooth-whole-choice[aria-pressed='true'] small {
  color: var(--os-on-primary);
}
.tooth-whole-choice[aria-pressed='true']:hover {
  background: var(--primary-dark);
}
.tooth-selection-summary {
  min-height: 42px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--os-surface-subtle);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}
.tooth-selection-details {
  min-width: 0;
  padding-top: 4px;
}
.tooth-selection-details .form-grid {
  grid-template-columns: minmax(0, 1fr);
}
.tooth-selection-details .form-field {
  grid-column: 1 / -1;
}
.tooth-selection-details .textarea {
  min-height: 88px;
}
.tooth-selection-guide {
  margin-top: 14px;
}
.tooth-selection-decision {
  max-width: 580px;
  margin: 8px auto;
  padding: 8px 4px;
}
.tooth-decision-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tooth-selection-decision h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.18;
  text-wrap: balance;
}
.tooth-selection-decision p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}
.tooth-decision-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--border));
  border-radius: 12px;
  background: var(--os-surface-subtle);
  line-height: 1.45;
}
.tooth-decision-summary span {
  color: var(--muted);
}
@media (max-width: 720px) {
  .modal.modal-tooth-selection {
    max-height: calc(100dvh - 16px);
  }
  .modal-tooth-selection .modal-body {
    padding: 16px;
  }
  .odontogram-selection-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tooth-selection-decision h3 {
    font-size: 22px;
  }
  .tooth-selection-decision p {
    font-size: 16px;
  }
}
