@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #f5f7fa;
  --color-sidebar: #ffffff;
  --color-sidebar-hover: #f0f4f8;
  --color-border: #e0e4e8;
  --color-text: #2d3748;
  --color-muted: #718096;
  --color-accent: #ff8a00;
  --radius: 0.75rem;
  --transition: 0.3s ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --scrollbar-track: rgba(15, 23, 42, 0.08);
  --scrollbar-thumb: rgba(71, 85, 105, 0.45);
  --scrollbar-thumb-hover: rgba(71, 85, 105, 0.7);
  --scrollbar-size: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}



.sidebar-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  display: none;
}

.sidebar a {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.sidebar a i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.sidebar a:hover {
  background-color: var(--color-sidebar-hover);
  transform: translateX(4px);
}

.sidebar a.active {
  background-color: rgba(255,138,0,0.1);
  color: var(--color-accent);
  border-left: 4px solid var(--color-accent);
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  margin-top: 2rem;
}

.content h2 {
  margin-bottom: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.content-section {
  display: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.content-section.active {
  display: block;
  opacity: 1;
}

form {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  margin-bottom: 2rem;
}

input[type="text"],
textarea,
input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255,138,0,0.2);
}

button {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background var(--transition), box-shadow var(--transition);
}

button:hover {
  background-color: #e07b00;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-grupo {
  float: right;
  right: 1rem;              
  transform: translateY(-50%);
  gap: 0.5rem;               
}

/* Icon buttons */
.btn-edit,
.btn-delete,
.btn-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 0.5rem;
  transition: transform var(--transition);
}

.btn-edit:hover {
  color: #38a169;
  transform: scale(1.1);
}

.btn-delete:hover {
  color: #e53e3e;
  transform: scale(1.1);
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: #ffffff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Funil */
.funil-container {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.disponiveis-wrapper,
.funil-wrapper {
  flex: 1;
}

.disponiveis h4,
.funil-wrapper h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

#disponiveis {
  border: 2px dashed #ccc;
  padding: 15px;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  border-radius: 8px;
  background-color: #fdfdfd;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}

.funil-montado {
  min-height: 100%;
  border: 2px dashed var(--color-border);
  padding: 1rem;
  border-radius: var(--radius);
  background: #fafbfc;
  max-height: 320px;
  overflow-y: auto;
}

.item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background-color: #f3f3f3;
  color: #333;
  padding: 8px 12px;
  margin: 0;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: grab;
  white-space: nowrap;
  border: 1px solid #ccc;
  height: 36px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s ease, transform 0.2s ease;
}

.item:hover {
  background-color: #e5e5e5;
}

.item i {
  font-size: 1rem;
  color: #999;
  margin-right: 6px;
}

.item:active {
  cursor: grabbing;
  box-shadow: var(--shadow-md);
}

.bloco-funil {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#formFunil > button[type="submit"] {
  margin-top: 1rem; /* ajuste o valor conforme deseje afastar mais ou menos */
}

.conteudo-principal {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

#qrcodeContainer {
  display: none;
  text-align: center;
  background: #fff3e6;
  padding: 20px;
  border-radius: 8px;
  margin-top: 15px;
}

#qrcodeContainer img {
  margin-top: 20px;
  max-width: 250px;
}

/* Botão customizado para gerar o QR Code */
#btnGerarQR {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  background-color: #ff8a00;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 15px;
}

#btnGerarQR:hover {
  background-color: #e07a00;
}


header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background-color: #34495e;
  color: #fff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 1.8rem;
  margin: 0;
}

.header-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-actions {
  align-items: center;
  gap: 0.5rem;
}

.header-settings {
  position: relative;
}

.header-notifications {
  position: relative;
}

.header-notifications .icon-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-badge.is-hidden {
  display: none;
}

.icon-button.is-notifying {
  animation: notification-pulse 0.8s ease-in-out;
}

@keyframes notification-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.icon-button {
  width: auto;
  height: auto;
  padding: 0.35rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 0.2s ease;
  box-shadow: none;
}

.icon-button:hover {
  background: transparent;
}

.icon-button:focus,
.icon-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  width: min(320px, 92vw);
  font-family: 'Manrope', 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  padding: 0.85rem 0.85rem 1rem;
  display: none;
  z-index: 30;
}

.settings-panel.is-open {
  display: block;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.35rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.85rem;
}

.settings-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--color-border);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.settings-profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1f2937;
}

.settings-profile-email {
  font-size: 0.85rem;
  color: #64748b;
}

.settings-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: transparent;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.settings-item + .settings-item {
  margin-top: 0.6rem;
}

.settings-item-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.settings-item-label span {
  white-space: nowrap;
}

.settings-item-logout {
  background: transparent;
  border: none;
  padding: 0.55rem 0.35rem;
  justify-content: flex-start;
  color: inherit;
}

.settings-item-logout i {
  color: inherit;
}

.settings-section {
  display: grid;
  gap: 0.65rem;
}

.settings-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1f2937;
}

.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  font-size: 0.9rem;
}

.settings-advanced-toggle {
  width: 100%;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
}

.settings-advanced-toggle i {
  color: #64748b;
}

.settings-advanced {
  margin-top: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.85rem;
}

.settings-advanced-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
}

.settings-advanced-action i {
  color: #64748b;
}

.cleanup-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
}

.cleanup-modal.is-open {
  display: flex;
}

.cleanup-modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.cleanup-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.cleanup-modal-header h3 {
  font-size: 1.1rem;
}

.cleanup-modal-close {
  border: none;
  background: transparent;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.cleanup-modal-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cleanup-form {
  display: grid;
  gap: 1rem;
}

.cleanup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.cleanup-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
}

.cleanup-option input {
  width: 16px;
  height: 16px;
}

.cleanup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.panel-page .header-nav .icon-button {
  padding: 0.35rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #1f2937;
  box-shadow: none;
}

.panel-page .header-nav .icon-button:hover {
  background: transparent;
}

body.panel-page.theme-dark {
  --color-bg: #0b1120;
  --color-sidebar: #0f172a;
  --color-sidebar-hover: #1f2937;
  --color-border: #1f2937;
  --color-text: #e2e8f0;
  --color-muted: #94a3b8;
  --color-accent: #f59e0b;
  --scrollbar-track: rgba(15, 23, 42, 0.65);
  --scrollbar-thumb: rgba(148, 163, 184, 0.35);
  --scrollbar-thumb-hover: rgba(148, 163, 184, 0.6);
}

body.panel-page.theme-dark header.header {
  background: #0f172a;
  border-bottom: 1px solid #1f2937;
}

body.panel-page.theme-dark .main-container,
body.panel-page.theme-dark .content-wrapper {
  background: #0b1120;
}

body.panel-page.theme-dark .sidebar {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: none;
}

body.panel-page.theme-dark .sidebar a,
body.panel-page.theme-dark .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark .header-nav a,
body.panel-page.theme-dark .header-nav .icon-button {
  color: var(--color-text);
}

body.panel-page.theme-dark .icon-button {
  color: #e2e8f0;
}

body.panel-page.theme-dark .icon-button:hover {
  background: transparent;
}

body.panel-page.theme-dark .toggle-sidebar {
  background: transparent;
  color: var(--color-text);
}

body.panel-page.theme-dark .header-nav a {
  background: transparent;
}

body.panel-page.theme-dark .integration-card,
body.panel-page.theme-dark .integration-card-placeholder,
body.panel-page.theme-dark .messages-detail-panel,
body.panel-page.theme-dark .messages-list-panel,
body.panel-page.theme-dark .sales-panel,
body.panel-page.theme-dark .sales-results,
body.panel-page.theme-dark .sales-summary-card,
body.panel-page.theme-dark .audience-card,
body.panel-page.theme-dark .chatgpt-card,
body.panel-page.theme-dark .chatgpt-list-card,
body.panel-page.theme-dark .comprovante-card,
body.panel-page.theme-dark .backup-card,
body.panel-page.theme-dark .message-modal-card,
body.panel-page.theme-dark .integration-sales,
body.panel-page.theme-dark .settings-panel,
body.panel-page.theme-dark .settings-option,
body.panel-page.theme-dark .settings-advanced,
body.panel-page.theme-dark .settings-advanced-toggle,
body.panel-page.theme-dark .welcome-banner,
body.panel-page.theme-dark .stats-card,
body.panel-page.theme-dark .stats,
body.panel-page.theme-dark .welcome-banner .text,
body.panel-page.theme-dark .welcome-banner .illustration,
body.panel-page.theme-dark .stats-cards {
  background: #111827;
  border-color: #1f2937;
  color: var(--color-text);
  box-shadow: none;
}

body.panel-page.theme-dark .settings-profile {
  border-color: #1f2937;
}

body.panel-page.theme-dark .settings-avatar {
  background: transparent;
  border-color: var(--layout-border);
  color: inherit;
}

body.panel-page.theme-dark .settings-profile-name {
  color: #e2e8f0;
}

body.panel-page.theme-dark .settings-profile-email {
  color: #94a3b8;
}

body.panel-page.theme-dark .settings-item {
  background: transparent;
  border-color: var(--layout-border);
  color: #e2e8f0;
}

body.panel-page.theme-dark .settings-item-logout {
  color: inherit;
}

body.panel-page.theme-dark .settings-item-logout i {
  color: inherit;
}

body.panel-page.theme-dark input,
body.panel-page.theme-dark textarea,
body.panel-page.theme-dark select,
body.panel-page.theme-dark .integration-input {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--color-text);
}

body.panel-page.theme-dark ::placeholder {
  color: #94a3b8;
}

.header-nav a {
  color: #ff8a00;
  text-decoration: none;
  transition: color 0.3s;
}

/* MAIN CONTAINER: Ajuste para header fixo */
.main-container {
  display: flex;
  margin-top: 64px; /* Espaço para o header */
  height: calc(100vh - 64px);
  overflow: hidden;
  width: 100%;
}

/* SIDEBAR FIXA */
.sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 240px;
  height: calc(100vh - 64px);
  background: #2c3e50;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  z-index: 900;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #ecf0f1;
  font-weight: 500;
  transition: background 0.2s;
  cursor: pointer;
  border-left: 4px transparent;
}

.sidebar a i {
  margin-right: 10px;
  width: 18px;
  min-width: 18px;
  text-align: center;
}

.sidebar a.active {
  background-color: #34495e;
  border-left-color: #ff8a00;
  color: #ff8a00;
}

.sidebar a:hover {
  background-color: #3a539b;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #ecf0f1;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  border-left: 4px solid transparent;
  transition: background 0.2s, color 0.2s;
}

.sidebar-toggle span {
  display: inline-flex;
  align-items: center;
}

.sidebar-toggle .sidebar-label {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-toggle > i {
  margin-right: 10px;
  font-size: 1.1rem;
  width: 18px;
  min-width: 18px;
  text-align: center;
}

.sidebar-toggle .sidebar-caret i {
  margin-right: 0;
  width: auto;
  min-width: 0;
  font-size: 0.85rem;
}

.sidebar-toggle:hover {
  background-color: #3a539b;
}

.sidebar-toggle .sidebar-caret {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.sidebar-group.open .sidebar-caret {
  transform: rotate(180deg);
}

.sidebar-group.open .sidebar-toggle {
  background-color: #34495e;
  border-left-color: #ff8a00;
  color: #ff8a00;
}

.sidebar-submenu {
  display: none;
  flex-direction: column;
  margin-left: 12px;
  margin-top: 4px;
}

.sidebar-group.open .sidebar-submenu {
  display: flex;
}

.sidebar-submenu a {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* CONTEÚDO: Ajusta para compensar a sidebar fixa */
.content-wrapper {
  margin-left: 240px;
  flex: 1;
  display: flex;
  height: 100%;
}

.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background-color: #ffffff;
}

/* Seções padrão */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Banner de boas-vindas */
.welcome-banner {
  background: linear-gradient(135deg, #4e54c8, #8f94fb);
  color: #fff;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-top: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.welcome-banner .text {
  max-width: 65%;
}

.welcome-banner .text h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.welcome-banner .text p {
  margin: 0;
  font-size: 1rem;
}

.welcome-banner .btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  transition: background 0.2s;
  margin-top: 0.75rem;
}

.welcome-banner .btn i {
  margin-right: 0.5rem;
}

.welcome-banner .btn:hover {
  background: rgba(255,255,255,0.3);
}

.welcome-banner .illustration img {
  max-width: 150px;
}

/* Cards de estatísticas */
.stats {
  margin-bottom: 2rem;
}

.stats h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}

.stats-card {
  background: #0d1a32; /* Fundo azul escuro */
  color: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  /* Sombra azul escuro sutil */
  box-shadow: 0 10px 25px rgba(10, 25, 60, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 140px;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(10, 25, 60, 0.45);
}

.stats-card i {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.stats-card .title {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.9;
}

.stats-card .count {
  font-size: 1.8rem;
  font-weight: 700;
}

/* Cores específicas para cada card (borda e ícone) */
.stats-card:nth-child(1) { border-color: #3b82f6; } /* Mensagens - Azul */
.stats-card:nth-child(1) i { color: #3b82f6; }

.stats-card:nth-child(2) { border-color: #10b981; } /* Áudios - Verde */
.stats-card:nth-child(2) i { color: #10b981; }

.stats-card:nth-child(3) { border-color: #8b5cf6; } /* Mídias - Roxo */
.stats-card:nth-child(3) i { color: #8b5cf6; }

.stats-card:nth-child(4) { border-color: #f59e0b; } /* Documentos - Laranja */
.stats-card:nth-child(4) i { color: #f59e0b; }

.stats-card:nth-child(5) { border-color: #f97316; } /* Funis - Laranja Escuro */
.stats-card:nth-child(5) i { color: #f97316; }

.stats-card:nth-child(6) { border-color: #ef4444; } /* Gatilhos - Vermelho */
.stats-card:nth-child(6) i { color: #ef4444; }

/*==================================================
  Layout form à esquerda + lista à direita nas seções
==================================================*/
#mensagens.content-section.active,
#audios.content-section.active,
#imagens.content-section.active,
#documentos.content-section.active,
#funis.content-section.active {
  display: flex !important;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

#imagens.content-section.active {
  row-gap: 0.25rem;
}

#mensagens.content-section.active > h2,
#audios.content-section.active > h2,
#imagens.content-section.active > h2,
#documentos.content-section.active > h2,
#funis.content-section.active > h2 {
  flex-basis: 100%;
  margin-bottom: 1rem;
}

#imagens.content-section.active > h2 {
  margin-bottom: 0;
}

#imagens.content-section.active > form {
  margin-top: 0;
}

#mensagens.content-section.active > form,
#audios.content-section.active > form,
#imagens.content-section.active > form,
#documentos.content-section.active > form,
#funis.content-section.active > form {
  flex: 0 0 40%;
}

#mensagens.content-section.active > ul,
#audios.content-section.active > ul,
#imagens.content-section.active > ul,
#documentos.content-section.active > ul,
#funis.content-section.active > ul {
  flex: 1;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

/* Mensagens layout */
#mensagens.content-section.active {
  display: flex !important;
  flex-direction: column;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

#audios.content-section.active {
  display: flex !important;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

#audios.content-section.active > h2 {
  flex-basis: 100%;
  margin-bottom: 1rem;
}

#audios.content-section.active > form {
  flex: 0 0 42%;
  min-width: 320px;
}

#audios.content-section.active > ul {
  flex: 1;
  min-width: 320px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

@media (max-width: 1100px) {
  #audios.content-section.active > form,
  #audios.content-section.active > ul {
    flex: 0 0 100%;
    min-width: 0;
    max-height: none;
  }
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.messages-header-text h2 {
  margin: 0;
}

.messages-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.messages-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 420px;
}

.messages-search input {
  width: 100%;
  padding: 0.6rem 0.9rem 0.6rem 2.2rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.95rem;
}

.messages-search i {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.messages-list-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 0.25rem;
}

#listaMensagens {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#listaPrompts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#listaAudios {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#listaMensagens li.message-card {
  border-radius: 16px;
  border: 1px solid #e6edf5;
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0;
  background: #ffffff;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

#listaPrompts li.message-card {
  border-radius: 16px;
  border: 1px solid #e6edf5;
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0;
  background: #ffffff;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

#listaAudios li.message-card {
  border-radius: 16px;
  border: 1px solid #e6edf5;
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0;
  background: #ffffff;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

#listaAudios li.message-card .message-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

#listaAudios li.message-card .message-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

#listaMensagens li.message-card.selected {
  border-color: #d1d5db;
  background: #f3f4f6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

#listaPrompts li.message-card.selected {
  border-color: #d1d5db;
  background: #f3f4f6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

#listaAudios li.message-card.selected {
  border-color: #d1d5db;
  background: #f3f4f6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.message-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.message-card-main:hover,
.message-card-main:focus,
.message-card-main:focus-visible {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.message-card-title {
  font-weight: 600;
  color: var(--color-text);
}

.message-card-preview {
  font-size: 0.85rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-actions {
  display: inline-flex;
  gap: 0.5rem;
  order: 0;
  flex-shrink: 0;
}

.message-actions button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
  color: var(--color-muted);
}

.message-actions .btn-edit,
.message-actions .btn-delete {
  transform: none;
}

.message-actions .btn-edit:hover {
  color: #2f855a;
  background: #f0fff4;
  border-color: #c6f6d5;
}

#listaMensagens li.message-card:hover {
  background: #ffffff;
  border-color: #e6edf5;
  box-shadow: none;
}

#listaPrompts li.message-card:hover {
  background: #ffffff;
  border-color: #e6edf5;
  box-shadow: none;
}

#listaAudios li.message-card:hover {
  background: #ffffff;
  border-color: #e6edf5;
  box-shadow: none;
}

.message-actions .btn-delete:hover {
  color: #c53030;
  background: #fff5f5;
  border-color: #fed7d7;
}

.message-actions .btn-toggle.is-on {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.message-actions .btn-toggle.is-off {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.message-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.messages-detail-panel {
  border-radius: 18px;
  border: 1px solid #e6edf5;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 220px;
}

.message-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.message-detail-header h3 {
  margin: 0;
}

.message-detail-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.message-detail-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.message-detail-delay {
  font-size: 0.75rem;
  color: var(--color-muted);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.message-detail-shortcut {
  display: inline-flex;
  font-size: 0.75rem;
  color: #1e293b;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}


.message-detail-body {
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  background: #f8fafc;
  font-size: 0.95rem;
  color: var(--color-text);
  white-space: pre-wrap;
}

.audio-detail-body audio {
  width: 100%;
  margin-top: 0.75rem;
}

.audio-detail-body #audioDetalheTexto {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.message-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
}

.message-modal.is-open {
  display: flex;
}

.message-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 3rem);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  padding: 1.5rem;
  overflow-y: auto;
}

.message-modal-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.message-field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}


.message-modal-card input,
.message-modal-card textarea,
.message-modal-card select {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
  font-size: 0.95rem;
}

.message-modal-card input:focus,
.message-modal-card textarea:focus,
.message-modal-card select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.message-modal-card input:required:invalid,
.message-modal-card textarea:required:invalid {
  border-color: #ef4444;
}


.message-field-error {
  color: #ef4444;
  font-size: 0.8rem;
  display: none;
}


.message-modal-card input:required:invalid + .message-field-error,
.message-modal-card textarea:required:invalid + .message-field-error {
  display: block;
}

.message-modal-card textarea {
  min-height: 160px;
  resize: vertical;
}

.message-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.message-modal-header h3 {
  margin: 0;
}

.message-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.message-modal-close:hover {
  border-color: #cbd5f5;
  color: #1f2937;
}

.message-form-hint {
  display: block;
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.message-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.backup-wrapper {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

#backup.content-section {
  text-align: center;
}

.backup-card {
  width: 100%;
  max-width: 820px;
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  text-align: left;
}

.backup-block h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.backup-block p {
  color: var(--color-text);
  margin-bottom: 1rem;
}

body.panel-page.theme-dark .backup-block p {
  color: #ffffff;
}

.backup-divider {
  width: 1px;
  background: #e2e8f0;
  height: 100%;
  align-self: stretch;
}

.backup-dropzone {
  border: 2px dashed #cbd5f5;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.backup-dropzone:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.backup-dropzone.dragover {
  border-color: #ff8a00;
  background: #fff7ed;
  box-shadow: 0 10px 20px rgba(255, 138, 0, 0.15);
}

.backup-dropzone.has-file {
  border-color: #38a169;
  background: #f0fff4;
}

.backup-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.1rem;
}

.backup-dropzone-text span {
  display: block;
  font-weight: 600;
}

.backup-dropzone-text small {
  display: block;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

.backup-file-name {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

.backup-input-hidden {
  display: none;
}

#btnImportarBackup:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.backup-block .btn {
  margin-top: 0.75rem;
}

.content-card {
  border-radius: 16px;
  border: 1px solid #e6edf5;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.25rem;
  margin-bottom: 0.9rem;
}

#listaImagens,
#listaDocumentos {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.content-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.content-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.content-name {
  display: block;
  font-weight: 600;
}

.content-meta {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.content-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.content-delay {
  font-size: 0.75rem;
  color: var(--color-muted);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.content-body {
  font-size: 0.95rem;
  color: var(--color-text);
}

.content-body audio {
  width: 100%;
  margin-top: 0.25rem;
}

.content-image {
  max-width: 110px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.image-viewer-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.image-viewer-btn:hover {
  border-color: #ff8a00;
  box-shadow: 0 10px 18px rgba(255, 138, 0, 0.18);
  transform: translateY(-1px);
}

.image-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1200;
}

.image-viewer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.image-viewer-card {
  width: min(960px, 92vw);
  max-height: 88vh;
  background: #0f172a;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.45);
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #e2e8f0;
}

.image-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.image-viewer-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.image-viewer-caption {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.image-viewer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.image-viewer-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.5);
}

.image-viewer-media {
  flex: 1;
  background: #0b1220;
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.image-viewer-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

.image-viewer-img.zoomed {
  transform: scale(1.12);
  cursor: zoom-out;
}

.content-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.content-link:hover {
  text-decoration: underline;
}

.funil-card {
  border-radius: 16px;
  border: 1px solid #e6edf5;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.25rem;
}

.funil-card.is-disabled {
  opacity: 0.6;
}

.funil-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.funil-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.funil-title {
  font-weight: 600;
}

.funil-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.funil-meta code {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
}


.img-logo img{
  max-width: 150px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}


.badge-tipo {
  display: inline-block;
  background-color: #ff8a00;
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: capitalize;
  margin-left: 8px;
  vertical-align: middle;
}


/* Esconde o toggle em desktop */
.toggle-sidebar {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1050;
}

.sidebar-scrim.active {
  opacity: 1;
  pointer-events: auto;
}

/* MOBILE */
@media (max-width: 768px) {
  .toggle-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.menu-open .toggle-sidebar {
    opacity: 0;
    pointer-events: none;
  }

  header.header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  header.header h1 {
    font-size: 1.2rem;
  }

  .header-nav ul {
    gap: 0.5rem;
  }

  .header-nav {
    display: none;
  }

  .main-container {
    margin-top: 64px;
    height: calc(100vh - 64px);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 78vw;
    max-width: 280px;
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 1100;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .panel-page .sidebar {
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar-footer {
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0.4rem 0.75rem;
  }

  .content-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .content {
    padding: 1.25rem 1rem 2rem;
  }

  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0;
  }

  .welcome-banner .text {
    max-width: 100%;
  }

  .welcome-banner .illustration img {
    max-width: 120px;
  }

  .stats-cards {
    flex-direction: column;
  }

  .funil-container {
    flex-direction: column;
  }

  #disponiveis {
    min-height: 80px;
  }

  #mensagens.content-section.active,
  #audios.content-section.active,
  #imagens.content-section.active,
  #documentos.content-section.active,
  #funis.content-section.active {
    display: block !important;
  }

  #mensagens.content-section.active {
    display: flex !important;
  }

  #audios.content-section.active {
    display: flex !important;
  }

  #mensagens.content-section.active > form,
  #audios.content-section.active > form,
  #imagens.content-section.active > form,
  #documentos.content-section.active > form,
  #funis.content-section.active > form {
    flex: 1 1 100%;
  }

  #mensagens.content-section.active > ul,
  #audios.content-section.active > ul,
  #imagens.content-section.active > ul,
  #documentos.content-section.active > ul,
  #funis.content-section.active > ul {
    max-height: none;
  }

  #mensagens.content-section.active {
    grid-template-columns: 1fr;
  }

  #mensagens.content-section.active > form,
  #mensagens.content-section.active > ul {
    grid-column: 1;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .messages-search {
    max-width: none;
  }

  .messages-list-panel {
    max-height: none;
    padding-right: 0;
  }

  .backup-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .backup-divider {
    display: none;
  }

  .chatgpt-top,
  .chatgpt-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chatgpt-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .chatgpt-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comprovante-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comprovante-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comprovante-toggle {
    width: auto;
    align-self: flex-start;
  }

  .comprovante-toggle .switch {
    width: 60px;
    height: 30px;
    flex: 0 0 auto;
  }

  .comprovante-grid {
    grid-template-columns: 1fr;
  }

  .integration-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .integration-form {
    grid-template-columns: 1fr;
  }

  .integration-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .integration-buttons {
    flex-direction: column;
    width: 100%;
  }

  .integration-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .integrations-layout {
    grid-template-columns: 1fr;
  }

  .integration-tab {
    font-size: 1rem;
  }

  .integration-card {
    padding: 1.25rem;
  }

  .integration-sales {
    padding-top: 1.25rem;
  }

  .integration-title {
    width: 100%;
  }

  .integration-toggle {
    align-self: stretch;
  }

  .integration-toggle .switch {
    margin-left: auto;
  }

  .integration-sales-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-sales-header .btn {
    width: 100%;
    justify-content: center;
  }

  .integration-message-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .integration-message-header span {
    text-align: left;
  }

  .integration-message-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .integration-message-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .integration-sales-filters {
    grid-template-columns: 1fr;
  }

  .integration-sales-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-date-range {
    grid-template-columns: 1fr;
  }

  .integration-message-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .integration-message-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .integration-sales-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-send {
    flex-direction: column;
    align-items: stretch;
  }

  .file-upload {
    grid-template-columns: 1fr;
  }

  .file-upload-button {
    width: 100%;
    justify-content: center;
  }
}

/* ChatGPT */

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  margin-left: 10px;
  min-width: 60px;
  min-height: 30px;
  max-width: 60px;
  max-height: 30px;
  flex: 0 0 60px;
  align-self: center;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 30px;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: .4s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

input:checked + .slider {
  background-color: #9aa3af;
}

input:checked + .slider:before {
  transform: translateX(30px);
}


select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 0.5rem 1.5rem 0.5rem 0.5rem;
  border-radius: 6px;
  font-size: 1rem;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  cursor: pointer;
}

