/*
 * Os valores são os do coaching-app: os mesmos consultores usam-no todos os
 * dias, por isso não têm nada a aprender aqui.
 * A excepção deliberada é o ecrã da chamada — está em chamada.css.
 */

:root {
    --red: #EE3A24;
    --red-dark: #C0311B;
    --red-light: #FFF0EE;
    --green: #2E7D32;
    --orange: #E65100;
    --blue: #1565C0;

    --texto: #1a1a1a;
    --texto-suave: #666;
    --linha: #e5e5e5;
    --fundo: #f7f7f7;

    --raio: 8px;
    --sombra: 0 1px 3px rgba(0, 0, 0, .08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--texto);
    background: var(--fundo);
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: "Barlow Condensed", -apple-system, sans-serif;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

a { color: var(--red-dark); }

/* --- Cabeçalho ------------------------------------------------------------ */

.topo {
    background: #fff;
    border-bottom: 1px solid var(--linha);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.topo__marca {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
}
.topo__nav { display: flex; gap: 1rem; margin-left: auto; align-items: center; }
.topo__nav a { color: var(--texto-suave); text-decoration: none; font-size: .95rem; }
.topo__nav a:hover { color: var(--texto); }

.conteudo { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

/* --- Blocos --------------------------------------------------------------- */

.cartao {
    background: #fff;
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 1rem;
}
.cartao--atraso { border-left: 4px solid var(--red); }

.grelha {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* --- Botões --------------------------------------------------------------- */

.botao {
    display: inline-block;
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: var(--raio);
    padding: .6rem 1.2rem;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.botao:hover { background: var(--red-dark); }
.botao--secundario {
    background: #fff;
    color: var(--texto);
    border: 1px solid var(--linha);
}
.botao--secundario:hover { background: var(--fundo); }
.botao--pequeno { padding: .35rem .7rem; font-size: .85rem; }

/* --- Etiquetas ------------------------------------------------------------ */

.etiqueta {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}
.etiqueta--quente { background: var(--red-light); color: var(--red-dark); }
.etiqueta--morna  { background: #FFF4E5; color: var(--orange); }
.etiqueta--fria   { background: #E8F1FB; color: var(--blue); }
.etiqueta--atraso { background: var(--red); color: #fff; }
.etiqueta--ok     { background: #E8F5E9; color: var(--green); }
.etiqueta--parada { background: #FFF4E5; color: var(--orange); }
.etiqueta--neutra { background: var(--fundo); color: var(--texto-suave); }

/* --- Formulários ---------------------------------------------------------- */

.campo { margin-bottom: 1rem; }
.campo label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .3rem;
}
.campo input, .campo select, .campo textarea {
    width: 100%;
    padding: .6rem;
    border: 1px solid var(--linha);
    border-radius: var(--raio);
    font: inherit;
    background: #fff;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
    outline: 2px solid var(--red);
    outline-offset: -1px;
}

.aviso {
    padding: .75rem 1rem;
    border-radius: var(--raio);
    margin-bottom: 1rem;
}
.aviso--erro { background: var(--red-light); color: var(--red-dark); }
.aviso--ok   { background: #E8F5E9; color: var(--green); }

/* --- Entrada -------------------------------------------------------------- */

.entrada { max-width: 380px; margin: 4rem auto; }

/* O logótipo fala por si: sem títulos nem subtítulos à volta.
   Versão B do manual de normas: branco sobre fundo Red Lead.
   A folga à volta segue a área de segurança do manual. */
.entrada__marca {
    background: var(--red);
    border-radius: var(--raio);
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}
.entrada__marca img {
    display: block;
    width: 100%;
    max-width: 230px;
    height: auto;
}

@media (max-width: 600px) {
    .entrada { margin: 2rem auto; }
}

/* --- Tipografia auxiliar -------------------------------------------------- */

.suave { color: var(--texto-suave); font-size: .9rem; }
.mono  { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.vazio { color: var(--texto-suave); text-align: center; padding: 3rem 1rem; }

/* Desktop primeiro (80% das chamadas); funcional no telemóvel. */
@media (max-width: 600px) {
    body { font-size: 1.05rem; }
    .grelha { grid-template-columns: 1fr; }
    .conteudo { padding: 1rem; }
    .topo { padding: .75rem 1rem; gap: 1rem; }
}

/* --- Tabelas -------------------------------------------------------------- */

/* Uma lista de 41 leads lê-se melhor do que 41 cartões empilhados. */
.tabela-fora { overflow-x: auto; }

.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.tabela th {
    text-align: left;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--texto-suave);
    font-weight: 600;
    padding: .5rem .6rem;
    border-bottom: 1px solid var(--linha);
    white-space: nowrap;
}
.tabela td {
    padding: .55rem .6rem;
    border-bottom: 1px solid var(--linha);
    vertical-align: middle;
}
.tabela tbody tr:hover { background: var(--fundo); }
.tabela input[type="checkbox"] { width: 1.05rem; height: 1.05rem; cursor: pointer; }

/* --- Abas por projecto ---------------------------------------------------- */

/* Só aparecem quando há mais do que um projecto: hoje há só as recuperadas,
   e uma aba sozinha não diz nada a ninguém. */
.abas {
    display: flex;
    gap: .25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--linha);
}
.abas a {
    padding: .5rem .9rem;
    text-decoration: none;
    color: var(--texto-suave);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.abas a:hover { color: var(--texto); }
.abas a.actual {
    color: var(--red);
    border-bottom-color: var(--red);
    font-weight: 600;
}

.etiqueta--projecto { background: #EEF2FF; color: #3730A3; }
