/* Font loaded via <link> in each HTML head — no @import needed */

:root {
  --cor0: #DFEDFF;
  --cor1: #B4D5FF;
  --cor2: #A5BBD9;
  --cor3: #6786AE;
  --cor4: #1D3E8A;
  --cor5: #173459;

  --fonte-padrao: "Titillium Web", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--fonte-padrao);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100vh;
    background-color: var(--cor4);
}

main {
    display: flex;
    justify-content: center;
    height: 100vh;
}

/* ── Login form & nav container ───────────────────────────────────────────── */

#main_validation,
#login-form {
    margin: auto;
    display: flex;
    flex-direction: column;
}

:is(#main_validation, #login-form) > h1 {
    font-family: var(--fonte-padrao);
    color: var(--cor0);
    font-size: 3em;
    text-align: center;
    margin: 0 auto 20px;
}

#login-form > label {
    font-family: var(--fonte-padrao);
    color: var(--cor0);
    font-size: 1em;
    text-align: center;
    margin: 20px auto 4px;
}

#login-form input {
    width: 300px;
    height: 32px;
    margin: 0 auto;
    padding: 0 10px;
    border: 1px solid var(--cor3);
    border-radius: 4px;
    background-color: var(--cor5);
    color: var(--cor0);
    font-family: var(--fonte-padrao);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#login-form input:focus { border-color: var(--cor1); }

:is(#main_validation, #login-form) > .button_style {
    width: 100%;
    margin: 10px auto 0;
}

/* ── Menu principal (/redirec) ────────────────────────────────────────────── */

.menu-card {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 40px 48px 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    min-width: 320px;
    animation: menuFadeIn 0.25s ease;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.menu-subtitle {
    font-family: var(--fonte-padrao);
    color: var(--cor2);
    font-size: 0.82rem;
    text-align: center;
    margin: -12px 0 22px;
    letter-spacing: 0.02em;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-buttons .button_style {
    margin: 0;
    width: 260px;
    text-align: left;
}

.relatorios-card .menu-buttons {
    align-items: center;
}

.report-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-item .button_style { margin: 0; }

.report-updated {
    font-family: var(--fonte-padrao);
    font-size: 0.8rem;
    color: var(--cor1);
    width: 260px;
    text-align: center;
    letter-spacing: 0.01em;
}

.btn-logoff {
    margin: 22px auto 0 !important;
    width: 260px;
    background-color: transparent;
    color: var(--cor0);
    text-shadow: none;
    box-shadow: none;
    border: 1px solid var(--cor3);
}

.btn-logoff:hover,
.btn-logoff:active {
    background-color: rgba(255, 255, 255, 0.06);
    transform: none;
}

.btn-logoff:after { display: none; }

/* ── Link "Alterar senha" ─────────────────────────────────────────────────── */

.link-alterar {
    font-family: var(--fonte-padrao);
    font-size: 0.82rem;
    color: var(--cor2);
    text-align: center;
    margin-top: 14px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.link-alterar:hover {
    color: var(--cor0);
    text-decoration: underline;
}

/* ── Botão 3D (button_style) ──────────────────────────────────────────────── */

.button_style {
    margin: 40px auto;
    position: relative;
    font-family: var(--fonte-padrao);
    background-color: #f0f0f0;
    border: 0;
    color: #242424;
    border-radius: 0.5em;
    font-size: 1rem;
    padding: 0.375em 1em;
    font-weight: 600;
    text-shadow: 0 0.0625em 0 #fff;
    box-shadow:
        inset 0 0.0625em 0 0 #f4f4f4,
        0 0.0625em 0 0 #efefef,
        0 0.125em 0 0 #ececec,
        0 0.25em 0 0 #e0e0e0,
        0 0.3125em 0 0 #dedede,
        0 0.375em 0 0 #dcdcdc,
        0 0.425em 0 0 #cacaca,
        0 0.425em 0.5em 0 #cecece;
    transition: 0.25s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    cursor: pointer;

    &:active,
    &:hover {
        transform: translateY(0.225em);
        box-shadow:
            inset 0 0.03em 0 0 #f4f4f4,
            0 0.03em 0 0 #efefef,
            0 0.0625em 0 0 #ececec,
            0 0.125em 0 0 #e0e0e0,
            0 0.125em 0 0 #dedede,
            0 0.2em 0 0 #dcdcdc,
            0 0.225em 0 0 #cacaca,
            0 0.225em 0.375em 0 #cecece;

        &:after { height: calc(100% + 0.225em); }
    }

    &:after {
        position: absolute;
        content: "";
        display: block;
        width: 100%;
        height: calc(100% + 0.375em);
        top: 0;
        left: 0;
        background-color: transparent;
        transition: height 0.25s ease;
    }
}

/* ── Modal overlay ────────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(12, 28, 60, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden { display: none; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal card ───────────────────────────────────────────────────────────── */

.modal-card {
    position: relative;
    background-color: var(--cor4);
    border: 1px solid var(--cor3);
    border-radius: 10px;
    padding: 36px 40px 28px;
    width: 340px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    animation: slideUp 0.18s ease;
}

@keyframes slideUp {
    from { transform: translateY(18px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-card h2 {
    font-family: var(--fonte-padrao);
    color: var(--cor0);
    font-size: 1.45em;
    font-weight: 600;
    text-align: center;
    margin: 0 0 18px;
}

.modal-card label {
    font-family: var(--fonte-padrao);
    color: var(--cor0);
    font-size: 0.9em;
    margin: 14px 0 4px;
}

.modal-card input {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--cor3);
    border-radius: 4px;
    background-color: var(--cor5);
    color: var(--cor0);
    font-family: var(--fonte-padrao);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.modal-card input:focus { border-color: var(--cor1); }

.cp-hint {
    display: block;
    font-family: var(--fonte-padrao);
    color: var(--cor3);
    font-size: 0.72rem;
    margin-top: 4px;
}

/* ── Fechar (×) ───────────────────────────────────────────────────────────── */

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: var(--cor2);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.modal-close:hover {
    color: var(--cor0);
    background-color: rgba(255, 255, 255, 0.08);
}

/* ── Mensagem de feedback ─────────────────────────────────────────────────── */

.cp-msg {
    font-family: var(--fonte-padrao);
    font-size: 0.85rem;
    text-align: center;
    border-radius: 4px;
    padding: 7px 10px;
    margin-top: 14px;
}

.cp-msg.hidden { display: none; }

.cp-msg--ok   { background-color: rgba(50, 200, 100, 0.18); color: #7effa8; }
.cp-msg--erro { background-color: rgba(220, 60,  60, 0.18); color: #ffaaaa; }
.cp-msg--info { background-color: rgba(100,160, 255, 0.18); color: var(--cor1); }

/* ── Botões do modal ──────────────────────────────────────────────────────── */

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.btn-modal {
    flex: 1;
    font-family: var(--fonte-padrao);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-modal:hover  { opacity: 0.88; }
.btn-modal:active { transform: translateY(1px); }
.btn-modal:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-cancelar  { background-color: var(--cor3); color: var(--cor0); }
.btn-confirmar { background-color: var(--cor1); color: var(--cor5); }