select:focus {
  border-color: #666;
  outline: none;
}

input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

input[type="number"]:focus {
  border-color: #007BFF;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}


.chatgpt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chatgpt-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

#chatgpt.content-section {
  max-width: 1000px;
  margin: 0 auto;
}

.chatgpt-top,
.chatgpt-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chatgpt-subtitle {
  color: var(--color-muted);
  margin-top: 0.35rem;
}

.chatgpt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  color: var(--color-text);
  min-height: 40px;
  flex: 0 0 auto;
}

.chatgpt-toggle span {
  white-space: nowrap;
  line-height: 1;
  font-size: 0.9rem;
}

.chatgpt-toggle .switch {
  margin-left: 0;
}

.chatgpt-form {
  display: grid;
  gap: 0.75rem;
}

.chatgpt-label {
  font-weight: 600;
}

.chatgpt-input,
.chatgpt-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chatgpt-input:focus,
.chatgpt-textarea:focus {
  outline: none;
  border-color: #ff8a00;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
}

.chatgpt-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.chatgpt-hint {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.prompt-detail-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.btn.btn-danger {
  background: #c0392b;
}

.btn.btn-danger:hover {
  background: #a93226;
}

.chatgpt-list-card {
  border-radius: 20px;
  border: 1px solid #e6edf5;
  background: #ffffff;
  padding: 1.5rem 2rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.chatgpt-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chatgpt-list-header p {
  color: var(--color-muted);
}

.chatgpt-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prompt-card {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.prompt-card.is-active {
  background: #ecfdf3;
  border-color: #b7f0d1;
}

.prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.prompt-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt-card-content {
  max-height: 2em;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.prompt-card-content pre {
  white-space: pre-wrap;
  margin-top: 0.5rem;
  color: inherit;
}

.prompt-card-toggle {
  margin-top: 0.5rem;
  background: transparent;
  border: none;
  color: #4f6bed;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}

#comprovante-pagamento.content-section {
  max-width: 1200px;
  margin: 0 auto;
}


.comprovante-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.comprovante-section-header p {
  margin: 0;
  color: var(--color-muted);
}

.comprovante-toggle {
  align-items: center;
}

.comprovante-toggle .switch {
  width: 60px;
  height: 30px;
  min-width: 60px;
  min-height: 30px;
  max-width: 60px;
  max-height: 30px;
  flex: 0 0 60px;
  align-self: center;
}

.comprovante-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}


.comprovante-grid .comprovante-card {
  margin-bottom: 0;
}

.comprovante-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.comprovante-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.comprovante-header h2,
.comprovante-header h3 {
  margin: 0 0 0.35rem;
}

.comprovante-header p {
  color: var(--color-muted);
}

.comprovante-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  color: #2563eb;
}

.comprovante-body {
  display: grid;
  gap: 0.75rem;
}

.comprovante-body .btn {
  justify-self: start;
  width: auto;
}

.comprovante-label {
  font-weight: 600;
}

.comprovante-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.comprovante-textarea:focus {
  outline: none;
  border-color: #ff8a00;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
}

.comprovante-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comprovante-item {
  margin-bottom: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #1f2937;
  display: grid;
  gap: 0.65rem;
}

.comprovante-item.is-active {
  background: #e7f7ec;
  border-color: #b7f0d1;
}

.comprovante-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.comprovante-item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a;
}

.comprovante-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.comprovante-item-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1f2937;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.comprovante-item-btn.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.comprovante-item-body {
  font-size: 0.95rem;
  color: #334155;
  white-space: pre-wrap;
}


.keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
}

.keyword-chip {
  background: #f1f1f1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  color: #333;
  border: 1px solid #ddd;
}

.keyword-chip:hover {
  background: #e3e3e3;
}

.keyword-chip i {
  margin-left: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #666;
}

/* Integracoes */
#integracoes.content-section {
  max-width: none;
  margin: 0;
}

.integrations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.integrations-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.integration-selectors {
  display: grid;
  gap: 1rem;
}

.integration-tab {
  border: none;
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, #5a2eff, #744bff);
  box-shadow: 0 16px 28px rgba(90, 46, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.integration-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(90, 46, 255, 0.3);
}

.integration-tab.integration-tab-kiwify {
  background: linear-gradient(135deg, #6ccf3f, #8fe262);
  box-shadow: 0 16px 28px rgba(86, 189, 62, 0.25);
}

.integration-tab.integration-tab-kiwify:hover {
  box-shadow: 0 18px 32px rgba(86, 189, 62, 0.3);
}

.integration-tab.integration-tab-kirvano {
  background: linear-gradient(135deg, #ff7a2f, #ff9d5c);
  box-shadow: 0 16px 28px rgba(255, 122, 47, 0.25);
}

.integration-tab.integration-tab-kirvano:hover {
  box-shadow: 0 18px 32px rgba(255, 122, 47, 0.3);
}

.integration-tab.integration-tab-braib {
  background: linear-gradient(135deg, #2b7cff, #5aa2ff);
  box-shadow: 0 16px 28px rgba(43, 124, 255, 0.25);
}

.integration-tab.integration-tab-braib:hover {
  box-shadow: 0 18px 32px rgba(43, 124, 255, 0.3);
}

.integration-tab.integration-tab-hotmart {
  background: linear-gradient(135deg, #f04348, #ff6b6f);
  box-shadow: 0 16px 28px rgba(240, 67, 72, 0.25);
}

.integration-tab.integration-tab-hotmart:hover {
  box-shadow: 0 18px 32px rgba(240, 67, 72, 0.3);
}

.integration-tab .integration-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.integrations-panels {
  width: 100%;
}

.integration-panel {
  display: none;
}

.integration-panel.active {
  display: block;
}

.integration-card-placeholder {
  min-height: 220px;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.integration-icon-kiwify {
  background: linear-gradient(135deg, rgba(108, 207, 63, 0.2), rgba(143, 226, 98, 0.08));
  color: #4caf50;
}

.integration-icon-kirvano {
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.2), rgba(255, 157, 92, 0.08));
  color: #ff7a2f;
}

.integration-icon-braib {
  background: linear-gradient(135deg, rgba(43, 124, 255, 0.2), rgba(90, 162, 255, 0.08));
  color: #2b7cff;
}

.integration-icon-hotmart {
  background: linear-gradient(135deg, rgba(240, 67, 72, 0.2), rgba(255, 107, 111, 0.08));
  color: #f04348;
}

@media (min-width: 1100px) {
  .integrations-layout {
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  }
}

.integration-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.integration-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.08), rgba(59, 130, 246, 0.06));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.integration-card:hover::before {
  opacity: 1;
}

.integration-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.integration-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.integration-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.18), rgba(255, 138, 0, 0.05));
  color: #ff8a00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.integration-subtitle {
  display: block;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 0.1rem;
}

.integration-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

.integration-description {
  margin: 1rem 0 1.5rem;
  color: var(--color-muted);
  position: relative;
  z-index: 1;
}

.integration-form {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.integration-form.integration-form-single {
  grid-template-columns: minmax(0, 1fr);
}

.integration-input-group {
  display: grid;
  gap: 0.5rem;
}

.integration-label {
  font-weight: 600;
}

.integration-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: #ffffff;
  min-height: 48px;
}

.integration-input:focus {
  outline: none;
  border-color: #ff8a00;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
}

select.integration-input {
  appearance: none;
  background-color: #ffffff;
  background-image: url('data:image/svg+xml;utf8,<svg fill=\"black\" height=\"20\" viewBox=\"0 0 24 24\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 10l5 5 5-5z\"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem;
  padding-right: 2.4rem;
  border-radius: 14px;
}

.integration-hint {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.integration-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.integration-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.integration-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 1.4rem;
}

.btn.btn-ghost {
  background: #ffffff;
  color: var(--color-text);
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.btn.btn-ghost:hover {
  background: #f8fafc;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.integration-status {
  color: var(--color-muted);
  font-size: 0.9rem;
  min-height: 1rem;
  margin: 0;
}

.integration-status.is-success {
  color: #2f855a;
}

.integration-status.is-error {
  color: #c53030;
}

.integration-status.is-info {
  color: #2563eb;
}

.integration-sales {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e6edf5;
  display: grid;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.integration-sales.sales-recovery {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.integration-sales-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.integration-sales-header .sales-header-actions {
  margin-left: auto;
}

.integration-sales-header h3 {
  margin: 0 0 0.25rem;
}

.integration-sales-filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.integration-filter label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.integration-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.integration-date-range.range-picker {
  grid-template-columns: 1fr;
  position: relative;
}

.integration-date-range.range-picker .date-range-display {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  min-height: 48px;
  border-radius: 14px;
}

.integration-message-box {
  border: 1px solid #e6edf5;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  background: #ffffff;
  display: grid;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.integration-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.integration-message-header strong {
  color: var(--color-text);
}

.integration-message-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.integration-message-actions .integration-input {
  flex: 1 1 240px;
}

.integration-sales-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.2rem;
}

.integration-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.integration-sales-count {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.integration-sales-list {
  display: grid;
  gap: 1rem;
  max-height: none;
  overflow-y: auto;
  padding-right: 0.25rem;
}

#vendas .integration-sales-list {
  overflow: visible;
  padding-right: 0;
}

.integration-sale {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.integration-sale:hover {
  border-color: #cbd5f5;
}

.integration-sale-check {
  display: inline-flex;
  align-items: flex-start;
}

.integration-sale-check input {
  margin-top: 0.2rem;
}

.integration-sale.is-disabled {
  opacity: 0.6;
}

.integration-sale-main {
  flex: 1;
  display: grid;
  gap: 0.35rem;
}

.integration-sale-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-weight: 600;
  justify-content: space-between;
  width: 100%;
  color: var(--layout-text, #111827);
}

.integration-sale-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--layout-muted, #64748b);
  font-size: 0.85rem;
  line-height: 1.45;
  border-top: 1px solid var(--layout-border, #e2e8f0);
  padding-top: 0.6rem;
  margin-top: 0.4rem;
}

.integration-sale-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.integration-sale-meta span + span::before {
  content: '|';
  color: #cbd5e1;
}

.integration-sale-title .status-badge {
  margin-left: auto;
}

.integration-sale-meta .sale-meta-label {
  font-weight: 600;
  color: var(--layout-text, #111827);
}

.integration-sale-meta .sale-meta-value {
  color: var(--layout-muted, #64748b);
  margin-left: 0.25rem;
}

.status-badge {
  border-radius: 8px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-badge.is-success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.status-badge.is-warning {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.is-warning {
  background: #fff7ed;
  color: #c05621;
  border: 1px solid #fed7aa;
}

.status-badge.is-success {
  background: #f0fff4;
  color: #2f855a;
  border: 1px solid #c6f6d5;
}

.status-badge.is-error {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

.status-badge.is-muted {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.integration-sale-empty {
  padding: 1rem;
  text-align: center;
  color: var(--color-muted);
  border: 1px dashed #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

body.panel-page.theme-dark #vendas .integration-sale-empty {
  background: #1e293b;
  border-color: rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  border-radius: 12px;
}

.integration-send {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Uploads */
.file-upload {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px dashed #d4dce6;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 55%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.file-upload::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.2), rgba(255, 138, 0, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-upload:hover {
  border-color: #ff8a00;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.file-upload:hover::after {
  opacity: 1;
}

.file-upload:focus-within,
.file-upload.dragover {
  border-color: #ff8a00;
  border-style: solid;
  box-shadow: 0 12px 22px rgba(255, 138, 0, 0.18);
}

.file-upload.has-file {
  border-color: #38a169;
  border-style: solid;
  background: linear-gradient(135deg, #f0fff4 0%, #ffffff 60%);
}

.file-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.2);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.25);
}

.file-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.file-upload-meta {
  display: grid;
  gap: 0.25rem;
  position: relative;
  z-index: 1;
}

.file-upload-title {
  font-weight: 600;
}

.file-upload-name {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.file-upload-hint {
  color: var(--color-muted);
  font-size: 0.8rem;
}


/* Container da linha de filtros */

/* inputs de data */

/* botão */


.textoEncurtado {
  max-height: 3.2em; /* ~2 linhas */
  overflow: hidden;
  white-space: pre-wrap;
  transition: max-height 0.3s ease;
}

.textoEncurtado.expandido {
  max-height: none;
}

/* Audiencia */
.audience-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.audience-header p {
  color: var(--color-muted);
}

.audience-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.audience-date-range {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.audience-date-group {
  display: grid;
  gap: 0.35rem;
}

.audience-date-group label {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1;
}

.audience-date-group input {
  padding: 0.55rem 0.8rem;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #ffffff;
  min-width: 140px;
}

.audience-search {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--color-muted);
  align-self: center;
  min-height: 40px;
}

.audience-search input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  min-width: 180px;
  color: var(--color-text);
  background: transparent;
  margin: 0;
  padding: 0;
}

.audience-actions .btn {
  padding: 0.55rem 1.25rem;
  min-height: 40px;
}

.audience-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.audience-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.audience-summary-item {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  display: grid;
  gap: 0.35rem;
}

.audience-summary-label {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.audience-status {
  margin: 0;
  color: var(--color-muted);
  min-height: 1rem;
}

.audience-status.is-success {
  color: #2f855a;
}

.audience-status.is-error {
  color: #c53030;
}

.audience-status.is-info {
  color: #2563eb;
}

.audience-list {
  display: grid;
  gap: 0.75rem;
}

.audience-item {
  border: 1px solid #e6edf5;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: #ffffff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.audience-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.audience-body {
  display: grid;
  gap: 0.4rem;
}

.audience-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.audience-name {
  font-weight: 600;
}

.audience-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.audience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.chat-support {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.25rem;
}

.chat-contacts {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

#atendimento .chat-support {
  align-items: start;
}

#atendimento .chat-contacts {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

.chat-contacts-header h2 {
  margin: 0 0 0.75rem;
}

.chat-contacts-search {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: transparent;
  color: var(--color-muted);
  width: 100%;
  max-width: 220px;
  height: 40px;
  align-self: flex-start;
}

.chat-contacts-search i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #94a3b8;
  flex: 0 0 auto;
}

.chat-contacts-search input {
  border: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text);
  width: 100%;
  min-width: 0;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.chat-contacts-search input::placeholder {
  color: #94a3b8;
}

.chat-contact-list {
  display: grid;
  gap: 0.6rem;
  max-height: clamp(240px, 60vh, 560px);
  align-content: start;
  grid-auto-rows: 96px;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-gutter: stable;
}

.chat-contact-item {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  height: 96px;
  align-self: start;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}

.chat-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.chat-contact-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-contact-item.active {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.chat-contact-title {
  font-weight: 600;
}

.chat-contact-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.chat-contact-preview {
  font-size: 0.85rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-window {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.chat-window-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.chat-header-profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.chat-avatar.has-image img {
  display: block;
}

.chat-avatar.has-image i {
  display: none;
}

.chat-header-info {
  display: grid;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-action-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.chat-menu-toggle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-menu-toggle:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f6bed;
}

.chat-menu-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  background: #0f172a;
  color: #ffffff;
  border-radius: 16px;
  padding: 0.6rem;
  min-width: 200px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  z-index: 10;
}

.chat-menu[aria-hidden="true"] {
  display: none;
}

.chat-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.45rem 0.2rem;
}

.chat-menu-section {
  display: grid;
  gap: 0.5rem;
}

.chat-menu .tag-picker {
  width: 100%;
}

.chat-menu .tag-picker-button {
  width: 100%;
  justify-content: space-between;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.chat-menu .tag-picker-count {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.chat-menu .tag-picker-panel {
  width: 100%;
  min-width: 0;
}

.chat-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.chat-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-flow-menu {
  min-width: 220px;
}

.chat-flow-header {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem 0.6rem;
}

.chat-flow-list {
  display: grid;
  gap: 0.45rem;
}

.chat-flow-item {
  width: 100%;
  border: none;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  display: grid;
  gap: 0.2rem;
  cursor: pointer;
  font-weight: 600;
}

.chat-flow-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.chat-flow-title {
  font-size: 0.92rem;
}

.chat-flow-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.chat-flow-empty {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.6rem 0.35rem;
}

.chat-messages {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 65vh;
}

.chat-empty {
  color: var(--color-muted);
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}

.chat-bubble {
  max-width: 75%;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: var(--color-text);
  align-self: flex-start;
  white-space: pre-wrap;
}

.chat-bubble.is-outgoing {
  align-self: flex-end;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.chat-bubble-media {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  max-height: 260px;
  object-fit: cover;
}

.chat-bubble-text {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.chat-bubble-link {
  display: inline-flex;
  margin-top: 0.5rem;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.chat-bubble audio {
  width: 100%;
  margin-top: 0.5rem;
}

.chat-bubble-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--color-muted);
}

.chat-input {
  border: 1px solid var(--layout-border);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--layout-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 20px rgba(15, 23, 42, 0.08);
  width: 100%;
  margin: 0;
  min-height: 52px;
}

.chat-input:focus-within {
  box-shadow: inset 0 0 0 1px rgba(79, 107, 237, 0.6), 0 6px 25px rgba(15, 23, 42, 0.15);
}

.chat-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-attach {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(71, 85, 105, 0.4);
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.chat-attach:hover:not(:disabled) {
  border-color: rgba(79, 107, 237, 0.4);
  transform: translateY(-1px);
}

.chat-attach:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input textarea {
  flex: 1;
  resize: none;
  min-height: 34px;
  max-height: 72px;
  height: 36px;
  width: 100%;
  padding: 0.25rem 0.45rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  color: inherit;
  line-height: 1.2;
  margin: 0;
  align-self: center;
}

.chat-input textarea::placeholder {
  opacity: 0.65;
}

.chat-input button#chatSendBtn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #4f6bed, #6575ff);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 12px rgba(79, 107, 237, 0.25);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex: 0 0 auto;
  font-size: 0;
  line-height: 0;
}

.chat-input button#chatSendBtn::after {
  content: '>';
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 600;
  display: inline-block;
  transform: translateX(1px);
}

.chat-input button#chatSendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.chat-input button#chatSendBtn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 18px rgba(79, 107, 237, 0.35);
}

.chat-shortcuts {
  padding: 0.45rem 1.5rem 1rem;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 0.4rem;
}

.chat-shortcuts.is-compact {
  grid-template-columns: 1fr;
}

.chat-shortcuts.is-compact .chat-shortcuts-nav {
  display: none;
}

.chat-shortcuts-nav {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4f6bed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chat-shortcuts-nav:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  transform: translateY(-1px);
}

.chat-shortcuts-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.chat-shortcuts-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.chat-shortcuts-list::-webkit-scrollbar {
  display: none;
}

.chat-shortcut-item {
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  background: #eef2ff;
  color: #4f6bed;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  font: inherit;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.chat-shortcut-item:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  transform: translateY(-1px);
}

.chat-shortcut-item:focus-visible {
  outline: 2px solid rgba(79, 107, 237, 0.35);
  outline-offset: 2px;
}

.audience-empty {
  border: 1px dashed #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  color: var(--color-muted);
  background: #f8fafc;
}

@media (max-width: 900px) {
  .audience-actions {
    width: 100%;
  }

  .audience-date-range {
    width: 100%;
  }

  .audience-date-group {
    flex: 1 1 140px;
  }

  .audience-search {
    flex: 1 1 100%;
  }

  .audience-search input {
    min-width: 0;
    width: 100%;
  }
}

/* Vendas */
body.panel-page.theme-dark[data-section="vendas"] .content,
body.panel-page.theme-dark[data-section="vendas"] .content-section {
  background:
    radial-gradient(1000px 420px at 50% -140px, rgba(95, 86, 255, 0.35) 0%, rgba(15, 20, 40, 0) 65%),
    radial-gradient(1200px 700px at 20% 20%, rgba(34, 59, 120, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
    linear-gradient(180deg, #0b1020 0%, #111827 45%, #0b1120 100%);
  color: #ffffff;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

body.panel-page.theme-dark[data-section="vendas"] .content h2,
body.panel-page.theme-dark[data-section="vendas"] .content h3 {
  color: #ffffff;
}

#vendas .sales-header h2 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

body.panel-page.theme-dark[data-section="vendas"] .content-wrapper {
  background:
    radial-gradient(1000px 420px at 50% -140px, rgba(95, 86, 255, 0.35) 0%, rgba(15, 20, 40, 0) 65%),
    radial-gradient(1200px 700px at 20% 20%, rgba(34, 59, 120, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
    linear-gradient(180deg, #0b1020 0%, #111827 45%, #0b1120 100%);
}

body.panel-page.theme-dark[data-section="vendas"] .sidebar {
  background: #131b2e;
  border-color: rgba(51, 65, 85, 0.3);
}

body.panel-page.theme-dark[data-section="vendas"] .sidebar a,
body.panel-page.theme-dark[data-section="vendas"] .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark[data-section="vendas"] .sidebar-submenu a {
  color: #94a3b8;
}

body.panel-page.theme-dark[data-section="vendas"] .sidebar a:hover,
body.panel-page.theme-dark[data-section="vendas"] .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark[data-section="vendas"] .sidebar-submenu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

body.panel-page.theme-dark[data-section="vendas"] .sidebar a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.sales-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.sales-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

#vendas .sales-action-btn {
  display: none;
}

#vendas:not(.is-recuperacao) #btnBuscarVendasEfetuadas {
  display: inline-flex;
}

#vendas.is-recuperacao #btnBuscarVendas {
  display: inline-flex;
}

.sales-header p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.sales-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

#vendas .sales-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--layout-border, #e2e8f0);
  background: var(--layout-panel, #f8fafc);
  height: 40px;
}

#vendas .sales-view-toggle .sales-tab-btn {
  padding: 0 0.95rem;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--layout-muted, #64748b);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

#vendas .sales-view-toggle .sales-tab-btn.active {
  background: var(--layout-panel, #ffffff);
  color: var(--layout-text, #111827);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

#vendas .sales-header-actions .btn {
  height: 40px;
  padding: 0 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--layout-border, #e2e8f0);
  background: var(--layout-panel, #ffffff);
  color: var(--layout-text, #111827);
  box-shadow: none;
  font-weight: 600;
}

#vendas .sales-header-actions .btn:hover {
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}

#vendas .integration-sales-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

#vendas .integration-sales-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--layout-text, #111827);
}

#vendas .integration-sales-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

#vendas .integration-sales-header .sales-header-actions {
  margin-top: 0.15rem;
}

.sales-header-actions .btn {
  height: 40px;
  padding: 0 1.1rem;
  border-radius: 12px;
}

.sales-tab-panels {
  min-width: 0;
}

.sales-tab-panel {
  display: none;
}

.sales-tab-panel.active {
  display: block;
}

.sales-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.sales-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sales-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.7rem;
  position: relative;
}

.sales-filter-group {
  display: grid;
  gap: 0.45rem;
  position: relative;
}

.sales-panel h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--layout-muted, #64748b);
}


.sales-panel-calendar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.6rem;
  position: relative;
}

.sales-panel-calendar h4 {
  font-size: 0.75rem;
  margin-bottom: 0.1rem;
  color: #64748b;
}

#vendas .integration-input,
#vendas .sales-panel input,
#vendas .sales-panel textarea {
  background: var(--layout-panel, #f8fafc);
  border: 1px solid var(--layout-border, #e2e8f0);
  color: var(--layout-text, #0f172a);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

#vendas .integration-sales-filters {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

#vendas .integration-filter label {
  font-size: 0.75rem;
  color: var(--layout-muted, #64748b);
}

#vendas .integration-date-range.range-picker .date-range-display {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: none;
}

#vendas .sales-panel-calendar .date-range-display {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: none;
}

#vendas .integration-message-header {
  color: var(--layout-muted, #64748b);
  font-size: 0.75rem;
}

#vendas .integration-message-header strong {
  color: var(--layout-text, #111827);
}

#vendas .integration-message-actions {
  gap: 0.6rem;
}

#vendas .integration-message-actions .btn,
#vendas .integration-send .btn {
  height: 40px;
  padding: 0 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--layout-border, #e2e8f0);
  background: var(--layout-panel, #ffffff);
  color: var(--layout-text, #111827);
  box-shadow: none;
  font-weight: 600;
}

#vendas .integration-message-actions .btn:hover,
#vendas .integration-send .btn:hover {
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}

#vendas .integration-sales-toolbar {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--layout-border, #e2e8f0);
  border-radius: 10px;
  background: var(--layout-panel, #f8fafc);
}

#vendas .integration-select-all {
  font-size: 0.85rem;
  color: var(--layout-text, #0f172a);
}

#vendas .integration-send {
  align-items: center;
}

#vendas .integration-send .integration-status {
  margin: 0;
  color: var(--layout-muted, #64748b);
  font-size: 0.75rem;
}

#vendas .integration-input::placeholder,
#vendas .sales-panel input::placeholder {
  color: #94a3b8;
}

#vendas .date-range-popover,
#vendas .date-range-card {
  background: var(--layout-panel, #ffffff);
  border-color: var(--layout-border, #e2e8f0);
  color: var(--layout-text, #0f172a);
}

#vendas .date-range-weekdays span {
  color: var(--layout-muted, #64748b);
}

#vendas .date-cell {
  background: #ffffff;
  color: #1f2937;
}

#vendas .date-cell:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

#vendas .date-cell.is-muted {
  color: #cbd5e1;
}

#vendas .date-cell.is-today {
  border-color: #cbd5e1;
}

#vendas .date-cell.is-start,
#vendas .date-cell.is-end {
  background: var(--color-accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 12px rgba(255, 138, 0, 0.25);
}

#vendas .date-cell.is-in-range {
  background: rgba(255, 138, 0, 0.15);
  color: #1f2937;
}

.date-range-display {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #28344b;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: none;
}

.date-range-display i {
  order: -1;
  font-size: 0.85rem;
  color: #94a3b8;
}

.date-range-display i {
  color: #94a3b8;
  font-size: 0.95rem;
}

.date-range-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.date-range-popover {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  width: auto;
  display: none;
}

.date-range-popover.active {
  display: block;
}

.date-range-card {
  background: #ffffff;
  color: #1f2937;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 0.65rem;
  border: 1px solid #e2e8f0;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
}

.date-range-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.6rem;
  color: #94a3b8;
}

.date-range-summary {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  font-size: 0.8rem;
}

.date-range-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
}

.date-range-month {
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1f2937;
}

.date-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.date-nav-btn:hover {
  background: #eef2f7;
  color: #1f2937;
}

.date-range-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
  font-size: 0.6rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.date-range-grid {
  display: inline-grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  justify-content: start;
}

.date-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.72rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.date-cell:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.date-cell.is-muted {
  color: #cbd5e1;
}

.date-cell.is-today {
  border: 1px solid #cbd5e1;
}

.date-cell.is-start,
.date-cell.is-end {
  background: var(--color-accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 12px rgba(255, 138, 0, 0.25);
}

.date-cell.is-in-range {
  background: rgba(255, 138, 0, 0.15);
  color: #1f2937;
}

.date-range-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.date-range-actions .btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 10px;
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: none;
}

.date-range-actions .btn:hover {
  background: #e07b00;
}

.date-range-actions .btn.btn-ghost {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.7rem;
  box-shadow: none;
}

.date-range-actions .btn.btn-ghost:hover {
  color: #1f2937;
  background: #f8fafc;
}

.audience-actions {
  overflow: visible;
  align-items: center;
}


.audience-date-range {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  position: relative;
}

.audience-date-range label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.audience-date-range .integration-date-range {
  min-width: 220px;
}

.audience-date-range .integration-date-range.range-picker .date-range-display {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: none;
}

.sales-summary {
  display: grid;
  gap: 1.5rem;
}

.sales-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.sales-summary-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--layout-muted, #64748b);
}

.sales-summary-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--layout-text, #111827);
}

.sales-summary-meta {
  font-size: 0.75rem;
  color: var(--layout-muted, #64748b);
}

.sales-results {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.sales-results-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--layout-text, #111827);
}

.sales-results-header {
  display: grid;
  gap: 0.35rem;
}

.sales-results-header .integration-status {
  margin: 0;
  color: var(--layout-muted, #64748b);
  font-size: 0.75rem;
}

#vendas .sales-results-header .integration-status.is-success {
  color: #86efac;
}

#vendas .sales-results-header .integration-status.is-error {
  color: #fca5a5;
}

#vendas .sales-results-header .integration-status.is-info {
  color: #94a3b8;
}

.sales-results-header .integration-sales-count {
  margin: 0;
  color: var(--layout-muted, #64748b);
  font-size: 0.75rem;
}

.sales-results .integration-sales-list {
  max-height: none;
}

.integration-sale.no-check {
  align-items: stretch;
}

/* Conteudo - estilo vendas */
body.panel-page.theme-dark[data-section="mensagens"] .content,
body.panel-page.theme-dark[data-section="audios"] .content,
body.panel-page.theme-dark[data-section="imagens"] .content,
body.panel-page.theme-dark[data-section="documentos"] .content,
body.panel-page.theme-dark[data-section="mensagens"] .content-section,
body.panel-page.theme-dark[data-section="audios"] .content-section,
body.panel-page.theme-dark[data-section="imagens"] .content-section,
body.panel-page.theme-dark[data-section="documentos"] .content-section {
  background: #0f172a;
  color: #ffffff;
  font-family: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
}

body.panel-page.theme-dark[data-section="mensagens"] .content-wrapper,
body.panel-page.theme-dark[data-section="audios"] .content-wrapper,
body.panel-page.theme-dark[data-section="imagens"] .content-wrapper,
body.panel-page.theme-dark[data-section="documentos"] .content-wrapper {
  background: #0f172a;
}

body.panel-page.theme-dark[data-section="mensagens"] .sidebar,
body.panel-page.theme-dark[data-section="audios"] .sidebar,
body.panel-page.theme-dark[data-section="imagens"] .sidebar,
body.panel-page.theme-dark[data-section="documentos"] .sidebar {
  background: #131b2e;
  border-color: rgba(51, 65, 85, 0.3);
}

body.panel-page.theme-dark[data-section="mensagens"] .sidebar a,
body.panel-page.theme-dark[data-section="audios"] .sidebar a,
body.panel-page.theme-dark[data-section="imagens"] .sidebar a,
body.panel-page.theme-dark[data-section="documentos"] .sidebar a,
body.panel-page.theme-dark[data-section="mensagens"] .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark[data-section="audios"] .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark[data-section="imagens"] .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark[data-section="documentos"] .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark[data-section="mensagens"] .sidebar-submenu a,
body.panel-page.theme-dark[data-section="audios"] .sidebar-submenu a,
body.panel-page.theme-dark[data-section="imagens"] .sidebar-submenu a,
body.panel-page.theme-dark[data-section="documentos"] .sidebar-submenu a {
  color: #94a3b8;
}

body.panel-page.theme-dark[data-section="mensagens"] .sidebar a:hover,
body.panel-page.theme-dark[data-section="audios"] .sidebar a:hover,
body.panel-page.theme-dark[data-section="imagens"] .sidebar a:hover,
body.panel-page.theme-dark[data-section="documentos"] .sidebar a:hover,
body.panel-page.theme-dark[data-section="mensagens"] .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark[data-section="audios"] .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark[data-section="imagens"] .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark[data-section="documentos"] .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark[data-section="mensagens"] .sidebar-submenu a:hover,
body.panel-page.theme-dark[data-section="audios"] .sidebar-submenu a:hover,
body.panel-page.theme-dark[data-section="imagens"] .sidebar-submenu a:hover,
body.panel-page.theme-dark[data-section="documentos"] .sidebar-submenu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

body.panel-page.theme-dark[data-section="mensagens"] .sidebar a.active,
body.panel-page.theme-dark[data-section="audios"] .sidebar a.active,
body.panel-page.theme-dark[data-section="imagens"] .sidebar a.active,
body.panel-page.theme-dark[data-section="documentos"] .sidebar a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

body.panel-page.theme-dark #mensagens .messages-header h2,
body.panel-page.theme-dark #audios .messages-header h2,
body.panel-page.theme-dark #imagens h2,
body.panel-page.theme-dark #documentos h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

body.panel-page.theme-dark #mensagens .messages-toolbar .btn,
body.panel-page.theme-dark #audios .messages-toolbar .btn {
  height: 40px;
  padding: 0 1.1rem;
  border-radius: 10px;
  border: 1px solid #334155;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-weight: 600;
}

body.panel-page.theme-dark #mensagens .messages-toolbar .btn:hover,
body.panel-page.theme-dark #audios .messages-toolbar .btn:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: none;
}

body.panel-page.theme-dark #mensagens .messages-search input,
body.panel-page.theme-dark #audios .messages-search input {
  background: #28344b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

body.panel-page.theme-dark #mensagens .messages-search input::placeholder,
body.panel-page.theme-dark #audios .messages-search input::placeholder {
  color: #94a3b8;
}

body.panel-page.theme-dark #mensagens .messages-search i,
body.panel-page.theme-dark #audios .messages-search i {
  color: #94a3b8;
}

body.panel-page.theme-dark #mensagens .messages-list-panel,
body.panel-page.theme-dark #audios .messages-list-panel,
body.panel-page.theme-dark #mensagens .messages-detail-panel,
body.panel-page.theme-dark #audios .messages-detail-panel {
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

body.panel-page.theme-dark #mensagens .message-detail-header h3,
body.panel-page.theme-dark #audios .message-detail-header h3 {
  color: #ffffff;
}

