:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: rgba(16, 185, 129, 0.15);
  --success: #10B981;
  --warning: #f59e0b;
  --danger: #EF4444;
  --gray-50: #0E0E15;
  --gray-100: #111118;
  --gray-200: #1A1A24;
  --gray-300: #2A2A3A;
  --gray-400: #6B7280;
  --gray-500: #9CA3AF;
  --gray-600: #D1D5DB;
  --gray-700: #E5E7EB;
  --gray-800: #F0FDF4;
  --gray-900: #FFFFFF;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.5), 0 4px 6px rgba(0,0,0,0.3);
}

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

html {
  font-family: var(--font-family);
}

body {
  font-family: var(--font-family);
  background: #0A0A0F;
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* Controles costumam ignorar a fonte do body no UA */
button,
input,
select,
textarea {
  font-family: inherit;
  background: var(--gray-200);
  color: var(--gray-800);
}

/* ====== HEADER ====== */
.header {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-300);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo span {
  color: var(--gray-700);
}

.header__logo-img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.header__sala-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.header__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.header__status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Header da sala: logo + título + ações */
.header--sala {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  row-gap: 0.65rem;
}

.header--sala .header__sala-info {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  order: 3;
  width: 100%;
}

@media (min-width: 720px) {
  .header--sala .header__sala-info {
    order: 0;
    width: auto;
    justify-content: flex-start;
    flex: 1 1 0;
    margin: 0 0.5rem;
  }
}

.header__sala-title {
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 280px);
}

@media (min-width: 720px) {
  .header__sala-title {
    max-width: min(28vw, 360px);
  }
}

.header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
  flex-shrink: 0;
}

.header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.header__nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.header__nav-link--btn {
  font-family: inherit;
  cursor: pointer;
  background: var(--gray-200);
}

.header__nav-link--muted:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.header__nav-link--cta {
  color: var(--gray-700);
  border-color: var(--gray-300);
  background: var(--gray-200);
}

.header__nav-link--cta:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.header__nav-sep {
  width: 1px;
  height: 1.1rem;
  background: var(--gray-200);
  margin: 0 0.15rem;
  flex-shrink: 0;
}

/* ====== TABS (Documento / Preview) ====== */
.doc-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.doc-tab {
  flex: 1;
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-500);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
  font-family: inherit;
}

.doc-tab:hover {
  color: var(--gray-700);
}

.doc-tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ====== PREVIEW IFRAME ====== */
.preview-container {
  display: none;
  flex: 1 1 0%;
  min-height: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.preview-container--active {
  display: flex;
  flex-direction: column;
}

/* Mesma “faixa” que .chat-header. padding vertical ≥ .btn--sm (2rem) + margem, senão o botão estoura e pode ser cortado */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  min-height: 3rem;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  overflow: visible;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  gap: 0.5rem;
}

.preview-toolbar__url {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-toolbar__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.preview-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--gray-50);
}

.preview-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* ====== PAGE: INDEX ====== */
.page-index {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.card-entry {
  background: var(--gray-100);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.card-entry__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.card-entry__subtitle {
  color: var(--gray-500);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.card-entry__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.card-entry__logo-img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.card-entry__logo span {
  color: var(--gray-700);
}

/* ====== FORMS ====== */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--gray-200);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn svg {
  display: block;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--primary);
  color: white;
}

.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn--secondary:hover {
  background: var(--gray-200);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  min-height: 2rem;
  padding: 0 0.9rem;
  font-size: 0.8rem;
  line-height: 1;
}

.btn--danger {
  background: var(--danger);
  color: white;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gray-400);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ====== SALA: LAYOUT SPLIT ====== */
body:has(.sala-container) {
  overflow: hidden;
  height: 100vh;
}

.sala-container {
  position: relative;
  display: flex;
  height: calc(100vh - 53px);
  overflow: hidden;
}

.sala-documento {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--gray-200);
  background: var(--gray-100);
  min-height: 0;
}

.sala-container.sala--chat-collapsed .sala-documento {
  border-right: none;
}

