/* ============================================================
   Cadastro de Agente RCS · Devyx
   Tema claro/escuro, layout responsivo em duas colunas.
   A cor de marca da Devyx está em --brand — troque aqui se mudar.
   ============================================================ */

:root {
  /* Marca Devyx (chrome do formulário) — marinho */
  --accent: #131a2b;
  --accent-ink: #ffffff;

  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f2f7;
  --border: #e2e4ee;
  --text: #1a1c2b;
  --text-soft: #5c6079;
  --text-mute: #8a8ea6;
  --danger: #d92d20;
  --success: #067647;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 22, 40, 0.04), 0 8px 28px rgba(20, 22, 40, 0.06);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Tokens do tema escuro.
   Aplicados em dois casos:
   1) Sistema no escuro E usuário não escolheu "light" manualmente;
   2) Usuário escolheu "dark" no botão (data-theme="dark").
   Os valores são idênticos nos dois blocos (paleta muda raramente). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f16;
    --surface: #171923;
    --surface-2: #1f2230;
    --border: #2b2e40;
    --text: #f2f3f8;
    --text-soft: #b0b3c6;
    --text-mute: #7c8099;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --accent: #c9d3ea;
    --accent-ink: #131a2b;
  }
}

:root[data-theme="dark"] {
  --bg: #0e0f16;
  --surface: #171923;
  --surface-2: #1f2230;
  --border: #2b2e40;
  --text: #f2f3f8;
  --text-soft: #b0b3c6;
  --text-mute: #7c8099;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  --accent: #c9d3ea;
  --accent-ink: #131a2b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

/* ---------- Alternador de tema ---------- */
.preview-head__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.06s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Ícone exibido conforme o tema efetivo.
   Padrão (claro): lua (clique -> escuro). Escuro: sol (clique -> claro). */
.icon-sun {
  display: none;
}
.icon-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}
:root[data-theme="dark"] .icon-sun {
  display: block;
}
:root[data-theme="dark"] .icon-moon {
  display: none;
}
:root[data-theme="light"] .icon-sun {
  display: none;
}
:root[data-theme="light"] .icon-moon {
  display: block;
}

@media (max-width: 940px) {
  .page {
    grid-template-columns: 1fr;
    padding: 28px 18px 48px;
    gap: 28px;
  }
}

/* ---------- Marca / cabeçalho ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  color: var(--text);
}

.brand__logo {
  height: 30px;
  width: auto;
  flex: none;
  display: block;
}

/* Alterna o logo conforme o tema efetivo (escuro no claro, branco no escuro) */
.brand__logo--dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo--light {
    display: none;
  }
  :root:not([data-theme="light"]) .brand__logo--dark {
    display: block;
  }
}
:root[data-theme="dark"] .brand__logo--light {
  display: none;
}
:root[data-theme="dark"] .brand__logo--dark {
  display: block;
}
:root[data-theme="light"] .brand__logo--light {
  display: block;
}
:root[data-theme="light"] .brand__logo--dark {
  display: none;
}

.brand__divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.brand__tag {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-mute);
}

@media (max-width: 460px) {
  .brand__divider,
  .brand__tag {
    display: none;
  }
}

.intro {
  margin-bottom: 32px;
}

.intro h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.intro p {
  margin: 0;
  color: var(--text-soft);
  max-width: 60ch;
}

.req-mark {
  color: var(--danger);
  font-weight: 600;
}

/* ---------- Fieldsets ---------- */
.fieldset {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 22px;
}

.fieldset__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.fieldset__num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}

.fieldset__head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.fieldset__head p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-mute);
}

/* ---------- Campos ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.grid .field {
  margin-bottom: 0;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
  min-height: 84px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-mute);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8ea6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
  cursor: pointer;
}

.hint {
  font-size: 12.5px;
  color: var(--text-mute);
  margin-top: 6px;
}

.error {
  font-size: 12.5px;
  color: var(--danger);
  margin: 6px 0 0;
  min-height: 0;
}

/* Status de otimização de imagem (logo/banner) */
.opt-status {
  font-size: 12px;
  margin: 6px 0 0;
  min-height: 0;
}
.opt-status.is-ok {
  color: var(--success);
}
.opt-status.is-working {
  color: var(--text-mute);
}
.opt-status.is-error {
  color: var(--danger);
}

