/* ================================================================
   CHANCE — mensagens.css
   Central de Mensagens — Light Workspace
   Complementa style.css. Não duplica variáveis globais.
================================================================ */

/* ── Layout base (Full-screen Web App) ───────────────────────── */
body.inbox-page {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

/* ── Global Header ───────────────────────────────────────────── */
.global-header {
  height: 90px;
  display: flex;
  align-items: center;
  /* padding-left alinha o logo com o texto "Mensagens" abaixo:
     compensa a margem do container (max-width 1440px centralizado)
     + o padding interno da sidebar (1rem) */
  padding-left: calc(max(0px, (100vw - 1440px) / 2) + 1rem);
  padding-right: 2rem;
  background: #ffffff;
  border-bottom: 1px solid #ebebeb; /* LINHA 1 — divisória única do header global */
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.global-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: #111827;
  font-weight: 700;
  font-size: 1.5rem;
  transition: opacity 0.15s;
}

.global-header__logo:hover { opacity: 0.72; }

.global-header__logo img {
  display: block;
  width: 44px;
  height: 44px;
}

/* ── App Container — centralizado, padrão SaaS/Airbnb ───────── */
.messages-app-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  height: calc(100vh - 90px);
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* ── Inbox Grid ──────────────────────────────────────────────── */
.inbox-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  grid-template-rows: 1fr;
  align-items: stretch;
  height: 100%;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.inbox-sidebar {
  background: #ffffff;
  border-right: 1px solid #ebebeb; /* LINHA 2 — divisa vertical sidebar ↔ main */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.inbox-sidebar__header {
  padding: 0 1rem;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  background: #ffffff;
}

/* Linha título + ícone lupa lado a lado */
.inbox-sidebar__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.inbox-sidebar__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* Botão ícone da lupa */
.inbox-sidebar__search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.inbox-sidebar__search-toggle svg {
  width: 20px;
  height: 20px;
}
.inbox-sidebar__search-toggle:hover,
.inbox-sidebar__search-toggle[aria-expanded="true"] {
  color: #50289f;
  background: #f0ebff;
}

/* Área colapsável do input */
.inbox-sidebar__search-collapse {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.24s ease, opacity 0.18s ease, margin-top 0.2s ease;
}
.inbox-sidebar__search-collapse.active {
  max-height: 56px;
  opacity: 1;
  margin-top: 0.75rem;
}

.inbox-sidebar__search {
  position: relative;
}

.inbox-sidebar__search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.inbox-sidebar__search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.inbox-sidebar__search-input:focus {
  border-color: #50289f;
}

/* ── Filtros de conversa (Todas / Não lidas) ─────────────────── */
.sidebar-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.625rem;
  flex-shrink: 0;
}

.sidebar-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid #d1d5db;
  background: transparent;
  color: #374151;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-filter-btn:hover {
  background: #f3f4f6;
  border-color: #6b7280;
}

.sidebar-filter-btn--active {
  background: #222222;
  color: #ffffff;
  border-color: #222222;
}

.sidebar-filter-btn--active:hover {
  background: #111111;
  border-color: #111111;
}

.inbox-sidebar__list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0.375rem 0;
}

/* ── Conversation Item ───────────────────────────────────────── */
.inbox-convo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.inbox-convo-item:hover {
  background: #f0ebff;
}

.inbox-convo-item--active {
  background: #e8e3f5;
  border-left: 5px solid #50289f;
}

/* Avatar — container compartilhado (foto ou inicial) */
.inbox-convo-item__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #50289f, #00c4cc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

/* Foto de perfil dentro do avatar */
.inbox-convo-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Legado — mantido para não quebrar cards já renderizados */
.inbox-convo-item__avatar--placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #50289f, #00c4cc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* ── Estado não lida ─────────────────────────────────────────── */
.inbox-convo-item.unread {
  background: #faf8ff;
}

.inbox-convo-item.unread .inbox-convo-item__name {
  font-weight: 700;
  color: #3b1f7a;
}

.inbox-convo-item.unread .inbox-convo-snippet {
  font-weight: 700;
  color: #3b1f7a;
}

