:root {
  --ink: #20332d;
  --muted: #63746d;
  --surface: #ffffff;
  --surface-soft: #f5f7f8;
  --surface-warm: #ffffff;
  --line: #e4eae7;
  --primary: #25735c;
  --primary-strong: #195740;
  --primary-soft: #eaf4ee;
  --accent: #c58d5f;
  --warning: #8b5f26;
  --warning-soft: #fff3d6;
  --danger: #a74747;
  --shadow: 0 12px 40px rgb(26 48 39 / 7%);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface-soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgb(37 115 92 / 45%);
  outline-offset: 3px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  min-height: 100vh;
}

.auth-brand,
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vw, 110px);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgb(255 255 255 / 15%), transparent 30%),
    linear-gradient(145deg, #294f46, #416f61);
  color: white;
}

.auth-brand::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 320px;
  height: 320px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  content: "";
}

.auth-brand .eyebrow {
  color: #d3e9df;
}

.auth-brand h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.auth-copy {
  max-width: 520px;
  margin: 28px 0 0;
  color: #e0eee8;
  font-size: 1.08rem;
  line-height: 1.7;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 40px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 18px;
  background: rgb(255 255 255 / 10%);
  color: white;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.brand-mark-small {
  width: 40px;
  height: 40px;
  margin: 0;
  border-color: rgb(49 95 83 / 15%);
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.45rem;
}

.privacy-note {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 500px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 16%);
  color: #d3e9df;
}

.privacy-note p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-panel {
  background: var(--surface-warm);
}

.auth-card {
  width: min(100%, 430px);
  margin: auto;
}

