/* ==========================================================================
   VetSanté ERP - LoopVET Inspired Architecture & UI
   Layout: Left White Sidebar + Electric Blue Top Header + 2-Column Área Clínica Hub
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Cores Oficiais La Santé (Baseadas na Logo) */
  --header-blue-start: #3b506e;
  --header-blue-end: #4a6285;
  --header-blue: #4a6285;
  
  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;
  --sidebar-text: #475569;
  --sidebar-hover: #f1f5f9;
  --sidebar-active-bg: #f0f4f8;
  --sidebar-active-text: #4a6285;

  --bg-body: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Accent Colors Oficiais */
  --primary: #4a6285;
  --primary-hover: #3b506e;
  --primary-subtle: #f0f4f8;
  
  --success: #19947b;
  --success-bg: #eefaf7;
  --success-border: #bce9df;

  --whatsapp: #25d366;
  --whatsapp-hover: #1eb956;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);

  /* Design System Global: Opacidade padrão para placeholders */
  --placeholder-opacity: 0.3;
  --placeholder-color: #0f172a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, input, select, textarea, datalist {
  color-scheme: light;
}

/* Reset universal: Garante 30% de opacidade para qualquer placeholder existente e futuro */
::placeholder {
  color: var(--placeholder-color);
  opacity: var(--placeholder-opacity) !important;
}

::-webkit-input-placeholder {
  color: var(--placeholder-color);
  opacity: var(--placeholder-opacity) !important;
}

::-moz-placeholder {
  color: var(--placeholder-color);
  opacity: var(--placeholder-opacity) !important;
}