.preview-toolbar--top {
  flex-shrink: 0;
}

.sala-documento > #panelDocumento {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sala-chat-wrap {
  position: relative;
  flex-shrink: 0;
  width: 380px;
  min-width: 320px;
  max-width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease, opacity 0.2s ease;
}

/* Controle na borda entre preview e chat: seta › = “empurrar” o painel para ver tela cheia */
.sala-chat__edge-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  width: 40px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--gray-300);
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, var(--gray-200) 0%, var(--gray-50) 100%);
  color: var(--primary);
  box-shadow: -3px 0 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.sala-chat__edge-toggle:hover {
  background: var(--gray-200);
  box-shadow: -4px 0 16px rgba(16, 185, 129, 0.18);
  color: var(--primary-dark);
}

.sala-chat__edge-toggle:active {
  transform: translate(-50%, -50%) scale(0.97);
}

/* Botão flutuante “widget de chat” quando o painel está recolhido */
.sala-chat-fab {
  position: absolute;
  z-index: 60;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: auto;
  min-width: 2.875rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sala-chat-fab:focus-visible {
  outline: none;
}

.sala-chat-fab:focus-visible .sala-chat-fab__inner {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--primary),
    0 4px 14px rgba(16, 185, 129, 0.45);
}

.sala-chat-fab__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0) 70%);
  animation: salaChatFabGlow 2.2s ease-in-out infinite;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.sala-chat-fab__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.875rem;
  height: 2.875rem;
  overflow: visible;
  border-radius: 50%;
  background: linear-gradient(145deg, #34D399 0%, #10B981 55%, #059669 100%);
  color: #fff;
  box-shadow:
    0 4px 14px rgba(16, 185, 129, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sala-chat-fab__icon {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.sala-chat-fab__badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #10B981;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 1px 0 #fff;
  line-height: 1;
  pointer-events: none;
}

.sala-chat-fab:hover .sala-chat-fab__inner {
  transform: scale(1.06);
  box-shadow:
    0 6px 22px rgba(16, 185, 129, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.05);
}

.sala-chat-fab:active .sala-chat-fab__inner {
  transform: scale(0.96);
}

.sala-chat-fab[hidden] {
  display: none !important;
}

@keyframes salaChatFabGlow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sala-chat-fab__glow {
    animation: none;
    opacity: 0.5;
  }
}

/* Telas muito estreitas: só o ícone (menos poluição visual; o title/aria-label explicam) */
@media (max-width: 380px) {
  .sala-chat-fab {
    gap: 0;
  }

  .sala-chat-fab__badge {
    display: none;
  }
}

.sala-container.sala--chat-collapsed .sala-chat-wrap {
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.sala-chat {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--gray-50);
  box-sizing: border-box;
  padding-left: 10px;
}

/* ====== DOCUMENTO ====== */
.doc-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-50);
}

.doc-header__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
}

.doc-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
}

.doc-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.doc-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.doc-content p {
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

.doc-content ul, .doc-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.doc-content li {
  margin-bottom: 0.35rem;
  color: var(--gray-700);
}

.doc-content strong {
  color: var(--gray-900);
}

.doc-content code {
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.doc-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gray-700);
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.doc-content th, .doc-content td {
  border: 1px solid var(--gray-200);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.9rem;
}

.doc-content th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
}

.doc-editor {
  display: none;
  flex: 1;
  flex-direction: column;
}

.doc-editor textarea {
  flex: 1;
  border: none;
  padding: 2rem 2.5rem;
  font-family: var(--font-family);
  font-size: 0.9rem;
  line-height: 1.7;
  resize: none;
  color: var(--gray-800);
  background: var(--gray-200);
}

.doc-editor textarea:focus {
  outline: none;
}

.doc-editor--active {
  display: flex;
}

.doc-content--hidden {
  display: none;
}

/* ====== CHAT ====== */
.chat-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  min-height: 3rem;
  box-sizing: border-box;
  border-bottom: 1px solid var(--gray-200);
  /* Mesma base da toolbar do preview para a faixa parecer contínua entre colunas */
  background: var(--gray-50);
}