.auth-card h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.auth-card > p:not(.eyebrow) {
  margin: 14px 0 28px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form input,
.auth-form select {
  min-height: 50px;
  font-size: 1rem;
}

.auth-form .button { min-height: 50px; }
.auth-form h3, .auth-form p { margin: 0; line-height: 1.5; }
.auth-help { color: var(--muted); font-size: 0.82rem; }
.auth-error {
  border: 1px solid #e1b8b8;
  border-radius: var(--radius-sm);
  background: #fff3f3;
  padding: 12px 14px;
  color: var(--danger);
  font-size: 0.88rem;
}
.password-field { position: relative; display: block; }
.password-field input { padding-right: 86px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 3px;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 8px 12px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 750;
}
.password-toggle:hover { background: var(--surface-soft); }

.fine-print {
  text-align: center;
  font-size: 0.78rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  box-shadow: 0 2px 6px rgb(26 48 39 / 6%);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgb(26 48 39 / 10%);
}

.button-primary:hover {
  background: var(--primary-strong);
}

.button-secondary {
  border-color: #bdcec6;
  background: white;
  color: var(--primary-strong);
}

.button-secondary:hover {
  border-color: var(--primary);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-quiet:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.button-block {
  width: 100%;
  margin-top: 10px;
}

.notice {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

.notice-warning {
  border-color: #ebd29c;
  background: var(--warning-soft);
  color: var(--warning);
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 16px 20px;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px;
  text-decoration: none;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.main-nav {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.main-nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  border-radius: 9px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.main-nav a span {
  width: 20px;
  text-align: center;
  font-size: 1.2rem;
}

.sidebar-footer {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.environment-badge {
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 550;
}

.content-shell {
  min-width: 0;
}

.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 86%);
  padding: 14px 32px;
  backdrop-filter: blur(14px);
}

.topbar h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
}

.topbar .eyebrow {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-size: 1.25rem;
}

.user-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.user-chip > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.user-chip strong,
.user-chip small {
  display: block;
  font-size: 0.78rem;
}

.user-chip small {
  margin-top: 2px;
  color: var(--muted);
}

.main-content {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 32px;
}

.main-content:focus {
  outline: none;
}

.hero-card {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid #dbe9e1;
  background: linear-gradient(115deg, #edf5ef, #f6f9f4);
  padding: clamp(28px, 4vw, 48px);
}

.hero-card h1,
.section-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.hero-card p:not(.eyebrow) {
  max-width: 630px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-symbol {
  display: grid;
  width: clamp(120px, 18vw, 210px);
  height: clamp(120px, 18vw, 210px);
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(49 95 83 / 13%);
  border-radius: 28%;
  color: rgb(49 95 83 / 50%);
  font-family: Georgia, serif;
  font-size: clamp(5rem, 10vw, 9rem);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.action-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 24px;
  box-shadow: 0 2px 4px rgb(26 48 39 / 2%);
}

.action-card h2 {
  margin: 18px 0 8px;
  font-size: 1.12rem;
}

.action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.action-card-muted {
  background: transparent;
  box-shadow: none;
}

.action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.35rem;
}

.text-button {
  margin-top: auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.section-heading h1 {
  font-size: clamp(1.65rem, 2.5vw, 2rem);
}

.search-card {
  display: flex;
  gap: 14px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 18px;
  box-shadow: none;
}

label {
  display: grid;
  gap: 7px;
  color: #46534f;
  font-size: 0.8rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dce5e0;
  border-radius: 9px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

input::placeholder,
textarea::placeholder {
  color: #687b70;
  opacity: 1;
}

textarea {
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #98ada4;
}

.search-field {
  min-width: 220px;
  flex: 1;
}

.table-card {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.table-meta,
.pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
}

.table-meta {
  border-bottom: 1px solid var(--line);
}

.table-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

#view-pacientes .table-meta {
  flex-wrap: wrap;
  gap: 12px;
}

.patient-sort {
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}

.patient-sort select {
  font-size: 16px;
}

.patient-sort-scope {
  margin: 0;
  padding: 10px 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.billing-summary {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 20px;
}

.billing-summary h2,
.payment-history-title {
  margin: 0 0 16px;
  font-size: 1rem;
}

.billing-summary-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin: 0;
}

.billing-summary-fields dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.billing-summary-fields dd {
  margin: 6px 0 0;
  font-weight: 600;
}

.pagination {
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.pagination-label {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.patient-picker {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 10px;
}

.patient-picker button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
}

.patient-picker button:hover,
.patient-picker button:focus-visible {
  background: var(--primary-soft);
}

.patient-picker strong,
.patient-picker small {
  display: block;
}

.patient-picker small {
  margin-top: 3px;
  color: var(--muted);
}

.field-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
}

.transcription-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.transcription-controls p {
  margin: 0;
}

.transcription-controls.is-listening .button {
  border-color: var(--danger);
  color: var(--danger);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid #edf1ef;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #fafbfb;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: normal;
  font-weight: 600;
}

td {
  font-size: 0.88rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.patient-name {
  display: block;
  font-weight: 650;
}

.patient-details-cell,
.payment-details-cell {
  position: relative;
  cursor: pointer;
}

.patient-details-trigger,
.payment-details-trigger {
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.patient-details-trigger.patient-name {
  font-weight: 650;
}

/* Expand the native button's hit area while preserving table cell semantics. */
.patient-details-trigger::after,
.payment-details-trigger::after {
  position: absolute;
  inset: 0;
  content: "";
}

.patient-details-cell:hover,
.payment-details-cell:hover {
  background: #f0f6f2;
}

.patient-details-trigger:focus-visible,
.payment-details-trigger:focus-visible {
  outline: none;
}

.patient-details-trigger:focus-visible::after,
.payment-details-trigger:focus-visible::after {
  border-radius: 6px;
  outline: 2px solid var(--primary);
  outline-offset: -3px;
}

.patient-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.row-action + .row-action { margin-left: 8px; }
.pix-expiration { margin: 16px 28px; color: var(--muted); line-height: 1.5; }
[aria-busy="true"] { cursor: progress; }

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf1ef;
  color: #596660;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: normal;
}

.status-approved,
.status-paid,
.status-pago {
  background: #dff1e8;
  color: #286449;
}

.status-pending,
.status-pendente {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-finalizado {
  background: #dff1e8;
  color: #286449;
}

.status-rascunho {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-error,
.status-rejected,
.status-cancelled,
.status-rejeitado,
.status-cancelado,
.status-errogateway {
  background: #f7e3e3;
  color: var(--danger);
}

.empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  padding: 34px;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.5rem;
}

.empty-state h2 {
  margin: 14px 0 5px;
  font-size: 1rem;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.notice-clinical {
  border-color: #bed5cb;
  background: #eef7f3;
  color: var(--primary-strong);
}

.record-heading {
  display: flex;
  min-height: 72px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px 10px;
}

.record-heading h2,
.record-heading p {
  margin: 0;
}

.record-heading > p {
  color: var(--muted);
  font-size: 0.84rem;
}

.records-list {
  display: grid;
  gap: 14px;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 24px;
  box-shadow: 0 2px 4px rgb(26 48 39 / 2%);
}

.record-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.record-card-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.record-card-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.record-content {
  margin: 18px 0 0;
  line-height: 1.65;
  white-space: pre-wrap;
}

.record-detail {
  margin: 12px 0 0;
  border-left: 3px solid var(--primary-soft);
  padding-left: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.record-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.record-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.record-transcription-note {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: left;
}

.dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(88vh, 820px);
  max-height: min(88dvh, 820px);
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(23 41 34 / 20%);
}

.dialog-small {
  width: min(510px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgb(27 39 34 / 38%);
  backdrop-filter: blur(3px);
}

.dialog form,
.dialog > div,
.dialog > label,
.dialog > .dialog-actions {
  margin-right: 28px;
  margin-left: 28px;
}

.dialog form {
  margin: 0;
  padding: 0 28px 26px;
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 -28px 24px;
  border-bottom: 1px solid var(--line);
  padding: 24px 28px 20px;
}

.dialog > .dialog-header {
  margin: 0 0 24px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.dialog-header .dialog-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1.4rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.single-column {
  grid-template-columns: 1fr;
}

.span-2 {
  grid-column: span 2;
}

.form-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.form-section legend {
  padding: 0 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.checkbox-field {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.toast {
  --toast-accent: #287553;
  --toast-tint: #eaf6ef;
  position: fixed;
  inset: 24px 24px auto auto;
  z-index: 1000;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 8px 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--toast-accent);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 32px rgb(29 55 45 / 14%);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  animation: toast-enter 180ms ease-out;
}

.toast-message {
  overflow-wrap: anywhere;
}

.dialog > .toast {
  margin: 0;
}

.toast-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--toast-tint);
  color: var(--toast-accent);
}

.toast-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.toast-close:hover {
  background: var(--surface-soft);
}

.toast-error {
  --toast-accent: #b44040;
  --toast-tint: #fceeee;
}

.toast-warning {
  --toast-accent: #946414;
  --toast-tint: #fff4d9;
}

.toast-info {
  --toast-accent: #346eaa;
  --toast-tint: #edf4fc;
}

.confirmation-dialog {
  --confirmation-padding: 28px;
  width: min(460px, calc(100vw - 32px));
}

.dialog.confirmation-dialog > .dialog-header {
  margin: 0;
}

.dialog.confirmation-dialog > p {
  margin: 20px var(--confirmation-padding) 0;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dialog.confirmation-dialog > .dialog-actions {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  padding: 20px var(--confirmation-padding) 24px;
}

@keyframes toast-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .confirmation-dialog {
    --confirmation-padding: 20px;
  }

  .toast {
    inset: auto 16px max(16px, env(safe-area-inset-bottom)) 16px;
    width: auto;
  }
}

.ui-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  pointer-events: none;
}

input[type="checkbox"] {
  accent-color: var(--primary);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15;
  border: 0;
  background: rgb(27 39 34 / 35%);
}

.callback-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.callback-card {
  width: min(100%, 480px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  padding: 32px;
  box-shadow: var(--shadow);
}

.callback-card .brand-mark {
  margin-bottom: 24px;
}

.callback-card h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.callback-card > p:not(.eyebrow) {
  margin: 20px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.sidebar-section-label {
  margin: 42px 12px 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.environment-badge::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
  vertical-align: middle;
}

.search-input {
  position: relative;
  display: block;
}

.search-input > .ui-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-input input {
  padding-left: 38px;
}

#patient-search-form {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: 0;
  padding: 20px;
}

#patient-search-form + .table-card {
  margin-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

#view-pacientes .table-meta {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
}

.patient-sort {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
}

.patient-sort select {
  width: auto;
  max-width: 100%;
  border-color: var(--line);
  font-size: 0.82rem;
}

.patient-row-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.patient-row-identity > div {
  min-width: 0;
}

.patient-row-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #deebe3;
  border-radius: 12px;
  background: #f0f6f2;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 650;
}

.patient-table td,
.payment-table td {
  font-size: 0.81rem;
}

.patient-table td:nth-child(1),
.patient-table td:nth-child(2),
.payment-table td:first-child {
  white-space: normal;
  overflow-wrap: anywhere;
}

.patient-table td:nth-child(2) {
  color: var(--muted);
}

.patient-table tbody tr:hover,
.payment-table tbody tr:hover {
  background: #fafcfb;
}

.row-action:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.row-action .ui-icon {
  width: 16px;
  height: 16px;
}

.billing-summary {
  padding: 24px;
  box-shadow: 0 2px 4px rgb(26 48 39 / 2%);
}

.billing-summary h2 {
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.billing-summary-fields dd {
  font-size: 0.9rem;
}

#billing-summary-value {
  color: var(--primary-strong);
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.record-heading {
  align-items: center;
  margin: 24px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 20px;
}

.record-heading > div {
  min-width: 0;
}

.record-heading h2 {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 600;
}

.record-card-header > div {
  min-width: 0;
}

.record-content,
.record-card-header p,
#payment-patient-name {
  overflow-wrap: anywhere;
}

.view > .button[href="#/pacientes"] {
  margin: -8px 0 22px -12px;
  font-size: 0.8rem;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}

.team-card {
  display: grid;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 28px;
}

.team-card-heading h2,
.team-help h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.team-card-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.team-card .search-field {
  min-width: 0;
}

.team-card .button {
  justify-self: start;
}

.team-help {
  border: 1px solid #dbe9e1;
  border-radius: var(--radius-md);
  background: #edf5f0;
  padding: 28px;
}

.team-help h2 {
  margin-top: 20px;
}

.team-help ul {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
  padding-left: 18px;
  color: #4e6559;
  font-size: 0.85rem;
  line-height: 1.7;
}

.dialog form > .dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
}

.dialog form > .dialog-actions {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

#payment-result-dialog > .dialog-actions {
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dialog .payment-share-note {
  margin: 0 28px 24px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: auto;
    padding: 30px 24px;
  }

  .auth-brand h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.1; }
  .auth-brand .brand-mark { width: 40px; height: 40px; margin-bottom: 16px; border-radius: 12px; }
  .auth-brand .auth-copy, .auth-brand .privacy-note { display: none; }

  .auth-panel {
    min-height: auto;
    padding: 28px 24px 40px;
  }

  .auth-card { margin: 0 auto; }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    width: 244px;
    box-shadow: var(--shadow);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

  .action-grid {
    grid-template-columns: 1fr 1fr;
  }

  .action-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .auth-brand,
  .auth-panel {
    padding: 34px 24px;
  }

  .auth-brand h1 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .privacy-note {
    margin-top: 34px;
  }

  .topbar {
    padding: 12px 18px;
  }

  .user-chip div {
    display: none;
  }

  .main-content {
    padding: 22px 16px 38px;
  }

  .hero-card {
    min-height: 230px;
    align-items: flex-start;
  }

  .hero-symbol {
    position: absolute;
    right: -25px;
    bottom: -30px;
    opacity: 0.65;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-card:last-child {
    grid-column: auto;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading .button {
    width: 100%;
  }

  .search-card {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    min-width: 0;
  }

  .record-heading {
    align-items: start;
    flex-direction: column;
  }

  .transcription-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .dialog form {
    padding: 0 20px 20px;
  }

  .dialog-header {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .dialog > div,
  .dialog > label,
  .dialog > .dialog-actions {
    margin-right: 20px;
    margin-left: 20px;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .team-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #view-pacientes .section-heading {
    position: relative;
    display: block;
  }

  #view-pacientes .section-heading h1 {
    padding-right: 60px;
  }

  #view-pacientes .section-heading > .button {
    position: absolute;
    top: 8px;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  #view-pacientes .section-heading .button-label {
    display: none;
  }

  #patient-search-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
  }

  #patient-search-form > label {
    min-width: 0;
    grid-column: 1 / -1;
  }

  #patient-search-form .button {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
  }

  #view-pacientes .table-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 16px;
  }

  #patient-result-label {
    grid-row: 1;
    grid-column: 1;
  }

  #patient-clear-button {
    grid-row: 1;
    grid-column: 2;
  }

  .patient-sort {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .team-card,
  .team-help,
  .billing-summary {
    padding: 20px;
  }

  .team-card .button {
    width: 100%;
  }

  .patient-sort {
    width: 100%;
    margin-left: 0;
  }

  .patient-sort select {
    flex: 1;
    font-size: 16px;
  }

  .patient-table,
  .payment-table {
    display: block;
  }

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

  .patient-table tbody,
  .payment-table tbody {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: var(--surface-soft);
  }

  .patient-table tbody:empty,
  .payment-table tbody:empty {
    display: none;
  }

  .patient-table tbody tr,
  .payment-table tbody tr {
    display: grid;
    gap: 16px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    padding: 16px;
  }

  .patient-table tbody tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 6px;
  }

  .payment-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-table td,
  .payment-table td {
    min-width: 0;
    border: 0;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .patient-table td:nth-child(-n+3),
  .payment-table td:first-child {
    grid-column: 1 / -1;
  }

  .patient-table td[data-label] {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
  }

  .patient-table td[data-label]::before,
  .payment-table td[data-label]::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 500;
  }

  .payment-table td[data-label]::before {
    display: block;
    margin-bottom: 6px;
  }

  .patient-table td:nth-child(n+4) {
    border-top: 1px solid var(--line);
    padding-top: 8px;
    text-align: center;
  }

  .patient-table .row-action {
    width: 100%;
    min-height: 44px;
    flex-direction: column;
    gap: 5px;
    padding: 4px 0;
    font-size: 0.7rem;
  }

  .patient-table .patient-details-cell,
  .payment-table .payment-details-cell {
    min-height: 44px;
  }

  .patient-table .patient-details-cell[data-label] {
    align-items: center;
  }

  .patient-row-identity {
    gap: 10px;
  }

  .patient-meta {
    margin-top: 0;
  }

  .billing-summary-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .billing-summary-fields > div:first-child {
    grid-column: 1 / -1;
  }

  .table-meta,
  .pagination {
    flex-wrap: wrap;
    gap: 12px;
  }

  .record-actions {
    justify-content: flex-start;
  }

  .section-heading .record-actions {
    width: 100%;
    margin-top: 0;
  }

  .section-heading .record-actions .button {
    flex: 1 1 100%;
  }

  .record-card {
    padding: 18px;
  }
}

