/**
 * Custom Theme - POC Teleconsulta
 * Primary Color: #2BB991 (Verde Turquesa Saúde)
 *
 * Este arquivo sobrescreve APENAS a cor primária do template Soft UI Dashboard.
 * Comportamento original do template é mantido, apenas a cor muda de #f97316 (laranja) para #2BB991 (verde).
 */

/* ========================================
   1. VARIÁVEIS CSS
   ======================================== */

:root {
  --bs-primary: #2BB991;
  --bs-primary-rgb: 43, 185, 145;
  --bs-primary-dark: #229977;
  --bs-primary-light: #4FDDB3;
}

/* ========================================
   AT-134: CALENDÁRIO FLATPICKR - INDICADORES DE DISPONIBILIDADE
   ======================================== */

/* Bolinha verde em datas com disponibilidade */
.flatpickr-calendar .flatpickr-day.has-availability::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: #2BB991;
  border-radius: 50%;
}

/* Garantir que a bolinha apareça mesmo em dias selecionados */
.flatpickr-calendar .flatpickr-day.has-availability.selected::after,
.flatpickr-calendar .flatpickr-day.has-availability.today::after {
  background-color: #fff;
}

/* ========================================
   2. MENU LATERAL (SIDENAV)
   ======================================== */

/* Remover scroll interno do sidenav - menu deve ocupar altura completa */
.sidenav {
  max-height: calc(100vh - 2rem) !important; /* Altura total menos margem */
  overflow-y: auto !important;
}

.sidenav .navbar-collapse {
  max-height: none !important;
  overflow: visible !important;
}

/* Menu item INATIVO - ícone escuro (comportamento do template) */
.navbar-vertical .navbar-nav>.nav-item .nav-link:not(.active) .icon {
  color: #27272a !important; /* cor escura padrão do template */
}

.navbar-vertical .navbar-nav>.nav-item .nav-link:not(.active) .icon i {
  color: #27272a !important; /* garante que Font Awesome <i> fique escuro */
}

/* Menu item ATIVO - Comportamento exato do template, apenas mudando cor */
.navbar-vertical .navbar-nav>.nav-item .nav-link.active .icon {
  background-image: linear-gradient(310deg, #2BB991 0%, #2BB991 100%) !important;
  color: #fff !important;
}

.navbar-vertical .navbar-nav>.nav-item .nav-link.active .icon i {
  color: #fff !important; /* garante que Font Awesome <i> fique branco quando ativo */
}

/* SVG fill para ícones no menu ativo (caso usemos SVG futuramente) */
.navbar-vertical .navbar-nav>.nav-item .nav-link.active .icon svg .color-background,
.navbar-vertical .navbar-nav>.nav-item .nav-link.active .icon svg .color-foreground {
  fill: #fff !important;
}

/* Menu com data-color="primary" */
.sidenav[data-color=primary] .navbar-nav>.nav-item>.nav-link.active .icon {
  background-image: linear-gradient(310deg, #2BB991 0%, #2BB991 100%) !important;
}

/* ========================================
   3. BOTÕES
   ======================================== */

/* Botão primário sólido */
.btn-primary {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #229977 !important;
  border-color: #229977 !important;
  color: #fff !important;
}

/* Botão outline primário */
.btn-outline-primary {
  color: #2BB991 !important;
  border-color: #2BB991 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
  color: white !important;
}

/* Botão outline primário ATIVO (usado nos filtros de período - US-010) */
.btn-outline-primary.active {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
  color: white !important;
}

/* ========================================
   4. WIZARD / STEPPER
   ======================================== */

/* Passo ativo do wizard */
.wizard-step.active .wizard-step-circle {
  background: linear-gradient(310deg, #229977, #4FDDB3) !important;
  border-color: #2BB991 !important;
  box-shadow: 0 4px 10px rgba(43, 185, 145, 0.4) !important;
}

/* Passo completado */
.wizard-step.completed .wizard-step-circle {
  background: #2BB991 !important;
  border-color: #2BB991 !important;
}

/* ========================================
   5. CALENDÁRIO FLATPICKR
   ======================================== */

/* Data selecionada - todos os estados (precisa de .flatpickr-calendar para ter especificidade maior) */
.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.selected:hover,
.flatpickr-calendar .flatpickr-day.selected:focus,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange,
.flatpickr-calendar .flatpickr-day.selected.inRange,
.flatpickr-calendar .flatpickr-day.startRange.inRange,
.flatpickr-calendar .flatpickr-day.endRange.inRange,
.flatpickr-calendar .flatpickr-day.selected.startRange,
.flatpickr-calendar .flatpickr-day.selected.endRange,
.flatpickr-calendar .flatpickr-day.startRange.startRange,
.flatpickr-calendar .flatpickr-day.endRange.endRange {
  background: #2BB991 !important;
  border-color: #2BB991 !important;
  color: white !important;
}

/* Dias desabilitados NUNCA devem parecer selecionados */
.flatpickr-calendar .flatpickr-day.flatpickr-disabled,
.flatpickr-calendar .flatpickr-day.flatpickr-disabled:hover,
.flatpickr-calendar .flatpickr-day.flatpickr-disabled.selected,
.flatpickr-calendar .flatpickr-day.flatpickr-disabled.today,
.flatpickr-calendar .flatpickr-day.flatpickr-disabled.today.selected {
  background: transparent !important;
  border-color: transparent !important;
  color: rgba(57,57,57,0.3) !important;
  cursor: not-allowed !important;
}

/* Box shadow para ranges (substitui laranja por verde) */
.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),
.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)) {
  box-shadow: -10px 0 0 #2BB991 !important;
}

