/* Saúde Integrada V2 — Full-Width, Auditoria, Multi-Operadora, Drive e Chat Interno */
.main, main, .content, .page-wrap, .container, .shell-main, .wrapper {
  max-width: 100% !important;
  width: 100% !important;
}

.banner, .hero, .card, .panel, .filter-bar, .table-wrap, .grid-2, .stats-grid {
  max-width: 100% !important;
}

/* Botão Voltar ao Portal Mestre na sidebar */
.si-portal-back {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e6f4f1 !important;
  text-decoration: none !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  transition: background 0.15s ease;
}
.si-portal-back:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
}

/* Multi-operadora checklist */
.si-op-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #d5e2ea;
  border-radius: 10px;
  background: #f9fbfc;
  max-height: 180px;
  overflow-y: auto;
}
.si-op-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  cursor: pointer;
}
.si-op-item input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  accent-color: #0c6b5e;
}

/* Badges de compartilhamento e Drive */
.si-badge-shared {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e6f4f1;
  color: #0c6b5e;
  border: 1px solid #bfe0d8;
}
.si-btn-drive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
}
.si-btn-drive:hover {
  background: #dbeafe;
}

/* Auditoria diff */
.si-diff-old { color: #b91c1c; background: #fef2f2; padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.si-diff-new { color: #065f46; background: #ecfdf5; padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* Chat interno flutuante */
#si-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9990;
  background: #0c6b5e;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(12, 50, 46, 0.28);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}
#si-chat-launcher:hover { background: #09564b; }
#si-chat-badge {
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  display: none;
}
#si-chat-drawer {
  position: fixed;
  right: 22px;
  bottom: 76px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 510px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border: 1px solid #cbd9e4;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(14, 36, 57, 0.24);
  z-index: 9991;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#si-chat-drawer.open { display: flex; }
.si-chat-head {
  background: #0e2439;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.si-chat-head strong { font-size: 14px; }
.si-chat-close {
  background: transparent !important;
  border: none !important;
  color: #cbd5e1 !important;
  font-size: 18px !important;
  padding: 2px 6px !important;
  cursor: pointer;
}
.si-chat-channel {
  padding: 8px 12px;
  background: #f4f7fa;
  border-bottom: 1px solid #dce6ee;
  display: flex;
  gap: 8px;
  align-items: center;
}
.si-chat-channel select {
  flex: 1;
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 12.5px !important;
}
#si-chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}
.si-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.4;
  align-self: flex-start;
}
.si-msg.mine {
  align-self: flex-end;
  background: #e6f4f1;
  border-color: #bfe0d8;
}
.si-msg-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
  font-weight: 600;
}
.si-msg a.si-demanda-ref {
  color: #0c6b5e;
  font-weight: 700;
  text-decoration: underline;
}
.si-chat-form {
  padding: 10px;
  border-top: 1px solid #dce6ee;
  background: #ffffff;
  display: flex;
  gap: 8px;
}
.si-chat-form input {
  flex: 1;
  min-height: 38px !important;
  padding: 7px 10px !important;
}
.si-chat-form button {
  padding: 8px 14px !important;
  background: #0c6b5e;
  color: #fff;
  border: none;
  border-radius: 8px;
}