body.panel-page.theme-dark #mensagens .message-detail-meta,
body.panel-page.theme-dark #audios .message-detail-meta,
body.panel-page.theme-dark #mensagens .message-detail-delay,
body.panel-page.theme-dark #audios .message-detail-delay,
body.panel-page.theme-dark #mensagens .message-detail-shortcut,
body.panel-page.theme-dark #audios .message-detail-shortcut {
  color: #94a3b8;
  border-color: rgba(51, 65, 85, 0.6);
  background: #28344b;
}

body.panel-page.theme-dark #mensagens .message-detail-body,
body.panel-page.theme-dark #audios .message-detail-body {
  border-color: rgba(51, 65, 85, 0.6);
  background: #0f172a;
  color: #e2e8f0;
}

body.panel-page.theme-dark #mensagens .message-card-title,
body.panel-page.theme-dark #audios .message-card-title {
  color: #ffffff;
}

#mensagens .message-card-preview,
#audios .message-card-preview,
#audios .audio-detail-body #audioDetalheTexto {
  color: #94a3b8;
}

#mensagens #listaMensagens li.message-card,
#audios #listaAudios li.message-card {
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.5);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

#mensagens #listaMensagens li.message-card:hover,
#audios #listaAudios li.message-card:hover {
  border-color: rgba(71, 85, 105, 0.7);
  background: #1e293b;
}

#mensagens #listaMensagens li.message-card.selected,
#audios #listaAudios li.message-card.selected {
  background: #24324a;
  border-color: rgba(100, 116, 139, 0.7);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.45);
}

#mensagens .message-actions button,
#audios .message-actions button {
  background: #0f172a;
  border: 1px solid #334155;
  color: #94a3b8;
}

#mensagens .message-actions .btn-edit:hover,
#audios .message-actions .btn-edit:hover {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

#mensagens .message-actions .btn-delete:hover,
#audios .message-actions .btn-delete:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

body.panel-page:not(.theme-dark) #mensagens #listaMensagens li.message-card,
body.panel-page:not(.theme-dark) #audios #listaAudios li.message-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  box-shadow: var(--shadow-sm);
}

body.panel-page:not(.theme-dark) #mensagens #listaMensagens li.message-card:hover,
body.panel-page:not(.theme-dark) #audios #listaAudios li.message-card:hover {
  background: #f8fafc;
  border-color: #dbe3ef;
  box-shadow: var(--shadow-sm);
}

body.panel-page:not(.theme-dark) #mensagens #listaMensagens li.message-card.selected,
body.panel-page:not(.theme-dark) #audios #listaAudios li.message-card.selected {
  background: #f3f4f6;
  border-color: #d1d5db;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

body.panel-page:not(.theme-dark) #mensagens .message-actions button,
body.panel-page:not(.theme-dark) #audios .message-actions button {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

body.panel-page:not(.theme-dark) #mensagens .message-actions .btn-edit:hover,
body.panel-page:not(.theme-dark) #audios .message-actions .btn-edit:hover {
  color: #16a34a;
  background: #ecfdf3;
  border-color: #86efac;
}

body.panel-page:not(.theme-dark) #mensagens .message-actions .btn-delete:hover,
body.panel-page:not(.theme-dark) #audios .message-actions .btn-delete:hover {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

body.panel-page:not(.theme-dark) #imagens form,
body.panel-page:not(.theme-dark) #documentos form {
  background: #ffffff;
  border-color: #e6edf5;
  box-shadow: var(--shadow-sm);
}

body.panel-page:not(.theme-dark) #imagens input,
body.panel-page:not(.theme-dark) #documentos input,
body.panel-page:not(.theme-dark) #imagens textarea,
body.panel-page:not(.theme-dark) #documentos textarea,
body.panel-page:not(.theme-dark) #imagens select,
body.panel-page:not(.theme-dark) #documentos select {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.panel-page:not(.theme-dark) #imagens .file-upload,
body.panel-page:not(.theme-dark) #documentos .file-upload {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.panel-page:not(.theme-dark) .chat-menu {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body.panel-page:not(.theme-dark) .chat-menu-divider {
  background: #e2e8f0;
}

body.panel-page:not(.theme-dark) .chat-menu .tag-picker-button {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #1f2937;
}

body.panel-page:not(.theme-dark) .chat-menu .tag-picker-count {
  background: #e2e8f0;
  color: #475569;
}

body.panel-page:not(.theme-dark) .chat-menu-item:hover {
  background: #f1f5f9;
}

body.panel-page:not(.theme-dark) .chat-flow-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body.panel-page:not(.theme-dark) .chat-flow-item:hover {
  background: #eef2f7;
}

body.panel-page:not(.theme-dark) .chat-flow-meta,
body.panel-page:not(.theme-dark) .chat-flow-empty {
  color: #64748b;
}

body.panel-page:not(.theme-dark) .date-range-display {
  background: #ffffff;
  border-color: #dbe3ef;
  color: #0f172a;
}

body.panel-page:not(.theme-dark) .date-range-display i {
  color: #64748b;
}

body.panel-page:not(.theme-dark) #vendas .sales-panel-calendar .date-range-display {
  background: #ffffff;
  border-color: #dbe3ef;
  color: #0f172a;
}

body.panel-page.theme-dark #imagens form,
body.panel-page.theme-dark #documentos form {
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

body.panel-page.theme-dark #imagens input,
body.panel-page.theme-dark #documentos input,
body.panel-page.theme-dark #imagens textarea,
body.panel-page.theme-dark #documentos textarea,
body.panel-page.theme-dark #imagens select,
body.panel-page.theme-dark #documentos select {
  background: #28344b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

body.panel-page.theme-dark #imagens input::placeholder,
body.panel-page.theme-dark #documentos input::placeholder {
  color: #94a3b8;
}

body.panel-page.theme-dark #imagens .file-upload,
body.panel-page.theme-dark #documentos .file-upload {
  background: #1e293b;
  border-color: rgba(51, 65, 85, 0.6);
}

body.panel-page.theme-dark #imagens .file-upload-title,
body.panel-page.theme-dark #documentos .file-upload-title,
body.panel-page.theme-dark #imagens .file-upload-name,
body.panel-page.theme-dark #documentos .file-upload-name,
body.panel-page.theme-dark #imagens .file-upload-hint,
body.panel-page.theme-dark #documentos .file-upload-hint {
  color: #94a3b8;
}

body.panel-page.theme-dark #imagens .content-card,
body.panel-page.theme-dark #documentos .content-card {
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

body.panel-page.theme-dark #imagens .content-name,
body.panel-page.theme-dark #documentos .content-name {
  color: #ffffff;
}

body.panel-page.theme-dark #imagens .content-meta,
body.panel-page.theme-dark #documentos .content-meta,
body.panel-page.theme-dark #imagens .content-delay,
body.panel-page.theme-dark #documentos .content-delay {
  color: #94a3b8;
  background: #28344b;
  border-color: #334155;
}

body.panel-page.theme-dark #imagens .content-icon,
body.panel-page.theme-dark #documentos .content-icon {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

body.panel-page.theme-dark #imagens .content-body,
body.panel-page.theme-dark #documentos .content-body {
  color: #cbd5f5;
}

body.panel-page.theme-dark #imagens .image-viewer-btn {
  background: #28344b;
  border-color: #334155;
  color: #e2e8f0;
}

body.panel-page.theme-dark #imagens .image-viewer-btn:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 10px 18px rgba(30, 64, 175, 0.25);
}

body.panel-page.theme-dark #documentos .content-link {
  color: #93c5fd;
}

#imagens.content-section.active,
#documentos.content-section.active {
  display: grid !important;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  column-gap: 1.5rem;
  row-gap: 0.85rem;
  align-items: start;
}

#imagens.content-section.active > h2,
#documentos.content-section.active > h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

#imagens.content-section.active > form,
#documentos.content-section.active > form {
  grid-column: 1;
  margin-top: 0;
}

#imagens.content-section.active > ul,
#documentos.content-section.active > ul {
  grid-column: 2;
}


@media (max-width: 1000px) {
  .sales-tabs {
    grid-template-columns: 1fr;
  }

  .sales-header-actions,
  .integration-sales-header .sales-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .sales-view-toggle {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .sales-layout {
    grid-template-columns: 1fr;
  }
}



/* Clean sidebar and header refresh inspired by the reference layout */
.panel-page header.header {
  background: #ffffff;
  color: #0f172a;
  border-bottom: 1px solid #e3e8f2;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}
.panel-page header.header h1 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.panel-page .header-nav a {
  color: #1e293b;
  font-weight: 500;
}
.panel-page .main-container {
  background: #f3f6fb;
}
.panel-page .sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.09);
  padding: 1.25rem 0.5rem 1.5rem;
  gap: 0.4rem;
}
.panel-page .sidebar a,
.panel-page .sidebar-group .sidebar-toggle {
  margin: 0 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  color: #475569;
  font-size: 0.95rem;
  text-transform: none;
  border-left: 4px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.panel-page .sidebar-group .sidebar-toggle:focus {
  outline: none;
  box-shadow: none;
}

.panel-page .sidebar-group .sidebar-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(79, 107, 237, 0.25);
}
.panel-page .sidebar a i,
.panel-page .sidebar-group .sidebar-toggle > i {
  min-width: 20px;
  text-align: center;
  color: inherit;
}
.panel-page .sidebar a:hover,
.panel-page .sidebar-group .sidebar-toggle:hover {
  background: #f4f6fb;
  color: #111827;
  transform: translateX(2px);
}
.panel-page .sidebar a.active {
  background: rgba(19, 181, 125, 0.12);
  color: #13b57d;
  border-left-color: #13b57d;
  font-weight: 600;
}
.panel-page .sidebar-group.open .sidebar-toggle {
  background: rgba(19, 181, 125, 0.18);
  color: #13b57d;
  border-left-color: #13b57d;
  box-shadow: none;
}
.panel-page .sidebar-submenu {
  padding-left: 0.5rem;
}
.panel-page .sidebar-submenu a {
  margin: 0 0.35rem 0.15rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  border-left: 4px solid transparent;
}
.panel-page .sidebar-submenu a:hover {
  background: #edf2fb;
}
.panel-page .sidebar-submenu a.active {
  background: rgba(19, 181, 125, 0.12);
  color: #13b57d;
  border-left-color: #13b57d;
}
.panel-page .content {
  background: transparent;
  padding: 3rem;
}

/* Toon geral claro e alinhado */
body.panel-page {
  background: #e9eff8;
}

.panel-page .content-wrapper {
  padding: 2rem 2.5rem 3rem;
}

.panel-page .content {
  max-width: 1240px;
  margin: 0 auto;
}

.panel-page #inicio h2 {
  color: #0c111b;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

.panel-page #inicio p {
  color: #5e6982;
  font-size: 1rem;
  margin-top: 0.35rem;
}

.panel-page #inicio .welcome-banner {
  background: #f1f4ff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 2.4rem 2.8rem;
  margin-top: 1.5rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.panel-page #inicio .welcome-banner .text h2 {
  margin: 0;
}

.panel-page #inicio .welcome-banner .text p {
  opacity: 0.85;
}

.panel-page #inicio .welcome-banner .illustration img {
  max-width: 160px;
}

.panel-page #inicio .stats {
  margin-top: 2.5rem;
}

.panel-page #inicio .stats h3 {
  font-size: 1.15rem;
  color: #1e2431;
  margin-bottom: 1rem;
}

.panel-page .stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.panel-page .stats-card {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  align-items: center;
}

.panel-page .stats-card i {
  font-size: 1.4rem;
}

.panel-page .stats-card .title {
  font-size: 1rem;
  font-weight: 600;
}

.panel-page .stats-card .count {
  font-size: 1.6rem;
  font-weight: 700;
  color: #4f6bed;
}

/* Ajustes diversos para manter o estilo clean */
.panel-page form {
  border: 1px solid #e3e7f1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.panel-page ul,
.panel-page .content-section {
  background: transparent;
}

/* Layout inspirado no exemplo (sem copiar conteudos) */
@media (min-width: 901px) {
  :root {
    --layout-bg: #f6f7fb;
    --layout-panel: #ffffff;
    --layout-border: #e6e8f2;
    --layout-text: #111827;
    --layout-muted: #7c8699;
    --layout-accent: #4f6bed;
    --layout-header-height: 72px;
    --layout-sidebar-gap: 0.75rem;
  }

  body.panel-page {
    background: #ffffff;
  }

  .panel-page header.header {
    background: #ffffff;
    border-bottom: 1px solid var(--layout-border);
    box-shadow: none;
    height: var(--layout-header-height);
    padding: 0 1.5rem;
  }

  .panel-page header.header h1 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--layout-text);
  }

  .panel-page .header-nav a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--layout-text);
  }

  .panel-page .header-nav ul {
    align-items: center;
  }

  .panel-page .header-nav li {
    display: flex;
    align-items: center;
  }

  .panel-page .header-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
  }

  .panel-page .toggle-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #1f2937;
    border: none;
  }

  .panel-page .main-container {
    margin-top: var(--layout-header-height);
    height: calc(100vh - var(--layout-header-height));
    padding: 1rem 1.25rem;
    background: transparent;
  }

  .panel-page .sidebar {
    top: calc(var(--layout-header-height) + var(--layout-sidebar-gap));
    left: 1rem;
    width: 220px;
    height: calc(100vh - var(--layout-header-height) - var(--layout-sidebar-gap) - 3rem);
    background: #f6f7fb;
    border: 1px solid var(--layout-border);
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 0.6rem;
    transition: width 0.2s ease, padding 0.2s ease;
  }

  .panel-page .content-wrapper {
    margin-left: calc(220px + 1rem);
    transition: margin-left 0.2s ease;
  }

  .panel-page .content {
    background: var(--layout-panel);
    border: 1px solid var(--layout-border);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    padding: 2.5rem;
  }

  .panel-page .sidebar a,
  .panel-page .sidebar-group .sidebar-toggle {
    font-size: 0.92rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border-left: none;
    color: #535d70;
  }

  .panel-page .sidebar a:hover,
  .panel-page .sidebar-group .sidebar-toggle:hover {
    background: #edf1fb;
    color: var(--layout-text);
    transform: none;
  }

  .panel-page .sidebar a.active,
  .panel-page .sidebar-group.open .sidebar-toggle {
    background: #eef1ff;
    color: var(--layout-accent);
  }

  .panel-page .sidebar-submenu a {
    background: transparent;
    color: #5b6579;
  }

  .panel-page.sidebar-collapsed .sidebar {
    width: 72px;
    padding: 1rem 0.35rem;
  }

  .panel-page.sidebar-collapsed .content-wrapper {
    margin-left: calc(72px + 1rem);
  }

  .panel-page.sidebar-collapsed .sidebar a,
  .panel-page.sidebar-collapsed .sidebar-group .sidebar-toggle {
    justify-content: center;
    padding: 0.65rem 0.5rem;
    border-left: none;
  }

  .panel-page.sidebar-collapsed .sidebar a i,
  .panel-page.sidebar-collapsed .sidebar-group .sidebar-toggle > i {
    margin-right: 0;
  }

  .panel-page.sidebar-collapsed .sidebar-text,
  .panel-page.sidebar-collapsed .sidebar-label,
  .panel-page.sidebar-collapsed .sidebar-caret {
    display: none;
  }

  .panel-page.sidebar-collapsed .sidebar-submenu {
    padding-left: 0;
  }

  .panel-page.sidebar-collapsed .sidebar-submenu a {
    margin: 0 0.25rem 0.15rem;
  }

  .panel-page .sidebar-submenu a.active {
    background: #eef1ff;
    color: var(--layout-accent);
  }

  .panel-page .audience-card,
  .panel-page form,
  .panel-page li {
    border: 1px solid var(--layout-border);
    box-shadow: none;
  }

  .panel-page .audience-card,
  .panel-page .chatgpt-card,
  .panel-page .chatgpt-list-card,
  .panel-page .comprovante-card,
  .panel-page .integration-card,
  .panel-page .integration-panel,
  .panel-page .sales-results,
  .panel-page .sales-panel,
  .panel-page .sales-summary-card,
  .panel-page .backup-card,
  .panel-page .content-card,
  .panel-page .funil-card,
  .panel-page .stats-card,
  .panel-page .message-card,
  .panel-page .integration-sale,
  .panel-page li {
    background: var(--layout-panel);
    border: 1px solid var(--layout-border);
    border-radius: 18px;
    box-shadow: none;
  }

  .panel-page .integration-card,
  .panel-page .sales-panel,
  .panel-page .sales-results,
  .panel-page .backup-card,
  .panel-page .audience-card {
    border-radius: 20px;
  }

  .panel-page .stats-card {
    background: #ffffff;
    color: var(--layout-text);
    border: 1px solid var(--layout-border);
    box-shadow: none;
  }

  .panel-page .stats-card .count {
    color: var(--layout-accent);
  }

  .panel-page .welcome-banner,
  .panel-page #inicio .welcome-banner {
    background: #f1f4ff;
    color: var(--layout-text);
    border: 1px solid var(--layout-border);
    box-shadow: none;
  }

  .panel-page .welcome-banner .btn,
  .panel-page #inicio .welcome-banner .btn {
    background: #ffffff;
    color: var(--layout-text);
    border: 1px solid var(--layout-border);
  }

  body.panel-page[data-section] .content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1.25rem 0 2rem;
    max-width: none;
    margin: 0;
  }

