/* Estilo base */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-image: url('../N_img/bckgrn.gif');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    color: rgb(3, 73, 100);
    box-sizing: border-box;
}

/* Container principal para formulários */
.login-container {
    background-color: rgba(150, 145, 145, 0.37);
    padding: 30px 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
}

/* Container para listagens */
.content-container {
    background-color: rgba(150, 145, 145, 0.37);
    padding: 30px 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
}

/* Título comum */
h2 {
    text-align: center;
    margin-bottom: 20px;
    /*background-color: rgb(3, 73, 100);*/
    color: white;
    padding: 10px;
    border-radius: 6px;
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-size: 18px;
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 250px;
}

/* Botões e links reutilizáveis */
.botao,
a.botao,
input[type="submit"],
input[type="reset"],
button.botao,
form.busca-form button,
form.busca-form a,
.scroll-top-btn a {
    background-color: rgb(3, 73, 100);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin: 5px 4px;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.2;

    /* largura fixa menor para botões desktop */
    width: 130px;
}

.botao:hover,
a.botao:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
button.botao:hover,
form.busca-form button:hover,
form.busca-form a:hover,
.scroll-top-btn a:hover {
    background-color: rgb(0, 50, 70);
}

/* Tabela */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    color: #000;
    border-radius: 6px;
    overflow: hidden;
}

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

th {
    background-color: rgb(3, 73, 100);
    color: white;
}

/* Formulário de busca */
form.busca-form {
    text-align: center;
    margin-bottom: 20px;
}

form.busca-form input[type="text"] {
    padding: 8px;
    width: 70%;
    max-width: 300px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Botão topo */
.scroll-top-btn {
    text-align: center;
    margin-top: 30px;
}

/* Ações (ícones de edição e exclusão) */
.actions a {
    margin: 0 5px;
    font-weight: bold;
    color: rgb(3, 73, 100);
}

.actions a:hover {
    color: white;
    background-color: rgb(3, 73, 100);
}

/* Responsividade geral e proporcionalidade no mobile */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .login-container,
    .content-container {
        padding: 20px 15px;
    }

    h2 {
        font-size: 20px;
    }

    .form-group label {
        font-size: 16px;
    }

    input[type="text"],
    textarea {
        font-size: 16px;
        padding: 10px 12px;
    }

    form.busca-form {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    form.busca-form input[type="text"],
    form.busca-form button,
    form.busca-form a {
        width: 90%;
        margin: 6px 0;
        font-size: 18px;
        padding: 12px 14px;
    }

    .botao,
    a.botao,
    input[type="submit"],
    input[type="reset"],
    button.botao,
    form.busca-form button,
    form.busca-form a,
    .scroll-top-btn a {
        width: 40%; /* botões ocupam largura total no mobile */
        font-size: 18px;
        padding: 12px 16px;
        margin: 10px 0;
        display: block;
        box-sizing: border-box;
        text-align: center;
    }

    /* Tabela responsiva */
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }

    thead tr {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 10px;
        background-color: #fff;
    }

    td {
        text-align: left;
        font-size: 15px;
        color: #000;
        border: none;
        padding: 10px;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: rgb(3, 73, 100);
    }
}
