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

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-subtle: #edf2f7;

  --text: #0f172a;
  --text-muted: #64748b;
  --text-secondary: #475569;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --header-h: 46px;
  --footer-h: 28px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 12px;
  position: relative;
}

.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.header-brand-img {
  height: 28px;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.viewports {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px;
}

.btn-viewport {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-viewport:hover {
  color: var(--text);
}

.btn-viewport.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: #cbd5e1;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 600;
}

.btn-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

/* Workspace 3 Columns Layout */
.workspace {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  height: calc(100vh - var(--header-h) - var(--footer-h));
  background: var(--bg);
}

.pane {
  display: flex;
  flex-direction: column;
  position: relative;
}

.pane-editor {
  width: 580px;
  min-width: 280px;
  max-width: 650px;
  flex: none;
  background: var(--bg);
  border-right: 1px solid var(--border);
}

/* Modo Logs: o painel de auditoria ocupa a tela inteira */
.workspace.logs-mode .pane-editor {
  flex: 1 1 0;
  width: auto;
  max-width: none;
}

.pane-preview {
  flex: 1 1 0;
  min-width: 0;
  background: #eaecf0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pane-tools {
  width: 280px;
  min-width: 200px;
  max-width: 450px;
  flex: none;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
}

/* Split Resizers */
.resizer {
  width: 6px;
  background: var(--bg);
  cursor: col-resize;
  position: relative;
  z-index: 10;
  transition: background 0.15s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resizer:hover,
.resizer.dragging {
  background: #45b96f;
}

.resizer::after {
  content: '';
  width: 2px;
  height: 24px;
  background: var(--border);
  border-radius: 1px;
}


.pane-bar {
  height: 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
}

.pane-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tools-pane-body {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.tool-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-accordion-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.tool-accordion-header {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease;
}

.tool-accordion-header:hover {
  background: var(--surface-hover);
}

.tool-accordion-card.open .tool-accordion-header {
  border-bottom-color: var(--border);
  background: var(--bg);
}

.tool-accordion-card.open .tool-chevron {
  transform: rotate(90deg);
}

.tool-accordion-body {
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
}

.tool-accordion-card.open .tool-accordion-body {
  display: flex;
}

.btn-tool-action {
  width: 100%;
  text-align: left;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tool-action:hover {
  background: var(--surface-hover);
  border-color: #45b96f;
  color: #45b96f;
}

.tool-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.viewports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: var(--bg);
  padding: 3px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.viewports-grid .btn-viewport {
  text-align: center;
  padding: 5px 6px;
  font-size: 10.5px;
}

.tool-input-full {
  width: 100%;
  padding: 6px 8px;
  font-size: 11px;
}

.sim-toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.sim-toggles-grid .btn-sim-toggle {
  text-align: center;
  padding: 5px 6px;
  font-size: 10.5px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 4px;
}

.sim-toggles-grid .btn-sim-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.sim-toggles-grid .btn-sim-toggle.active {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  font-weight: 600;
}

.btn-audit {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-audit:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.audit-icon {
  flex-shrink: 0;
}

/* O ícone acompanha o estado do botão: check quando limpo, alerta quando há avisos */
.btn-audit .audit-icon-warn {
  display: none;
}

.btn-audit.has-warnings .audit-icon-check {
  display: none;
}

.btn-audit.has-warnings .audit-icon-warn {
  display: block;
}

.btn-audit.has-warnings {
  color: #b45309;
  border-color: #fcd34d;
  background: #fffbeb;
}

.btn-audit.is-clean {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

/* Painel de Auditoria (flui dentro do pane de ferramentas) */
.audit-drawer {
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}

.audit-drawer.active {
  display: flex;
  animation: auditReveal 0.18s ease-out;
}

@keyframes auditReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.audit-drawer-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: #f8fafc;
}

.audit-drawer-body {
  padding: 10px 10px 12px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  max-height: 40vh;
}

.audit-item {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f8fafc;
  line-height: 1.4;
}

.audit-item.warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.audit-item.good {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.audit-item-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Marcador de status do item de auditoria */
.audit-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #94a3b8;
}

.audit-item.warn .audit-item-dot {
  background: #f59e0b;
}

.audit-item.good .audit-item-dot {
  background: #10b981;
}

.audit-item-desc {
  color: var(--text-muted);
  font-size: 11px;
  padding-left: 12px;
}

/* ========================================================
   Painel de Logs (Histórico de Disparos)
   ======================================================== */
.logs-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.logs-list-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.logs-scroll {
  flex: 1;
  overflow: auto;
  padding: 12px 16px 20px 16px;
}

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

.logs-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.logs-table td {
  padding: 8px;
  vertical-align: middle;
}

.logs-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease;
}

.logs-row:hover {
  background: #f8fafc;
}

.logs-row.is-selected {
  background: #f0fdf4;
  box-shadow: inset 2px 0 0 #45b96f;
}

.logs-row:focus-visible {
  outline: 2px solid #45b96f;
  outline-offset: -2px;
}

.logs-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
}

.logs-status-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #eef2f7;
  color: var(--text);
}

.logs-status-pill.is-ok {
  background: #e8f7ee;
  color: #15803d;
}

.logs-status-pill.is-erro {
  background: #fdecec;
  color: #b91c1c;
}

.logs-detail-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fbfcfd;
}

.logs-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.logs-detail-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.logs-detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.logs-detail-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef2f7;
}