body.panel-page[data-section="atendimento"] .content {
  overflow: hidden;
  padding-top: 0;
}

  body.panel-page[data-section="atendimento"] #atendimento.content-section.active {
    height: 100%;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-support {
    height: 100%;
    align-items: stretch;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-contacts {
    position: static;
    display: flex;
    flex-direction: column;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-contact-list {
    max-height: none;
    flex: 1;
    min-height: 0;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-window {
    height: 100%;
    min-height: 0;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-messages {
    max-height: none;
    min-height: 0;
  }

  body.panel-page[data-section] .content-wrapper {
    margin-left: calc(220px + 0.5rem);
  }
}

.panel-page .btn,
.panel-page .content-section button[type="submit"] {
  background: linear-gradient(135deg, #4f6bed, #6c7dff);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  box-shadow: 0 12px 20px rgba(79, 107, 237, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.panel-page .btn:hover,
.panel-page .content-section button[type="submit"]:hover {
  background: linear-gradient(135deg, #4259d4, #5f70ff);
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(79, 107, 237, 0.32);
}

.panel-page .btn:active,
.panel-page .content-section button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(79, 107, 237, 0.2);
}

.panel-page .btn.btn-ghost {
  background: linear-gradient(135deg, #4f6bed, #6c7dff);
  color: #ffffff;
  border: none;
}

@media (max-width: 900px) {
  body.panel-page {
    background: #ffffff;
  }

  .panel-page header.header {
    box-shadow: none;
    border-bottom: 1px solid #e6eaf2;
  }

  .panel-page .main-container {
    background: transparent;
    padding: 0.75rem;
  }

  .panel-page .content-wrapper {
    padding: 0;
  }

  .panel-page .content {
    padding: 1rem;
    margin-top: 0;
  }

  .panel-page .sidebar {
    border-radius: 0 16px 16px 0;
    padding: 0.9rem 0.4rem 1.1rem;
    background: #f6f7fb;
    border: 1px solid #e6e8f2;
    box-shadow: none;
  }

  .panel-page .sidebar a,
  .panel-page .sidebar-group .sidebar-toggle {
    margin: 0 0.35rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    color: #535d70;
  }

  .panel-page .sidebar a:hover,
  .panel-page .sidebar-group .sidebar-toggle:hover {
    background: #edf1fb;
    color: #111827;
  }

  .panel-page .sidebar a.active {
    background: #eef1ff;
    color: #4f6bed;
    border-left-color: #4f6bed;
    font-weight: 600;
  }

  .panel-page .sidebar-group.open .sidebar-toggle {
    background: #eef1ff;
    color: #4f6bed;
    border-left-color: #4f6bed;
  }

  .panel-page .sidebar-submenu a {
    background: #f8fafc;
    color: #475569;
  }

  .panel-page .sidebar-submenu a.active {
    background: #eef1ff;
    color: #4f6bed;
    border-left-color: #4f6bed;
  }

  .panel-page .toggle-sidebar {
    color: #1f2937;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 0.45rem 0.6rem;
  }

  .panel-page #inicio h2 {
    font-size: 1.45rem;
  }

  .panel-page #inicio .welcome-banner {
    padding: 1.25rem;
    border-radius: 18px;
    background: #f1f4ff;
    color: #111827;
    border: 1px solid #e6e8f2;
    box-shadow: none;
  }

  .panel-page .welcome-banner .btn,
  .panel-page #inicio .welcome-banner .btn {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e6e8f2;
  }

  .panel-page .stats-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-page .stats-card {
    padding: 0.9rem;
    background: #ffffff;
    color: #111827;
    border: 1px solid #e6e8f2;
    box-shadow: none;
  }

  .panel-page .stats-card .count {
    color: #4f6bed;
  }

  .comprovante-grid {
    grid-template-columns: 1fr;
  }
}

.panel-page .sidebar a:focus,
.panel-page .sidebar a:focus-visible,
.panel-page .sidebar-group .sidebar-toggle:focus,
.panel-page .sidebar-group .sidebar-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Dark mode overrides - final */
body.panel-page.theme-dark form,
body.panel-page.theme-dark #imagens.content-section.active > form,
body.panel-page.theme-dark #documentos.content-section.active > form,
body.panel-page.theme-dark #funis.content-section.active > form {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: none;
}

body.panel-page.theme-dark .welcome-banner,
body.panel-page.theme-dark #inicio .welcome-banner,
body.panel-page.theme-dark .stats,
body.panel-page.theme-dark .stats-card,
body.panel-page.theme-dark #inicio .stats-card {
  background: #111827;
  border-color: #1f2937;
  box-shadow: none;
}

body.panel-page.theme-dark .welcome-banner .text h2,
body.panel-page.theme-dark .welcome-banner .text p {
  color: var(--layout-text);
}

body.panel-page.theme-dark .welcome-banner .text p {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .audience-search,
body.panel-page.theme-dark .date-range-display,
body.panel-page.theme-dark .audience-date-range .date-range-display,
body.panel-page.theme-dark .integration-date-range.range-picker .date-range-display {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .chatgpt-toggle,
body.panel-page.theme-dark .comprovante-toggle,
body.panel-page.theme-dark .integration-toggle {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .slider {
  background-color: #334155;
}

body.panel-page.theme-dark .slider:before {
  background-color: #e2e8f0;
}

body.panel-page.theme-dark #disponiveis {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark .image-viewer-btn {
  background: #0b1220;
  border-color: #1f2937;
  color: var(--layout-text);
  box-shadow: none;
  transform: none;
}

body.panel-page.theme-dark .image-viewer-btn:hover {
  border-color: #334155;
  box-shadow: none;
  transform: none;
}

/* Dark mode sweep */
body.panel-page.theme-dark {
  --layout-panel: #0f172a;
  --layout-border: #1f2937;
  --layout-text: #e2e8f0;
  --layout-muted: #94a3b8;
  --layout-accent: #4f6bed;
  --layout-panel-gradient:
    radial-gradient(120% 140% at 8% 0%, rgba(34, 211, 238, 0.2) 0%, rgba(15, 23, 42, 0) 55%),
    linear-gradient(135deg, #0b1326 0%, #0f172a 60%, #0b1120 100%);
  background:
    radial-gradient(1000px 420px at 50% -140px, rgba(95, 86, 255, 0.35) 0%, rgba(15, 20, 40, 0) 65%),
    radial-gradient(1200px 700px at 20% 20%, rgba(34, 59, 120, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
    linear-gradient(180deg, #0b1020 0%, #111827 45%, #0b1120 100%);
}

body.panel-page.theme-dark .main-container,
body.panel-page.theme-dark .content-wrapper,
body.panel-page.theme-dark .content,
body.panel-page.theme-dark .content-section {
  background: transparent;
}

body.panel-page.theme-dark header.header {
  background: #0f172a;
  border-bottom: 1px solid #1f2937;
}

body.panel-page.theme-dark .sidebar {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark .sidebar a,
body.panel-page.theme-dark .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark .sidebar-submenu a {
  color: var(--layout-text);
}

body.panel-page.theme-dark .sidebar-submenu a {
  background: rgba(148, 163, 184, 0.08);
  border-left-color: transparent;
}

body.panel-page.theme-dark .sidebar a:hover,
body.panel-page.theme-dark .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark .sidebar-submenu a:hover {
  background: #1e293b;
  color: var(--layout-text);
}

body.panel-page.theme-dark .sidebar a.active,
body.panel-page.theme-dark .sidebar-submenu a.active,
body.panel-page.theme-dark .sidebar-group.open .sidebar-toggle {
  background: #1e293b;
  color: var(--layout-text);
  border-left-color: #334155;
}

body.panel-page.theme-dark .welcome-banner,
body.panel-page.theme-dark .stats-card,
body.panel-page.theme-dark .audience-card,
body.panel-page.theme-dark .audience-summary-item,
body.panel-page.theme-dark .audience-item,
body.panel-page.theme-dark .messages-list-panel,
body.panel-page.theme-dark .messages-detail-panel,
body.panel-page.theme-dark #listaMensagens li.message-card,
body.panel-page.theme-dark #listaPrompts li.message-card,
body.panel-page.theme-dark #listaAudios li.message-card,
body.panel-page.theme-dark .message-detail-body,
body.panel-page.theme-dark .message-modal-card,
body.panel-page.theme-dark .chatgpt-card,
body.panel-page.theme-dark .chatgpt-list-card,
body.panel-page.theme-dark .chatgpt-list li,
body.panel-page.theme-dark .comprovante-card,
body.panel-page.theme-dark .integration-card,
body.panel-page.theme-dark .integration-sales,
body.panel-page.theme-dark .integration-message-box,
body.panel-page.theme-dark .integration-sale,
body.panel-page.theme-dark .sales-panel,
body.panel-page.theme-dark .sales-results,
body.panel-page.theme-dark .sales-summary-card,
body.panel-page.theme-dark .backup-card,
body.panel-page.theme-dark .backup-dropzone,
body.panel-page.theme-dark .content-card,
body.panel-page.theme-dark .funil-card,
body.panel-page.theme-dark .funil-container,
body.panel-page.theme-dark .funil-wrapper,
body.panel-page.theme-dark .funil-montado,
body.panel-page.theme-dark .funil-item,
body.panel-page.theme-dark .item,
body.panel-page.theme-dark .image-viewer-card,
body.panel-page.theme-dark .date-range-card,
body.panel-page.theme-dark .integration-date-range,
body.panel-page.theme-dark .settings-panel,
body.panel-page.theme-dark .settings-option,
body.panel-page.theme-dark .settings-advanced,
body.panel-page.theme-dark .settings-advanced-toggle,
body.panel-page.theme-dark .settings-advanced-action {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
  box-shadow: none;
}

body.panel-page.theme-dark .chat-contacts,
body.panel-page.theme-dark .chat-window {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: none;
}

body.panel-page.theme-dark .chat-contacts-search {
  background: transparent;
  border-color: rgba(226, 232, 240, 0.35);
  color: var(--layout-text);
  box-shadow: none;
}

body.panel-page.theme-dark .chat-contacts-search i {
  color: var(--layout-text);
}

body.panel-page.theme-dark #inicio .welcome-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.55), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.55), transparent 55%),
    linear-gradient(110deg, #020617 0%, #0b1120 40%, #111827 85%, #020617 100%);
  border-radius: 28px;
  padding: 2.4rem 2.8rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.85);
}

body.panel-page.theme-dark #inicio .welcome-banner .text h2 {
  color: #e5e7eb;
}

body.panel-page.theme-dark #inicio .welcome-banner .text p {
  color: #9ca3af;
}

body.panel-page.theme-dark #inicio .welcome-banner .btn {
  background: #1f2937;
  color: #f9fafb;
  border: 1px solid #334155;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
}

body.panel-page.theme-dark #inicio .welcome-banner .btn:hover {
  background: #111827;
  border-color: #4b5563;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
}

body.panel-page.theme-dark #inicio .stats {
  margin-top: 2.5rem;
}

body.panel-page.theme-dark #inicio .stats h3 {
  color: #e5e7eb;
}

body.panel-page.theme-dark #inicio .stats-card {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.panel-page.theme-dark #inicio .stats-card:hover {
  transform: translateY(-3px);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 1);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(1) {
  border-color: rgba(56, 189, 248, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(2) {
  border-color: rgba(45, 212, 191, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(3) {
  border-color: rgba(74, 222, 128, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(4) {
  border-color: rgba(250, 204, 21, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(5) {
  border-color: rgba(249, 115, 22, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(6) {
  border-color: rgba(168, 85, 247, 0.9);
}

body.panel-page.theme-dark .chat-contacts-search input {
  background: transparent;
  border: 0;
  color: var(--layout-text);
  box-shadow: none;
}

body.panel-page.theme-dark .chat-contacts-search input::placeholder {
  color: rgba(226, 232, 240, 0.55);
}

body.panel-page.theme-dark .chat-input textarea {
  color: var(--layout-text);
}

body.panel-page.theme-dark .chat-attach {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--layout-text);
}

body.panel-page.theme-dark .chat-attach:hover:not(:disabled) {
  border-color: rgba(79, 107, 237, 0.6);
}

body.panel-page.theme-dark .chat-input button#chatSendBtn {
  background: linear-gradient(135deg, #5f78ff, #4b59d5);
  box-shadow: 0 10px 16px rgba(15, 23, 42, 0.5);
}

body.panel-page.theme-dark .chat-contact-item {
  background: #111827;
  border-color: #1f2937;
}

body.panel-page.theme-dark .audience-empty {
  background: #0b1220;
  border-color: #1f2937;
  color: #cbd5f5;
}

body.panel-page.theme-dark .chat-contact-item.active {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark .chat-contact-preview,
body.panel-page.theme-dark .chat-contact-meta {
  color: #cbd5f5;
}

body.panel-page.theme-dark .chat-window-header,
body.panel-page.theme-dark .chat-input {
  border-color: #1f2937;
}

body.panel-page.theme-dark .chat-input {
  background: #0b1220;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(15, 23, 42, 0.8);
}

body.panel-page.theme-dark .chat-input:focus-within {
  box-shadow: inset 0 0 0 1px rgba(79, 107, 237, 0.6), 0 6px 18px rgba(15, 23, 42, 0.9);
}

body.panel-page.theme-dark .chat-bubble {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .chat-bubble.is-outgoing {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark .chat-bubble-media {
  background: #0b1220;
  border-color: #1f2937;
}

body.panel-page.theme-dark .chat-bubble-link {
  color: #93c5fd;
}

body.panel-page.theme-dark .chat-menu-toggle {
  background: #0b1220;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .chat-menu-toggle:hover {
  background: #1e293b;
  border-color: #334155;
  color: #c7d2fe;
}

body.panel-page.theme-dark .chat-menu {
  background: #111827;
}

body.panel-page.theme-dark .chat-shortcut-item {
  background: rgba(79, 107, 237, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

body.panel-page.theme-dark .chat-shortcut-item:hover {
  background: rgba(79, 107, 237, 0.28);
  border-color: rgba(129, 140, 248, 0.65);
}

body.panel-page.theme-dark .chat-shortcuts-nav {
  background: rgba(79, 107, 237, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

body.panel-page.theme-dark .chat-shortcuts-nav:hover {
  background: rgba(79, 107, 237, 0.28);
  border-color: rgba(129, 140, 248, 0.65);
}

body.panel-page.theme-dark .chat-empty {
  border-color: #1f2937;
  color: var(--layout-muted);
}

body.panel-page.theme-dark .message-detail-delay {
  background: #1e293b;
  border-color: #334155;
  color: var(--layout-muted);
}

body.panel-page.theme-dark .message-detail-shortcut {
  background: #0c4a6e;
  border-color: #075985;
  color: #e0f2fe;
}


body.panel-page.theme-dark .content-delay {
  background: #1e293b;
  border-color: #334155;
  color: var(--layout-muted);
}

body.panel-page.theme-dark .bloco-funil {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .bloco-funil i {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .bloco-funil .btn-remove {
  background: #1f2937;
  border: 1px solid #334155;
  color: var(--layout-text);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}

body.panel-page.theme-dark .bloco-funil .btn-remove:hover {
  background: #334155;
}

body.panel-page.theme-dark .integration-sales.sales-recovery {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

body.panel-page.theme-dark .settings-advanced-action i {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .messages-list-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

body.panel-page.theme-dark #listaMensagens li.message-card.selected,
body.panel-page.theme-dark #listaPrompts li.message-card.selected,
body.panel-page.theme-dark #listaAudios li.message-card.selected {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark #listaMensagens li.message-card:hover,
body.panel-page.theme-dark #listaPrompts li.message-card:hover,
body.panel-page.theme-dark #listaAudios li.message-card:hover {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: none;
}

body.panel-page.theme-dark .message-actions button,
body.panel-page.theme-dark .message-actions .btn-edit,
body.panel-page.theme-dark .message-actions .btn-delete,
body.panel-page.theme-dark .message-actions .btn-toggle.is-off {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .message-actions .btn-edit:hover,
body.panel-page.theme-dark .message-actions .btn-delete:hover,
body.panel-page.theme-dark .message-actions .btn-toggle.is-on {
  background: #1e293b;
  border-color: #334155;
  color: var(--layout-text);
}

body.panel-page.theme-dark .welcome-banner .btn,
body.panel-page.theme-dark .btn.btn-ghost {
  background: #1e293b;
  color: var(--layout-text);
  border-color: #334155;
}

body.panel-page.theme-dark .welcome-banner .btn:hover,
body.panel-page.theme-dark .btn.btn-ghost:hover {
  background: #273449;
}

body.panel-page.theme-dark #vendas .sales-view-toggle {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark #vendas .sales-panel-calendar .date-range-display {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark #vendas .sales-header-actions .btn.btn-ghost {
  background: #1e293b;
  border-color: #334155;
  color: var(--layout-text);
  box-shadow: none;
}

body.panel-page.theme-dark #vendas .sales-header-actions .btn.btn-ghost:hover {
  background: #273449;
  border-color: #475569;
}

body.panel-page.theme-dark #vendas .sales-view-toggle .sales-tab-btn {
  color: var(--layout-text);
}

body.panel-page.theme-dark #vendas .sales-view-toggle .sales-tab-btn.active {
  background: #1e293b;
  color: var(--layout-text);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.6);
}

body.panel-page.theme-dark .audience-search input,
body.panel-page.theme-dark .messages-search input,
body.panel-page.theme-dark .integration-input,
body.panel-page.theme-dark input,
body.panel-page.theme-dark textarea,
body.panel-page.theme-dark select {
  background: #0b1220;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .audience-search input::placeholder,
body.panel-page.theme-dark .messages-search input::placeholder,
body.panel-page.theme-dark .integration-input::placeholder,
body.panel-page.theme-dark input::placeholder,
body.panel-page.theme-dark textarea::placeholder {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .date-range-display,
body.panel-page.theme-dark .date-range-popover,
body.panel-page.theme-dark .date-range-card {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .file-upload,
body.panel-page.theme-dark .file-upload.has-file {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: none;
}

body.panel-page.theme-dark .file-upload::after {
  opacity: 0;
}

body.panel-page.theme-dark .file-upload:hover,
body.panel-page.theme-dark .file-upload:focus-within,
body.panel-page.theme-dark .file-upload.dragover {
  border-color: #334155;
  box-shadow: none;
  transform: none;
}

body.panel-page.theme-dark .backup-dropzone {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark .backup-dropzone:hover,
body.panel-page.theme-dark .backup-dropzone.dragover,
body.panel-page.theme-dark .backup-dropzone.has-file {
  background: #111827;
  border-color: #334155;
}

body.panel-page.theme-dark .integration-sale,
body.panel-page.theme-dark .audience-item {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark .integration-sale-meta {
  border-top-color: #1f2937;
}

body.panel-page.theme-dark .integration-sale.is-disabled {
  background: #111827;
}

body.panel-page.theme-dark .message-modal {
  background: rgba(2, 6, 23, 0.75);
}

body.panel-page.theme-dark #inicio .welcome-banner,
body.panel-page.theme-dark .welcome-banner {
  background: #111827;
  border-color: #1f2937;
}

body.panel-page.theme-dark #inicio .welcome-banner .text h2,
body.panel-page.theme-dark .welcome-banner .text h2 {
  color: #f8fafc;
}

body.panel-page.theme-dark #inicio .welcome-banner .text p,
body.panel-page.theme-dark .welcome-banner .text p {
  color: #cbd5f5;
}

body.panel-page.theme-dark #inicio .welcome-banner .btn,
body.panel-page.theme-dark .welcome-banner .btn {
  background: #1f2937;
  color: #f8fafc;
  border-color: #334155;
}

body.panel-page.theme-dark #inicio .welcome-banner .btn i,
body.panel-page.theme-dark .welcome-banner .btn i {
  color: #f8fafc;
}

body.panel-page.theme-dark .stats,
body.panel-page.theme-dark .stats-cards {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.panel-page.theme-dark .stats h3 {
  color: #cbd5f5;
}

body.panel-page.theme-dark #inicio .stats h3 {
  color: #e2e8f0;
}

body.panel-page.theme-dark #inicio h2,
body.panel-page.theme-dark #inicio p {
  color: #cbd5f5;
}

body.panel-page.theme-dark .stats-card {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark .stats-card i,
body.panel-page.theme-dark .stats-card .title {
  color: #e2e8f0;
}

body.panel-page.theme-dark .stats-card .count {
  color: #a5b4fc;
}

/* Ícones dos cards iniciais com a mesma cor das bordas */
body.panel-page.theme-dark #inicio .stats-card:nth-child(1) i {
  color: rgba(56, 189, 248, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(2) i {
  color: rgba(45, 212, 191, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(3) i {
  color: rgba(74, 222, 128, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(4) i {
  color: rgba(250, 204, 21, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(5) i {
  color: rgba(249, 115, 22, 0.9);
}

body.panel-page.theme-dark #inicio .stats-card:nth-child(6) i {
  color: rgba(168, 85, 247, 0.9);
}

body.panel-page.theme-dark .date-range-title,
body.panel-page.theme-dark .date-range-month {
  color: var(--layout-text);
}

body.panel-page.theme-dark .date-range-summary,
body.panel-page.theme-dark .date-range-weekdays {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .date-nav-btn {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .date-nav-btn:hover {
  background: #1e293b;
  color: var(--layout-text);
}

body.panel-page.theme-dark .date-cell {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .date-cell:hover {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark .date-cell.is-muted {
  color: #475569;
}

body.panel-page.theme-dark .date-cell.is-today {
  border-color: #475569;
}

body.panel-page.theme-dark .date-cell.is-start,
body.panel-page.theme-dark .date-cell.is-end {
  background: #4f6bed;
  color: #ffffff;
  border-color: transparent;
  box-shadow: none;
}

body.panel-page.theme-dark .date-cell.is-in-range {
  background: rgba(79, 107, 237, 0.2);
  color: var(--layout-text);
}

body.panel-page.theme-dark .date-range-actions .btn.btn-ghost {
  background: #111827;
  color: var(--layout-text);
  border-color: #1f2937;
}

body.panel-page.theme-dark .date-range-actions .btn.btn-ghost:hover {
  background: #1e293b;
}

body.panel-page.theme-dark .cleanup-modal-card {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .cleanup-modal-subtitle {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .cleanup-modal-close {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .cleanup-option {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .prompt-card {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .prompt-card.is-active {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark .prompt-card-toggle {
  color: #93c5fd;
}

body.panel-page.theme-dark .config-card {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .config-card:hover {
  border-color: #334155;
  background-color: #1e293b;
}

body.panel-page.theme-dark .config-card.is-active:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

body.panel-page.theme-dark .config-card.is-active:hover h3,
body.panel-page.theme-dark .config-card.is-active:hover p {
  color: #ffffff !important;
}

body.panel-page.theme-dark .config-card p {
  color: var(--layout-muted);
}

body.panel-page.theme-dark .comprovante-item {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .comprovante-item.is-active {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark .comprovante-item-title {
  color: #f8fafc;
}

body.panel-page.theme-dark .comprovante-item-body {
  color: #cbd5f5;
}

body.panel-page.theme-dark .comprovante-item-btn {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.panel-page.theme-dark .comprovante-item-btn.is-danger {
  color: #fca5a5;
  border-color: #7f1d1d;
}

@media (max-width: 1366px) {
  .chat-support {
    grid-template-columns: 1fr;
  }

  #atendimento .chat-contacts {
    position: static;
  }

  .chat-contacts {
    padding: 1rem;
  }

  .chat-contact-list {
    max-height: 35vh;
  }

  .chat-window {
    min-height: 360px;
  }

  body.panel-page[data-section="atendimento"] .content {
    overflow: visible;
  }

  body.panel-page[data-section="atendimento"] #atendimento.content-section.active {
    height: auto;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-support {
    height: auto;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-window {
    height: auto;
  }
}

@media (max-width: 900px) {
  .chat-support {
    grid-template-columns: 1fr;
  }

  #atendimento .chat-contacts {
    position: static;
  }

  .chat-messages {
    max-height: 55vh;
  }

  body.panel-page[data-section="atendimento"] .content {
    overflow-y: auto;
  }
}

/* Clean sidebar menu */
body.panel-page .sidebar {
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: 'Manrope', 'Plus Jakarta Sans', system-ui, sans-serif;
}

body.panel-page .sidebar a,
body.panel-page .sidebar-group .sidebar-toggle,
body.panel-page .sidebar-submenu a {
  background: transparent;
  border: none;
  border-left: none;
  color: var(--layout-text, var(--color-text));
  font-weight: 500;
  letter-spacing: 0.01em;
  transform: none;
  transition: opacity 0.2s ease;
}

body.panel-page .sidebar a i,
body.panel-page .sidebar-group .sidebar-toggle > i {
  color: inherit;
}

body.panel-page .sidebar a:hover,
body.panel-page .sidebar-group .sidebar-toggle:hover,
body.panel-page .sidebar-submenu a:hover {
  background: transparent;
  color: var(--layout-text, var(--color-text));
  opacity: 0.7;
  transform: none;
}

body.panel-page .sidebar a.active,
body.panel-page .sidebar-submenu a.active,
body.panel-page .sidebar-group.open .sidebar-toggle {
  background: transparent;
  color: var(--layout-text, var(--color-text));
  font-weight: 600;
  opacity: 1;
}

body.panel-page .sidebar-submenu {
  padding-left: 0;
  margin-left: 0;
}

body.panel-page .sidebar-submenu a {
  font-size: 0.9rem;
  padding-left: 2rem;
}

body.panel-page .sidebar-group .sidebar-toggle:focus,
body.panel-page .sidebar-group .sidebar-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Fluxos (React Flow) */
#fluxos.content-section.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

#fluxos .fluxos-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

#fluxos .fluxos-header p {
  color: var(--color-muted);
  margin-top: 0.35rem;
}

#fluxos .fluxos-canvas {
  flex: 1;
  min-height: 360px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

#fluxos .fluxos-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}

#fluxos .fluxos-render {
  width: 100%;
  height: 100%;
}

body.panel-page.theme-dark .sidebar a,
body.panel-page.theme-dark .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark .sidebar-submenu a {
  background: transparent;
  border: none;
  border-left: none;
  color: var(--layout-text, var(--color-text));
}

body.panel-page.theme-dark .sidebar a:hover,
body.panel-page.theme-dark .sidebar-group .sidebar-toggle:hover,
body.panel-page.theme-dark .sidebar-submenu a:hover {
  background: transparent;
  color: var(--layout-text, var(--color-text));
  opacity: 0.7;
}

body.panel-page.theme-dark .sidebar a.active,
body.panel-page.theme-dark .sidebar-submenu a.active,
body.panel-page.theme-dark .sidebar-group.open .sidebar-toggle {
  background: transparent;
  color: var(--layout-text, var(--color-text));
  border-left: none;
  font-weight: 600;
}

@media (min-width: 901px) {
  .panel-page .content-wrapper {
    height: calc(100vh - var(--layout-header-height) - var(--layout-sidebar-gap) - 3rem);
  }

  .panel-page .content {
    height: 100%;
    overflow: hidden;
  }

  .panel-page .content-section.active {
    height: 100%;
    overflow: auto;
  }

  #atendimento.content-section.active {
    overflow: hidden;
  }

  #atendimento .chat-support {
    height: 100%;
    min-height: 0;
    align-items: stretch;
  }

  #atendimento .chat-contacts {
    position: static;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #atendimento .chat-contact-list {
    max-height: none;
    min-height: 0;
    flex: 1;
  }

  #atendimento .chat-window {
    height: 100%;
    min-height: 0;
  }

  #atendimento .chat-messages {
    max-height: none;
    min-height: 0;
  }
}

/* Configuracoes e etiquetas */
.config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1200px) {
  .config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

.config-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  background: #ffffff;
  display: flex;
  gap: 0.9rem;
  text-align: left;
  align-items: flex-start;
  transition: transform 0.2s ease, border-color 0.2s ease;
  font: inherit;
  color: inherit;
  appearance: none;
  outline: none;
}

.config-card.is-active {
  cursor: pointer;
}

.config-card.is-active:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  color: #ffffff;
}

.config-card.is-active:hover h3,
.config-card.is-active:hover p {
  color: #ffffff !important;
}

.config-card.is-active:hover .config-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.config-card.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.config-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.config-card h3 {
  margin: 0 0 0.3rem;
  color: var(--color-text);
  transition: color 0.2s ease;
}

body.panel-page.theme-dark .config-card h3 {
  color: #f8fafc;
}

.config-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.config-card.is-locked,
.sidebar a.is-locked {
  opacity: 0.6;
  cursor: not-allowed;
  filter: saturate(0.7);
}

.config-card.is-locked:hover {
  transform: none;
  border-color: inherit;
  background: inherit;
  color: inherit;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.settings-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.settings-field:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-value {
  font-weight: 600;
  color: var(--color-text);
}

.settings-card h3 {
  margin: 0 0 0.6rem;
}

.settings-hint {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.settings-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-input {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 0.95rem;
}

.settings-feedback {
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.connections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.panel-page[data-section="conexoes"] #conexoes .connections-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.connections-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.connection-hint {
  display: none;
  margin: 0;
  font-size: 0.85rem;
  color: #f97316;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.connections-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-label {
  font-size: 0.9rem;
  color: #6b7280;
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
}

.connections-empty {
  background: #ffffff;
  border: 1px dashed #cbd5f5;
  border-radius: 18px;
  padding: 2.5rem 2rem;
  text-align: center;
  color: #374151;
}

.connections-empty h3 {
  margin: 0.8rem 0 0.3rem;
  font-size: 1.3rem;
}

.connections-empty p {
  margin: 0 0 1.4rem;
  color: #6b7280;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.connections-table {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}

.connections-table-header {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 0.8fr;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  background: #f8fafc;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 600;
}

.connections-table-header span:last-child {
  text-align: right;
}

.connections-table-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem 1rem 1rem;
}

.connection-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 0.8fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.connection-cell {
  font-size: 0.9rem;
  color: #1f2937;
}

.connection-cell-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.connection-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.connection-name {
  margin: 0;
  font-weight: 600;
}

.connection-meta {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.connection-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.action-btn.danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chip-info {
  background: #e0f2fe;
  color: #0369a1;
}

.chip-success {
  background: #dcfce7;
  color: #15803d;
}

.chip-warning {
  background: #fef9c3;
  color: #ca8a04;
}

.chip-muted {
  background: #f1f5f9;
  color: #64748b;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1200;
}

.modal.active {
  display: flex;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.6rem;
  z-index: 1;
}

.modal-card-wide {
  max-width: 560px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h3 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}

.modal-overline {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
}

.modal-body label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}

.modal-body input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  outline: none;
}

.modal-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-tabs {
  display: flex;
  gap: 0.75rem;
}

.modal-tab {
  border: none;
  background: transparent;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.5rem 0.9rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.modal-tab.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.modal-status {
  min-height: 1rem;
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.modal-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.qr-box {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.qr-box img {
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.alert-warning {
  margin-top: 1rem;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: #92400e;
}

.alert-warning strong {
  display: block;
  font-size: 0.85rem;
}

.alert-warning p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}

.input-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.input-inline input {
  flex: 1;
}

.code-box {
  margin-top: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.code-box span {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1d4ed8;
}

.code-box p {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: #475569;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  max-width: 360px;
  width: calc(100% - 48px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #16a34a;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-content strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.toast-content p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.toast-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  margin-top: -2px;
}

.toast-close:hover {
  color: #475569;
}

.toast.toast-warning {
  border-color: #fde68a;
}

.toast.toast-warning .toast-icon {
  background: #fef3c7;
  color: #d97706;
}

.toast.toast-error {
  border-color: #fecaca;
}

.toast.toast-error .toast-icon {
  background: #fee2e2;
  color: #dc2626;
}

body.panel-page.theme-dark .settings-card,
body.panel-page.theme-dark .summary-card,
body.panel-page.theme-dark .connections-table,
body.panel-page.theme-dark .connection-row,
body.panel-page.theme-dark .connections-empty,
body.panel-page.theme-dark .modal-card,
body.panel-page.theme-dark .qr-box {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

body.panel-page.theme-dark .settings-field {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

body.panel-page.theme-dark .settings-input,
body.panel-page.theme-dark .modal-body input {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

body.panel-page.theme-dark .summary-label,
body.panel-page.theme-dark .connection-meta,
body.panel-page.theme-dark .modal-overline,
body.panel-page.theme-dark .modal-status {
  color: #94a3b8;
}

body.panel-page.theme-dark .connection-cell,
body.panel-page.theme-dark .summary-value,
body.panel-page.theme-dark .settings-value {
  color: #e2e8f0;
}

body.panel-page.theme-dark .connections-table-header {
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
}

body.panel-page.theme-dark .action-btn {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

body.panel-page.theme-dark .action-btn.danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

body.panel-page.theme-dark .btn-secondary,
body.panel-page.theme-dark .icon-btn {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

body.panel-page.theme-dark .alert-warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

body.panel-page.theme-dark .code-box {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.2);
}

body.panel-page.theme-dark .code-box span {
  color: #93c5fd;
}

body.panel-page.theme-dark .toast {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

body.panel-page.theme-dark .toast-content p {
  color: #94a3b8;
}

@media (max-width: 720px) {
  .connections-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .connections-summary {
    grid-template-columns: 1fr;
  }

  .connections-table-header,
  .connection-row {
    grid-template-columns: 1fr;
  }

  .connections-table-header span {
    display: none;
  }

  .connection-row {
    gap: 0.75rem;
  }

  .connection-actions {
    justify-content: flex-start;
  }

  .modal-card {
    padding: 1.25rem;
  }

  .input-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }
}

.labels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.labels-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.labels-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--color-muted);
  min-height: 40px;
}

.labels-search i {
  font-size: 0.85rem;
}

.labels-search input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  min-width: 200px;
  color: var(--color-text);
  background: transparent;
  margin: 0;
  padding: 0;
}

.labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.label-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: #ffffff;
  display: grid;
  gap: 0.75rem;
}

.label-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.label-card-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.label-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: var(--label-color, #94a3b8);
}

.label-card-actions {
  display: inline-flex;
  gap: 0.5rem;
}

.label-card-actions button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-muted);
}

.label-card-actions button:hover {
  color: var(--color-text);
}

.labels-empty {
  border: 1px dashed #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--color-muted);
  background: #ffffff;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.labels-empty i {
  font-size: 2rem;
  color: var(--color-muted);
}

.labels-empty .btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 2.2rem 0.85rem 1.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 35px rgba(79, 107, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.labels-empty .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%);
  opacity: 0.6;
  pointer-events: none;
}

.labels-empty .btn > * {
  position: relative;
  z-index: 1;
}

.labels-empty .btn i {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.labels-empty .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(79, 107, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.labels-empty .btn:active {
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(79, 107, 237, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.labels-empty .btn:focus-visible {
  outline: 3px solid rgba(79, 107, 237, 0.35);
  outline-offset: 3px;
}

.label-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2100;
}

.label-modal.is-open {
  display: flex;
}

.label-modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
}

.label-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.label-modal-header h3 {
  margin: 0 0 0.3rem;
}

.label-modal-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.label-modal-close {
  background: transparent;
  border: none;
  color: var(--color-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.label-modal-body {
  display: grid;
  gap: 0.75rem;
}

.label-modal-body label {
  font-weight: 600;
  font-size: 0.9rem;
}

.label-modal-body input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95rem;
}

.label-color-swatches {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.5rem;
}

.label-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: var(--swatch, #94a3b8);
  cursor: pointer;
}

.label-color-swatch.is-active {
  outline: 2px solid rgba(99, 102, 241, 0.6);
  outline-offset: 2px;
}

.label-color-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.label-color-row input[type="color"] {
  width: 44px;
  height: 36px;
  border: none;
  background: transparent;
  padding: 0;
}

.label-preview {
  display: grid;
  gap: 0.4rem;
}

.label-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--tag-border, rgba(148, 163, 184, 0.4));
  background: var(--tag-bg, rgba(148, 163, 184, 0.15));
  color: var(--tag-color, #475569);
}

.tag-pill.chat-pause-badge {
  --tag-bg: rgba(239, 68, 68, 0.12);
  --tag-border: rgba(248, 113, 113, 0.35);
  --tag-color: #b91c1c;
}

.audience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tag-picker-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 40px;
}

.tag-picker-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tag-picker-count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: #e2e8f0;
  color: #334155;
  padding: 0 0.3rem;
}

.tag-picker-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
  display: none;
  z-index: 40;
}

.tag-picker.is-open .tag-picker-panel {
  display: grid;
  gap: 0.75rem;
}

.tag-picker-list {
  display: grid;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.tag-picker-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

.tag-picker-item input {
  width: 16px;
  height: 16px;
}

.tag-picker-actions {
  display: flex;
  justify-content: flex-end;
}

.chat-header-info {
  display: grid;
  gap: 0.4rem;
}

.chat-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.chat-contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

@media (max-width: 900px) {
  .config-grid,
  .labels-grid {
    grid-template-columns: 1fr;
  }

  .labels-search input {
    min-width: 0;
    width: 100%;
  }

  .tag-picker-panel {
    right: auto;
    left: 0;
  }
}

body.panel-page.theme-dark .config-card,
body.panel-page.theme-dark .label-card,
body.panel-page.theme-dark .labels-empty,
body.panel-page.theme-dark .label-modal-card,
body.panel-page.theme-dark .tag-picker-panel {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
  box-shadow: none;
}

body.panel-page.theme-dark .labels-search,
body.panel-page.theme-dark .tag-picker-button {
  background: #0f172a;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark #vendas .sales-panel,
body.panel-page.theme-dark #vendas .sales-panel-calendar,
body.panel-page.theme-dark #vendas .sales-results,
body.panel-page.theme-dark #vendas .sales-summary-card,
body.panel-page.theme-dark #vendas .integration-sale {
  background: #1e293b;
  border-color: rgba(51, 65, 85, 0.5);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

body.panel-page.theme-dark #vendas .date-range-display,
body.panel-page.theme-dark #vendas .integration-input,
body.panel-page.theme-dark #vendas .sales-panel input {
  background: #28344b;
  border-color: #334155;
  color: #e2e8f0;
}

body.panel-page.theme-dark #vendas .date-range-display {
  background: #0f172a;
  border-color: #1f2937;
}

body.panel-page.theme-dark #vendas .date-cell {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark #vendas .date-cell:hover {
  background: #1e293b;
  border-color: #334155;
}

body.panel-page.theme-dark #vendas .date-cell.is-muted {
  color: #475569;
}

body.panel-page.theme-dark #vendas .date-cell.is-today {
  border-color: #475569;
}

body.panel-page.theme-dark #vendas .date-cell.is-start,
body.panel-page.theme-dark #vendas .date-cell.is-end {
  background: #4f6bed;
  color: #ffffff;
  border-color: transparent;
  box-shadow: none;
}

body.panel-page.theme-dark #vendas .date-cell.is-in-range {
  background: rgba(79, 107, 237, 0.2);
  color: var(--layout-text);
}

body.panel-page.theme-dark #vendas .sales-header p,
body.panel-page.theme-dark #vendas .sales-results-header .integration-status,
body.panel-page.theme-dark #vendas .sales-results-header .integration-sales-count,
body.panel-page.theme-dark #vendas .integration-sale-meta,
body.panel-page.theme-dark #vendas .sales-summary-meta {
  color: #94a3b8;
}

body.panel-page.theme-dark #vendas .sales-panel h4,
body.panel-page.theme-dark #vendas .sales-summary-title {
  color: #d1d5db;
}

body.panel-page.theme-dark #vendas .integration-sale-meta {
  border-top-color: rgba(51, 65, 85, 0.6);
}

body.panel-page.theme-dark .labels-search input,
body.panel-page.theme-dark .label-modal-body input[type="text"] {
  background: transparent;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .label-card-actions button,
body.panel-page.theme-dark .label-modal-close {
  background: #111827;
  border-color: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .tag-picker-count {
  background: #1f2937;
  color: var(--layout-text);
}

body.panel-page.theme-dark .tag-picker-item {
  color: var(--layout-text);
}

body.panel-page.theme-dark .config-icon {
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
}

body.panel-page.theme-dark .welcome-banner,
body.panel-page.theme-dark .stats-card,
body.panel-page.theme-dark .audience-card,
body.panel-page.theme-dark .messages-list-panel,
body.panel-page.theme-dark .messages-detail-panel,
body.panel-page.theme-dark .message-modal-card,
body.panel-page.theme-dark .chatgpt-card,
body.panel-page.theme-dark .chatgpt-list-card,
body.panel-page.theme-dark .comprovante-card,
body.panel-page.theme-dark .backup-card,
body.panel-page.theme-dark .integration-card,
body.panel-page.theme-dark .integration-sales,
body.panel-page.theme-dark .sales-panel,
body.panel-page.theme-dark .sales-results,
body.panel-page.theme-dark .sales-summary-card,
body.panel-page.theme-dark .content-card,
body.panel-page.theme-dark .funil-card,
body.panel-page.theme-dark .funil-montado,
body.panel-page.theme-dark .image-viewer-card,
body.panel-page.theme-dark .date-range-card,
body.panel-page.theme-dark .settings-panel {
  background: var(--layout-panel-gradient);
}

body.panel-page.theme-dark .chat-avatar {
  background: rgba(15, 23, 42, 0.75);
  border-color: #1f2937;
  color: #94a3b8;
}

body.panel-page.theme-dark #listaMensagens li.message-card,
body.panel-page.theme-dark #listaPrompts li.message-card,
body.panel-page.theme-dark #listaAudios li.message-card {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  box-shadow: none;
  padding: 0.85rem 1rem;
}

body.panel-page.theme-dark #listaMensagens li.message-card.selected,
body.panel-page.theme-dark #listaPrompts li.message-card.selected,
body.panel-page.theme-dark #listaAudios li.message-card.selected {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

body.panel-page.theme-dark #listaMensagens li.message-card:hover,
body.panel-page.theme-dark #listaPrompts li.message-card:hover,
body.panel-page.theme-dark #listaAudios li.message-card:hover {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: none;
}

body.panel-page.theme-dark #listaMensagens,
body.panel-page.theme-dark #listaPrompts,
body.panel-page.theme-dark #listaAudios {
  gap: 0.75rem;
}

body.panel-page.theme-dark .messages-list-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Layout de painel admin: header fixo + menu lateral fixo (desktop) */
@media (min-width: 769px) {
  body.panel-page header.header {
    height: 64px;
    padding: 0 20px 0 0;
  }

  body.panel-page .main-container {
    margin-top: 64px;
    height: calc(100vh - 64px);
    padding: 0;
    background: transparent;
  }

  body.panel-page .sidebar {
    top: 64px;
    left: 0;
    width: 240px;
    height: calc(100vh - 64px);
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--layout-border, #e2e8f0);
    box-shadow: none;
    transition: width 0.25s ease, padding 0.25s ease;
  }

  body.panel-page .content-wrapper {
    margin-left: 240px;
    height: calc(100vh - 64px);
    transition: margin-left 0.25s ease;
  }

  body.panel-page .content {
    height: 100%;
    overflow-y: auto;
  }

  body.panel-page .toggle-sidebar {
    margin-left: 14px;
  }

  body.panel-page.sidebar-collapsed .sidebar {
    width: 72px;
    padding: 1rem 0.35rem;
  }

  body.panel-page.sidebar-collapsed .content-wrapper {
    margin-left: 72px;
  }
}

/* Code.html layout override */
body.panel-page {
  --code-main: var(--color-bg);
  --code-sidebar: var(--color-sidebar);
  --code-card: #ffffff;
  --code-input: #ffffff;
  --code-border: var(--color-border);
  --code-border-subtle: var(--color-border);
  --code-border-strong: var(--color-border);
  --code-muted: var(--color-muted);
  --code-accent: #3b82f6;
  --code-text: var(--color-text);
  --code-text-soft: #475569;
  --code-on-accent: #ffffff;
  --code-surface-2: #f1f5f9;
  --code-surface-3: #e2e8f0;
  --code-panel: var(--code-surface-2);
  --code-panel-strong: var(--code-card);
  --code-panel-soft: var(--code-surface-2);
  --code-panel-muted: var(--code-surface-3);
  --code-hover: var(--color-sidebar-hover);
  --code-hover-strong: rgba(45, 55, 72, 0.08);
  --code-shadow: var(--shadow-sm);
  font-family: "Inter", system-ui, sans-serif;
  background: var(--code-main);
  color: var(--code-text);
}

body.panel-page.theme-dark {
  --code-main: #0f172a;
  --code-sidebar: #131b2e;
  --code-card: #1e293b;
  --code-input: #28344b;
  --code-border: rgba(51, 65, 85, 0.5);
  --code-border-subtle: rgba(51, 65, 85, 0.3);
  --code-border-strong: var(--code-border-strong);
  --code-muted: #94a3b8;
  --code-accent: #3b82f6;
  --code-text: #ffffff;
  --code-text-soft: #e2e8f0;
  --code-on-accent: #ffffff;
  --code-surface-2: #233048;
  --code-surface-3: #1b2638;
  --code-panel: rgba(15, 23, 42, 0.8);
  --code-panel-strong: rgba(15, 23, 42, 0.9);
  --code-panel-soft: rgba(15, 23, 42, 0.35);
  --code-panel-muted: rgba(15, 23, 42, 0.6);
  --code-hover: rgba(255, 255, 255, 0.06);
  --code-hover-strong: rgba(255, 255, 255, 0.1);
  --code-shadow: 0 10px 20px rgba(15, 23, 42, 0.4);
  background: var(--code-main);
  color: var(--code-text);
}

body.panel-page .main-container,
body.panel-page .content-wrapper,
body.panel-page .content,
body.panel-page .content-section {
  background: var(--code-main);
  color: var(--code-text);
}

body.panel-page header.header {
  background: var(--code-main);
  border-bottom: 1px solid var(--code-border-subtle);
  color: var(--code-text);
  box-shadow: none;
}

body.panel-page .sidebar {
  background: var(--code-sidebar);
  border-right: 1px solid var(--code-border-subtle);
  color: var(--code-muted);
  box-shadow: none;
}

body.panel-page .sidebar a,
body.panel-page .sidebar-group .sidebar-toggle,
body.panel-page .sidebar-submenu a {
  color: var(--code-muted);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
}

body.panel-page .sidebar a i,
body.panel-page .sidebar-group .sidebar-toggle > i {
  color: var(--code-muted);
}

body.panel-page .sidebar a:hover,
body.panel-page .sidebar-group .sidebar-toggle:hover,
body.panel-page .sidebar-submenu a:hover {
  color: var(--code-text);
  background: var(--code-hover);
}

body.panel-page .sidebar a.active,
body.panel-page .sidebar-submenu a.active,
body.panel-page .sidebar-group.open .sidebar-toggle {
  color: var(--code-text);
  background: var(--code-hover-strong);
}

body.panel-page .content-card,
body.panel-page .sales-panel,
body.panel-page .sales-results,
body.panel-page .sales-summary-card,
body.panel-page .integration-card,
body.panel-page .integration-sales,
body.panel-page .integration-message-box,
body.panel-page .integration-sale,
body.panel-page .audience-card,
body.panel-page .audience-summary-item,
body.panel-page .audience-item,
body.panel-page .messages-list-panel,
body.panel-page .messages-detail-panel,
body.panel-page .message-modal-card,
body.panel-page .chat-window,
body.panel-page .chat-contacts,
body.panel-page .stats-card,
body.panel-page .backup-card,
body.panel-page .backup-dropzone,
body.panel-page .settings-panel,
body.panel-page .settings-option,
body.panel-page .settings-advanced,
body.panel-page .settings-advanced-toggle,
body.panel-page .settings-advanced-action {
  background: var(--code-card);
  border: 1px solid var(--code-border);
  box-shadow: var(--code-shadow);
}

body.panel-page input,
body.panel-page textarea,
body.panel-page select,
body.panel-page .integration-input,
body.panel-page .chat-contacts-search,
body.panel-page .chat-input textarea,
body.panel-page .date-range-display {
  background: var(--code-input);
  border: 1px solid var(--code-border);
  color: var(--code-text-soft);
}

body.panel-page input::placeholder,
body.panel-page textarea::placeholder {
  color: var(--code-muted);
}

body.panel-page .btn,
body.panel-page button.btn {
  background: var(--code-accent);
  color: var(--code-on-accent);
  border: 1px solid transparent;
  box-shadow: none;
}

body.panel-page .btn.btn-ghost {
  background: transparent;
  color: var(--code-text);
  border: 1px solid var(--code-border-strong);
  box-shadow: none;
}

body.panel-page .btn.btn-ghost:hover {
  background: var(--code-hover-strong);
}

body.panel-page .chat-input {
  background: var(--code-card);
  border-color: var(--code-border);
}

body.panel-page .chat-input:focus-within {
  border-color: var(--code-accent);
}

body.panel-page .chat-contacts-search {
  background: var(--code-input);
  border-color: var(--code-border);
}

body.panel-page .chat-contacts-search input {
  background: transparent;
  color: var(--code-text-soft);
}

body.panel-page .chat-contacts-search input::placeholder {
  color: var(--code-muted);
}

body.panel-page .chat-empty {
  color: var(--code-muted);
  border-color: var(--code-border);
}

body.panel-page .chat-bubble {
  background: var(--code-card);
  border-color: var(--code-border);
  color: var(--code-text-soft);
}

body.panel-page .chat-bubble.is-outgoing {
  background: var(--code-surface-2);
  border-color: var(--code-border-strong);
}

body.panel-page .chat-bubble-media {
  background: var(--code-input);
  border-color: var(--code-border);
}

body.panel-page .chat-menu,
body.panel-page .tag-picker-panel {
  background: var(--code-card);
  border-color: var(--code-border);
  color: var(--code-text-soft);
  z-index: 50;
}

body.panel-page .date-range-popover,
body.panel-page .date-range-card {
  background: var(--code-card);
  border-color: var(--code-border);
  color: var(--code-text-soft);
}

body.panel-page .date-range-summary {
  background: var(--code-surface-2);
  border-color: var(--code-border);
  color: var(--code-text-soft);
}

body.panel-page .date-nav-btn {
  background: var(--code-surface-2);
  border-color: var(--code-border);
  color: var(--code-muted);
}

body.panel-page .date-cell {
  background: var(--code-surface-3);
  border-color: var(--code-border);
  color: var(--code-text-soft);
}

body.panel-page .date-cell.is-muted {
  color: var(--code-muted);
}

body.panel-page .date-cell.is-start,
body.panel-page .date-cell.is-end {
  background: var(--code-accent);
  border-color: transparent;
  color: var(--code-on-accent);
}

body.panel-page .date-cell.is-in-range {
  background: rgba(59, 130, 246, 0.2);
  color: var(--code-text-soft);
}

body.panel-page .sales-header p,
body.panel-page .audience-header p,
body.panel-page .integration-sales-header p,
body.panel-page .integration-status,
body.panel-page .integration-sales-count,
body.panel-page .sales-summary-meta,
body.panel-page .sales-summary-title {
  color: var(--code-muted);
}

body.panel-page[data-section="vendas"] .content,
body.panel-page[data-section="vendas"] .content-section,
body.panel-page[data-section="vendas"] .content-wrapper {
  background: var(--code-main);
}

@media (min-width: 769px) {
  body.panel-page .sidebar {
    width: 256px;
  }

  body.panel-page .content-wrapper {
    margin-left: 256px;
  }

  body.panel-page.sidebar-collapsed .content-wrapper {
    margin-left: 72px;
  }

  body.panel-page .content {
    padding: 32px;
  }
}

/* Sidebar (ref. code.html / imagem) */
body.panel-page .sidebar {
  background: var(--code-sidebar);
  border-right: 1px solid var(--code-border-subtle);
  border-radius: 0;
  padding: 1.25rem 0.75rem;
  gap: 0.25rem;
  box-shadow: none;
  font-family: "Inter", system-ui, sans-serif;
}

body.panel-page[data-section] .sidebar,
body.panel-page.theme-dark[data-section] .sidebar {
  background: var(--code-sidebar);
  border-right: 1px solid var(--code-border-subtle);
}

body.panel-page .sidebar a,
body.panel-page .sidebar-group .sidebar-toggle {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  color: var(--code-text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  border-left: none;
  text-transform: none;
  transition: background 0.2s ease, color 0.2s ease;
}

body.panel-page .sidebar a i,
body.panel-page .sidebar-group .sidebar-toggle > i,
body.panel-page .sidebar-toggle .sidebar-caret i {
  color: var(--code-muted);
}

body.panel-page[data-section] .sidebar a,
body.panel-page.theme-dark[data-section] .sidebar a,
body.panel-page[data-section] .sidebar-group .sidebar-toggle,
body.panel-page.theme-dark[data-section] .sidebar-group .sidebar-toggle {
  color: var(--code-text-soft);
}

body.panel-page .sidebar a:hover,
body.panel-page .sidebar-group .sidebar-toggle:hover,
body.panel-page .sidebar-submenu a:hover {
  background: var(--code-hover);
  color: var(--code-text);
  transform: none;
}

body.panel-page .sidebar a.active,
body.panel-page .sidebar-group.open .sidebar-toggle {
  background: var(--code-hover-strong);
  color: var(--code-text);
  font-weight: 500;
  border-left: none;
}

body.panel-page[data-section] .sidebar a.active,
body.panel-page.theme-dark[data-section] .sidebar a.active,
body.panel-page[data-section] .sidebar-group.open .sidebar-toggle,
body.panel-page.theme-dark[data-section] .sidebar-group.open .sidebar-toggle {
  background: var(--code-hover-strong);
  color: var(--code-text);
}

body.panel-page .sidebar-submenu {
  padding-left: 0.35rem;
}

body.panel-page .sidebar-submenu a {
  margin: 0.1rem 0.25rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: transparent;
  color: var(--code-muted);
  border: 1px solid transparent;
}

body.panel-page[data-section] .sidebar-submenu a,
body.panel-page.theme-dark[data-section] .sidebar-submenu a {
  background: transparent;
  color: var(--code-muted);
}

body.panel-page .sidebar-submenu a.active {
  background: var(--code-hover-strong);
  color: var(--code-text);
  border-color: var(--code-border-subtle);
}

body.panel-page .sidebar-footer a {
  color: var(--code-text-soft);
  border-radius: 12px;
}

body.panel-page .sidebar-footer a:hover {
  background: var(--code-hover);
}

body.panel-page .toggle-sidebar {
  background: transparent;
  color: var(--code-text-soft);
  border: 1px solid var(--code-border-subtle);
}

/* Audience layout (based on audiencia.html) */
#audiencia .audience-page {
  display: grid;
  gap: 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

#audiencia .audience-page-title h2 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--code-text);
}

#audiencia .audience-page-title p {
  margin: 0;
  color: var(--code-muted);
  font-size: 0.95rem;
}

#audiencia .audience-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

#audiencia .audience-metric-card {
  background: var(--code-card);
  border: 1px solid var(--code-border);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--code-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#audiencia .audience-metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

#audiencia .audience-metric-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--code-muted);
}

#audiencia .audience-metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-top: 0.35rem;
  display: block;
}

#audiencia .audience-metric-value.is-small {
  font-size: 1.15rem;
}

#audiencia .audience-metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

#audiencia .audience-metric-icon.is-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}

#audiencia .audience-metric-note {
  font-size: 0.85rem;
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#audiencia .audience-metric-note.muted {
  color: var(--code-muted);
}

#audiencia .audience-metric-note.is-negative {
  color: #ef4444;
}

#audiencia .audience-metric-sep {
  color: rgba(148, 163, 184, 0.7);
}

#audiencia .audience-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--code-card);
  border: 1px solid var(--code-border);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

#audiencia .audience-toolbar-left,
#audiencia .audience-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#audiencia .audience-toolbar-left {
  flex: 1 1 340px;
}

#audiencia .audience-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--code-input);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  min-width: 220px;
  flex: 1 1 260px;
}

#audiencia .audience-search-bar i {
  color: var(--code-muted);
}

#audiencia .audience-search-bar input {
  border: none;
  background: transparent;
  color: var(--code-text-soft);
  outline: none;
  width: 100%;
}

#audiencia .audience-search-bar input::placeholder {
  color: var(--code-muted);
}

#audiencia .audience-date-range label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

#audiencia .audience-date-range .integration-date-range {
  min-width: auto;
}

#audiencia .audience-date-range .date-range-display {
  width: auto;
  min-width: 120px;
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
  box-shadow: none;
}

#audiencia .audience-date-range .date-range-display i {
  color: var(--code-muted);
}

#audiencia .tag-picker-button,
#audiencia .btn.btn-ghost {
  background: transparent;
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
}

#audiencia .tag-picker-button:hover,
#audiencia .btn.btn-ghost:hover {
  background: var(--code-hover-strong);
}

#audiencia #btnAtualizarAudiencia.btn {
  background: var(--code-accent);
  border-color: transparent;
}

#audiencia .audience-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#audiencia .audience-status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #22c55e;
}

#audiencia .audience-status.is-success {
  color: #22c55e;
}

#audiencia .audience-status.is-info {
  color: #60a5fa;
}

#audiencia .audience-status.is-error {
  color: #f87171;
}

#audiencia .audience-list {
  display: grid;
  gap: 0.85rem;
}

