/* =========================================================================
   ETTNA Representações — design system
   ========================================================================= */

:root {
  --bg:          #f4f6fa;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      #e8ecf4;
  --border-2:    #d5dbe8;

  --text:        #0c1524;
  --text-2:      #33415c;
  --text-3:      #71809b;

  /* Azul da marca. É o mesmo tom do logo — usado no painel de login,
     no botão primário e em tudo que precisa carregar a marca. */
  --brand:       #12278f;
  --brand-dk:    #0d1c6b;

  /* Paleta do redesign. O azul é o da maquete; o da marca (--brand) fica
     reservado ao logo e à tela de entrada, que são a assinatura visual. */
  --primary:     #2563eb;
  --primary-dk:  #1d4fd8;
  --primary-lt:  #eff5ff;
  --primary-2:   #dbe7fe;

  --navy:        #0a1f3d;
  --navy-2:      #102b4f;
  --navy-3:      #17325a;

  --green:       #12a06a;
  --green-lt:    #e9f7f1;
  --amber:       #d48806;
  --amber-lt:    #fdf7ec;
  --red:         #dc4b39;
  --red-lt:      #fceae7;
  /* Segundo acento (reuniões, propostas). O nome ficou de quando era roxo. */
  --violet:      #26588f;
  --violet-lt:   #eef3fa;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(12, 21, 36, .04), 0 4px 14px rgba(12, 21, 36, .04);
  --shadow-lg:   0 10px 30px rgba(12, 21, 36, .1);

  --sidebar-w:   222px;
  --font:        ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* O navegador esconde [hidden] com `display: none`, mas essa regra vem da
   folha padrão e perde para qualquer classe nossa — `.login { display: grid }`
   deixava a tela de login visível mesmo depois de `login.hidden = true`, com o
   sistema carregado logo abaixo. Precisa de !important para vencer. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- utils */

.muted   { color: var(--text-2); }
.dim     { color: var(--text-3); }
.tnum    { font-variant-numeric: tabular-nums; }
.right   { text-align: right; }
.center  { text-align: center; }
.row     { display: flex; align-items: center; gap: 10px; }
.row--between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap    { flex-wrap: wrap; }
.grow    { flex: 1; }
.hidden  { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------- entrada / cadastro */

.auth {
  --auth-azul: var(--brand);
  --auth-azul-esc: var(--brand-dk);

  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #dfe3e8;
}

.auth__card {
  width: 100%;
  max-width: 1080px;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16);
}

/* ---- painel azul ---- */

.auth__side {
  background: var(--auth-azul);
  color: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.auth__brand { display: flex; align-items: center; }
.auth__brand .marca { max-width: 186px; }

.auth__pitch { margin-top: auto; }
.auth__pitch h1 {
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 700;
}
.auth__pitch p {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .78);
  max-width: 40ch;
}

.auth__quote {
  margin-top: auto;
  background: rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 22px;
}
.auth__quote strong {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 16px;
}
.auth__quote ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.auth__quote li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .82);
  line-height: 1.45;
}
.auth__quote li::before {
  content: "";
  flex: 0 0 auto;
  width: 16px; height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center/10px no-repeat;
}

/* ---- lado do formulário ---- */

