/* ==========================================================================
   AMASA - Associação Maçônica de Apoio à Saúde
   Design System & Estilos Globais (WCAG 2.2 AA Compliance)
   ========================================================================== */

:root {
  /* Paleta Institucional Oficial AMASA (Ilha Solteira - SP) */
  --amasa-navy: #002D72;
  --amasa-navy-dark: #001A40;
  --amasa-navy-light: #0A3D8F;
  --amasa-blue: #0080C8;
  --amasa-blue-light: #E6F3FA;
  --amasa-cyan: #00A3E0;
  --amasa-green: #107C41;
  --amasa-green-hover: #0D6535;
  --amasa-green-light: #E8F7EE;
  --amasa-red: #C8102E;
  --amasa-gold: #C29B38;
  --amasa-gold-light: #FDF8E8;
  
  /* Cores de Interface & Neutras */
  --amasa-white: #FFFFFF;
  --amasa-bg: #F4F7F9;
  --amasa-card-bg: #FFFFFF;
  --amasa-text: #1F2937;
  --amasa-text-muted: #4B5563;
  --amasa-text-light: #6B7280;
  --amasa-border: #D1D5DB;
  --amasa-border-light: #E5E7EB;

  /* Status Semânticos */
  --status-pending-bg: #FEF3C7;
  --status-pending-text: #92400E;
  --status-pending-border: #FCD34D;
  
  --status-approved-bg: #D1FAE5;
  --status-approved-text: #065F46;
  --status-approved-border: #6EE7B7;

  --status-rejected-bg: #FEE2E2;
  --status-rejected-text: #991B1B;
  --status-rejected-border: #FCA5A5;

  --status-info-bg: #E0F2FE;
  --status-info-text: #075985;
  --status-info-border: #7DD3FC;

  /* Identidade "Régua e Compasso": marinho institucional + ouro da régua como único destaque */
  --amasa-navy-deep: #071B3A;
  --amasa-ouro: #B8892B;        /* réguas, marcadores e números grandes (não usar em texto pequeno) */
  --amasa-ouro-claro: #D9B55E;  /* ouro sobre fundo marinho */
  --amasa-ouro-fundo: #FBF6EA;
  --amasa-tinta: #1A2233;
  --amasa-grafite: #5A6475;
  --amasa-linha: #DDE2EA;
  --amasa-papel: #F5F7FA;

  /* Tipografia & Espaçamento (fontes hospedadas em /fonts) */
  --font-main: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Archivo', 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: 'Georgia', serif;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease-in-out;

  --container-width: 1200px;
}

/* Reset Básico e Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--amasa-bg);
  color: var(--amasa-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Acessibilidade: Skip Link para navegação por teclado */
.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  background: var(--amasa-navy);
  color: var(--amasa-white);
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 10px;
}

/* Tipografia Acessível */
h1, h2, h3, h4, h5, h6 {
  color: var(--amasa-navy);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--amasa-text); }
p.lead { font-size: 1.15rem; color: var(--amasa-text-muted); }

a {
  color: var(--amasa-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover, a:focus {
  color: var(--amasa-green-hover);
}

:focus-visible {
  outline: 3px solid var(--amasa-green);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Botões e Ações Padronizados */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  min-height: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--amasa-green);
  color: var(--amasa-white);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--amasa-green-hover);
  color: var(--amasa-white);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--amasa-navy);
  color: var(--amasa-white);
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--amasa-navy-dark);
  color: var(--amasa-white);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--amasa-navy);
  color: var(--amasa-navy);
}

.btn-outline:hover, .btn-outline:focus {
  background-color: var(--amasa-navy);
  color: var(--amasa-white);
}

.btn-outline-green {
  background-color: transparent;
  border-color: var(--amasa-green);
  color: var(--amasa-green);
}

.btn-outline-green:hover, .btn-outline-green:focus {
  background-color: var(--amasa-green);
  color: var(--amasa-white);
}

.btn-danger {
  background-color: #DC2626;
  color: var(--amasa-white);
}

