/* ====== RESET ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: 20px;
    color: #333;

    /* Define a imagem de fundo */
    
    position: relative;
    /* Certifique-se de que o body tenha algum conteúdo ou altura */
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Coloca o pseudo-elemento atrás do conteúdo */
    
    /* Fundo repetido */
    background-image: url('../img/cara.png');
    background-repeat: repeat;
    background-size: 100px;

    /* Opacidade e inclinação */
    opacity: 0.3;
    transform-origin: center;
}


.container {
    background: #fff;
    max-width: auto;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #007bff;
}

/* ====== FORM ====== */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"], .selectItens {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

button {
    padding: 12px 25px;
    background: #28a745;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    max-width: 200px;
}

button:hover {
    background: #218838;
}

/* ====== TABLE ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    border: 1px solid #e5e5e5;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

th {
    background: #007bff;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background: #f2f2f2;
}

/* ====== ACTION BUTTONS ====== */
.acoes {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.acoes a {
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.editar {
    background: #ffc107;
    color: #000;
}

.imprimir {
    background: #17a2b8;
    color: #fff;
}

/* ====== RESPONSIVO ====== */
@media (max-width: 768px) {
    /* Transformar tabela em cards */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tbody tr {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 0 5px rgba(0,0,0,0.1);
    }

    td {
        text-align: left;
        padding: 8px 10px;
        border: none;
        position: relative;
        padding-left: 45%;
        font-size: 14px;
    }

    td::before {
        position: absolute;
        left: 15px;
        font-weight: bold;
        color: #007bff;
    }

    td:nth-of-type(1)::before { content: "ID"; }
    td:nth-of-type(2)::before { content: "Nome"; }
    td:nth-of-type(3)::before { content: "Representação"; }
    td:nth-of-type(4)::before { content: "Crachá"; }
    td:nth-of-type(5)::before { content: "Município"; }
    td:nth-of-type(6)::before { content: "Cadastro"; }
    td:nth-of-type(7)::before { content: "Ações"; }

    .acoes {
        justify-content: flex-start;
    }
}

/* Mensagem de erro */
.mensagem-erro {
    text-align: center;
    color: red;
    margin-top: 10px;
    font-weight: bold;
}

/* Mensagem de resultado */
.resultado-titulo {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #555;
}