/* ============================================================
   MED ANGEL — COMPONENTS CSS · "OBSIDIAN CLINIC"
   Prontuário, Status Cirúrgico, Upload, PDF, etc.
   ============================================================ */

/* ─── Ícones (js/utils/icons.js) — substituem emoji do SO ─── */
.icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  vertical-align: -2px;
}
.icon-sm { width: 13px; height: 13px; }
.icon-lg { width: 20px; height: 20px; }

/* ─── Prontuário Header — compacto, identidade acima de tudo ───
   Antes: avatar 76px + pilha de até 5 botões full-width ao lado do
   nome, com status cirúrgico empurrado pra própria linha abaixo —
   consumia ~180px de altura antes de qualquer dado clínico aparecer.
   Agora: uma linha de identidade (avatar + nome + status inline) e
   uma linha de metadados compacta; só a ação principal fica visível,
   o resto entra num menu de "mais ações" — o prontuário em si ganha
   o espaço de volta. */
.prontuario-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  position: relative;
}
.prontuario-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}

.prontuario-avatar,
.prontuario-header .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(184, 150, 46, 0.3);
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-input);
  font-size: 0.9375rem;
}

.prontuario-identity { flex: 1; min-width: 0; }

.prontuario-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.prontuario-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.375rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prontuario-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
}
.prontuario-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.prontuario-meta .icon { opacity: 0.65; }

/* ─── Ações do cabeçalho: 1 botão primário visível + menu "mais" ─── */
.prontuario-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}
.btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn-icon-only:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

.prontuario-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
  display: none;
}
.prontuario-menu-dropdown.open { display: block; }
.prontuario-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.prontuario-menu-dropdown button:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.prontuario-menu-dropdown button.danger:hover { background: rgba(239, 68, 68, 0.08); color: #EF4444; }
.prontuario-menu-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 2px; }

