/* Saude Integrada - Patch Global V9 */
*, *::before, *::after { box-sizing: border-box; }

body, main, .content, .main-content, .page-content, .container-fluid {
  padding-bottom: 105px !important;
}

.btn, button.btn, a.btn,
.filter-bar button, .filter-bar a.btn,
form button[type="submit"], form a.btn,
.top-actions button, .top-actions a.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  vertical-align: middle !important;
  white-space: nowrap;
  cursor: pointer;
}

/* Alinhamento limpo de barras de filtro e botoes */
.si-filter-fixed {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: flex-end !important;
  width: 100% !important;
}
.si-filter-fixed > div,
.si-filter-fixed .form-group,
.si-filter-fixed label:has(input),
.si-filter-fixed label:has(select) {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  flex: 1 1 165px !important;
  min-width: 150px !important;
  margin: 0 !important;
}
.si-filter-fixed input[type="text"],
.si-filter-fixed input[type="date"],
.si-filter-fixed input[type="search"],
.si-filter-fixed select {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
}
.si-filter-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  min-width: auto !important;
  align-self: flex-end !important;
}

/* Nomes e numeros clicaveis em negrito SEM sublinhado */
.si-sol-link,
.si-kpi-clickable,
table tbody tr td:first-child,
table tbody tr td:first-child a,
a[href*="solicitante="],
a[href*="operador="] {
  text-decoration: none !important;
  font-weight: 800 !important;
}
.si-sol-link:hover,
.si-kpi-clickable:hover,
table tbody tr td:first-child a:hover {
  text-decoration: none !important;
  opacity: 0.82;
}

.si-master-active .si-duplicate-users-table { display: none !important; }
.si-pagination-bar ~ .pagination,
.si-pagination-bar ~ nav[aria-label*="pagin"],
.si-pagination-bar ~ div[class*="paginat"] {
  display: none !important;
}

.si-badge-agendado { background-color: #dcfce7 !important; color: #166534 !important; border: 1px solid #86efac !important; }
.si-badge-concluido { background-color: #ccfbf1 !important; color: #115e59 !important; border: 1px solid #5eead4 !important; }
.si-badge-andamento { background-color: #dbeafe !important; color: #1e40af !important; border: 1px solid #93c5fd !important; }
.si-badge-aguardando { background-color: #ffedd5 !important; color: #9a3412 !important; border: 1px solid #fdba74 !important; }
.si-badge-pendente { background-color: #fef9c3 !important; color: #854d0e !important; border: 1px solid #fde047 !important; }
.si-badge-cancelado { background-color: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fca5a5 !important; }

.si-notif-wrap { position: relative; display: inline-flex; align-items: center; margin-right: 8px; }
.si-bell-btn {
  position: relative; width: 40px !important; min-width: 40px !important; height: 40px !important;
  padding: 0 !important; border-radius: 8px !important; background: #ffffff !important;
  border: 1px solid #cbd5e1 !important; color: #1e293b !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; cursor: pointer;
}
.si-bell-btn:hover { background: #f8fafc !important; }
.si-bell-badge {
  position: absolute; top: -5px; right: -5px; background: #dc2626; color: #ffffff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; display: none; align-items: center; justify-content: center;
}
.si-notif-panel {
  position: absolute; top: 46px; right: 0; width: 370px; max-height: 460px; overflow-y: auto;
  background: #ffffff; color: #0f172a; border: 1px solid #cbd5e1; border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18); z-index: 99999; display: none; text-align: left;
}
.si-notif-panel.open { display: block; }

.si-tabs-bar { display: flex; gap: 8px; border-bottom: 2px solid #e2e8f0; margin: 16px 0 20px 0; flex-wrap: wrap; }
.si-tab-btn {
  height: 40px !important; padding: 0 18px !important; background: transparent !important;
  border: none !important; border-bottom: 3px solid transparent !important; border-radius: 0 !important;
  color: #475569 !important; font-weight: 600 !important; cursor: pointer;
}
.si-tab-btn.active { color: #0d6e63 !important; border-bottom-color: #0d6e63 !important; }

.si-card {
  background: #ffffff; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px;
  margin-bottom: 18px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.si-ops-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.si-op-card {
  background: #f8fafc; border: 1px solid #cbd5e1; border-left: 4px solid #0d6e63;
  border-radius: 10px; padding: 12px 14px;
}
.si-op-card-title { font-weight: 800; font-size: 0.92rem; color: #0f172a; margin-bottom: 6px; }
.si-op-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.si-op-chip {
  background: #ffffff; border: 1px solid #cbd5e1; color: #1e293b;
  font-size: 0.74rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}

.si-form-aligned {
  display: grid; grid-template-columns: 1.1fr 1.4fr 1.1fr auto;
  gap: 14px; align-items: start; margin-bottom: 18px;
}
@media (max-width: 900px) { .si-form-aligned { grid-template-columns: 1fr; } }

.si-pagination-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px; padding: 12px 16px; padding-right: 175px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
}
@media (max-width: 768px) { .si-pagination-bar { padding-right: 16px; padding-bottom: 76px; } }
.si-page-nums { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.si-page-btn {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px;
  border: 1px solid #cbd5e1; background: #ffffff; color: #1e293b;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.si-page-btn.active { background: #0d6e63; color: #ffffff; border-color: #0d6e63; }

.si-combo-row {
  display: grid; grid-template-columns: 190px 1fr 130px;
  gap: 12px; align-items: center; margin-bottom: 12px; font-size: 0.85rem;
}
.si-combo-track { position: relative; height: 22px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.si-combo-total { height: 100%; background: #94a3b8; border-radius: 999px; transition: width 0.25s ease; }
.si-combo-concluidos { position: absolute; top: 0; left: 0; height: 100%; background: #0d6e63; border-radius: 999px; transition: width 0.25s ease; }

.si-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); display: none;
  align-items: center; justify-content: center; z-index: 100000; padding: 20px;
}
.si-modal-backdrop.open { display: flex; }
.si-modal-box {
  background: #ffffff; color: #0f172a; border-radius: 14px; width: min(980px, 96vw);
  max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.si-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.si-kpi-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; }
.si-kpi-label { font-size: 0.78rem; color: #64748b; font-weight: 600; text-transform: uppercase; }
.si-kpi-val { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin-top: 4px; }

th.si-sortable { cursor: pointer; user-select: none; }
th.si-sortable::after { content: " ⇅"; opacity: 0.45; font-size: 0.78em; }
th.si-sortable.asc::after { content: " ↑"; opacity: 1; }
th.si-sortable.desc::after { content: " ↓"; opacity: 1; }

.si-btn-green { background: #0d6e63 !important; color: #ffffff !important; border: 1px solid #0d6e63 !important; }
.si-btn-green:hover { background: #09544b !important; }
.si-btn-light { background: #ffffff !important; color: #1e293b !important; border: 1px solid #cbd5e1 !important; }
.si-btn-danger { background: #dc2626 !important; color: #ffffff !important; border: 1px solid #dc2626 !important; }