#audiencia .audience-range {
  font-size: 0.75rem;
  color: var(--code-muted);
}

#audiencia .audience-item {
  background: var(--code-card);
  border: 1px solid var(--code-border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

#audiencia .audience-item:hover {
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

#audiencia .audience-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--code-border-strong);
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#audiencia .audience-body {
  flex: 1;
  display: grid;
  gap: 0.35rem;
}

#audiencia .audience-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#audiencia .audience-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--code-text);
}

#audiencia .audience-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--code-text-soft);
  background: var(--code-hover-strong);
  border: 1px solid var(--code-border-subtle);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

#audiencia .audience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--code-muted);
}

#audiencia .audience-meta i {
  margin-right: 0.35rem;
  color: var(--code-muted);
}

#audiencia .audience-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#audiencia .audience-item:hover .audience-actions {
  opacity: 1;
}

#audiencia .audience-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--code-border-strong);
  background: transparent;
  color: var(--code-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#audiencia .audience-action-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  color: var(--code-text);
  border-color: rgba(59, 130, 246, 0.45);
}

#audiencia .audience-action-btn.is-danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}

#audiencia .audience-tags .tag-pill {
  font-size: 0.7rem;
  border-radius: 999px;
}

#audiencia .audience-empty {
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--code-border);
  color: var(--code-muted);
  background: var(--code-panel-soft);
  text-align: center;
}