.logs-detail-copy {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.logs-detail-copy:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.logs-detail-body {
  flex: 1;
  overflow: auto;
  padding: 12px 14px 24px 14px;
}

.logs-detail-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Lista indentada no estilo JSON */
.log-json {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: #334155;
}

.log-json-group {
  margin: 2px 0;
}

.log-json-group > .log-json-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
  border-radius: 3px;
  padding: 0 3px;
}

.log-json-group > .log-json-summary::-webkit-details-marker {
  display: none;
}

.log-json-group > .log-json-summary:hover {
  background: #eef2f7;
}

.log-json-caret {
  width: 6px;
  height: 7px;
  flex-shrink: 0;
  align-self: center;
  background: #94a3b8;
  /* triângulo desenhado via clip-path (sem truque de border) */
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: transform 0.12s ease;
}

.log-json-group[open] > .log-json-summary > .log-json-caret {
  transform: rotate(90deg);
}

.log-json-count {
  color: #94a3b8;
}

.log-json-children {
  margin-left: 7px;
  padding-left: 9px;
  border-left: 1px solid #e2e8f0;
}

.log-json-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 3px;
  border-radius: 3px;
}

.log-json-row:hover {
  background: #eef2f7;
}

.log-json-key {
  color: #0f172a;
  white-space: nowrap;
}

.log-json-colon {
  color: #94a3b8;
}

.log-json-val {
  word-break: break-word;
  min-width: 0;
}

.log-json-val.is-string {
  color: #15803d;
}

.log-json-val.is-number {
  color: #b45309;
}

.log-json-val.is-bool {
  color: #7c3aed;
}

.log-json-val.is-null,
.log-json-val.is-empty {
  color: #94a3b8;
}

.log-json-brace {
  color: #94a3b8;
}

.log-json-branch-sep {
  height: 1px;
  background: var(--border);
  margin: 12px 0 10px 0;
}

.logs-detail-status.is-ok {
  background: #e8f7ee;
  color: #15803d;
}

.logs-detail-status.is-erro {
  background: #fdecec;
  color: #b91c1c;
}

@media (max-width: 1100px) {
  .logs-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 45%);
  }

  .logs-list-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.editor-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  transition: background 0.15s ease, outline 0.15s ease;
}

.editor-body.drag-over {
  background: #18181c;
  outline: 1px dashed #71717a;
  outline-offset: -2px;
}

/* Mode Switch Tabs */
.mode-switch-group {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.btn-mode-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mode-tab:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.btn-mode-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Visual Editor Form Container (White Mode Exclusivo) */
.visual-editor-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 80px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f1f3f6;
}

.visual-editor-inner {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 50px;
}

.vf-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.vf-card-header {
  background: #ffffff;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
}

.vf-card-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vf-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.vf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.vf-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.vf-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 17px;
}

/* Selo de origem do asset (mesma URL usada no e-mail) */
.vf-pfp-source-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: help;
}

.vf-pfp-source-tag.is-local {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.vf-pfp-source-tag.is-web {
  color: #15803d;
  background: #f0fdf4;
  border-color: #86efac;
}

.vf-pfp-source-tag.is-warning {
  color: #b45309;
  background: #fffbeb;
  border-color: #fcd34d;
}

/* Controle compacto dentro do próprio campo: "| ✕ ✓"
   Aparece só enquanto o conteúdo ainda é o padrão do sistema e
   some sozinho quando o operador escreve o próprio texto. */
.gate-field-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.gate-field-wrap.is-gated .vf-input,
.gate-field-wrap.is-gated .form-input {
  padding-right: 52px;
}

.gate-field-wrap.is-gated .vf-rich-editor {
  padding-right: 58px;
}

.gate-inline {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  gap: 1px;
  padding-right: 7px;
  cursor: default;
}

.gate-inline.is-visible {
  display: flex;
}

.gate-inline.is-multiline {
  bottom: auto;
  padding-top: 7px;
}

.gate-inline-sep {
  width: 1px;
  height: 15px;
  background: #cbd5e1;
  margin-right: 3px;
  flex-shrink: 0;
}

.gate-inline-btn {
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.gate-inline-btn.is-x {
  color: #b45309;
  font-size: 10px;
}

.gate-inline-btn.is-x:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.gate-inline-btn.is-v {
  color: #b45309;
  font-weight: 700;
}

.gate-inline-btn.is-v:hover {
  background: #dcfce7;
  color: #15803d;
}

.gate-inline-btn:focus-visible {
  outline: 2px solid #45b96f;
  outline-offset: 1px;
}

/* Campo ainda não confirmado pelo operador */
.vf-input.gate-pending,
.vf-rich-editor.gate-pending,
.form-input.gate-pending {
  border-color: #fcd34d;
  background: #fffdf5;
}

@keyframes gateFlash {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }

  25% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
  }

  50% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }

  75% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
  }
}

