/* === RESET E FONTES === */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8f8f8;
}

/* === HEADER === */
header {
    padding: 20px;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
header h1 {
    margin: 0;
    font-size: 22px;
    color: #EE2737;
}
#total {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

/* === MAIN / CARDS === */
main {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* Card individual */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* === CAMPOS INPUT / SELECT === */
.field {
    position: relative;
    margin-top: 20px;
}

.field input,
.field select {
    width: 100%;
    padding: 14px 14px 14px 40px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
    text-transform: uppercase;
}

.field input:focus,
.field select:focus {
    border-color: #EE2737;
    box-shadow: 0 0 8px rgba(238,39,55,0.2);
}

/* Labels flutuantes */
.field label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    transition: 0.3s;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:not(:placeholder-shown) + label {
    top: -8px;
    left: 35px;
    font-size: 12px;
    color: #EE2737;
    background: #fff;
    padding: 0 5px;
}

/* Ícones nos inputs */
.field i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #EE2737;
    font-size: 16px;
}

/* Checkbox LGPD */
.field input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}
.field label[for^="lgpd"] {
    font-size: 14px;
    color: #555;
}

/* === BOTÃO === */
button {
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(90deg,#EE2737,#FF5C5C);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.4s;
}

button:hover {
    background: linear-gradient(90deg,#FF5C5C,#EE2737);
}

button .spinner {
    display: none;
    border: 3px solid #fff;
    border-top: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    background: #25D366;
    color: #fff;
    border-radius: 50px;
    opacity: 0;
    transition: 0.4s;
    pointer-events: none;
    z-index: 999;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    bottom: 50px;
}

/* === HIDDEN === */
.hidden { display: none; }

/* === RESPONSIVIDADE === */
@media(max-width:600px){
    main {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .field input, .field select {
        font-size: 14px;
        padding: 12px 12px 12px 36px;
    }
    button {
        font-size: 16px;
    }
}