#audiencia .audience-pagination {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

#audiencia .audience-pagination-info {
  font-size: 0.85rem;
  color: var(--code-muted);
}

#audiencia .audience-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 12px;
  padding: 0.35rem;
}

#audiencia .audience-page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-soft);
  color: var(--code-muted);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#audiencia .audience-page-btn:hover {
  background: var(--code-hover-strong);
  color: var(--code-text);
}

#audiencia .audience-page-btn.is-active {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.6);
  color: var(--code-text);
}

#audiencia .audience-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
}

#audiencia .audience-page-ellipsis {
  color: var(--code-muted);
  padding: 0 0.4rem;
}

@media (max-width: 900px) {
  #audiencia .audience-toolbar {
    align-items: stretch;
  }

  #audiencia .audience-toolbar-left,
  #audiencia .audience-toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  #audiencia .audience-actions {
    opacity: 1;
  }
}


/* Chat layout (chat.html) */
#atendimento .chat-support {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: transparent;
  min-height: 70vh;
}

#atendimento .chat-contacts {
  position: static;
  width: 320px;
  border-right: 1px solid var(--code-border-strong);
  background: rgba(17, 24, 39, 0.5);
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: blur(6px);
}

#atendimento .chat-contacts-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--code-border-strong);
}

#atendimento .chat-contacts-header h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
}

#atendimento .chat-contacts-search {
  max-width: none;
  width: 100%;
  height: 40px;
  border-radius: 10px;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  padding: 0 0.75rem;
}

#atendimento .chat-contacts-search i {
  color: var(--code-muted);
}

#atendimento .chat-contact-list {
  max-height: none;
  grid-auto-rows: auto;
  padding: 0.5rem;
  gap: 0.35rem;
}

#atendimento .chat-contact-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  height: auto;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#atendimento .chat-contact-item:hover {
  background: var(--code-panel-strong);
  border-color: var(--code-border-strong);
}

#atendimento .chat-contact-item.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

#atendimento .chat-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

#atendimento .chat-contact-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#atendimento .chat-contact-title {
  color: var(--code-text-soft);
  font-weight: 600;
  font-size: 0.85rem;
}

#atendimento .chat-contact-time {
  font-size: 0.7rem;
  color: var(--code-muted);
}

#atendimento .chat-contact-meta {
  color: var(--code-muted);
  font-size: 0.7rem;
}

#atendimento .chat-contact-preview {
  color: var(--code-muted);
  font-size: 0.72rem;
}

#atendimento .chat-contact-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.65rem;
  background: #ef4444;
  color: var(--code-on-accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#atendimento .chat-contact-tags .tag-pill {
  font-size: 0.62rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

#atendimento .chat-contact-list .chat-empty {
  margin: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px dashed var(--code-border-strong);
  color: var(--code-muted);
  text-align: center;
}

#atendimento .chat-window {
  background: var(--code-main);
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#atendimento .chat-window-header {
  height: 64px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--code-border-strong);
  background: var(--chat-panel-strong);
  backdrop-filter: blur(8px);
}

#atendimento .chat-header-actions {
  gap: 0.35rem;
}

#atendimento .chat-menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--code-muted);
}

#atendimento .chat-menu-toggle:hover:not(:disabled) {
  border-color: var(--code-border-strong);
  background: var(--code-panel-muted);
  color: var(--code-text-soft);
}

#atendimento .chat-header-profile {
  gap: 0.75rem;
}

#atendimento .chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  color: var(--code-muted);
}

#atendimento .chat-header-info h3 {
  font-size: 0.95rem;
}

#atendimento #chatContactMeta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--code-muted);
}

#atendimento #chatContactMeta::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

#atendimento .chat-messages {
  flex: 1;
  padding: 2rem;
  background: var(--chat-panel);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#atendimento .chat-messages .chat-empty {
  margin: auto;
  text-align: center;
  color: var(--code-muted);
  max-width: 360px;
}

#atendimento .chat-empty-text h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--code-text-soft);
}

#atendimento .chat-empty-text p {
  margin: 0;
  font-size: 0.85rem;
}

#atendimento .chat-empty-visual {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#atendimento .chat-empty-glow {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  filter: blur(18px);
}

#atendimento .chat-empty-icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  font-size: 1.6rem;
}

#atendimento .chat-empty-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #60a5fa;
}

#atendimento .chat-empty-dot.is-primary {
  top: 6px;
  right: 18px;
}

#atendimento .chat-empty-dot.is-secondary {
  bottom: 14px;
  left: 12px;
  width: 8px;
  height: 8px;
  background: #818cf8;
}

#atendimento .chat-input-area {
  border-top: 1px solid var(--code-border-strong);
  background: var(--chat-panel-strong);
  padding: 1rem 1.25rem 1.1rem;
  position: relative;
  overflow: visible;
}

#atendimento .chat-input {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
}

#atendimento .chat-attach {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--code-border-strong);
  background: transparent;
  color: var(--code-muted);
}

#atendimento .chat-attach:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

#atendimento .chat-record-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--code-border-strong);
  background: transparent;
  color: var(--code-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#atendimento .chat-record-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

#atendimento .chat-record-btn.is-recording {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
}

#atendimento .chat-record-status {
  margin-top: 0;
  position: absolute;
  left: 10px;
  bottom: 64px;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #e2e8f0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.35);
}

#atendimento .chat-record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
  animation: pulseRecord 1.1s infinite ease-in-out;
}

#atendimento .chat-record-timer {
  font-weight: 700;
  letter-spacing: 0.04em;
}

#atendimento .chat-record-play,
#atendimento .chat-record-cancel {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#atendimento .chat-record-play {
  background: #60a5fa;
  color: #0f172a;
}

#atendimento .chat-record-cancel {
  background: #ef4444;
  color: #fff;
}

#atendimento .chat-record-play:hover {
  filter: brightness(1.05);
}

#atendimento .chat-record-cancel:hover {
  filter: brightness(1.05);
}

@keyframes pulseRecord {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; }
}


#atendimento .chat-input-box {
  flex: 1;
  position: relative;
  background: var(--code-panel-strong);
  border-radius: 14px;
  border: 1px solid var(--code-border-strong);
  display: flex;
  align-items: center;
}

#atendimento .chat-input textarea {
  background: transparent;
  border: none;
  padding: 0.7rem 2.75rem 0.7rem 1rem;
  min-height: 48px;
  max-height: 140px;
  color: var(--code-text-soft);
  font-size: 0.9rem;
}

#atendimento .chat-input textarea::placeholder {
  color: var(--code-muted);
}

#atendimento .chat-emoji-btn {
  position: absolute;
  right: 0.4rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--code-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

#atendimento .chat-emoji-panel {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;

  position: absolute;
  bottom: 58px;
  right: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 220px;
  z-index: 10;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#atendimento .chat-emoji-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#atendimento .chat-emoji-item {
  border: none;
  background: #f8fafc;
  border-radius: 10px;
  padding: 6px 0;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

#atendimento .chat-emoji-item:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

body.panel-page.theme-dark #atendimento .chat-emoji-panel {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;

  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
}

body.panel-page.theme-dark #atendimento .chat-emoji-item {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

body.panel-page.theme-dark #atendimento .chat-emoji-item:hover {
  background: rgba(148, 163, 184, 0.28);
}


#atendimento .chat-emoji-btn:hover {
  color: #fbbf24;
}

#atendimento #chatSendBtn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: var(--code-accent);
  color: var(--code-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}

#atendimento #chatSendBtn::after {
  content: none;
}

#atendimento #chatSendBtn i {
  font-size: 1rem;
}

#atendimento #chatSendBtn:disabled {
  opacity: 0.5;
  box-shadow: none;
}

#atendimento .chat-input-hint {
  text-align: center;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--code-muted);
}


#atendimento .chat-shortcuts {
  padding: 0.6rem 0 0;
}

#atendimento .chat-shortcuts-nav {
  background: var(--code-panel-strong);
  border-color: var(--code-border-strong);
  color: var(--code-muted);
}

#atendimento .chat-shortcuts-nav:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  color: var(--code-text-soft);
}

#atendimento .chat-shortcut-item {
  background: var(--code-panel-strong);
  border-color: var(--code-border-strong);
  color: var(--code-text-soft);
}

#atendimento .chat-shortcut-item:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
}


#atendimento .chat-contacts-search input {
  color: var(--code-text-soft);
}

#atendimento .chat-contacts-search input::placeholder {
  color: var(--code-muted);
}

#atendimento .chat-bubble {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
}

#atendimento .chat-bubble.is-outgoing {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--code-text);
}

#atendimento .chat-bubble-link {
  color: #93c5fd;
}

#atendimento .chat-bubble-meta {
  color: var(--code-muted);
}


#atendimento .chat-contacts {
  display: flex;
  flex-direction: column;
}

#atendimento .chat-contact-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#atendimento .chat-contact-meta,
#atendimento .chat-contact-preview {
  display: block;
  margin-top: 0.15rem;
}

#atendimento .chat-contact-item:hover .chat-contact-title {
  color: var(--code-accent);
}

#atendimento .chat-contact-item.active .chat-contact-title {
  color: #93c5fd;
}

#atendimento .chat-input-box:focus-within {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

#atendimento #chatSendBtn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

#atendimento .chat-empty-dot.is-primary {
  animation: chat-bounce 1.8s infinite;
}

#atendimento .chat-empty-dot.is-secondary {
  animation: chat-pulse 2s infinite;
}

@keyframes chat-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes chat-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.75); opacity: 0.6; }
}


/* Chat reference layout adjustments */
#atendimento .chat-support {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-muted);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  min-height: 70vh;
}

#atendimento .chat-contacts {
  display: flex;
  flex-direction: column;
  width: 280px;
  border-right: 1px solid var(--code-border-strong);
  background: rgba(17, 24, 39, 0.92);
  padding: 0;
}

#atendimento .chat-contacts-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--code-border-strong);
}

#atendimento .chat-contacts-header h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

#atendimento .chat-contacts-search {
  max-width: none;
  width: 100%;
  height: 38px;
  border-radius: 10px;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  padding: 0 0.75rem;
}

#atendimento .chat-contacts-search i {
  color: var(--code-muted);
}

#atendimento .chat-contacts-search input {
  color: var(--code-text-soft);
}

#atendimento .chat-contacts-search input::placeholder {
  color: var(--code-muted);
}

#atendimento .chat-contact-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: none;
  grid-auto-rows: auto;
  padding: 0.6rem 0.75rem 0.75rem;
  gap: 0.5rem;
}

#atendimento .chat-contact-item {
  background: var(--code-panel-muted);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#atendimento .chat-contact-item:hover {
  background: var(--code-panel-strong);
  border-color: var(--code-border-strong);
}

#atendimento .chat-contact-item.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

#atendimento .chat-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

#atendimento .chat-contact-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#atendimento .chat-contact-title {
  color: var(--code-text-soft);
  font-weight: 600;
  font-size: 0.84rem;
}

#atendimento .chat-contact-time {
  font-size: 0.7rem;
  color: var(--code-muted);
}

#atendimento .chat-contact-meta,
#atendimento .chat-contact-preview {
  display: block;
  margin-top: 0.15rem;
  color: var(--code-muted);
  font-size: 0.72rem;
}

#atendimento .chat-contact-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.65rem;
  background: #ef4444;
  color: var(--code-on-accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#atendimento .chat-window {
  background: var(--chat-panel);
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#atendimento .chat-window-header {
  height: 64px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--code-border-strong);
  background: var(--code-panel-strong);
  backdrop-filter: blur(8px);
}

#atendimento .chat-header-actions {
  gap: 0.35rem;
}

#atendimento .chat-menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--code-muted);
}

#atendimento .chat-menu-toggle:hover:not(:disabled) {
  border-color: var(--code-border-strong);
  background: var(--code-panel-muted);
  color: var(--code-text-soft);
}

#atendimento .chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  color: var(--code-muted);
}

#atendimento #chatContactMeta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--code-muted);
}

#atendimento #chatContactMeta::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

#atendimento .chat-messages {
  flex: 1;
  padding: 2rem;
  background: var(--code-panel-soft);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#atendimento .chat-messages .chat-empty {
  margin: auto;
  text-align: center;
  max-width: 360px;
  border: 1px dashed var(--code-border-strong);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  background: var(--code-panel-soft);
}

#atendimento .chat-empty-visual {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
}

#atendimento .chat-empty-glow,
#atendimento .chat-empty-dot {
  display: none;
}

#atendimento .chat-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  font-size: 1.4rem;
  margin: 0 auto;
}

#atendimento .chat-empty-text h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--code-text-soft);
}

#atendimento .chat-empty-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--code-muted);
}

#atendimento .chat-bubble {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
}

#atendimento .chat-bubble.is-outgoing {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
  color: var(--code-text);
}

#atendimento .chat-bubble-meta {
  color: var(--code-muted);
}

#atendimento .chat-input-area {
  border-top: 1px solid var(--code-border-strong);
  background: var(--code-panel-strong);
  padding: 1rem 1.25rem 1.1rem;
}

#atendimento .chat-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 960px;
  margin: 0 auto;
}

#atendimento .chat-attach {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-strong);
  color: var(--code-muted);
}

#atendimento .chat-input-box {
  flex: 1;
  position: relative;
  background: var(--code-panel-strong);
  border-radius: 14px;
  border: 1px solid var(--code-border-strong);
  display: flex;
  align-items: center;
}

#atendimento .chat-input textarea {
  background: transparent;
  border: none;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  min-height: 44px;
  max-height: 140px;
  color: var(--code-text-soft);
  font-size: 0.9rem;
}

#atendimento .chat-emoji-btn {
  position: absolute;
  right: 0.4rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--code-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

#atendimento #chatSendBtn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: var(--code-accent);
  color: var(--code-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}

#atendimento #chatSendBtn:hover:not(:disabled) {
  transform: scale(1.05);
}

#atendimento .chat-input-hint {
  text-align: center;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: var(--code-muted);
}

#atendimento .chat-shortcuts {
  padding: 0.6rem 0 0.2rem;
}


#atendimento .chat-header-info h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
}

#atendimento .chat-header-info .tag-list {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

#atendimento .chat-header-info .tag-list .tag-pill {
  font-size: 0.65rem;
  padding: 0.2rem 0.55rem;
}


/* Fluxos (funis) layout based on fluxos.html */
#funis .fluxos-page {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#funis .fluxos-page-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--code-text);
}

#funis .fluxos-page-header p {
  margin: 0;
  color: var(--code-muted);
  font-size: 0.95rem;
}

#funis .fluxos-layout {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

#funis .fluxos-left {
  flex: 0 0 42%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#funis .fluxos-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: 72vh;
  padding-right: 0.25rem;
}

#funis .fluxos-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#funis .fluxos-card {
  background: var(--code-card);
  border: 1px solid var(--code-border-strong);
  border-radius: 16px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.3);
}

#funis .fluxos-card h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--code-text);
}

#funis .fluxos-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

#funis .fluxos-field:last-child {
  margin-bottom: 0;
}

#funis .fluxos-field label,
#funis .fluxos-field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--code-text-soft);
}

#funis .fluxos-field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--code-border-strong);
  background: var(--code-input);
  color: var(--code-text-soft);
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}

#funis .fluxos-field input::placeholder {
  color: var(--code-muted);
}

#funis .fluxos-radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

#funis .fluxos-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--code-text-soft);
}

#funis .fluxos-radio-group input {
  accent-color: var(--code-accent);
}

#funis .fluxos-builder {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#funis .fluxos-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#funis .fluxos-builder-header h4 {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--code-text-soft);
}

#funis .fluxos-builder-header span {
  font-size: 0.75rem;
  color: var(--code-muted);
}

#funis .fluxos-builder-body {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 1rem;
  flex: 1;
  min-height: 240px;
}

#funis .fluxos-builder-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  align-items: stretch;
}

#funis .fluxos-small-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--code-muted);
}

#funis #disponiveis {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 280px;
  overflow-y: scroll;
  padding-right: 0.25rem;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

#funis #disponiveis .item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#funis .item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#funis .bloco-funil {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--code-input);
  border: 1px solid var(--code-border-strong);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  color: var(--code-text-soft);
  font-size: 0.78rem;
  cursor: grab;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#funis .bloco-funil i {
  color: var(--code-muted);
}

#funis .bloco-funil:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

#funis .bloco-funil .btn-remove {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--code-muted);
  cursor: pointer;
}

#funis .bloco-funil .btn-remove:hover {
  color: #f87171;
}

#funis .fluxos-drop-zone {
  flex: 1;
  min-height: 260px;
  height: 260px;
  max-height: 260px;
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  border: 2px dashed var(--code-border-strong);
  background: var(--code-panel-soft);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-sizing: border-box;
  align-self: stretch;
  min-width: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

#funis .fluxos-drop-zone:empty::before {
  content: 'Arraste os itens aqui para montar a sequencia';
  color: var(--code-muted);
  font-size: 0.8rem;
  text-align: center;
  margin: auto;
}

body.panel-page:not(.theme-dark) #funis #disponiveis .item,
body.panel-page:not(.theme-dark) #funis .bloco-funil {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1f2937;
}

body.panel-page:not(.theme-dark) #funis .item-icon,
body.panel-page:not(.theme-dark) #funis .bloco-funil-icon {
  color: #64748b;
}

#funis .fluxos-builder-footer {
  padding-top: 0.9rem;
  border-top: 1px solid var(--code-border-strong);
  display: flex;
  justify-content: flex-start;
}

#funis .fluxos-save-btn {
  background: var(--code-accent);
  border: none;
  color: var(--code-on-accent);
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
}

#funis .fluxos-save-btn:hover {
  filter: brightness(1.05);
}

#funis .fluxos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#funis .funil-card {
  background: var(--code-card);
  border: 1px solid var(--code-border-strong);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
}

#funis .funil-card.is-disabled {
  opacity: 0.7;
}

#funis .funil-title {
  color: var(--code-text);
  font-size: 1rem;
}

#funis .funil-meta {
  color: var(--code-muted);
}

#funis .funil-meta code {
  background: var(--code-panel-muted);
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
}

#funis .funil-card .btn-edit,
#funis .funil-card .btn-delete {
  background: transparent;
}

