:root {
    --azul: #1e88e5;
    --azul-escuro: #1565c0;
    --azul-claro: #e3f2fd;
    --verde: #2e7d32;
    --vermelho: #c62828;
    --cinza: #607d8b;
    --texto: #1a2733;
    --borda: #d7e3ec;
    --fundo: #f4f8fb;
    --branco: #ffffff;
    --sombra: 0 2px 12px rgba(30, 60, 90, .08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    line-height: 1.5;
}

/* ---- Topo ---- */
.topo {
    background: linear-gradient(135deg, var(--azul), var(--azul-escuro));
    color: #fff;
    box-shadow: var(--sombra);
}
.topo-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.marca {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}
.menu a {
    color: #eaf4ff;
    text-decoration: none;
    margin-left: 18px;
    font-weight: 500;
    opacity: .9;
}
.menu a:hover { opacity: 1; text-decoration: underline; }

/* ---- Conteúdo ---- */
.conteudo {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 20px;
}

h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 16px; }
.subtitulo { color: var(--cinza); margin: 0 0 24px; }

/* ---- Cartões ---- */
.cartao {
    background: var(--branco);
    border: 1px solid var(--borda);
    border-radius: 12px;
    box-shadow: var(--sombra);
    padding: 22px;
    margin-bottom: 24px;
}

/* ---- Formulário ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.campo { display: flex; flex-direction: column; }
.campo.largo { grid-column: 1 / -1; }
label { font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.dica { font-weight: 400; color: var(--cinza); font-size: .82rem; }
input[type=text], input[type=tel], input[type=number], input[type=time], input[type=password], select, textarea {
    padding: 10px 12px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: var(--texto);
    font-family: inherit;
    resize: vertical;
}
code {
    background: var(--azul-claro);
    color: var(--azul-escuro);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: .9em;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px var(--azul-claro);
}

/* ---- Campo de telefone com prefixo +55 ---- */
.tel-grupo { display: flex; }
.tel-ddi {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #eef3f7;
    border: 1px solid var(--borda);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-weight: 600;
    color: var(--cinza);
    white-space: nowrap;
}
.tel-grupo input {
    border-radius: 0 8px 8px 0 !important;
    flex: 1;
}

/* ---- Botões ---- */
.botoes { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-primario { background: var(--azul); color: #fff; }
.btn-primario:hover { background: var(--azul-escuro); }
.btn-secundario { background: #eef3f7; color: var(--texto); }
.btn-secundario:hover { background: #e0e8ee; }
.btn-mini {
    padding: 5px 10px;
    font-size: .82rem;
    border-radius: 6px;
}

/* ---- Tabela ---- */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--borda); }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--cinza); }
tr:last-child td { border-bottom: none; }
.acoes { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Selos/badges ---- */
.selo {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}
.selo-ativo { background: #e6f4ea; color: var(--verde); }
.selo-pausado { background: #fdecec; color: var(--vermelho); }

/* ---- Alertas ---- */
.alerta {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}
.alerta-sucesso { background: #e6f4ea; color: var(--verde); border: 1px solid #b6dfc0; }
.alerta-erro { background: #fdecec; color: var(--vermelho); border: 1px solid #f3c2c2; }

/* ---- Vazio ---- */
.vazio { text-align: center; color: var(--cinza); padding: 30px 10px; }

/* ---- Rodapé ---- */
.rodape {
    text-align: center;
    color: var(--cinza);
    font-size: .85rem;
    padding: 30px 20px;
}

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