/* --- 1. VARIÁVEIS --- */
:root {
    --primary: #1a237e;
    --accent: #3949ab;
    --bg-page: #f4f7f9;
    --white: #ffffff;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
}

/* --- 2. CENTRALIZAÇÃO TOTAL (BODY) --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

body {
    background-color: var(--bg-page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centraliza horizontal */
    justify-content: center; /* Centraliza vertical */
    padding: 40px 20px;
}

/* --- 3. BARRA NAV (ABSOLUTA) --- */
.top-nav-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.btn-nav {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    transition: 0.3s;
    font-size: 13px;
}

.btn-nav:hover { background: #f8fafc; transform: translateY(-2px); }

/* --- 4. ESTRUTURA DO CARD --- */
.logo-wrapper { margin-bottom: 20px; }
.logo-intro {
    background: url('../../../../Logomarca/Logo.png') no-repeat center;
    background-size: contain;
    height: 100px; width: 250px;
}

.container { width: 100%; max-width: 700px; }
.links { display: none; }

.form-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    display: none;
}

/* Alternância via Target */
#login { display: block; }
#paracadastro:target ~ .content #cadastro,
#paralogin:target ~ .content #login { display: block; }
#paracadastro:target ~ .content #login,
#paralogin:target ~ .content #cadastro { display: none; }

/* --- 5. CAMPOS E GRID --- */
h1 { color: var(--primary); text-align: center; margin-bottom: 30px; font-size: 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.full { grid-column: span 2; }

.field, p { display: flex; flex-direction: column; gap: 8px; }

label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }

input:not([type="submit"]) {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: 0.3s;
}

input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1); }

/* --- 6. BOTÕES E FOOTER --- */
.btn-main {
    width: 100%; padding: 16px;
    background: var(--primary); color: white;
    border: none; border-radius: 8px;
    font-size: 16px; font-weight: 700;
    cursor: pointer; margin-top: 10px;
    transition: 0.3s;
}

.btn-main:hover { background: var(--accent); transform: translateY(-1px); }

.form-footer {
    margin-top: 25px; padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center; font-size: 14px;
}

.form-footer a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* --- 7. RESPONSIVIDADE --- */
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .full { grid-column: span 1; }
    .top-nav-bar { position: relative; top: 0; right: 0; justify-content: center; margin-bottom: 20px; }
    body { justify-content: flex-start; }
}


/* Barra Superior */
.top-nav-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 60px;
    background: var(--white); display: flex; align-items: center;
    justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--border);
}
.btn-nav {
    background: var(--white); border: 1px solid var(--border); padding: 8px 15px;
    border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--primary);
}