@media (max-width: 1100px) {
  #funis .fluxos-layout {
    flex-direction: column;
  }

  #funis .fluxos-left,
  #funis .fluxos-right {
    max-height: none;
  }
}


  #funis .fluxos-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* Montar Funil layout */
  body.panel-page[data-section="funis"] {
    --funil-text: var(--code-text);
    --funil-muted: var(--code-muted);
    --funil-border: var(--code-border);
    --funil-surface: var(--code-card);
    --funil-input: var(--code-input);
    --funil-accent: var(--code-accent);
    --funil-tag: #f97316;
    --funil-tag-bg: rgba(249, 115, 22, 0.14);
    font-family: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
  }

  body.panel-page[data-section="funis"] .content,
  body.panel-page[data-section="funis"] .content-section {
    background:
      radial-gradient(1100px 420px at 20% -120px, rgba(56, 80, 140, 0.35) 0%, rgba(11, 17, 32, 0) 60%),
      radial-gradient(1200px 680px at 85% 0%, rgba(28, 44, 92, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
      linear-gradient(180deg, var(--code-main) 0%, var(--code-main) 55%, var(--code-main) 100%);
    color: var(--funil-text);
  }

  body.panel-page[data-section="funis"] .content-wrapper {
    background:
      radial-gradient(1100px 420px at 20% -120px, rgba(56, 80, 140, 0.35) 0%, rgba(11, 17, 32, 0) 60%),
      radial-gradient(1200px 680px at 85% 0%, rgba(28, 44, 92, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
      linear-gradient(180deg, var(--code-main) 0%, var(--code-main) 55%, var(--code-main) 100%);
  }

  #funis.content-section.active {
    display: block !important;
  }

  #funis #formFunil {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    margin: 0;
  }

  #funis .fluxos-page {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  #funis .fluxos-page-header h2 {
    margin: 0 0 0.35rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--funil-text);
  }

  #funis .fluxos-page-header p {
    margin: 0;
    color: var(--funil-muted);
    font-size: 0.96rem;
    max-width: 680px;
  }

  #funis .fluxos-layout {
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
  }

  #funis .fluxos-left {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
  }

  #funis .fluxos-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    overflow-y: auto;
    max-height: 76vh;
    padding-right: 0.3rem;
  }

  #funis .fluxos-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
  }

  #funis .fluxos-card {
    background: var(--funil-surface);
    border: 1px solid var(--funil-border);
    border-radius: 18px;
    padding: 1.35rem 1.4rem;
    box-shadow: 0 14px 28px rgba(7, 12, 24, 0.35);
  }

  #funis .fluxos-card h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--funil-text);
  }

  #funis .fluxos-field {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
  }

  #funis .fluxos-field:last-child {
    margin-bottom: 0;
  }

  #funis .fluxos-field label,
  #funis .fluxos-field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--code-text-soft);
  }

  #funis .fluxos-field input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--funil-border);
    background: var(--funil-input);
    color: var(--funil-text);
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
  }

  #funis .fluxos-field input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }

  #funis .fluxos-field input::placeholder {
    color: var(--funil-muted);
  }

  #funis .fluxos-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  #funis .fluxos-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
    color: var(--code-text-soft);
  }

  #funis .fluxos-radio-group input {
    accent-color: var(--funil-accent);
  }

  #funis .fluxos-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #funis .fluxos-builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  #funis .fluxos-builder-header h4 {
    margin: 0;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--code-text-soft);
  }

  #funis .fluxos-builder-header span {
    font-size: 0.75rem;
    color: var(--funil-muted);
  }

  #funis .fluxos-builder-body {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    gap: 1rem;
    flex: 1;
    min-height: 300px;
  }

  #funis .fluxos-builder-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    align-items: stretch;
  }

  #funis .fluxos-builder-col:first-child {
    flex: 0 0 42%;
  }

  #funis .fluxos-small-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--funil-muted);
  }

  #funis #disponiveis {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 320px;
    overflow-y: scroll;
    padding-right: 0.25rem;
    box-sizing: border-box;
    scrollbar-gutter: stable;
  }

  #funis #disponiveis .item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--funil-border);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    color: var(--code-text-soft);
    font-size: 0.82rem;
    font-weight: 500;
    height: auto;
    min-height: 44px;
    width: 100%;
    box-shadow: none;
    box-sizing: border-box;
  }

  #funis .item-icon {
    color: var(--code-muted);
    display: inline-flex;
  }

  #funis .item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #funis .item-icon i,
  #funis .bloco-funil-icon i {
    margin-right: 0;
    color: inherit;
  }

  #funis .bloco-funil {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--funil-border);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    color: var(--code-text-soft);
    font-size: 0.82rem;
    cursor: grab;
    min-height: 44px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #funis .bloco-funil-icon {
    color: var(--code-muted);
    display: inline-flex;
  }

  #funis .bloco-funil-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #funis .bloco-funil .btn-remove {
    margin-left: auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: transparent;
    color: var(--code-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
    box-sizing: border-box;
  }

  #funis .bloco-funil .btn-remove:hover {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.5);
    background: transparent;
    box-shadow: none;
  }

  #funis .fluxos-drop-zone {
    flex: 1;
    min-height: 300px;
    height: 300px;
    max-height: 300px;
    width: 100%;
    max-width: 100%;
    border-radius: 14px;
    border: 2px dashed rgba(148, 163, 184, 0.25);
    background: var(--code-panel-soft);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-sizing: border-box;
    align-self: stretch;
    min-width: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  #funis .fluxos-drop-zone:empty::before {
    content: 'Arraste os itens aqui para montar a sequencia';
    color: var(--funil-muted);
    font-size: 0.82rem;
    text-align: center;
    margin: auto;
  }

  #funis .fluxos-builder-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--funil-border);
    display: flex;
    justify-content: flex-start;
  }

  #funis .fluxos-save-btn {
    background: var(--funil-accent);
    border: none;
    color: var(--code-on-accent);
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
  }

  #funis .fluxos-save-btn:hover {
    filter: brightness(1.05);
  }

  #funis .fluxos-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
  }

  #funis .funil-card {
    background: var(--funil-surface);
    border: 1px solid var(--funil-border);
    border-radius: 18px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 12px 24px rgba(7, 12, 24, 0.3);
    margin: 0;
  }

  #funis .funil-card.is-disabled {
    opacity: 0.6;
  }

  #funis .funil-title {
    color: var(--funil-text);
    font-size: 1rem;
    font-weight: 600;
  }

  #funis .badge-tipo.funil-tag {
    background: var(--funil-tag-bg);
    color: var(--funil-tag);
    border: 1px solid rgba(249, 115, 22, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    text-transform: capitalize;
  }

  #funis .funil-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
  }

  #funis .funil-actions .btn-edit,
  #funis .funil-actions .btn-delete {
    background: transparent;
    border: 1px solid transparent;
    color: var(--code-muted);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    font-size: 0.95rem;
    padding: 0;
    box-shadow: none;
    box-sizing: border-box;
  }

  #funis .funil-actions .btn-edit:hover {
    color: #38a169;
    background: rgba(56, 161, 105, 0.12);
    transform: none;
    box-shadow: none;
  }

  #funis .funil-actions .btn-delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    transform: none;
    box-shadow: none;
  }

  #funis .funil-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    cursor: pointer;
  }

  #funis .funil-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  #funis .funil-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--code-surface-3);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  #funis .funil-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
  }

  #funis .funil-toggle input:checked + .funil-toggle-slider {
    background: var(--funil-accent);
    border-color: var(--funil-accent);
  }

  #funis .funil-toggle input:checked + .funil-toggle-slider::before {
    transform: translate(20px, -50%);
  }

  #funis .funil-toggle input:focus-visible + .funil-toggle-slider {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  }

  #funis .funil-meta {
    display: grid;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--funil-muted);
  }

  #funis .funil-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  #funis .funil-meta-label {
    color: var(--code-text-soft);
    font-weight: 600;
  }

  #funis .funil-meta code {
    background: var(--code-panel-muted);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--code-text-soft);
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #funis .funil-meta-items {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--funil-muted);
  }

  #funis .funil-meta-items i {
    color: var(--code-muted);
  }

  @media (max-width: 1100px) {
    #funis .fluxos-layout {
      flex-direction: column;
    }

    #funis .fluxos-right {
      max-height: none;
    }
  }

  @media (max-width: 720px) {
    #funis .fluxos-builder-body {
      flex-direction: column;
    }

    #funis .fluxos-builder-col:first-child {
      flex: 1;
    }
  }

  /* Confirmacao de pagamento (layout confirmacao.html) */
#comprovante-pagamento .confirmacao-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

#comprovante-pagamento .confirmacao-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

#comprovante-pagamento .confirmacao-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  color: var(--code-text);
}

#comprovante-pagamento .confirmacao-header p {
  margin: 0;
  color: var(--code-muted);
  max-width: 720px;
  line-height: 1.5;
  font-size: 0.92rem;
}

#comprovante-pagamento .confirmacao-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--code-card);
  border: 1px solid var(--code-border-strong);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
  white-space: nowrap;
}

#comprovante-pagamento .confirmacao-toggle span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--code-muted);
}

#comprovante-pagamento .confirmacao-toggle .switch {
  margin-left: 0;
}

#comprovante-pagamento .confirmacao-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

#comprovante-pagamento .confirmacao-card {
  background: var(--code-card);
  border: 1px solid var(--code-border-strong);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#comprovante-pagamento .confirmacao-card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

#comprovante-pagamento .confirmacao-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

#comprovante-pagamento .confirmacao-card-title h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--code-text);
}

#comprovante-pagamento .confirmacao-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid transparent;
}

#comprovante-pagamento .confirmacao-card-icon.is-primary {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

#comprovante-pagamento .confirmacao-card-icon.is-purple {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

#comprovante-pagamento .confirmacao-card-icon.is-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

#comprovante-pagamento .confirmacao-card-body p {
  margin: 0;
  color: var(--code-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

#comprovante-pagamento .confirmacao-card-body label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--code-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}

#comprovante-pagamento .confirmacao-card-body textarea {
  min-height: 150px;
  resize: vertical;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

#comprovante-pagamento .confirmacao-card-body small {
  color: var(--code-muted);
  font-size: 0.75rem;
}

#comprovante-pagamento .confirmacao-card-footer {
  padding: 0.95rem 1.6rem;
  background: var(--code-panel-soft);
  border-top: 1px solid var(--code-border-strong);
}

#comprovante-pagamento .confirmacao-card-footer .btn {
  width: 100%;
  justify-content: center;
  gap: 0.45rem;
}

#comprovante-pagamento .confirmacao-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

#comprovante-pagamento .confirmacao-list .comprovante-item {
  background: var(--code-input);
  border: 1px solid var(--code-border-strong);
  border-radius: 14px;
  color: var(--code-text-soft);
  margin: 0;
  list-style: none;
}

#comprovante-pagamento .confirmacao-list .comprovante-item.is-active {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

#comprovante-pagamento .confirmacao-list .comprovante-item-title {
  color: var(--code-text);
  font-size: 0.95rem;
}

#comprovante-pagamento .confirmacao-list .comprovante-item-body {
  color: var(--code-text-soft);
}

#comprovante-pagamento .confirmacao-list .comprovante-item-btn {
  background: var(--code-panel-muted);
  border-color: var(--code-border-strong);
  color: var(--code-text-soft);
}

#comprovante-pagamento .confirmacao-list .comprovante-item-btn.is-danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

#comprovante-pagamento .confirmacao-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

#comprovante-pagamento .confirmacao-keywords .keyword-chip {
  background: var(--code-panel-muted);
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
}

#comprovante-pagamento .confirmacao-keywords .keyword-chip:hover {
  background: var(--code-panel-strong);
}

#comprovante-pagamento .confirmacao-keywords .keyword-chip i {
  color: var(--code-muted);
}

@media (max-width: 1100px) {
  #comprovante-pagamento .confirmacao-grid {
    grid-template-columns: 1fr;
  }

  #comprovante-pagamento .confirmacao-toggle {
    width: 100%;
    justify-content: space-between;
  }
}

/* Chat layout override */
body.panel-page[data-section="atendimento"] {
  --chat-bg: var(--code-main);
  --chat-panel: var(--code-card);
  --chat-panel-strong: var(--code-surface-2);
  --chat-border: var(--code-border);
  --chat-muted: var(--code-muted);
  --chat-text: var(--code-text-soft);
  --chat-accent: var(--code-accent);
  font-family: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
}

body.panel-page[data-section="atendimento"] .content,
body.panel-page[data-section="atendimento"] .content-section {
  background:
    radial-gradient(1200px 520px at 18% -120px, rgba(56, 80, 140, 0.35) 0%, rgba(11, 17, 32, 0) 60%),
    radial-gradient(1200px 680px at 85% 0%, rgba(28, 44, 92, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
    linear-gradient(180deg, var(--code-main) 0%, var(--code-main) 55%, var(--code-main) 100%);
  color: var(--chat-text);
}

body.panel-page[data-section="atendimento"] .content-wrapper {
  background:
    radial-gradient(1200px 520px at 18% -120px, rgba(56, 80, 140, 0.35) 0%, rgba(11, 17, 32, 0) 60%),
    radial-gradient(1200px 680px at 85% 0%, rgba(28, 44, 92, 0.35) 0%, rgba(11, 17, 32, 0) 70%),
    linear-gradient(180deg, var(--code-main) 0%, var(--code-main) 55%, var(--code-main) 100%);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-support {
  min-height: 78vh;
  overflow: visible;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts {
  width: 100%;
  max-width: 320px;
  background: var(--chat-panel-strong);
  border-right: 1px solid var(--chat-border);
  box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.6);
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  z-index: 2;
  border-top-left-radius: 16px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-header {
  padding: 0.9rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--chat-border);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-header h2 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--chat-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search {
  height: 44px;
  border-radius: 12px;
  background: var(--code-card);
  border: 1px solid var(--code-border-strong);
  padding: 0 0.85rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search i {
  color: var(--chat-muted);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search input {
  color: var(--chat-text);
  font-size: 0.95rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-list {
  padding: 0.75rem 1.4rem 0.9rem 0.85rem;
  gap: 0.45rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: visible;
  grid-auto-rows: auto;
  scrollbar-gutter: stable both-edges;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(59, 74, 110, 0.45);
  background: rgba(14, 22, 40, 0.95);
  box-shadow: 0 8px 16px rgba(6, 10, 24, 0.35);
  height: auto;
  display: grid;
  gap: 0.45rem;
  margin-right: 0.25rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item:hover {
  background: var(--code-panel-strong);
  border-color: rgba(99, 123, 180, 0.6);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item.active {
  background: var(--code-panel-strong);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 12px 24px rgba(8, 12, 24, 0.4);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-header {
  align-items: center;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--code-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-time {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-meta,
body.panel-page[data-section="atendimento"] #atendimento .chat-contact-preview {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.76rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-preview {
  display: none;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-tags {
  margin-top: 0.25rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-tags .tag-pill {
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  --tag-bg: rgba(124, 58, 237, 0.2);
  --tag-border: rgba(124, 58, 237, 0.55);
  --tag-color: #c4b5fd;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-window {
  background: rgba(11, 16, 32, 0.9);
  border-left: 1px solid rgba(15, 23, 42, 0.6);
  overflow: visible;
  position: relative;
  z-index: 1;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-window-header {
  min-height: 64px;
  height: auto;
  padding: 0.6rem 1.5rem;
  background: var(--code-panel-strong);
  border-bottom: 1px solid var(--chat-border);
  align-items: center;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-header-profile {
  gap: 0.85rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--code-card);
  border: 1px solid var(--code-border-strong);
  color: var(--chat-muted);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-header-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--chat-text);
}

body.panel-page[data-section="atendimento"] #atendimento #chatContactMeta {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.78rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-header-actions {
  gap: 0.5rem;
  align-items: center;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--chat-muted);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-menu-toggle:hover:not(:disabled) {
  border-color: var(--code-border-strong);
  background: var(--code-panel-muted);
  color: var(--chat-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-messages {
  background: radial-gradient(800px 520px at 50% -120px, rgba(30, 64, 175, 0.18) 0%, rgba(11, 17, 32, 0) 60%),
    linear-gradient(180deg, rgba(11, 17, 32, 0.9) 0%, rgba(11, 17, 32, 0.95) 100%);
  padding: 2.5rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-messages .chat-empty {
  max-width: 420px;
  color: rgba(148, 163, 184, 0.85);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-visual {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-glow {
  inset: 18px;
  background: rgba(59, 130, 246, 0.18);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  color: #60a5fa;
  font-size: 1.9rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-dot {
  width: 10px;
  height: 10px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-dot.is-primary {
  top: 8px;
  right: 20px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-dot.is-secondary {
  bottom: 18px;
  left: 12px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-text h3 {
  font-size: 1.05rem;
  color: var(--chat-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-text p {
  font-size: 0.88rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-area {
  padding: 1rem 1.5rem 1.1rem;
  border-top: 1px solid var(--chat-border);
  background: var(--code-panel-strong);
  position: relative;
  overflow: visible;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input {
  max-width: 100%;
  width: 100%;
  margin: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-attach {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--code-border-strong);
  color: var(--chat-muted);
  background: transparent;
  box-shadow: none;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-attach:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-box {
  background: var(--code-surface-3);
  border-radius: 16px;
  border: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input textarea {
  padding: 0.75rem 2.8rem 0.75rem 1rem;
  min-height: 48px;
  color: var(--chat-text);
  font-size: 0.92rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-emoji-btn {
  right: 0.45rem;
  width: 32px;
  height: 32px;
  color: var(--chat-muted);
}

body.panel-page[data-section="atendimento"] #atendimento #chatSendBtn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--chat-accent);
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.3);
}

body.panel-page[data-section="atendimento"] #atendimento #chatSendBtn:disabled {
  opacity: 0.55;
  box-shadow: none;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-hint {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.7);
}

@media (max-width: 1100px) {
  body.panel-page[data-section="atendimento"] #atendimento .chat-support {
    display: flex;
    flex-direction: column;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-contacts {
    width: 100%;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-window {
    border-left: none;
  }
}

/* Chat final layout */
body.panel-page[data-section="atendimento"] .content {
  padding: 0;
}

body.panel-page[data-section="audios"] .content {
  margin-top: 0;
  padding-top: 1.25rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-support {
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 0 !important;
  width: 100%;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--code-border-strong);
  background: var(--chat-panel-strong);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  isolation: isolate;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts {
  width: 100% !important;
  max-width: none !important;
  border-right: 1px solid var(--code-border-strong);
  background: rgba(11, 16, 32, 0.98);
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  box-shadow: none;
  position: relative;
  z-index: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-header {
  padding: 0.85rem 0.9rem 0.75rem;
  border-bottom: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-header h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search {
  height: 36px;
  border-radius: 999px;
  background: var(--chat-panel);
  border: 1px solid var(--code-border-strong);
  padding: 0 0.75rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-list {
  padding: 0.6rem 0.5rem 0.8rem;
  gap: 0.5rem;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-strong);
  box-shadow: 0 6px 12px rgba(7, 12, 24, 0.35);
  margin: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item:hover {
  background: var(--code-panel-strong);
  border-color: rgba(99, 123, 180, 0.6);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item.active {
  background: var(--code-panel-strong);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 10px 18px rgba(8, 12, 24, 0.4);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--code-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-time {
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.85);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-meta {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.75);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-preview {
  display: none;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-tags .tag-pill {
  font-size: 0.62rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-window {
  background: var(--chat-panel-strong);
  border-left: 1px solid var(--code-border-strong);
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  box-shadow: none;
  position: relative;
  z-index: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-window-header {
  min-height: 52px;
  padding: 0.5rem 1rem;
  background: var(--code-panel-strong);
  border-bottom: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-header-profile {
  gap: 0.7rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-header-info h3 {
  font-size: 0.9rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-messages {
  padding: 1.5rem;
  background: var(--chat-panel-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty {
  max-width: 340px;
  margin: auto;
  padding: 1.35rem 1.4rem;
  border-radius: 12px;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-muted);
  box-shadow: 0 10px 24px rgba(7, 12, 24, 0.35);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-visual {
  width: 84px;
  height: 84px;
  margin: 0 auto 0.9rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-glow {
  inset: 14px;
  filter: blur(12px);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty-icon {
  width: 54px;
  height: 54px;
  font-size: 1.2rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-area {
  padding: 0.7rem 1rem 0.8rem;
  background: var(--code-panel-strong);
  border-top: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input {
  max-width: 100%;
  width: 100%;
  margin: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-attach {
  width: 34px;
  height: 34px;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-box {
  border-radius: 999px;
  background: var(--chat-panel);
  border: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input textarea {
  min-height: 40px;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 0.85rem;
}

body.panel-page[data-section="atendimento"] #atendimento #chatSendBtn {
  width: 36px;
  height: 36px;
}

/* Chat input template (from provided layout) */
#atendimento .chat-input-area.chat-input-template {
  border-top: none;
  background: transparent;
  padding: 1.5rem 1.5rem 0.75rem;
}

#atendimento .chat-input-area.chat-input-template .chat-input {
  max-width: 100%;
}

#atendimento .chat-input-template-shell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  background: #162e1e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.25);
}

#atendimento .chat-input-template-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

#atendimento .chat-input-template-btn:hover:not(:disabled) {
  color: #13ec5b;
  background: rgba(19, 236, 91, 0.12);
}

#atendimento .chat-input-template-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#atendimento .chat-input-template .chat-emoji-btn {
  position: static;
}

#atendimento .chat-input-template .chat-attach {
  border: none;
  background: transparent;
}

#atendimento .chat-input-template .chat-attach i {
  transform: rotate(45deg);
}

#atendimento .chat-input-template-field {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
}

#atendimento .chat-input-template-field textarea {
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 0.95rem;
  line-height: 1.4;
}

#atendimento .chat-input-template-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#atendimento .chat-input-template .chat-emoji-panel {
  bottom: calc(100% + 12px);
  right: 12px;
}

#atendimento .chat-input-template #chatSendBtn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 999px;
  border: none;
  background: #13ec5b;
  color: #0b1d10;
  box-shadow: 0 12px 22px rgba(19, 236, 91, 0.3);
  font-size: 1rem;
  line-height: 1;
}

#atendimento .chat-input-template #chatSendBtn::after {
  content: none;
}

#atendimento .chat-input-template #chatSendBtn i {
  font-size: 1.05rem;
  transform: translateX(1px);
}

#atendimento .chat-input-area.chat-input-template .chat-input-hint {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.7);
}

@media (max-width: 1100px) {
  body.panel-page[data-section="atendimento"] #atendimento .chat-support {
    display: flex !important;
    border-radius: 12px;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-window {
    border-radius: 0 0 12px 12px;
  }
}

/* Fluxos ReactFlow (novo) */
body.panel-page[data-section="funis"] #funis.content-section.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#funis .fluxos-reactflow {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100%;
}

#funis .fluxos-loading {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--color-border);
  border-radius: 18px;
  background: #f9fafb;
  color: var(--color-muted);
}

#funis .flow-home {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

#funis .flow-home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

#funis .flow-home-title h2 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
}

#funis .flow-home-title p {
  margin: 0.35rem 0 0;
  color: var(--color-muted);
}

#funis .flow-home-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#funis .flow-btn {
  border: 1px solid #1f2933;
  background: #f5f5f5;
  color: #1f2933;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

#funis .flow-btn.primary {
  background: #ffffff;
}

#funis .flow-btn:hover {
  background: #eeeeee;
  box-shadow: none;
}

#funis .flow-hidden-input {
  display: none;
}

#funis .flow-home-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#funis .flow-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#funis .flow-card.is-disabled {
  opacity: 0.65;
}

#funis .flow-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

#funis .flow-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#funis .flow-card-title {
  font-size: 1.05rem;
  font-weight: 700;
}

#funis .flow-card-badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

#funis .flow-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#funis .flow-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#funis .flow-action-btn:hover {
  background: #f3f4f6;
}

#funis .flow-action-btn.danger {
  color: #dc2626;
  border-color: #fecaca;
}

#funis .flow-card-meta {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

#funis .flow-meta-row code {
  background: #f3f4f6;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.75rem;
}

#funis .flow-meta-items {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#funis .flow-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  background: #f9fafb;
  color: var(--color-muted);
}

#funis .flow-toggle {
  position: relative;
  width: 42px;
  height: 24px;
}

#funis .flow-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

#funis .flow-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e5e7eb;
  transition: background 0.2s ease;
}

#funis .flow-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease;
}

#funis .flow-toggle input:checked + .flow-toggle-slider {
  background: #2563eb;
}

#funis .flow-toggle input:checked + .flow-toggle-slider::before {
  transform: translateX(18px);
}

#funis .flow-builder {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 100%;
}

#funis .flow-builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

#funis .flow-builder-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#funis .flow-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--code-border-strong);
  background: transparent;
  color: var(--code-text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

#funis .flow-back-btn:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

#funis .flow-builder-heading {
  font-size: 1.6rem;
  font-weight: 700;
}

#funis .flow-builder-actions {
  display: flex;
  gap: 0.75rem;
}

#funis .flow-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

#funis .flow-meta-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#funis .flow-meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 600;
}

#funis .flow-meta-input {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  background: #ffffff;
  margin: 0;
}

#funis .flow-meta-radio {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#funis .flow-meta-radio label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #1f2933;
}

#funis .flow-canvas {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #f8fafc;
  min-height: 520px;
  height: 60vh;
  overflow: hidden;
}

#funis .flow-add-menu {
  position: absolute;
  left: 24px;
  top: 24px;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  z-index: 5;
}

#funis .flow-add-toggle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

#funis .flow-add-panel {
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.5rem;
  display: grid;
  gap: 0.35rem;
  min-width: 160px;
}

#funis .flow-add-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: #1f2933;
}

#funis .flow-add-item:hover {
  background: #dbe3ec;
}

#funis .react-flow {
  background: transparent;
}

#funis .react-flow__controls {
  box-shadow: none;
}

#funis .flow-node {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #2f2f2f;
  background: #f3f4f6;
  min-width: 180px;
  width: 240px;
  max-width: 260px;
  box-shadow: 0 10px 18px rgba(31, 41, 51, 0.12);
}

#funis .flow-node-start {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  min-width: 130px;
  width: 150px;
  max-width: 180px;
  padding: 8px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #cbd5e1;
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.8);
}

#funis .flow-node-start-title {
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
}

#funis .flow-node-start-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111827;
  color: #ffffff;
  font-size: 0.65rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

#funis .flow-node-start-icon i {
  transform: translateX(1px);
}

#funis .flow-node-message {
  background: #eeeeee;
}

#funis .flow-node-asset {
  background: #f0f4f8;
}

#funis .flow-node-decision {
  background: #f8f2e6;
}

#funis .flow-node-logic {
  background: #e8f3f8;
}

#funis .flow-node-selected {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

#funis .flow-node-title {
  font-weight: 700;
  margin-bottom: 6px;
}

#funis .flow-node-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

#funis .flow-node-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 600;
}

#funis .flow-node-select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  font: inherit;
  background: #ffffff;
}

#funis .flow-node-select:disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

#funis .flow-node-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  font: inherit;
  background: #ffffff;
}

#funis .flow-decision-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

#funis .flow-decision-option {
  display: flex;
  gap: 8px;
  align-items: center;
}

#funis .flow-decision-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

#funis .flow-node-handle-option {
  background: #2563eb;
}

#funis .flow-node-body {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #1f2933;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

#funis .flow-node-handle {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #111827;
  border: 2px solid #f9fafb;
}

body.panel-page.theme-dark #funis .flow-card,
body.panel-page.theme-dark #funis .flow-canvas,
body.panel-page.theme-dark #funis .flow-node {
  background: #111827;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-canvas {
  background: #0b1220;
  border-color: #1f2937;
}

body.panel-page.theme-dark #funis .flow-node {
  border-color: #334155;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.4);
}

body.panel-page.theme-dark #funis .flow-node-start {
  background: #0f172a;
  border-color: #334155;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

body.panel-page.theme-dark #funis .flow-node-start-title {
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-node-body,
body.panel-page.theme-dark #funis .flow-card-meta,
body.panel-page.theme-dark #funis .flow-meta-label,
body.panel-page.theme-dark #funis .flow-node-label {
  color: #94a3b8;
}

body.panel-page.theme-dark #funis .flow-meta-input {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-meta-input::placeholder {
  color: #94a3b8;
}

body.panel-page.theme-dark #funis .flow-meta-radio label {
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-node-input,
body.panel-page.theme-dark #funis .flow-node-select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-node-decision {
  background: #1f2937;
}

body.panel-page.theme-dark #funis .flow-node-logic {
  background: #1f2937;
}

body.panel-page.theme-dark #funis .flow-decision-tag {
  background: #334155;
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-home-title p,
body.panel-page.theme-dark #funis .flow-empty {
  color: #94a3b8;
}

body.panel-page.theme-dark #funis .flow-add-panel {
  background: #1f2937;
  border-color: #374151;
}

body.panel-page.theme-dark #funis .flow-add-item {
  color: #e2e8f0;
}

body.panel-page.theme-dark #funis .flow-add-item:hover {
  background: #334155;
}

/* Main content should be solid across all sections */
body.panel-page .content,
body.panel-page .content-wrapper,
body.panel-page .content-section,
body.panel-page[data-section] .content,
body.panel-page[data-section] .content-wrapper,
body.panel-page[data-section] .content-section {
  background: var(--color-bg);
}

