* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(130 deg, #023d20 0%, #2b58a1 100%);
    padding: 30px 20px;
    margin: 0;
    color: #333;
}

.container {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.navegacao {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e3e7ee;
}

.navegacao a {
    padding: 8px 12px;
    color: #4a5868;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.navegacao a:hover,
.navegacao a.ativo {
    color: #1f8f3d;
    border-bottom-color: #28a745;
}

h2, h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #1f2d3d;
}

.cadastros-container {
    margin-top: 30px;
    border-top: 1px solid #e3e7ee;
    padding-top: 20px;
}

.lista-cadastros {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.barra-controle {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}
 
.barra-controle input {
    flex: 1;
}

.btn-limpar-todos {
    width: auto;
    margin: 0;
    background: linear-gradient(135deg, #dc3545, #b02a37);
    white-space: nowrap;
}

.cadastro-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    padding: 10px;
    background: #f9fbff;
}

.cadastro-acoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-editar {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    margin: 0;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #1da851);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    margin: 0;
}

.cadastro-foto {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dbe5f0;
    background: #edf3fb;
}

.cadastro-info {
    flex: 1;
    min-width: 0;
}

.cadastro-info strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.cadastro-info span {
    display: block;
    color: #4a5868;
    font-size: 0.85rem;
    line-height: 1.4;
}

.link-whatsapp {
    display: inline-block;
    color: #0d8f4e;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
}

.link-whatsapp:hover {
    text-decoration: underline;
}

.btn-excluir {
    background: #d9534f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    margin: 0;
}

.vazio {
    color: #6b7280;
    font-size: 0.95rem;
    text-align: center;
    padding: 10px 0;
}

label {
    font-weight: 700;
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    color: #2b3a4a;
}

input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
    outline: none;
}


select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
}

.whatsapp-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.whatsapp-container input {
    flex: 1;
}

button {
    background: linear-gradient(135deg, #28a745, #1f8f3d);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.whatsapp-container button {
    width: auto;
    margin-top: 0;
    white-space: nowrap;
    padding: 11px 14px;
}

.linha-dupla {
    display: flex;
    gap: 12px;
    width: 100%;
}

.linha-dupla > div {
    flex: 1;
}

.oficinas-container {
    margin-top: 30px;
    border-top: 1px solid #e3e7ee;
    padding-top: 20px;
}

.form-oficina {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-oficina label { margin-top: 0; }
.form-oficina button { margin: 8px 0 0; }
.form-oficina input { min-height: 46px; }
.label-dias { display: block; font-weight: 700; margin-bottom: 8px; color: #2b3a4a; }
.opcoes-dias { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.opcoes-dias label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; color: #4a5868; line-height: 1.2; }
.opcoes-dias input[type="checkbox"] { flex: 0 0 15px; width: 15px; height: 15px; min-height: 15px; margin: 0; accent-color: #28a745; }
.tabela-wrapper { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid #e3e7ee; text-align: left; }
th { color: #2b3a4a; font-size: 0.85rem; }
td { color: #4a5868; font-size: 0.9rem; }
.btn-tabela { width: auto; margin: 0 4px 0 0; padding: 6px 9px; font-size: 0.8rem; }
.btn-tabela.excluir { background: #d9534f; }

/* --- Regras do Rótulo de Idade --- */
.rotulo-idade {
    font-size: 0.9em;
    margin-top: 6px;
    font-weight: bold;
    color: #979688;
    min-height: 20px;
}

.texto-azul { color: #007bff !important; }
.texto-verde { color: #28a745 !important; }

.piscar-vermelho {
    color: red !important;
    animation: piscar 1s infinite;
}

@keyframes piscar {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@media (max-width: 540px) {
    .container {
        padding: 20px 16px;
    }

    .linha-dupla, .whatsapp-container {
        flex-direction: column;
    }

    .whatsapp-container button {
        width: 100%;
    }
}