.btn-danger:hover {
  background-color: #B91C1C;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
  box-sizing: border-box;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  min-height: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

/* ==========================================================================
   Modais e Caixas de Diálogo (Padrão AMASA)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 1.25rem;
  box-sizing: border-box;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-dialog {
  background: #FFFFFF !important;
  border-radius: var(--radius-lg, 12px);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05);
  border: 1px solid #CBD5E1;
  color: #1E293B;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  border-top-left-radius: var(--radius-lg, 12px);
  border-top-right-radius: var(--radius-lg, 12px);
  box-sizing: border-box;
}

.modal-header h3 {
  margin: 0;
  color: #002D72;
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.75rem;
  background: #FFFFFF;
  color: #334155;
  line-height: 1.5;
  box-sizing: border-box;
}

.modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: #F8FAFC;
  border-bottom-left-radius: var(--radius-lg, 12px);
  border-bottom-right-radius: var(--radius-lg, 12px);
  box-sizing: border-box;
}

.modal-footer .btn {
  min-width: 120px;
  height: 40px;
  min-height: 40px;
}

/* Padronização Universal de Ações em Tabelas: 2 Colunas Compactas */
.table-actions-container {
  display: grid !important;
  grid-template-columns: repeat(2, 26px) !important;
  gap: 2px !important;
  width: 54px !important;
  min-width: 54px !important;
  max-width: 55px !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.table-actions-container .badge,
.table-actions-container .table-actions-full {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin-bottom: 2px !important;
}

.table-actions-container .table-actions-full .badge {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  padding: 2px 3px !important;
  font-size: 0.62rem !important;
  line-height: 1.1 !important;
  word-break: normal !important;
}

/* Helpers de Células de Tabela */
.cell-date,
.data-table td.cell-date,
.data-table th.cell-date {
  white-space: nowrap !important;
  width: 75px !important;
  min-width: 72px !important;
  font-variant-numeric: tabular-nums;
}

.cell-actions,
.data-table td.cell-actions,
.data-table th.cell-actions {
  white-space: nowrap !important;
  width: 62px !important;
  min-width: 60px !important;
  max-width: 65px !important;
  text-align: center !important;
  padding: 3px 2px !important;
}

.cell-currency,
.data-table td.cell-currency,
.data-table th.cell-currency {
  white-space: nowrap !important;
  width: 85px !important;
  min-width: 80px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-weight: 700 !important;
}

.cell-status,
.data-table td.cell-status,
.data-table th.cell-status {
  text-align: center !important;
  vertical-align: middle !important;
  width: 124px !important;
  min-width: 118px !important;
  max-width: 136px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.data-table td.cell-status .badge,
.cell-status .badge {
  text-align: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.data-table td.cell-status div,
.cell-status div {
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Callouts Executivos de Motivo de Negativa & Exigências Técnicas */
.table-negativa-callout {
  margin-top: 0.35rem;
  padding: 0.35rem 0.55rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-left: 3px solid #EF4444;
  border-radius: 4px;
  font-size: 0.74rem;
  color: #991B1B;
  line-height: 1.35;
  word-break: break-word;
  box-sizing: border-box;
  max-width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.table-negativa-callout:hover {
  background: #FEE2E2;
  border-color: #F87171;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.12);
}

.negativa-callout-header {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  color: #B91C1C;
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.negativa-callout-body {
  color: #450A0A;
  font-size: 0.74rem;
}

.table-diligence-callout {
  margin-top: 0.35rem;
  padding: 0.35rem 0.55rem;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 3px solid #F59E0B;
  border-radius: 4px;
  font-size: 0.74rem;
  color: #92400E;
  line-height: 1.35;
  word-break: break-word;
  box-sizing: border-box;
  max-width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.table-diligence-callout:hover {
  background: #FEF3C7;
  border-color: #FBBF24;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.12);
}

.diligence-callout-header {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  color: #B45309;
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.diligence-callout-body {
  color: #78350F;
  font-size: 0.74rem;
}

.btn-negativa-info-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
  padding: 2px 7px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.btn-negativa-info-pill:hover {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #EF4444;
  transform: scale(1.03);
}

.action-status-meta {
  font-size: 0.68rem;
  color: #64748B;
  line-height: 1.25;
  margin-top: 3px;
  margin-bottom: 4px;
  text-align: center;
  white-space: nowrap !important;
  width: 100%;
  box-sizing: border-box;
}

.action-status-label {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94A3B8;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap !important;
}

.action-status-date {
  display: block;
  font-size: 0.70rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--amasa-navy, #002D72);
  font-weight: 700;
  white-space: nowrap !important;
  line-height: 1.2;
  margin-top: 1px;
}

.table-actions-container .btn,
.data-table td .btn-action-icon,
.table-actions-container button {
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  padding: 0 !important;
  font-size: 0.82rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  border-radius: 5px !important;
  line-height: 1 !important;
  margin: 0 !important;
  cursor: pointer !important;
  position: relative;
  transition: all 0.15s ease-in-out;
}

.table-actions-container .btn i,
.table-actions-container button i {
  font-size: 0.84rem !important;
  line-height: 1 !important;
  pointer-events: none;
}

.table-actions-container .btn:hover,
.table-actions-container button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.table-actions-container .btn:active,
.table-actions-container button:active {
  transform: translateY(0);
}

/* Padronização de Botões em Rodapés de Modais */
.modal-footer .btn {
  min-width: 140px;
  height: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
  box-sizing: border-box;
}

/* Badges e Status */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.2;
}

.badge-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid var(--status-pending-border);
}

.badge-approved {
  background-color: var(--status-approved-bg);
  color: var(--status-approved-text);
  border: 1px solid var(--status-approved-border);
}

.badge-rejected {
  background-color: var(--status-rejected-bg);
  color: var(--status-rejected-text);
  border: 1px solid var(--status-rejected-border);
}

.badge-info {
  background-color: var(--status-info-bg);
  color: var(--status-info-text);
  border: 1px solid var(--status-info-border);
}

/* Barra Superior de Informações e Acessibilidade */
.top-bar {
  background-color: var(--amasa-navy-dark);
  color: #D1D5DB;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-info {
  display: flex;
  gap: 1.5rem;
}

.top-bar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.top-bar-actions button {
  background: none;
  border: none;
  color: #D1D5DB;
  cursor: pointer;
  font-size: 0.85rem;
}

.top-bar-actions button:hover {
  color: var(--amasa-white);
}

/* Cabeçalho Principal */
.site-header {
  background-color: var(--amasa-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--amasa-border-light);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--amasa-navy);
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  background: white;
  padding: 2px;
  border: 1px solid rgba(0, 45, 114, 0.15);
}

.brand-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--amasa-navy), var(--amasa-blue));
  color: var(--amasa-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--amasa-navy);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--amasa-text-muted);
  font-weight: 600;
}

.brand-subtagline {
  font-size: 0.7rem;
  color: var(--amasa-blue);
  font-weight: 500;
}

/* Navegação Principal */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--amasa-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--amasa-green);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--amasa-green);
  border-radius: 2px;
}

/* Menu Hambúrguer Mobile */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--amasa-border);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--amasa-navy);
}

/* Banner Hero com Marca d'Água Institucional */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--amasa-navy-dark) 0%, var(--amasa-navy) 60%, var(--amasa-green-hover) 100%);
  color: var(--amasa-white);
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}

/* Marca d'Água Monumental AMASA no Fundo do Hero (Com padding de 20px nas bordas) */
.hero-section::before {
  display: none !important;
}

.hero-watermark {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.hero-watermark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #A7F3D0;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  color: var(--amasa-white);
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #E2E8F0;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions .btn {
  min-width: 250px;
  height: 48px;
  min-height: 48px;
}

/* Indicadores de Impacto */
.impact-banner {
  background-color: var(--amasa-white);
  border-bottom: 1px solid var(--amasa-border-light);
  padding: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.impact-item h3 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--amasa-green);
  margin-bottom: 0.25rem;
}

.impact-item p {
  font-size: 0.95rem;
  color: var(--amasa-text-muted);
  font-weight: 500;
  margin: 0;
}

/* Seções Gerais */
.section {
  padding: 4.5rem 0;
}

.section-light {
  background-color: var(--amasa-white);
}

.section-header {
  text-align: left;
  max-width: 100%;
  margin: 0 0 2rem 0;
}

.section-eyebrow {
  text-align: left;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--amasa-green);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  text-align: left;
  font-size: 2.15rem;
  margin-bottom: 0.75rem;
  color: var(--amasa-navy);
}

.section-description,
p.section-description {
  text-align: left;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.55;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem 0;
  display: block;
  box-sizing: border-box;
}

