/* =====================================================================
   Growth Lab - componentes
   ===================================================================== */

/* ----------------------------------------------------------------- grid */

.grid { display: grid; gap: var(--gap); }
.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--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* Primeira dobra: o cartão escuro e o "Ritmo do ciclo" dividem a linha
   meio a meio - as duas metades pesam igual na leitura. */
.grid--hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* A Curva S precisa de mais largura que o funil ao lado: são 64 pontos
   no eixo, contra 6 barras. */
.grid--grafico { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }

.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.mt-16 { margin-top: var(--gap); }
.mt-24 { margin-top: 14px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--card-pad);
    box-shadow: var(--shadow);
    min-width: 0;               /* deixa o conteudo encolher em vez de vazar */
}
.card--flush { padding: 0; overflow: hidden; }
.card--dark { background: var(--blue-900); border-color: var(--blue-900); color: #DCE6F1; }
.card--dark h2, .card--dark h3 { color: #fff; }

/* Nada de texto escapando do card. */
.card, .card * { overflow-wrap: anywhere; }
.card .nowrap, .card .table th, .card .table td.nowrap { overflow-wrap: normal; }

.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 10px;
    min-width: 0;
}
.card--flush .card__head { padding: 11px 14px; margin-bottom: 0; border-bottom: 1px solid var(--border); }
.card__title { font-size: 13px; font-weight: 600; color: var(--blue-900); min-width: 0; }
.card__hint { font-size: 11.5px; color: var(--text-faint); text-align: right; min-width: 0; }
/* Aviso discreto no pe do card: encontro que passou e ficou sem registro. */
.card__note { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.card__note a { color: var(--gold-500); font-weight: 600; }

.section-title {
    font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-faint); margin: 0 0 7px;
}

/* ------------------------------------------------------------------ hero */

.hero { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.hero__label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-200); }
.hero__value { font-size: 40px; font-weight: 700; line-height: 1; color: #fff; letter-spacing: -.03em; }
.hero__value small { font-size: 18px; font-weight: 500; color: #8FA6C0; letter-spacing: 0; }

/*
   Topo do cartao: o titulo a esquerda e os dois numeros a direita.
   Sao eles que dao nome as duas barras logo abaixo - sem isso a barra
   cinza aparece sem explicacao nenhuma.
*/
.hero__topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.hero__numeros { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.hero__num {
    font-size: 11px; color: #8FA6C0; white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.hero__num strong { font-size: 15px; font-weight: 700; }
.hero__num::before { content: ''; width: 7px; height: 7px; border-radius: 99px; flex: none; }
.hero__num--ouro::before  { background: var(--gold-500); }
.hero__num--ouro strong   { color: var(--gold-200); }
.hero__num--cinza::before { background: #8FA6C0; }
.hero__num--cinza strong  { color: #C4D2E0; }

.hero__sub { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__item { display: flex; flex-direction: column; min-width: 0; }
.hero__item strong { color: #fff; font-size: 15px; font-weight: 600; }
.hero__item span { color: #8FA6C0; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }

/* -------------------------------------------------------------- progress */

.progress {
    height: 10px; border-radius: 99px; background: var(--blue-100); overflow: hidden;
}
.card--dark .progress { background: rgba(255, 255, 255, .14); }
.progress__bar { height: 100%; border-radius: 99px; background: var(--gold-500); transition: width .3s; }
.progress--thin { height: 6px; }
.progress--success .progress__bar { background: var(--green-500); }
.progress--danger .progress__bar { background: var(--red-500); }
.progress--cinza .progress__bar { background: #8FA6C0; }

/* ------------------------------------------------------------------ kpi */

.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi__label {
    font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-faint); line-height: 1.3;
}
.kpi__value { font-size: 22px; font-weight: 700; color: var(--blue-900); line-height: 1.15; letter-spacing: -.02em; }
.kpi__hint { font-size: 11px; color: var(--text-muted); line-height: 1.3; }

/* Cartao so com KPI nao precisa da altura toda de um card normal. */
.card--kpi { padding: 11px 13px; }
.kpi--gold .kpi__value { color: var(--gold-500); }
.kpi--green .kpi__value { color: var(--green-500); }
.kpi--danger .kpi__value { color: var(--red-500); }

/* --------------------------------------------------------------- badges */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 99px;
    font-size: 11.5px; font-weight: 500; white-space: nowrap;
    border: 1px solid transparent;
}
.tone-neutral { background: #F2F4F7; color: #475467; border-color: #E4E7EC; }
.tone-info    { background: var(--blue-100); color: var(--blue-700); border-color: #CFDCEA; }
.tone-gold    { background: var(--gold-050); color: #8A6A1F; border-color: var(--gold-200); }
.tone-success { background: var(--green-050); color: #406032; border-color: #CBDAC2; }
.tone-danger  { background: var(--red-050); color: var(--red-500); border-color: #F0CFCC; }

.status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 99px;
    font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ADIANTADO { background: var(--green-050); color: #406032; }
.status-NA { background: var(--gold-050); color: #8A6A1F; }
.status-ATENCAO { background: var(--red-050); color: var(--red-500); }

/* -------------------------------------------------------------- buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 15px; min-height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-family: inherit; font-size: 13.5px; font-weight: 500;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    text-decoration: none;
}
.btn:hover { background: #F9FAFB; border-color: #B9C0CC; text-decoration: none; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

.btn--primary { background: var(--gold-500); border-color: var(--gold-500); color: #2B1F06; font-weight: 600; }
.btn--primary:hover { background: #B98D33; border-color: #B98D33; color: #2B1F06; }

.btn--dark { background: var(--blue-900); border-color: var(--blue-900); color: #fff; }
.btn--dark:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: #F2F4F7; border-color: transparent; }

.btn--danger { color: var(--red-500); border-color: #F0CFCC; background: var(--red-050); }
.btn--danger:hover { background: #F7E0DE; border-color: #E4B5B0; }

.btn--sm { min-height: 32px; padding: 6px 11px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.icon-btn {
    width: 32px; height: 32px; padding: 0;
    display: grid; place-items: center;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { background: #F2F4F7; color: var(--blue-900); }
.icon-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* ------------------------------------------------------------- formulario */

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 12.5px; font-weight: 500; color: #344054; }
.field .hint { font-size: 11.5px; color: var(--text-faint); }

.input, .select, .textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-700); outline: none; box-shadow: 0 0 0 3px rgba(30, 68, 107, .12); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }

.select { appearance: none; padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23667085'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 7px center; background-size: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 13px; margin: 0 0 11px; }
.fieldset legend { padding: 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }

.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--blue-700); }

/* ---------------------------------------------------------------- alerts */

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid transparent; margin-bottom: 16px; }
.alert--error { background: var(--red-050); border-color: #F0CFCC; color: var(--red-500); }
.alert--success { background: var(--green-050); border-color: #CBDAC2; color: #406032; }
.alert--info { background: var(--blue-100); border-color: #CFDCEA; color: var(--blue-700); }
.alert--warn { background: var(--gold-050); border-color: var(--gold-200); color: #8A6A1F; }

/* --------------------------------------------------------------- tabelas */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left; padding: 7px 11px;
    font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-faint); background: #FCFCFD;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { padding: 8px 11px; border-bottom: 1px solid #F0F2F5; vertical-align: middle; }
.table tbody tr:hover { background: #FCFCFD; }
.table tbody tr:last-child td { border-bottom: none; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }

.empty {
    padding: 22px 16px; text-align: center; color: var(--text-muted); font-size: 12.5px;
}
.empty strong { display: block; color: var(--blue-900); margin-bottom: 4px; font-size: 14px; }

/* --------------------------------------------------------------- filtros */

.filters {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
    padding: 10px 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--gap);
}
.filters .field { margin-bottom: 0; min-width: 140px; }
.filters .field--grow { flex: 1; min-width: 200px; }

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

.funnel { display: flex; flex-direction: column; gap: 5px; }
.funnel__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.funnel__bar {
    position: relative; height: 26px; border-radius: 6px; background: #F2F4F7; overflow: hidden;
    display: flex; align-items: center;
}
.funnel__fill { position: absolute; inset: 0 auto 0 0; background: var(--blue-100); border-radius: 6px; }
.funnel__label { position: relative; padding-left: 11px; font-size: 12.5px; font-weight: 500; color: #344054; }
.funnel__count { font-size: 14px; font-weight: 700; color: var(--blue-900); min-width: 30px; text-align: right; }
.funnel__row:nth-child(5) .funnel__fill { background: var(--gold-200); }
.funnel__row:nth-child(6) .funnel__fill { background: #CBDAC2; }

/* -------------------------------------------------------------- jornada */

.journey { display: flex; flex-wrap: wrap; gap: 0; }
.journey__step {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 14px 7px 12px;
    font-size: 12px; color: var(--text-faint);
    background: #F2F4F7; border-radius: 6px; margin: 0 6px 6px 0;
}
.journey__step::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--border-strong);
}
/* Etapa vencida usa o check verde: lê como "feito" à distância,
   sem precisar comparar tons de bolinha. */
.journey__step.is-done { background: var(--green-050); color: #3F6032; }
.journey__step.is-done::before {
    content: '✓';
    width: auto; height: auto;
    background: none;
    color: var(--green-500);
    font-size: 12px; font-weight: 700; line-height: 1;
}
.journey__step.is-current { background: var(--gold-050); color: #8A6A1F; font-weight: 600; border: 1px solid var(--gold-200); }
.journey__step.is-current::before { background: var(--gold-500); }

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

/* Alternador entre o quadro de tarefas e o de empresas */
.kswitch {
    display: inline-flex; gap: 2px; margin-bottom: var(--gap);
    padding: 3px; background: #EDF0F4; border-radius: var(--radius-sm);
}
.kswitch__opt {
    padding: 6px 16px; border-radius: 5px;
    font-size: 13px; font-weight: 500; color: var(--text-muted); text-decoration: none;
}
.kswitch__opt:hover { color: var(--blue-900); text-decoration: none; }
.kswitch__opt.is-active { background: #fff; color: var(--blue-900); font-weight: 600; box-shadow: var(--shadow); }

/* Card de empresa no quadro */
.kcard--empresa { border-left-color: var(--blue-700); }
.kcard--empresa .kcard__title { font-weight: 600; }
.kcard--empresa .kcard__links { margin-left: 0; }
.kcard--empresa .kcard__foot { margin-left: 0; }
.kcard__mentoria { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.kcard__mentoria .progress { flex: 1; }
.kcard__mentoria .faint { font-size: 10.5px; white-space: nowrap; }

/* Barra de resumo acima do quadro */
.kbar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.kbar__stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.kbar__stats strong { color: var(--blue-900); font-size: 15px; margin-right: 3px; }
.kbar__late { color: var(--red-500); }
.kbar__late strong { color: var(--red-500); }
.kbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 10px; align-items: start; }

.kcol { background: #F1F3F7; border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 220px; }
.kcol__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); }
.kcol__title { font-size: 12.5px; font-weight: 600; color: var(--blue-900); text-transform: uppercase; letter-spacing: .04em; }
.kcol__count { font-size: 11.5px; font-weight: 600; color: var(--text-muted); background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 1px 8px; }
.kcol__late { font-size: 10.5px; font-weight: 600; color: var(--red-500); background: var(--red-050); border-radius: 99px; padding: 1px 7px; }
.kcol__body { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-height: 60px; }
.kcol__empty { padding: 22px 10px; text-align: center; font-size: 12px; color: var(--text-faint); }

/* A coluna Concluido fica mais discreta: o foco e o que falta fazer. */
.kcol--done { background: #EFF2EF; }
.kcol--done .kcard { opacity: .82; }
.kcol--done .kcard__title { text-decoration: none; color: var(--text-muted); }

.kcard {
    position: relative;
    background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 11px 12px; cursor: grab;
    transition: box-shadow .12s, border-color .12s;
}
.kcard:hover { box-shadow: 0 2px 8px rgba(16, 24, 40, .08); border-color: var(--border-strong); }
.kcard:active { cursor: grabbing; }

.kcard__top { display: flex; align-items: flex-start; gap: 8px; }
.kcard__prio { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: #CBD5E1; }
.kcard__prio--normal { background: var(--blue-700); }
.kcard__prio--high   { background: var(--gold-500); }
.kcard__prio--urgent { background: var(--red-500); }
.kcard__title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.35; }

.kcard__links { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0 16px; }
.kcard__tag { font-size: 11px; color: var(--text-muted); background: #F2F4F7; border-radius: 5px; padding: 2px 6px; }
.kcard__tag--company { background: var(--blue-100); color: var(--blue-700); }
.kcard__tag--kr { background: var(--gold-050); color: #8A6A1F; font-weight: 600; }

.kcard__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 9px 0 0 16px; padding-top: 8px; border-top: 1px solid #F0F2F5;
}
.kcard__who { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }
.kcard__avatar {
    width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--blue-100); color: var(--blue-700);
    font-size: 9px; font-weight: 700;
}
.kcard__right { display: flex; align-items: center; gap: 6px; }
.kcard__week { font-size: 10.5px; font-weight: 600; color: var(--text-faint); background: #F2F4F7; border-radius: 4px; padding: 1px 5px; }
.kcard__due { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.kcard__due.is-late  { color: var(--red-500); font-weight: 600; }
.kcard__due.is-today { color: #8A6A1F; font-weight: 600; }
.kcard__due.is-soon  { color: var(--blue-700); }

.kcard.is-overdue { border-left-color: var(--red-500); }
.kcard--low { border-left-color: #CBD5E1; }
.kcard--normal { border-left-color: var(--blue-700); }
.kcard--high { border-left-color: var(--gold-500); }
.kcard--urgent { border-left-color: var(--red-500); }
.kcard.sortable-ghost { opacity: .4; }
.kcol__body.drag-over { background: #E8EDF5; border-radius: var(--radius-sm); }

/* Setas de mover: aparecem no hover no desktop, sempre visiveis no toque. */
.kcard__move {
    position: absolute; top: 6px; right: 6px;
    display: flex; gap: 2px; opacity: 0; transition: opacity .12s;
}
.kcard:hover .kcard__move, .kcard:focus-within .kcard__move { opacity: 1; }
.kcard__nav {
    width: 22px; height: 22px; padding: 0;
    display: grid; place-items: center;
    border: 1px solid var(--border); border-radius: 5px;
    background: #fff; color: var(--text-muted);
    font-size: 14px; line-height: 1; cursor: pointer;
}
.kcard__nav:hover { background: var(--blue-900); border-color: var(--blue-900); color: #fff; }
@media (hover: none) {
    .kcard__move { opacity: 1; }
}

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

.timeline { display: flex; flex-direction: column; gap: 7px; }
.tl-item {
    display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center;
    padding: 10px 13px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.tl-item.is-current { border-color: var(--gold-500); background: var(--gold-050); }
.tl-item.is-past { opacity: .82; }
.tl-num {
    width: 44px; height: 44px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--blue-900); color: #fff; font-weight: 700; font-size: 15px;
}
.tl-item.is-current .tl-num { background: var(--gold-500); color: #2B1F06; }
.tl-body strong { display: block; font-size: 13.5px; color: var(--blue-900); }
.tl-body span { font-size: 12.5px; color: var(--text-muted); }
.tl-numbers { display: flex; gap: 18px; text-align: right; }
.tl-numbers div span { display: block; font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.tl-numbers div strong { font-size: 15px; color: var(--blue-900); }

/* ------------------------------------------------------------- historico */

.history { display: flex; flex-direction: column; gap: 0; }
.history__item { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid #F0F2F5; font-size: 13px; }
.history__item:last-child { border-bottom: none; }
.history__when { color: var(--text-faint); font-size: 12px; white-space: nowrap; min-width: 108px; }

/* ------------------------------------------------------------- galeria */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }

.ev-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
}
.ev-card__thumb {
    aspect-ratio: 4 / 3; background: #F2F4F7;
    display: grid; place-items: center; overflow: hidden;
}
.ev-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-card__icon { font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: .06em; text-transform: uppercase; }
.ev-card__body { padding: 12px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ev-card__title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.35; }
.ev-card__meta { font-size: 11.5px; color: var(--text-faint); display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.ev-mini { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #F0F2F5; }
.ev-mini:last-child { border-bottom: none; }
.ev-mini__thumb { width: 42px; height: 42px; border-radius: 7px; background: #F2F4F7; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; }
.ev-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-mini__thumb span { font-size: 9.5px; font-weight: 700; color: var(--text-faint); }
.ev-mini__info { min-width: 0; }
.ev-mini__info strong { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-mini__info span { font-size: 11.5px; color: var(--text-faint); }

/* ---------------------------------------------------------------- modal */

.modal { position: fixed; inset: 0; z-index: 60; display: none; overflow-y: auto; }
.modal.is-open { display: block; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(14, 42, 71, .5); }
.modal__box {
    position: relative; z-index: 1;
    width: min(680px, calc(100% - 32px));
    max-height: calc(100vh - 64px);
    margin: 32px auto;
    background: #fff; border-radius: 14px;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 40px rgba(16, 24, 40, .18);
}
.modal__box--wide { width: min(920px, calc(100% - 32px)); }

/* O <form> costuma envolver cabecalho/corpo/rodape. Sem estas duas regras
   ele vira um bloco unico que ignora o max-height do box: o formulario
   cresce, o rodape sai da tela e o botao de salvar fica inalcancavel. */
.modal__box > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

.modal__head, .modal__foot { flex: 0 0 auto; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
/* min-height: 0 e o que permite encolher dentro do flex e ativar a rolagem. */
.modal__body { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal__foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--border); background: #fff; border-radius: 0 0 14px 14px; }

@media (max-width: 640px) {
    .modal__box { width: calc(100% - 16px); max-height: calc(100vh - 24px); margin: 12px auto; }
    .modal__head { padding: 14px 16px; }
    .modal__body { padding: 14px 16px; }
    .modal__foot { padding: 12px 16px; }
    /* No celular o botao principal ocupa a linha toda: alvo maior para o dedo. */
    .modal__foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; }
.tab {
    padding: 7px 12px; border: none; background: none; cursor: pointer;
    font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--text-muted);
    border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--blue-900); }
.tab.is-active { color: var(--blue-900); border-bottom-color: var(--gold-500); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------------------------------------------------------------- steps */

.steps { display: flex; flex-direction: column; gap: 8px; }
.step-row {
    display: grid; grid-template-columns: 30px 1fr 150px; gap: 12px; align-items: center;
    padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
}
.step-row.is-done { background: var(--green-050); border-color: #CBDAC2; }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #F2F4F7; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.step-row.is-done .step-num { background: var(--green-500); color: #fff; }
.step-row__title { font-size: 13.5px; font-weight: 500; }
.step-row__notes { font-size: 12px; color: var(--text-muted); }

/* -------------------------------------------------- funil de prospeccao */

.prosp-funnel {
    display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap;
}
.prosp-step {
    flex: 1; min-width: 118px;
    display: flex; flex-direction: column; gap: 3px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, .06);
    border-radius: var(--radius-sm);
}
.prosp-step__value { font-size: 26px; font-weight: 700; color: #fff; line-height: 1.05; }
.prosp-step__label { font-size: 11.5px; color: #C9D6E5; line-height: 1.3; }
.prosp-step__hint { font-size: 10.5px; color: #7F97B3; }
.prosp-step:nth-child(5) { background: rgba(200, 155, 60, .18); }
.prosp-step:nth-child(5) .prosp-step__value { color: var(--gold-200); }
.prosp-step:nth-child(9) { background: rgba(94, 127, 78, .22); }

.prosp-arrow {
    align-self: center; color: #5B7593; font-size: 20px; line-height: 1;
}

@media (max-width: 900px) {
    .prosp-arrow { display: none; }
    .prosp-step { min-width: calc(50% - 3px); }
}

/* ------------------------------------------------ checklist da mentoria */

/* Todos os blocos com a mesma margem: com margem extra no primeiro,
   ele descia e desalinhava da coluna vizinha. */
.ck-group { margin-top: 10px; }
.ck-group:first-child { margin-top: 0; }

.ck-group__head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    min-height: 48px;
    padding: 6px 10px;
    background: #F7F8FA; border: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.ck-group__title { display: block; font-size: 13px; color: var(--blue-900); }
.ck-group__head .faint { font-size: 11.5px; }

/* Uma linha por item: marcar, ler o nome e escolher a situação.
   Sem nota e sem data - repetiam a mesma informação em todos os itens
   e triplicavam a altura da lista. */
.ck-item {
    /*
     * Duas linhas:  [check] titulo .......... [Tinha] [situacao]
     *                       anotacao ..........................
     *
     * Em uma linha so, com cinco colunas, o titulo ficava com 1fr depois de
     * tres colunas fixas - e num card estreito esse 1fr colapsa para zero:
     * o texto do item desaparecia da tela.
     */
    /*
     * Duas linhas SEMPRE:
     *   [x] titulo do item ...........................
     *       [quando chegamos] [situacao] [anotacao ...]
     *
     * Em uma linha so eram cinco colunas. Com os blocos lado a lado cada um
     * fica com um terco da tela, e cinco colunas nao cabem: os campos
     * vazavam por cima do bloco vizinho. Empilhado, cabe em qualquer
     * largura, do bloco estreito a tela inteira.
     */
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 5px 7px; align-items: center;
    padding: 5px 8px;
    border: 1px solid var(--border); border-top: none;
    background: #fff;
    min-width: 0;
}
.ck-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
/* Controles compactos: o item e uma linha de leitura rapida, nao um formulario. */
.ck-item .select {
    min-height: 25px; font-size: 11.5px; width: 118px;
    padding: 2px 20px 2px 7px; background-size: 15px; background-position: right 4px center;
}
.ck-item__check input { width: 15px; height: 15px; }
.ck-item { min-height: 33px; }
/* Titulo em no maximo 2 linhas: alem disso o bloco cresce sozinho e
   desalinha da coluna vizinha. O titulo completo fica no title=. */
.ck-item__title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.28;
}

/*
 * Desktop: as AREAS ficam lado a lado, cada uma inteira na sua coluna,
 * com os itens empilhados dentro. Em coluna unica, um checklist de 35
 * itens deixa metade da tela vazia e obriga a rolar demais.
 *
 * column-count e nao grid: as areas tem alturas diferentes e assim se
 * encaixam sem deixar buraco no fim de cada coluna.
 */
.ck-groups { margin-top: 12px; }

/* Com um unico bloco, ele ocupa a largura toda. A grade de 2 e 3 colunas
   existia para varios blocos lado a lado; com um so, ela deixava o
   checklist espremido em um terco da tela e o resto vazio. */
.ck-groups:has(> .ck-group:only-child) { display: block; }

@media (min-width: 1150px) {
    /* Grade: os blocos da mesma linha ficam com a MESMA altura, sem
       depender de quantas linhas o titulo de cada item ocupou. */
    .ck-groups {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
    }
    .ck-group, .ck-group:first-child { margin: 0; display: flex; flex-direction: column; }
    .ck-group__body { flex: 1; }
    .ck-item .select { width: 112px; }
}

@media (min-width: 1560px) {
    .ck-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ck-item.is-done { background: var(--green-050); }
.ck-item.is-done .ck-item__title { color: #406032; }
.ck-item.is-skipped { opacity: .55; }
.ck-item.is-skipped .ck-item__title { text-decoration: line-through; }

.ck-item__check { display: grid; place-items: center; }
.ck-item__check input { width: 18px; height: 18px; accent-color: var(--green-500); cursor: pointer; }

.ck-item__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ck-item__title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.ck-item__body .input { min-height: 30px; font-size: 12.5px; padding: 4px 9px; background: transparent; border-color: transparent; }
.ck-item__body .input:hover { border-color: var(--border); background: #fff; }
.ck-item__body .input:focus { border-color: var(--blue-700); background: #fff; }

.ck-item__meta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.ck-item__meta .select { min-height: 32px; font-size: 12.5px; width: 128px; }

/* ---------------------------------------------------------------- toast */

.toast {
    position: fixed; right: 20px; bottom: 20px; z-index: 90;
    padding: 12px 18px; border-radius: var(--radius-sm);
    background: var(--blue-900); color: #fff; font-size: 13.5px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .22);
    max-width: 360px;
}
.toast.is-error { background: var(--red-500); }
.toast.is-success { background: var(--green-500); }

/* ---------------------------------------------------------------- misc */

.chart-box { position: relative; height: 200px; }
.chart-box--sm { height: 170px; }
.chart-box--s { height: 236px; }   /* Curva S merece mais altura: e a leitura principal */

.divider { height: 1px; background: var(--border); border: none; margin: 11px 0; }

.dl { display: grid; grid-template-columns: 118px 1fr; gap: 5px 10px; font-size: 12.5px; }
.dl dt { color: var(--text-faint); font-size: 12.5px; }
.dl dd { margin: 0; color: var(--text); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.pagination a, .pagination span {
    min-width: 34px; height: 34px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-muted); background: #fff;
}
.pagination .is-current { background: var(--blue-900); border-color: var(--blue-900); color: #fff; font-weight: 600; }

.print-only { display: none; }

/* --------------------------------------------------- voltar ao topo */

.ao-topo {
    position: fixed; right: 16px; bottom: 16px; z-index: 45;
    width: 42px; height: 42px; padding: 0;
    display: grid; place-items: center;
    border: 1px solid var(--border); border-radius: 50%;
    background: #fff; color: var(--blue-900);
    box-shadow: 0 3px 12px rgba(16, 24, 40, .14);
    cursor: pointer;
}
.ao-topo:hover { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }
.ao-topo svg { width: 20px; height: 20px; fill: currentColor; }
.ao-topo[hidden] { display: none; }
.present-mode .ao-topo { display: none; }

/* --------------------------------- barra de acao no fim da pagina */

.acoes-fim {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    flex-wrap: wrap;
    margin-top: var(--gap);
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.acoes-fim strong { display: block; font-size: 13.5px; color: var(--blue-900); }
.acoes-fim .faint { display: block; margin-top: 2px; max-width: 62ch; }
.acoes-fim .btn { min-width: 170px; }

/* Editor do termo: monoespacado, e compacto SO no desktop, onde o texto
   e longo e a tela e larga. A regra fica presa a uma media query porque
   .textarea[data-mono] tem especificidade maior que o .textarea do
   responsive.css - solta, ela venceria tambem no celular, e o Safari daria
   zoom ao focar num campo abaixo de 16px. */
@media (min-width: 721px) {
    .textarea[data-mono] { font-size: 12.5px; }
}

/* ------------------------------------- checklist: "tinha" e anotacao curta
   O "Tinha" e o ponto de partida da empresa; a nota explica o caso dela
   ("tinha, mas com pouco alcance"). Sem os dois o checklist diz o que foi
   feito, nunca de onde se partiu. */
.ck-item__tinha {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: var(--text-muted);
    white-space: nowrap; cursor: pointer;
}
.ck-item__tinha input { margin: 0; }
.ck-item__tinha:has(input:checked) { color: var(--blue-900); font-weight: 600; }
.ck-item__title { grid-column: 2; grid-row: 1; }

/* Os tres controles dividem a segunda linha, embaixo do titulo. */
.ck-item__controles {
    grid-column: 2; grid-row: 2;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 6px; align-items: center; min-width: 0;
}
.ck-item__tinha,
.ck-item .select,
.ck-item__nota { width: 100%; min-width: 0; }
.ck-item__tinha, .ck-item .select { font-size: 12px; min-height: 30px; padding: 3px 6px; }
.ck-item__nota { font-size: 12px; min-height: 30px; padding: 4px 8px; }