/* Hover em dias disponíveis */
.flatpickr-calendar .flatpickr-day:not(.selected):hover,
.flatpickr-calendar .flatpickr-day:not(.selected):focus {
  background: rgba(43, 185, 145, 0.1) !important;
  border-color: #2BB991 !important;
}

/* Indicador de disponibilidade - mantém verde original */
.flatpickr-day.has-availability::after {
  background: #17ad37 !important;
}

/* ========================================
   6. FORMS
   ======================================== */

/* Input com foco */
.form-control:focus {
  border-color: #2BB991 !important;
  box-shadow: 0 0 0 0.2rem rgba(43, 185, 145, 0.25) !important;
}

/* Checkbox/Radio selecionado */
.form-check-input:checked {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
}

/* ========================================
   7. UTILITÁRIOS - Borders, Backgrounds, Text
   ======================================== */

/* Bordas primárias */
.border-primary {
  border-color: #2BB991 !important;
}

/* Backgrounds primários */
.bg-primary {
  background-color: #2BB991 !important;
}

.bg-gradient-primary {
  background-image: linear-gradient(310deg, #229977, #4FDDB3) !important;
}

/* Textos primários */
.text-primary {
  color: #2BB991 !important;
}

/* Links - EXCETO menu de navegação e breadcrumb */
a:not(.nav-link):not(.breadcrumb-item) {
  color: #2BB991 !important;
}

a:not(.nav-link):not(.breadcrumb-item):hover {
  color: #229977 !important;
}

/* ========================================
   8. BADGES
   ======================================== */

.badge.bg-primary {
  background-color: #2BB991 !important;
}

/* ========================================
   9. OUTROS COMPONENTES ESPECÍFICOS
   ======================================== */

/* Dropdown ativo */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #2BB991 !important;
}

/* Pagination ativa */
.page-item.active .page-link {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
}

.page-link {
  color: #2BB991 !important;
}

.page-link:hover {
  color: #229977 !important;
}

/* Progress bar */
.progress-bar.bg-primary {
  background-color: #2BB991 !important;
}

/* List group ativo */
.list-group-item.active {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
}

/* Scrollbar (Chrome/Edge) */
::-webkit-scrollbar-thumb {
  background-color: #2BB991 !important;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #229977 !important;
}

/* Nav Pills Primary */
.nav.nav-pills.nav-pills-primary .moving-tab .nav-link.active {
  background: #2BB991 !important;
  color: #2BB991 !important;
}

/* ========================================
   10. PAGAMENTO (US-004)
   ======================================== */

/* Opções de pagamento */
.payment-option {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.payment-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.payment-option.border-primary {
  border-color: #2BB991 !important;
}

/* Card de resumo de valor */
.card.bg-gradient-primary {
  background-image: linear-gradient(310deg, #229977, #4FDDB3) !important;
}

/* ========================================
   11. TIMER BADGE (DEFECT-001 Fix)
   ======================================== */

/* Timer Badge - Sem gradiente, fundo sólido amarelo, texto branco */
.timer-badge.alert-warning {
  background-image: none !important;
  background-color: #eab308 !important; /* Amarelo sólido */
  color: #ffffff !important; /* Texto branco */
}

.timer-badge.alert-warning h6,
.timer-badge.alert-warning h3,
.timer-badge.alert-warning i {
  color: #ffffff !important; /* Garantir que títulos e ícones sejam brancos */
}

/* Timer Badge quando vira vermelho (< 5 minutos) */
.timer-badge.alert-danger {
  background-image: none !important;
  background-color: #ef4444 !important; /* Vermelho sólido */
  color: #ffffff !important; /* Texto branco */
}

.timer-badge.alert-danger h6,
.timer-badge.alert-danger h3,
.timer-badge.alert-danger i {
  color: #ffffff !important;
}

/* ========================================
   11b. RESERVATION TOAST TIMER (AT-504)
   ======================================== */

/* Toast container - posicionado no canto superior direito do card */
.reservation-toast {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2px solid #2BB991;
  border-radius: 24px;
  padding: 6px 14px 6px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* SVG ring (progress circular) */
.reservation-toast-ring {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px;
  max-height: 32px;
  min-width: 32px;
  transform: rotate(-90deg);
  flex-shrink: 0;
  overflow: visible;
}

.reservation-toast-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 3;
}

.reservation-toast-ring-fg {
  fill: none;
  stroke: #2BB991;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

/* Texto do timer (MM:SS) */
.reservation-toast-time {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #344767;
  min-width: 38px;
}

/* Label "Reserva expira em" */
.reservation-toast-label {
  font-size: 11px;
  color: #67748e;
  white-space: nowrap;
}

/* Estado warning (< 2 minutos) */
.reservation-toast.toast-warning {
  border-color: #F59E0B;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.25);
}

.reservation-toast.toast-warning .reservation-toast-ring-fg {
  stroke: #F59E0B;
}

.reservation-toast.toast-warning .reservation-toast-time {
  color: #F59E0B;
}

/* Estado danger (< 1 minuto) */
.reservation-toast.toast-danger {
  border-color: #EF4444;
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.3);
  animation: toast-pulse 1s ease-in-out infinite;
}

.reservation-toast.toast-danger .reservation-toast-ring-fg {
  stroke: #EF4444;
}

.reservation-toast.toast-danger .reservation-toast-time {
  color: #EF4444;
}

@keyframes toast-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Mobile: reflow para abaixo do stepper */
@media (max-width: 768px) {
  .reservation-toast {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    margin: 0 auto 12px auto;
    width: fit-content;
  }
}

/* ========================================
   12. LOGIN SOCIAL BUTTONS (US-008)
   ======================================== */

/* Botões de login social - estilo base */
.btn-social-login {
  font-weight: 500;
  padding: 12px 20px;
  transition: all 0.3s ease;
  border-width: 2px;
}

.btn-social-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Botão Google - branco com borda cinza */
#btn-google {
  background-color: #ffffff;
  border-color: #e5e7eb;
  color: #374151;
}

#btn-google:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

#btn-google i.fa-google {
  font-size: 1.1rem;
}