body.panel-page[data-section="vendas"] #vendas .sales-refined {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.35rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-title p {
  color: var(--code-muted);
  font-size: 0.95rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem;
  background: var(--code-panel-muted);
  border: 1px solid var(--code-border-strong);
  border-radius: 0.75rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-toggle {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: var(--code-panel);
  border-radius: 0.6rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-toggle .sales-tab-btn {
  border: none;
  background: transparent;
  color: var(--code-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-toggle .sales-tab-btn.active {
  background: #3b82f6;
  color: var(--code-text);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.25);
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-divider {
  width: 1px;
  height: 28px;
  background: rgba(148, 163, 184, 0.3);
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  background: #3b82f6;
  color: var(--code-text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-search:hover {
  background: #2563eb;
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

body.panel-page[data-section="vendas"] #vendas #btnBuscarVendas {
  display: none;
}

body.panel-page[data-section="vendas"] #vendas.is-recuperacao #btnBuscarVendas {
  display: inline-flex;
}

body.panel-page[data-section="vendas"] #vendas.is-recuperacao #btnBuscarVendasEfetuadas {
  display: none;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-card,
body.panel-page[data-section="vendas"] #vendas .sales-refined-results {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--code-text-soft);
  margin-bottom: 1rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-card-title i {
  color: #3b82f6;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-filter-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--code-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input {
  position: relative;
  display: flex;
  align-items: center;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input i {
  position: absolute;
  left: 0.75rem;
  color: var(--code-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

body.panel-page[data-section="vendas"] #vendas .integration-input {
  width: 100%;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  color: var(--code-text);
  font-size: 0.9rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input .integration-input {
  padding-left: 2.3rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input input,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input select,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input textarea,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input .date-range-display {
  width: 100%;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem 0.6rem 2.3rem;
  color: var(--code-text);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input .date-range-display {
  text-align: left;
  cursor: pointer;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input input::placeholder,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-input input:focus,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input select:focus,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input textarea:focus,
body.panel-page[data-section="vendas"] #vendas .sales-refined-input .date-range-display:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-date {
  position: relative;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-date .date-range-popover {
  z-index: 5;
}

body.panel-page[data-section="vendas"] #vendas .sales-summary {
  display: grid;
  gap: 1rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-card {
  border-radius: 1rem;
  padding: 1.1rem;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--code-text-soft);
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--code-text);
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--code-muted);
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  background: var(--code-panel-strong);
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-icon.is-approved {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

body.panel-page[data-section="vendas"] #vendas .sales-summary-icon.is-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

body.panel-page[data-section="vendas"] #vendas .sales-refined-results {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

body.panel-page[data-section="vendas"] #vendas .sales-results-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--code-text);
}

body.panel-page[data-section="vendas"] #vendas .sales-results-header .integration-status {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--code-muted);
}

body.panel-page[data-section="vendas"] #vendas .sales-results-count {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--code-text-soft);
  background: var(--code-panel);
  border: 1px solid var(--code-border-strong);
  white-space: nowrap;
}

body.panel-page[data-section="vendas"] #vendas .integration-sales-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  padding: 0.5rem 0;
}

body.panel-page[data-section="vendas"] #vendas .integration-sale {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 0.9rem;
  padding: 1rem;
}

body.panel-page[data-section="vendas"] #vendas .integration-sale-empty {
  margin: auto;
  padding: 2rem;
  text-align: center;
  color: var(--code-muted);
  background: var(--code-panel);
  border: 1px dashed var(--code-border-strong);
  border-radius: 1rem;
  max-width: 420px;
}

body.panel-page[data-section="vendas"] #vendas .integration-sales-toolbar,
body.panel-page[data-section="vendas"] #vendas .integration-send {
  padding-top: 0.5rem;
}

body.panel-page[data-section="vendas"] #vendas .integration-select-all span {
  color: var(--code-text-soft);
  font-weight: 600;
}

body.panel-page[data-section="vendas"] #vendas .integration-message-box {
  padding: 1.25rem;
}

body.panel-page[data-section="vendas"] #vendas .integration-message-box .integration-input {
  width: 100%;
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 0.75rem;
  color: var(--code-text);
}

@media (max-width: 1100px) {
  body.panel-page[data-section="vendas"] #vendas .sales-refined-grid {
    grid-template-columns: 1fr;
  }

  body.panel-page[data-section="vendas"] #vendas .sales-refined-actions {
    width: 100%;
    justify-content: space-between;
  }

  body.panel-page[data-section="vendas"] #vendas .sales-refined-results {
    min-height: 420px;
  }
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.4rem;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-header p {
  color: var(--code-muted);
  font-size: 1rem;
  max-width: 640px;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-strong);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--code-text);
  margin-bottom: 0.35rem;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card p {
  font-size: 0.9rem;
  color: var(--code-muted);
  line-height: 1.5;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  font-size: 1.25rem;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.35);
  transform: translateY(-2px);
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card:hover .config-refined-icon {
  background: #6366f1;
  color: var(--code-on-accent);
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card.is-disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card.is-disabled:hover {
  border-color: var(--code-border-strong);
  box-shadow: none;
}

body.panel-page[data-section="configuracoes"] #configuracoes .config-refined-card.is-disabled .config-refined-icon {
  background: rgba(148, 163, 184, 0.15);
  color: var(--code-muted);
}

.config-header-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1;
}

.config-header-main > div {
  min-width: 0;
}

.config-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--code-border-strong);
  background: transparent;
  color: var(--code-text-soft);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.config-back-btn i {
  font-size: 0.85rem;
}

.config-back-btn:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-header p {
  color: var(--code-muted);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.4rem;
  border-radius: 0.85rem;
  border: none;
  background: #3b82f6;
  color: var(--code-on-accent);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 24px rgba(59, 130, 246, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-btn:hover {
  background: #2563eb;
  box-shadow: 0 20px 30px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-empty {
  position: relative;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-empty-card {
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-muted);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--code-panel-strong);
  color: var(--code-muted);
  font-size: 2rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-empty-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--code-text);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-empty-text p {
  color: var(--code-muted);
  font-size: 0.95rem;
  max-width: 460px;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  background: var(--code-panel-strong);
  color: var(--code-text-soft);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-secondary:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-muted);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.85rem;
  background: var(--code-panel-strong);
  border: 1px solid transparent;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-search i {
  color: var(--code-muted);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--code-text-soft);
  font-size: 0.9rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-search input:focus {
  outline: none;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-divider {
  width: 1px;
  height: 28px;
  background: rgba(148, 163, 184, 0.25);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: var(--code-panel-strong);
  color: var(--code-text-soft);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-filter:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card {
  background: var(--code-panel);
  border: 1px solid var(--code-border-strong);
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.35);
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--code-text-soft);
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--label-color, #94a3b8);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.5);
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card-actions {
  display: inline-flex;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card:hover .label-card-actions {
  opacity: 1;
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card-actions button {
  border: none;
  background: var(--code-panel-strong);
  color: var(--code-muted);
  border-radius: 0.65rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="etiquetas"] #etiquetas .label-card-actions button:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

body.panel-page[data-section="etiquetas"] #etiquetas .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.panel-page[data-section="etiquetas"] #etiquetas .tag-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--tag-bg, rgba(148, 163, 184, 0.18));
  border: 1px solid var(--tag-border, rgba(148, 163, 184, 0.45));
  color: var(--tag-color, #94a3b8);
}

@media (max-width: 900px) {
  body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-header {
    flex-direction: column;
    align-items: flex-start;
  }

  body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  body.panel-page[data-section="etiquetas"] #etiquetas .labels-refined-divider {
    display: none;
  }
}

body.panel-page[data-section="backup"] #backup .backup-refined {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-header {
  text-align: left;
}

body.panel-page[data-section="backup"] #backup .backup-refined-header .config-header-main {
  align-items: flex-start;
}

body.panel-page[data-section="backup"] #backup .backup-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.6rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-header p {
  color: var(--code-muted);
  font-size: 0.95rem;
  max-width: 680px;
  margin: 0 auto;
}

body.panel-page[data-section="backup"] #backup .backup-refined-card {
  border: 1px solid var(--code-border-strong);
  border-radius: 1.5rem;
  background: var(--code-panel);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

body.panel-page[data-section="backup"] #backup .backup-refined-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.panel-page[data-section="backup"] #backup .backup-refined-panel {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 360px;
}

body.panel-page[data-section="backup"] #backup .backup-refined-panel + .backup-refined-panel {
  border-left: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="backup"] #backup .backup-refined-panel-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--code-text);
  margin-bottom: 0.75rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-panel-header p {
  color: var(--code-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

body.panel-page[data-section="backup"] #backup .backup-refined-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-icon.is-export {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

body.panel-page[data-section="backup"] #backup .backup-refined-icon.is-import {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}

body.panel-page[data-section="backup"] #backup .backup-refined-actions {
  margin-top: auto;
}

body.panel-page[data-section="backup"] #backup .backup-refined-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.85rem;
  border: none;
  background: #3b82f6;
  color: var(--code-on-accent);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(59, 130, 246, 0.3);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.panel-page[data-section="backup"] #backup .backup-refined-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.35);
}

body.panel-page[data-section="backup"] #backup .backup-refined-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.85rem;
  border: none;
  background: rgba(148, 163, 184, 0.2);
  color: var(--code-muted);
  font-weight: 600;
  cursor: not-allowed;
}

body.panel-page[data-section="backup"] #backup .backup-refined-secondary:enabled {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

body.panel-page[data-section="backup"] #backup .backup-refined-secondary:enabled:hover {
  background: rgba(59, 130, 246, 0.2);
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone {
  border: 2px dashed rgba(148, 163, 184, 0.4);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  background: var(--code-panel-soft);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone:hover,
body.panel-page[data-section="backup"] #backup .backup-refined-dropzone.dragover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.08);
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone-text span {
  color: var(--code-text-soft);
  font-size: 0.95rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone-text strong {
  color: #60a5fa;
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone-text small {
  display: block;
  color: var(--code-muted);
  margin-top: 0.4rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-file {
  color: var(--code-muted);
  font-size: 0.85rem;
}

body.panel-page[data-section="backup"] #backup .backup-refined-dropzone.has-file .backup-refined-file {
  color: #60a5fa;
}

body.panel-page[data-section="backup"] #backup .backup-refined-input {
  display: none;
}

@media (max-width: 960px) {
  body.panel-page[data-section="backup"] #backup .backup-refined-grid {
    grid-template-columns: 1fr;
  }

  body.panel-page[data-section="backup"] #backup .backup-refined-panel + .backup-refined-panel {
    border-left: none;
    border-top: 1px solid var(--code-border-strong);
  }
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.4rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-header p {
  color: var(--code-muted);
  font-size: 0.95rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab {
  border: none;
  border-radius: 1rem;
  padding: 0.95rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--code-text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab.active {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 30px rgba(124, 58, 237, 0.35);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab.is-monetizze {
  background: #7c3aed;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab.is-kiwify {
  background: #84cc16;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab.is-kirvano {
  background: #f97316;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab.is-braib {
  background: #3b82f6;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-tab.is-hotmart {
  background: #ef4444;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-soon {
  background: rgba(255, 255, 255, 0.25);
  color: var(--code-text);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-content {
  min-width: 0;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 1.5rem;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.8rem;
  background: var(--code-panel-soft);
  border-bottom: 1px solid var(--code-border);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-title h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.2rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-title p {
  color: var(--code-muted);
  font-size: 0.9rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-icon.is-monetizze {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-icon.is-kiwify {
  background: rgba(132, 204, 22, 0.2);
  color: #a3e635;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-icon.is-kirvano {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-icon.is-braib {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-icon.is-hotmart {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--code-text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-flex;
  align-items: center;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-slider {
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-slider::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-switch input:checked + .integrations-refined-slider {
  background: rgba(124, 58, 237, 0.8);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-switch input:checked + .integrations-refined-slider::after {
  transform: translateX(20px);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--code-muted);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-body p {
  font-size: 0.95rem;
  line-height: 1.6;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--code-text-soft);
  margin-bottom: 0.45rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-input {
  position: relative;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-input input {
  width: 100%;
  padding: 0.75rem 2.6rem 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel);
  color: var(--code-text);
  font-size: 0.9rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-input-icon {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--code-muted);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-field small {
  display: block;
  color: var(--code-muted);
  font-size: 0.75rem;
  margin-top: 0.45rem;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.8rem;
  background: var(--code-panel-soft);
  border-top: 1px solid var(--code-border);
  flex-wrap: wrap;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-primary,
body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-primary {
  background: #7c3aed;
  color: var(--code-on-accent);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-primary:hover {
  background: #6d28d9;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--code-text-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-secondary:hover {
  border-color: rgba(124, 58, 237, 0.6);
  color: #c4b5fd;
}

body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-status {
  font-size: 0.85rem;
  color: var(--code-muted);
}

@media (max-width: 980px) {
  body.panel-page[data-section="integracoes"] #integracoes .integrations-refined-grid {
    grid-template-columns: 1fr;
  }
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-header p {
  margin-top: 0.5rem;
  color: var(--code-muted);
  font-size: 1rem;
  max-width: 540px;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-toggle {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.2rem;
  border-radius: 1rem;
  background: var(--code-panel-muted);
  border: 1px solid var(--code-border-strong);
  color: var(--code-text-soft);
  font-weight: 600;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-switch {
  position: relative;
  width: 46px;
  height: 24px;
  display: inline-flex;
  align-items: center;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-slider {
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-slider::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-switch input:checked + .chatgpt-refined-slider {
  background: #3b82f6;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-switch input:checked + .chatgpt-refined-slider::after {
  transform: translateX(22px);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-card {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 1.5rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--code-text-soft);
  margin-bottom: 0.6rem;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-input {
  position: relative;
  display: flex;
  align-items: center;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-input input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 3rem;
  border-radius: 1rem;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel);
  color: var(--code-text);
  font-size: 0.95rem;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--code-muted);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-visibility {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--code-muted);
  cursor: pointer;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-hint {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--code-muted);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  padding-top: 1.5rem;
  border-top: 1px solid var(--code-border);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.9rem;
  border: none;
  background: #3b82f6;
  color: var(--code-on-accent);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-status {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--code-text-soft);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.9rem 1.1rem;
  border-radius: 0.9rem;
  max-width: 520px;
}

@media (max-width: 900px) {
  body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-header {
    align-items: flex-start;
  }

  body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-toggle {
    width: 100%;
    justify-content: space-between;
  }

  body.panel-page[data-section="chatgpt"] #chatgpt .chatgpt-refined-actions {
    flex-direction: column;
  }
}

body.panel-page[data-section="conta"] #conta .account-refined {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.4rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-header p {
  color: var(--code-muted);
  font-size: 1rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-card {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--code-border);
}

body.panel-page[data-section="conta"] #conta .account-refined-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.panel-page[data-section="conta"] #conta .account-refined-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--code-muted);
}

body.panel-page[data-section="conta"] #conta .account-refined-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--code-text);
}

body.panel-page[data-section="conta"] #conta .account-refined-card-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.5rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-card-header p {
  color: var(--code-muted);
  font-size: 0.9rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-input {
  flex: 1;
  min-width: 220px;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-strong);
  color: var(--code-text);
  font-size: 0.95rem;
}

body.panel-page[data-section="conta"] #conta .account-refined-primary {
  padding: 0.8rem 1.5rem;
  border-radius: 0.9rem;
  border: none;
  background: #3b82f6;
  color: var(--code-on-accent);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(59, 130, 246, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

body.panel-page[data-section="conta"] #conta .account-refined-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

body.panel-page[data-section="conta"] #conta .account-refined-status {
  font-size: 0.85rem;
  color: var(--code-muted);
  min-height: 1.2rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.6rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-header p {
  color: var(--code-muted);
  font-size: 1rem;
  max-width: 720px;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 2.5rem;
  background: var(--code-panel-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero::before,
body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.5;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero::before {
  width: 240px;
  height: 240px;
  background: rgba(59, 130, 246, 0.35);
  top: -120px;
  left: -80px;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero::after {
  width: 280px;
  height: 280px;
  background: rgba(168, 85, 247, 0.35);
  bottom: -160px;
  right: -100px;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--code-text);
  margin-bottom: 0.6rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero-content p {
  color: var(--code-muted);
  font-size: 0.98rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-support {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--code-text-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-support:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--code-text);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero-illustration {
  position: relative;
  z-index: 1;
  display: none;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device {
  width: 140px;
  height: 260px;
  border-radius: 1.5rem;
  background: var(--code-main);
  border: 4px solid rgba(148, 163, 184, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
  transition: transform 0.4s ease;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device-notch {
  position: absolute;
  top: 12px;
  width: 50px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f97316;
  color: var(--code-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.4);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device-line {
  width: 70px;
  height: 6px;
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device-line.is-short {
  width: 45px;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-device-badge {
  position: absolute;
  top: 70px;
  left: -30px;
  background: #f8fafc;
  color: #f97316;
  padding: 0.35rem 0.6rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.2);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero:hover .inicio-refined-device {
  transform: rotate(0deg);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stats h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--code-text-soft);
  margin-bottom: 1rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 24px rgba(15, 23, 42, 0.35);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--code-on-accent);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--code-muted);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--code-text);
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card.is-blue .inicio-refined-stat-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card.is-cyan .inicio-refined-stat-icon {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card.is-emerald .inicio-refined-stat-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card.is-amber .inicio-refined-stat-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card.is-orange .inicio-refined-stat-icon {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

body.panel-page[data-section="inicio"] #inicio .inicio-refined-stat-card.is-purple .inicio-refined-stat-icon {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

@media (min-width: 960px) {
  body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero-illustration {
    display: block;
  }
}

@media (max-width: 768px) {
  body.panel-page[data-section="inicio"] #inicio .inicio-refined-hero {
    padding: 2rem;
  }
}

/* Assistente GPT rebuild */
body.panel-page[data-section="assistente-gpt"] {
  --gpt-bg: var(--code-main);
  --gpt-surface: var(--code-card);
  --gpt-surface-2: var(--code-surface-2);
  --gpt-border: var(--code-border);
  --gpt-muted: var(--code-muted);
  --gpt-text: var(--code-text);
  --gpt-primary: var(--code-accent);
  font-family: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
}

body.panel-page[data-section="assistente-gpt"] .content,
body.panel-page[data-section="assistente-gpt"] .content-section {
  background: var(--gpt-bg);
  color: var(--gpt-text);
}

#assistente-gpt .gpt-assistant {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#assistente-gpt .gpt-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

#assistente-gpt .gpt-assistant-title h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gpt-text);
}

#assistente-gpt .gpt-assistant-subtitle {
  margin: 0.4rem 0 0;
  color: var(--gpt-muted);
  font-size: 0.95rem;
}

#assistente-gpt .gpt-assistant-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#assistente-gpt .gpt-search {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.9rem;
  height: 42px;
  border-radius: 12px;
  background: var(--gpt-surface);
  border: 1px solid var(--gpt-border);
}

#assistente-gpt .gpt-search i {
  color: var(--gpt-muted);
  font-size: 0.9rem;
}

#assistente-gpt .gpt-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--gpt-text);
  font-size: 0.9rem;
  min-width: 220px;
}

#assistente-gpt .gpt-search input::placeholder {
  color: var(--gpt-muted);
}

#assistente-gpt .gpt-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.1rem;
  border-radius: 12px;
  border: none;
  background: var(--gpt-primary);
  color: var(--code-on-accent);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(59, 130, 246, 0.25);
}

#assistente-gpt .gpt-add-btn i {
  font-size: 0.85rem;
}

#assistente-gpt .gpt-assistant-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

#assistente-gpt .gpt-list-card {
  background: var(--gpt-surface);
  border: 1px solid var(--gpt-border);
  border-radius: 16px;
  padding: 1.25rem 1.3rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
}

#assistente-gpt .gpt-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--gpt-text);
  font-weight: 600;
}

#assistente-gpt .gpt-list-meta {
  color: var(--gpt-muted);
  font-size: 0.8rem;
}

#assistente-gpt .gpt-prompt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

#assistente-gpt #listaPrompts li.message-card {
  background: var(--code-panel-strong);
  border: 1px solid var(--code-border-strong);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: none;
}

#assistente-gpt #listaPrompts li.message-card.is-active {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.08);
}

#assistente-gpt #listaPrompts li.message-card.selected {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.1);
}

#assistente-gpt #listaPrompts .message-card-title {
  color: var(--gpt-text);
  font-weight: 600;
}

#assistente-gpt #listaPrompts .message-card-preview {
  color: var(--gpt-muted);
}

#assistente-gpt .gpt-detail-card {
  background: var(--gpt-surface);
  border: 1px solid var(--gpt-border);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#assistente-gpt .gpt-detail-header {
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--code-border-strong);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

#assistente-gpt .gpt-detail-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#assistente-gpt .gpt-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--gpt-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

#assistente-gpt .gpt-detail-meta {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gpt-muted);
}

#assistente-gpt .gpt-detail-chip {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--code-border-strong);
  color: var(--gpt-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.6rem;
}

#assistente-gpt .gpt-detail-actions .btn-edit,
#assistente-gpt .gpt-detail-actions .btn-delete {
  background: transparent;
  border: 1px solid var(--code-border-strong);
  color: var(--gpt-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 0;
}

#assistente-gpt .gpt-detail-actions .btn-edit:hover {
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.1);
}

#assistente-gpt .gpt-detail-actions .btn-delete:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.1);
}

#assistente-gpt .gpt-detail-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 220px;
  color: var(--gpt-text);
}

#assistente-gpt .gpt-detail-body.is-empty {
  align-items: center;
  text-align: center;
  border: 1px dashed var(--code-border-strong);
  border-radius: 12px;
  margin: 1.6rem;
  padding: 2rem 1.5rem;
  background: var(--code-panel-muted);
}

#assistente-gpt .gpt-detail-body:not(.is-empty) {
  margin: 0;
  border: none;
  background: transparent;
  padding: 1.6rem;
}

#assistente-gpt .gpt-detail-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--code-border-strong);
  color: var(--gpt-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

#assistente-gpt .gpt-detail-text {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

#assistente-gpt .gpt-detail-hint {
  font-size: 0.85rem;
  color: var(--gpt-muted);
  margin: 0;
}

#assistente-gpt .gpt-detail-body:not(.is-empty) .gpt-detail-empty-icon,
#assistente-gpt .gpt-detail-body:not(.is-empty) .gpt-detail-hint {
  display: none;
}

#assistente-gpt .gpt-detail-footer {
  padding: 0.9rem 1.3rem;
  border-top: 1px solid var(--code-border-strong);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--gpt-muted);
  font-size: 0.85rem;
}

#assistente-gpt .gpt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

#assistente-gpt .gpt-create-card {
  border: 2px dashed var(--code-border-strong);
  border-radius: 16px;
  padding: 1rem;
  background: transparent;
  color: var(--gpt-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

#assistente-gpt .gpt-create-card:hover {
  color: var(--gpt-text);
  border-color: rgba(59, 130, 246, 0.6);
}

@media (max-width: 1100px) {
  #assistente-gpt .gpt-assistant-grid {
    grid-template-columns: 1fr;
  }
}

/* Chat rebuild from provided layout */
body.panel-page[data-section="atendimento"] #atendimento .chat-support {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 0 !important;
  height: 100%;
  border: 1px solid var(--code-border-strong);
  border-radius: 12px;
  background: var(--chat-panel-strong);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  align-items: stretch;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts {
  width: 100% !important;
  max-width: none !important;
  background: var(--chat-panel);
  border-right: 1px solid var(--code-border-strong);
  border-radius: 12px 0 0 12px;
  box-shadow: none;
  position: static;
  z-index: auto;
  overflow: hidden;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-header {
  padding: 0.9rem 0.95rem 0.8rem;
  border-bottom: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-header h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--code-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search {
  height: 36px;
  border-radius: 999px;
  background: var(--chat-panel);
  border: 1px solid var(--code-border-strong);
  padding: 0 0.75rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contacts-search input {
  font-size: 0.85rem;
  color: var(--code-text-soft);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-list {
  padding: 0.65rem 0.6rem 0.85rem;
  gap: 0.55rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "header header" "meta tags";
  gap: 0.35rem 0.6rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--code-border-strong);
  border-left: 4px solid transparent;
  background: var(--code-panel-strong);
  box-shadow: 0 6px 12px rgba(7, 12, 24, 0.35);
  margin: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item:hover {
  background: var(--code-panel-strong);
  border-color: rgba(99, 123, 180, 0.6);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item.active {
  background: var(--code-panel-strong);
  border-color: rgba(59, 130, 246, 0.55);
  border-left-color: #2563eb;
  box-shadow: 0 10px 18px rgba(8, 12, 24, 0.4);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-header {
  grid-area: header;
  align-items: center;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--code-text);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-time {
  font-size: 0.65rem;
  color: var(--code-muted);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-item.active .chat-contact-time {
  color: #60a5fa;
  font-weight: 600;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-meta {
  grid-area: meta;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-preview {
  display: none;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-tags {
  grid-area: tags;
  margin: 0;
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 0.25rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-contact-tags .tag-pill {
  font-size: 0.62rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-window {
  background: var(--chat-panel-strong);
  border-left: 1px solid var(--code-border-strong);
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  position: static;
  z-index: auto;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-window-header {
  min-height: 52px;
  padding: 0.5rem 1rem;
  background: var(--chat-panel-strong);
  border-bottom: 1px solid var(--code-border-strong);
  position: relative;
  z-index: 5;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-header-info h3 {
  font-size: 0.9rem;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-messages {
  padding: 1.5rem;
  background: var(--chat-panel-strong);
  position: relative;
  z-index: 1;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-empty {
  max-width: 360px;
  margin: auto;
  padding: 1.35rem 1.4rem;
  border-radius: 12px;
  border: 1px solid var(--code-border-strong);
  background: var(--code-panel-muted);
  box-shadow: 0 10px 24px rgba(7, 12, 24, 0.35);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-area {
  padding: 0.7rem 1rem 0.8rem;
  background: var(--chat-panel-strong);
  border-top: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input {
  max-width: 100%;
  width: 100%;
  margin: 0;
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input-box {
  border-radius: 999px;
  background: var(--chat-panel);
  border: 1px solid var(--code-border-strong);
}

body.panel-page[data-section="atendimento"] #atendimento .chat-input textarea {
  min-height: 40px;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 0.85rem;
}

body.panel-page[data-section="atendimento"] #atendimento #chatSendBtn {
  width: 36px;
  height: 36px;
}

@media (max-width: 1100px) {
  body.panel-page[data-section="atendimento"] #atendimento .chat-support {
    display: flex !important;
    border-radius: 12px;
  }

  body.panel-page[data-section="atendimento"] #atendimento .chat-window {
    border-radius: 0 0 12px 12px;
  }
}
