* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { height: 100%; }

body {
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    background: url("../img/login-background.png") no-repeat left center / cover;
    background-color: #e9f0f8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-family: 'Inter', Arial, sans-serif;
}

/* overlay azul */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(30, 64, 175, 0.38);
    z-index: 0;
    pointer-events: none;
}

/* ── Layout ── */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(64px, 10vw, 140px);
    max-width: 1200px;
    width: 100%;
    padding: 40px clamp(20px, 4vw, 56px);
    z-index: 1;
    position: relative;
    box-sizing: border-box;
}

/* ── Lado esquerdo ── */
.left-side {
    flex: 0 1 360px;
    max-width: 400px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.left-side h1 {
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 700;
    line-height: 1.3;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.01em;
}

.left-side p {
    font-size: clamp(14px, 1.5vw, 17px);
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.65;
}

/* ── Lado direito ── */
.right-side {
    flex: 0 1 420px;          /* largura fixa razoável */
    max-width: 420px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Card ── */
.login-box {
    width: 100%;
    padding: 40px 36px 44px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.6) inset,
        0 2px 4px rgba(15,23,42,0.06),
        0 16px 48px rgba(15,23,42,0.14);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    text-align: center;
}

.login-logo {
    height: 64px;
    width: 64px;
    object-fit: contain;
    margin-bottom: 4px;
}

.login-box h1 {
    color: #286bd6;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
    font-family: 'Poppins', sans-serif;
}

.login-box h2 {
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}

/* ── Formulário ── */
.login-box form {
    text-align: left;
}

.input-box {
    position: relative;
    margin-bottom: 28px;       /* espaço para o label flutuante não colidir */
}

.input-box input {
    width: 100%;
    height: 48px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background: transparent;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    outline: none;
    padding: 16px 36px 0 0;   /* padding-top empurra texto pra baixo → dá espaço ao label flutuante */
    transition: border-color 0.25s;
}

.input-box input:hover,
.input-box input:focus {
    border-bottom-color: #1a6fbf;
}

/* label flutuante */
.input-box label {
    position: absolute;
    left: 0;
    top: 14px;                 /* alinhado ao texto quando vazio */
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #94a3b8;
    pointer-events: none;
    transition: top 0.22s ease, font-size 0.22s ease, color 0.22s ease;
    line-height: 1;
}

/* sobe o label quando focado OU preenchido */
.input-box input:focus + label,
.input-box input:not(:placeholder-shown) + label {
    top: 0px;
    font-size: 11px;
    color: #1a6fbf;
    font-weight: 600;
}

/* ícone */
.input-box i {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #cbd5e1;
    pointer-events: none;
    transition: color 0.25s;
}

.input-box input:focus ~ i {
    color: #1a6fbf;
}

/* mensagem de erro */
.text-danger {
    color: #b91c1c;
    font-size: 12px;
    margin: -18px 0 14px;
    display: block;
}

/* botão */
button[type="submit"] {
    width: 100%;
    padding: 13px 18px;
    border: none;
    background: #1a6fbf;
    color: white;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    margin-top: 4px;
    letter-spacing: 0.01em;
}

button[type="submit"]:hover {
    background: #155fa0;
    transform: translateY(-1px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* ── Esqueceu a senha ── */
.forgot-link {
    text-align: center;
    margin-bottom: 20px;
    margin-top: -8px;
}
.forgot-link a {
    font-size: 12px;
    color: #888;
    text-decoration: none;
    transition: color .2s;
}
.forgot-link a:hover { color: #0c4bd3; }

/* ── Responsivo ── */
@media (max-width: 820px) {
    body {
        align-items: center;
    }

    .container {
        flex-direction: column;
        padding: 32px 20px;
        gap: 20px;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .left-side {
        flex: 0 0 auto;
        max-width: 480px;
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .left-side h1 {
        font-size: clamp(22px, 5vw, 32px);
        line-height: 1.25;
    }

    .left-side p {
        font-size: 15px;
    }

    .right-side {
        flex: 0 0 auto;
        max-width: 480px;
        width: 100%;
    }

    .login-box {
        padding: 32px 28px 36px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
        gap: 16px;
    }

    .left-side h1 {
        font-size: 22px;
    }

    .left-side p {
        font-size: 14px;
    }

    .login-box {
        padding: 28px 20px 32px;
    }
}