/* ─── Surgical Status Badge — Obsidian Clinic ─── */
.surgical-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.surgical-status.none {
  background: rgba(80, 76, 68, 0.15);
  color: rgba(139, 132, 121, 0.7);
  border: 1px solid rgba(80, 76, 68, 0.2);
}
.surgical-status.pending {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6; /* Violet / Purple */
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.surgical-status.scheduled {
  background: rgba(217, 119, 6, 0.1);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
  animation: pulse 2.5s ease-in-out infinite;
}
.surgical-status.postop {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.surgical-status.performed {
  background: rgba(184, 150, 46, 0.1);
  color: var(--gold-light);
  border: 1px solid rgba(184, 150, 46, 0.25);
}
.surgical-status.withdrawal {
  background: rgba(239, 68, 68, 0.08);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Light Theme Overrides */
[data-theme="light"] .surgical-status.none       { background: #F8F7F4 !important; color: #6B7280 !important; border-color: #D1D5DB !important; }
[data-theme="light"] .surgical-status.pending    { background: #F3E8FF !important; color: #7E22CE !important; border-color: #D8B4FE !important; }
[data-theme="light"] .surgical-status.scheduled  { background: #FFFBEB !important; color: #B45309 !important; border-color: #FCD34D !important; }
[data-theme="light"] .surgical-status.postop     { background: #ECFDF5 !important; color: #047857 !important; border-color: #6EE7B7 !important; }
[data-theme="light"] .surgical-status.performed  { background: #FEF9E7 !important; color: #92400E !important; border-color: #F59E0B !important; }
[data-theme="light"] .surgical-status.withdrawal { background: #FEF2F2 !important; color: #B91C1C !important; border-color: #FCA5A5 !important; }

/* ─── Prontuário Section — Obsidian Clinic ─── */
.prontuario-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.prontuario-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: rgba(184, 150, 46, 0.03);
  cursor: pointer;
  transition: background var(--transition);
}
.prontuario-section-header:hover { background: rgba(184, 150, 46, 0.06); }

.prontuario-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.section-icon {
  display: inline-flex;
  opacity: 0.75;
  color: var(--gold);
}

.prontuario-section-body {
  padding: var(--space-lg);
}

/* Antes: rótulo em caixa-alta empilhado sobre o valor, num grid solto —
   lia como um objeto JSON impresso na tela. Agora: lista de linhas com
   rótulo à esquerda (peso normal, sem caps) e valor alinhado à direita,
   separadas por divisórias finas — o mesmo padrão de qualquer painel de
   configurações de software sério. */
.info-grid {
  display: flex;
  flex-direction: column;
}

.info-field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.info-field:last-child { border-bottom: none; }

.info-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.info-value {
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.5;
  text-align: right;
}

.info-value.empty {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
  opacity: 0.7;
}

/* ─── Allergy / Medication Tags ─── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid;
}

.tag-allergy {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(255, 91, 91, 0.3);
}

.tag-medication {
  background: var(--info-bg);
  color: var(--info);
  border-color: rgba(99, 102, 241, 0.3);
}

.tag-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.875rem;
  line-height: 1;
  transition: opacity var(--transition);
}
.tag-remove:hover { opacity: 1; }

/* ─── Tag Input ─── */
.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: text;
  transition: border-color var(--transition);
}
.tag-input-wrapper:focus-within { border-color: var(--brand-secondary); }
.tag-input-field {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
  min-width: 100px;
  flex: 1;
  padding: 2px 4px;
}

/* ─── PDF Viewer ─── */
.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pdf-filename {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pdf-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ─── Update Log / Audit ─── */
.update-log-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 0.8125rem;
}
.update-log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-secondary);
  margin-top: 6px;
  flex-shrink: 0;
}
.update-log-text { flex: 1; color: var(--text-secondary); }
.update-log-who { font-weight: 600; color: var(--text-primary); }
.update-log-when { color: var(--text-muted); font-size: 0.75rem; margin-top: 2px; }

/* ─── Confirmation Dialog ─── */
.confirm-dialog .modal {
  max-width: 400px;
  text-align: center;
}
.confirm-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}
.confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.confirm-msg {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: var(--space-xl);
}

/* ─── Filters Bar ─── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.filter-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.filter-chip.active {
  background: linear-gradient(135deg, rgba(10,36,99,0.55) 0%, rgba(62,146,204,0.35) 100%);
  border-color: rgba(62,146,204,0.65);
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(62,146,204,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  font-weight: 700;
}

/* ─── Logo Upload ─── */
.logo-preview {
  width: 160px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color var(--transition);
  background: var(--bg-input);
}
.logo-preview:hover { border-color: var(--brand-secondary); }
.logo-preview img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.logo-preview input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}

/* ─── Color Picker ─── */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.color-swatch {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  cursor: pointer;
  overflow: hidden;
}
.color-swatch input[type="color"] {
  width: 100%; height: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  position: absolute;
}
.color-swatch-display {
  width: 100%; height: 100%;
  border-radius: var(--radius-sm);
}

/* ─── Status Indicator ─── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.active   { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.inactive { background: var(--text-muted); }
.status-dot.warning  { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.status-dot.error    { background: var(--error); box-shadow: 0 0 6px var(--error); }

/* ─── Loading Screen ─── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-logo {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-lg);
  animation: floatLogo 2s ease-in-out infinite;
}
.loading-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-lg);
}
.loading-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  animation: loading 1.5s ease-in-out infinite;
}
@keyframes loading {
  0% { width: 0%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0%; margin-left: 100%; }
}

/* ─── First Access Overlay ─── */
.first-access-modal {
  max-width: 600px;
}

/* ─── Print / Export button ─── */
.export-menu {
  position: relative;
}
.export-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  min-width: 180px;
  overflow: hidden;
  animation: slideUp 200ms ease;
}
.export-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.export-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ─── Responsive Adjustments ─── */
@media (max-width: 640px) {
  .prontuario-header { flex-direction: column; text-align: center; }
  .prontuario-meta { justify-content: center; }
  .calendar-grid { gap: 1px; }
  .calendar-day { font-size: 0.75rem; }
}
/* ─── Skeleton Screens (Micro-interações) ─── */
@keyframes skeleton-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

.skeleton-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-input);
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  background: var(--bg-input);
  border-radius: 4px;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.medium {
  width: 70%;
}

/* ═══════════════════════════════════════════════════════════
   REPASSE AUTOMÁTICO — barra de rateio no formulário de
   orçamento. A matemática vive em js/modules/repasse-engine.js,
   o mesmo motor da calculadora pública em /calculadora.html.
   ═══════════════════════════════════════════════════════════ */

.repasse-bar {
  border: 1px solid var(--gold-border);
  background: var(--gold-dim);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.repasse-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.repasse-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-accent);
}