/* Painel de confirmação da otimização */
.opt-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.opt-panel[hidden] {
  display: none;
}
.opt-panel__img {
  flex: none;
  height: 72px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: repeating-conic-gradient(
        rgba(128, 128, 128, 0.22) 0 25%,
        transparent 0 50%
      )
      0 0 / 14px 14px,
    var(--surface);
}
.opt-panel__body {
  flex: 1;
  min-width: 0;
}
.opt-panel__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.opt-panel__info {
  margin: 2px 0 9px;
  font-size: 12px;
  color: var(--text-mute);
}
.opt-panel__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-sm {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  padding: 7px 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.btn-sm--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-sm--primary:hover {
  filter: brightness(1.08);
}
.btn-sm--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-soft);
}
.btn-sm--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Modal de recorte ---------- */
.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 7, 12, 0.66);
  backdrop-filter: blur(2px);
}
.crop-modal[hidden] {
  display: none;
}
.crop-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.crop-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.crop-sub {
  margin: 4px 0 16px;
  font-size: 13px;
  color: var(--text-mute);
}
.crop-viewport {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #0c0d13;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.crop-viewport:active {
  cursor: grabbing;
}
.crop-img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
}
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
  background-position: 0 0;
}
.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 18px;
}
.crop-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}
.crop-zoom-ic {
  color: var(--text-mute);
  font-size: 18px;
  font-weight: 700;
  width: 14px;
  text-align: center;
}
.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Caixa de aviso (ex.: fluxo de aprovação da ABR) */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: var(--radius-sm);
}
.notice svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-top: 1px;
}
.notice p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
}

/* Estado inválido */
.field--invalid input,
.field--invalid textarea,
.field--invalid select {
  border-color: var(--danger);
}

.field--invalid input:focus,
.field--invalid textarea:focus,
.field--invalid select:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent);
}

/* ---------- Cor ---------- */
.color-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---------- Telefone (DDI + número mascarado) ---------- */
.phone-input {
  display: flex;
  gap: 8px;
}
.phone-ddi {
  flex: none;
  width: auto;
  min-width: 112px;
}
.phone-number {
  flex: 1;
  min-width: 0;
}

/* ---------- Ícone de ajuda (?) ---------- */
.help {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border-radius: 50%;
  border: 1px solid var(--text-mute);
  color: var(--text-mute);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}