/* Cards e Grades */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--amasa-card-bg);
  border: 1px solid var(--amasa-border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--amasa-border);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: var(--amasa-green-light);
  color: var(--amasa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.card-body {
  color: var(--amasa-text-muted);
  flex-grow: 1;
  font-size: 0.95rem;
}

/* Seção de Governança & Relação Institucional */
.governance-box {
  background: linear-gradient(135deg, #F8FAFC, #EDF2F7);
  border: 1px solid var(--amasa-border);
  border-left: 6px solid var(--amasa-navy);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 2rem;
}

.governance-box h4 {
  color: var(--amasa-navy);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.governance-box p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Seção de Doações Voluntárias */
.donation-card-container {
  background: var(--amasa-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--amasa-border-light);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.donation-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}

.donation-btn-preset {
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #002D72;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.donation-btn-preset:hover {
  background-color: #F0FDF4;
  border-color: #10B981;
  color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.donation-btn-preset.active {
  background-color: #DCFCE7;
  border-color: #15803D;
  color: #166534;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.2);
  transform: translateY(-2px);
}

.pix-box {
  background: #F0FDF4;
  border: 2px dashed #86EFAC;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

#pixQrCode {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#pixQrCode svg, #pixQrCode img, #pixQrCode canvas {
  display: block;
  width: 200px !important;
  height: 200px !important;
  max-width: 100%;
  border-radius: 8px;
}

/* Botões de Ação PIX com estados perfeitos */
.btn-pix-copy-payload {
  background-color: #002D72;
  border: 2px solid #002D72;
  color: #FFFFFF !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 45, 114, 0.2);
}

.btn-pix-copy-payload:hover, .btn-pix-copy-payload:focus {
  background-color: #001A40;
  border-color: #001A40;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.btn-pix-copy-cnpj {
  background-color: #FFFFFF;
  border: 2px solid #002D72;
  color: #002D72 !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-pix-copy-cnpj:hover, .btn-pix-copy-cnpj:focus {
  background-color: #002D72;
  border-color: #002D72;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.btn-pix-copied {
  background-color: #15803D !important;
  border-color: #15803D !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(21, 128, 61, 0.3) !important;
}

.pix-key-display {
  background: var(--amasa-white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--amasa-border);
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--amasa-navy);
  display: inline-block;
  margin: 1rem 0;
  user-select: all;
}

.donation-disclaimer {
  background-color: #FEF3C7;
  border-left: 4px solid #F59E0B;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #78350F;
  margin-top: 1.5rem;
}

/* Portal da Transparência (MROSC) */
.transparency-controls {
  background: var(--amasa-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--amasa-border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}

.search-input {
  flex-grow: 1;
  min-width: 250px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}

.filter-select {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background-color: var(--amasa-white);
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}

.transparency-card {
  background: var(--amasa-white);
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.transparency-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--amasa-border-light);
}

.transparency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.transparency-data-item strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--amasa-text-light);
  letter-spacing: 0.5px;
}

.transparency-data-item span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amasa-navy);
}

.transparency-docs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Formulários */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--amasa-navy);
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--amasa-text);
  background-color: var(--amasa-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
}

select.form-control,
input.form-control:not([type="file"]),
.form-control:not(textarea) {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--amasa-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 133, 107, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  height: auto;
  padding: 0.75rem 1rem;
}

/* Botões ao lado de inputs/selects com a exata mesma altura da caixa de texto */
.btn-inline-form {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 0.9rem !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: var(--radius-md) !important;
  line-height: 1 !important;
}

.form-group-with-btn {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
}

.form-group-with-btn .form-control {
  flex: 1;
  height: 40px;
  min-height: 40px;
}

.form-group-with-btn .btn {
  height: 40px;
  min-height: 40px;
  flex-shrink: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Barra de Filtros e Busca Padronizada para Tabelas */
.table-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--amasa-border-light);
  box-sizing: border-box;
}

.table-filter-search {
  flex: 1 1 240px;
  min-width: 200px;
}

.table-filter-search .form-control {
  height: 40px !important;
  min-height: 40px !important;
  font-size: 0.875rem;
  background-color: #FFFFFF;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-sm, 6px);
  padding: 0.4rem 0.85rem;
  box-sizing: border-box;
}

.table-filter-select-wrapper {
  flex: 0 1 250px;
  min-width: 180px;
}

.table-filter-select {
  width: 100%;
  height: 40px !important;
  min-height: 40px !important;
  font-size: 0.875rem;
  background-color: #FFFFFF;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-sm, 6px);
  color: var(--amasa-navy);
  font-weight: 500;
  padding: 0 0.85rem;
  cursor: pointer;
  box-sizing: border-box;
}

