/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CORES */
:root {
    --bg-main: #f5f7fa;      /* branco gelo */
    --bg-card: #ffffff;
    --text-main: #2e2e2e;
    --text-muted: #6b7280;
    --accent: #2563eb;      /* azul discreto */
    --border: #e5e7eb;
}

/* BASE */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    background-color: #ffffff;
    overflow: hidden;
}

/* TOPO */
.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-img {
    width: 52px;
    height: 52px;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

.logo:hover .logo-img {
    opacity: 0.9;
}


/*CLASSES REFERENTES AOS LINKS DO MENU SUPERIOR*/
.menu {
    display: flex;
    padding-left: 40px;
    align-items: center;
    gap: 2rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    font-weight: 600;
}

.menu a {
    position: relative;
    padding: 6px 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: color 0.25s ease;
}

/* Linha animada */
.menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--accent),
        #38bdf8
    );
    transition: width 0.35s ease;
    border-radius: 2px;
}

/* Hover */
.menu a:hover {
    color: var(--accent);
    text-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.menu a:hover::after {
    width: 100%;
}

/* Item ativo */
.menu a.ativo {
    color: var(--accent);
}

.menu a.ativo::after {
    width: 100%;
}


/* MOBILE */
@media (max-width: 768px) {
    .topbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .menu {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0;
        margin-top: 1rem;
        gap: 1.2rem;
    }

    .menu-toggle {
        display: block;
    }

    .menu-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        animation: slideDown 0.3s ease;
        margin-right: 10px;
        align-items: left;
    }

    .menu-links.ativo {
        display: flex;
    }

    .menu a {
        padding: 8px 0;
        margin-left: 0;
        margin-right: 1rem;
        font-size: 0.95rem;
    }

}

/* Animação */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SEÇÕES */
section {
    margin-top: 3rem;
}

section h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

/* SOBRE */
.about p {

    color: var(--text-muted);
    font-size: 1.05rem;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card a {
    align-self: flex-start;
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
}

/* RODAPÉ */
.footer {
    margin-top: 4rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* ---------- ESTILIZAÇÃO ESPECÍFICA PARA PÁGINA DE Banco de Dados ---------- */

.titulo {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    color: #333;
    background: linear-gradient(90deg, #e6e9ec, #cfd3d6);
}

/* ---------- FORMULÁRIO ---------- */
.formulario {
    padding: 20px;
    background-color: #f9fafb;
    border-bottom: 1px solid gainsboro;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

label {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

input {
    width: 100%;
    padding: 8px;
    border: 1px solid gainsboro;
    border-radius: 4px;
    background-color: #ffffff;
}

input:focus {
    outline: none;
    border-color: #aeb4b8;
    background-color: #fdfefe;
}

.formulario input,
.formulario select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/*Estilo para erro de validação*/
.erro {
    color: #b00020;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.input-erro {
    border-color: #b00020 !important;
    background-color: #fff5f7;
}

/*Estilo para sucesso no envio do form*/
.sucesso {
    background-color: #f0fff4;
    border: 1px solid #9fd3b8;
    color: #1e6b3a;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

.sucessomsg {
    background-color: #f0fff4;
    border: 1px solid #9fd3b8;
    color: #1e6b3a;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

.erromsg {
    background-color: #fff1f0;
    border: 1px solid #d39f9f;
    color: #b00020;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

/* Remove o estilo nativo feio */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666'%3E%3Cpath d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

/* Foco igual ao input */
input:focus,
select:focus {
    outline: none;
    border-color: #aeb4b8;
    background-color: #fdfefe;
}

/* Hover sutil */
input:hover,
select:hover {
    border-color: #c2c7cc;
}

.btn-container {
    display: flex;
    align-items: flex-end;
    height: 100%;
}

.btn-container button {
    width: 100%;
}

button {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(90deg, #d9dde1, #bfc5ca);
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

/* ---------- TABELA ---------- */
.tabela-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #f9fafb;
    border-radius: 8px;
    position: relative;
}


table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: center;
    border: 1px solid gainsboro;
    color: #333;
}

th {
    background-color: #f0f2f4;
    font-weight: bold;
}

tr:nth-child(even) td {
    background-color: #f9fafb;
}

tr:nth-child(odd) td {
    background-color: #ffffff;
}
/*No mobile, a tabela vira cards*/
@media (max-width: 768px) {

    table thead {
        display: none;
    }

    table, 
    table tbody, 
    table tr, 
    table td {
        display: block;
        width: 100%;
    }

    table tr {
        margin-bottom: 15px;
        background: white;
        padding: 12px;
        border-radius: 8px;
    }

    table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 8px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: #555;
    }
}


.paragrafo_simples {
    text-align: justify;
}