.patient-details-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90vh, 820px);
  max-height: min(90dvh, 820px);
  overflow: hidden;
  background: white;
  border-radius: 20px;
}

.patient-details-dialog > .dialog-header {
  flex: 0 0 auto;
  margin: 0;
  padding: 24px;
  background: #f8fbf9;
}

.patient-details-dialog .dialog-header > div {
  min-width: 0;
}

.patient-details-dialog .dialog-header h2 {
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.patient-details-dialog .dialog-header h2:focus {
  outline: none;
}

.patient-profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.patient-profile-identity > div {
  min-width: 0;
}

.patient-profile-identity .eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.patient-profile-avatar {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #d7e7df;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 750;
}

.patient-profile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--primary);
  font-size: 0.75rem;
}

.patient-profile-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.patient-profile-inactive {
  color: var(--muted);
}

.patient-details-dialog > .patient-details-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
}

.patient-details-content section + section {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.patient-details-content h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.patient-details-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
  margin: 0;
}

.patient-details-fields dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.patient-details-fields dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}

.patient-details-wide {
  grid-column: 1 / -1;
}

.patient-details-dialog .is-empty {
  color: var(--muted);
  font-weight: 400;
}

.patient-profile-address {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.65;
}

.patient-profile-address p {
  margin: 0;
}

