/* ========== Agenda Module Styles ========== */

/* Layout */
.agenda-container {
  display: flex;
  flex: 1;
  padding: 15px;
  min-height: 0;
  overflow: hidden;
  gap: 15px;
}

/* Sidebar */
.agenda-sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(91, 58, 171, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agenda-sidebar-inner {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.agenda-sidebar h3 {
  margin: 0 0 15px 0;
  font-size: 1em;
  color: #5b3aab;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-bottom: 2px solid #5b3aab;
  padding-bottom: 8px;
}

.agenda-sidebar .form-group {
  margin-bottom: 14px;
}

.agenda-sidebar .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.agenda-sidebar .form-group select,
.agenda-sidebar .form-group input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  font-size: 13px;
  background-color: #f9fafb;
  color: #1e293b;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%235b3aab%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13%205.1L147.2%20202.7%2018.5%2074.5a17.6%2017.6%200%200%200-24.7%2024.9l130.6%20129.8c6.8%206.7%2017.7%206.7%2024.5%200l130.6-129.8a17.6%2017.6%200%200%200-11.7-29.4z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 8px top 50%;
  background-size: 10px;
}

.agenda-sidebar .form-group input[type="date"] {
  background-image: none;
}

.agenda-sidebar .form-group select:focus,
.agenda-sidebar .form-group input:focus {
  border-color: #5b3aab;
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 58, 171, 0.12);
}

/* Checkbox group */
.agenda-sidebar .checkbox-group {
  margin-bottom: 14px;
}

.agenda-sidebar .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  padding: 3px 0;
}

.agenda-sidebar .checkbox-group input[type="checkbox"] {
  accent-color: #5b3aab;
  width: 14px;
  height: 14px;
}

/* Radio group */
.agenda-sidebar .radio-group {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.agenda-sidebar .radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
}

.agenda-sidebar .radio-group input[type="radio"] {
  accent-color: #5b3aab;
}

/* Filter button */
.btn-filter {
  width: 100%;
  padding: 10px;
  background-color: #5b3aab;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: 5px;
}

.btn-filter:hover:not(:disabled) {
  background-color: #4a2d8f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91, 58, 171, 0.3);
}

.btn-filter:disabled {
  background-color: #b8a7d4;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-clear-filters {
  width: 100%;
  padding: 10px;
  background-color: transparent;
  color: #5b3aab;
  border: 1px solid #5b3aab;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-clear-filters:hover {
  background-color: #5b3aab;
  color: #fff;
  border-color: #5b3aab;
}

/* Divider */
.sidebar-divider {
  border: none;
  border-top: 1px solid #e8ecf1;
  margin: 15px 0;
}

/* ========== Main Content ========== */
.agenda-main {
  flex: 1;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(91, 58, 171, 0.07);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Date Navigation */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
}

.date-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b3aab;
  font-size: 14px;
  transition: all 0.2s;
}

.date-nav-btn:hover {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

.date-nav-label {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  min-width: 220px;
  text-align: center;
}

.btn-today {
  padding: 6px 14px;
  background: #5b3aab;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-today:hover:not(:disabled) {
  background: #4a2d8f;
}

.btn-today:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Active filter tags */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 20px;
  border-bottom: 1px solid #e8ecf1;
  min-height: 0;
}

.filter-tags:empty {
  display: none;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background-color: #f0ecf7;
  color: #5b3aab;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.filter-tag-remove {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.6;
  margin-left: 2px;
}

.filter-tag-remove:hover {
  opacity: 1;
}

