/*
 * style.css
 * Arquivo de entrada mantido para compatibilidade com todas as telas PHP.
 * O CSS principal foi modularizado em assets/css/ para facilitar manutenção.
 * Ordem dos imports preserva a cascata original.
 */

@import url('css/00-base-layout.css');
@import url('css/10-pacientes-prontuario.css');
@import url('css/20-materiais-teleconsulta.css');
@import url('css/30-ux-agenda-financeiro.css');
@import url('css/40-publico-login-agendamento.css');
@import url('css/50-portal-financeiro-mobile.css');
@import url('css/60-integracoes-teleconsulta.css');
@import url('css/70-clinico-dashboard.css');
@import url('css/80-portal-tarefas-timeline.css');
@import url('css/90-fixes-mobile-final.css');
@import url('css/95-financeiro-premium.css');


/* Licenciamento MD Sistemas */
.license-hero{align-items:center}.license-status{min-width:220px;border-radius:28px;padding:22px;background:#fff;box-shadow:0 16px 36px rgba(16,49,77,.10);border:1px solid rgba(16,49,77,.08);display:grid;gap:4px}.license-status small{font-weight:900;color:#607086}.license-status strong{font-size:2rem;color:#10314d}.license-status span{font-weight:900}.license-status.on{background:#ecfff6;border-color:#b8efd4}.license-status.trial{background:#fff8e6;border-color:#ffe0a3}.license-status.blocked{background:#fff1f1;border-color:#ffcaca}.license-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.license-plan-card{display:block;background:#fff;border:2px solid rgba(16,49,77,.10);border-radius:22px;padding:18px;cursor:pointer;min-height:150px}.license-plan-card input{margin-bottom:10px}.license-plan-card strong{display:block;color:#10314d;font-size:1.05rem;margin-bottom:8px}.license-plan-card span{display:block;color:#607086;font-weight:800;line-height:1.45}.license-actions .danger{background:#f05252!important;color:#fff!important}@media(max-width:720px){.license-plan-grid{grid-template-columns:1fr}.license-status{width:100%;min-width:0}.license-actions{display:grid;grid-template-columns:1fr;gap:10px}.license-actions .btn{width:100%}}


.md-license-corner{position:static;max-width:none;margin:10px 12px 0;display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:16px;background:rgba(255,248,230,.96);border:1px solid rgba(202,129,20,.22);box-shadow:0 10px 24px rgba(16,49,77,.10);color:#8a5b0a;font-size:.78rem;font-weight:900;line-height:1.25;backdrop-filter:blur(8px)}
.md-license-corner span{font-size:1rem;line-height:1}.md-license-corner strong{font-size:.78rem;font-weight:900}
@media(max-width:720px){.md-license-corner{margin:8px 10px 84px;padding:8px 10px;border-radius:14px;font-size:.72rem}.md-license-corner strong{font-size:.72rem}}

.patient-card-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.patient-card-top-actions .treatment-badge{max-width:100%;white-space:normal}
.patient-open-top{min-height:34px;padding:8px 12px!important;font-size:.78rem;white-space:nowrap}
@media(max-width:720px){.patient-card-top-actions{justify-content:flex-start;width:100%;margin-top:10px}.patient-open-top{width:auto}}
.clinical-shortcut-primary{border-color:rgba(22,130,95,.26)!important;background:linear-gradient(135deg,rgba(236,255,248,.94),rgba(255,255,255,.92))!important}
.clinical-shortcut-primary strong{color:#147052!important}
#evolucao-terapeutica{scroll-margin-top:24px}


/* Melhorias visuais para avisos de licença e CTA de suporte */
.md-license-corner{
  position:static;
  max-width:none;
  margin:10px 12px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding:14px 16px;
  border-radius:20px;
  background:linear-gradient(135deg,#fff8e6 0%,#ffffff 100%);
  border:1px solid rgba(202,129,20,.18);
  box-shadow:0 16px 36px rgba(16,49,77,.10);
  color:#8a5b0a;
  backdrop-filter:blur(8px);
}

.md-license-corner-copy{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:220px;
  flex:1 1 240px;
}
.md-license-corner-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#ffe4a3,#ffd56c);
  font-size:1.15rem;
  flex:0 0 auto;
}
.md-license-corner strong{
  display:block;
  font-size:.92rem;
  font-weight:950;
  line-height:1.2;
}
.md-license-corner small{
  display:block;
  margin-top:3px;
  color:#9a6a17;
  font-size:.78rem;
  font-weight:800;
  line-height:1.35;
}
.md-license-corner-btn,
.md-support-alert-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:11px 16px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  white-space:nowrap;
  color:#fff;
  background:linear-gradient(135deg,#25D366,#139b4a);
  box-shadow:0 12px 24px rgba(19,155,74,.22);
}
.md-support-alert{
  display:grid;
  gap:10px;
}
.md-support-alert strong{
  display:block;
  color:#7b5608;
  font-size:1rem;
}
.md-support-alert span{
  color:#8a6a28;
  font-weight:800;
  line-height:1.45;
}
.md-alert-rich{
  padding:15px 16px;
}
@media(max-width:720px){
  .md-license-corner{
    margin:8px 10px 84px;
    padding:12px 13px;
    border-radius:18px;
  }
  .md-license-corner-copy{
    flex-basis:100%;
  }
  .md-license-corner-btn,
  .md-support-alert-btn{
    width:100%;
  }
}

/* Ajuste compacto do aviso de licença na lateral */
.md-license-corner{
  margin:10px 12px 0 !important;
  padding:10px 12px !important;
  border-radius:18px !important;
  display:grid !important;
  grid-template-columns:32px 1fr !important;
  align-items:center !important;
  gap:10px !important;
  background:linear-gradient(135deg,#ffeab8 0%,#fff7df 100%) !important;
  box-shadow:0 10px 24px rgba(16,49,77,.10) !important;
}
.md-license-corner-icon{
  width:32px !important;
  height:32px !important;
  border-radius:10px !important;
  font-size:.95rem !important;
}
.md-license-corner-copy{
  min-width:0 !important;
  display:grid !important;
  gap:4px !important;
}
.md-license-corner strong{
  font-size:.78rem !important;
  line-height:1.15 !important;
  margin:0 !important;
  text-transform:uppercase;
}
.md-license-corner small{
  display:none !important;
}
.md-license-corner-btn{
  min-height:auto !important;
  padding:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#7a4d00 !important;
  font-size:.76rem !important;
  font-weight:900 !important;
  text-decoration:underline !important;
  justify-content:flex-start !important;
  white-space:normal !important;
}
@media(max-width:720px){
  .md-license-corner{
    margin:8px 10px 84px !important;
    grid-template-columns:30px 1fr !important;
  }
  .md-license-corner strong{
    font-size:.74rem !important;
  }
  .md-license-corner-btn{
    width:auto !important;
    font-size:.72rem !important;
  }
}


/* Refinos mobile para o aviso de licença na lateral */
@media(max-width:720px){
  .md-license-corner{
    max-width:280px !important;
    width:auto !important;
    margin:8px auto 10px !important;
    padding:8px 10px !important;
    border-radius:16px !important;
    grid-template-columns:26px 1fr !important;
    gap:8px !important;
    align-items:center !important;
  }
  .md-license-corner-icon{
    width:26px !important;
    height:26px !important;
    border-radius:8px !important;
    font-size:.82rem !important;
  }
  .md-license-corner-copy{
    gap:2px !important;
  }
  .md-license-corner strong{
    font-size:.68rem !important;
    line-height:1.1 !important;
    letter-spacing:0 !important;
  }
  .md-license-corner-btn{
    font-size:.68rem !important;
    line-height:1.1 !important;
  }
}
@media(max-width:420px){
  .md-license-corner{
    max-width:250px !important;
    padding:7px 9px !important;
    grid-template-columns:24px 1fr !important;
  }
  .md-license-corner-icon{
    width:24px !important;
    height:24px !important;
    font-size:.76rem !important;
  }
  .md-license-corner strong,
  .md-license-corner-btn{
    font-size:.64rem !important;
  }
}


/* Mini badge discreto para aviso de licença */
.md-license-badge{
  width:fit-content !important;
  max-width:220px !important;
  margin:10px auto 0 !important;
  padding:7px 10px !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  border-radius:999px !important;
  background:rgba(255,244,214,.92) !important;
  border:1px solid rgba(212,170,83,.35) !important;
  box-shadow:0 8px 18px rgba(16,49,77,.08) !important;
  backdrop-filter:blur(6px) !important;
}
.md-license-badge .md-license-corner-icon{
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  border-radius:999px !important;
  font-size:.72rem !important;
  background:linear-gradient(135deg,#ffd56c,#ffbf47) !important;
}
.md-license-badge .md-license-corner-copy{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
  flex:none !important;
}
.md-license-badge strong{
  font-size:.68rem !important;
  line-height:1 !important;
  margin:0 !important;
  text-transform:uppercase;
  color:#6b4b09 !important;
  white-space:nowrap !important;
}
.md-license-badge .md-license-corner-btn{
  min-height:auto !important;
  padding:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#8b5e0a !important;
  font-size:.68rem !important;
  line-height:1 !important;
  font-weight:900 !important;
  text-decoration:underline !important;
  white-space:nowrap !important;
}
@media(min-width:721px){
  .md-license-badge{
    margin:12px auto 0 !important;
  }
}
@media(max-width:720px){
  .md-license-badge{
    max-width:210px !important;
    margin:8px auto 12px !important;
    padding:6px 9px !important;
    gap:7px !important;
  }
  .md-license-badge .md-license-corner-icon{
    width:22px !important;
    height:22px !important;
    min-width:22px !important;
    font-size:.68rem !important;
  }
  .md-license-badge strong,
  .md-license-badge .md-license-corner-btn{
    font-size:.62rem !important;
  }
  .md-license-badge .md-license-corner-copy{
    gap:6px !important;
  }
}
@media(max-width:420px){
  .md-license-badge{
    max-width:190px !important;
    padding:6px 8px !important;
  }
  .md-license-badge strong,
  .md-license-badge .md-license-corner-btn{
    font-size:.58rem !important;
  }
}


/* Plugins gratuitos aplicados: FullCalendar, Chart.js e QR Code */
.agenda-fullcalendar-panel{padding:16px;overflow:hidden}.fc-premium-head{gap:10px}.fc-mobile-help{margin:0 0 12px;color:#607287;font-weight:800}.agenda-fullcalendar{background:rgba(255,255,255,.78);border:1px solid rgba(16,42,71,.08);border-radius:24px;padding:12px;overflow:hidden}.agenda-fullcalendar .fc-toolbar-title{font-size:1.25rem;font-weight:950;color:#06355e}.agenda-fullcalendar .fc-button{border:0!important;border-radius:14px!important;background:linear-gradient(135deg,var(--primary,#1565c0),var(--secondary,#2dd4bf))!important;font-weight:900!important;box-shadow:none!important}.agenda-fullcalendar .fc-button.fc-button-active{filter:brightness(.92)}.agenda-fullcalendar .fc-daygrid-day{border-color:rgba(16,42,71,.07)!important}.agenda-fullcalendar .fc-event{border:0!important;border-radius:12px!important;padding:3px 6px!important;font-weight:850!important}.agenda-fullcalendar .fc-status-confirmado{background:rgba(34,197,94,.92)!important}.agenda-fullcalendar .fc-status-pendente,.agenda-fullcalendar .fc-status-agendado{background:rgba(245,158,11,.92)!important}.agenda-fullcalendar .fc-status-finalizado,.agenda-fullcalendar .fc-status-atendido{background:rgba(37,99,235,.92)!important}.agenda-fullcalendar .fc-status-cancelado,.agenda-fullcalendar .fc-status-faltou{background:rgba(239,68,68,.92)!important}.agenda-fc-preview{margin-top:12px;position:relative;display:grid;gap:5px}.agenda-fc-preview[hidden]{display:none}.agenda-fc-preview button{position:absolute;right:12px;top:10px;border:0;background:#fff;border-radius:99px;width:32px;height:32px;font-weight:900}.agenda-fc-preview strong{font-size:1.1rem;color:#06355e}.dashboard-plugin-charts{margin-top:18px}.plugin-chart-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.plugin-chart-grid article{min-height:255px;background:rgba(255,255,255,.78);border:1px solid rgba(16,42,71,.08);border-radius:22px;padding:14px;display:grid;grid-template-rows:auto 1fr;gap:10px}.plugin-chart-grid article span{font-weight:950;color:#06355e}.plugin-chart-grid canvas{width:100%!important;height:205px!important}.qr-hero{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.qr-hero h1{margin:4px 0;font-size:1.8rem;color:#06355e}.qr-hero p{margin:0;color:#607287;font-weight:800}.qr-hero-icon{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary,#1565c0),var(--secondary,#2dd4bf));color:#fff;font-weight:950}.qr-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:14px}.qr-reader-card,.qr-side{padding:16px}.qr-reader-box{min-height:320px;border-radius:22px;overflow:hidden;background:linear-gradient(135deg,#f8fbff,#eef7ff);border:1px dashed rgba(16,42,71,.18)}.qr-reader-status{margin-top:10px;color:#607287;font-weight:900}.qr-side{display:grid;align-content:start;gap:10px}.qr-side h2{margin:0 0 4px;color:#06355e}.qr-side>a{display:block;text-decoration:none;color:#06355e;font-weight:950;background:rgba(255,255,255,.74);border:1px solid rgba(16,42,71,.08);border-radius:16px;padding:12px}.qr-manual-box{display:grid;gap:8px;margin-top:8px}.qr-manual-box label{font-size:.8rem;font-weight:950;color:#607287;text-transform:uppercase}.qr-manual-box input{width:100%;border:1px solid rgba(16,42,71,.1);border-radius:16px;padding:12px;font:inherit;font-weight:800}
@media(max-width:980px){.plugin-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.qr-layout{grid-template-columns:1fr}.qr-hero{align-items:flex-start;flex-direction:column}}
@media(max-width:720px){.agenda-fullcalendar-panel{padding:10px}.fc-premium-head{display:grid!important;grid-template-columns:1fr!important}.agenda-fullcalendar{padding:8px;border-radius:18px}.agenda-fullcalendar .fc-toolbar{display:grid!important;gap:8px!important}.agenda-fullcalendar .fc-toolbar-chunk{display:flex!important;justify-content:center!important;flex-wrap:wrap!important}.agenda-fullcalendar .fc-toolbar-title{font-size:1rem}.agenda-fullcalendar .fc-button{padding:7px 9px!important;font-size:.78rem!important}.plugin-chart-grid{grid-template-columns:1fr}.plugin-chart-grid article{min-height:230px;padding:12px}.plugin-chart-grid canvas{height:180px!important}.dashboard-plugin-charts{margin-top:12px}.qr-reader-box{min-height:260px}.qr-hero h1{font-size:1.35rem}.qr-hero,.qr-reader-card,.qr-side{padding:14px}.page-qr-leitor .container{padding-bottom:105px!important}}

/* Ajuste visual: gráficos compactos e agenda nativa sem CDN */
.dashboard-visual-clean{padding:18px!important;background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(248,251,255,.82))!important;border:1px solid rgba(16,42,71,.08)!important;box-shadow:0 14px 34px rgba(16,42,71,.07)!important;overflow:hidden!important}
.visual-clean-head{align-items:center!important;margin-bottom:14px!important}.visual-clean-head strong{font-size:1.15rem!important;color:#06355e!important}.visual-clean-head small{display:block;color:#607287;font-weight:800;margin-top:2px}.visual-actions{display:flex!important;gap:10px!important;flex-wrap:wrap!important}.visual-actions a{border-radius:999px!important;padding:10px 14px!important;background:#fff!important;border:1px solid rgba(16,42,71,.10)!important;color:#07518f!important;text-decoration:none!important;font-weight:950!important;box-shadow:0 8px 18px rgba(16,42,71,.06)!important}
.visual-chart-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}.visual-chart-card{min-height:142px!important;background:linear-gradient(135deg,#fff,rgba(245,251,255,.78))!important;border:1px solid rgba(16,42,71,.08)!important;border-radius:24px!important;padding:14px!important;display:grid!important;grid-template-columns:1fr 92px!important;align-items:center!important;gap:12px!important}.visual-chart-card span{font-size:.82rem!important;letter-spacing:.02em!important;text-transform:uppercase!important;color:#607287!important;font-weight:950!important}.visual-chart-card strong{display:block!important;font-size:2.15rem!important;line-height:1!important;color:#06355e!important;margin:6px 0 2px!important}.visual-chart-card small{color:#73869a!important;font-weight:850!important}.visual-chart-card canvas{width:92px!important;height:92px!important;max-width:92px!important;max-height:92px!important}
.agenda-native-panel{padding:16px!important;background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(248,251,255,.86))!important;border:1px solid rgba(16,42,71,.08)!important;border-radius:30px!important;box-shadow:0 16px 38px rgba(16,42,71,.08)!important}.agenda-native-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:12px!important}.agenda-native-head h2{margin:0!important;color:#06355e!important}.agenda-native-head p{margin:2px 0 0!important;color:#607287!important;font-weight:850!important}.agenda-native-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 12px}.agenda-native-nav a,.agenda-native-nav strong{background:#fff;border:1px solid rgba(16,42,71,.08);border-radius:999px;padding:10px 14px;text-decoration:none;font-weight:950;color:#07518f}.agenda-native-nav strong{color:#06355e}.agenda-native-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}.agenda-native-kpis span{background:linear-gradient(135deg,#eef8ff,#fff);border:1px solid rgba(16,42,71,.07);border-radius:18px;padding:12px;text-align:center;color:#607287;font-weight:900}.agenda-native-kpis b{display:block;color:#06355e;font-size:1.55rem;line-height:1}.agenda-native-weekdays,.agenda-native-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.agenda-native-weekdays span{text-align:center;color:#607287;font-weight:950;font-size:.78rem;text-transform:uppercase}.agenda-native-day{min-height:134px;background:#fff;border:1px solid rgba(16,42,71,.08);border-radius:20px;padding:10px;overflow:hidden}.agenda-native-day.muted{background:transparent;border:0}.agenda-native-day.today{outline:3px solid rgba(45,212,191,.30);background:linear-gradient(135deg,#f0fffb,#fff)}.agenda-native-date{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.agenda-native-date strong{font-size:1rem;color:#06355e}.agenda-native-date small{min-width:24px;height:24px;border-radius:99px;background:#07518f;color:#fff;display:grid;place-items:center;font-weight:950}.agenda-native-events{display:grid;gap:6px}.agenda-native-event{display:grid;grid-template-columns:auto 1fr;gap:6px;align-items:center;text-decoration:none;border-radius:12px;padding:7px 8px;background:#f4f8fb;color:#06355e;font-weight:900;font-size:.78rem}.agenda-native-event b{color:#07518f}.agenda-native-event span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agenda-native-event.confirmado{background:#eafaf2}.agenda-native-event.pendente,.agenda-native-event.agendado{background:#fff7e8}.agenda-native-event.cancelado,.agenda-native-event.faltou{background:#fff0f0}.agenda-native-events em{font-style:normal;color:#607287;font-weight:900;font-size:.78rem;padding-left:4px}
@media(max-width:980px){.visual-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.agenda-native-weekdays{display:none}.agenda-native-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.agenda-native-day.muted{display:none}}
@media(max-width:720px){.dashboard-visual-clean{padding:14px!important;margin-top:12px!important}.visual-clean-head{display:grid!important;gap:10px!important}.visual-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.visual-actions a{text-align:center!important;padding:11px!important}.visual-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.visual-chart-card{min-height:116px!important;border-radius:20px!important;padding:12px!important;grid-template-columns:1fr 58px!important;gap:8px!important}.visual-chart-card span{font-size:.7rem!important}.visual-chart-card strong{font-size:1.75rem!important}.visual-chart-card small{font-size:.72rem!important}.visual-chart-card canvas{width:58px!important;height:58px!important;max-width:58px!important;max-height:58px!important}.agenda-native-panel{padding:12px!important;border-radius:24px!important}.agenda-native-head{display:grid!important;grid-template-columns:1fr!important;text-align:left!important}.agenda-native-head .btn{width:100%;text-align:center}.agenda-native-nav{display:grid;grid-template-columns:1fr;gap:8px}.agenda-native-nav a,.agenda-native-nav strong{text-align:center;padding:11px}.agenda-native-kpis{grid-template-columns:repeat(3,1fr);gap:8px}.agenda-native-kpis span{padding:9px 6px;font-size:.78rem}.agenda-native-kpis b{font-size:1.3rem}.agenda-native-grid{grid-template-columns:1fr;gap:10px}.agenda-native-day{min-height:auto;border-radius:18px}.agenda-native-day:not(:has(.agenda-native-event)){display:none}.agenda-native-event{font-size:.84rem}.page-agenda .container{padding-bottom:110px!important}}


/* QR Codes na ficha do paciente */
.paciente-qr-panel{margin:14px 0 18px!important;padding:18px!important;background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(246,252,255,.86))!important;border:1px solid rgba(16,42,71,.08)!important;border-radius:28px!important;box-shadow:0 14px 34px rgba(16,42,71,.07)!important}
.paciente-qr-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.paciente-qr-head h2{margin:0;color:#06355e;font-size:1.25rem}.paciente-qr-head p{margin:4px 0 0;color:#607287;font-weight:850}.paciente-qr-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.paciente-qr-card{display:grid;grid-template-columns:128px 1fr;gap:12px;align-items:center;background:#fff;border:1px solid rgba(16,42,71,.08);border-radius:22px;padding:12px;min-width:0}.paciente-qr-box{width:128px;height:128px;border-radius:18px;background:#f8fbff;border:1px dashed rgba(16,42,71,.18);display:grid;place-items:center;overflow:hidden}.paciente-qr-box img,.paciente-qr-box canvas{max-width:112px!important;max-height:112px!important}.paciente-qr-box small{color:#607287;font-size:.72rem;font-weight:900;text-align:center;padding:8px}.paciente-qr-card strong{display:block;color:#06355e;font-size:1rem;font-weight:1000;margin-bottom:4px}.paciente-qr-card small{display:block;color:#607287;font-weight:820;line-height:1.35}.paciente-qr-card a{display:inline-flex;margin-top:8px;text-decoration:none;color:#07518f;font-weight:950}.paciente-qr-note{margin:12px 0 0;color:#607287;font-weight:850;font-size:.9rem}
@media(max-width:980px){.paciente-qr-grid{grid-template-columns:1fr}.paciente-qr-card{grid-template-columns:116px 1fr}.paciente-qr-box{width:116px;height:116px}.paciente-qr-box img,.paciente-qr-box canvas{max-width:104px!important;max-height:104px!important}}
@media(max-width:720px){.paciente-qr-panel{padding:14px!important;border-radius:24px!important}.paciente-qr-head{display:grid;grid-template-columns:1fr}.paciente-qr-head .btn{width:100%;text-align:center}.paciente-qr-grid{gap:10px}.paciente-qr-card{grid-template-columns:92px 1fr;border-radius:18px;padding:10px}.paciente-qr-box{width:92px;height:92px;border-radius:15px}.paciente-qr-box img,.paciente-qr-box canvas{max-width:82px!important;max-height:82px!important}.paciente-qr-head h2{font-size:1.1rem}.paciente-qr-card strong{font-size:.92rem}.paciente-qr-card small,.paciente-qr-note{font-size:.78rem}}

/* Entrega 07/07: acabamento do fluxo do doutor */
.atendimento-page .clinical-next-actions{display:none!important}
.paciente-qr-panel{padding:12px!important;border-radius:22px!important;margin:10px 0 14px!important}
.paciente-qr-head{margin-bottom:10px!important}
.paciente-qr-grid{gap:9px!important}
.paciente-qr-card{grid-template-columns:120px minmax(0,1fr)!important;gap:10px!important;padding:8px!important;border-radius:17px!important}
.paciente-qr-box{width:120px!important;height:120px!important;border-radius:14px!important;background:#fff!important}
.paciente-qr-box img,.paciente-qr-box canvas{max-width:112px!important;max-height:112px!important;width:112px!important;height:112px!important}
.paciente-qr-card strong{font-size:.92rem!important;margin-bottom:2px!important}
.paciente-qr-card small{font-size:.76rem!important;line-height:1.25!important}
.paciente-qr-card a{margin-top:5px!important;font-size:.78rem!important}
.paciente-qr-note{margin-top:8px!important;font-size:.78rem!important}
@media(max-width:720px){
  .paciente-qr-panel{padding:10px!important;border-radius:18px!important}
  .paciente-qr-card{grid-template-columns:120px minmax(0,1fr)!important;padding:8px!important}
  .paciente-qr-box{width:120px!important;height:120px!important}
}
@media(max-width:430px){
  .paciente-qr-card{grid-template-columns:1fr!important}
  .paciente-qr-box{margin:0 auto!important}
}

body.dashboard-main.dashboard-role-fono .doctor-clinical-grid{grid-template-columns:minmax(0,1fr) minmax(280px,.9fr)!important}
body.dashboard-main.dashboard-role-fono .doctor-status-panel{display:none!important}
body.dashboard-main.dashboard-role-fono .doctor-production-panel{min-width:0!important}
.doctor-production-table-wrap{display:block!important;overflow:auto!important}
.doctor-production-table{width:100%!important;border-collapse:separate!important;border-spacing:0 8px!important}
.doctor-production-table th{padding:0 10px 4px!important;text-align:left!important;color:#64748b!important;font-size:.72rem!important;text-transform:uppercase!important;letter-spacing:.04em!important}
.doctor-production-table td{padding:11px 10px!important;background:#f8fbff!important;border-top:1px solid rgba(20,42,70,.07)!important;border-bottom:1px solid rgba(20,42,70,.07)!important;font-weight:900!important;color:#26364c!important}
.doctor-production-table td:first-child{border-left:1px solid rgba(20,42,70,.07)!important;border-radius:14px 0 0 14px!important}
.doctor-production-table td:last-child{border-right:1px solid rgba(20,42,70,.07)!important;border-radius:0 14px 14px 0!important;color:#64748b!important;font-size:.78rem!important}
.doctor-production-table a{text-decoration:none!important;color:#4b5fd7!important}
body.dashboard-main.dashboard-role-fono .doctor-production-mobile-cards{display:none!important}
@media(max-width:760px){
  .doctor-production-table-wrap{display:none!important}
  body.dashboard-main.dashboard-role-fono .doctor-production-mobile-cards{display:grid!important}
  body.dashboard-main.dashboard-role-fono .doctor-clinical-grid{grid-template-columns:1fr!important}
}

.agenda-cards-head{align-items:center!important}
.agenda-modern-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.agenda-modern-summary article{padding:14px;border-radius:18px;background:linear-gradient(135deg,#fff,#f5fbff);border:1px solid rgba(16,42,71,.08);box-shadow:0 10px 24px rgba(16,42,71,.05)}
.agenda-modern-summary span,.agenda-modern-summary small{display:block;color:#607287;font-weight:900;font-size:.78rem}
.agenda-modern-summary strong{display:block;margin:4px 0 2px;color:#06355e;font-size:1.8rem;line-height:1}
.agenda-date-navigation{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;margin:12px 0;padding:12px;border-radius:20px;background:#fff;border:1px solid rgba(16,42,71,.08)}
.agenda-date-navigation a{display:flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border-radius:999px;background:#f4f8fb;color:#07518f;text-decoration:none;font-weight:950}
.agenda-date-navigation div{text-align:center}
.agenda-date-navigation span,.agenda-date-navigation small{display:block;color:#607287;font-weight:900;font-size:.78rem}
.agenda-date-navigation strong{display:block;color:#06355e;font-size:1.25rem;margin:2px 0}
.agenda-day-strip{display:flex;gap:8px;overflow:auto;padding:4px 2px 12px;scroll-snap-type:x proximity}
.agenda-day-strip a{min-width:68px;scroll-snap-align:start;display:grid;gap:3px;place-items:center;text-decoration:none;padding:10px 8px;border-radius:18px;background:#fff;border:1px solid rgba(16,42,71,.08);color:#06355e}
.agenda-day-strip a.empty{opacity:.58}
.agenda-day-strip a.today{border-color:rgba(45,212,191,.45)}
.agenda-day-strip a.active{background:linear-gradient(135deg,var(--primary,#1565c0),var(--secondary,#2dd4bf));color:#fff;opacity:1;box-shadow:0 12px 24px rgba(21,101,192,.18)}
.agenda-day-strip span{font-size:.7rem;font-weight:950;text-transform:uppercase}
.agenda-day-strip strong{font-size:1.25rem;line-height:1}
.agenda-day-strip small{min-width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:rgba(16,42,71,.08);font-weight:950}
.agenda-day-strip a.active small{background:rgba(255,255,255,.22)}
.agenda-selected-day-cards{display:grid;gap:10px;margin-top:4px}
.agenda-appointment-card{display:grid;grid-template-columns:112px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;border-radius:20px;background:#fff;border:1px solid rgba(16,42,71,.08);box-shadow:0 10px 24px rgba(16,42,71,.055)}
.agenda-card-time{display:grid;gap:8px;align-content:center}
.agenda-card-time strong{font-size:1.15rem;color:#07518f}
.agenda-card-main h3{margin:0;color:#06355e;font-size:1rem}
.agenda-card-main p{margin:3px 0 7px;color:#607287;font-weight:900}
.agenda-card-meta{display:flex;gap:8px;flex-wrap:wrap;color:#607287;font-size:.78rem;font-weight:850}
.agenda-card-meta span{display:inline-flex;align-items:center;gap:5px}
.agenda-card-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.agenda-empty-day{padding:22px;border-radius:20px;text-align:center;background:#fff;border:1px dashed rgba(16,42,71,.16);color:#607287;font-weight:900}
.agenda-empty-day strong,.agenda-empty-day small{display:block}
@media(max-width:900px){
  .agenda-modern-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .agenda-appointment-card{grid-template-columns:88px minmax(0,1fr)}
  .agenda-card-actions{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:640px){
  .agenda-modern-summary{grid-template-columns:1fr 1fr;gap:8px}
  .agenda-modern-summary article{padding:11px;border-radius:16px}
  .agenda-date-navigation{grid-template-columns:1fr;gap:8px}
  .agenda-appointment-card{grid-template-columns:1fr;padding:12px;border-radius:18px}
  .agenda-card-time{display:flex;align-items:center;justify-content:space-between}
  .agenda-card-actions .btn{flex:1;justify-content:center}
}

/* Fluxo do prontuario: acesso rapido e topo mobile mais leve */
.atendimento-hero-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important}
.atendimento-hero-actions .btn{min-height:34px!important;border-radius:999px!important;padding:8px 12px!important;font-size:.78rem!important}
.atendimento-page .clinical-at-a-glance{background:rgba(255,255,255,.96)!important;border-radius:20px!important}
.atendimento-page .clinical-at-a-glance .glance-notes span{background:#fff!important;border:1px solid rgba(20,42,70,.08)!important}
@media(max-width:720px){
  .atendimento-page .top{
    min-height:0!important;
    height:auto!important;
    padding:12px 14px!important;
    border-radius:0 0 24px 24px!important;
    display:grid!important;
    grid-template-columns:1fr auto!important;
    align-items:center!important;
    gap:10px!important;
  }
  .atendimento-page .top .brand{justify-content:flex-start!important;text-align:left!important;gap:10px!important;min-width:0!important}
  .atendimento-page .top .brand .logo-an,
  .atendimento-page .top .brand .logo-clinica{width:42px!important;height:42px!important;border-radius:15px!important;font-size:18px!important}
  .atendimento-page .top .brand strong{font-size:.95rem!important;line-height:1.05!important}
  .atendimento-page .top .brand span{display:none!important}
  .atendimento-page .top .top-actions,
  .atendimento-page .top nav{display:none!important}
  .atendimento-page .md-license-corner,
  .atendimento-page .md-license-badge{margin:0!important;max-width:142px!important;padding:7px 9px!important;border-radius:16px!important;font-size:.58rem!important;line-height:1.05!important}
  .atendimento-page .hero.patient-hero-with-photo{
    min-height:0!important;
    padding:14px!important;
    border-radius:22px!important;
    gap:12px!important;
    margin:10px 14px 10px!important;
  }
  .atendimento-page .patient-hero-main{display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;text-align:left!important}
  .atendimento-page .ficha-avatar{width:54px!important;height:54px!important;border-radius:18px!important}
  .atendimento-page .patient-hero-main h1{font-size:1.45rem!important;line-height:1.05!important;margin:0 0 5px!important;text-align:left!important}
  .atendimento-page .patient-hero-main p{font-size:.78rem!important;line-height:1.25!important;margin:0!important;text-align:left!important}
  .atendimento-page .atendimento-hero-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;margin-top:4px!important}
  .atendimento-page .atendimento-hero-actions .btn{width:100%!important;justify-content:center!important;padding:8px 9px!important;font-size:.7rem!important}
  .atendimento-page .hero-status-stack{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:7px!important;width:100%!important}
  .atendimento-page .hero-status-stack .status,
  .atendimento-page .hero-status-stack .treatment-badge{font-size:.72rem!important;padding:7px 10px!important}
  .atendimento-page .clinical-summary-grid{
    display:flex!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
    gap:8px!important;
    margin:8px 14px 10px!important;
    padding:1px 0 8px!important;
    scroll-snap-type:x proximity!important;
  }
  .atendimento-page .clinical-summary-grid::-webkit-scrollbar{display:none!important}
  .atendimento-page .clinical-summary-grid .clinical-mini{
    flex:0 0 128px!important;
    min-height:62px!important;
    height:62px!important;
    padding:9px!important;
    border-radius:16px!important;
    gap:8px!important;
    scroll-snap-align:start!important;
  }
  .atendimento-page .clinical-mini>span{width:32px!important;height:32px!important;border-radius:11px!important;font-size:15px!important}
  .atendimento-page .clinical-mini strong{font-size:1rem!important;line-height:1.05!important}
  .atendimento-page .clinical-mini small{font-size:.64rem!important;line-height:1.1!important}
  .atendimento-page .paciente-qr-panel{margin:8px 14px 10px!important}
  .atendimento-page .clinical-at-a-glance{
    margin:8px 14px 10px!important;
    padding:12px!important;
    border-radius:18px!important;
    gap:8px!important;
  }
  .atendimento-page .clinical-at-a-glance h2{font-size:1rem!important;margin:0 0 4px!important}
  .atendimento-page .clinical-at-a-glance p{font-size:.78rem!important;line-height:1.25!important;margin:0!important}
  .atendimento-page .clinical-at-a-glance .glance-notes{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  .atendimento-page .clinical-at-a-glance .glance-notes span{padding:8px 9px!important;font-size:.72rem!important;line-height:1.22!important;max-height:none!important}
}

/* Menu desktop: evita cortar itens quando o perfil libera muitas telas */
@media(min-width:1100px){
  body:not(.login-premium-body) header.top,
  body:not(.login-premium-body) .top{
    overflow:hidden!important;
  }
  body:not(.login-premium-body) .top .top-actions.main-menu{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:calc(100vh - 190px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-right:5px!important;
    margin-top:18px!important;
    scrollbar-width:thin!important;
    scrollbar-color:rgba(255,255,255,.55) rgba(255,255,255,.12)!important;
  }
  body:not(.login-premium-body) .top .top-actions.main-menu::-webkit-scrollbar{
    width:7px!important;
    display:block!important;
  }
  body:not(.login-premium-body) .top .top-actions.main-menu::-webkit-scrollbar-track{
    background:rgba(255,255,255,.12)!important;
    border-radius:999px!important;
  }
  body:not(.login-premium-body) .top .top-actions.main-menu::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.55)!important;
    border-radius:999px!important;
  }
  body.dashboard-role-admin:not(.login-premium-body) .top .top-actions.main-menu .btn{
    min-height:40px!important;
  }
  body:not(.login-premium-body) .top .md-license-badge,
  body:not(.login-premium-body) .top .md-license-corner{
    flex:0 0 auto!important;
    margin-top:10px!important;
  }
}

/* Equipe/Salas: evita micro-overflow desktop por grids e botões longos */
@media(min-width:1100px){
  body:has(.equipe-toolbar) .container{
    overflow-x:hidden!important;
  }
  body:has(.equipe-toolbar) .equipe-tabs-grid,
  body:has(.equipe-toolbar) .equipe-toolbar,
  body:has(.equipe-toolbar) .panel{
    max-width:100%!important;
  }
  body:has(.equipe-toolbar) input,
  body:has(.equipe-toolbar) select,
  body:has(.equipe-toolbar) textarea,
  body:has(.equipe-toolbar) .btn{
    min-width:0!important;
  }
}

/* Painel do doutor: mantem a producao clinica em cards tambem no desktop */
body.dashboard-main.dashboard-role-fono .doctor-production-table-wrap{
  display:none!important;
}
body.dashboard-main.dashboard-role-fono .doctor-production-mobile-cards{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
body.dashboard-main.dashboard-role-fono .doctor-production-mobile-cards a{
  min-height:118px!important;
}
@media(max-width:760px){
  body.dashboard-main.dashboard-role-fono .doctor-production-mobile-cards{
    grid-template-columns:1fr!important;
  }
}

/* Checkboxes em linha nao devem herdar largura de campos de formulario */
.check-line{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  width:auto!important;
  max-width:100%!important;
}
.check-line input[type="checkbox"]{
  width:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  margin:0!important;
}

/* Restauracao de backup: lista de copias internas por data */
.restore-backup-list{
  display:grid!important;
  gap:12px!important;
  margin-top:16px!important;
}
.restore-backup-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:14px!important;
  padding:16px!important;
  border:1px solid rgba(20,42,70,.09)!important;
  border-radius:20px!important;
  background:linear-gradient(135deg,#ffffff,#f7fbff)!important;
  box-shadow:0 12px 28px rgba(20,42,70,.07)!important;
}
.restore-backup-card strong{
  display:block!important;
  color:#10314d!important;
  font-size:1.05rem!important;
}
.restore-backup-card span,
.restore-backup-card small{
  display:block!important;
  color:#607086!important;
  font-weight:850!important;
  line-height:1.35!important;
}
.restore-backup-card small{
  margin-top:4px!important;
  font-size:.78rem!important;
  word-break:break-word!important;
}
@media(max-width:760px){
  .restore-backup-card{
    grid-template-columns:1fr!important;
  }
  .restore-backup-card .btn{
    width:100%!important;
  }
}

/* Prontuario: roteiro curto da sessao e modelos de evolucao */
.atendimento-page .clinical-session-guide{
  display:grid;
  gap:14px;
  padding:18px!important;
}
.atendimento-page .clinical-session-guide-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.atendimento-page .clinical-session-guide-head h2{
  margin:0;
  color:#06355e;
  font-size:1.18rem;
}
.atendimento-page .clinical-session-guide-head p{
  margin:4px 0 0;
  color:#607287;
  font-weight:850;
}
.atendimento-page .clinical-session-guide-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.atendimento-page .clinical-session-guide-grid article{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:8px 10px;
  align-items:center;
  padding:12px;
  border-radius:18px;
  background:linear-gradient(135deg,#ffffff,#f7fbff);
  border:1px solid rgba(16,42,71,.08);
}
.atendimento-page .clinical-session-guide-grid article span{
  grid-row:1/3;
  width:36px;
  height:36px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--primary,#0f4c7d),var(--primary-2,#ef4fa3));
  color:#fff;
  font-weight:1000;
}
.atendimento-page .clinical-session-guide-grid article strong{
  color:#102a47;
  font-weight:1000;
}
.atendimento-page .clinical-session-guide-grid article small{
  color:#607287;
  font-weight:820;
  line-height:1.3;
}
.atendimento-page .clinical-session-links,
.atendimento-page .evolution-template-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.atendimento-page .clinical-session-links a,
.atendimento-page .evolution-template-row button{
  border:1px solid rgba(16,42,71,.10);
  border-radius:999px;
  background:#fff;
  color:#07518f;
  font-weight:950;
  text-decoration:none;
  padding:9px 12px;
  box-shadow:0 8px 18px rgba(16,42,71,.05);
}
.atendimento-page .evolution-template-row{
  margin:10px 0 2px;
}
.atendimento-page .evolution-template-row button{
  cursor:pointer;
  font:inherit;
  color:#12324f;
}
.atendimento-page .evolution-template-row button:hover,
.atendimento-page .clinical-session-links a:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 22px rgba(16,42,71,.08);
}
@media(max-width:900px){
  .atendimento-page .clinical-session-guide-head{
    display:grid;
  }
  .atendimento-page .clinical-session-guide-head .btn{
    width:100%;
    justify-content:center;
  }
  .atendimento-page .clinical-session-guide-grid{
    grid-template-columns:1fr;
  }
}

/* Ficha do paciente no mobile: foco no atendimento, sem blocos auxiliares pesados. */
@media(max-width:720px){
  body.atendimento-page .hero.patient-hero-with-photo{
    overflow:hidden!important;
  }

  body.atendimento-page .patient-hero-main{
    display:grid!important;
    grid-template-columns:1fr!important;
    text-align:center!important;
    justify-items:center!important;
  }

  body.atendimento-page .patient-hero-main>div:not(.avatar){
    width:100%!important;
    min-width:0!important;
  }

  body.atendimento-page .patient-hero-main h1,
  body.atendimento-page .patient-hero-main p{
    text-align:center!important;
  }

  body.atendimento-page .atendimento-hero-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }

  body.atendimento-page .atendimento-hero-actions .btn,
  body.atendimento-page .atendimento-hero-actions .ficha-token-bubble{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    justify-content:center!important;
  }

  body.atendimento-page #qr-paciente,
  body.atendimento-page .clinical-session-guide{
    display:none!important;
  }

  body.atendimento-page .atendimento-hero-actions a[href="#qr-paciente"]{
    display:none!important;
  }

  body.atendimento-page .clinical-at-a-glance{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    margin:10px 0 12px!important;
    padding:14px!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#ffffff,#f8fbff)!important;
    box-shadow:0 10px 24px rgba(16,42,71,.06)!important;
  }

  body.atendimento-page .clinical-at-a-glance h2{
    font-size:1.05rem!important;
    line-height:1.15!important;
    margin:0 0 8px!important;
  }

  body.atendimento-page .clinical-at-a-glance p{
    display:grid!important;
    gap:6px!important;
    margin:0!important;
    font-size:.86rem!important;
    line-height:1.35!important;
  }

  body.atendimento-page .clinical-at-a-glance p b{
    color:#0f4c7d!important;
  }

  body.atendimento-page .clinical-at-a-glance .glance-notes{
    max-width:none!important;
    margin-top:0!important;
    gap:8px!important;
  }

  body.atendimento-page .clinical-at-a-glance .glance-notes span{
    border-radius:14px!important;
    padding:10px 11px!important;
    font-size:.82rem!important;
    line-height:1.35!important;
    background:#fff!important;
  }

  body.atendimento-page .clinical-summary-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin:10px 0!important;
    overflow:visible!important;
  }

  body.atendimento-page .clinical-summary-grid .clinical-mini{
    min-height:76px!important;
    padding:10px!important;
    border-radius:14px!important;
    gap:8px!important;
  }

  body.atendimento-page .clinical-mini>span{
    width:34px!important;
    height:34px!important;
    border-radius:12px!important;
    font-size:17px!important;
  }

  body.atendimento-page .clinical-mini strong{
    font-size:.9rem!important;
    line-height:1.12!important;
  }

  body.atendimento-page .clinical-mini small{
    font-size:.68rem!important;
    line-height:1.15!important;
  }

  body.atendimento-page .grid-2,
  body.atendimento-page .grid-3,
  body.atendimento-page .internal-form .grid-2,
  body.atendimento-page .internal-form .grid-3{
    display:grid!important;
    grid-template-columns:1fr!important;
    max-width:100%!important;
    min-width:0!important;
  }

  body.atendimento-page .field,
  body.atendimento-page .field input,
  body.atendimento-page .field select,
  body.atendimento-page .field textarea{
    max-width:100%!important;
    min-width:0!important;
    width:100%!important;
    box-sizing:border-box!important;
  }
}

/* Campo do código Tagarella dentro da ficha do paciente */
.tele-token-card{margin:18px 0;padding:18px;border:1px solid rgba(15,78,120,.14);border-radius:22px;background:linear-gradient(135deg,rgba(236,252,255,.95),rgba(255,247,252,.95));box-shadow:0 16px 35px rgba(19,66,97,.08)}
.tele-token-copy{display:flex;align-items:center;gap:12px;margin-bottom:14px;color:var(--text,#07345c)}
.tele-token-copy strong{display:block;font-size:17px}.tele-token-copy small{display:block;margin-top:3px;color:var(--muted,#567);line-height:1.35}.tele-token-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#fff;box-shadow:0 10px 22px rgba(19,66,97,.1)}
.tele-token-row{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:10px;align-items:center}.tele-token-row input{width:100%;min-height:46px;border-radius:15px;border:1px solid rgba(15,78,120,.18);padding:0 14px;font-weight:800;letter-spacing:.03em;background:#fff;color:var(--text,#07345c)}
@media(max-width:760px){.tele-token-row{grid-template-columns:1fr}.tele-token-row .btn{width:100%;justify-content:center}.tele-token-card{padding:15px;border-radius:20px}.tele-token-copy{align-items:flex-start}}

/* Balão de token no topo da ficha */
.ficha-token-bubble{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:8px 14px;border-radius:999px;background:linear-gradient(135deg,#fff7fb,#eefcff);border:1px solid rgba(15,78,120,.12);box-shadow:0 12px 28px rgba(19,66,97,.12);font-weight:900;color:var(--text,#07345c);max-width:270px}
.ficha-token-bubble b{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#64748b}.ficha-token-bubble em{font-style:normal;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.ficha-token-bubble{width:100%;justify-content:space-between;max-width:none;border-radius:18px}.ficha-token-bubble em{max-width:190px}}


/* Auditoria de acesso por perfil: menu sem buracos, mantendo botões com tamanho normal */
@media(min-width:1100px){
  body.dashboard-role-financeiro .top .top-actions.main-menu,
  body.dashboard-role-atendente .top .top-actions.main-menu{
    align-content:flex-start!important;
    justify-content:flex-start!important;
    gap:10px!important;
  }
  body.dashboard-role-secretaria .top .top-actions.main-menu{
    align-content:flex-start!important;
    justify-content:flex-start!important;
    gap:6px!important;
  }
  body.dashboard-role-financeiro .top .top-actions.main-menu{
    max-height:none!important;
    overflow:visible!important;
  }
  body.dashboard-role-financeiro .top .top-actions.main-menu .btn,
  body.dashboard-role-atendente .top .top-actions.main-menu .btn{
    width:100%!important;
    min-height:46px!important;
    padding:0 18px!important;
    justify-content:flex-start!important;
  }
  body.dashboard-role-secretaria .top .top-actions.main-menu .btn{
    width:100%!important;
    min-height:0!important;
    padding:11px 12px!important;
    justify-content:flex-start!important;
  }
}

.reception-action-widget{display:grid;gap:16px}
.reception-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.reception-action-grid a{display:grid;gap:4px;text-decoration:none;background:linear-gradient(135deg,#ffffff,#f8fbff);border:1px solid rgba(16,42,71,.08);border-radius:18px;padding:13px;color:#0b3559;box-shadow:0 10px 22px rgba(16,42,71,.05)}
.reception-action-grid small{font-weight:900;color:#66768b}.reception-action-grid b{font-size:1.65rem;line-height:1;color:#0f4c7d}.reception-action-grid span{font-size:.78rem;font-weight:850;color:#607287}
@media(max-width:720px){.reception-action-grid{grid-template-columns:1fr}.reception-action-grid a{padding:12px}}

@media(max-width:1099px){
  body > .md-mobile-bottom-menu{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
    max-height:178px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    align-items:stretch!important;
  }
  body > .md-mobile-bottom-menu .btn{
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
    padding:8px 5px!important;
  }
  body > .md-mobile-bottom-menu .menu-label{
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
}


/* MD fix menu Secretária: mesma largura e altura padrão do menu lateral, apenas com gap menor no desktop */
@media(min-width:1100px){
  .top .top-actions.main-menu.menu-perfil-secretaria,
  .top.compact .top-actions.main-menu.menu-perfil-secretaria,
  body.dashboard-role-secretaria .top .top-actions.main-menu{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-content:flex-start!important;
    justify-content:stretch!important;
    align-items:stretch!important;
    gap:6px!important;
    width:100%!important;
  }
  .top .top-actions.main-menu.menu-perfil-secretaria .btn,
  .top.compact .top-actions.main-menu.menu-perfil-secretaria .btn,
  body.dashboard-role-secretaria .top .top-actions.main-menu .btn{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    height:auto!important;
    padding:11px 12px!important;
    border-radius:16px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    text-align:left!important;
    white-space:nowrap!important;
  }
}

/* MD fix menu Doutor: remove espaçamento excessivo no desktop mantendo padrão visual dos botões */
@media(min-width:1100px){
  body.dashboard-role-fono .top .top-actions.main-menu,
  body.dashboard-role-fono .top.compact .top-actions.main-menu{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-content:flex-start!important;
    justify-content:stretch!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
  }
  body.dashboard-role-fono .top .top-actions.main-menu .btn,
  body.dashboard-role-fono .top.compact .top-actions.main-menu .btn{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    height:auto!important;
    padding:11px 12px!important;
    border-radius:16px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    text-align:left!important;
    white-space:nowrap!important;
  }
}

/* MD fix final menu lateral desktop: itens agrupados no topo, sem buracos verticais */
@media(min-width:1100px){
  body:not(.login-premium-body) .top.compact .top-actions.main-menu,
  body:not(.login-premium-body) .top .top-actions.main-menu{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-auto-rows:auto!important;
    align-content:flex-start!important;
    justify-content:stretch!important;
    align-items:stretch!important;
    gap:7px!important;
    margin-top:18px!important;
  }
  body:not(.login-premium-body) .top.compact .top-actions.main-menu .btn,
  body:not(.login-premium-body) .top .top-actions.main-menu .btn{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    height:auto!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    text-align:left!important;
    white-space:nowrap!important;
  }
}

body.dashboard-role-secretaria.atendimento-page .atendimento-hero-actions a[href="#evolucao-terapeutica"],
body.dashboard-role-atendente.atendimento-page .atendimento-hero-actions a[href="#evolucao-terapeutica"],
body.perfil-secretaria.atendimento-page .atendimento-hero-actions a[href="#evolucao-terapeutica"],
body.perfil-atendente.atendimento-page .atendimento-hero-actions a[href="#evolucao-terapeutica"]{
  display:none!important;
}
/* Paginação leve para listas grandes */
.md-pagination{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:18px auto 8px;padding:12px 14px;border:1px solid rgba(16,42,71,.10);border-radius:16px;background:rgba(255,255,255,.86);box-shadow:0 10px 28px rgba(16,42,71,.06);color:var(--muted);font-weight:800}
.md-pagination a,.md-pagination strong{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 14px;border-radius:999px;text-decoration:none;font-weight:900}
.md-pagination a{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;box-shadow:0 10px 20px rgba(16,42,71,.10)}
.md-pagination strong{background:#fff;color:var(--text);border:1px solid var(--line)}
.md-pagination span{font-size:.9rem}

/* Aviso de cadastro incompleto na ficha do paciente */
.cadastro-alert-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:-6px;
  border:1px solid rgba(245,158,11,.28)!important;
  background:linear-gradient(135deg,rgba(255,251,235,.96),rgba(255,255,255,.92))!important;
  box-shadow:0 18px 42px rgba(146,64,14,.08)!important;
}
.cadastro-alert-copy{display:grid;gap:6px;min-width:0}
.cadastro-alert-copy strong{color:#7c2d12;font-size:1rem}
.cadastro-alert-copy span{color:#7c4a12;font-weight:750}
.cadastro-alert-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:3px}
.cadastro-alert-tags em{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(245,158,11,.28);
  color:#7c2d12;
  font-style:normal;
  font-size:.82rem;
  font-weight:900;
  box-shadow:0 8px 18px rgba(146,64,14,.06);
}
@media(max-width:760px){
  .cadastro-alert-panel{align-items:stretch;flex-direction:column;margin-top:0}
  .cadastro-alert-panel .btn{width:100%;justify-content:center}
}

/* Token da videochamada: status simples para equipe e gerenciamento no topo para admin/superadmin */
.ficha-token-inline-form{display:inline-flex;margin:0}
.ficha-token-generate{font:inherit;cursor:pointer;appearance:none;-webkit-appearance:none}
.ficha-token-generate:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(19,66,97,.16)}
.ficha-token-status em{font-weight:900}
.ficha-token-admin em{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.035em}
@media(max-width:760px){.ficha-token-inline-form{width:100%}.ficha-token-inline-form .ficha-token-bubble{width:100%}}
