/* RESET */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* FUNDO */
body{
    background: linear-gradient(135deg, #74ebd5, #ACB6E5);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 40px;
    flex-wrap: wrap;
}

/* CARD PRINCIPAL */
.container{
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,.2);

    width: fit-content;
    min-width: 500px;
    max-width: 95%;
}

/* TÍTULO */
.container h3{
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

/* FORM */
form{
    display: flex;
    flex-direction: column;
}

label{
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

/* INPUTS + SELECT */
input,
select{
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: .3s;
    width: 100%;
    margin-bottom: 10px;
}

input:focus,
select:focus{
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76,175,80,.4);
}

/* BOTÃO */
button{
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4CAF50;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: .3s;
    margin-top: 10px;
}

button:hover{
    background: #43a047;
    transform: translateY(-2px);
}

/* TABELA */
table{
    width: max-content;   /* cresce conforme colunas */
    min-width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
}

/* CABEÇALHO */
th{
    background: #4CAF50;
    color: white;
    padding: 12px;
    white-space: nowrap;
}

/* CELULAS */
td{
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

/* LINHAS */
tr:nth-child(even){
    background: #f5f5f5;
}

tr:hover{
    background: #e8f5e9;
}

/* ERRO */
p{
    text-align: center;
    color: red;
    font-weight: bold;
    margin: 10px 0;
}

/* RESPONSIVO */
@media(max-width: 900px){

    body{
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .container{
        width: 95%;
        min-width: unset;
    }

    table{
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}