/* Botão SSO - branco em repouso, azul no hover */
#btn-sso {
  background-color: #ffffff;
  border-color: #e5e7eb;
  color: #374151;
}

#btn-sso:hover,
#btn-sso:focus,
#btn-sso:active {
  background-color: #0078D4;
  border-color: #0078D4;
  color: #ffffff;
}

#btn-sso i {
  transition: color 0.3s ease;
}

/* Divider "OU" customizado */
.horizontal.dark {
  opacity: 0.2;
}

/* Loading state para botões */
.btn-social-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Overlay escuro na imagem de login */
.oblique-image .overlay-dark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1;
}

/* ========================================
   13. MODAL PACIENTE (US-020)
   ======================================== */

/* Modal de Paciente - Garantir estilos consistentes */
#modalDetalhesPaciente .modal-header {
  padding: 1.5rem;
  align-items: flex-start; /* Alinha botão [X] ao topo */
}

#modalDetalhesPaciente .modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

#modalDetalhesPaciente .badge-lg {
  padding: 0.4rem 0.8rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0; /* Badge não encolhe em telas pequenas */
  white-space: nowrap; /* Badge não quebra texto internamente */
}

#modalDetalhesPaciente .bg-gray-100 {
  background-color: #f8f9fa;
}

/* Botão Ver Detalhes Completos - Sempre verde */
#btn-ver-detalhes-paciente-completos {
  background: linear-gradient(310deg, #2BB991, #229977) !important;
  border: none !important;
  transition: all 0.3s ease;
}

#btn-ver-detalhes-paciente-completos:hover {
  background: linear-gradient(310deg, #229977, #1a7a5e) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(43, 185, 145, 0.3);
}

/* Card de Última Consulta com fundo verde */
#modalDetalhesPaciente .bg-gradient-primary {
  background: linear-gradient(310deg, #2BB991, #229977) !important;
}

/* Responsividade do modal em mobile */
@media (max-width: 768px) {
  #modalDetalhesPaciente .modal-dialog {
    margin: 0.5rem;
  }

  #modalDetalhesPaciente .modal-header {
    padding: 1rem;
  }

  #modalDetalhesPaciente .modal-title {
    font-size: 1rem;
  }

  #modalDetalhesPaciente .badge-lg {
    font-size: 0.65rem;
    padding: 0.35rem 0.7rem;
  }

  #modalDetalhesPaciente .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  #modalDetalhesPaciente .modal-footer button {
    width: 100%;
  }
}

/* Mobile extra pequeno: Badge quebra para linha de baixo */
@media (max-width: 576px) {
  #modalDetalhesPaciente .modal-title {
    font-size: 0.95rem;
  }
}

/* ========================================
   14. INTEGRAÇÕES - WEBHOOKS (US-021)
   ======================================== */

/* Empty State - Estado vazio com exemplos */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: #F7FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon i {
  font-size: 3.5rem;
  color: #718096;
}

.empty-state h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
  color: #718096;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Exemplos de integração */
.empty-state-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem auto;
  max-width: 700px;
}

.empty-state-example {
  padding: 1.5rem 1rem;
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.empty-state-example:hover {
  border-color: #2BB991;
  box-shadow: 0 2px 8px rgba(43, 185, 145, 0.1);
}

.empty-state-example i {
  font-size: 2rem;
  color: #718096;
  display: block;
  margin-bottom: 0.75rem;
}

.empty-state-example strong {
  color: #2D3748;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.25rem;
}

.empty-state-example small {
  color: #718096;
  font-size: 0.85rem;
}

/* Webhook Card */
.webhook-card {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: #FFFFFF;
}

.webhook-card:hover {
  border-color: #2BB991;
  box-shadow: 0 2px 8px rgba(43, 185, 145, 0.1);
}

.webhook-card.inactive {
  opacity: 0.6;
  background: #F7FAFC;
}

.webhook-card.inactive:hover {
  opacity: 0.8;
}

/* Webhook Header */
.webhook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.webhook-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2D3748;
  flex: 1;
}

