:root {
    --blue-main: #4f76b3;
    --blue-dark: #3f679f;
    --blue-soft: rgba(255, 255, 255, 0.28);
    --blue-soft-2: rgba(255, 255, 255, 0.18);
    --text-soft: #6b86b1;
    --shadow: 0 20px 40px rgba(79, 118, 179, 0.12);
    --danger-bg: rgba(248, 215, 218, 0.82);
    --danger-text: #842029;
    --success-bg: rgba(209, 231, 221, 0.82);
    --success-text: #0f5132;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #edf3fb;
}

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at 50% 40%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.65) 28%, rgba(228,238,250,0.45) 52%, rgba(192,212,237,0.35) 100%),
        linear-gradient(to bottom, #b9d0ea 0%, #dce7f3 48%, #eef4fb 100%);
}

.mist {
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.65);
}

.mist-1 {
    width: 900px;
    height: 180px;
    left: -80px;
    top: 320px;
}

.mist-2 {
    width: 760px;
    height: 160px;
    right: -100px;
    top: 140px;
}

.mist-3 {
    width: 1100px;
    height: 230px;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    opacity: 0.55;
}

.background-image {
    position: absolute;
    inset: 0;
    background-image: url("../../images/background-NWdiOGt.webp");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 0.42;
    pointer-events: none;
    z-index: 1;
}

.cloud-band {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    height: 220px;
    background:
        radial-gradient(circle at 10% 55%, rgba(255,255,255,0.95) 0 16%, transparent 17%),
        radial-gradient(circle at 24% 50%, rgba(255,255,255,0.92) 0 17%, transparent 18%),
        radial-gradient(circle at 39% 58%, rgba(255,255,255,0.94) 0 18%, transparent 19%),
        radial-gradient(circle at 55% 45%, rgba(255,255,255,0.96) 0 20%, transparent 21%),
        radial-gradient(circle at 72% 58%, rgba(255,255,255,0.93) 0 17%, transparent 18%),
        radial-gradient(circle at 87% 52%, rgba(255,255,255,0.94) 0 18%, transparent 19%),
        linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0.88));
    filter: blur(10px);
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.login-shell {
    position: relative;
    z-index: 2;
    width: min(100%, 1080px);
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
    gap: 3rem;
    align-items: center;
}

.brand-panel {
    color: var(--blue-dark);
}

.brand-title {
    margin: 0;
}

.brand-title img {
    display: block;
    width: min(100%, 520px);
    height: auto;
    margin: 0 auto;
}

.brand-subtitle {
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 18px;
    margin: 10px auto 0;
    color: #7d92b5;
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    font-style: italic;
    font-family: Georgia, "Times New Roman", serif;
}

.brand-subtitle::before,
.brand-subtitle::after {
    content: "";
    width: clamp(50px, 8vw, 110px);
    height: 2px;
    background: rgba(125, 146, 181, 0.35);
    border-radius: 999px;
}

.brand-copy {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: center;
}

.login-card {
    padding: 2rem;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,0.5), rgba(255,255,255,0.24));
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow:
        inset 0 10px 20px rgba(255,255,255,0.18),
        inset 0 -12px 20px rgba(110, 140, 185, 0.06),
        var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-card h1 {
    margin: 0 0 0.4rem;
    color: var(--blue-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
}

.login-intro {
    margin: 0 0 1.5rem;
    color: var(--text-soft);
    line-height: 1.6;
}

.flash,
.error-message {
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.flash {
    color: var(--success-text);
    background: var(--success-bg);
}

.error-message {
    color: var(--danger-text);
    background: var(--danger-bg);
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--blue-dark);
    font-size: 0.95rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(79, 118, 179, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    color: #35537f;
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.field input:focus {
    outline: none;
    border-color: rgba(79, 118, 179, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 118, 179, 0.12);
}

.submit-button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.95rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(63, 103, 159, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.submit-button:hover,
.submit-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(63, 103, 159, 0.28);
}

.login-footer {
    margin: 1.25rem 0 0;
    color: var(--text-soft);
    text-align: center;
}

.login-footer a {
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
}

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

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .brand-panel {
        text-align: center;
    }

    .brand-copy {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .login-page {
        padding: 1.25rem;
    }

    .login-card {
        padding: 1.4rem;
        border-radius: 22px;
    }
}