.chat-header__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.chat-header__title svg {
  display: block;
  flex-shrink: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg--sent {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg--received {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
}

.msg__author {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  opacity: 0.8;
}

.msg__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.msg--received .msg__footer {
  justify-content: flex-start;
}

.msg__time {
  font-size: 0.65rem;
  opacity: 0.6;
}

.msg--sent .msg__time {
  margin-top: 0;
}

.msg__ticks {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  line-height: 1;
  opacity: 0.72;
  user-select: none;
  flex-shrink: 0;
}

.msg__ticks .msg__tick + .msg__tick {
  margin-left: -0.1em;
}

.msg__ticks--read {
  opacity: 1;
  color: rgba(255, 255, 255, 0.96);
}

.chat-input {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
  display: flex;
  gap: 0.5rem;
}

.chat-input input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-200);
}

.chat-input input:read-only {
  background: var(--gray-200);
  cursor: text;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.chat-input button {
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.chat-input button:hover {
  background: var(--primary-dark);
}

/* ====== ADMIN ====== */
.admin-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.sala-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow 0.2s;
}

.sala-card:hover {
  box-shadow: var(--shadow-md);
}

.sala-card__info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.sala-card__info p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.sala-card__repo {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.8rem;
  color: var(--gray-600);
}

.sala-card__repo code {
  font-size: 0.8rem;
  padding: 0.1rem 0.35rem;
  background: var(--gray-100);
  border-radius: 4px;
  color: var(--gray-800);
}

.sala-card__actions {
  display: flex;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge--active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge--done {
  background: var(--gray-100);
  color: var(--gray-500);
}

.badge--super {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* ====== MODAL ====== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

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

.modal {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--gray-900);
}

.modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--gray-300);
  color: var(--gray-900);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(1rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-400);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .sala-container {
    flex-direction: column;
  }

  .sala-documento {
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    height: 50vh;
  }

  .sala-chat-wrap {
    width: 100%;
    min-width: unset;
    height: 50vh;
  }

  .sala-container.sala--chat-collapsed .sala-chat-wrap {
    height: 0;
    min-height: 0;
    opacity: 0;
  }

  /* FAB do chat: respeita barra de gestos / home indicator */
  .sala-chat-fab {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, calc(env(safe-area-inset-bottom, 0px) + 0.35rem));
  }

  .sala-chat {
    height: 100%;
  }

  .doc-content {
    padding: 1.25rem;
  }

  .card-entry {
    padding: 2rem 1.5rem;
  }

  .admin-container {
    padding: 0 1rem;
  }

  .sala-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.msg--decisao {
  border: 2px solid var(--success) !important;
  position: relative;
}

.msg__decisao-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--success);
  margin-top: 0.3rem;
  text-align: right;
  letter-spacing: 0.04em;
}

/* ====== PÁGINA RESUMO ====== */
.resumo-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.resumo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.resumo-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.resumo-section {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.resumo-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  user-select: none;
}

.resumo-section__header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resumo-section__header .count-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.resumo-section__body {
  padding: 1.25rem;
  max-height: 500px;
  overflow-y: auto;
}

.resumo-section__body--tall {
  max-height: 700px;
}

.decisao-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.decisao-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.decisao-item__content {
  flex: 1;
  min-width: 0;
}

.decisao-item__text {
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.decisao-item__meta {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.chat-log-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.chat-log-item:last-child {
  border-bottom: none;
}

.chat-log-item__time {
  color: var(--gray-400);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 48px;
}

.chat-log-item__author {
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-log-item__text {
  color: var(--gray-700);
  word-break: break-word;
}

.chat-log-item--decisao {
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius);
  padding: 0.55rem 0.5rem;
}

/* ====== CHECKBOX ====== */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ====== FASE BADGE (sala header) ====== */
.fase-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  text-decoration: none;
  transition: background 0.15s;
}

.fase-badge:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* ====== PÁGINA DE FASES ====== */
.fases-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* STEPPER */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  flex-shrink: 0;
}

