:root {
    --primary-dark: #14243b;
    --primary: #1b4263;
    --accent: #16877f;
    --text: #172033;
    --muted: #6f7b8e;
    --border: #dce3eb;
    --danger: #a52f40;
}

* {
    box-sizing: border-box;
}

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

body {
    overflow: hidden;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background: #111b2a;
}

button,
input {
    font: inherit;
}

.background-slider,
.background-overlay {
    position: fixed;
    inset: 0;
}

.background-slider {
    z-index: 0;
    overflow: hidden;
    background: #111b2a;
}

.background-slide {
    position: absolute;
    inset: -30px;
    opacity: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transform: scale(1.06);
    animation: backgroundRotation 24s infinite;
}

.background-slide-1 {
    background-image: url("/assets/img/risk-1.jpg");
    animation-delay: 0s;
}

.background-slide-2 {
    background-image: url("/assets/img/risk-2.jpg");
    animation-delay: 8s;
}

.background-slide-3 {
    background-image: url("/assets/img/risk-3.jpg");
    animation-delay: 16s;
}

.background-overlay {
    z-index: 1;
    background:
        linear-gradient(
            135deg,
            rgba(8, 18, 31, 0.62),
            rgba(10, 32, 44, 0.46)
        );
}

.login-page {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 40px 42px 30px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 30px 80px rgba(4, 13, 26, 0.48),
        0 8px 24px rgba(4, 13, 26, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.application-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.application-logo span {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #ffffff;
    background:
        linear-gradient(
            145deg,
            var(--primary),
            var(--accent)
        );
    box-shadow:
        0 14px 30px rgba(20, 83, 101, 0.28);
}

.login-header {
    margin-bottom: 29px;
    text-align: center;
}

.login-header h1 {
    margin: 0;
    font-size: 35px;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--primary-dark);
}

.login-header p {
    margin: 9px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 20px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    font-size: 13px;
    font-weight: 700;
    color: #344054;
}

.form-field input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: rgba(249, 251, 253, 0.96);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.form-field input::placeholder {
    color: #9aa5b3;
}

.form-field input:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(22, 135, 127, 0.12);
}

.login-form button {
    width: 100%;
    height: 53px;
    margin-top: 4px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 800;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );
    box-shadow:
        0 13px 28px rgba(22, 82, 102, 0.25);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.login-form button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 17px 34px rgba(22, 82, 102, 0.31);
}

.login-form button:active {
    transform: translateY(0);
}

.login-error {
    margin: 0 0 22px;
    padding: 13px 15px;
    border: 1px solid #efc4ca;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--danger);
    background: #fff1f3;
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 12px;
    color: #929cab;
}

@keyframes backgroundRotation {
    0% {
        opacity: 0;
        transform: scale(1.06);
    }

    5% {
        opacity: 1;
    }

    29% {
        opacity: 1;
        transform: scale(1);
    }

    34% {
        opacity: 0;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.06);
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 16px;
    }

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

    .application-logo span {
        width: 58px;
        height: 58px;
        border-radius: 16px;
        font-size: 18px;
    }

    .login-header h1 {
        font-size: 30px;
    }

    .login-header p {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .background-slide {
        animation: none;
    }

    .background-slide-1 {
        opacity: 1;
        transform: scale(1);
    }

    .background-slide-2,
    .background-slide-3 {
        display: none;
    }
}