.help:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.color-input input[type="color"] {
  flex: none;
  width: 46px;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.color-input input[type="text"] {
  flex: 1;
  text-transform: uppercase;
}

/* ---------- Arquivos ---------- */
input[type="file"] {
  width: 100%;
  font-size: 14px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: none;
  border-radius: 7px;
  padding: 7px 12px;
  margin-right: 12px;
  cursor: pointer;
}

/* ---------- Checkbox ---------- */
.field--check {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 22px;
}

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- Ações ---------- */
.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 13px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s, filter 0.15s, box-shadow 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-success {
  color: var(--success);
}

.footer {
  margin-top: 34px;
  color: var(--text-mute);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

/* ============================================================
   Coluna de preview
   ============================================================ */
.preview-sticky {
  position: sticky;
  top: 32px;
  /* Cor padrão do agente do CLIENTE (sobrescrita via JS ao escolher a cor).
     É independente do marinho da Devyx (--accent). */
  --brand: #5b4fe9;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.preview-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.preview-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.preview-tab {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mute);
  background: transparent;
  border: none;
  padding: 5px 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.preview-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.preview-devtheme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.preview-devtheme__label {
  font-size: 12.5px;
  color: var(--text-mute);
}

@media (max-width: 940px) {
  .preview-col {
    order: -1;
  }
  .preview-sticky {
    position: static;
  }
}

/* ============================================================
   Celular + telas RCS (mensagem / perfil)
   Paleta escura própria (escopo local), pois o RCS é exibido
   em tema escuro nas referências. --brand = cor do agente.
   ============================================================ */
.phone {
  --rcs-bg: #17131a;
  --rcs-elev: #221d26;
  --rcs-card: #2a242d;
  --rcs-text: #ece6ea;
  --rcs-soft: #b3aab2;
  --rcs-mute: #8b828b;
  --rcs-line: rgba(255, 255, 255, 0.08);
  --rcs-warm: #e6a173;
  --rcs-danger: #e2857a;
  --rcs-btn: color-mix(in srgb, var(--brand) 32%, #37313a);

  height: 720px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 9px solid #0a0a0c;
  border-radius: 40px;
  background: var(--rcs-bg);
  color: var(--rcs-text);
  box-shadow: var(--shadow);
}

/* Modo CLARO do aparelho (RCS light) */
.phone[data-theme="light"] {
  --rcs-bg: #ffffff;
  --rcs-elev: #f1f3f4;
  --rcs-card: #f3f4f6;
  --rcs-text: #1f1f1f;
  --rcs-soft: #5f6368;
  --rcs-mute: #80868b;
  --rcs-line: rgba(0, 0, 0, 0.1);
  --rcs-warm: #c2410c;
  --rcs-danger: #c5221f;
  --rcs-btn: var(--brand); /* círculo colorido, ícone branco */
}
/* No claro, o squircle branco do placeholder precisa de leve sombra p/ separar do fundo.
   (Logo com imagem transparente fica sem sombra, para não desenhar uma "caixa".) */
.phone[data-theme="light"] .rcs-logo:not(.rcs-logo--img) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

/* ---------- Barra de status ---------- */
.phone__statusbar {
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
}

.phone__sysicons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.phone__batt {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 11px;
  border: 1.4px solid currentColor;
  border-radius: 3px;
}
.phone__batt i {
  position: absolute;
  inset: 1.5px;
  right: 5px;
  background: currentColor;
  border-radius: 1px;
}
.phone__batt::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}

/* ---------- Navegação Android ---------- */
.phone__navbar {
  flex: none;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: var(--rcs-soft);
}
.phone__navbar svg {
  width: 19px;
  height: 19px;
}

/* ---------- Alternância de telas ---------- */
.rcs {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--rcs-bg);
}
.phone[data-screen="message"] .rcs--profile {
  display: none;
}
.phone[data-screen="profile"] .rcs--message {
  display: none;
}

/* ---------- Ícones e selos ---------- */
.rcs-ic {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}
.rcs-verified {
  width: 15px;
  height: 15px;
  display: block;
  flex: none;
}

/* ---------- Logo (squircle branco) ---------- */
.rcs-logo {
  background: transparent;
  color: var(--brand);
  border-radius: 26%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  font-weight: 800;
}
/* Fundo branco só no placeholder (inicial); com imagem fica transparente. */
.rcs-logo:not(.rcs-logo--img) {
  background: #fff;
}
.rcs-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rcs-logo--sm {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.rcs-logo--xs {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.rcs-logo--lg {
  width: 74px;
  height: 74px;
  font-size: 32px;
  border-radius: 24%;
}
.rcs-logo--banner {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

/* ===================== TELA MENSAGEM ===================== */
.rcs-appbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}
.rcs-appbar__back {
  color: var(--rcs-text);
}
.rcs-appbar__name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
}
.rcs-appbar__name .js-agent-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rcs-appbar__menu {
  color: var(--rcs-soft);
  width: 18px;
}

.rcs-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 12px 24px 14px;
}
.rcs-intro__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
}
.rcs-intro__name .rcs-verified {
  width: 16px;
  height: 16px;
}
.rcs-intro__desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--rcs-soft);
}

.rcs-divider {
  height: 1px;
  background: var(--rcs-line);
  margin: 2px 16px;
}
.rcs-conversation {
  flex: 1;
  min-height: 20px;
}

.rcs-unsub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 8px;
  padding: 10px 12px;
  background: var(--rcs-elev);
  border-radius: 12px;
}
.rcs-unsub p {
  margin: 0;
  flex: 1;
  font-size: 11.5px;
  color: var(--rcs-soft);
}
.rcs-unsub a {
  color: var(--rcs-warm);
  text-decoration: underline;
}
.rcs-unsub .rcs-ic {
  width: 15px;
  color: var(--rcs-mute);
}