/* Bolinha indicadora no canto superior direito do avatar */
.inbox-convo-item.unread .inbox-convo-item__avatar::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #50289f;
  border: 2px solid #f8f9fa;
}

.inbox-convo-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Linha topo: nome + data */
.inbox-convo-item__header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.inbox-convo-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.inbox-convo-time {
  font-size: 0.6875rem;
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Snippet — prévia truncada */
.inbox-convo-snippet {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.4;
}

.inbox-convo-item__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

/* ── Status Pills — pílulas de status na sidebar ────────────── */
.proposal-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.status-pendente      { background: #fef9c3; color: #854d0e; }
.status-em-negociacao { background: #dbeafe; color: #1d4ed8; }
.status-aceita        { background: #dcfce7; color: #15803d; }
.status-em-analise    { background: #ede9fe; color: #6d28d9; }
.status-em-revisao    { background: #ffedd5; color: #c2410c; }
.status-em-disputa    { background: #fee2e2; color: #b91c1c; }
.status-recusada      { background: #fee2e2; color: #b91c1c; }
.status-concluida     { background: #d1fae5; color: #065f46; }

/* ── Main Content ────────────────────────────────────────────── */
.inbox-main {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

/* Estado vazio */
.inbox-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem;
}

.inbox-empty-state__illustration {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f0ff, #e8fbfc);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.inbox-empty-state__heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.inbox-empty-state__description {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  max-width: 280px;
}

/* ── Main Header ─────────────────────────────────────────────── */
.inbox-main__header {
  min-height: 80px;
  padding: 1rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid #ebebeb; /* LINHA 3 — separa header do chat das mensagens */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Identidade do contato — avatar + nome */
.chat-header-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #50289f, #00c4cc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  overflow: hidden;
}

.chat-header-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Botões de ação ──────────────────────────────────────────── */
.inbox-main__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Botões de ação — base compartilhada ─────────────────────── */
.inbox-action-btn,
.btn-action-primary,
.btn-action-secondary,
.btn-action-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;   /* 8px 20px */
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s, transform 0.1s;
  line-height: 1;
}

.inbox-action-btn:active,
.btn-action-primary:active,
.btn-action-secondary:active,
.btn-action-danger:active { transform: scale(0.97); }

/* Primário — fundo roxo sólido */
.btn-action-primary {
  background: #50289f;
  color: #fff;
  border-color: #50289f;
}
.btn-action-primary:hover { opacity: 0.88; }

/* Secundário — outline neutro */
.btn-action-secondary {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}
.btn-action-secondary:hover { background: #f9fafb; }

/* Destrutivo — outline vermelho */
.btn-action-danger {
  background: #ffffff;
  color: #ef4444;
  border-color: #ef4444;
}
.btn-action-danger:hover { background: #fff5f5; }

/* Legado — aliases que apontam para o novo sistema */
.inbox-action-btn--accept  { background: #22c55e; color: #fff; border-color: #22c55e; }
.inbox-action-btn--accept:hover { opacity: 0.88; }
.inbox-action-btn--reject  { background: #fff; color: #ef4444; border-color: #ef4444; }
.inbox-action-btn--reject:hover { background: #fff5f5; }
.inbox-action-btn--deliver { background: linear-gradient(135deg, #50289f, #00c4cc); color: #fff; border-color: transparent; }
.inbox-action-btn--deliver:hover { opacity: 0.88; }

.inbox-action-btn:disabled,
.btn-action-primary:disabled,
.btn-action-secondary:disabled,
.btn-action-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ── Drawer — Deal Room (deslizante, posição fixa) ───────────── */
.drawer-panel {
  position: fixed;
  top: 90px;
  right: 0;
  width: 320px;
  height: calc(100vh - 90px);
  background: #ffffff;
  border-left: 1px solid #eaeaea;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  /* Visível somente com .drawer-open */
}

.drawer-panel.drawer-open {
  transform: translateX(0);
}

/* Cabeçalho interno da drawer */
.drawer-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #eaeaea;
  flex-shrink: 0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.drawer-panel__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
}

.drawer-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.drawer-panel__close:hover {
  color: #111827;
  background: #f3f4f6;
}

/* Backdrop invisível — mantém click-outside sem escurecer a tela */
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 199;
}
.drawer-backdrop.drawer-backdrop--visible {
  display: block;
}

/* Botão "Detalhes" no header do chat */
.btn-pill-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.btn-pill-outline:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}
.btn-pill-outline[aria-expanded="true"] {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #50289f;
}

/* Empty state dentro do painel direito */
.details-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  text-align: center;
}

.details-empty p {
  font-size: 0.8125rem;
  color: #c4c9d4;
  margin: 0;
  line-height: 1.5;
}

.details-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
}

/* ── Deal Room — Premium Dashboard Layout ─────────────────── */

.deal-hero {
  padding: 1.5rem;
  border-bottom: 1px solid #ebebeb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.deal-hero__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.deal-hero__valor {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}

.deal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #ebebeb;
  border-bottom: 1px solid #ebebeb;
  flex-shrink: 0;
}

.deal-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
}

.deal-meta-cell__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deal-meta-cell__value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

/* ── Resumo do acordo — lista de informações vitais da sidebar ─── */
.deal-summary {
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
  flex-shrink: 0;
}

.deal-summary__title {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.875rem;
}

.deal-summary__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.deal-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

/* Rótulo muted — mesma família de cor/peso dos hints do projeto */
.deal-summary__label {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
}

.deal-summary__value {
  margin: 0;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

/* ── Identificação da proposta (código + campanha) ─────────── */
.deal-id-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem 0;
  flex-wrap: wrap;
}

.deal-id-code {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  color: #50289f;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.deal-campaign-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── Partes envolvidas ──────────────────────────────────────── */
.deal-parties {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #ebebeb;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.deal-parties__title {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.125rem;
}

.deal-party-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.deal-party-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #e0f9fa);
  border: 1.5px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #50289f;
  flex-shrink: 0;
}

.deal-party-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.deal-party-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-party-role {
  font-size: 0.6875rem;
  color: #6b7280;
  font-weight: 400;
}

.deal-actions-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 1.5rem;
  border-top: 1px solid #ebebeb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.deal-links {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-top: 0.25rem;
}

/* Seção genérica */
.details-section {
  padding: 1rem 0;
  border-bottom: 1px solid #eaeaea;
}

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

.details-section__title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

/* Card de resumo — linhas chave/valor */
.details-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.details-row__label {
  font-size: 0.8125rem;
  color: #6b7280;
  flex-shrink: 0;
}

.details-row__value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
  text-align: right;
  word-break: break-word;
}

/* Ações — botões empilhados */
.details-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.details-actions .btn-action-primary,
.details-actions .btn-action-secondary,
.details-actions .btn-action-danger {
  width: 100%;
  justify-content: center;
}

/* Link de conteúdo entregue */
.details-entrega-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #50289f;
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}
.details-entrega-link:hover { text-decoration: underline; }

/* Texto de espera — influenciador aguardando empresa */
.details-waiting-text {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  font-style: italic;
  padding: 0.75rem 0;
  margin: 0;
}

/* Seção de links discretos */
.details-section--links {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.details-link {
  font-size: 0.8125rem;
  color: #6b7280;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.details-link:hover { color: #111827; }

.details-link--warn { color: #ef4444; }
.details-link--warn:hover { color: #c53030; }

/* ── Botão pill "Pedir ajuda" no rodapé do painel de detalhes ── */
.details-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(80, 40, 159, 0.2);
  background: #fff;
  color: #50289F;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.details-help-btn:hover {
  background: #50289F;
  border-color: #50289F;
  color: #fff;
  box-shadow: 0 4px 14px rgba(80, 40, 159, 0.22);
}

/* ── Formulário de entrega (dentro do painel direito) ────────── */
.inbox-deliver-form {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.inbox-deliver-form--open {
  display: flex;
}

.inbox-deliver-form__input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #50289f;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-family: inherit;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}

.inbox-deliver-form__submit {
  padding: 0.5rem 1rem;
  background: #50289f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.15s;
  width: 100%;
}

.inbox-deliver-form__submit:hover { opacity: 0.88; }
.inbox-deliver-form__submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Área de mensagens ───────────────────────────────────────── */
.inbox-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  background: #ffffff;
}

/* Wrapper de linha — ocupa 100% da largura para alinhamento correto */
.inbox-messages .chat-msg.chat-modal__bubble {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  align-self: stretch !important;
}

.inbox-messages .msg-own {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-end !important;
  width: 100% !important;
  background: transparent !important;
  color: inherit !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.inbox-messages .msg-other {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  width: 100% !important;
  background: transparent !important;
  color: inherit !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ── Bolha ── */
.inbox-messages .chat-balao {
  width: fit-content !important;
  max-width: 82% !important;
  padding: 0.625rem 1rem !important;           /* 10px 16px */
  border-radius: 16px 16px 16px 4px !important;
  background: #f3f4f6 !important;
  color: #111827 !important;
  font-size: 0.9375rem !important;
  line-height: 1.5 !important;
  word-break: break-word !important;
}

/* Mensagens enviadas (Dono) — alinhadas à direita */
.inbox-messages .msg-own .chat-balao {
  background: linear-gradient(135deg, #50289f, #6b3fbd) !important;
  color: #ffffff !important;
  border-radius: 16px 16px 4px 16px !important;
  margin-left: auto !important;
}

/* Mensagens recebidas (Outro) — alinhadas à esquerda */
.inbox-messages .msg-other .chat-balao {
  margin-right: auto !important;
}

/* Texto dentro da bolha — zero margem, zero fundo */
.inbox-messages .chat-balao p {
  margin: 0;
  background: transparent;
}

/* Imagem anexada */
.inbox-messages .chat-balao img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

/* Timestamp */
.inbox-messages .chat-modal__bubble-meta {
  font-size: 0.6875rem;
  opacity: 0.55;
  margin-top: 0.25rem;
  margin-bottom: 0;
  text-align: right;
  background: transparent;
}

/* ── Mensagem de sistema (timeline / evento) ─────────────────── */
.message-system-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0.75rem 0;
}

.timeline-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  padding: 5px 14px;
  border-radius: 20px;
  text-align: center;
  max-width: 88%;
}

.timeline-event-pill svg {
  flex-shrink: 0;
  color: #6b7280;
}

/* ── Typing indicator — bolha "Digitando..." ─────────────────── */
.typing-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.625rem 1rem;
  background: #f3f4f6;
  border-radius: 16px 16px 16px 4px;
  width: fit-content;
  margin-bottom: 0.25rem;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%            { opacity: 1;   transform: translateY(-5px); }
}

/* Sidebar — snippet em modo "digitando" */
.inbox-convo-snippet.is-typing {
  color: #50289f;
  font-style: italic;
  font-weight: 500;
}

/* Estados de carregamento / vazio / erro */
.inbox-loading,
.inbox-empty-msg,
.inbox-error-msg {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  padding: 2rem 0;
  font-style: italic;
  align-self: center;
}

/* ── Composer (fixo na base — estilo iMessage) ───────────────── */
.inbox-composer {
  padding: 0.75rem 1rem;
  background: #ffffff;
  flex-shrink: 0;
}

.inbox-composer__preview {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f3f4f6;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  color: #666;
}

.inbox-composer__preview--open {
  display: flex;
}

.inbox-composer__preview-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-composer__preview-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.inbox-composer__row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.inbox-composer__attach {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
  transition: color 0.15s;
}
.inbox-composer__attach:hover { color: #50289f; }

/* Textarea estilo iMessage: fundo cinza claro, bordas suaves */
.inbox-composer__textarea {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: none;
  min-height: 42px;
  max-height: 140px;
  overflow-y: auto;
  outline: none;
  line-height: 1.45;
  background: #f4f4f5;
  color: #111827;
  transition: background 0.15s;
  box-sizing: border-box;
}

.inbox-composer__textarea:focus {
  background: #eeecf8;
}

.inbox-composer__textarea::placeholder { color: #6b7280; }

.inbox-composer__textarea:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.inbox-composer__send {
  background: linear-gradient(135deg, #50289f, #00c4cc);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}

.inbox-composer__send:hover  { opacity: 0.88; }
.inbox-composer__send:active { transform: scale(0.94); }
.inbox-composer__send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Botão toggle mobile ─────────────────────────────────────── */
.inbox-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1rem;
  z-index: 200;
  background: #50289f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(80, 40, 159, 0.4);
}

/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet landscape — layout já é 2 colunas; drawer funciona normalmente */

@media (max-width: 768px) {
  .messages-app-container {
    box-shadow: none;
  }

  .inbox-layout {
    grid-template-columns: 1fr;
  }

  .inbox-sidebar {
    position: fixed;
    top: 90px;
    left: 0;
    width: 300px;
    height: calc(100vh - 90px);
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .inbox-sidebar--open {
    transform: translateX(0);
  }

  .inbox-sidebar-toggle {
    display: flex;
  }

  .inbox-main {
    height: 100%;
  }

  .inbox-main__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .inbox-main__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .inbox-messages        { padding: 1rem; }
  .inbox-main__header    { padding: 0.875rem 1rem; }
  .inbox-composer        { padding: 0.625rem 0.75rem; }
  .inbox-deliver-form    { padding: 0.75rem 1rem; }
}

/* ================================================================
   Card de Entrega Oficial — .message-delivery-card
   Renderizado no chat quando tipo === 'entrega'.
   Substitui a bolha comum; ocupa largura maior para destaque visual.
================================================================ */

.message-delivery-card-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0;
}

.message-delivery-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1.5px solid #50289f;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(80, 40, 159, 0.10);
}

/* Faixa de topo roxa — identidade visual da entrega */
.message-delivery-card__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: linear-gradient(90deg, #50289f 0%, #6b3fc0 100%);
  color: #ffffff;
  padding: 0.75rem 1rem;
}

.message-delivery-card__icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.message-delivery-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.message-delivery-card__subtitle {
  font-size: 0.6875rem;
  font-weight: 400;
  opacity: 0.80;
  margin-top: 1px;
}

/* Corpo do card */
.message-delivery-card__body {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Linha do link entregue */
.message-delivery-card__link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3f0fa;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
}

.message-delivery-card__link-row svg {
  flex-shrink: 0;
  color: #50289f;
}

.message-delivery-card__link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #50289f;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.message-delivery-card__link:hover {
  text-decoration: underline;
}

/* Área de ações (empresa) ou status de espera (influenciador) */
.message-delivery-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.message-delivery-card__btn-approve {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  flex: 1;
  justify-content: center;
}

.message-delivery-card__btn-approve:hover { opacity: 0.88; }

.message-delivery-card__btn-revision {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: #50289f;
  border: 1.5px solid #50289f;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  flex: 1;
  justify-content: center;
}

.message-delivery-card__btn-revision:hover {
  background: #f3f0fa;
}

/* Status de espera — visível para o influenciador */
.message-delivery-card__waiting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  font-style: italic;
}

/* Timestamp discreto */
.message-delivery-card__ts {
  font-size: 0.6875rem;
  color: #6b7280;
  text-align: right;
}

/* ── Botão "Fazer Entrega" no composer ───────────────────────── */
.inbox-composer__deliver-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  background: linear-gradient(90deg, #50289f 0%, #6b3fc0 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.inbox-composer__deliver-btn:hover { opacity: 0.88; }

/* Área que contém o botão de entrega — separada visualmente do row principal */
.inbox-composer__deliver-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.375rem 0 0;
  border-top: 1px solid #eaeaea;
  margin-top: 0.375rem;
}

/* ================================================================
   Modal — Solicitar Revisão
================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.18s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  animation: modalSlideUp 0.2s cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-box__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}

.modal-box__icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.modal-box__titulo {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  flex: 1;
}

.modal-box__fechar {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #6b7280;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.modal-box__fechar:hover {
  color: #374151;
  background: #f3f4f6;
}

.modal-box__descricao {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.modal-box__textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 108px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #111827;
  line-height: 1.5;
  transition: border-color 0.15s;
  outline: none;
}
.modal-box__textarea:focus {
  border-color: #50289f;
  box-shadow: 0 0 0 3px rgba(80, 40, 159, 0.12);
}
.modal-box__textarea::placeholder { color: #6b7280; }

.modal-box__char-count {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: right;
  margin: 0.375rem 0 1.25rem;
}

.modal-box__footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-box__btn-cancelar {
  padding: 0.625rem 1.25rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.modal-box__btn-cancelar:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.modal-box__btn-enviar {
  padding: 0.625rem 1.375rem;
  border: none;
  border-radius: 8px;
  background: #50289f;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}
.modal-box__btn-enviar:hover  { background: #3f1f7e; }
.modal-box__btn-enviar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================================================================
   System Action Card — Revisão Solicitada (centralizado, Premium)
================================================================ */

.system-action-container {
  display: flex;
  justify-content: center;
  padding: 1rem 1.5rem;
}

.system-action-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 3px solid #6b7280; /* sobrescrito pelos modificadores abaixo */
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Modificadores semânticos de cor */
.system-action-card.system-warning { border-top-color: #ea580c; }
.system-action-card.system-warning .system-action-header__title { color: #ea580c; }
.system-action-card.system-warning .system-action-quote {
  background: #fff7ed;
  border-left-color: #ea580c;
}

.system-action-card.system-success { border-top-color: #16a34a; }
.system-action-card.system-success .system-action-header__title { color: #16a34a; }
.system-action-card.system-success .system-action-quote {
  background: #f0fdf4;
  border-left-color: #16a34a;
}

.system-action-card.system-info { border-top-color: #2563eb; }
.system-action-card.system-info .system-action-header__title { color: #2563eb; }
.system-action-card.system-info .system-action-quote {
  background: #eff6ff;
  border-left-color: #2563eb;
}

/* ── Card de Briefing Inicial — paleta neutra slate ─────────────── */
.system-action-card.system-briefing-card {
  background: #f8fafc;
  border-top-color: #475569;
  margin-bottom: 0.5rem; /* respiro extra antes da primeira mensagem real */
}
.system-action-card.system-briefing-card .system-action-header__title {
  color: #475569;
}

.system-briefing-card__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1rem;
  row-gap: 0.375rem;
  margin: 0.25rem 0 0;
  padding: 0.625rem 0.875rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.system-briefing-card__term {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  align-self: center;
}

.system-briefing-card__desc {
  font-size: 0.875rem;
  color: #1f2937;
  font-weight: 500;
  margin: 0;
  word-break: break-word;
}

/* Cabeçalho: ícone + título */
.system-action-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.system-action-header__icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.system-action-header__title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280; /* cor padrão; sobrescrita pelos modificadores */
}

/* Linha descritiva */
.system-action-desc {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 0.625rem;
}

/* Bloco de citação */
.system-action-quote {
  border-left: 3px solid #6b7280;
  border-radius: 0 6px 6px 0;
  padding: 0.625rem 0.875rem;
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-style: italic;
  color: #374151;
  line-height: 1.55;
}

/* Timestamp */
.system-action-ts {
  font-size: 0.6875rem;
  color: #6b7280;
  text-align: right;
  margin: 0;
}

/* ================================================================
   Aviso de limite de revisões atingido
================================================================ */

/* Aviso de limite de revisões atingido */
.details-revision-limit-warning {
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid rgba(239, 68, 68, 0.2);
}


/* ================================================================
   NEGOCIAÇÃO PINGUE-PONGUE — Sprint 7
   Cards de contraproposta intercalados no chat + modal de
   contraproposta. Reaproveita .system-action-card como base.
================================================================ */

.card-negociacao {
  border-left: 3px solid #50289F; /* Roxo Chance — fluxo de negociação */
}

.card-negociacao--empreendedor {
  border-left-color: #50289F;
}

.card-negociacao--influenciador {
  border-left-color: #00C4CC; /* Ciano Chance */
}

.card-negociacao--estado {
  background: linear-gradient(180deg, rgba(80,40,159,0.04) 0%, rgba(255,255,255,1) 60%);
  border-left-color: #50289F;
}

.card-negociacao__list {
  margin-top: 0.5rem;
  margin-bottom: 0.625rem;
}

.card-negociacao__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.card-negociacao__btn {
  appearance: none;
  border: none;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  line-height: 1.2;
}

.card-negociacao__btn--primary {
  background: #50289F;
  color: #fff;
}
.card-negociacao__btn--primary:hover { background: #3f1f80; transform: translateY(-1px); }

.card-negociacao__btn--secondary {
  background: #fff;
  color: #50289F;
  border: 1.5px solid #50289F;
}
.card-negociacao__btn--secondary:hover { background: rgba(80,40,159,0.08); }

.card-negociacao__btn--ghost {
  background: transparent;
  color: #6b7280;
  border: 1.5px solid #d1d5db;
}
.card-negociacao__btn--ghost:hover { background: #f9fafb; color: #374151; }

/* Chip de lances restantes */
.chip-lances {
  display: inline-block;
  padding: 0.3125rem 0.75rem;
  background: rgba(0,196,204,0.12);
  color: #00838a;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.25rem 0 0.5rem;
}

/* ================================================================
   Modal — Fazer Contraproposta
================================================================ */

.modal-box--contra {
  max-width: 480px;
}

.contra-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0.5rem 0 1rem;
}

.contra-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}

.contra-form__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.02em;
}

.contra-form__input,
.contra-form__textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.contra-form__input:focus,
.contra-form__textarea:focus {
  outline: none;
  border-color: #50289F;
  box-shadow: 0 0 0 3px rgba(80,40,159,0.12);
}

.contra-form__input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.contra-form__textarea { resize: vertical; min-height: 70px; }

.contra-form__prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.contra-form__prefix {
  position: absolute;
  left: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #50289F;
  pointer-events: none;
}

.contra-form__input--prefixed {
  padding-left: 2.25rem;
}

.contra-form__hint {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  line-height: 1.4;
}

.contra-form__error {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: rgba(239,68,68,0.08);
  color: #dc2626;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Bottom sheet em telas pequenas */
@media (max-width: 480px) {
  .modal-box--contra {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    margin: auto 0 0;
  }
}

/* Resumo de uma linha dentro do header do card de lance — leitura rápida */
.card-negociacao__resumo {
  flex: 1 0 100%;
  margin: 0.5rem 0 0;
  padding: 0.4375rem 0.75rem;
  background: rgba(80,40,159,0.06);
  color: #3d1f7c;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.card-negociacao--influenciador .card-negociacao__resumo {
  background: rgba(0,196,204,0.10);
  color: #006268;
}

/* ================================================================
   CARD UNIFICADO DE NEGOCIAÇÃO — Sprint 7.2
   Um card único substitui o trio (briefing + lance + estado).
   Estrutura: eyebrow + título + grid 2x2 + footer (ações).
================================================================ */

.card-neg-unificado {
  /* Largura consistente em todos os modos — sem isso o cartão se ajustava
     ao conteúdo (justify-content: center no .system-action-container) e a
     view do influenciador ficava bem mais estreita que a do empreendedor. */
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #50289F;
  border-radius: 12px;
  padding: 1.25rem 1.375rem;
  margin: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(80, 40, 159, 0.04);
}

/* Modificadores por modo (cor da borda lateral) */
.card-neg-unificado--aceita                   { border-left-color: #16a34a; }
.card-neg-unificado--encerrada,
.card-neg-unificado--recusada,
.card-neg-unificado--limite_atingido          { border-left-color: #dc2626; }
.card-neg-unificado--oferta_concreta_minha_vez,
.card-neg-unificado--pedido_inicial_minha_vez { border-left-color: #50289F; }
.card-neg-unificado--oferta_concreta_aguardando,
.card-neg-unificado--pedido_inicial_aguardando { border-left-color: #00C4CC; }

/* ── Header ─────────────────────────────────────────────────── */
.card-neg-unificado__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.card-neg-unificado__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #50289F;
}
.card-neg-unificado--aceita .card-neg-unificado__eyebrow      { color: #16a34a; }
.card-neg-unificado--encerrada .card-neg-unificado__eyebrow,
.card-neg-unificado--recusada .card-neg-unificado__eyebrow,
.card-neg-unificado--limite_atingido .card-neg-unificado__eyebrow { color: #dc2626; }
.card-neg-unificado--oferta_concreta_aguardando .card-neg-unificado__eyebrow,
.card-neg-unificado--pedido_inicial_aguardando .card-neg-unificado__eyebrow { color: #006268; }

.card-neg-unificado__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

/* ── Grid 2x2 de detalhes ───────────────────────────────────── */
.card-neg-unificado__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.card-neg-unificado__cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.card-neg-unificado__cell-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}
.card-neg-unificado__cell-value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}
.card-neg-unificado__cell--destaque .card-neg-unificado__cell-value {
  font-size: 1.125rem;
  color: #50289F;
  font-weight: 700;
}

/* ── Quote (mensagem opcional do último lance) ───────────────── */
.card-neg-unificado__quote {
  margin: 0 0 1rem;
  padding: 0.625rem 0.875rem;
  border-left: 3px solid #d1d5db;
  border-radius: 0 6px 6px 0;
  background: #f9fafb;
  font-size: 0.875rem;
  font-style: italic;
  color: #374151;
  line-height: 1.5;
}

/* ── Footer + ações ─────────────────────────────────────────── */
.card-neg-unificado__footer {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f3f4f6;
}
.card-neg-unificado__actions-row {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.card-neg-unificado__actions-row .card-neg-unificado__btn {
  flex: 1 1 0;
  min-width: 0;
}

.card-neg-unificado__btn {
  appearance: none;
  border: none;
  padding: 0.75rem 1.125rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  line-height: 1.2;
  text-align: center;
}
.card-neg-unificado__btn:hover { transform: translateY(-1px); }

.card-neg-unificado__btn--primary {
  background: #50289F; color: #fff;
}
.card-neg-unificado__btn--primary:hover { background: #3f1f80; box-shadow: 0 4px 12px rgba(80,40,159,0.25); }

.card-neg-unificado__btn--secondary {
  background: #fff; color: #50289F; border: 1.5px solid #50289F;
}
.card-neg-unificado__btn--secondary:hover { background: rgba(80,40,159,0.06); }

.card-neg-unificado__btn--danger {
  background: #fff; color: #dc2626; border: 1.5px solid #fca5a5;
}
.card-neg-unificado__btn--danger:hover { background: rgba(220,38,38,0.06); border-color: #dc2626; }

.card-neg-unificado__btn--wide-primary {
  background: #50289F; color: #fff;
  width: 100%;
  padding: 0.875rem 1rem;
}
.card-neg-unificado__btn--wide-primary:hover { background: #3f1f80; box-shadow: 0 4px 12px rgba(80,40,159,0.25); }

/* Link "Encerrar negociação" — discreto, alinhado à direita */
.card-neg-unificado__link-danger {
  align-self: flex-end;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.card-neg-unificado__link-danger:hover { color: #dc2626; }

/* Texto de "aguardando resposta" — bloco ciano (modos aguardando) */
.card-neg-unificado__waiting {
  margin: 0;
  padding: 0.625rem 0.875rem;
  background: rgba(0,196,204,0.08);
  border-radius: 6px;
  font-size: 0.875rem;
  color: #006268;
  line-height: 1.5;
}

/* Hint contextual roxo (modo pedido_inicial_minha_vez) — paridade visual
   com o bloco "aguardando" do outro lado: mesmo tamanho, cor temática. */
.card-neg-unificado__hint {
  margin: 0;
  padding: 0.625rem 0.875rem;
  background: rgba(80,40,159,0.06);
  border-radius: 6px;
  font-size: 0.875rem;
  color: #3d1f7c;
  line-height: 1.5;
}

/* ── Responsivo: grid colapsa em 1 coluna em telas pequenas ─── */
@media (max-width: 520px) {
  .card-neg-unificado {
    padding: 1rem 1rem;
  }
  .card-neg-unificado__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .card-neg-unificado__actions-row {
    flex-direction: column;
  }
  .card-neg-unificado__actions-row .card-neg-unificado__btn {
    flex: 1 1 100%;
  }
  .card-neg-unificado__link-danger {
    align-self: center;
  }
}