:-ms-input-placeholder {
  color: var(--placeholder-color);
  opacity: var(--placeholder-opacity) !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Main App Layout: Left Sidebar + Right Main Area
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 1. Left Sidebar */
.app-sidebar {
  width: 230px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.sidebar-brand {
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--sidebar-border);
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon-wrapper {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #1e6be5 0%, #0f766e 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(30, 107, 229, 0.3);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.brand-tag {
  font-size: 10px;
  font-weight: 600;
  color: #1e6be5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 14px 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #94a3b8;
  padding: 8px 12px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-link svg {
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s;
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover);
  color: #0f172a;
}

.sidebar-link:hover svg {
  color: #1e6be5;
}

.sidebar-link.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.sidebar-link.active svg {
  color: var(--sidebar-active-text);
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

/* 2. Main Content Wrapper */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 3. LoopVET Electric Blue Top Header */
.top-header {
  height: 60px;
  background: linear-gradient(90deg, var(--header-blue-start) 0%, var(--header-blue-end) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-breadcrumbs {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-breadcrumbs a {
  color: #ffffff;
  text-decoration: none;
}

.header-breadcrumbs a:hover {
  text-decoration: underline;
}

.header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
  position: relative;
}

.header-search-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  padding: 7px 14px 7px 38px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.header-search-bar::placeholder {
  color: rgba(255, 255, 255, 0.75) !important;
  opacity: 0.75 !important;
}

.header-search-bar:focus {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.header-search-bar:focus::placeholder {
  color: var(--placeholder-color) !important;
  opacity: var(--placeholder-opacity) !important;
}

.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.header-search-bar:focus + .header-search-icon {
  color: #64748b;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-header-whatsapp {
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-header-whatsapp:hover {
  background: #1eb956;
}

.vet-profile-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-full);
}

.vet-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--header-blue);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vet-profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.vet-name {
  font-size: 12px;
  font-weight: 600;
}

.vet-crmv {
  font-size: 10px;
  opacity: 0.85;
  font-family: var(--font-mono);
}

.header-btn-logout {
  color: #ffffff;
  opacity: 0.8;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.header-btn-logout:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

/* 4. Main Page Container */
.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================================================================
   Page Headers & Action Bars
   ========================================================================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.btn-voltar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12.5px;
  color: #475569;
  text-decoration: none;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}

.btn-voltar:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.btn-success:hover {
  background-color: #15803d;
}

.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

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

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* ==========================================================================
   LOOPVET ÁREA CLÍNICA - PATIENT BANNER CARD & SPLIT INTERFACE
   ========================================================================== */

/* Top Patient Banner Card */
.patient-banner-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.patient-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.patient-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.1);
}

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

.patient-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.patient-name-big {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.patient-badge-id {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.patient-metadata-line {
  font-size: 12.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.patient-metadata-line .separator {
  color: #cbd5e1;
}

.patient-tutor-line {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.patient-tutor-line strong a {
  color: #1e6be5;
  text-decoration: none;
}

.patient-tutor-line strong a:hover {
  text-decoration: underline;
}

.patient-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Green Floating Action Button (FAB $) */
.fab-quick-sale {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--success);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
  transition: transform 0.15s, background 0.15s;
  text-decoration: none;
}

.fab-quick-sale:hover {
  background-color: #15803d;
  transform: scale(1.06);
}

/* 2-Column Split Clinical Hub */
.clinica-split-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .clinica-split-layout {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Timeline / Histórico */
.clinica-timeline-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-list {
  padding: 16px;
  max-height: 750px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: #ffffff;
  transition: all 0.15s;
}

.timeline-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.timeline-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.timeline-timestamp {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #64748b;
  font-weight: 500;
}

.timeline-vet-name {
  font-size: 11px;
  color: #475569;
  margin-top: 2px;
}

.timeline-event-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.badge-consulta   { background: #eff6ff; color: #1d4ed8; }
.badge-vacina     { background: #faf5ff; color: #7e22ce; }
.badge-cirurgia   { background: #fff1f2; color: #be123c; }
.badge-retorno    { background: #ecfdf5; color: #047857; }
.badge-peso       { background: #fffbeb; color: #b45309; }
.badge-internacao { background: #fee2e2; color: #b91c1c; }
.badge-campo      { background: #fef3c7; color: #92400e; }

.timeline-item-body {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.45;
  margin-top: 6px;
}

.timeline-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

/* Right Column: Action Hub (Grid com Cards Coloridos do LoopVET) */
.clinica-actions-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.actions-hub-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.actions-hub-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 18px;
}

.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.action-card-tile {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  user-select: none;
}

.action-card-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.action-tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.action-card-tile:hover .action-tile-icon {
  transform: scale(1.08);
}

.action-tile-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
}

.action-tile-desc {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.25;
}

/* LoopVET Action Card Colors */
.icon-atendimento { background: #e0f2fe; color: #0284c7; }
.icon-receitas    { background: #dcfce7; color: #16a34a; }
.icon-vacinas     { background: #f3e8ff; color: #9333ea; }
.icon-internacao  { background: #fee2e2; color: #dc2626; }
.icon-peso        { background: #fef3c7; color: #d97706; }
.icon-exames      { background: #ccfbf1; color: #0d9488; }
.icon-patologia   { background: #fce7f3; color: #db2777; }
.icon-documentos  { background: #e2e8f0; color: #475569; }
.icon-observacoes { background: #fef9c3; color: #ca8a04; }
.icon-venda       { background: #d1fae5; color: #059669; }
.icon-retorno     { background: #e0e7ff; color: #4f46e5; }
.icon-historico   { background: #e0f2fe; color: #0369a1; }

/* ==========================================================================
   Modals & Dialogs (LoopVET Progressive Disclosure & Chain Modals)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-dialog.modal-lg {
  max-width: 820px;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: #0f172a;
}

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

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafafa;
}

/* ==========================================================================
   Operational Tables & Stats Grid
   ========================================================================== */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.table-toolbar {
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.erp-table th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.erp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.erp-table tbody tr:hover {
  background-color: #f8fafc;
}

.erp-table .col-right { text-align: right; }
.erp-table .col-center { text-align: center; }
.erp-table .col-actions { text-align: right; white-space: nowrap; }

.table-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* Quick Settlement by Animal Widget */
.quick-settle-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 10px;
}

.quick-settle-form .settle-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.quick-settle-form select.form-control {
  width: auto;
  min-width: 130px;
  height: 30px;
  padding: 2px 8px;
  font-size: 12px;
  background-color: #ffffff;
}

.quick-settle-form .btn {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-success { background-color: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger  { background-color: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.badge-neutral { background-color: var(--bg-subtle);  color: var(--text-muted); border: 1px solid var(--border-subtle); }

/* Metrics Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-desc {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: flex-start;
}

.col-12 { grid-column: span 12; }
.col-11 { grid-column: span 11; }
.col-10 { grid-column: span 10; }
.col-9  { grid-column: span 9; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }
.col-1  { grid-column: span 1; }

@media (max-width: 992px) {
  .col-9, .col-8, .col-7 {
    grid-column: span 12;
  }
  .col-5, .col-4, .col-3 {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .col-12, .col-11, .col-10, .col-9, .col-8, .col-7,
  .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 {
    grid-column: span 12;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}

.form-control {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 107, 229, 0.15);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  height: auto;
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: #0f172a;
  opacity: 0.3;
}

.form-control::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #0f172a;
  opacity: 0.3;
}

.form-control::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: #0f172a;
  opacity: 0.3;
}

/* Checkbox Card estilizado e alinhado aos inputs */
.checkbox-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  background-color: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  width: 100%;
}

.checkbox-card:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.checkbox-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-card .checkbox-text {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

/* Alerts */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background-color: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.alert-danger  { background-color: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }

/* Unified Search Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.1s;
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background-color: var(--bg-subtle); }

/* Autocomplete Medicine */
.autocomplete-wrapper { position: relative; }

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 99;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.active { display: block; }

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.autocomplete-item:hover {
  background-color: var(--primary-subtle);
  color: var(--primary);
}

/* ==========================================================================
   ORGANIC SHAPES & BRAND BACKGROUND (Opacidade 20% nas cores do sistema)
   ========================================================================== */
.dashboard-decor-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 520px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.decor-shape {
  position: absolute;
  filter: blur(50px);
  opacity: 0.20; /* 20% de opacidade solicitada */
}

.decor-shape-1 {
  width: 380px;
  height: 380px;
  top: -80px;
  right: -50px;
  animation: floatShape1 18s ease-in-out infinite alternate;
}

.decor-shape-2 {
  width: 320px;
  height: 320px;
  top: 120px;
  right: 18%;
  animation: floatShape2 22s ease-in-out infinite alternate;
}

.decor-shape-3 {
  width: 260px;
  height: 260px;
  top: 20px;
  left: 5%;
  animation: floatShape1 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatShape1 {
  0% { transform: translateY(0px) rotate(0deg) scale(1); }
  100% { transform: translateY(25px) rotate(15deg) scale(1.08); }
}

@keyframes floatShape2 {
  0% { transform: translateY(0px) rotate(0deg) scale(1); }
  100% { transform: translateY(-20px) rotate(-12deg) scale(0.95); }
}

/* Garante elevação dos cards e tabelas sobre as formas orgânicas */
.stats-grid,
.table-card,
.clinica-split-layout,
.patient-banner-card {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (LoopVET Field Responsive Engine)
   Suporte avançado para Tablets e Smartphones em Atendimentos a Campo
   ========================================================================== */

/* Botão Hambúrguer Mobile (Oculto no Desktop) */
.btn-mobile-menu {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.btn-mobile-menu:hover,
.btn-mobile-menu:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Backdrop da Sidebar Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* 1. TABLETS (max-width: 1024px) */
@media (max-width: 1024px) {
  .btn-mobile-menu {
    display: inline-flex;
  }

  /* Sidebar vira um Drawer Off-canvas */
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 270px;
    z-index: 999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.mobile-open {
    left: 0;
  }

  .top-header {
    padding: 0 16px;
  }

  .header-center {
    max-width: 320px;
    margin: 0 12px;
  }

  .main-content {
    padding: 16px;
  }

  .clinica-split-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .action-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* 2. SMARTPHONES & TELAS ESTREITAS (max-width: 768px) */
@media (max-width: 768px) {
  /* Header Ultra Compacto */
  .top-header {
    height: 54px;
    padding: 0 12px;
  }

  .header-left {
    gap: 10px;
  }

  .header-page-title {
    font-size: 15px;
  }

  .header-breadcrumbs {
    display: none; /* Oculta migalhas no celular para poupar espaço */
  }

  .header-center {
    display: none; /* Oculta busca global na barra; acessível no menu */
  }

  .header-right {
    gap: 8px;
  }

  .btn-header-whatsapp span {
    display: none; /* Deixa apenas o ícone no celular */
  }

  .btn-header-whatsapp {
    padding: 6px 8px;
  }

  .vet-profile-info {
    display: none; /* Mostra apenas a foto/avatar do veterinário */
  }

  .vet-profile-pill {
    padding: 3px;
    background: transparent;
  }

  /* Área Principal */
  .main-content {
    padding: 12px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .page-title {
    font-size: 18px;
  }

  .action-bar {
    width: 100%;
  }

  .action-bar .btn,
  .action-bar .btn-primary,
  .action-bar .btn-secondary,
  .action-bar .btn-voltar {
    width: 100%;
    justify-content: center;
  }

  /* Grid Universal de Formulários: 1 coluna em celular */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    grid-column: span 1 !important;
  }

  /* Ergonomia Touch para Campo: Inputs e Botões maiores */
  .form-control,
  input.form-control,
  select.form-control {
    height: 42px;
    font-size: 14px !important;
  }

  .btn {
    min-height: 40px;
    font-size: 13.5px;
    padding: 8px 16px;
  }

  /* Banner do Paciente em Campo */
  .patient-banner-card {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .patient-banner-left {
    align-items: flex-start;
    gap: 12px;
  }

  .patient-avatar-circle {
    width: 48px;
    height: 48px;
  }

  .patient-name-big {
    font-size: 19px;
  }

  .patient-metadata-line {
    font-size: 12px;
    gap: 6px;
  }

  .patient-tutor-line {
    font-size: 11.5px;
    flex-wrap: wrap;
  }

  .patient-banner-right {
    width: 100%;
  }

  .patient-banner-right .btn,
  .patient-banner-right a {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 14px;
  }

  /* Grid dos 12 Cards de Ação Clínica: 2 colunas perfeitas no smartphone */
  .action-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .action-card-tile {
    padding: 14px 8px;
    min-height: 100px;
  }

  .action-tile-icon {
    width: 40px;
    height: 40px;
  }

  .action-tile-label {
    font-size: 12px;
  }

  .action-tile-desc {
    display: none; /* Oculta descrições longas para manter os blocos limpos */
  }

  /* Modais em Smartphones: Quase tela inteira com bordas suaves */
  .modal-dialog {
    max-width: 96vw !important;
    width: 96vw !important;
    margin: 8px auto;
    border-radius: var(--radius-lg);
  }

  .modal-body {
    padding: 14px !important;
    max-height: 75vh;
    overflow-y: auto;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn,
  .modal-footer a {
    width: 100%;
    justify-content: center;
  }

  /* Tabelas ERP com rolagem horizontal fluida sem quebrar layout */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .table-toolbar form {
    max-width: 100% !important;
  }
}

/* ==========================================================================
   FullCalendar v6 - Estilização Clean & Cores Oficiais La Santé
   ========================================================================== */
.fc {
  font-family: var(--font-sans);
  --fc-border-color: #e2e8f0;
  --fc-page-bg-color: #ffffff;
  --fc-neutral-bg-color: #f8fafc;
  --fc-today-bg-color: rgba(74, 98, 133, 0.05);
}

.fc .fc-toolbar {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px !important;
}

.fc .fc-toolbar-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.3px;
}

.fc .fc-button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  padding: 6px 13px !important;
  box-shadow: none !important;
  text-transform: capitalize;
  transition: all 0.15s ease-in-out;
}

.fc .fc-button:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: #4a6285 !important;
  border-color: #4a6285 !important;
  color: #ffffff !important;
}

.fc .fc-today-button {
  border-color: #4a6285 !important;
  color: #4a6285 !important;
  font-weight: 700 !important;
}

.fc .fc-today-button:hover {
  background: rgba(74, 98, 133, 0.08) !important;
  color: #3b506e !important;
}

/* Cabeçalho dos dias da semana */
.fc .fc-col-header-cell {
  background: #f8fafc;
  padding: 10px 0 !important;
  border-color: #e2e8f0 !important;
}

.fc .fc-col-header-cell-cushion {
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569 !important;
  text-decoration: none !important;
}

/* Células dos dias */
.fc .fc-daygrid-day-frame {
  min-height: 95px;
  padding: 4px;
}

.fc .fc-daygrid-day-number {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  padding: 6px 8px !important;
  text-decoration: none !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  color: #4a6285 !important;
  font-weight: 800 !important;
}

/* Eventos Gerais */
.fc .fc-event {
  border-radius: 5px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  overflow: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.fc .fc-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.18) !important;
  filter: brightness(0.96);
}

.fc .fc-event-main {
  color: #ffffff !important;
  overflow: hidden !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Eventos na Visualização Semanal / Diária (timeGrid) - Alta Visibilidade */
.fc-theme-standard .fc-timegrid-slot {
  height: 2.2em;
}

.fc .fc-timegrid-event {
  border-radius: 6px !important;
  border-width: 1px 1px 1px 4px !important;
  border-style: solid !important;
  padding: 4px 6px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16) !important;
  opacity: 1 !important;
  overflow: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.fc .fc-timegrid-event .fc-event-main {
  color: #ffffff !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden !important;
  min-width: 0 !important;
}

.fc .fc-timegrid-event .fc-event-time {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.fc .fc-timegrid-event .fc-event-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  min-width: 0 !important;
}

/* Eventos na Visualização Mensal (dayGrid) - Blocos Preenchidos & Legíveis */
.fc .fc-daygrid-event {
  border-radius: 4px !important;
  margin-top: 2px !important;
  cursor: pointer;
  overflow: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Quando renderizado como Bloco Sólido (padrão agora com eventDisplay: block) */
.fc .fc-daygrid-block-event,
.fc .fc-daygrid-event.fc-event-start {
  padding: 3px 6px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  border: none !important;
  overflow: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.fc .fc-daygrid-block-event .fc-event-main {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #ffffff !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.fc .fc-event-main-frame,
.fc .fc-event-title-container {
  min-width: 0 !important;
  overflow: hidden !important;
  flex: 1 1 auto !important;
}

.fc .fc-daygrid-block-event .fc-event-time {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.fc .fc-daygrid-block-event .fc-event-title {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: block !important;
}

/* Fallback seguro caso algum evento seja renderizado com Dot */
.fc .fc-daygrid-dot-event {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  padding: 2px 6px !important;
}

.fc .fc-daygrid-dot-event:hover {
  background: #f1f5f9 !important;
}

.fc .fc-daygrid-dot-event .fc-event-time,
.fc .fc-daygrid-dot-event .fc-event-title {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
}

.fc .fc-daygrid-more-link {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #4a6285 !important;
  padding: 2px 4px !important;
  border-radius: 4px;
}

.fc .fc-daygrid-more-link:hover {
  background: rgba(74, 98, 133, 0.1);
  text-decoration: none;
}

/* Popover do "+X mais" */
.fc .fc-popover {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.12), 0 8px 10px -6px rgba(0,0,0,0.08) !important;
  overflow: hidden;
}

.fc .fc-popover-header {
  background: #f8fafc !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid #e2e8f0;
}

.fc .fc-popover-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #0f172a;
}

.fc .fc-popover-body {
  padding: 8px !important;
}

/* Visualização em Lista (Mobile ou Lista semanal) */
.fc .fc-list-event:hover td {
  background: rgba(74, 98, 133, 0.05) !important;
}

.fc .fc-list-day-cushion {
  background: #f8fafc !important;
}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
  font-weight: 700 !important;
  color: #334155 !important;
  text-decoration: none !important;
  font-size: 13px;
}

/* ==========================================================================
   AGENDAMENTOS CANCELADOS: ESMAECIDO, RISCADO & IDENTIDADE SUAVE (100% LEGÍVEL)
   ========================================================================== */
.fc .fc-event.fc-event-cancelado,
.fc .fc-daygrid-event.fc-event-cancelado,
.fc .fc-daygrid-block-event.fc-event-cancelado,
.fc .fc-timegrid-event.fc-event-cancelado,
.fc .fc-list-event.fc-event-cancelado,
.fc-event-cancelado {
  opacity: 0.85 !important;
  border: 1px dashed #f87171 !important;
  background-color: #fee2e2 !important;
  background: #fee2e2 !important;
  box-shadow: none !important;
  filter: none !important;
  transition: opacity 0.2s ease, transform 0.1s ease !important;
  overflow: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.fc .fc-event.fc-event-cancelado:hover,
.fc .fc-daygrid-event.fc-event-cancelado:hover,
.fc .fc-daygrid-block-event.fc-event-cancelado:hover,
.fc .fc-timegrid-event.fc-event-cancelado:hover,
.fc-event-cancelado:hover {
  opacity: 1 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
}

/* Força texto vermelho escuro contrastante e riscado em todas as tags internas do FullCalendar */
.fc .fc-event-cancelado .fc-event-main,
.fc .fc-event-cancelado .fc-event-time,
.fc .fc-event-cancelado .fc-event-title,
.fc .fc-daygrid-block-event.fc-event-cancelado .fc-event-main,
.fc .fc-daygrid-block-event.fc-event-cancelado .fc-event-time,
.fc .fc-daygrid-block-event.fc-event-cancelado .fc-event-title,
.fc .fc-daygrid-event.fc-event-cancelado .fc-event-time,
.fc .fc-daygrid-event.fc-event-cancelado .fc-event-title,
.fc .fc-timegrid-event.fc-event-cancelado .fc-event-time,
.fc .fc-timegrid-event.fc-event-cancelado .fc-event-title,
.fc .fc-list-event.fc-event-cancelado .fc-list-event-time,
.fc .fc-list-event.fc-event-cancelado .fc-list-event-title {
  color: #991b1b !important;
  text-decoration: line-through !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}

.fc .fc-event-cancelado .fc-event-title,
.fc .fc-daygrid-block-event.fc-event-cancelado .fc-event-title,
.fc .fc-daygrid-event.fc-event-cancelado .fc-event-title {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}

/* Linha Cancelada na Tabela de Agendamentos (Modo Lista ERP) */
.erp-table tr.row-cancelado td {
  opacity: 0.65;
  background-color: #fef2f2 !important;
}
.erp-table tr.row-cancelado strong,
.erp-table tr.row-cancelado a {
  text-decoration: line-through !important;
  color: #991b1b !important;
}
.erp-table tr.row-cancelado:hover td {
  opacity: 0.95;
}

/* ==========================================================================
   MASCOTE VETERINÁRIO DINÂMICO (SIDEBAR LATERAL)
   ========================================================================== */
.sidebar-mascote-container {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 14px 4px 14px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  min-height: 0;
  text-align: center;
}

.sidebar-mascote-img {
  max-width: 100%;
  width: 100%;
  max-height: clamp(100px, 19vh, 175px);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.08));
  transition: max-height 0.2s ease;
}

/* Ocultação em telas mobile e tablets estreitos */
@media (max-width: 1024px) {
  .sidebar-mascote-container {
    display: none !important;
  }
}

/* Ocultação em telas com pouca altura vertical para evitar rolagem da barra lateral */
@media (max-height: 640px) {
  .sidebar-mascote-container {
    display: none !important;
  }
}

/* ==========================================================================
   ERP Live Search Filter para Selects Densos (Clientes & Animais)
   ========================================================================== */
.select-search-wrapper {
  position: relative;
  margin-bottom: 4px;
  width: 100%;
}

.select-search-input {
  height: 28px !important;
  font-size: 11.5px !important;
  padding: 2px 24px 2px 24px !important;
  border-radius: 4px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
  color: #1e293b !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease;
}

.select-search-input:focus {
  background-color: #ffffff !important;
  border-color: #4a6285 !important;
  box-shadow: 0 0 0 2px rgba(74, 98, 133, 0.15) !important;
  outline: none !important;
}

.select-search-icon {
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
  line-height: 1;
}

.select-search-clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: none;
  padding: 2px 4px;
  border-radius: 3px;
}

.select-search-clear:hover {
  color: #dc2626;
  background-color: #fee2e2;
}

/* ==========================================================================
   SweetAlert2 - Design System La Santé ERP
   ========================================================================== */
.swal2-popup.vetsante-swal-popup {
  border-radius: 14px !important;
  font-family: var(--font-sans, 'Inter', sans-serif) !important;
  padding: 24px 28px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  border: 1px solid #e2e8f0 !important;
}

.swal2-title.vetsante-swal-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding: 10px 0 6px 0 !important;
}

.swal2-html-container.vetsante-swal-text {
  font-size: 13.5px !important;
  color: #475569 !important;
  line-height: 1.5 !important;
  margin: 10px 0 16px 0 !important;
}

.swal2-actions {
  gap: 10px !important;
  margin-top: 18px !important;
}

.vetsante-swal-btn {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}