.gate-flash {
  animation: gateFlash 0.7s ease-out 2;
}

/* Aviso de confirmação pendente dentro do modal de envio */
.send-gate-banner {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 20px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  border-radius: 6px;
  color: #92400e;
  font-size: 11.5px;
  line-height: 1.5;
}

.send-gate-banner.is-visible {
  display: flex;
}

.send-gate-banner-text {
  flex: 1;
  min-width: 0;
}

.send-gate-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.send-gate-banner-text strong {
  color: #78350f;
  font-weight: 700;
}

.send-gate-banner-list {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #b45309;
}

.send-gate-review-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  border: 1px solid #f59e0b;
  background: #ffffff;
  color: #92400e;
  cursor: pointer;
  transition: background 0.15s ease;
}

.send-gate-review-btn:hover {
  background: #fef3c7;
}

@media (prefers-reduced-motion: reduce) {

  .gate-flash,
  .audit-drawer.active {
    animation: none;
  }
}

.vf-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: 12.5px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  width: 100%;
}

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

.vf-input:focus {
  border-color: #45b96f;
  box-shadow: 0 0 0 2px rgba(69, 185, 111, 0.2);
}

/* PFP Addon Input Group */
.vf-input-addon-group {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vf-input-addon-group:focus-within {
  border-color: #45b96f;
  box-shadow: 0 0 0 2px rgba(69, 185, 111, 0.2);
}

.vf-addon-prefix,
.vf-addon-suffix {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  padding: 8px 10px;
  user-select: none;
  white-space: nowrap;
  border-right: 1px solid #e2e8f0;
}

.vf-addon-suffix {
  border-right: none;
  border-left: 1px solid #e2e8f0;
}

.vf-addon-input {
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 8px 10px !important;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #0f172a;
  outline: none;
  min-width: 60px;
}

.vf-pfp-preview-container {
  width: 52px;
  height: 52px;
  border-radius: 8px 0 8px 8px;
  border: 2px solid #45b96f;
  overflow: hidden;
  background: #08253e;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vf-pfp-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Rich Text Mini Toolbar */
.vf-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  padding: 4px 6px;
}

.vf-presets-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vf-presets-label {
  font-family: var(--font-sans);
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  margin-right: 2px;
}

.vf-preset-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vf-preset-select:hover,
.vf-preset-select:focus {
  border-color: #45b96f;
  color: #08253e;
}

/* Seletor de Idioma com Bandeira */
.vf-lang-dropdown-container {
  position: relative;
  display: inline-block;
}

.vf-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.vf-lang-btn:hover {
  border-color: #45b96f;
  background: #f8fafc;
}

.vf-lang-flag-img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
  display: block;
}

.vf-lang-code {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.5px;
}

.vf-lang-chevron {
  font-size: 9px;
  color: #64748b;
}

.vf-lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 140px;
  display: none;
  flex-direction: column;
  padding: 4px;
  z-index: 100;
}

.vf-lang-menu.show {
  display: flex;
}

.vf-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
}

.vf-lang-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.vf-lang-option.active {
  background: #ecfdf5;
  color: #059669;
  font-weight: 600;
}

.vf-color-tag-dark {
  color: #08253e;
  font-weight: 700;
  font-size: 11px;
  border-bottom: 2px solid #08253e;
  padding-bottom: 1px;
}

.vf-highlight-tag {
  background-color: #83e7a7;
  color: #08253e;
  font-weight: 700;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
  line-height: 1;
}

.vf-rich-editor {
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 5px 5px;
  background: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #08253e;
  outline: none;
}

.vf-rich-editor mark {
  background-color: #83e7a7;
  color: #08253e;
  padding: 0 3px;
  border-radius: 2px;
  font-weight: bold;
}

.vf-rich-editor p {
  margin: 0 0 10px 0;
}

.vf-rich-editor p:last-child {
  margin-bottom: 0;
}

/* Accordion Collapsible Sections */
.vf-card.vf-accordion {
  transition: all 0.2s ease;
}