.table-filter-btn {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 1rem !important;
  font-size: 0.85rem !important;
  border-radius: var(--radius-sm, 6px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.table-filter-count {
  font-size: 0.82rem;
  color: var(--amasa-text-muted);
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

/* Rodapé */
.site-footer {
  background-color: var(--amasa-navy-dark);
  color: #9CA3AF;
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
  border-top: 3px solid var(--amasa-green);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--amasa-white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--amasa-green);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: #D1D5DB;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--amasa-white);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

/* ==========================================================================
   PORTAL RESTRITO / SISTEMA OPERACIONAL DA SAÚDE
   ========================================================================== */

.portal-layout {
  display: flex;
  min-height: 100vh;
  background-color: #F0F4F8;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.portal-sidebar {
  width: 220px;
  background-color: var(--amasa-navy);
  color: var(--amasa-white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.portal-sidebar-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-nav {
  padding: 0.5rem 0;
  flex-grow: 1;
}

.portal-nav-item {
  display: flex;
  align-items: center;
  gap: 0.60rem;
  padding: 0.60rem 1rem;
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.portal-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--amasa-white);
}

.portal-nav-item.active {
  background-color: rgba(22, 133, 107, 0.2);
  color: #6EE7B7;
  border-left-color: var(--amasa-green);
  font-weight: 600;
}

/* Modo Barra Lateral Recolhida / Compacta no Desktop */
@media (min-width: 993px) {
  .portal-sidebar.sidebar-collapsed {
    width: 60px !important;
    min-width: 60px !important;
  }
  .portal-sidebar.sidebar-collapsed .portal-sidebar-header a div,
  .portal-sidebar.sidebar-collapsed .portal-nav div[style*="text-transform"],
  .portal-sidebar.sidebar-collapsed .portal-nav-item span:not(.portal-nav-icon) {
    display: none !important;
  }
  .portal-sidebar.sidebar-collapsed .portal-sidebar-header {
    padding: 0.75rem 0.25rem;
    justify-content: center;
  }
  .portal-sidebar.sidebar-collapsed .portal-sidebar-header a {
    justify-content: center;
  }
  .portal-sidebar.sidebar-collapsed .portal-nav-item {
    padding: 0.65rem 0.25rem;
    justify-content: center;
    text-align: center;
  }
}

.portal-main {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.portal-topbar {
  background: var(--amasa-white);
  padding: 0.65rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--amasa-border-light);
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.portal-sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: var(--amasa-navy);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.portal-sidebar-toggle-btn:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
}

.portal-doctor-header {
  background: var(--amasa-white);
  border-bottom: 1px solid var(--amasa-border);
  padding: 0.75rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.doctor-badge-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.doctor-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--amasa-green-light);
  color: var(--amasa-green-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
}

.portal-content {
  padding: 0.85rem 1.15rem;
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.portal-content .section-header {
  text-align: left;
  max-width: 100%;
  width: 100%;
  margin: 0 0 1rem 0;
  padding: 0;
  box-sizing: border-box;
}

.portal-content .section-description,
.portal-content p.section-description {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
  max-width: 100%;
  width: 100%;
  display: block;
  margin: 0 0 1rem 0;
  box-sizing: border-box;
}

/* ==========================================================================
   Design System de Tabelas e Componentes de Dados (UI/UX Refinado)
   ========================================================================== */

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--amasa-white);
  border-radius: var(--radius-lg, 8px);
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  margin-bottom: 1.25rem;
  box-sizing: border-box;
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #F8FAFC;
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.data-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.72rem;
}

.data-table th {
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  padding: 0.38rem 0.45rem;
  border-bottom: 2px solid #E2E8F0;
  text-transform: uppercase;
  font-size: 0.63rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  user-select: none;
}

.data-table td {
  padding: 0.30rem 0.45rem;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
  vertical-align: middle;
  line-height: 1.25;
  font-size: 0.72rem;
  word-break: break-word;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #F8FAFC;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Identificadores e Códigos Tabulares */
.table-id-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: var(--amasa-navy, #002D72);
  font-size: 0.70rem;
  letter-spacing: 0.01em;
  white-space: nowrap !important;
  display: inline-block;
  line-height: 1.2;
}

/* Células com Truncamento Inteligente (Máximo 10 Palavras) */
.truncated-cell-text {
  display: inline-block;
  max-width: 100%;
  color: #334155;
  font-size: 0.75rem;
  line-height: 1.3;
  cursor: help;
  position: relative;
  border-bottom: 1px dotted #94A3B8;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.truncated-cell-text:hover {
  color: #002D72;
  border-bottom-color: #002D72;
}

/* Badges Modernos com Ponto Indicador */
.badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.28rem !important;
  padding: 0.20rem 0.55rem !important;
  border-radius: 12px !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: normal !important;
  text-align: center !important;
  border: 1px solid transparent !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}

.badge-approved {
  background: #DCFCE7 !important;
  color: #15803D !important;
  border-color: #86EFAC !important;
}

.badge-approved::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background-color: #16A34A;
  flex-shrink: 0;
}

.badge-pending {
  background: #FEF3C7 !important;
  color: #B45309 !important;
  border-color: #FDE68A !important;
}

.badge-pending::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background-color: #D97706;
  flex-shrink: 0;
}

.badge-rejected {
  background: #FEE2E2 !important;
  color: #B91C1C !important;
  border-color: #FECACA !important;
}

.badge-rejected::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background-color: #DC2626;
  flex-shrink: 0;
}

.badge-info {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border-color: #BFDBFE !important;
}

.badge-info::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background-color: #2563EB;
  flex-shrink: 0;
}

.badge-alta {
  background: #ECFDF5 !important;
  color: #047857 !important;
  border-color: #6EE7B7 !important;
  font-weight: 700 !important;
}

.badge-alta::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background-color: #059669;
  flex-shrink: 0;
  box-shadow: 0 0 3px rgba(5, 150, 105, 0.6);
}

.badge-inactive {
  background: #F1F5F9 !important;
  color: #64748B !important;
  border-color: #CBD5E1 !important;
}

.badge-inactive::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background-color: #94A3B8;
  flex-shrink: 0;
}

/* Estilização para Linhas Desativadas / Inativas */
.row-inactive {
  opacity: 0.65;
  background-color: #F8FAFC !important;
}

.row-inactive td {
  color: #64748B !important;
}

/* Botões Padronizados de Edição e Status */
.btn-action-edit {
  color: #0284C7 !important;
  border: 1px solid #BAE6FD !important;
  background: #F0F9FF !important;
}

.btn-action-edit:hover {
  background: #E0F2FE !important;
  border-color: #7DD3FC !important;
  color: #0369A1 !important;
}

.btn-status-deactivate {
  color: #DC2626 !important;
  border: 1px solid #FECACA !important;
  background: #FEF2F2 !important;
}

.btn-status-deactivate:hover {
  background: #FEE2E2 !important;
  border-color: #FCA5A5 !important;
  color: #991B1B !important;
}

.btn-status-activate {
  color: #16A34A !important;
  border: 1px solid #86EFAC !important;
  background: #F0FDF4 !important;
}

.btn-status-activate:hover {
  background: #DCFCE7 !important;
  border-color: #4ADE80 !important;
  color: #15803D !important;
}

.btn-action-whatsapp {
  color: #FFFFFF !important;
  border: 1px solid #22C55E !important;
  background: #25D366 !important;
}

.btn-action-whatsapp:hover {
  background: #16A34A !important;
  border-color: #15803D !important;
  color: #FFFFFF !important;
}

.btn-action-view {
  color: #002D72 !important;
  border: 1px solid #CBD5E1 !important;
  background: #FFFFFF !important;
}

.btn-action-view:hover {
  background: #F1F5F9 !important;
  border-color: #94A3B8 !important;
  color: #001A44 !important;
}

.btn-action-pdf-med {
  color: #0284C7 !important;
  border: 1px solid #BAE6FD !important;
  background: #F0F9FF !important;
}

.btn-action-pdf-med:hover {
  background: #E0F2FE !important;
  border-color: #7DD3FC !important;
  color: #0369A1 !important;
}

.btn-action-pdf-parecer {
  color: #166534 !important;
  border: 1px solid #BBF7D0 !important;
  background: #F0FDF4 !important;
}

.btn-action-pdf-parecer:hover {
  background: #DCFCE7 !important;
  border-color: #86EFAC !important;
  color: #14532D !important;
}

.btn-action-pdf-dossier {
  color: #475569 !important;
  border: 1px solid #CBD5E1 !important;
  background: #F8FAFC !important;
}

