/**
 * /tools/lib/scdu/assets/css/login_views.css
 *
 * Estilos da view pública de autenticação.
 */

.login-page,
.login-page * {
    box-sizing: border-box;
}

.login-page {
    --login-primary: #4f46e5;
    --login-muted: rgba(203, 213, 255, 0.82);
    --login-border: rgba(148, 163, 184, 0.45);
    --login-field: rgba(15, 23, 42, 0.85);

    position: relative;

    width: 100%;
    min-height: calc(100vh - 100px);

    overflow: hidden;

    color: #88dfff;
    background: #02050b;
}

.login-page::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0.1)
        ),
        url("/tools/lib/scdu/assets/img/login-background.png")
        no-repeat center center;

    background-size: cover;

    filter: brightness(0.9);

    z-index: 0;
}

.login-overlay {
    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 28%,
            rgba(79, 70, 229, 0.08),
            transparent 34%
        ),
        linear-gradient(
            to bottom,
            rgba(2, 6, 15, 0.05),
            rgba(2, 6, 15, 0.28)
        );

    z-index: 1;
}

.login-page-wrapper {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: calc(100vh - 160px);

    padding: 42px 32px 54px;
}

.login-header-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;

    text-align: center;

    animation: loginFadeIn 0.8s ease both;
}

.login-title {
    margin: 0 0 30px;

    font-size: clamp(2.35rem, 4vw, 3.15rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0.05em;

    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.9);
}

.login-title strong {
    background: linear-gradient(
        120deg,
        #a855f7,
        #4f46e5,
        #22d3ee
    );

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
}

.auth-card {
    display: flex;
    align-items: stretch;
    justify-content: center;

    gap: 22px;

    width: min(100%, 640px);

    padding: 22px;

    border: 1px solid var(--login-border);
    border-radius: 18px;

    background: rgba(5, 8, 22, 0.28);

    box-shadow:
        0 22px 65px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.form-section {
    flex: 0 0 260px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 260px;
}

.response-message {
    min-height: 0;
    margin-bottom: 10px;
}

.form-control {
    display: block;

    width: 100%;
    height: 38px;

    margin: 0 0 9px;
    padding: 8px 11px;

    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 6px;

    background: var(--login-field);
    color: #f9fafb;

    font: inherit;
    font-size: 13px;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.12s ease;
}

.form-control::placeholder {
    color: rgba(148, 163, 184, 0.85);
}

.form-control:focus {
    outline: none;

    background: rgba(15, 23, 42, 0.98);
    border-color: var(--login-primary);

    box-shadow:
        0 0 0 2px rgba(79, 70, 229, 0.22),
        0 12px 30px rgba(15, 23, 42, 0.7);

    transform: translateY(-1px);
}

.password-wrapper {
    position: relative;

    width: 100%;
    margin-bottom: 9px;
}

.password-wrapper .form-control {
    margin-bottom: 0;
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;
    padding: 0;

    border: 0;

    background: transparent;

    cursor: pointer;

    transform: translateY(-50%);
}

.toggle-password:focus-visible {
    outline: 2px solid rgba(168, 85, 247, 0.8);
    outline-offset: 2px;

    border-radius: 5px;
}

.toggle-password svg {
    width: 17px;
    height: 17px;
}

.toggle-password .icon-eye ellipse,
.toggle-password .icon-eye-slash ellipse {
    fill: none;

    stroke: #ff4b4b;
    stroke-width: 2;
}

.toggle-password .icon-eye circle,
.toggle-password .icon-eye-slash circle {
    fill: #ff4b4b;
}

.toggle-password .icon-eye-slash line {
    stroke: #ff4b4b;
    stroke-width: 2;
}

.toggle-password .icon-eye-slash {
    display: none;
}

.btn1 {
    width: 100%;
    height: 36px;

    margin-top: 3px;
    padding: 0 16px;

    border: 0;
    border-radius: 999px;

    background: linear-gradient(
        135deg,
        #8ec5fc,
        #e0c3fc
    );

    color: #111827;

    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        filter 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.12s ease,
        opacity 0.2s ease;
}

.btn1:hover {
    filter: brightness(1.06);

    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.78);

    transform: translateY(-1px);
}

.btn1:active {
    transform: translateY(1px);
}

.btn1:disabled {
    opacity: 0.65;

    cursor: wait;
    transform: none;
}

.alert {
    display: inline-block;

    max-width: 100%;

    padding: 6px 12px;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.55);
    color: #fefefe;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.alert-error {
    border-left: 4px solid #e53e3e;
}

.alert-success {
    border-left: 4px solid #38a169;
}

.forgot-password-link {
    margin: 9px 0 14px;

    font-size: 12px;
    text-align: right;
}

.forgot-password-link a {
    color: var(--login-muted);

    font-weight: 500;
    text-decoration: none;
}

.forgot-password-link a:hover {
    color: #a855f7;
    text-decoration: underline;
}

.secondary-links {
    margin: 0;

    color: #f1f1f1;

    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.secondary-links a {
    color: #a855f7;

    font-weight: 600;
    text-decoration: none;
}

.secondary-links a:hover {
    text-decoration: underline;
}

.image-section {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 190px;

    overflow: hidden;

    border-radius: 15px;

    background:
        radial-gradient(
            circle at top left,
            rgba(148, 163, 184, 0.2),
            transparent 60%
        ),
        rgba(15, 23, 42, 0.18);
}

.image-login {
    display: block;

    width: 200px;
    height: 200px;

    object-fit: contain;
}

.login-description {
    width: min(100%, 680px);

    margin: 22px auto 0;
    padding: 0 18px;

    color: rgba(203, 213, 255, 0.78);

    font-size: 13px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.025em;

    text-align: center;
    text-wrap: balance;
    white-space: normal;
    overflow-wrap: break-word;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .login-page-wrapper {
        min-height: auto;

        padding: 38px 20px 48px;
    }

    .login-title {
        margin-bottom: 26px;
    }

    .auth-card {
        flex-direction: column-reverse;

        width: min(100%, 380px);

        padding: 18px;
    }

    .form-section {
        flex: none;

        width: 100%;
    }

    .image-section {
        width: 100%;
        min-height: 135px;
    }

    .image-login {
        width: 150px;
        height: 135px;
    }

    .login-description {
        width: min(100%, 540px);

        margin-top: 20px;
        padding: 0 6px;

        font-size: 0.88rem;
        line-height: 1.6;
        letter-spacing: 0.015em;
    }
}

@media (max-width: 480px) {
    .login-page-wrapper {
        padding: 32px 14px 42px;
    }

    .login-title {
        margin-bottom: 22px;

        font-size: 1.95rem;
        letter-spacing: 0.035em;
    }

    .auth-card {
        padding: 15px;

        border-radius: 15px;
    }

    .image-section {
        min-height: 120px;
    }

    .image-login {
        width: 135px;
        height: 120px;
    }

    .login-description {
        margin-top: 18px;

        font-size: 0.84rem;
        line-height: 1.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-header-content {
        animation: none;
    }

    .form-control,
    .btn1 {
        transition: none;
    }
}