/* Acabado visual compartido. No modifica estados ni reglas de negocio. */
.patient-owner-summary:empty {
  display: none;
}

.patient-owner-summary {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9fd;
}

.patient-owner-summary h3 {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

.patient-owner-summary dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin: 0;
}

.patient-owner-summary dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.patient-owner-summary dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

.navigation-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #5268bc;
  outline-offset: 3px;
}

.dashboard-content .dashboard-heading h1 {
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.dashboard-heading > div > p:not(.eyebrow) {
  max-width: 70ch;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dashboard-content .eyebrow {
  margin-bottom: 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.dashboard-content .panel-card {
  border-radius: 16px;
  box-shadow: 0 4px 18px rgb(21 34 83 / 4%);
}

.responsive-table th {
  padding: 0.85rem 1rem;
  color: #56617b;
  font-size: 0.7rem;
  background: #f7f9fd;
}

.responsive-table td {
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.responsive-table tbody tr:hover {
  background: #f3f6fc;
}

.person-cell small,
.table-subtext {
  color: #66718a;
  font-size: 0.76rem;
  line-height: 1.45;
}

.table-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.status-badge {
  font-size: 0.73rem;
  padding: 0.35rem 0.65rem;
}

.dashboard-shell .button {
  min-height: 42px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.dashboard-shell .button--primary {
  box-shadow: 0 4px 12px rgb(32 47 118 / 14%);
}

.form-panel.audit-dialog {
  width: min(920px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  background: #fff;
}

.form-panel__header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.form-panel__header h2 {
  font-size: 1.35rem;
  line-height: 1.3;
}

.form-panel__header p {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.form-group-heading {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--navy);
  border-radius: 0 6px 6px 0;
  background: #f3f5fb;
  color: var(--navy);
  font-size: 0.85rem;
}

.record-form input,
.record-form select,
.record-form textarea {
  min-height: 44px;
  font-size: 0.9rem;
  border-radius: 9px;
}

.record-form__actions {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.hero__copy h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.8;
}

.section-heading h2,
.about-copy h2,
.contact-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
  text-wrap: balance;
}

.service-card,
.contact-card {
  border-radius: 18px;
  box-shadow: 0 5px 20px rgb(21 34 83 / 5%);
}

.service-card p {
  line-height: 1.75;
  color: #59657e;
}

@media (max-width: 640px) {
  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .heading-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .heading-actions .button {
    flex: 1 1 140px;
    min-height: 44px;
  }

  .responsive-table table,
  .responsive-table tbody,
  .responsive-table tr {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .responsive-table tbody tr {
    margin-bottom: 0.85rem;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
  }

  .responsive-table td[data-label] {
    display: block;
    padding: 0.55rem;
    border: 0;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .responsive-table td[data-label]::before {
    display: block;
    margin-bottom: 0.25rem;
    content: attr(data-label);
    color: #66718a;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .record-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-form input,
  .record-form select,
  .record-form textarea {
    font-size: 16px;
  }

  .record-form__actions .button {
    min-height: 44px;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dashboard-section,
  .service-card,
  .dashboard-sidebar {
    animation: none;
    transition: none;
  }
}