/* Action Bar */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-action {
  padding: 6px 14px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-action:hover:not(:disabled) {
  background: #e8ecf1;
  border-color: #ccc;
}

.btn-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-action.primary {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

.btn-action.primary:hover {
  background: #4a2d8f;
  border-color: #4a2d8f;
}

.btn-action.danger {
  background: transparent;
  color: #dc3545;
  border-color: #dc3545;
}

.btn-action.danger:hover {
  background: #dc3545;
  color: white;
}

.btn-action.warning {
  background: transparent;
  color: #e67e22;
  border-color: #e67e22;
}

.btn-action.warning:hover {
  background: #e67e22;
  color: white;
}

.btn-action.success {
  background: transparent;
  color: #28a745;
  border-color: #28a745;
}

.btn-action.success:hover {
  background: #28a745;
  color: white;
}

.btn-action.purple {
  background: #5b3aab;
  color: #fff;
  border-color: #5b3aab;
}

.btn-action.purple:hover {
  background: #4a2d8f;
  border-color: #4a2d8f;
}

/* ========== Schedule Grid ========== */
.schedule-grid-wrapper {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.schedule-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.schedule-grid thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.schedule-grid th {
  background-color: #5b3aab;
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.schedule-grid th:last-child {
  border-right: none;
}

.schedule-grid th:hover {
  background-color: #4a2d8f;
}

.schedule-grid th .sort-indicator {
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.7;
}

.schedule-grid th .sort-indicator.active {
  opacity: 1;
}

.schedule-grid td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.schedule-grid tbody tr {
  transition: background-color 0.15s;
}

.schedule-grid tbody tr:hover {
  background-color: #f8f6fc;
}

.schedule-grid tbody tr.selected {
  background-color: #ece8f4;
}

.schedule-grid tbody tr.status-cancelled {
  opacity: 0.5;
  text-decoration: line-through;
}

.schedule-grid tbody tr.status-livre {
  background-color: #f0fff4;
}

.schedule-grid tbody tr.status-executed {
  background-color: #f0f9ff;
}

.schedule-grid tbody tr.highlight-patient {
  background-color: #fef3c7 !important;
  animation: pulse-highlight 2s ease-in-out;
}

@keyframes pulse-highlight {
  0%, 100% { background-color: #fef3c7; }
  50% { background-color: #fde68a; }
}

/* Grid Checkbox */
.schedule-grid input[type="checkbox"] {
  accent-color: #5b3aab;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Status Icon */
.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
}

.status-icon.status-N { background-color: #e6f4ea; color: #2e7d32; }  /* Normal - verde */
.status-icon.status-E { background-color: #e1f0fd; color: #1976d2; }  /* Executada - azul */
.status-icon.status-C { background-color: #fde8e8; color: #d32f2f; }  /* Cancelada - vermelho */
.status-icon.status-L { background-color: #dff0ef; color: #00897b; }  /* Livre - teal */
.status-icon.status-CN { background-color: #e6e8f5; color: #303f9f; } /* Confirmada - indigo */
.status-icon.status-A { background-color: #fef1e0; color: #f57c00; }  /* Aguardando - laranja */
.status-icon.status-O { background-color: #e1f0fd; color: #0288d1; }  /* Em Consulta - azul claro */
.status-icon.status-AD { background-color: #f1e4f5; color: #6a1b9a; } /* Atendido - roxo */
.status-icon.status-M { background-color: #fef6e0; color: #f9a825; }  /* Marcada - amarelo */
.status-icon.status-B { background-color: #fbe2e6; color: #c62828; }  /* Bloqueada - vermelho */
.status-icon.status-FE { background-color: #ede9e6; color: #5d4037; } /* Fechada - marrom */
.status-icon.status-default { background-color: #f0f1f3; color: #6b7280; }

/* Classification Dot */
.classif-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.classif-cell {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Patient column - wider */
.col-paciente {
  min-width: 260px;
  max-width: 350px;
  font-weight: 500;
}

/* ========== Summary Bar ========== */
.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid #e8ecf1;
  background: #f9fafb;
  flex-shrink: 0;
  font-size: 12px;
}

.summary-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.summary-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475569;
}

.summary-stat strong {
  color: #5b3aab;
}

.summary-stat .stat-icon {
  font-size: 14px;
}

.pagination-info {
  color: #64748b;
  font-size: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #d5dae2;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== Legend ========== */
.legend-toggle {
  padding: 6px 14px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #5b3aab;
  font-weight: 600;
}

.legend-toggle:hover {
  background: #f0ecf7;
}

.legend-panel {
  display: none;
  padding: 12px 20px;
  border-top: 1px solid #e8ecf1;
  background: #fafafa;
  flex-shrink: 0;
}

.legend-panel.visible {
  display: block;
}

.legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #475569;
}

/* ========== Empty State ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #94a3b8;
  text-align: center;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* ========== Loading ========== */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: #5b3aab;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(91, 58, 171, 0.2);
  border-top-color: #5b3aab;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}

/* ========== Modals ========== */
.agenda-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 20, 60, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: alertFadeIn 0.2s ease;
}

.agenda-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(91, 58, 171, 0.2);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: alertSlideIn 0.25s ease;
  overflow: hidden;
}

.agenda-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background-color: #5b3aab;
  color: #fff;
  border-radius: 12px 12px 0 0;
}

.agenda-modal-header h3 {
  margin: 0;
  font-size: 1.1em;
}

.agenda-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
  opacity: 0.8;
}

.agenda-modal-close:hover {
  opacity: 1;
}

.agenda-modal-body {
  padding: 20px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.agenda-modal-body .form-group {
  margin-bottom: 14px;
}

.agenda-modal-body .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
}

.agenda-modal-body .form-group input,
.agenda-modal-body .form-group select,
.agenda-modal-body .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  font-size: 13px;
  background-color: #f9fafb;
}

.agenda-modal-body .form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.agenda-modal-body .form-group input:focus,
.agenda-modal-body .form-group select:focus,
.agenda-modal-body .form-group textarea:focus {
  border-color: #5b3aab;
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 58, 171, 0.12);
}

.agenda-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e8ecf1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Slot search results */
.slot-results {
  margin-top: 15px;
}

.slot-result-card {
  padding: 12px;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.slot-result-card:hover {
  border-color: #5b3aab;
  background-color: #f8f6fc;
}

.slot-result-card.best {
  border-color: #22a852;
  background-color: #f0fff4;
}

.slot-result-card .slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.slot-result-card .slot-agenda {
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
}

.slot-result-card .slot-datetime {
  color: #5b3aab;
  font-weight: 600;
  font-size: 13px;
}

.slot-result-card .slot-reason {
  font-size: 11px;
  color: #64748b;
}

.slot-badge-best {
  display: inline-block;
  padding: 2px 8px;
  background: #22a852;
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-right: 6px;
}

/* ========== Smart Search Modal ========== */
.smart-search-modal {
  max-width: 1050px;
  width: 95%;
}

.smart-search-body {
  display: flex;
  height: 75vh;
}

.smart-search-filters {
  width: 260px;
  flex-shrink: 0;
  padding: 20px;
  border-right: 1px solid #e8ecf1;
  display: flex;
  flex-direction: column;
}

.smart-search-filters .form-group {
  margin-bottom: 16px;
}

.smart-search-filters .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
}

.smart-search-filters .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  font-size: 13px;
  background-color: #f9fafb;
}

.smart-search-filters .form-group select:focus {
  border-color: #5b3aab;
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 58, 171, 0.12);
}

.btn-nova-busca {
  width: 100%;
  padding: 12px;
  background: #5b3aab;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
  transition: all 0.2s;
}

.btn-nova-busca:hover {
  background: #4a2d8f;
  transform: translateY(-1px);
}

.smart-search-results {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

/* Date Navigation Tabs */
.ss-date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
}

.ss-date-arrow {
  width: 32px;
  height: 32px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b3aab;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ss-date-arrow:hover {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

.ss-date-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.ss-date-tab {
  padding: 6px 14px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  min-width: 70px;
}

.ss-date-tab:hover {
  border-color: #5b3aab;
  background: #f8f6fc;
}

.ss-date-tab.active {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

.ss-tab-day {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.ss-tab-label {
  display: block;
  font-size: 10px;
  opacity: 0.8;
  text-transform: lowercase;
}

.ss-calendar-btn {
  padding: 6px 12px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #5b3aab;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.ss-calendar-btn:hover {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

/* Calendar Popup */
.ss-calendar-popup {
  position: absolute;
  right: 16px;
  top: 55px;
  background: white;
  border: 1px solid #d5dae2;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(91, 58, 171, 0.15);
  padding: 16px;
  z-index: 20;
  width: 280px;
}

.ss-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ss-cal-header span {
  font-weight: 700;
  font-size: 14px;
  color: #1e293b;
}

.ss-cal-nav {
  width: 28px;
  height: 28px;
  border: none;
  background: #f0ecf7;
  border-radius: 8px;
  cursor: pointer;
  color: #5b3aab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ss-cal-nav:hover {
  background: #5b3aab;
  color: white;
}

.ss-cal-grid, .ss-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.ss-cal-day-header {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 0;
}

.ss-cal-cell {
  font-size: 13px;
  padding: 6px 0;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-cal-cell:hover:not(.empty):not(.past) {
  background: #f0ecf7;
  color: #5b3aab;
}

.ss-cal-cell.today {
  border: 2px solid #5b3aab;
  font-weight: 700;
}

.ss-cal-cell.selected {
  background: #5b3aab;
  color: white;
  font-weight: 700;
}

.ss-cal-cell.has-slots {
  color: #5b3aab;
  font-weight: 700;
  background: #f0ecf7;
}

.ss-cal-cell.has-slots:hover {
  background: #5b3aab;
  color: white;
}

.ss-cal-cell.no-slots:not(.past) {
  color: #bbb;
  cursor: default;
}

.ss-cal-cell.past {
  color: #ccc;
  cursor: default;
}

.ss-cal-cell.empty {
  cursor: default;
}

/* Results List */
.ss-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  position: relative;
}

.ss-unit-card {
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
  background: #fff;
}

.ss-unit-card:hover {
  border-color: #5b3aab;
  box-shadow: 0 2px 8px rgba(91, 58, 171, 0.1);
}

.ss-unit-name {
  font-size: 16px;
  font-weight: 700;
  color: #5b3aab;
  margin-bottom: 4px;
}

.ss-unit-address {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.ss-unit-address i {
  color: #ef4444;
  margin-right: 4px;
  font-size: 10px;
}

.ss-unit-expedient {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.ss-unit-expedient i {
  color: #5b3aab;
  margin-right: 4px;
  font-size: 10px;
}

/* Smart Search Prices */
.ss-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #f8f6fc 0%, #f0ecf7 100%);
  border-radius: 8px;
}

.ss-price-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.ss-price-tag.particular {
  background: #fff;
  border: 1px solid #e8ecf1;
  color: #1e293b;
}

.ss-price-tag.black {
  background: #1a1a1a;
  color: #fff;
}

.ss-price-tag.ouro {
  background: linear-gradient(135deg, #f5d700 0%, #d4a800 100%);
  color: #1a1a1a;
}

.ss-price-tag.platina {
  background: linear-gradient(135deg, #e5e5e5 0%, #a8a8a8 100%);
  color: #1a1a1a;
}

.ss-price-tag .label {
  font-weight: 500;
  opacity: 0.8;
  font-size: 9px;
  text-transform: uppercase;
}

.ss-price-tag .value {
  font-weight: 700;
  font-size: 12px;
}

.ss-prices-loading {
  font-size: 11px;
  color: #94a3b8;
  padding: 4px 0;
}

.ss-unit-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.ss-doctor-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.ss-doctor-group:first-child {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}

.ss-doctor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ss-doctor-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0;
  flex: 1;
}

.ss-doctor-name i {
  color: #5b3aab;
  margin-right: 4px;
  font-size: 12px;
}

.ss-doctor-crm {
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.ss-agenda-slots-count {
  font-size: 10px;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.ss-doctor-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ss-retorno-info {
  font-size: 10px;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ss-retorno-info.cheio {
  color: #dc2626;
  background: #fee2e2;
}

.ss-doctor-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.ss-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
}

.ss-info-badge.age {
  color: #b45309;
  background: #fef3c7;
}

.ss-info-badge i {
  font-size: 9px;
}

.ss-orientacao-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid #0ea5e9;
  background: #f0f9ff;
  color: #0369a1;
  cursor: pointer;
  transition: all 0.2s;
}

.ss-orientacao-btn:hover {
  background: #0ea5e9;
  color: #fff;
}

.ss-orientacao-btn i {
  font-size: 9px;
}

/* Orientation Modal */
.ss-orientacao-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.ss-orientacao-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.ss-orientacao-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  color: #fff;
}

.ss-orientacao-modal-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.ss-orientacao-modal-header h4 i {
  margin-right: 8px;
}

.ss-orientacao-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}

.ss-orientacao-close:hover {
  opacity: 1;
}

.ss-orientacao-modal-body {
  padding: 18px;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
}

.ss-unit-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ss-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  background: #f9fafb;
  border: 1px solid #d5dae2;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #5b3aab;
  transition: all 0.2s;
}

.ss-more-btn:hover {
  background: #f0ecf7;
  border-color: #5b3aab;
}

.ss-extra-slots {
  margin-top: 10px;
}

.ss-slot-btn {
  padding: 6px 14px;
  border: 1px solid #5b3aab;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #5b3aab;
  transition: all 0.2s;
}

.ss-slot-btn:hover {
  background: #5b3aab;
  color: white;
}

/* ========== Slot Info Card (Appointment Modal) ========== */
.slot-info-card {
  background: linear-gradient(135deg, #f8f6fc 0%, #f0ecf7 100%);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid #e0d8f0;
  position: relative;
  box-shadow: 0 2px 8px rgba(91, 58, 171, 0.08);
}

.slot-info-badge {
  position: absolute;
  top: -8px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slot-info-badge.badge-consulta {
  background: linear-gradient(135deg, #5b3aab 0%, #7c5dc7 100%);
  color: #fff;
}

.slot-info-badge.badge-exame {
  background: linear-gradient(135deg, #e91e8c 0%, #ff6eb4 100%);
  color: #fff;
}

.slot-info-estab {
  font-weight: 700;
  color: #5b3aab;
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-info-estab i {
  font-size: 18px;
}

.slot-info-datetime {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.slot-datetime-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e0d8f0;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.slot-datetime-item i {
  color: #5b3aab;
  font-size: 14px;
}

.slot-info-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4c9e8, transparent);
  margin: 12px 0;
}

.slot-info-professional {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.slot-info-professional i {
  color: #5b3aab;
  font-size: 16px;
}

.slot-info-specialty {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
  padding-left: 24px;
}

.slot-info-specialty i {
  color: #7c5dc7;
  margin-right: 6px;
}

/* Slot Prices */
.slot-prices {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d5dae2;
}

.slot-prices-loading {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.slot-prices-error {
  font-size: 12px;
  color: #dc3545;
  text-align: center;
}

.slot-prices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.slot-price-item {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 6px;
  padding: 8px 6px;
  text-align: center;
}

.slot-price-item.black {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.slot-price-item.black .slot-price-label,
.slot-price-item.black .slot-price-value {
  color: #fff;
}

.slot-price-item.ouro {
  background: linear-gradient(135deg, #f5d700 0%, #d4a800 100%);
  border-color: #d4a800;
}

.slot-price-item.ouro .slot-price-label,
.slot-price-item.ouro .slot-price-value {
  color: #1a1a1a;
}

.slot-price-item.platina {
  background: linear-gradient(135deg, #e5e5e5 0%, #a8a8a8 100%);
  border-color: #a8a8a8;
}

.slot-price-item.platina .slot-price-label,
.slot-price-item.platina .slot-price-value {
  color: #1a1a1a;
}

.slot-price-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.slot-price-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #22a852;
}

.ss-total-label {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .smart-search-body {
    flex-direction: column;
  }
  .smart-search-filters {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e8ecf1;
    padding: 15px;
  }
  .btn-nova-busca {
    margin-top: 10px;
  }
  .ss-calendar-btn span {
    display: none;
  }
  .ss-calendar-popup {
    right: 8px;
  }
}

/* ========== Address Proximity Search (Smart Search Modal) ========== */
.address-search-wrap {
  position: relative;
  display: flex;
  gap: 0;
}

.address-search-wrap input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d5dae2;
  border-radius: 8px 0 0 8px;
  font-size: 13px;
  background-color: #f9fafb;
  min-width: 0;
}

.address-search-wrap input:focus {
  border-color: #5b3aab;
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 58, 171, 0.12);
}

.addr-search-btn {
  padding: 0 14px;
  background: #5b3aab;
  color: white;
  border: 1px solid #5b3aab;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.addr-search-btn:hover {
  background: #4a2d8f;
}

.address-search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #d5dae2;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 6px 16px rgba(91, 58, 171, 0.12);
}

.addr-found {
  padding: 8px 12px;
  font-size: 11px;
  color: #5b3aab;
  background: #f0ecf7;
  border-bottom: 1px solid #e0d8f0;
  font-weight: 600;
}

.addr-found i {
  margin-right: 4px;
}

.addr-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s;
}

.addr-item:hover {
  background-color: #f0ecf7;
}

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

.addr-item.addr-closest {
  background-color: #f0fff4;
  border-left: 3px solid #22a852;
}

.addr-item.addr-closest:hover {
  background-color: #e0f5e8;
}

.addr-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.addr-item strong {
  font-size: 13px;
  color: #1e293b;
}

.addr-dist {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 10px;
}

.addr-dist-green {
  color: #1b7d2f;
  background: #e8f5e9;
}

.addr-dist-yellow {
  color: #b8860b;
  background: #fff8e1;
}

.addr-dist-red {
  color: #c62828;
  background: #ffebee;
}

.addr-inactive {
  font-size: 10px;
  color: #d32f2f;
  font-weight: 400;
}

.addr-detail {
  font-size: 11px;
  color: #475569;
}

.addr-city {
  font-size: 11px;
  color: #94a3b8;
}

.addr-empty {
  padding: 12px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.addr-loading {
  padding: 14px;
  font-size: 12px;
  color: #5b3aab;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== Exam Search (Smart Search Modal) ========== */
.exam-search-wrap {
  position: relative;
}

.exam-search-wrap input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  font-size: 13px;
  background-color: #f9fafb;
}

.exam-search-wrap input:focus {
  border-color: #5b3aab;
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 58, 171, 0.12);
}

.exam-search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #d5dae2;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 6px 16px rgba(91, 58, 171, 0.12);
}

.exam-search-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.exam-search-item:hover {
  background-color: #f0ecf7;
}

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

.exam-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.exam-item-name i {
  color: #5b3aab;
  margin-right: 4px;
  font-size: 11px;
}

.exam-item-count {
  font-size: 11px;
  color: #5b3aab;
  font-weight: 500;
  margin-top: 2px;
}

.exam-search-loading,
.exam-search-empty {
  padding: 12px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.exam-search-loading {
  color: #5b3aab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exam-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  margin-top: 8px;
}

.exam-selected-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exam-selected-info strong {
  font-size: 12px;
  color: #2e7d32;
}

.exam-selected-info strong i {
  margin-right: 4px;
  font-size: 11px;
}

.exam-selected-info span {
  font-size: 11px;
  color: #475569;
}

.exam-selected-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.exam-selected-remove:hover {
  color: #d32f2f;
}

/* ========== Exam Partners (Right Panel) ========== */
.exam-partners-header {
  padding: 14px 0 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid #5b3aab;
}

.exam-partners-title {
  font-size: 16px;
  font-weight: 700;
  color: #5b3aab;
}

.exam-partners-title i {
  margin-right: 6px;
}

.exam-partners-count {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.exam-partner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s;
  gap: 12px;
}

.exam-partner-card:hover {
  border-color: #c4b5de;
  background: #faf8fc;
}

.exam-partner-card.selected {
  border-color: #22a852;
  background: #f0fff4;
  box-shadow: 0 0 0 2px rgba(34, 168, 82, 0.15);
}

.exam-partner-main {
  flex: 1;
  min-width: 0;
}

.exam-partner-estab {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.exam-partner-estab i {
  color: #5b3aab;
  margin-right: 6px;
  font-size: 13px;
}

.exam-partner-agenda {
  font-size: 12px;
  color: #475569;
  margin-top: 4px;
}

.exam-partner-agenda i {
  color: #5b3aab;
  margin-right: 4px;
  font-size: 11px;
}

.exam-partner-expedient {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}

.exam-partner-expedient i {
  color: #5b3aab;
  margin-right: 4px;
  font-size: 10px;
}

.exam-partner-select-btn {
  padding: 8px 16px;
  background: #5b3aab;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.exam-partner-select-btn:hover {
  background: #4a2d8f;
  transform: translateY(-1px);
}

.exam-partner-select-btn i {
  margin-right: 4px;
}

/* ========== Patient Search ========== */
.patient-search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #d5dae2;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1050;
  box-shadow: 0 8px 20px rgba(91, 58, 171, 0.15);
}

.patient-search-wrap {
  position: relative;
  margin-bottom: 60px;
}

.patient-search-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s;
}

.patient-search-item:hover {
  background-color: #f0ecf7;
}

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

.patient-search-item strong {
  font-size: 13px;
  color: #1e293b;
}

.patient-search-item .patient-cpf {
  font-size: 11px;
  color: #64748b;
}

.patient-search-item .patient-cd {
  font-size: 11px;
  color: #94a3b8;
}

.patient-search-loading,
.patient-search-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

/* ========== Patient Card (Selected Patient) ========== */
.patient-selected {
  background: linear-gradient(135deg, #f8f6fc 0%, #f0ecf7 100%);
  border: 1px solid #e0d8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(91, 58, 171, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.patient-selected-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.patient-selected-info strong {
  color: #1e293b;
  font-size: 14px;
}

.patient-cpf-line {
  color: #64748b;
  font-size: 12px;
}

.patient-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.patient-card-header.patient-card-compact {
  padding-bottom: 0;
}

.patient-card-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #5b3aab 0%, #7c5dc7 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.patient-card-info {
  flex: 1;
  min-width: 0;
}

.patient-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.patient-card-details {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.patient-card-details span {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.patient-card-details i {
  color: #5b3aab;
  font-size: 11px;
}

.patient-card-remove {
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid #e0d8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.patient-card-remove:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Patient Badges */
.patient-card-badges {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.patient-badge {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #e8ecf1;
  transition: all 0.2s ease;
}

.patient-badge:hover {
  border-color: #d4c9e8;
  box-shadow: 0 2px 8px rgba(91, 58, 171, 0.1);
}

.badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.badge-saldo .badge-icon {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
}

.badge-plano .badge-icon {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #7c3aed;
}

.badge-valor .badge-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}

.badge-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.badge-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
}

.badge-value {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-value.valor-positivo {
  color: #16a34a;
}

.badge-value.valor-negativo {
  color: #dc2626;
}

.badge-value.valor-indisponivel {
  color: #94a3b8;
  font-weight: 400;
}

/* Legacy styles (keep for compatibility) */
.patient-selected-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.patient-selected-remove:hover {
  color: #d32f2f;
}

/* Patient Contact Info */
.patient-card-contact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e0d8f0;
}

.contact-title {
  font-size: 12px;
  font-weight: 600;
  color: #5b3aab;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-title i {
  font-size: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e8ecf1;
  font-size: 12px;
  color: #1e293b;
}

.contact-item i {
  color: #5b3aab;
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.contact-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-item.contact-item-full {
  grid-column: span 2;
}

.contact-item.contact-item-full span {
  white-space: normal;
  word-break: break-word;
}

/* Contact Edit Button */
.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.contact-header .contact-title {
  margin-bottom: 0;
}

.contact-edit-btn {
  background: #fff;
  border: 1px solid #d4c9e8;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: #5b3aab;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.contact-edit-btn:hover {
  background: #f0ecf7;
  border-color: #5b3aab;
}

.contact-edit-btn i {
  font-size: 10px;
}

/* Patient Edit Modal */
.patient-edit-info {
  background: #f0ecf7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.patient-edit-info strong {
  font-size: 14px;
  color: #5b3aab;
}

.patient-edit-info span {
  font-size: 12px;
  color: #64748b;
}

.patient-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.patient-edit-form .form-row {
  display: flex;
  gap: 10px;
}

.patient-edit-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.patient-edit-form .form-group-small {
  flex: 0 0 70px;
}

.patient-edit-form .form-group-large {
  flex: 2;
}

.patient-edit-form label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
  display: block;
}

.patient-edit-form input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e0d8f0;
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

.patient-edit-form input:focus {
  outline: none;
  border-color: #5b3aab;
}

.patient-edit-form .form-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4c9e8, transparent);
  margin: 4px 0;
}

.cep-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cep-input-wrap input {
  padding-right: 30px;
}

.cep-loading {
  position: absolute;
  right: 10px;
  color: #5b3aab;
  font-size: 14px;
}

/* ========== Header Navigation ========== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 30px;
}

.header-nav a {
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-nav a:hover {
  background-color: #f0ecf7;
  color: #5b3aab;
}

.header-nav a.active {
  background-color: #5b3aab;
  color: white;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .agenda-container {
    flex-direction: column;
    padding: 10px;
  }

  .agenda-sidebar {
    width: 100%;
    max-height: 300px;
  }

  .date-nav {
    padding: 10px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .date-nav-label {
    min-width: auto;
    font-size: 13px;
    order: -1;
    width: 100%;
    text-align: center;
  }

  .action-bar {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .schedule-grid {
    font-size: 11px;
  }

  .schedule-grid th,
  .schedule-grid td {
    padding: 5px 6px;
  }

  .summary-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .summary-stats {
    gap: 10px;
    flex-wrap: wrap;
  }

  .agenda-modal {
    width: 95%;
    max-height: 90vh;
  }

  .header-nav {
    margin-left: 15px;
  }

  .header-nav a {
    padding: 5px 10px;
    font-size: 12px;
  }

  /* Hide less important columns on mobile */
  .col-hide-mobile {
    display: none;
  }
}

@media (max-width: 480px) {
  .agenda-sidebar {
    max-height: 250px;
  }

  .header-nav {
    margin-left: 10px;
  }

  .header-nav a span {
    display: none;
  }
}

/* ========== Date Nav Actions (Hoje + Mes) ========== */
.date-nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========== Month Button ========== */
.btn-month {
  padding: 6px 14px;
  background: transparent;
  color: #5b3aab;
  border: 1px solid #5b3aab;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-month:hover:not(:disabled) {
  background: #5b3aab;
  color: white;
}

.btn-month:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== Month Calendar Modal ========== */
.month-calendar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 20, 60, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: alertFadeIn 0.2s ease;
}

.month-calendar-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(91, 58, 171, 0.2);
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: alertSlideIn 0.25s ease;
}

.month-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background-color: #5b3aab;
  color: #fff;
  border-radius: 12px 12px 0 0;
}

.month-calendar-header h3 {
  margin: 0;
  font-size: 1.1em;
}

.month-calendar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
  opacity: 0.8;
}

.month-calendar-close:hover {
  opacity: 1;
}

.month-calendar-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Navigation: < month/year > */
.month-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.month-calendar-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #d5dae2;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b3aab;
  font-size: 16px;
  transition: all 0.2s;
}

.month-calendar-nav-btn:hover {
  background: #5b3aab;
  color: white;
  border-color: #5b3aab;
}

.month-calendar-nav-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  min-width: 200px;
  text-align: center;
  text-transform: capitalize;
}

/* Day-of-week headers */
.month-calendar-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.month-dow-cell {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  padding: 6px 0;
}

/* Calendar grid */
.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* Individual day cell */
.month-calendar-cell {
  min-height: 80px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 6px 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}

.month-calendar-cell:hover:not(.cell-empty) {
  border-color: #5b3aab;
  box-shadow: 0 2px 8px rgba(91, 58, 171, 0.15);
}

.month-calendar-cell.cell-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

/* Day number */
.month-cell-number {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  text-align: right;
  margin-bottom: 4px;
}

/* Status text */
.month-cell-status {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  flex: 1;
  display: flex;
  align-items: center;
}

/* Retorno text */
.month-cell-retorno {
  font-size: 10px;
  color: #2196F3;
  font-weight: 500;
  margin-top: 2px;
}

.month-cell-retorno:has(text*="cheio") {
  color: #e53935;
}

/* Left color bar */
.month-cell-bar {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 2px 2px 0;
}

/* Cell variants */
.month-calendar-cell.cell-weekend {
  background-color: #f0f1f3;
}

.month-calendar-cell.cell-weekend .month-cell-status {
  color: #94a3b8;
  font-style: italic;
}

.month-calendar-cell.cell-weekend .month-cell-number {
  color: #94a3b8;
}

.month-calendar-cell.cell-no-rule .month-cell-status {
  color: #bbb;
}

.month-calendar-cell.cell-free .month-cell-bar {
  background-color: #f9a825;
}

.month-calendar-cell.cell-free .month-cell-status {
  color: #e68a00;
  font-weight: 600;
}

.month-calendar-cell.cell-full .month-cell-status {
  color: #94a3b8;
}

.month-calendar-cell.cell-blocked {
  background-color: #fee2e2;
}

.month-calendar-cell.cell-blocked .month-cell-bar {
  background-color: #dc2626;
}

.month-calendar-cell.cell-blocked .month-cell-status {
  color: #dc2626;
  font-weight: 600;
}

.month-calendar-cell.cell-blocked .month-cell-number {
  color: #991b1b;
}

.month-calendar-cell.cell-partial-blocked {
  background-color: #fff7ed;
}

.month-calendar-cell.cell-partial-blocked .month-cell-bar {
  background-color: #f97316;
}

.month-calendar-cell.cell-partial-blocked .month-cell-status {
  color: #ea580c;
  font-weight: 600;
}

.month-calendar-cell.cell-partial-blocked .month-cell-number {
  color: #c2410c;
}

.month-calendar-cell.cell-today {
  border-color: #2196F3;
  border-width: 2px;
}

.month-calendar-cell.cell-today .month-cell-bar {
  background-color: #2196F3;
}

.month-calendar-cell.cell-today .month-cell-number {
  color: #2196F3;
}

/* Loading state inside modal */
.month-calendar-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #5b3aab;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .month-calendar-modal {
    width: 98%;
    max-height: 95vh;
  }

  .month-calendar-cell {
    min-height: 60px;
    padding: 4px 5px;
  }

  .month-cell-number {
    font-size: 12px;
  }

  .month-cell-status {
    font-size: 9px;
  }

  .month-calendar-nav-title {
    font-size: 15px;
    min-width: 160px;
  }
}

@media (max-width: 480px) {
  .month-calendar-cell {
    min-height: 48px;
    padding: 3px 4px;
  }

  .month-cell-status {
    font-size: 8px;
  }
}

/* ========== Column Preferences Modal ========== */
.col-prefs-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.col-pref-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: grab;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid #e8ecf1;
  background: #fff;
  user-select: none;
}

.col-pref-item:hover {
  background: #f3f0ff;
  border-color: #d5c8f0;
}

.col-pref-item.dragging {
  opacity: 0.35;
}

.col-pref-item.drag-over {
  border-top: 2px solid #5b3aab;
}

.col-pref-drag {
  color: #ccc;
  cursor: grab;
  font-size: 12px;
  flex-shrink: 0;
}

.col-pref-item:hover .col-pref-drag {
  color: #5b3aab;
}

.col-pref-item input[type="checkbox"] {
  accent-color: #5b3aab;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ========== Filter Presets ========== */
.filter-presets-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d5dae2;
}

.preset-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.preset-select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  font-size: 12px;
  background-color: #f9fafb;
  color: #1e293b;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%235b3aab%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13%205.1L147.2%20202.7%2018.5%2074.5a17.6%2017.6%200%200%200-24.7%2024.9l130.6%20129.8c6.8%206.7%2017.7%206.7%2024.5%200l130.6-129.8a17.6%2017.6%200%200%200-11.7-29.4z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 8px top 50%;
  background-size: 10px;
}

.preset-select:focus {
  border-color: #5b3aab;
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 58, 171, 0.12);
}

.btn-preset-action {
  padding: 7px 10px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  color: #5b3aab;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-preset-action:hover {
  background: #5b3aab;
  color: #fff;
  border-color: #5b3aab;
}

.btn-preset-action.danger:hover {
  background: #dc3545;
  border-color: #dc3545;
}

/* ========== Patient History Modal ========== */
.btn-action.info {
  background: transparent;
  color: #5b3aab;
  border-color: #5b3aab;
}

.btn-action.info:hover:not(:disabled) {
  background: #5b3aab;
  color: #fff;
  border-color: #5b3aab;
}

.patient-history-filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.patient-history-filters .form-group {
  margin: 0;
}

.patient-history-wrapper {
  max-height: 400px;
  overflow: auto;
}

.patient-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.patient-history-table th {
  background: #f5f3ff;
  padding: 8px 6px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0dce8;
  white-space: nowrap;
}

.patient-history-table td {
  padding: 6px;
  border-bottom: 1px solid #e8ecf1;
}

.patient-history-table tr:hover {
  background: #f9f7ff;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.green {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-badge.red {
  background: #ffebee;
  color: #c62828;
}

.status-badge.yellow {
  background: #fff8e1;
  color: #f57f17;
}

.status-badge.gray {
  background: #f0f1f3;
  color: #536178;
}

.btn-view-agenda {
  background: none;
  border: 1px solid #5b3aab;
  color: #5b3aab;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-view-agenda:hover {
  background: #5b3aab;
  color: #fff;
}

.patient-history-modal .agenda-modal {
  max-width: 1050px;
  width: 95%;
}

/* ========== Encaixe / Retorno Badges ========== */
.badge-encaixe,
.badge-retorno {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
}

.badge-encaixe {
  background-color: #fff3e0;
  color: #e65100;
}

.badge-encaixe i {
  font-size: 10px;
}

.badge-retorno {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.badge-retorno i {
  font-size: 10px;
}

/* ========== Cupons Section in Patient Card ========== */
.patient-card-cupons {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.cupons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.cupons-title {
  font-size: 12px;
  font-weight: 700;
  color: #5b3aab;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cupons-title i {
  color: #8b5cf6;
}

.cupons-total-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

.cupons-add-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.cupons-add-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.cupons-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cupons-loading,
.cupons-empty,
.cupons-error {
  font-size: 11px;
  color: #64748b;
  padding: 10px;
  text-align: center;
}

.cupons-error {
  color: #dc2626;
}

.cupom-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.cupom-item:hover {
  border-color: #8b5cf6;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

.cupom-item.cupom-inativo {
  opacity: 0.6;
  background: #f8fafc;
}

.cupom-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  flex-shrink: 0;
}

.cupom-inativo .cupom-icon {
  background: #94a3b8;
}

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

.cupom-nome {
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cupom-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10px;
}

.cupom-desconto {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.cupom-validade {
  color: #64748b;
}

.cupom-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.cupom-status.status-ativo {
  background: #dcfce7;
  color: #16a34a;
}

.cupom-status.status-inativo {
  background: #fee2e2;
  color: #dc2626;
}

/* Cupom Delete Button */
.cupom-delete-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-size: 11px;
  margin-left: auto;
}

.cupom-delete-btn:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #dc2626;
}

.cupom-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cupom Selectable - Para gerar link de pagamento */
.cupom-item.cupom-selectable {
  cursor: pointer;
  position: relative;
}

.cupom-item.cupom-selectable:hover {
  border-color: #22c55e;
  background: #f0fdf4;
}

.cupom-item.cupom-selecionado {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.cupom-item.cupom-selecionado::before {
  content: '\f058';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: -8px;
  right: -8px;
  background: #22c55e;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.cupom-badge-link {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  margin-left: 4px;
}

/* Cupom Desconto Preview */
.cupom-desconto-preview {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  display: none;
}

.cupom-desconto-preview.visible {
  display: block;
}

.cupom-desconto-preview .desconto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cupom-desconto-preview .desconto-titulo {
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
}

.cupom-desconto-preview .cupom-deselect-btn {
  background: transparent;
  border: none;
  color: #92400e;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cupom-desconto-preview .cupom-deselect-btn:hover {
  background: rgba(146, 64, 14, 0.15);
  color: #78350f;
}

.cupom-desconto-preview .desconto-valores {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.cupom-desconto-preview .valor-original {
  text-decoration: line-through;
  color: #78716c;
}

.cupom-desconto-preview .valor-final {
  font-weight: 700;
  color: #16a34a;
}

/* Payment Modal */
.payment-modal-content {
  text-align: center;
}

.payment-link-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px dashed #22c55e;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
}

.payment-link-box a {
  color: #15803d;
  word-break: break-all;
  font-weight: 600;
}

.payment-qrcode {
  margin: 15px auto;
  padding: 10px;
  background: white;
  border-radius: 8px;
  display: inline-block;
}

.payment-valores {
  background: #f8fafc;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.payment-valores .valor-linha {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
}

.payment-valores .valor-linha.total {
  border-top: 1px solid #e2e8f0;
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 700;
  font-size: 15px;
}

.payment-valores .valor-desconto {
  color: #16a34a;
}

.comprovante-section {
  background: #f8fafc;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
  text-align: left;
}

.comprovante-section h4 {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comprovante-info {
  font-size: 12px;
  line-height: 1.6;
}

.comprovante-info .info-linha {
  display: flex;
  margin-bottom: 4px;
}

.comprovante-info .info-label {
  font-weight: 600;
  min-width: 100px;
  color: #64748b;
}

.payment-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
}

.payment-actions button {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copiar-link {
  background: #3b82f6;
  color: white;
  border: none;
}

.btn-copiar-link:hover {
  background: #2563eb;
}

.btn-download-pdf {
  background: white;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-download-pdf:hover {
  background: #f1f5f9;
}

.btn-enviar-paciente {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
}

.btn-enviar-paciente:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.btn-enviar-paciente:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Cupom Add Modal */
.cupom-add-info {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cupom-add-info strong {
  color: #1e293b;
  font-size: 14px;
}

.cupom-add-info span {
  color: #64748b;
  font-size: 12px;
}

.cupom-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cupom-select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.cupom-select option {
  padding: 8px;
}

.cupom-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background: white;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.cupom-search-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.cupom-search-input::placeholder {
  color: #94a3b8;
}

.cupom-select[size] {
  height: 180px;
  padding: 0;
  overflow-y: auto;
}

.cupom-select[size] option {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.cupom-select[size] option:hover {
  background: #f8fafc;
}

.cupom-select[size] option:checked {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.cupom-selecionado {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #22c55e;
  border-radius: 8px;
  color: #15803d;
  font-size: 13px;
  font-weight: 500;
}

.cupom-selecionado.visible {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cupom-selecionado i {
  color: #16a34a;
  font-size: 16px;
}