.btn-action-pdf-dossier:hover {
  background: #E2E8F0 !important;
  border-color: #94A3B8 !important;
  color: #1E293B !important;
}

.btn-action-diligence {
  color: #FFFFFF !important;
  border: 1px solid #D97706 !important;
  background: #D97706 !important;
}

.btn-action-diligence:hover {
  background: #B45309 !important;
  border-color: #B45309 !important;
  color: #FFFFFF !important;
}

.btn-action-reanalysis {
  color: #FFFFFF !important;
  border: 1px solid #1E3A8A !important;
  background: #1E3A8A !important;
}

.btn-action-reanalysis:hover {
  background: #172554 !important;
  border-color: #172554 !important;
  color: #FFFFFF !important;
}

.btn-action-defer {
  color: #FFFFFF !important;
  border: 1px solid #16A34A !important;
  background: #16A34A !important;
}

.btn-action-defer:hover {
  background: #15803D !important;
  border-color: #15803D !important;
  color: #FFFFFF !important;
}

.btn-action-reject {
  color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  background: #DC2626 !important;
}

.btn-action-reject:hover {
  background: #B91C1C !important;
  border-color: #B91C1C !important;
  color: #FFFFFF !important;
}

.btn-action-laudos {
  color: #D97706 !important;
  border: 1px solid #FCD34D !important;
  background: #FFFBEB !important;
}

.btn-action-laudos:hover {
  background: #FEF3C7 !important;
  border-color: #F59E0B !important;
  color: #B45309 !important;
}

.btn-action-invoice-view {
  color: #FFFFFF !important;
  border: 1px solid #002D72 !important;
  background: #002D72 !important;
}

.btn-action-invoice-view:hover {
  background: #001A44 !important;
  border-color: #001A44 !important;
  color: #FFFFFF !important;
}

.btn-action-invoice-download {
  color: #166534 !important;
  border: 1px solid #BBF7D0 !important;
  background: #F0FDF4 !important;
}

.btn-action-invoice-download:hover {
  background: #DCFCE7 !important;
  border-color: #86EFAC !important;
  color: #14532D !important;
}

/* Estado Vazio de Tabelas (Empty State) */
.empty-table-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #64748B;
}

.empty-table-icon {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
  display: block;
}

.empty-table-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amasa-navy, #002D72);
  margin-bottom: 0.25rem;
}

.empty-table-desc {
  font-size: 0.82rem;
  color: #64748B;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Linha do Tempo de Avaliação (Duas Etapas) */
.evaluation-flow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.flow-step {
  flex: 1;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--amasa-border);
  background: var(--amasa-bg);
}

.flow-step.active {
  border-color: var(--amasa-green);
  background: var(--amasa-green-light);
}

.flow-step.completed {
  border-color: #10B981;
  background: #ECFDF5;
}

/* Modais e Toasts */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--amasa-navy);
  color: var(--amasa-white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 4px solid var(--amasa-green);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Responsividade Global Multitelas (Desktop, Tablet e Mobile)
   ========================================================================== */

.portal-mobile-menu-btn {
  display: none;
}

.portal-sidebar-overlay {
  display: none;
}

.portal-sidebar-close-btn {
  display: none;
}

/* Telas de Tablets e Smartphones (<= 992px) */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .portal-layout {
    flex-direction: column;
    position: relative;
  }

  /* Gaveta Lateral Off-Canvas Retrátil */
  .portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    z-index: 3000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    overflow-y: auto;
  }

  .portal-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
  }

  .portal-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.65);
    backdrop-filter: blur(3px);
    z-index: 2999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .portal-sidebar-overlay.open {
    display: block;
    opacity: 1;
  }

  .portal-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .portal-sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
  }

  .portal-sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .portal-mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 6px;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: var(--amasa-navy);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    margin-right: 0.5rem;
  }

  .portal-mobile-menu-btn:hover {
    background: #E2E8F0;
  }

  .portal-topbar {
    padding: 0.75rem 1rem;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--amasa-white);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--amasa-border);
    z-index: 2000;
  }

  .main-nav.open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* Telas Mobile e Smartphones (<= 768px) */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 1rem 2.5rem;
  }

  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .impact-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .portal-doctor-header {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .portal-doctor-header button {
    width: 100%;
    justify-content: center;
  }

  .portal-content {
    padding: 1rem 0.75rem;
  }

  .stat-card {
    padding: 0.65rem 0.85rem;
  }

  .stat-card .stat-value {
    font-size: 1.25rem;
  }

  .table-filter-bar {
    padding: 0.75rem 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .table-filter-search,
  .table-filter-select-wrapper {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
  }

  .table-filter-btn {
    width: 100%;
    height: 38px;
    justify-content: center;
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-dialog {
    max-width: 100% !important;
    width: 96vw !important;
    max-height: 92vh !important;
    border-radius: 8px !important;
    margin: 0 auto !important;
  }

  .modal-header {
    padding: 0.85rem 1rem !important;
  }

  .modal-header h3 {
    font-size: 1.05rem !important;
  }

  .modal-body {
    padding: 1rem 0.85rem !important;
  }

  .modal-footer {
    padding: 0.75rem 0.85rem !important;
    flex-direction: column;
    gap: 0.5rem !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    min-width: 100% !important;
    height: 42px;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  #modalVisualizarDocumento iframe {
    height: 380px !important;
  }

  #modalVisualizarDocumento img {
    max-height: 380px !important;
  }
}

/* Telas Ultra-Compactas (<= 480px) */
@media (max-width: 480px) {
  .top-bar-info {
    display: none;
  }

  .impact-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-title {
    font-size: 1.6rem !important;
  }

  .donation-presets {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .portal-topbar {
    padding: 0.5rem 0.75rem;
  }

  .portal-topbar h2 {
    font-size: 0.95rem !important;
  }

  #userRoleBadge {
    display: none;
  }

  .doctor-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Estilos de Customização e Impressão de Dossiê Oficial do Processo
   ========================================================================== */

.print-preset-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.print-preset-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.print-preset-btn:hover {
  background: #E2E8F0;
  color: var(--amasa-navy);
}

.print-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 650px) {
  .print-options-grid {
    grid-template-columns: 1fr;
  }
}

.print-option-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.print-option-card:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
}

.print-option-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--amasa-navy);
}

.print-option-card .opt-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amasa-navy);
  display: block;
  line-height: 1.2;
}