.patient-profile-address p + p {
  margin-top: 2px;
}

.patient-details-dialog > .dialog-actions {
  flex: 0 0 auto;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  background: #f9fbfa;
}

@media (max-width: 700px) {
  .patient-details-dialog[open] {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .patient-details-dialog > .patient-details-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
  }

  .patient-details-content section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 24px;
    padding-left: 0;
  }

  .patient-details-dialog > .dialog-header {
    gap: 12px;
    padding: 20px;
  }

  .patient-profile-identity {
    gap: 12px;
  }

  .patient-profile-avatar {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .patient-details-dialog .dialog-header h2 {
    font-size: 1.2rem;
  }

  .patient-details-fields {
    gap: 18px;
  }

  .patient-details-dialog > .dialog-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 16px 20px;
  }
}

@media (max-width: 360px) {
  .patient-details-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Configurações e modelos de mensagens por clínica. */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.settings-nav a { display: block; padding: 14px 12px; border-radius: 8px; color: var(--primary-strong); font-weight: 650; background: var(--primary-soft); text-decoration: none; }
.settings-content, .template-editor, .template-preview { min-width: 0; }
.template-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.template-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.template-card legend { font-weight: 650; margin-bottom: 12px; }
.template-card label { display: grid; gap: 8px; }
.template-variables, .template-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.template-variables { margin: 16px 0 24px; }
.template-variables .button { border: 1px solid var(--line); font-size: 0.76rem; overflow-wrap: anywhere; }
.template-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 20px 0 28px; }
.template-columns h3 { margin: 0 0 16px; font-size: 1rem; }
.template-preview-subject { min-height: 44px; overflow-wrap: anywhere; }
.template-preview iframe { display: block; width: 100%; height: 350px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.template-whatsapp-preview { min-height: 230px; margin: 0; padding: 20px; border-radius: 12px; background: var(--primary-soft); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.template-validation { color: #a13434; font-size: 0.88rem; }
.template-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
@media (max-width: 1200px) { .settings-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .template-columns { grid-template-columns: 1fr; }
  .template-card { padding: 16px; }
  .template-actions .button { width: 100%; }
}

.template-editor-label { margin: 16px 0 8px; font-size: 0.85rem; font-weight: 650; }
#template-email-toolbar.ql-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border-color: var(--line); border-radius: 10px 10px 0 0; font: inherit; padding: 6px; }
#template-email-toolbar.ql-toolbar button { width: 44px; height: 44px; padding: 11px; border-radius: 6px; }
#template-email-toolbar .ql-picker { min-height: 44px; height: auto; }
#template-email-toolbar .ql-picker-label { display: flex; align-items: center; min-height: 44px; }
#template-email-toolbar .ql-picker-options .ql-picker-item { padding: 12px 8px; }
#template-email-toolbar.ql-toolbar button:hover, #template-email-toolbar.ql-toolbar button.ql-active { background: var(--primary-soft); }
#template-email-toolbar button:is(:hover, :focus-visible, .ql-active) .ql-stroke { stroke: var(--primary); }
#template-email-toolbar button:is(:hover, :focus-visible, .ql-active) .ql-fill { fill: var(--primary); }
#template-email-toolbar .ql-picker-label:is(:hover, .ql-active) { color: var(--primary); }
#template-email-editor.ql-container { height: auto; border-color: var(--line); border-radius: 0 0 10px 10px; font: inherit; }
#template-email-editor .ql-editor { height: auto; min-height: 280px; max-height: 460px; padding: 16px; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; overscroll-behavior: contain; }
#template-email-editor .ql-editor:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
#template-email-editor.ql-disabled { background: #f5f7f6; }
@media (max-width: 760px) {
  #template-email-editor .ql-editor { min-height: 240px; max-height: 52dvh; }
  #template-email-toolbar.ql-toolbar { gap: 2px; }
}

.template-file-actions { margin: 12px 0; }
.template-file-actions .button { min-height: 44px; }
.template-html-source { width: 100%; font: 16px/1.5 monospace; min-height: 280px; resize: vertical; }
#template-email-editor .ql-editor img { max-width: 100%; height: auto; }

.team-list-card > .section-heading { padding: 20px 20px 0; margin-bottom: 16px; gap: 16px; }
.team-list-card .notice-error { margin: 16px; border-color: var(--danger); color: var(--danger); }
.team-list-card .team-remove-button { min-height: 44px; color: var(--danger); }
.team-table td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .team-list-card > .section-heading { align-items: stretch; flex-direction: column; }
  .team-table, .team-table tbody, .team-table tr, .team-table td { display: block; width: 100%; }
  .team-table thead { display: none; }
  .team-table tr { padding: 16px; border-bottom: 1px solid var(--line); }
  .team-table td { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 12px; padding: 8px 0; border: 0; align-items: center; }
  .team-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.75rem; }
  .team-table .team-remove-button { justify-self: start; }
}

.mp-settings-card { max-width: 760px; }
.mp-settings-card h3 { margin: 12px 0; }
.mp-settings-card > p { line-height: 1.65; }
.mp-settings-card .template-variables { margin: 20px 0; }
.mp-settings-card .button { min-height: 44px; }
@media (max-width: 680px) {
  .mp-settings-card { padding: 18px; }
  .mp-settings-card .template-variables { flex-direction: column; }
  .mp-settings-card .button { width: 100%; }
}