.auth__main {
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Indicador de passos: bolinhas ligadas por uma linha. A linha é um
   pseudo-elemento do contêiner, não margem entre as bolinhas — assim ela
   acompanha a largura sozinha, com dois passos ou com cinco. */
.auth__steps {
  position: absolute;
  top: 40px; left: 56px; right: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.auth__steps::before {
  content: "";
  position: absolute;
  left: 5px; right: 5px; top: 50%;
  height: 2px;
  background: #e6eaef;
  transform: translateY(-50%);
}
.auth__step {
  position: relative;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #dbe1e8;
  flex: 0 0 auto;
  transition: background .2s, box-shadow .2s;
}
.auth__step.is-active {
  background: var(--auth-azul);
  box-shadow: 0 0 0 4px rgba(11, 87, 255, .16);
}
.auth__step.is-done { background: var(--auth-azul); }

.auth__form { display: flex; flex-direction: column; gap: 18px; }
.auth__form > [data-passo] { display: flex; flex-direction: column; gap: 18px; }

.auth__head h2 {
  font-size: 27px;
  letter-spacing: -.025em;
  font-weight: 700;
}
.auth__head p {
  margin-top: 7px;
  color: var(--text-2);
  font-size: 13.5px;
}

.auth__form .field > span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}
.auth__form .field input {
  padding: 13px 14px;
  border-radius: 10px;
  border-color: #d6dce3;
  font-size: 14px;
}
.auth__form .field input:focus {
  border-color: var(--auth-azul);
  box-shadow: 0 0 0 3px rgba(11, 87, 255, .13);
}

.field__senha { position: relative; }
.field__senha input { padding-right: 44px; width: 100%; }
.field__olho {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: 0;
  padding: 8px; border-radius: 8px;
  color: var(--text-3);
  display: grid; place-items: center;
}
.field__olho:hover { background: var(--surface-2); color: var(--text-2); }
.field__olho svg { width: 17px; height: 17px; stroke: currentColor; }

.auth__dica { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

.auth__error {
  background: var(--red-lt);
  color: var(--red);
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
}

.auth__btn {
  width: 100%;
  background: var(--auth-azul);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .15s, transform .06s;
  margin-top: 4px;
}
.auth__btn:hover { background: var(--auth-azul-esc); }
.auth__btn:active { transform: translateY(1px); }
.auth__btn:disabled { opacity: .6; cursor: not-allowed; }
.auth__btn svg { width: 17px; height: 17px; stroke: currentColor; }

.auth__acoes { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.auth__acoes .auth__btn { margin-top: 0; }
.auth__voltar {
  background: transparent; border: 0;
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  padding: 14px 6px;
  white-space: nowrap;
}
.auth__voltar:hover { color: var(--text); }
.auth__voltar svg { width: 15px; height: 15px; stroke: currentColor; }

/* Marca da tela de entrada em telas estreitas. Fica escondida por padrão e a
   media query abaixo a liga — que precisa vir DEPOIS desta regra, senão a base
   vence por ser a última do arquivo. Sobre branco, usa o azul da marca. */
.auth__marca-movel { display: none; margin-bottom: 30px; color: var(--brand); }
.auth__marca-movel .marca { max-width: 168px; }

@media (max-width: 900px) {
  .auth { padding: 0; background: #fff; }
  .auth__card {
    grid-template-columns: 1fr;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .auth__side { display: none; }
  .auth__main { padding: 40px 24px; }
  .auth__steps { left: 24px; right: 24px; top: 28px; }
  .auth__marca-movel { display: block; }
}

/* ---------------------------------------------------------------- logo */

/* A marca é a própria forma, sem caixa nem fundo atrás: herda a cor de
   quem a contém (branca na sidebar e no login, azul sobre fundo claro).
   É um logotipo deitado, então quem manda é a largura — travar a altura
   deixaria a palavra minúscula dentro da sidebar. */
.marca {
  width: 100%;
  max-width: 168px;
  height: auto;
  flex: 0 0 auto;
  color: inherit;
}

/* --------------------------------------------------------------- shell */

.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--navy);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex; align-items: center;
  padding: 24px 16px 22px;
  color: #fff;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 12px; flex: 1; }
.sidebar__nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #9cb0d1;
  font-size: 13px;
  font-weight: 500;
  transition: background .13s, color .13s;
}
.sidebar__nav a:hover { background: var(--navy-2); color: #fff; }
.sidebar__nav a.is-active { background: var(--primary); color: #fff; font-weight: 600; }
.sidebar__nav a.is-active svg { stroke: #fff; }
.sidebar__nav svg { width: 17px; height: 17px; stroke: currentColor; flex: 0 0 auto; }

/* contador ao lado do item de menu — o número que faz o vendedor clicar */
.nav-n {
  margin-left: auto;
  background: var(--navy-3); color: #9cb0d1;
  font-size: 10.5px; font-weight: 600;
  padding: 1px 7px; border-radius: 99px;
  font-variant-numeric: tabular-nums;
}
.sidebar__nav a.is-active .nav-n { background: rgba(255, 255, 255, .22); color: #fff; }
.nav-n--hot { background: var(--red); color: #fff; }

.sidebar__foot {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--navy-3);
}
.sidebar__user { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.sidebar__user strong { color: #fff; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user span { color: #7b92b8; font-size: 10.5px; text-transform: capitalize; }

.avatar {
  width: 31px; height: 31px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600;
  flex: 0 0 auto;
}
.avatar--sm { width: 24px; height: 24px; font-size: 10px; border-radius: 7px; }

.icon-btn {
  background: transparent; border: 0; color: #64748b;
  padding: 6px; border-radius: 6px; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--navy-2); color: #e2e8f0; }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 19px; letter-spacing: -.02em; }
.topbar p  { color: var(--text-2); font-size: 13px; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.view { padding: 24px 28px 48px; flex: 1; min-width: 0; }

/* -------------------------------------------------------------- botões */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13px;
  transition: background .12s, border-color .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #94a3b8; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; }

.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 11px 18px; font-size: 14px; }
.btn--sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --------------------------------------------------------------- campos */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: var(--surface);
  outline: none;
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.field textarea { resize: vertical; min-height: 84px; }
.field--inline { flex-direction: row; align-items: center; gap: 8px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  min-width: 260px;
}
.search input { border: 0; outline: 0; flex: 1; background: transparent; }
.search svg { width: 16px; height: 16px; stroke: var(--text-3); flex: 0 0 auto; }

/* --------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card__head h3 { font-size: 14px; font-weight: 600; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1200px) { .grid--main, .grid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px)  { .grid--main, .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- stat tiles */

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.stat__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.stat__icon svg { width: 19px; height: 19px; stroke: currentColor; }
.stat__icon--blue   { background: var(--primary-lt); color: var(--primary); }
.stat__icon--green  { background: var(--green-lt);   color: var(--green); }
.stat__icon--amber  { background: var(--amber-lt);   color: var(--amber); }
.stat__icon--violet { background: var(--violet-lt);  color: var(--violet); }
.stat__icon--red    { background: var(--red-lt);     color: var(--red); }
.stat__value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat__label { font-size: 12px; color: var(--text-2); }

/* ------------------------------------------------------------ progresso */

.progress {
  height: 10px; border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.progress__fill {
  height: 100%; border-radius: 999px;
  background: var(--primary);
  transition: width .4s ease;
}
.progress--green .progress__fill { background: var(--green); }

/* ---------------------------------------------------------------- funil */

.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel__row { display: grid; grid-template-columns: 130px 1fr 92px; align-items: center; gap: 12px; }
.funnel__name { font-size: 13px; color: var(--text-2); }
.funnel__bar { height: 26px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.funnel__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; padding-left: 10px;
  color: #fff; font-size: 12px; font-weight: 600;
  min-width: 28px;
  transition: width .4s ease;
}
.funnel__value { font-size: 12px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- kanban */

.board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}

.column {
  flex: 0 0 288px;
  background: #e8edf4;
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 210px);
}
.column.is-over { background: #dbeafe; outline: 2px dashed var(--primary); outline-offset: -3px; }

.column__head {
  padding: 12px 14px 10px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0;
  background: #e8edf4;
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 1;
}
.column__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.column__title strong { font-size: 13px; }
.column__count {
  background: rgba(15, 23, 42, .1);
  border-radius: 999px; padding: 1px 8px;
  font-size: 11px; font-weight: 700; color: var(--text-2);
}
.column__total { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.column__dash { height: 3px; border-radius: 999px; background: var(--primary); opacity: .85; }

.column__list {
  padding: 4px 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
}

.dcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  box-shadow: var(--shadow);
  cursor: grab;
  transition: box-shadow .12s, transform .12s;
}
.dcard:hover { box-shadow: var(--shadow-lg); }
.dcard.is-dragging { opacity: .4; }
.dcard--stale { border-left-color: var(--amber); }
.dcard--won   { border-left-color: var(--green); }
.dcard--lost  { border-left-color: var(--text-3); opacity: .75; }

.dcard__company { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.dcard__title { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.dcard__contato {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-2);
  margin-bottom: 8px;
}
.dcard__contato svg { width: 12px; height: 12px; stroke: currentColor; flex: 0 0 auto; }

.dcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dcard__value { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.dcard__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------------------------------------------------------------- chips */

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; stroke: currentColor; }
.chip--amber  { background: var(--amber-lt);  color: var(--amber);  border-color: #fde68a; }
.chip--red    { background: var(--red-lt);    color: var(--red);    border-color: #fecaca; }
.chip--green  { background: var(--green-lt);  color: var(--green);  border-color: #bbf7d0; }
.chip--blue   { background: var(--primary-lt); color: var(--primary); border-color: #bfdbfe; }
.chip--violet { background: var(--violet-lt); color: var(--violet); border-color: #ddd6fe; }

/* --------------------------------------------------------------- tabela */

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-3); font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  position: sticky; top: 0;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }

/* ---------------------------------------------- fonte da busca (prospecção) */

.fontes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }

.fonte {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  font: inherit; color: inherit;
}
.fonte:hover:not(:disabled) { border-color: var(--primary); }
.fonte.is-active {
  border-color: var(--primary);
  background: var(--primary-lt);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.fonte:disabled { opacity: .55; cursor: not-allowed; }

.fonte__nome { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; }
.fonte__desc { font-size: 11.5px; color: var(--text-2); line-height: 1.45; }
.fonte__falta { font-size: 11px; color: var(--amber); font-weight: 600; }

.aviso-chave {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 14px;
  margin-bottom: 16px;
}
.aviso-chave strong { font-size: 13.5px; }
.aviso-chave p { font-size: 12.5px; color: var(--text-2); margin: 6px 0 12px; line-height: 1.55; }

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

/* --------------------------------------------------- contato na listagem */

.contato { display: flex; align-items: center; gap: 10px; }
.contato__id { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.contato__id strong { font-size: 13.5px; font-weight: 600; }
.contato__id span { font-size: 11.5px; }

/* O WhatsApp fica sempre visível — atalho escondido é atalho que ninguém
   descobre. O telefone só aparece no hover, para a tabela não virar um mural
   de ícones. */
.contato__atalhos { display: flex; gap: 4px; margin-left: auto; }
.atalho--secundario { opacity: 0; transition: opacity .12s; }
.table tbody tr:hover .atalho--secundario,
.atalho--secundario:focus { opacity: 1; }

.atalho {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
}
.atalho svg { width: 15px; height: 15px; }
.atalho:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }
.atalho--zap:hover { border-color: #128c7e; color: #128c7e; background: var(--green-lt); }

@media (hover: none) {
  .atalho--secundario { opacity: 1; }  /* no toque não existe hover */
}

/* ------------------------------------------------------------- timeline */

.timeline { display: flex; flex-direction: column; position: relative; padding-left: 6px; }
.tl {
  display: grid; grid-template-columns: 30px 1fr;
  gap: 12px;
  padding-bottom: 18px;
  position: relative;
}
.tl:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 14px; top: 30px; bottom: 0;
  width: 2px; background: var(--border);
}
.tl__dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-lt); color: var(--primary);
  border: 2px solid var(--surface);
  z-index: 1;
}
.tl__dot svg { width: 14px; height: 14px; stroke: currentColor; }
.tl__dot--green  { background: var(--green-lt);  color: var(--green); }
.tl__dot--amber  { background: var(--amber-lt);  color: var(--amber); }
.tl__dot--violet { background: var(--violet-lt); color: var(--violet); }
.tl__dot--gray   { background: var(--surface-2); color: var(--text-3); }
.tl__body { padding-top: 4px; min-width: 0; }
.tl__summary { font-size: 13px; font-weight: 500; }
.tl__note {
  margin-top: 6px; padding: 8px 11px;
  background: var(--surface-2);
  border-left: 2px solid var(--border-2);
  border-radius: 0 6px 6px 0;
  font-size: 12px; color: var(--text-2);
  white-space: pre-wrap;
}
.tl__meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* --------------------------------------------------------------- agenda */

.agenda { display: flex; flex-direction: column; }
.agenda__item {
  display: grid; grid-template-columns: 60px 34px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.agenda__item:last-child { border-bottom: 0; }
.agenda__item:hover { background: var(--surface-2); }
.agenda__time { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.agenda__item.is-overdue .agenda__time { color: var(--red); }
.agenda__item.is-done { opacity: .5; }
.agenda__item.is-done .agenda__title { text-decoration: line-through; }
.agenda__title { font-size: 13px; font-weight: 500; }
.agenda__sub { font-size: 12px; color: var(--text-2); }

.type-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.type-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.type-icon--call    { background: var(--primary-lt); color: var(--primary); }
.type-icon--meeting { background: var(--violet-lt);  color: var(--violet); }
.type-icon--task    { background: var(--amber-lt);   color: var(--amber); }
.type-icon--email   { background: var(--green-lt);   color: var(--green); }

/* --------------------------------------------------------------- modais */

#modal-root:empty { display: none; }

.modal-bg {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 100;
  animation: fade .12s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: pop .16s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }

.modal--wide { max-width: 720px; }
.modal__head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal__head h3 { font-size: 16px; }
.modal__body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal__foot {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ------------------------------------------------------------- ligação */

.timer {
  font-size: 44px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 8px 0 4px;
}
.timer--running { color: var(--primary); }

.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.outcome {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
  text-align: left;
  font-size: 13px;
  transition: border-color .12s, background .12s;
}
.outcome:hover { border-color: var(--primary); background: var(--primary-lt); }
.outcome.is-selected { border-color: var(--primary); background: var(--primary-lt); font-weight: 600; }
.outcome__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

/* ---------------------------------------------------------------- sino */

.bell { position: relative; }
.bell__btn { position: relative; padding: 8px; }
.bell__dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px;
  border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
}

.bell__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 380px; max-height: 460px; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.bell__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface);
}
.bell__head strong { font-size: 13px; }

.notif {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); }
.notif--unread { background: var(--primary-lt); }
.notif--unread:hover { background: #dbeafe; }
.notif__title { font-size: 13px; font-weight: 600; }
.notif__body { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.notif__time { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* --------------------------------------------------------------- toasts */

.toasts {
  position: fixed; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--navy); color: #fff;
  padding: 11px 16px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: flex; align-items: center; gap: 9px;
  animation: slide .18s ease;
  max-width: 380px;
}
@keyframes slide { from { opacity: 0; transform: translateX(16px) } to { opacity: 1; transform: none } }
.toast--error { background: var(--red); }
.toast--success { background: var(--green); }
.toast svg { width: 16px; height: 16px; stroke: currentColor; flex: 0 0 auto; }

/* ---------------------------------------------------------------- vazio */

.empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 34px; height: 34px; stroke: var(--border-2); margin-bottom: 10px; }
.empty p { font-size: 13px; }

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #eef2f7 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* ------------------------------------------------------- detalhe cliente */

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } }

.dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; }
.dl dt { font-size: 12px; color: var(--text-2); font-weight: 500; }
.dl dd { font-size: 13px; }

.actions-bar { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tab {
  background: transparent; border: 0;
  padding: 12px 4px; margin-right: 16px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
