* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
    color: #17243a;
    background:
        radial-gradient(
            circle at 12% 38%,
            rgba(73, 138, 201, 0.11),
            transparent 27%
        ),
        radial-gradient(
            circle at 88% 44%,
            rgba(29, 78, 132, 0.09),
            transparent 29%
        ),
        linear-gradient(
            135deg,
            #f7faff 0%,
            #eef5fb 48%,
            #fbfcfe 100%
        );
}

.login-topbar {
    background:
        linear-gradient(
            90deg,
            #102746 0%,
            #12345a 55%,
            #0d294a 100%
        );
    box-shadow: 0 3px 14px rgba(12, 37, 68, 0.18);
}

.login-topbar-inner {
    max-width: 1500px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.login-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.login-subbrand {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.login-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 54px 24px 40px;
    overflow: hidden;
}

.login-stage::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    left: -240px;
    bottom: -190px;
    border-radius: 50%;
    border: 1px solid rgba(60, 125, 190, 0.12);
    box-shadow:
        0 0 0 55px rgba(60, 125, 190, 0.025),
        0 0 0 110px rgba(60, 125, 190, 0.018);
}

.login-stage::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -180px;
    top: 40px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(31, 87, 145, 0.08),
            transparent 68%
        );
}

.login-card {
    width: min(100%, 560px);
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(26, 67, 112, 0.08);
    border-radius: 22px;
    padding: 42px 54px 36px;
    box-shadow:
        0 24px 70px rgba(18, 50, 87, 0.12),
        0 4px 14px rgba(18, 50, 87, 0.05);
}

.login-logo-wrap {
    display: flex;
    justify-content: center;
}

.login-logo {
    display: block;
    width: min(100%, 330px);
    height: auto;
}

.login-separator {
    height: 1px;
    margin: 28px 0 28px;
    background:
        linear-gradient(
            90deg,
            transparent,
            #d8e1eb 14%,
            #d8e1eb 86%,
            transparent
        );
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.5px;
    color: #17243a;
}

.login-intro {
    margin: 9px 0 28px;
    text-align: center;
    color: #72839a;
    font-size: 15px;
    line-height: 1.5;
}

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #efc7c3;
    border-radius: 10px;
    background: #fff0ef;
    color: #a43a31;
    font-size: 14px;
}

.login-form label {
    display: block;
    margin: 0 0 7px;
    font-size: 15px;
    font-weight: 650;
    color: #17243a;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    height: 52px;
    margin: 0 0 20px;
    padding: 0 15px;
    border: 1px solid #cbd7e4;
    border-radius: 10px;
    background: #fbfcfe;
    color: #17243a;
    font-size: 15px;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    background: #ffffff;
    border-color: #2d72c3;
    box-shadow: 0 0 0 4px rgba(45, 114, 195, 0.10);
}

.login-button {
    width: 100%;
    height: 54px;
    margin-top: 4px;
    border: 0;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            #ff7418 0%,
            #ff841f 100%
        );
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(239, 107, 25, 0.22);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(239, 107, 25, 0.28);
}

.login-forgot {
    margin-top: 20px;
    text-align: center;
}

.login-forgot a {
    color: #1768d5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.login-forgot a:hover {
    text-decoration: underline;
}

.login-footer {
    min-height: 82px;
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #6d8099;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 760px) {
    .login-topbar-inner {
        min-height: 68px;
        padding: 0 20px;
    }

    .login-brand {
        font-size: 18px;
    }

    .login-subbrand {
        display: none;
    }

    .login-stage {
        padding: 32px 16px 26px;
    }

    .login-card {
        padding: 32px 26px 28px;
        border-radius: 18px;
    }

    .login-logo {
        width: 270px;
        max-width: 90%;
    }

    .login-card h1 {
        font-size: 24px;
    }

    .login-footer {
        font-size: 12px;
    }
}

/* Fundo odontológico discreto */
body.login-page {
    background:
        linear-gradient(
            rgba(244, 248, 252, 0.68),
            rgba(244, 248, 252, 0.68)
        ),
        url("/static/portal/login-bg-exame.png")
        center center / cover no-repeat fixed;
}

.login-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}