.rcs-composer {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 12px;
}
.rcs-composer .rcs-ic {
  color: var(--rcs-soft);
}
.rcs-composer__field {
  flex: 1;
  background: var(--rcs-elev);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--rcs-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rcs-composer__mic {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
}
.rcs-composer__mic svg {
  width: 17px;
  height: 17px;
}

/* ===================== TELA PERFIL ===================== */
.rcs--profile {
  position: relative;
}
.rcs-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  background: transparent;
  transition: background 0.2s;
}
.rcs-topbar .rcs-ic {
  color: var(--rcs-text);
}
.rcs-topbar__id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}
.rcs-topbar.is-scrolled {
  background: var(--rcs-bg);
  border-bottom: 1px solid var(--rcs-line);
}
.rcs-topbar.is-scrolled .rcs-topbar__id {
  opacity: 1;
}

.rcs-profile__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rcs-banner {
  position: relative;
  height: 118px;
  background: var(--brand);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.rcs-banner__brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 18px;
}
.rcs-banner.has-hero {
  /* com imagem: sem cor por baixo, para PNG transparente não ganhar fundo */
  background-color: transparent;
}
.rcs-banner.has-hero .rcs-banner__brand {
  display: none;
}
.rcs-banner__name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.rcs-banner__tag {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10.5px;
  max-width: 62%;
}

.rcs-avatar {
  width: 84px;
  height: 84px;
  margin: -42px auto 0;
  position: relative;
  z-index: 2;
  border: 4px solid var(--rcs-bg);
  border-radius: 27%;
  font-size: 34px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
/* Com imagem (pode ser transparente): sem anel/sombra, para não virar "caixa". */
.rcs-avatar.rcs-logo--img {
  border-color: transparent;
  box-shadow: none;
}

.rcs-profile__name {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
  font-size: 17px;
}
.rcs-profile__name .rcs-verified {
  width: 17px;
  height: 17px;
}
.rcs-profile__desc {
  text-align: center;
  margin: 4px 22px 0;
  font-size: 12.5px;
  color: var(--rcs-soft);
}

.rcs-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 16px 12px 8px;
}
.rcs-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--rcs-soft);
}
.rcs-action__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rcs-btn);
  display: grid;
  place-items: center;
}
.rcs-action__btn svg {
  width: 20px;
  height: 20px;
}

/* Listas (info / menu) */
.rcs-info,
.rcs-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 0;
}
.rcs-menu {
  padding-top: 2px;
}
.rcs-info__card,
.rcs-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--rcs-card);
  padding: 12px 14px;
  border-radius: 5px;
}
.rcs-menu__item {
  align-items: center;
}
.rcs-info__card:first-child,
.rcs-menu__item:first-child {
  border-radius: 14px 14px 5px 5px;
}
.rcs-info__card:last-child,
.rcs-menu__item:last-child {
  border-radius: 5px 5px 14px 14px;
}
.rcs-info__card p,
.rcs-menu__item span {
  margin: 0;
  font-size: 13px;
  color: var(--rcs-text);
}
.rcs-info__card .soft {
  font-size: 11px;
  color: var(--rcs-mute);
  margin-top: 1px;
}
.rcs-info__card .rcs-ic,
.rcs-menu__item .rcs-ic {
  width: 20px;
  height: 20px;
  color: var(--rcs-soft);
  margin-top: 1px;
}
.rcs-info__card a {
  color: var(--rcs-warm);
  text-decoration: underline;
}
.rcs-g {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}
.js-phone,
.js-site,
.js-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.rcs-menu__item--danger span,
.rcs-menu__item--danger .rcs-ic {
  color: var(--rcs-danger);
}

.rcs-sending {
  margin: 6px 10px;
  padding: 12px 14px;
  background: var(--rcs-card);
  border-radius: 14px;
}
.rcs-sending__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--rcs-soft);
}
.rcs-sending__swap {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--rcs-warm);
}
.rcs-sending__swap .rcs-ic {
  width: 15px;
  height: 15px;
}
.rcs-sending__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.rcs-sending__row .rcs-ic {
  width: 20px;
  height: 20px;
  color: var(--rcs-soft);
}
.rcs-sending__row p {
  margin: 0;
  font-size: 13px;
  color: var(--rcs-text);
}
.rcs-sending__row .soft {
  font-size: 11px;
  color: var(--rcs-mute);
}

.rcs-disclaimer {
  padding: 12px 16px 20px;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--rcs-mute);
}
.rcs-disclaimer a {
  color: var(--rcs-warm);
  text-decoration: underline;
}

.preview-note {
  font-size: 12px;
  color: var(--text-mute);
  margin: 14px 2px 0;
  line-height: 1.5;
}