.vf-accordion-toggle {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.vf-accordion-toggle:hover {
  background: #f8fafc;
}

.vf-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vf-chevron {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.2s ease;
  display: inline-block;
}

.vf-card.vf-accordion:not(.open) .vf-chevron {
  transform: rotate(-90deg);
}

.vf-card.vf-accordion:not(.open) .vf-accordion-body {
  display: none !important;
}



.vf-tb-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  width: 26px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.vf-tb-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.vf-tb-sep {
  width: 1px;
  height: 14px;
  background: #cbd5e1;
  margin: 0 4px;
}

.vf-tb-color-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 26px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  position: relative;
}

.vf-tb-color-picker:hover {
  background: #e2e8f0;
}

.vf-color-indicator {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: block;
}

.vf-rich-editor {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 5px 5px;
  padding: 14px 16px;
  color: #08253e;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  min-height: 140px;
  height: auto;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.vf-rich-editor:focus {
  border-color: #45b96f;
  box-shadow: 0 0 0 2px rgba(69, 185, 111, 0.2);
}

.vf-rich-editor p {
  margin: 0 0 12px 0;
  text-align: justify;
  color: #08253e;
}

.vf-rich-editor p:last-child {
  margin-bottom: 0;
}

#monaco-editor {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.lines {
  width: 42px;
  padding: 12px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  color: #94a3b8;
  text-align: right;
  user-select: none;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.textarea {
  flex: 1;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  background: transparent;
  color: #0f172a;
  border: none;
  outline: none;
  resize: none;
  white-space: pre;
  tab-size: 2;
  overflow: auto;
}

.textarea::selection {
  background: #e2e8f0;
  color: #0f172a;
}

.resizer {
  width: 6px;
  background: #e2e8f0;
  cursor: col-resize;
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.resizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -6px;
  right: -6px;
  cursor: col-resize;
  z-index: 25;
}

.resizer:hover,
.resizer.dragging {
  background: #45b96f;
  box-shadow: 0 0 8px rgba(69, 185, 111, 0.4);
}

.preview-stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: repeating-conic-gradient(#e5e7eb 0 25%, #f1f5f9 0 50%) 50% / 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px 24px 12px;
  box-sizing: border-box;
}

.preview-container {
  background: #ffffff;
  height: auto;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: max-width 0.15s ease;
  overflow: hidden;
  border-radius: 4px;
}

.preview-container.email {
  max-width: 600px;
}

.preview-container.mobile {
  max-width: 375px;
}

.preview-container.tablet {
  max-width: 768px;
}

.preview-container.desktop {
  max-width: 100%;
}

#preview-frame {
  width: 100%;
  height: auto;
  min-height: 400px;
  border: none;
  background: #ffffff;
  display: block;
}