.repasse-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  margin: 0;
}

.repasse-hint {
  font-size: 11px;
  color: var(--text-secondary);
}

.repasse-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 12px;
}

.repasse-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 0;
}

.repasse-field-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repasse-pct {
  width: 58px;
  flex: none;
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 7px;
}

.repasse-pct:focus {
  outline: none;
  border-color: var(--border-accent);
}

.repasse-pct:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.repasse-pct-sign {
  flex: none;
  color: var(--text-muted);
  font-size: 11px;
}

.repasse-note {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--gold-border);
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.repasse-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.repasse-link:hover { color: var(--gold-pale); }

.repasse-saved { color: var(--success); }

/* Campo cujo valor é derivado do honorário — sinaliza que não se
   digita ali enquanto o rateio automático estiver ligado. */
.budget-calc.is-derived {
  background: var(--bg-input);
  color: var(--text-accent);
  border-style: dashed;
  cursor: default;
}

/* Líquido estimado do cirurgião no orçamento. Valor derivado, nunca
   persistido — as alíquotas vivem em adminProfiles.repasseTemplate. */
.repasse-liquido {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--gold-border);
  background: var(--gold-dim);
  border-radius: 6px;
}

.repasse-liquido .rl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.repasse-liquido .rl-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-accent);
}

.repasse-liquido .rl-note { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

.repasse-liquido .rl-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gold-pale);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   GATE VISÍVEL — recurso de outro plano aparece com cadeado em
   vez de sumir. Item escondido faz o cliente concluir que o
   produto não faz aquilo, e não que ele não assinou o tier.
   ═══════════════════════════════════════════════════════════ */

.nav-item-locked { opacity: 0.45; }
.nav-item-locked:hover { opacity: 0.75; background: var(--gold-dim); }
.nav-item-locked .nav-label { display: flex; align-items: center; gap: 7px; }

.nav-lock, .tab-lock {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--gold);
}
.nav-lock svg, .tab-lock svg { width: 12px; height: 12px; }

.tab-btn-locked {
  opacity: 0.5;
  border-style: dashed;
}
.tab-btn-locked:hover { opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════
   ONBOARDING DO PACIENTE — passo a passo do primeiro acesso.
   Existe para dar contexto ANTES do prompt de notificação do
   navegador: pedido sem explicação é negado e queima a chance.
   ═══════════════════════════════════════════════════════════ */

.onb-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-overlay, rgba(15, 15, 40, 0.65));
  backdrop-filter: blur(3px);
  animation: onbFade 0.22s ease;
}
@keyframes onbFade { from { opacity: 0; } to { opacity: 1; } }

.onb-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg, 0 24px 60px rgba(0, 0, 0, 0.22));
  padding: 26px 26px 22px;
}

.onb-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.onb-dot {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.25s;
}
.onb-dot.is-feito { background: var(--brand-secondary); opacity: 0.5; }
.onb-dot.is-atual { background: var(--brand-secondary); }

.onb-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.onb-titulo {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
  line-height: 1.25;
}
.onb-texto {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
}
.onb-nota {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 18px;
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm, 6px);
}
.onb-nota strong { color: var(--text-primary); }

.onb-lista { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 9px; }
.onb-lista li { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.5; }
.onb-lista strong { color: var(--text-primary); }

.onb-campo { display: grid; gap: 6px; margin-bottom: 18px; }
.onb-campo label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.onb-campo input {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-input);
  color: var(--text-primary);
  width: 100%;
}
.onb-campo input:focus {
  outline: none;
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.onb-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.onb-acoes .btn { flex: 1 1 auto; }
.onb-pular {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 10px 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.onb-pular:hover { color: var(--text-secondary); }

@media (prefers-reduced-motion: reduce) {
  .onb-overlay { animation: none; }
}


/* ─── Selo "Retorno" (lista de atendimento do dia) ───
   O selo ficava DENTRO do <h4> do nome, que tem overflow:hidden para
   truncar nomes longos — e o ícone de 15px estourava a altura da pílula
   de 0.7rem. Resultado: pílula cortada e a palavra "Retorno" vazando
   por baixo (relato de 16/09/2026). Agora o nome trunca sozinho e o
   selo é um item irmão, que não encolhe. */
.badge-retorno {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.badge-retorno .icon { width: 11px; height: 11px; vertical-align: 0; }
