/* ─── Fontes ──────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'ColourSans';
    src: url('./ColourSans.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ColourSans';
    src: url('./ColourSans-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ColourSans';
    src: url('./ColourSans-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ─── Variáveis ───────────────────────────────────────────────────────────── */
:root {
    --cor-bege:         #F5EDD9;
    --cor-azul-escuro:  #1B3A6B;
    --cor-dourado:      #8B6F3E;
    --cor-dourado-claro:#C4A265;
    --cor-branco:       #FFFFFF;
    --font:             'ColourSans', 'Segoe UI', Arial, sans-serif;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background-color: var(--cor-bege);
    background-image: url('../img/backgrounds/bg-texture_login_mobile.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Banner de listras ───────────────────────────────────────────────────── */
.stripe-banner {
    flex-shrink: 0;
    height: 18px;
    /*background-image: repeating-linear-gradient(
        -45deg,
        #4B72B0 0px,
        #4B72B0 9px,
        #FFFFFF 9px,
        #FFFFFF 18px
    );*/
    border-bottom: 3px solid #B8291A;
}

/* ─── Área principal ──────────────────────────────────────────────────────── */
.login-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 24px;
}

/* ─── Wrapper (contém o círculo + conteúdo) ───────────────────────────────── */
.login-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 440px;
}

/* Círculo decorativo — oculto no mobile */
.login-circle {
    display: none;
    pointer-events: none;
}

/* ─── Conteúdo do formulário ──────────────────────────────────────────────── */
.login-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── Header AkzoNobel ────────────────────────────────────────────────────── */
.akzo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.akzo-line {
    display: block;
    width: 52px;
    height: 1px;
    background: var(--cor-azul-escuro);
}
.akzo-text {
    font-size: 18px;
    font-weight: 400;
    color: var(--cor-azul-escuro);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ─── Logo ────────────────────────────────────────────────────────────────── */
.login-logo {
    width: 210px;
    height: auto;
    margin-bottom: 12px;
}

/* ─── Badge ALBÂNIA ───────────────────────────────────────────────────────── */
.albania-badge {
    display: inline-block;
    border: 1.5px solid var(--cor-azul-escuro);
    border-radius: 3px;
    padding: 3px 18px 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--cor-azul-escuro);
    text-transform: uppercase;
    margin-bottom: 22px;
}

/* ─── Tabs ────────────────────────────────────────────────────────────────── */
.login-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50px;
    padding: 4px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 18px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 50px;
    padding: 10px 6px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cor-azul-escuro);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
}

.tab-btn.active {
    background-color: var(--cor-azul-escuro);
    color: var(--cor-branco);
    box-shadow: 0 2px 8px rgba(27, 58, 107, 0.40);
}

.tab-btn:not(.active):hover {
    background: rgba(27, 58, 107, 0.08);
}

/* ─── Formulário ──────────────────────────────────────────────────────────── */
.login-form {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─── Campos ──────────────────────────────────────────────────────────────── */
.input-field {
    display: flex;
    align-items: center;
    background: var(--cor-branco);
    border-radius: 50px;
    border: 1.5px solid rgba(27, 58, 107, 0.18);
    padding: 13px 22px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus-within {
    border-color: rgba(27, 58, 107, 0.50);
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.07);
}

.input-label {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--cor-azul-escuro);
    white-space: nowrap;
    text-transform: uppercase;
    user-select: none;
    cursor: default;
}

.input-field input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font);
    font-size: 14px;
    color: var(--cor-azul-escuro);
}

.input-field input::placeholder {
    color: rgba(27, 58, 107, 0.28);
    font-size: 12px;
    font-weight: 300;
}