/* Webhook Status Badge */
.webhook-status {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.webhook-status.active {
  background: #D1FAE5;
  color: #065F46;
}

.webhook-status.inactive {
  background: #F3F4F6;
  color: #6B7280;
}

/* Webhook URL */
.webhook-url {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #718096;
  background: #F7FAFC;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

/* Event Pills */
.evento-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #2D3748;
  font-family: 'Courier New', monospace;
}

/* Webhook Stats */
.webhook-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #718096;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #E2E8F0;
}

.webhook-stat-value {
  font-weight: 600;
  color: #2D3748;
}

.webhook-stat-value.success {
  color: #10B981;
}

.webhook-stat-value.error {
  color: #EF4444;
}

/* Wizard Modal */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #E2E8F0;
  z-index: 0;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.wizard-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F7FAFC;
  border: 2px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #718096;
  margin-bottom: 0.5rem;
}

.wizard-step.active .wizard-step-circle {
  background: #2BB991;
  border-color: #2BB991;
  color: white;
}

.wizard-step.completed .wizard-step-circle {
  background: #10B981;
  border-color: #10B981;
  color: white;
}

.wizard-step-label {
  font-size: 0.85rem;
  color: #718096;
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: #2D3748;
  font-weight: 600;
}

/* Wizard Option Cards */
.wizard-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.wizard-option-card {
  padding: 1.5rem 1rem;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #FFFFFF;
}

.wizard-option-card:hover {
  border-color: #2BB991;
  box-shadow: 0 2px 8px rgba(43, 185, 145, 0.1);
  transform: translateY(-2px);
}

.wizard-option-card.selected {
  border-color: #2BB991;
  background: #F0FDF4;
}

.wizard-option-card i {
  font-size: 2.5rem;
  color: #718096;
  display: block;
  margin-bottom: 1rem;
}

.wizard-option-card.selected i {
  color: #2BB991;
}

.wizard-option-card strong {
  display: block;
  color: #2D3748;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.wizard-option-card small {
  color: #718096;
  font-size: 0.85rem;
}

/* Event Selector Accordion */
.eventos-accordion .accordion-item {
  border: 1px solid #E2E8F0;
  border-radius: 8px !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.eventos-accordion .accordion-button {
  background: #F7FAFC;
  color: #2D3748;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border: none;
}

.eventos-accordion .accordion-button:not(.collapsed) {
  background: #F0FDF4;
  color: #2BB991;
  box-shadow: none;
}

.eventos-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: #E2E8F0;
}

.eventos-accordion .accordion-button::after {
  filter: brightness(0.7);
}

.eventos-accordion .accordion-body {
  padding: 1rem 1.25rem;
  background: #FFFFFF;
}

/* Event Checkbox Items */
.evento-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #F3F4F6;
}

.evento-item:last-child {
  border-bottom: none;
}

.evento-item .form-check-label {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.evento-item strong {
  color: #2D3748;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
}

.evento-item small {
  color: #718096;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Event Checkbox Items (Modal Webhook) */
.evento-checkbox-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.2s ease;
}

.evento-checkbox-item:hover {
  background: #F7FAFC;
}

.evento-checkbox-item:last-child {
  border-bottom: none;
}

.evento-checkbox-label {
  display: flex;
  align-items: start;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.evento-checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #CBD5E0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
}

.evento-checkbox-label input[type="checkbox"]:hover {
  border-color: #2BB991;
}

.evento-checkbox-label input[type="checkbox"]:checked {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
  background-image: none !important;
}

.evento-checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.evento-checkbox-label input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(43, 185, 145, 0.1);
}

.evento-checkbox-label > div {
  flex: 1;
}

.evento-checkbox-name {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 0.25rem;
}

.evento-checkbox-desc {
  font-size: 0.85rem;
  color: #718096;
  line-height: 1.4;
}

/* Logs Table */
.logs-table {
  font-size: 0.9rem;
}

.logs-table th {
  font-weight: 600;
  color: #2D3748;
  background: #F7FAFC;
  border-bottom: 2px solid #E2E8F0;
  padding: 0.75rem 1rem;
}

.logs-table td {
  padding: 0.75rem 1rem;
  color: #718096;
  vertical-align: middle;
}

.logs-table tr:hover {
  background: #F7FAFC;
}

/* Log Status Badges */
.log-status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.log-status-badge.success {
  background: #D1FAE5;
  color: #065F46;
}

.log-status-badge.error {
  background: #FEE2E2;
  color: #991B1B;
}

.log-status-badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

/* HTTP Status Badge */
.http-status {
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.http-status.success {
  color: #10B981;
}

.http-status.error {
  color: #EF4444;
}

/* JSON Viewer */
.json-viewer {
  background: #1E293B;
  color: #E2E8F0;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  max-height: 400px;
  overflow-y: auto;
  position: relative;
}

.json-viewer pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.json-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: #334155;
  color: #E2E8F0;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.json-copy-btn:hover {
  background: #475569;
}

.json-copy-btn.copied {
  background: #10B981;
  color: white;
}

/* Documentation Modal */
.doc-section h6 {
  color: #2D3748;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.doc-section p {
  color: #718096;
  line-height: 1.6;
}

