@charset "UTF-8";

/* ============================================================
   RESET GLOBAL — Remove margens/paddings padrão e unifica box-sizing
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   BODY — Estrutura base da página e padrão de fonte/cores
   ============================================================ */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ============================================================
   HEADER — Cabeçalho fixo com gradiente e sombra
   ============================================================ */
header {
    width: 100%;
    background: linear-gradient(to bottom, #ffffff, #cccccc);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ============================================================
   NAV MENU — Menu de navegação principal
   ============================================================ */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------
   LINKS DO MENU — Estilo tipo botão contornado (desktop)
   ------------------------------------------------------------ */
nav a {
    color: #004aad;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: 2px solid #004aad;
    background-color: transparent;
    transition: all 0.3s ease;
}

/* Hover dos links do menu */
nav a:hover {
    color: #ffffff;
    background-color: #004aad;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 74, 173, 0.2);
}

/* Efeito ao clicar */
nav a:active {
    transform: scale(0.98);
    background-color: #0066ff;
}

/* ============================================================
   AJUSTES POR PÁGINA — Mudança de alinhamento no menu
   ============================================================ */
.page-login header nav {
    justify-content: flex-end;
    padding-right: 20px;
    text-decoration: none;
}

.page-delete header nav,
.page-senha header nav,
.page-cadastro header nav,
.page-error header nav {
    justify-content: flex-start;
    padding-left: 20px;
    text-decoration: none;
}

/* ============================================================
   MAIN — Conteúdo principal centralizado
   ============================================================ */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 10px;
}

/* ============================================================
   CONTAINERS — Largura máxima e centralização
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================================
   CARDS — Blocos de conteúdo com sombra e padding
   ============================================================ */
.card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Tamanhos predefinidos para cards */
.card-sm { max-width: 400px; }
.card-md { max-width: 600px; }
.card-lg { max-width: 800px; }

/* Containers de formulários */
.delete-container,
.login-container,
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Cards de formulários (login, delete, cadastro) */
.delete-form,
.login-form,
.form-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

/* ============================================================
   TIPOGRAFIA — Estilos de títulos e classes utilitárias
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    color: #004aad;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

.text-center { text-align: center; }
.text-muted { color: #666; }

/* ============================================================
   FORMULÁRIOS — Inputs e labels modernos
   ============================================================ */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

/* Inputs gerais */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #999;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Foco no input — Destaque azul */
input:focus,
select:focus,
textarea:focus {
    border-color: #004aad;
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
    outline: none;
}

/* Área de texto */
textarea {
    min-height: 100px;
    resize: vertical;
}

/* ============================================================
   BOTÕES — Primário, secundário e outline
   ============================================================ */
button,
.btn,
input[type="submit"],
input[type="button"],
.inputSubmit {
    width: 100%;
    padding: 10px 20px;
    background-color: #004aad;
    text-decoration: none;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease,
                transform 0.2s ease,
                box-shadow 0.3s ease;
}

/* Hover do botão */
button:hover,
.btn:hover,
input[type="submit"]:hover,
.inputSubmit:hover {
    background-color: #0066ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Clicar no botão */
button:active {
    transform: translateY(0);
}

/* Botão secundário */
.btn-secondary {
    background-color: #333;
}

.btn-secondary:hover {
    background-color: #555;
}

/* Estilo botão contornado */
.btn-outline {
    background-color: transparent;
    color: #004aad;
    border: 2px solid #004aad;
}

.btn-outline:hover {
    background-color: #004aad;
    color: #fff;
}

/* ============================================================
   LINKS — Estilização padrão dos <a>
   ============================================================ */
a {
    color: #004aad;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0066ff;
}

/* ============================================================
   ALERTAS — Mensagens de erro, sucesso e aviso
   ============================================================ */
.alert, .erro, .sucesso, .aviso, .info {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
    text-align: center;
}

/* Tipos de alertas */
.erro {
    color: #d9534f;
    background: rgba(217, 83, 79, 0.1);
    border: 1px solid #d9534f;
}

.sucesso {
    color: #5cb85c;
    background: rgba(92,184,92,0.1);
    border: 1px solid #5cb85c;
}

.aviso {
    color: #f0ad4e;
    background: rgba(240,173,78,0.1);
    border: 1px solid #f0ad4e;
}

.info {
    color: #004aad;
    background: rgba(0,74,173,0.1);
    border: 1px solid #004aad;
}

/* ============================================================
   TABELAS — Layout estilizado com hover
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Cabeçalho */
thead {
    background: #004aad;
    color: #ffffff;
}

/* Células */
th, td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

/* Hover nas linhas */
tbody tr:hover {
    background-color: rgba(0,74,173,0.05);
}

/* ============================================================
   FOOTER — Rodapé com gradiente e sombra superior
   ============================================================ */
footer {
    background: linear-gradient(to bottom, #ffffff, #cccccc);
    width: 100%;
    text-align: center;
    padding: 20px 0;
    font-size: .9rem;
    color: #333;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    margin-top: auto;
}

/* ============================================================
   UTILITÁRIOS — Classes rápidas de espaçamento
   ============================================================ */
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

/* ============================================================
   PAGE-LOGIN — Controles especiais do menu da página de login
   ============================================================ */
.page-login #openMenu,
.page-login #closeMenu {
    display: none;
}

/* Menu normal no desktop */
.page-login #menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Conteúdo do menu */
.page-login #menu .menu-content {
    flex-direction: column;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: auto;
    margin-left: auto;
}

/* Links do menu lateral */
.page-login #menu a {
    text-decoration: none;
    font-weight: 600;
    padding: 8px 18px;
    transition: all 0.3s ease;
}

.page-login #menu a:hover {
    background-color: #004aad;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 74, 173, 0.2);
}

/* ============================================================
   RESPONSIVIDADE — Mobile até 600px
   ============================================================ */
@media (max-width: 600px) {

    /* Oculta o menu horizontal padrão */
    body.page-login header nav {
        display: none;
    }

    /* Botão hamburguer */
    .page-login #openMenu {
        display: block;
        font-size: 28px;
        text-align: right;
        background: none;
        border: none;
        cursor: pointer;
        color: #004aad;
        font-weight: bold;
    }

    /* Menu lateral tipo sidebar */
    .page-login #menu {
        position: fixed;
        top: 0;
        right: -260px;
        width: 260px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -2px 0 8px rgba(0,0,0,0.2);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 15px;
        opacity: 0;
        display: flex;
        z-index: 9999;
    }

    /* Botão X do menu */
    .page-login #closeMenu {
        display: block;
        background: #ffffff;
        color: #004aad;
        border: 2px solid #004aad;
        font-size: 1.2rem;
        font-weight: 600;
        width: 50%;
        text-align: center;
        padding: 10px 0;
        border-radius: 8px;
        cursor: pointer;
        margin: 20px 0 10px 0;
        align-self: center;
        transition: 0.3s ease;
    }

    .page-login #closeMenu:hover {
        background: #004aad;
        color: #ffffff;
        transform: scale(1.03);
        box-shadow: 0 4px 8px rgba(0, 74, 173, 0.2);
    }

    /* Links do menu empilhados */
    .page-login #menu a {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
}

/* ============================================================
   ANIMAÇÕES — Fade-in e spinner de loading
   ============================================================ */
@keyframes fadeIn {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:translateY(0); }
}

.fade-in { animation: fadeIn .5s ease-in-out; }

/* Loader animado */
.loading {
    display:inline-block;
    width:20px;
    height:20px;
    border:3px solid rgba(0,74,173,0.3);
    border-radius:50%;
    border-top-color:#004aad;
    animation:spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