.stepper__circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid var(--gray-300);
  background: var(--gray-100);
  color: var(--gray-400);
  transition: all 0.3s;
}

.stepper__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  max-width: 90px;
  line-height: 1.3;
  transition: color 0.3s;
}

.stepper__line {
  flex: 1;
  height: 3px;
  background: var(--gray-200);
  min-width: 30px;
  max-width: 80px;
  margin: 0 0.25rem;
  margin-bottom: 2rem;
  border-radius: 2px;
  transition: background 0.3s;
}

.stepper__line--done {
  background: var(--success);
}

.stepper__item--done .stepper__circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.stepper__item--done .stepper__label {
  color: var(--success);
}

.stepper__item--active .stepper__circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.stepper__item--active .stepper__label {
  color: var(--primary);
  font-weight: 700;
}

.stepper__item--pending .stepper__circle {
  border-color: var(--gray-200);
  color: var(--gray-300);
}

/* FASE CARD */
.fase-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.fase-card__header {
  margin-bottom: 1rem;
}

.fase-card__num {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.fase-card__titulo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
}

.fase-card__desc {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.fase-card__escopo {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.fase-card__escopo h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fase-card__escopo-content {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.fase-card__escopo-content h1,
.fase-card__escopo-content h2,
.fase-card__escopo-content h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.fase-card__aprovado {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.fase-card__aprovado-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.fase-card__aprovado strong {
  color: var(--gray-800);
  font-size: 0.9rem;
}

.fase-card__aprovado small {
  color: var(--gray-500);
  font-size: 0.8rem;
}

.fase-card__acao {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
}

.fase-card__acao-texto {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.fase-card__info-consultor {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.fase-card__info-consultor p {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 500;
}

.fase-card__entrega {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
}

.fase-card__entrega h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.fase-card__entrega p {
  color: var(--gray-600);
  margin-bottom: 1rem;
}

/* HISTÓRICO DE APROVAÇÕES */
.fase-historico {
  margin-top: 2rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.fase-historico h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}

.aprovacao-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.aprovacao-item__icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.aprovacao-item strong {
  font-size: 0.85rem;
  color: var(--gray-800);
}

.aprovacao-item small {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Responsivo stepper */
@media (max-width: 600px) {
  .stepper {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .stepper__line {
    display: none;
  }
  .stepper__item {
    flex: 0 0 auto;
  }
  .stepper__label {
    font-size: 0.6rem;
    max-width: 60px;
  }
  .stepper__circle {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  .fase-card { padding: 1.25rem; }
  .fases-page { padding: 1rem; }
}

/* ====== PAGAMENTO BANNER ====== */
.pag-banner {
  flex-shrink: 0;
  border-bottom: 1px solid var(--gray-200);
}

.pag-banner__content {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.pag-banner--pendente {
  background: rgba(245, 158, 11, 0.15);
  border-left: 3px solid #f59e0b;
}

.pag-banner--aceita {
  background: rgba(16, 185, 129, 0.15);
  border-left: 3px solid var(--success);
}

.pag-banner--aguardando {
  background: rgba(16, 185, 129, 0.15);
  border-left: 3px solid var(--primary);
}

.pag-banner--pago {
  background: rgba(16, 185, 129, 0.15);
  border-left: 3px solid var(--success);
}

.pag-banner--liberado {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--success);
}

.pag-banner--recusada {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--danger);
}

.pag-banner--disputa {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--danger);
}

.pag-banner strong {
  color: var(--gray-800);
}

/* ====== RTC / MÍDIA AO VIVO ====== */

.rtc-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #111118;
  border-bottom: 1px solid #1A1A24;
  flex-shrink: 0;
}

.rtc-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.rtc-toolbar__btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.rtc-toolbar__btn--active {
  background: var(--primary);
  color: #fff;
}

.rtc-toolbar__btn--active:hover {
  background: var(--primary-dark);
}

.rtc-toolbar__btn--danger {
  color: #fca5a5;
}

.rtc-toolbar__btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.rtc-toolbar__status {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}

.rtc-toolbar__status--connected {
  color: #4ade80;
}

.rtc-toolbar__status--reconnecting {
  color: #fbbf24;
  animation: leadPulse 1.5s infinite;
}

.rtc-toolbar__status--failed {
  color: #f87171;
}

.rtc-toolbar__rec-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f87171;
  font-variant-numeric: tabular-nums;
}

.rtc-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  flex-shrink: 0;
  margin-left: 8px;
}

.rtc-live-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: rtcLivePulse 1.2s ease-in-out infinite;
}

@keyframes rtcLivePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.rtc-remote-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: 0;
}

.rtc-local-video {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 180px;
  height: auto;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
  z-index: 999998;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.rtc-local-video:active {
  cursor: grabbing;
}

.rtc-local-video__close {
  position: fixed;
  z-index: 999999;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}

.rtc-local-video__close:hover {
  background: rgba(220, 38, 38, 0.9);
}

@media (max-width: 768px) {
  .rtc-toolbar {
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px;
  }

  .rtc-toolbar__btn span {
    display: none;
  }

  .rtc-local-video {
    width: 120px;
    bottom: 8px;
    right: 8px;
  }
}

/* ====== LEADS / CRM ====== */

.leads-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.leads-tabs__btn {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  position: relative;
}

.leads-tabs__btn:hover { color: var(--gray-700); }
.leads-tabs__btn--active { color: var(--primary); border-bottom-color: var(--primary); }

.leads-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  animation: leadPulse 1.5s ease-in-out infinite;
}

@keyframes leadPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.leads-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

.leads-column {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.leads-column__header {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leads-column__count {
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.leads-column__body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 60px;
}

.lead-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s, transform 0.15s;
  user-select: none;
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

.leads-column__body {
  transition: background 0.15s;
}

.lead-card--novo {
  border-left: 3px solid var(--primary);
}

.lead-card--conversando {
  border-left: 3px solid var(--warning);
}

.lead-card--proposta {
  border-left: 3px solid #8b5cf6;
}

.lead-card--negociando {
  border-left: 3px solid #f97316;
}

.lead-card--fechado {
  border-left: 3px solid var(--success);
}

.lead-card--perdido {
  border-left: 3px solid var(--gray-400);
  opacity: 0.7;
}

.lead-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.lead-card__contact {
  font-size: 0.78rem;
  color: var(--primary);
  word-break: break-all;
}

.lead-card__contact a {
  color: inherit;
  text-decoration: none;
}

.lead-card__contact a:hover {
  text-decoration: underline;
}

.lead-card__meta {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-card__msgs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.lead-card__last-msg {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.leads-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lead-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.lead-row:hover {
  border-color: var(--primary);
}

.lead-row__name { font-weight: 600; flex: 1; min-width: 0; }
.lead-row__contact { font-size: 0.8rem; color: var(--primary); flex: 0 0 auto; }
.lead-row__status { font-size: 0.75rem; }
.lead-row__time { font-size: 0.75rem; color: var(--gray-500); flex: 0 0 auto; }

/* Lead detail modal */
.lead-detail {
  padding: 1.25rem;
}

.lead-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.lead-detail__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
}

.lead-detail__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.lead-detail__contact-link:hover { opacity: 0.85; }

.lead-detail__contact-link--whatsapp {
  background: #25d366;
  color: #fff;
}

.lead-detail__contact-link--email {
  background: var(--primary);
  color: #fff;
}

.lead-detail__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lead-detail__field {
  font-size: 0.82rem;
}

.lead-detail__field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 2px;
}

.lead-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}

.lead-detail__notes textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-family: inherit;
  resize: vertical;
  background: var(--gray-200);
  color: var(--gray-800);
}

/* Notification bell (header) */
.notif-bell {
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  color: var(--gray-600);
  transition: color 0.15s;
}

.notif-bell:hover { color: var(--gray-800); }

.notif-bell__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--gray-300);
  animation: leadPulse 1.5s ease-in-out infinite;
}

/* ====== UTILITIES ====== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--gray-500); }
