/* Reset e Base - Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
}

/* Overlay para melhor leitura */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: -1;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

/* Card Principal */
.card {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.header {
    text-align: center;
    margin-bottom: 25px;
}

/* Foto da Criança */
.foto-crianca {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #c6dfb2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.foto-crianca img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

/* Formulário */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.campo label {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.campo input {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.campo input:focus {
    outline: none;
    border-color: #667eea;
}

/* Botões */
.btn {
    background: linear-gradient(135deg, #6a9943 0%, #5c9767 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
    display: block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    margin-top: 15px;
}

.btn-secondary:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Mensagens */
.mensagem {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.mensagem.sucesso {
    background: #d4edda;
    color: #155724;
}

.mensagem.erro {
    background: #f8d7da;
    color: #721c24;
}

.sucesso-info {
    text-align: center;
    padding: 20px 0;
}

.sucesso-info p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

/* Admin */
.admin-card {
    padding: 25px 20px;
}

.admin-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-card .header h1 {
    font-size: 1.5rem;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Resumo */
.resumo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.resumo-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.resumo-item .numero {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #3c4f38;
}

.resumo-item .label {
    font-size: 0.85rem;
    color: #666;
}

.resumo-item.total {
    background: #c6dfb2;
}

.resumo-item.total .numero,
.resumo-item.total .label {
    color: #333;
}

/* Lista de Confirmações */
.lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-info strong {
    color: #333;
    font-size: 1rem;
}

.detalhes {
    font-size: 0.85rem;
    color: #666;
}

.data {
    font-size: 0.75rem;
    color: #999;
}

.btn-excluir {
    background: #dc3545;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.9rem;
}

.sem-dados {
    text-align: center;
    color: #999;
    padding: 30px;
}

.link-voltar {
    text-align: center;
    margin-top: 20px;
}

.link-voltar a {
    color: #667eea;
    text-decoration: none;
}

/* Contador com botões +/- */
.contador {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f8f9fa;
    border-radius: 50px;
    overflow: hidden;
    border: none;
    width: 100%;
}

.contador input {
    flex: 1;
    text-align: center;
    border: none;
    background: #f0f0f0;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 18px 0;
    -moz-appearance: textfield;
    color: #333;
}

.contador input::-webkit-outer-spin-button,
.contador input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-contador {
    width: 70px;
    height: 60px;
    border: none;
    background: #4285f4;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-contador:hover {
    background: #3367d6;
}

.btn-contador:active {
    transform: scale(0.95);
}

.btn-contador.menos {
    background: #777777;
    border-radius: 50px 0 0 50px;
}

.btn-contador.menos:hover {
    background: #1c1c1c;
}

.btn-contador.mais {
    background: #34a853;
    border-radius: 0 50px 50px 0;
}

.btn-contador.mais:hover {
    background: #2d9248;
}

/* Botões de Ações Extras */
.acoes-extras {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.btn-acao {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f8f9fa;
    color: #333;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-acao:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-acao.google {
    background: #233d28;
    color: white;
}

.btn-acao.apple {
    background: #333;
    color: white;
}

/* Responsivo - Tablets e Desktop */
@media (min-width: 768px) {
    body {
        padding: 40px;
    }
    
    .card {
        padding: 40px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .resumo {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .acoes-extras {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .btn-acao {
        flex: 1;
        min-width: 140px;
    }
}