/* ─── Mensagens de feedback ───────────────────────────────────────────────── */
.login-sucesso {
    background: rgba(22, 101, 52, 0.08);
    border: 1px solid rgba(22, 101, 52, 0.30);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.login-error {
    background: rgba(184, 41, 26, 0.07);
    border: 1px solid rgba(184, 41, 26, 0.28);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #B8291A;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* ─── Instrução de recuperação ────────────────────────────────────────────── */
.recuperar-instrucao {
    font-size: 12px;
    font-weight: 400;
    color: var(--cor-azul-escuro);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
    line-height: 1.4;
    max-width: 360px;
}

/* ─── Ações ───────────────────────────────────────────────────────────────── */
.login-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 2px;
}

.btn-entrar {
    border: none;
    background: var(--cor-azul-escuro);
    color: var(--cor-branco);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 13px 36px;
    border-radius: 50px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(27, 58, 107, 0.38);
    transition: background-color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.btn-entrar:hover {
    background: #254f8f;
    box-shadow: 0 4px 16px rgba(27, 58, 107, 0.45);
}

.btn-entrar:disabled {
    opacity: 0.60;
    cursor: not-allowed;
    box-shadow: none;
}

.link-esqueci {
    font-size: 12px;
    font-weight: 400;
    color: var(--cor-azul-escuro);
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.link-esqueci:hover { text-decoration: underline; }

/* ─── Rodapé unificado: logos + links legais ──────────────────────────────── */
.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 24px 14px;
    background: rgba(245, 237, 217, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.brand-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.brand-logos img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

/* Pill com os links legais */
.legal-nav {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(90, 90, 90, 0.88);
    border-radius: 20px;
    padding: 7px 18px;
    flex-shrink: 0;
}

.legal-nav a {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    white-space: nowrap;
    padding: 0 8px;
    transition: color 0.15s;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    line-height: 1;
}

.legal-nav a:last-child { border-right: none; padding-right: 0; }
.legal-nav a:first-child { padding-left: 0; }

.legal-nav a:hover { color: #fff; }

/* ─── Desktop (≥ 1024 px) ─────────────────────────────────────────────────── */
@media (min-width: 1024px) {

    body {
        background-image: url('../img/backgrounds/bg-texture_login_desktop.png');
        background-position: center center;
    }

    .login-page {
        flex: 1;
        justify-content: center;
        padding: 40px 32px;
    }

    .login-wrapper {
        max-width: 1100px;
        align-items: center;
    }

    /* Círculo visível no desktop */
    .login-circle {
        display: block;
        position: absolute;
        width: 640px;
        height: 640px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        object-fit: contain;
        z-index: 0;
        opacity: 0.92;
        user-select: none;
    }

    .login-content {
        position: relative;
        z-index: 1;
        max-width: 420px;
        padding: 32px 0;
    }

    .akzo-text   { font-size: 20px; }

    .akzo-line   { width: 60px; }

    .login-logo  { width: 270px; margin-bottom: 14px; }

    .albania-badge { font-size: 11px; margin-bottom: 26px; }

    .login-tabs {
        max-width: 390px;
        margin-bottom: 22px;
        margin-top: 160px;
    }

    .tab-btn { font-size: 13px; padding: 11px 8px; }

    .login-form { max-width: 390px; gap: 14px; }

    .input-field  { padding: 14px 24px; }

    .input-label  { font-size: 12px; }

    .input-field input { font-size: 15px; }

    .btn-entrar { font-size: 14px; padding: 14px 44px; }

    .brand-logos img { height: 34px; }

    .legal-nav a { font-size: 10px; }
}

/* ─── Telas pequenas (< 380 px) ──────────────────────────────────────────── */
@media (max-width: 380px) {
    .login-page  { padding: 20px 16px 20px; }
    .login-logo  { width: 180px; }
    .tab-btn     { font-size: 10px; padding: 9px 4px; }
    .btn-entrar  { padding: 12px 28px; }
}

/* ─── Modal PDF ───────────────────────────────────────────────────────────── */
#pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#pdf-modal[hidden] { display: none; }

#pdf-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.pdf-modal-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    height: 84vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

#pdf-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #444;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    transition: background 0.15s, color 0.15s;
}
#pdf-modal-close:hover { background: rgba(0,0,0,0.08); color: #000; }

#pdf-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    margin-top: 40px;
}

[data-pdf] { cursor: pointer; }