.doc-section pre {
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

.doc-section code {
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #2BB991;
}

/* Responsividade Webhooks */
@media (max-width: 768px) {
  .empty-state {
    padding: 2rem 1rem;
  }

  .empty-state-icon {
    width: 80px;
    height: 80px;
  }

  .empty-state-icon i {
    font-size: 2.5rem;
  }

  .empty-state h3 {
    font-size: 1.5rem;
  }

  .empty-state-examples {
    grid-template-columns: 1fr;
  }

  .webhook-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .webhook-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .wizard-option-grid {
    grid-template-columns: 1fr;
  }

  .logs-table {
    font-size: 0.8rem;
  }

  .logs-table th,
  .logs-table td {
    padding: 0.5rem;
  }
}

/* Webhooks Container Card */
.webhooks-container-card .card-header {
  background: #F7FAFC;
  border-bottom: 2px solid #E2E8F0;
  padding: 1.25rem 1.5rem;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: white;
  color: #718096;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-pill:hover:not(.active) {
  border-color: #2BB991;
  color: #2BB991;
  background: #F0FDF4;
}

.filter-pill.active {
  background: #2BB991;
  color: white;
  border-color: #2BB991;
}

.filter-pill span {
  font-weight: 600;
}

/* Webhook Status Badge - GRANDE */
.webhook-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.webhook-status-badge i {
  font-size: 0.75rem;
}

.webhook-status-badge.active {
  background: #D1FAE5;
  color: #065F46;
}

.webhook-status-badge.inactive {
  background: #FEF3C7;
  color: #92400E;
}

.webhook-status-badge.error {
  background: #FEE2E2;
  color: #991B1B;
}

/* Webhook Health Metrics */
.webhook-health {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #F3F4F6;
  font-size: 0.9rem;
  color: #718096;
}

.health-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.health-metric i {
  font-size: 0.85rem;
}

.health-metric.success {
  color: #10B981;
}

.health-metric.success i {
  color: #10B981;
}

.health-metric.warning {
  color: #F59E0B;
}

.health-metric.warning i {
  color: #F59E0B;
}

.health-metric.error {
  color: #EF4444;
}

.health-metric.error i {
  color: #EF4444;
}

.health-separator {
  color: #E2E8F0;
  margin: 0 0.25rem;
}

/* Webhook Alert Contextual */
.webhook-alert {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.webhook-alert i {
  font-size: 1rem;
  flex-shrink: 0;
}

.webhook-alert.warning {
  background: #FEF3C7;
  color: #92400E;
  border-left: 3px solid #F59E0B;
}

.webhook-alert.info {
  background: #DBEAFE;
  color: #1E40AF;
  border-left: 3px solid #3B82F6;
}

.webhook-alert.danger {
  background: #FEE2E2;
  color: #991B1B;
  border-left: 3px solid #EF4444;
}

/* Webhook Card Adjustments */
.webhook-card .card-body {
  padding: 1.5rem;
}

/* ========================================
   US-022: EMPRESAS
   ======================================== */

/* Empresa Card */
.empresa-card {
  border: 1px solid #E2E8F0;
  transition: all 0.2s ease;
}

.empresa-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Ícone da Empresa */
.empresa-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #718096;
  flex-shrink: 0;
}

/* Status Badge de Empresa - GRANDE */
.empresa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.empresa-status-badge.active {
  background: #D1FAE5;
  color: #065F46;
}

.empresa-status-badge.active i {
  color: #10B981;
}

.empresa-status-badge.inactive {
  background: #FEF3C7;
  color: #92400E;
}

.empresa-status-badge.inactive i {
  color: #F59E0B;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .empresa-card .d-flex {
    flex-direction: column;
    gap: 1rem;
  }

  .empresa-status-badge {
    width: 100%;
    justify-content: center;
  }

  .filter-pills {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-pill {
    width: 100%;
  }
}

.webhook-card .webhook-url {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Responsive - Filter Pills */
@media (max-width: 768px) {
  .webhooks-container-card .card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .filter-pills {
    width: 100%;
  }

  .filter-pill {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .webhook-status-badge {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .webhook-health {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ========================================
   PAGINAÇÃO
   ======================================== */

/* Página ativa - fundo verde com texto branco */
.pagination .page-item.active .page-link {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
  color: #fff !important;
}

/* Hover em páginas não-ativas */
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  background-color: #f7fafc;
  border-color: #e2e8f0;
  color: #2BB991;
}

/* ========================================
   CALENDÁRIO: INDICADORES DE DISPONIBILIDADE
   ======================================== */

/* Container do indicador (dot + quantidade) */
.disponibilidade-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #2BB991;
  margin-top: 2px;
  justify-content: center;
}

/* Dot verde (6px) */
.disponibilidade-indicator .dot-verde {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2BB991;
  flex-shrink: 0;
}

/* Quantidade de slots */
.disponibilidade-indicator .qtd-slots {
  font-weight: 600;
  line-height: 1;
}

/* Ajuste do layout da célula customizada */
.fc-daygrid-day-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px;
}

/* Número do dia centralizado */
.fc-daygrid-day-top .fc-daygrid-day-number {
  margin-bottom: 2px;
}

/* ========================================
   LEGENDA VISUAL DE DISPONIBILIDADE
   ======================================== */

.legenda-disponibilidade {
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.legenda-disponibilidade .legenda-titulo {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #718096;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.legenda-disponibilidade .legenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #2D3748;
  margin-bottom: 6px;
}

.legenda-disponibilidade .legenda-item:last-child {
  margin-bottom: 0;
}

.legenda-disponibilidade .legenda-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legenda-disponibilidade .legenda-dot.alto {
  background: #229977; /* Verde escuro */
}

.legenda-disponibilidade .legenda-dot.medio {
  background: #2BB991; /* Verde médio */
}

.legenda-disponibilidade .legenda-dot.baixo {
  background: #4FDDB3; /* Verde claro */
}

.legenda-disponibilidade .legenda-dot.nenhum {
  background: #E2E8F0; /* Cinza */
}

/* ========================================
   FILTRO: APENAS DIAS COM DISPONIBILIDADE
   ======================================== */

/* Ocultar dias sem disponibilidade quando filtro ativo */
body.filtro-apenas-disponiveis .fc-daygrid-day:not(.com-disponibilidade) {
  opacity: 0.3;
  pointer-events: none;
}

/* Marcar dias com disponibilidade para o filtro */
.fc-daygrid-day.com-disponibilidade {
  /* Aplicado via JavaScript baseado no cache */
}

/* ========================================
   FULLCALENDAR: DIA ATUAL (AT-173)
   ======================================== */

/* Substituir fundo amarelo feio por borda verde elegante */
.fc-day-today {
  background-color: transparent !important; /* Remove amarelo */
}

.fc-day-today .fc-daygrid-day-frame {
  border: 2px solid #2BB991 !important; /* Borda verde */
  border-radius: 6px !important;
  background-color: rgba(43, 185, 145, 0.03) !important; /* Verde suave (3% opacidade) */
}

/* Número do dia atual com destaque sutil */
.fc-day-today .fc-daygrid-day-number {
  font-weight: 700 !important;
  color: #2BB991 !important;
}

/* ========================================
   BADGES SOFT (AT-173: INSIGHTS INTELIGENTES)
   ======================================== */

/* Badge soft primary (usado em timeline de próximos eventos) */
.badge-soft-primary {
  background-color: rgba(43, 185, 145, 0.1) !important;
  color: #2BB991 !important;
  border: 1px solid rgba(43, 185, 145, 0.2) !important;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

/* Hover em badges soft */
.badge-soft-primary:hover {
  background-color: rgba(43, 185, 145, 0.15) !important;
  border-color: rgba(43, 185, 145, 0.3) !important;
}

/* ========================================
   AT-252: TOGGLE VIEW/EDIT MODE (BUSCA GLOBAL)
   ======================================== */

/* Botão toggle customizado - padrão MaisLaudo */
.btn-toggle-custom {
  border-color: #2BB991 !important;
  color: #2BB991 !important;
  background-color: transparent !important;
}

.btn-toggle-custom:hover {
  background-color: rgba(43, 185, 145, 0.1) !important;
  border-color: #2BB991 !important;
  color: #2BB991 !important;
}

/* Estado ativo (checked) - fundo verde, texto branco */
.btn-check:checked + .btn-toggle-custom {
  background-color: #2BB991 !important;
  border-color: #2BB991 !important;
  color: white !important;
}

.btn-check:checked + .btn-toggle-custom:hover {
  background-color: #229977 !important;
  border-color: #229977 !important;
}

/* ========================================
   AT-131: SLIDER CUSTOMIZÁVEL DE CRÉDITOS
   ======================================== */

/* Slider visual - trilha e thumb customizados */
.slider-creditos {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #2BB991 0%, #2BB991 0%, #E2E8F0 0%, #E2E8F0 100%);
  outline: none;
  transition: background 0.3s ease;
}

.slider-creditos::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2BB991;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider-creditos::-webkit-slider-thumb:hover {
  background: #229977;
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.slider-creditos::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2BB991;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider-creditos::-moz-range-thumb:hover {
  background: #229977;
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Input numérico customizado */
.input-valor-creditos {
  text-align: right;
  font-weight: 600;
  font-size: 0.95rem;
}

.input-valor-creditos:focus {
  border-color: #2BB991;
  box-shadow: 0 0 0 0.2rem rgba(43, 185, 145, 0.25);
}

/* Input com validação inválida */
.input-valor-creditos.is-invalid {
  border-color: #F59E0B;
  background-color: #FEF3C7;
}

/* Atalhos rápidos */
.atalho-credito,
.atalho-credito-max {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.atalho-credito:hover {
  background-color: #F7FAFC;
  border-color: #2BB991;
  color: #2BB991;
}

.atalho-credito-max {
  font-weight: 600;
}

/* Preview de créditos */
#preview-creditos {
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  transition: all 0.3s ease;
}

#preview-creditos i {
  font-size: 0.85rem;
}

/* Mensagem de validação */
#validacao-creditos {
  color: #F59E0B;
  font-weight: 500;
}

#validacao-creditos.sucesso {
  color: #10B981;
}

/* Responsividade */
@media (max-width: 576px) {
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 0.5rem !important;
  }

  .input-group {
    max-width: 100% !important;
  }

  .d-flex.gap-1 {
    flex-direction: column;
    gap: 0.5rem !important;
  }

  .atalho-credito,
  .atalho-credito-max {
    width: 100%;
  }
}

/* ========================================
   AT-132: MODAL ADICIONAR SALDO À CARTEIRA (REFATORADO V2)
   ======================================== */

/* Header Profissional com Background Verde */
.modal-header-adicionar-saldo {
  background: linear-gradient(310deg, #2BB991, #229977);
  color: #FFFFFF;
  padding: 24px 32px;
  border-bottom: none;
}

/* ========================================
   BOTÕES DE ATALHO RÁPIDO
   ======================================== */

.valores-rapidos-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.atalho-valor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  padding: 20px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;

  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.atalho-valor:hover {
  border-color: #2BB991;
  background: rgba(43, 185, 145, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 185, 145, 0.1);
}

.atalho-valor:active {
  transform: translateY(0);
}

.atalho-valor.selecionado {
  border-color: #2BB991;
  background: rgba(43, 185, 145, 0.1);
  border-width: 3px;
}

.atalho-valor-principal {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2D3748;
  line-height: 1;
}

.atalho-valor-bonus {
  font-size: 0.875rem;
  font-weight: 600;
  color: #10B981;
}

/* Destaque para R$ 1.000 (Premium com 10%) */
.atalho-valor.premium {
  border-color: #F59E0B;
  position: relative;
}

.atalho-valor.premium:hover {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.atalho-valor.premium .atalho-valor-bonus {
  color: #F59E0B;
}

/* ========================================
   INPUT PERSONALIZADO INLINE
   ======================================== */

.input-valor-inline-container {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-valor-inline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 20px;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  transition: all 0.2s ease;
}

.input-valor-inline:focus-within {
  border-color: #2BB991;
  background: rgba(43, 185, 145, 0.02);
  box-shadow: 0 0 0 3px rgba(43, 185, 145, 0.1);
}

.input-prefix {
  font-size: 1.25rem;
  font-weight: 600;
  color: #718096;
}

.input-valor-inline-field {
  flex: 0 0 120px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2D3748;
  padding: 0;
  outline: none;
}

.input-valor-inline-field::placeholder {
  color: #CBD5E0;
  font-weight: 500;
}

.input-valor-inline .input-check-icon {
  position: static;
  transform: none;
  color: #10B981;
  font-size: 1.25rem;
  animation: checkAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bonus-preview {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
}

.bonus-preview-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #10B981;
}

.btn-continuar-personalizado {
  flex: 0 0 auto;
  padding: 12px 32px;
  font-weight: 600;
  white-space: nowrap;
}

/* ========================================
   CALLOUT INFORMATIVO
   ======================================== */

.callout-bonus-info {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #2D3748;
}

.callout-bonus-info i {
  color: #F59E0B;
  font-size: 1rem;
}

.callout-bonus-info strong {
  color: #F59E0B;
}

/* ========================================
   RESPONSIVIDADE MOBILE (AT-132 V2)
   ======================================== */

@media (max-width: 768px) {
  .valores-rapidos-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .atalho-valor {
    padding: 16px 12px;
  }

  .atalho-valor-principal {
    font-size: 1.25rem;
  }

  .atalho-valor-bonus {
    font-size: 0.75rem;
  }

  .input-valor-inline-container {
    flex-direction: column;
  }

  .input-valor-inline-field {
    flex: 1;
  }

  .btn-continuar-personalizado {
    width: 100%;
  }
}

/* ========================================
   AT-132 V3: ANIMAÇÕES SLIDE-DOWN
   ======================================== */

#resumo-compra-section,
#metodos-pagamento-section {
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

.modal-header-adicionar-saldo .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: #FFFFFF;
}

.modal-icon-wallet {
  font-size: 1.5rem;
  color: #FFFFFF;
  opacity: 0.9;
}

/* Section Headers (uppercase, cinza, letter-spacing) */
.section-header {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
}

/* Card de Valor Personalizado */
.card-valor-personalizado {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Input com Validação Inline */
.input-with-validation {
  position: relative;
}

.input-valor-personalizado {
  padding-right: 45px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  height: 48px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.input-valor-personalizado:focus {
  border: 2px solid #2BB991;
  box-shadow: 0 0 0 3px rgba(43, 185, 145, 0.1);
  outline: none;
}

.input-valor-personalizado.is-valid {
  border: 2px solid #10B981;
}

.input-valor-personalizado.is-invalid {
  border: 2px solid #EF4444;
}

.input-check-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #10B981;
  font-size: 1.25rem;
  animation: checkAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkAppear {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.5);
  }
  50% {
    transform: translateY(-50%) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Preview do Bônus */
.preview-bonus-card {
  background: rgba(43, 185, 145, 0.05);
  border: 1px solid rgba(43, 185, 145, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
}

.preview-breakdown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #718096;
  margin-bottom: 4px;
}

.preview-valor {
  color: #2D3748;
  font-weight: 500;
}

.preview-plus {
  color: #10B981;
  font-weight: 700;
}

.preview-bonus {
  color: #10B981;
  font-weight: 600;
}

.preview-label-bonus {
  font-size: 0.75rem;
  color: #718096;
}

.preview-total {
  color: #2BB991;
  font-weight: 700;
  font-size: 1.5rem;
}

/* Resumo de Compra (Card Dedicado) */
.resumo-compra-card {
  background: rgba(43, 185, 145, 0.05);
  border: 1px solid rgba(43, 185, 145, 0.2);
  border-radius: 12px;
  padding: 20px 24px;
}

.resumo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.resumo-label {
  font-size: 1rem;
  font-weight: 400;
  color: #2D3748;
}

.resumo-value {
  font-size: 1rem;
  font-weight: 600;
  color: #2D3748;
}

.resumo-bonus-text {
  color: #10B981;
}

.resumo-divider {
  height: 1px;
  background: rgba(43, 185, 145, 0.2);
  margin: 12px 0;
}

.resumo-total-item {
  padding-top: 12px;
}

.resumo-label-total {
  font-size: 1rem;
  font-weight: 600;
  color: #2D3748;
}

.resumo-total {
  color: #2BB991;
  font-weight: 700;
  font-size: 1.5rem;
}

/* Métodos de Pagamento v2 */
.metodo-pagamento-v2 {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.metodo-pagamento-v2:hover {
  border: 1px solid #2BB991;
  background: rgba(43, 185, 145, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 185, 145, 0.1);
}

.metodo-pagamento-v2.selecionado {
  border: 2px solid #2BB991;
  background: rgba(43, 185, 145, 0.1);
}

.metodo-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(43, 185, 145, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metodo-icon i {
  font-size: 1.5rem;
  color: #2BB991;
}

.metodo-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: #2D3748;
}

.metodo-descricao {
  font-size: 0.875rem;
  color: #718096;
}

.metodo-check .check-icon {
  font-size: 1.5rem;
  color: #2BB991;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metodo-pagamento-v2.selecionado .check-icon {
  animation: checkAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botão Confirmar Pagamento */
.btn-confirmar-pagamento {
  background: #2BB991;
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 32px;
  transition: all 0.2s ease;
}

.btn-confirmar-pagamento:hover:not(:disabled) {
  background: #229977;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 185, 145, 0.3);
}

.btn-confirmar-pagamento:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal Footer */
.modal-footer-adicionar-saldo {
  padding: 20px 32px;
  border-top: 1px solid #E2E8F0;
}

.modal-footer-adicionar-saldo .btn-outline-secondary {
  color: #718096;
  border: 1px solid #E2E8F0;
  background: transparent;
}

.modal-footer-adicionar-saldo .btn-outline-secondary:hover {
  background: #F7FAFC;
  border-color: #CBD5E0;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .modal-header-adicionar-saldo {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer-adicionar-saldo {
    padding: 16px 20px;
  }

  .preview-total {
    font-size: 1.25rem;
  }

  .resumo-total {
    font-size: 1.25rem;
  }

  .metodo-pagamento-v2 {
    padding: 16px;
  }

  .metodo-icon {
    width: 40px;
    height: 40px;
  }

  .metodo-icon i {
    font-size: 1.25rem;
  }

  /* Botões full-width em mobile */
  .modal-footer-adicionar-saldo {
    flex-direction: column;
    gap: 12px;
  }

  .modal-footer-adicionar-saldo .btn {
    width: 100%;
  }

  /* Touch targets mínimo 44px */
  .btn-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Animações Suaves */
.modal-content {
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   AT-541: CALENDÁRIO - SLOTS POR ESPECIALIDADE
   Cores por especialidade, overflow "+N mais", modal
   ======================================== */

/* Evento de disponibilidade — container transparente, visual nos chips */
.evento-disponibilidade {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  cursor: pointer !important;
}

/* Conteúdo interno do slot — container dos chips */
.slot-disponivel-content {
  padding: 2px 4px;
  line-height: 1.2;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  align-items: center;
  width: 100%;
}

/* Chip único (1 especialidade): borda esquerda colorida + texto */
.slot-chip {
  border-left: 3px solid;
  padding-left: 4px;
  min-width: 0;
}
.slot-esp-nome {
  font-weight: 600;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-medico-nome {
  font-size: 0.62rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chips inline (múltiplas especialidades) */
.slot-chip-inline {
  flex: 1 1 0;
  min-width: 0;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Badge "+N" de overflow — tamanho fixo, não encolhe */
.slot-chip-more {
  flex-shrink: 0;
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  background: #94A3B8;
  color: #FFFFFF;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Modal de overflow: item de slot */
.modal-slot-item {
  border-left: 4px solid;
  padding: 12px 16px;
  border-radius: 6px;
  background: #FFFFFF;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s ease;
}
.modal-slot-item:hover {
  background: #F7FAFC;
}
.modal-slot-item:last-child {
  margin-bottom: 0;
}

/* Indicador de cor no modal */
.slot-cor-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Info da especialidade no modal */
.slot-info {
  flex: 1;
  min-width: 0;
}
.slot-info-esp {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2D3748;
}
.slot-info-medico {
  font-size: 0.8rem;
  color: #718096;
}

/* Botão "Agendar" no modal de overflow */
.slot-btn-agendar {
  background: #2BB991 !important;
  color: #FFFFFF !important;
  border: none !important;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.slot-btn-agendar:hover {
  background: #229977 !important;
}

/* Legenda dinâmica de especialidades */
#legenda-dinamica {
  padding: 0.75rem;
  background-color: #F7FAFC;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile: chips compactam */
@media (max-width: 576px) {
  .slot-chip-inline { max-width: 70px; font-size: 0.58rem; }
  .slot-esp-nome { font-size: 0.6rem; }
  .slot-medico-nome { display: none; }
  .evento-disponibilidade { font-size: 0.65rem !important; }
}