/* Footer */
.footer {
  height: var(--footer-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-item span {
  color: var(--text);
}

/* ========================================================
   MODO COPIAR: Renderização Pura e Exclusiva do HTML
   ======================================================== */
.clean-render-view {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 999;
  display: none;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: auto;
}

.clean-render-view.active {
  display: flex;
}

#clean-render-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
  flex: 1;
}

/* Floating Return Bar */
.clean-floating-bar {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  user-select: none;
}

.clean-floating-bar span {
  color: #64748b;
}

.btn-floating {
  background: #0f172a;
  color: #ffffff;
  border: none;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-floating:hover {
  background: #1e293b;
}

/* Toast Notification (Padrão Topo Centralizado) */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-18px) scale(0.96);
  background: #0f172a;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid #1e293b;
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.22), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.toast.error {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #b91c1c;
  box-shadow: 0 16px 36px -6px rgba(220, 38, 38, 0.3), 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.toast.success {
  background: #15803d;
  color: #ffffff;
  border: 1px solid #166534;
  box-shadow: 0 16px 36px -6px rgba(21, 128, 61, 0.3), 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg {
  display: block;
}

.toast-msg {
  white-space: normal;
  line-height: 1.35;
}

/* ========================================================
   Header Enviar Button & Modal de Envio SMTP
   ======================================================== */
.btn-send {
  background: #45b96f !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-color: #45b96f !important;
  padding: 4px 12px !important;
}

.btn-send:hover {
  background: #3ca361 !important;
  border-color: #3ca361 !important;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modal-backdrop.active {
  display: flex;
}

/* Modal Card */
.send-modal {
  background: #ffffff;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.send-modal-lg {
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  border: none;
  margin: 0;
}

/* Modal Header — light */
.send-modal-header {
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  flex-shrink: 0;
}

.send-modal-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0;
}

.send-badge-recipients {
  background: #f0fdf4;
  color: #15803d;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.send-modal-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.send-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Split Layout */
.send-modal-split {
  display: grid;
  grid-template-columns: 580px 1fr;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 106px);
}

@media (max-width: 960px) {
  .send-modal-split {
    grid-template-columns: 1fr;
  }

  .send-modal-preview-col {
    display: none !important;
  }
}

/* Form column — light mode */
.send-modal-form-col {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
}

/* ── Form Sections (light panels inside form col) ── */
.sm-section {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.sm-section:last-child {
  border-bottom: none;
}

.sm-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Form fields inside light mode */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-hint {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 400;
}

.form-label a {
  color: #45b96f;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
}

.form-label a:hover {
  text-decoration: underline;
}

.form-input {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  padding: 7px 10px !important;
  color: #111827 !important;
  font-size: 12.5px !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  transition: border-color 0.15s ease !important;
}

.form-input:focus {
  border-color: #45b96f !important;
}

.form-input::placeholder {
  color: #9ca3af !important;
}

/* Autofill light mode */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827 !important;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Configurações Multilíngues ── */
.lang-settings-accordion {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.lang-settings-header {
  padding: 10px 12px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease;
}

.lang-settings-header:hover {
  background: #f3f4f6;
}

.lang-settings-accordion.open .lang-settings-header {
  border-bottom-color: #e5e7eb;
}

.lang-settings-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lang-settings-icon {
  display: flex;
  align-items: center;
  color: #6b7280;
  flex-shrink: 0;
}

.lang-settings-title {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.lang-settings-chevron {
  font-size: 11px;
  color: #9ca3af;
  transition: transform 0.2s ease;
}

.lang-settings-accordion.open .lang-settings-chevron {
  transform: rotate(180deg);
}

.lang-settings-body {
  display: none;
  padding: 12px;
  background: #ffffff;
}

.lang-settings-accordion.open .lang-settings-body {
  display: block;
}

.lang-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

.lang-subtab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 4px 10px;
  color: #6b7280;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-subtab:hover {
  background: #f3f4f6;
  color: #111827;
}

.lang-subtab.active {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
  font-weight: 600;
}

.cfg-lang-input {
  font-size: 12px !important;
  padding: 6px 9px !important;
}

/* ── Email input box (add recipient) ── */
.email-input-box {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 7px;
  transition: border-color 0.15s ease;
}

.email-input-box:focus-within {
  border-color: #45b96f;
}

.email-input-icon {
  color: #9ca3af;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.email-table-add-input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #111827 !important;
  font-size: 12.5px !important;
  padding: 8px 0 !important;
  flex: 1;
  width: 100% !important;
  font-family: inherit !important;
}

.email-table-add-input::placeholder {
  color: #9ca3af !important;
}

/* ── Recipients Table Container ── */
.recipients-table-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.recipients-table-header {
  padding: 8px 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recipients-table-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #374151;
}

.btn-clear-table {
  background: transparent;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-clear-table:hover {
  background: #fef2f2;
}

.recipients-table-scroll {
  max-height: 200px;
  overflow-y: auto;
}

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

.recipients-table th {
  padding: 7px 10px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 1;
}

.recipients-table td {
  padding: 5px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  color: #111827;
}

.recipients-table tr:last-child td {
  border-bottom: none;
}

.recipients-table tbody tr:hover td {
  background: #f9fafb;
}

.table-input-cell {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 5px !important;
  padding: 4px 8px !important;
  color: #111827 !important;
  font-size: 11.5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  font-family: inherit !important;
  transition: border-color 0.15s ease !important;
}

.table-input-cell:focus {
  border-color: #45b96f !important;
}

/* Preset badge button — light */
.table-preset-btn {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  color: #6b7280;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.table-preset-btn:hover {
  border-color: #d1d5db;
  color: #374151;
}

.table-preset-btn.sample {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.table-preset-btn.prospect {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Flag button — light */
.table-flag-btn {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 3px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
  user-select: none;
}

.table-flag-btn:hover {
  border-color: #45b96f;
}

.table-flag-img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.bulk-flag-img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* (bulk-flag-img kept for preview banner) */
}

.table-email-text {
  font-size: 11.5px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  font-family: var(--font-sans);
}

.table-btn-del {
  background: transparent;
  border: none;
  color: #d1d5db;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.table-btn-del:hover {
  color: #dc2626;
}

.recipients-empty-state {
  padding: 20px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Recentes ── */
.recent-pills-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.recent-label {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
  flex-shrink: 0;
}

.recent-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.recent-pill {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.recent-pill:hover {
  border-color: #45b96f;
}

.recent-pill-text {
  background: transparent;
  border: none;
  color: #374151;
  font-size: 11px;
  font-family: inherit;
  padding: 2px 7px;
  cursor: pointer;
  outline: none;
}

.recent-pill-text:hover {
  color: #45b96f;
}

.recent-pill-del {
  background: transparent;
  border: none;
  border-left: 1px solid #e5e7eb;
  color: #9ca3af;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.recent-pill-del:hover {
  color: #dc2626;
}

/* ── Autocomplete Dropdown — light ── */
.to-input-wrapper {
  position: relative;
  width: 100%;
}

.to-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 180px;
  overflow-y: auto;
}

.to-autocomplete-item {
  padding: 7px 12px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s ease;
}

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

.to-autocomplete-item:hover,
.to-autocomplete-item.active {
  background: #f0fdf4;
  color: #111827;
}

.to-autocomplete-email {
  font-family: var(--font-sans);
  font-weight: 500;
}

.to-autocomplete-email strong {
  color: #45b96f;
  font-weight: 700;
}

.to-autocomplete-badge {
  font-size: 9.5px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

/* ── Progress Bar — light ── */
.send-progress-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #15803d;
  font-weight: 500;
}

.progress-bar-bg {
  height: 4px;
  background: #bbf7d0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #16a34a;
  transition: width 0.3s ease;
}

/* Coluna Direita: Live Preview com Mini Monitor e Mini Celular LADO A LADO */
.send-modal-preview-col {
  border-left: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal-preview-header {
  padding: 8px 14px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  gap: 12px;
  min-height: 42px;
}

.modal-preview-subject {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.modal-preview-legend {
  display: flex;
  gap: 6px;
}

.legend-tag {
  font-size: 10px;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
}

/* Palco de Dispositivos Lado a Lado */
.modal-device-stage {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  overflow-y: auto;
  overflow-x: auto;
  background: repeating-conic-gradient(#e5e7eb 0 25%, #f8fafc 0 50%) 50% / 20px 20px;
  position: relative;
}

.device-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* --- 1. Monitor Desktop (Ratio Widescreen 16:10 Realista) --- */
.device-monitor {
  width: 660px;
}

.monitor-bezel {
  width: 660px;
  background: #1e293b;
  border: 3px solid #334155;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.monitor-bar {
  background: #0f172a;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
}

.monitor-url-pill {
  font-size: 10px;
  color: #94a3b8;
  background: #1e293b;
  border-radius: 10px;
  padding: 2px 10px;
  font-family: var(--font-mono);
}

.monitor-screen {
  width: 660px;
  height: 410px;
  /* Ratio Widescreen Realista 16:10 */
  overflow-y: auto;
  overflow-x: hidden;
  background: #fef9f1;
  position: relative;
  display: flex;
  justify-content: center;
}

.monitor-screen-inner {
  width: 600px;
  min-height: 100%;
  position: relative;
}

.device-iframe-desktop {
  width: 600px;
  height: 100%;
  min-height: 800px;
  border: none;
  transform: none;
  /* Escala 1:1 real */
  display: block;
}

.monitor-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.monitor-neck {
  width: 50px;
  height: 20px;
  background: linear-gradient(to bottom, #475569, #334155);
  border-left: 1px solid #64748b;
  border-right: 1px solid #64748b;
}

.monitor-base {
  width: 170px;
  height: 8px;
  background: #334155;
  border-radius: 4px 4px 0 0;
  border: 1px solid #475569;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* --- 2. Smartphone Mobile (Escala Real de Celular) --- */
.device-phone {
  width: 280px;
}

.phone-bezel {
  width: 280px;
  height: 520px;
  background: #0f172a;
  border: 4px solid #334155;
  border-radius: 38px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 6px;
  box-sizing: border-box;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 14px;
  background: #000000;
  border-radius: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.phone-camera {
  width: 5px;
  height: 5px;
  background: #1e293b;
  border-radius: 50%;
}

.phone-speaker {
  width: 22px;
  height: 3px;
  background: #334155;
  border-radius: 2px;
}

.phone-screen {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fef9f1;
  border-radius: 30px;
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-screen-inner {
  width: 268px;
  position: relative;
  overflow: hidden;
}

.device-iframe-mobile {
  width: 375px;
  height: 100%;
  min-height: 800px;
  border: none;
  transform: scale(0.714);
  /* 268 / 375 = 0.714 */
  transform-origin: top left;
  display: block;
}

.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  z-index: 10;
}

/* ── Modal Footer — light ── */
.send-modal-footer {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  flex-shrink: 0;
  gap: 10px;
}

.send-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.send-status-msg {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

/* ── Segmented Switch: Manual vs CSV — light ── */
.send-mode-segmented {
  display: flex;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.send-mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.send-mode-tab:hover {
  color: #374151;
}

.send-mode-tab.active {
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  border-color: #e5e7eb;
}

/* ── Bulk Stats Card — light ── */
.bulk-stats-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bulk-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bulk-stat-lbl {
  font-size: 11.5px;
  color: #6b7280;
}

.bulk-stat-val {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  font-family: var(--font-mono);
}

/* ========================================================
   Banner de Identificação do Contato Atual no Preview
   ======================================================== */
.modal-preview-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.bulk-preview-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
  padding: 4px 12px;
  min-width: 440px;
}

.bulk-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  width: 86px;
  justify-content: space-between;
}

.bulk-banner-divider {
  width: 1px;
  height: 16px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.bulk-preview-contact-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  flex: 1;
  min-width: 0;
}

.bulk-contact-tag {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.bulk-contact-name-wrapper {
  max-width: 150px;
  min-width: 80px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-contact-name-wrapper strong {
  color: #0f172a;
  font-weight: 600;
}

.bulk-contact-lang-badge {
  background: #f0fdf4;
  color: #15803d;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #bbf7d0;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.bulk-contact-email {
  color: #64748b;
  font-size: 10.5px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-nav-btn {
  background: #ffffff;
  border: 1px solid #c8c8c8;
  color: #444444;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.bulk-nav-btn:hover {
  background: #f1f5f9;
  color: #16a34a;
  border-color: #16a34a;
}

.bulk-pagination-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  font-family: var(--font-mono);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  display: inline-block;
}

/* ========================================================
   Botão Hold 5s com Animação de Carregamento & Bubble Feed
   ======================================================== */
/* Oculta scrollbars nos mockups desktop e mobile mantendo rolagem livre */
.monitor-screen,
.phone-screen {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.monitor-screen::-webkit-scrollbar,
.phone-screen::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ── Table row selection highlight — light ── */
/* Send review card — light redesign */
.send-review-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.send-review-header {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

.send-review-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 10px;
}

.send-review-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.send-review-lbl {
  font-size: 9.5px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.send-review-val {
  font-size: 11.5px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.send-review-msg {
  font-weight: 400;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: #ffffff;
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid #e5e7eb;
  margin-top: 2px;
}

.recipients-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.recipients-table tbody tr:hover td {
  background: #f9fafb;
}

.recipients-table tbody tr.active-preview-row td {
  background: #f0fdf4 !important;
}

.recipients-table tbody tr.active-preview-row td:first-child {
  border-left: 2px solid #45b96f;
  padding-left: 8px;
}

/* ── Cancel button inside send modal — light ── */
#btn-cancel-send {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  font-weight: 500;
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

#btn-cancel-send:hover {
  background: #f9fafb;
}

/* ── Send Hold Wrapper & Console de Disparo (50vh, Sem Pills) ── */
.send-hold-wrapper {
  position: relative;
  display: inline-flex;
}

.send-hold-bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 500px;
  max-width: 92vw;
  height: 50vh;
  min-height: 380px;
  max-height: 520px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.16), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.send-hold-bubble.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.shb-caret {
  position: absolute;
  bottom: -6px;
  right: 48px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  transform: rotate(45deg);
}

/* Header do Console */
.shb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  flex-shrink: 0;
}

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

.shb-console-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.06em;
}

.shb-status-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.shb-timer-box {
  display: flex;
  align-items: center;
  gap: 5px;
}

.shb-timer-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #64748b;
  font-weight: 600;
}

.shb-countdown {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 2px;
}

/* Card Técnico do Remetente & Assunto */
.shb-seller-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 8px 10px;
  flex-shrink: 0;
}

.shb-seller-avatar-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 3px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  flex-shrink: 0;
  background: #08253e;
}

.shb-seller-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shb-seller-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shb-seller-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.shb-seller-name {
  font-size: 12px;
  color: #0f172a;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shb-seller-role-badge {
  font-size: 9px;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.shb-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
}

.shb-meta-key {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.shb-meta-val {
  font-size: 10.5px;
  color: #334155;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Banner de Cancelamento / Grace Period (5s) */
.shb-grace-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 3px;
  padding: 7px 10px;
  flex-shrink: 0;
  gap: 8px;
}

.shb-grace-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.shb-grace-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #991b1b;
  letter-spacing: 0.03em;
}

.shb-grace-title strong {
  color: #dc2626;
  font-size: 12px;
}

.shb-grace-sub {
  font-size: 10px;
  color: #b91c1c;
}

.shb-grace-abort-btn {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #b91c1c;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.12s ease;
  flex-shrink: 0;
}

.shb-grace-abort-btn:hover {
  background: #b91c1c;
}

/* Fila / Tabela de Destinatários */
.shb-feed-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #ffffff;
}

.shb-feed-header-table {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.shb-th-ordem { width: 28px; flex-shrink: 0; }
.shb-th-lang { width: 34px; flex-shrink: 0; }
.shb-th-email { flex: 1; min-width: 0; }
.shb-th-name { width: 90px; flex-shrink: 0; }
.shb-th-preset { width: 68px; text-align: right; flex-shrink: 0; }

.shb-feed-container {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  min-height: 0;
}

.shb-feed-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.shb-feed-item {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  border-bottom: 1px solid #f8fafc;
  font-family: var(--font-mono);
  font-size: 10.5px;
  transition: background 0.1s ease;
  box-sizing: border-box;
}

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

.shb-feed-item.active-item {
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  padding-left: 5px;
}

.shb-cell-ordem {
  width: 28px;
  font-size: 9.5px;
  color: #94a3b8;
  flex-shrink: 0;
}

.shb-cell-lang {
  width: 34px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.shb-feed-flag {
  width: 15px;
  height: 10px;
  object-fit: cover;
  border-radius: 1px;
}

.shb-cell-email {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shb-cell-name {
  width: 90px;
  color: #64748b;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.shb-cell-preset {
  width: 68px;
  text-align: right;
  font-size: 9.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.shb-cell-preset.sample {
  color: #2563eb;
}

.shb-cell-preset.prospect {
  color: #b45309;
}

/* Barra Inferior Técnica */
.shb-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #64748b;
  flex-shrink: 0;
}

.shb-bottom-stat strong {
  color: #0f172a;
}


/* ── Hold 5s Send Button (Verde Profissional) ── */
.btn-hold-send {
  position: relative;
  overflow: hidden;
  background: #16a34a;
  border: 1px solid #15803d;
  color: #ffffff;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 220px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.15s ease;
}

.btn-hold-send:hover {
  background: #15803d;
  border-color: #166534;
}

.btn-hold-send:active {
  transform: scale(0.99);
}

.btn-hold-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
  pointer-events: none;
}

.btn-hold-send.holding {
  border-color: #14532d;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.3);
}

.btn-hold-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.btn-hold-icon {
  color: #ffffff;
  transition: transform 0.15s ease;
}

.btn-hold-send.holding .btn-hold-icon {
  transform: rotate(-10deg);
}

.btn-hold-send.sending {
  background: #15803d !important;
  border-color: #166534;
  cursor: not-allowed;
}

@keyframes spinIcon {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn-hold-send.sending .btn-hold-icon {
  animation: spinIcon 0.85s linear infinite;
}

/* App Footer */
.footer {
  height: var(--footer-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-item span {
  font-family: var(--font-mono);
  color: var(--text);
}

.footer-brand-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================
   Email Preview Stage & Container (Centered & Responsive)
   ======================================================== */
.preview-stage {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #eaecf0;
  padding: 24px 16px;
  position: relative;
  min-height: 0;
  box-sizing: border-box;
}

.preview-container {
  position: relative;
  background: transparent;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  transition: width 0.15s ease;
  margin: 0 auto;
  flex-shrink: 0;
  border-radius: 4px;
  width: 600px;
  max-width: 100%;
}

.preview-container.email {
  width: 600px;
  max-width: 100%;
}

.preview-container.desktop {
  width: 100%;
  max-width: 100%;
}

.preview-container.tablet {
  width: 768px;
  max-width: 100%;
}

.preview-container.mobile {
  width: 375px;
  max-width: 100%;
}

#preview-frame {
  width: 100%;
  border: none;
  display: block;
  background: #ffffff;
  border-radius: 4px;
  height: 600px;
}


/* ========================================================
   Preview Skeleton Loading (Light Mode)
   ======================================================== */
.preview-skeleton-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 600px;
  background: #f8fafc;
  padding: 16px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px;
}

.preview-skeleton-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton-card-large {
  width: 100%;
  height: 100%;
  min-height: 580px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite linear;
  border: 1px solid #e2e8f0;
}

/* ========================================================
   TELA DE BLOQUEIO / AUTENTICAÇÃO (SEAMLESS 100% SÓLIDA)
   ======================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: #090d16;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overflow: hidden;
}

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

.auth-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.auth-brand-img {
  width: 100%;
  height: auto;
  display: block;
}

/* HDALP em primeiro plano, pequeno em baixo no meio */
.auth-bottom-logo {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.auth-hdalp-small {
  width: 85px;
  height: auto;
  opacity: 0.65;
  filter: brightness(1.7);
  pointer-events: none;
}


.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.auth-label {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.3px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 9px 11px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #f8fafc;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 4px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.auth-input::placeholder {
  color: #475569;
}

.auth-input:focus {
  border-color: #45b96f;
}

.auth-pwd-toggle {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-pwd-toggle:hover {
  color: #94a3b8;
}

.auth-error-banner {
  color: #ef4444;
  font-size: 11.5px;
  font-weight: 500;
  margin-top: -2px;
}

.auth-submit-btn {
  background: #45b96f;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  transition: background 0.15s ease;
}

.auth-submit-btn:hover {
  background: #38a15e;
}

.auth-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}



.header-brand-img {
  height: 20px;
  width: auto;
  display: block;
}

/* Header User Profile Widget (De-slopped & Clean) */
.header-user-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-role-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #1e293b;
  color: #94a3b8;
  border: none;
  font-family: var(--font-mono);
}

.user-role-tag.admin {
  background: rgba(69, 185, 111, 0.1);
  color: #45b96f;
  border-color: none;
}

.user-name-text {
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  border-color: #ef4444;
}