.print-option-card .opt-desc {
  font-size: 0.76rem;
  color: var(--amasa-text-muted);
  display: block;
  margin-top: 0.2rem;
}

/* Área de Impressão do Dossiê */
#printDossierContainer {
  display: none;
}

@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 10pt !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body > :not(#printDossierContainer) {
    display: none !important;
  }

  .portal-layout,
  .portal-sidebar,
  .portal-topbar,
  .modal-overlay,
  .toast,
  header,
  footer,
  nav,
  aside,
  button {
    display: none !important;
  }

  #printDossierContainer {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  @page {
    size: A4 portrait;
    margin: 8mm 10mm 8mm 10mm;
  }

  .dossier-page {
    page-break-after: auto;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 8.5pt;
    line-height: 1.25;
  }

  .dossier-page-amasa {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    width: 100%;
    box-sizing: border-box;
  }

  .page-break-before {
    page-break-before: always !important;
    break-before: page !important;
  }

  .page-break-after {
    page-break-after: always !important;
    break-after: page !important;
  }

  .page-break-avoid {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .dossier-print-canvas,
  .dossier-print-img {
    max-width: 100% !important;
    max-height: 255mm !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    object-fit: contain !important;
  }

  .dossier-header {
    border-bottom: 2px solid #002D72;
    padding-bottom: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .dossier-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid #CBD5E1;
    flex-shrink: 0;
  }

  .dossier-section {
    margin-bottom: 6px;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    padding: 6px 10px;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .dossier-section-title {
    font-size: 8.5pt;
    font-weight: 700;
    color: #002D72;
    text-transform: uppercase;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 2px;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
  }

  .dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 10px;
    font-size: 8.5pt;
  }

  .dossier-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3px 8px;
    font-size: 8pt;
  }

  .dossier-field {
    margin-bottom: 2px;
  }

  .dossier-label {
    font-size: 6.5pt;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    display: block;
    margin-bottom: 1px;
  }

  .dossier-value {
    font-size: 8pt;
    color: #0F172A;
    font-weight: 500;
  }

  .dossier-text-block {
    background: #F8FAFC;
    border-left: 3px solid #002D72;
    padding: 4px 8px;
    font-size: 8pt;
    margin-top: 2px;
    color: #1E293B;
    line-height: 1.25;
  }

  .dossier-badge-success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #86EFAC;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 7.5pt;
    display: inline-block;
  }

  .dossier-badge-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 7.5pt;
    display: inline-block;
  }

  .dossier-badge-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 7.5pt;
    display: inline-block;
  }

  .dossier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.5pt;
    margin-top: 4px;
  }

  .dossier-table th {
    background: #F1F5F9;
    color: #002D72;
    font-weight: 700;
    padding: 4px 6px;
    text-align: left;
    border: 1px solid #CBD5E1;
    text-transform: uppercase;
    font-size: 7pt;
  }

  .dossier-table td {
    padding: 3px 6px;
    border: 1px solid #E2E8F0;
    color: #1E293B;
  }

  .dossier-table tr:nth-child(even) td {
    background: #F8FAFC;
  }

  .dossier-stat-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }

  .dossier-stat-box {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    padding: 4px 8px;
    text-align: center;
  }

  .dossier-stat-box .num {
    font-size: 9.5pt;
    font-weight: 800;
    color: #002D72;
  }

  .dossier-stat-box .lbl {
    font-size: 6.5pt;
    color: #475569;
    text-transform: uppercase;
    font-weight: 600;
  }

  .dossier-signatures {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .dossier-signatures-2 {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .dossier-sign-box {
    text-align: center;
    border-top: 1px solid #0F172A;
    padding-top: 3px;
    font-size: 7pt;
    line-height: 1.15;
  }
}

/* ==========================================================================
   BADGES DE PRIORIDADE CLÍNICA E RISCO CIRÚRGICO (ASA)
   ========================================================================== */
.badge-priority {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 1px 5px !important;
  border-radius: 10px !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  word-break: keep-all !important;
}

.badge-priority-urgencia {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.badge-priority-prioritario {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.badge-priority-padrao {
  background-color: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
}

.badge-priority-dot {
  width: 4px !important;
  height: 4px !important;
  min-width: 4px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.badge-priority-urgencia .badge-priority-dot {
  background-color: #DC2626;
  box-shadow: 0 0 3px rgba(220, 38, 38, 0.6);
}

.badge-priority-prioritario .badge-priority-dot {
  background-color: #D97706;
}

.badge-priority-padrao .badge-priority-dot {
  background-color: #64748B;
}

.badge-asa {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  font-family: var(--font-main) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  word-break: keep-all !important;
}

.badge-asa-1 { background: #DCFCE7; color: #15803D; border: 1px solid #86EFAC; }
.badge-asa-2 { background: #E0F2FE; color: #0369A1; border: 1px solid #7DD3FC; }
.badge-asa-3 { background: #FEF3C7; color: #B45309; border: 1px solid #FDE047; }
.badge-asa-4 { background: #FEE2E2; color: #B91C1C; border: 1px solid #F87171; }

/* ==========================================================================
   CENTRAL DE NOTIFICAÇÕES (TOPBAR)
   ========================================================================== */
.notification-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notification-bell-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.notification-bell-btn:hover {
  background: #E2E8F0;
  color: var(--amasa-navy);
}

.notification-bell-btn:focus-visible {
  outline: 2px solid var(--amasa-blue);
  outline-offset: 2px;
}

.notification-counter {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: #DC2626;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  border: 2px solid #FFFFFF;
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: #FFFFFF;
  border: 1px solid var(--amasa-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1050;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDownFade 0.2s ease forwards;
}

.notification-popover.active {
  display: flex;
}

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

.notification-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--amasa-border-light);
}

.notification-popover-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amasa-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-popover-header .badge {
  font-size: 0.72rem;
  background: var(--amasa-navy);
  color: #fff;
  padding: 2px 7px;
  border-radius: 12px;
}

.notification-popover-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.notification-item:hover {
  background: #F8FAFC;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notification-item-icon.warning { background: #FEF3C7; color: #B45309; }
.notification-item-icon.primary { background: #DBEAFE; color: #1D4ED8; }
.notification-item-icon.danger  { background: #FEE2E2; color: #B91C1C; }
.notification-item-icon.success { background: #DCFCE7; color: #15803D; }

.notification-item-content {
  flex: 1;
  min-width: 0;
}

.notification-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-item-desc {
  font-size: 0.76rem;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 4px;
}

.notification-item-time {
  font-size: 0.7rem;
  color: #94A3B8;
}

.notification-popover-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94A3B8;
  font-size: 0.84rem;
}

.notification-popover-empty i {
  font-size: 2rem;
  margin-bottom: 6px;
  display: block;
  color: #CBD5E1;
}

/* ==========================================================================
   TIMELINE DE EVOLUÇÃO CLÍNICA & PRONTUÁRIO
   ========================================================================== */
.evolution-timeline {
  position: relative;
  padding: 16px 0 16px 20px;
  margin-left: 10px;
  border-left: 2px solid #CBD5E1;
}

.evolution-timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.evolution-timeline-item:last-child {
  margin-bottom: 0;
}

.evolution-timeline-node {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--amasa-navy);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--amasa-navy);
}

.evolution-timeline-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}

.evolution-timeline-card:hover {
  border-color: #94A3B8;
}

.evolution-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #E2E8F0;
}

.evolution-card-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--amasa-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

.evolution-card-role {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748B;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
}

.evolution-card-date {
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 600;
}

.evolution-card-body {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Validação Visual de Formulários */
.form-input-valid {
  border-color: #10B981 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310B981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.7c-.43.5-.8.4-1.1 0z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-input-invalid {
  border-color: #EF4444 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23EF4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23EF4444' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-feedback-error {
  font-size: 0.75rem;
  color: #DC2626;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* =============================================================================
   DASHBOARD DE METAS MROSC & EXECUÇÃO DO PLANO DE TRABALHO
   ============================================================================= */
.mrosc-dashboard {
  background: #FFFFFF;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.mrosc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mrosc-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--amasa-navy);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mrosc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mrosc-kpi-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mrosc-kpi-card.highlight {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.mrosc-kpi-card.accent {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.mrosc-kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.mrosc-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--amasa-navy);
  line-height: 1.2;
}

.mrosc-kpi-sub {
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 0.25rem;
}

.mrosc-metas-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mrosc-meta-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 0.85rem 1rem;
}

.mrosc-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1E293B;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mrosc-meta-count {
  font-size: 0.82rem;
  color: #047857;
  font-weight: 700;
}

.mrosc-progress-bar {
  height: 10px;
  background: #E2E8F0;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.mrosc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #059669);
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botão e Componente de WhatsApp */
.btn-whatsapp {
  background-color: #25D366 !important;
  border-color: #25D366 !important;
  color: #FFFFFF !important;
  font-weight: 600;
}

.btn-whatsapp:hover {
  background-color: #1EBE5D !important;
  border-color: #1EBE5D !important;
  color: #FFFFFF !important;
}

.whatsapp-preview-box {
  background: #DCF8C6;
  border: 1px solid #C4E8A8;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.88rem;
  color: #075E54;
  line-height: 1.45;
  white-space: pre-wrap;
  position: relative;
  font-family: system-ui, -apple-system, sans-serif;
  margin-bottom: 1rem;
}

/* Área Avançada de Upload Drag & Drop com Miniaturas e Múltiplos Arquivos */
.upload-dropzone,
.upload-dropzone-advanced {
  border: 2px dashed #94A3B8;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  outline: none;
}

.upload-dropzone:hover,
.upload-dropzone.dragover,
.upload-dropzone.is-dragover,
.upload-dropzone-advanced:hover,
.upload-dropzone-advanced.is-dragover {
  border-color: #002D72;
  background: #EFF6FF;
  box-shadow: 0 0 0 4px rgba(0, 45, 114, 0.08);
}

.upload-dropzone.is-dragover,
.upload-dropzone-advanced.is-dragover {
  border-color: #10B981;
  background: #F0FDF4;
}

.upload-dropzone-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #E0E7FF;
  color: #1E3A8A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.upload-dropzone:hover .upload-dropzone-icon,
.upload-dropzone-advanced:hover .upload-dropzone-icon {
  transform: translateY(-2px);
  background: #002D72;
  color: #FFFFFF;
}

.upload-dropzone-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.2rem;
}

.upload-dropzone-subtitle {
  font-size: 0.76rem;
  color: #64748B;
  line-height: 1.35;
}

.upload-dropzone-badges {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.upload-format-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #E2E8F0;
  color: #475569;
}

.upload-format-badge.pdf {
  background: #FEE2E2;
  color: #B91C1C;
}

.upload-format-badge.img {
  background: #E0F2FE;
  color: #0369A1;
}

.upload-format-badge.size {
  background: #FEF3C7;
  color: #92400E;
}

/* Grid de Miniaturas de Arquivos Selecionados */
.upload-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
  max-height: 250px;
  overflow-y: auto;
  padding: 2px;
}

.upload-thumbnail-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease;
  position: relative;
}

.upload-thumbnail-card:hover {
  border-color: #94A3B8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.upload-thumbnail-preview {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumbnail-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #DC2626;
  font-size: 1.15rem;
  line-height: 1;
}

.upload-thumbnail-pdf span {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.upload-file-info {
  flex: 1;
  min-width: 0;
}

.upload-file-name {
  font-size: 0.80rem;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.upload-file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.70rem;
  color: #64748B;
}

.upload-file-size {
  font-weight: 600;
}

.upload-file-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #10B981;
  font-weight: 600;
}

.upload-file-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.upload-file-remove-btn:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #DC2626;
}

.upload-batch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.65rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #1E40AF;
}

.upload-progress-container {
  margin-top: 0.75rem;
  display: none;
}

.upload-progress-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: #10B981;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  margin-top: 0.75rem;
}

/* Badges de Desfecho Clínico */
.badge-outcome-cura {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.badge-outcome-melhora {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
}

.badge-outcome-complementar {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
}

.badge-outcome-intercorrencia {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

/* ==========================================================================
   TRILHA DE AUDITORIA & HISTÓRICO DE PROCESSOS (LGPD & MROSC)
   ========================================================================== */
.timeline-audit {
  position: relative;
  padding-left: 2.25rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.timeline-audit::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #CBD5E1;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -2.25rem;
  top: 3px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #FFFFFF;
  box-shadow: 0 0 0 3px #FFFFFF, 0 2px 5px rgba(0, 0, 0, 0.12);
  z-index: 2;
  flex-shrink: 0;
}

.timeline-node-success {
  background: linear-gradient(135deg, #10B981, #059669);
}

.timeline-node-info {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
}

.timeline-node-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.timeline-node-purple {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

.timeline-node-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
}

.timeline-node-muted {
  background: linear-gradient(135deg, #64748B, #475569);
}

.timeline-node-navy {
  background: linear-gradient(135deg, #002D72, #001A40);
}

.timeline-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.timeline-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: var(--amasa-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-author-badge {
  font-size: 0.70rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-timestamp {
  font-size: 0.72rem;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.timeline-status-transition {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 0.25rem;
  color: #334155;
  font-weight: 600;
}

.timeline-status-transition i {
  font-size: 0.68rem;
  color: #94A3B8;
}

.timeline-desc {
  font-size: 0.85rem;
  color: #334155;
  margin-top: 0.4rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.timeline-metadata-box {
  background: #F8FAFC;
  border-left: 3px solid #94A3B8;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.76rem;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Feed Global de Auditoria (Admin Dashboard) */
.audit-feed-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.audit-feed-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.15s ease;
}

.audit-feed-item:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.audit-feed-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.audit-feed-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #FFFFFF;
  flex-shrink: 0;
}

.audit-feed-details {
  min-width: 0;
  flex: 1;
}

.audit-feed-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amasa-navy);
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.audit-feed-desc {
  font-size: 0.78rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-feed-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Componente de Laudos e Anexos em Tabelas (Sem sublinhado, cores executivas)
   ========================================================================== */
.table-docs-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 85px;
  max-width: 120px;
}

.table-doc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  padding: 2px 4px;
  text-decoration: none !important;
  color: #1E293B !important;
  transition: all 0.15s ease;
  font-size: 0.68rem;
  line-height: 1.15;
  box-sizing: border-box;
  width: 100%;
  height: 20px;
}

.table-doc-pill:hover {
  background-color: #EFF6FF;
  border-color: #93C5FD;
  color: #0F172A !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.table-doc-pill-info {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit !important;
}

.table-doc-pill-info:hover {
  text-decoration: none !important;
  color: inherit !important;
}

.table-doc-pill-icon {
  font-size: 0.72rem;
  color: #DC2626; /* PDF Red */
  flex-shrink: 0;
}

.table-doc-pill-icon.doc-icon-img {
  color: #0284C7;
}

.table-doc-pill-icon.doc-icon-generic {
  color: #64748B;
}

.table-doc-pill-name {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
  font-size: 0.68rem;
  text-decoration: none !important;
}

.table-doc-pill:hover .table-doc-pill-name {
  color: #002D72;
  text-decoration: none !important;
}

.table-doc-pill-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.table-doc-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  padding: 0;
  font-size: 0.62rem;
  transition: all 0.12s ease;
}

.table-doc-pill-btn:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #002D72;
}

.table-doc-pill-btn.btn-dl {
  color: #0284C7;
}

.table-doc-pill-btn.btn-dl:hover {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #059669;
}

.table-doc-more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  border: 1px dashed #CBD5E1;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin-top: 1px;
}

.table-doc-more-badge:hover {
  background: #E2E8F0;
  color: #002D72;
  border-color: #94A3B8;
}

/* =============================================================================
   PAINEL DE INDICADORES & DASHBOARD COM GRÁFICOS (BI)
   ============================================================================= */
.bi-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .bi-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.bi-chart-card {
  background: #FFFFFF;
  border: 1px solid var(--amasa-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bi-chart-card:hover {
  box-shadow: var(--shadow-md);
}

.bi-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bi-chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amasa-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bi-chart-body {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.bi-gauge-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bi-gauge-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amasa-navy);
  margin-top: -15px;
}

.bi-gauge-subtext {
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 500;
}

.bi-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.85rem;
  width: 100%;
}

.bi-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #334155;
}

.bi-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bi-bar-horizontal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.bi-bar-horizontal-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bi-bar-horizontal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.80rem;
  color: #1E293B;
  font-weight: 600;
}

.bi-bar-track {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.bi-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* =============================================================================
   CENTRAL DE EXPORTAÇÃO DE RELATÓRIOS & PRESTAÇÃO DE CONTAS MROSC
   ============================================================================= */
.mrosc-export-hub {
  background: #FFFFFF;
  border: 1px solid var(--amasa-border);
  border-left: 5px solid var(--amasa-green);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.mrosc-export-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.btn-export-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-export-option:hover {
  border-color: #3B82F6;
  background: #EFF6FF;
  color: #1E40AF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-export-option.excel:hover {
  border-color: #10B981;
  background: #ECFDF5;
  color: #065F46;
}

.btn-export-option.pdf:hover {
  border-color: #EF4444;
  background: #FEF2F2;
  color: #991B1B;
}

.btn-export-option.audesp:hover {
  border-color: #0284C7;
  background: #F0F9FF;
  color: #0369A1;
}

.btn-export-icon {
  font-size: 1.35rem;
  line-height: 1;
}

/* Tabelas de cadastro (médicos, pacientes, membros): botões de ação com o mesmo
   tamanho e estilo, distribuídos com espaçamento igual numa única linha */
.data-table td.cell-actions.cell-actions-cadastro,
.data-table th.cell-actions.cell-actions-cadastro {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 120px !important;
}

.cell-actions-cadastro .table-actions-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 6px !important;
  width: 102px !important;
  min-width: 102px !important;
  max-width: 102px !important;
}

.cell-actions-cadastro .table-actions-container .btn,
.cell-actions-cadastro .table-actions-container button {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.cell-actions-cadastro .table-actions-container .btn i,
.cell-actions-cadastro .table-actions-container button i {
  font-size: 0.95rem !important;
}

.cell-actions-cadastro .btn-action-whatsapp {
  color: #16A34A !important;
  background: #F0FDF4 !important;
  border-color: #86EFAC !important;
}

.cell-actions-cadastro .btn-action-whatsapp:hover {
  color: #15803D !important;
  background: #DCFCE7 !important;
  border-color: #4ADE80 !important;
}

.cell-actions-cadastro .btn-action-indicar {
  color: #1D4ED8 !important;
  background: #EFF6FF !important;
  border-color: #BFDBFE !important;
}

.cell-actions-cadastro .btn-action-indicar:hover {
  color: #1E40AF !important;
  background: #DBEAFE !important;
  border-color: #93C5FD !important;
}

.cell-actions-cadastro .table-actions-container .btn:disabled,
.cell-actions-cadastro .table-actions-container button:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* Abas internas do Painel Administrativo: botões de mesma largura, centralizados */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--amasa-border-light);
}

.admin-tabs .btn {
  flex: 0 1 220px;
  max-width: 100%;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .admin-tabs .btn {
    flex: 1 1 100%;
  }
}
