/* Reset de margens e paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Garantir que o HTML e o body ocupem 100% da altura da tela */
html, body {
    height: 100%;
    min-height: 100vh;
}

/* Layout flexível para empurrar o footer para o final */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 600px;
    background-color: #1b2653;
    margin: 0 10px 0 10px;
    padding-top: 10px;
}

.debug {
    grid-column: 1 / -1;
    max-width: 100% !important;
}

/* Container do header */
header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    font-size: 1rem;
    border: 0px;
}

/* Navegação */
nav ul {
    position: relative;
    padding: 10px 40px;
    list-style: none;
    display: flex;
    background-color: #1b2653;
    border-bottom-right-radius: 25px 20px;
    border-bottom-left-radius: 25px 20px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffffcc;
    font-weight: bold;
}

header nav a::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 0;
    width: 40px;
    height: 20px;
    background-color: #fff;
    border-top-right-radius: 60% 100%;
    box-shadow: 5px -5px 0 5px #1b2653;
    transition: all 0.3s ease-in-out;
}

header nav a::after {
    content: '';
    position: absolute;
    right: -40px;
    top: 0;
    width: 40px;
    height: 20px;
    background-color: #fff;
    border-top-left-radius: 60% 100%;
    box-shadow: -5px -5px 0 5px #1b2653;
    transition: all 0.3s ease-in-out;
}

nav ul li a:hover {
    color: #fff;
    transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    padding: 20px;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    background-color: #fff;
}

.main-content h1 {
    color: #1b2653;
    margin-bottom: 20px;
    font-size: 2rem;
    border-bottom: 2px solid #ddd;
}

/* Estilização dos botões */
.btn {
    display: block;
    margin: 20px auto 0;
    padding: 10px;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.btn-form {
    margin: auto 0;
}

.btn-primary {
    background-color: #0748B6;
}

.btn-primary:hover {
    background-color: #2e6cd8;
    transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-submit {
    background-color: #00a847;
}

.btn-submit:hover {
    background-color: #00bd68;
    transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger {
    background-color: #b60707;
}

.btn-danger:hover {
    background-color: #d82e2e;
    transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Estilização dos containers*/
.container {
    display: grid ;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    color: #2a3e52;
}

.container h2 {
    margin-bottom: 20px;
    text-align: center;
}

.scroll-box {
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
    background-color: transparent;
}

/* Estilização genérica para seções */
.section {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #ccc;
    padding: 25px;
    border-radius: 10px;
    background-color: RGBA(209, 212, 221, 0.4);
}

/* Estilização do formulário */
.form-section label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.form-section input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #aaa;
    box-sizing: border-box;
}

.creci-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 15px;
}

.creci-info {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.creci-info select {
    width: 80%;
    min-width: 100px;
    max-width: 200px;
    padding: 6px;
}

.creci-info label {
    margin: 0;
}

/* Estilização da tabela */
.table-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    padding: 20px;
    border-radius: 10px;
}
.table-section th, td {
    border: 1px solid #1b2653;
    padding: 10px;
    text-align: left;
    background-color: white;
}
.table-section th {
    background-color: RGBA(209, 212, 221, 0.4);
}

/* Footer */
footer {
    padding: 20px 0;
    font-family: Arial, sans-serif;
}

.footer-container {
    color: #ffffffcc;
    padding: 20px;
    text-align: center;
    width: 100%;
}

.footer-container {
    padding: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Estilização dos blocos */
.contact-info, .app-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 20px 0 20px;
}

.contact-info p,
.app-info p,
.copyright p {
    margin: 0;
    font-size: 14px;
}

.contact-info {
    text-align: left;
}

.app-info {
    text-align: right;
}

.copyright {
    text-align: center;
    font-size: 13px;
    border-top: 1px solid #ffffff7a;
    padding: 20px 20px 0 20px;
    font-weight: bold;
}

/* Estilização das mensagens */
.message {
    grid-column: 1 / -1;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.alert-secondary {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Responsividade: mobile */
@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-width: 600px;
        background-color: #1b2653;
        padding-top: 10px;
        margin: 0;
    }
    .footer-content,
    .container {
        grid-template-columns: 1fr; /* Empilha os blocos verticalmente */
        text-align: center;
    }

    .contact-info, .app-info {
        align-items: center; /* Centraliza os textos no mobile */
    }

    /* Estilização da tabela */
    table {
        border-collapse: collapse;
        width: 100%;
        margin: 0 auto;
    }
    th, td {
        border: 1px solid #1b2653;
        padding: 10px;
        text-align: left;
    }
    th {
        background-color: RGBA(209, 212, 221, 0.4);
    }

    /* Estilização do formulário */
    .form-section {
        width: 100%;
        margin: 0 auto;
        border: 1px solid #ccc;
        padding: 25px;
        border-radius: 10px;
        background-color: RGBA(209, 212, 221, 0.4);
    }
}

/* Responsividade: tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-content,
    .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info, .app-info {
        align-items: center; /* Centraliza os textos no tablet */
    }
}