* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #f5f7f8;
}

/* =========================
   Page Split Layout
========================= */

.split-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 70px;
    width: 100%;
    max-width: 1300px;
}

/* =========================
   Outside Image
========================= */

.image-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
}

.image-side img {
    width: 100%;
    height: auto;
    mix-blend-mode: multiply; 
}

/* =========================
   Login Card
========================= */

.login-container {
    width: 100%;
    max-width: 520px;
    padding: 56px 48px;
    background: #ffffff;
    border: 1px solid #e5e9ec;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(35, 55, 65, 0.08);
    animation: cardAppear 0.45s ease;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Header
========================= */

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    background: #7db2cc;
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(125, 178, 204, 0.28);
}

.logo svg {
    width: 36px;
    height: 36px;
}

.login-header h1 {
    color: #26343b;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}

.login-header p {
    color: #7a878d;
    font-size: 16px;
}

/* =========================
   Error
========================= */

.error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 24px;
    background: #fff4f4;
    border: 1px solid #f3cccc;
    border-radius: 10px;
    color: #d64545;
    font-size: 15px;
}

.error-msg svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* =========================
   Form Elements
========================= */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #35444c;
    font-size: 15px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 22px;
    height: 22px;
    color: #9aa7ad;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    height: 58px;
    padding: 0 50px;
    border: 1px solid #d5dde1;
    border-radius: 12px;
    background: #ffffff;
    color: #26343b;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #a5afb4;
}

.input-wrapper input:hover {
    border-color: #b9c5ca;
}

.input-wrapper input:focus {
    border-color: #7db2cc;
    box-shadow: 0 0 0 3px rgba(125, 178, 204, 0.16);
}

.input-wrapper:focus-within .input-icon {
    color: #7db2cc;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #9aa7ad;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: #5d94ad;
    background: #eef6f9;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* =========================
   Remember Me
========================= */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6f7d84;
    font-size: 15px;
    cursor: pointer;
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: #7db2cc;
    cursor: pointer;
}

.remember-me span {
    user-select: none;
}

/* =========================
   Login Button & Loading Animation
========================= */

button[type="submit"] {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 12px;
    background: #7db2cc;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(125, 178, 204, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    
    /* Flexbox for spinner alignment */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

button[type="submit"]:hover {
    background: #6da5c0;
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(125, 178, 204, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

.btn-text {
    transition: opacity 0.2s ease;
}

.spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    animation: rotate 2s linear infinite;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

/* Loading State Classes */
button[type="submit"].is-loading {
    cursor: not-allowed;
    background: #6da5c0;
    pointer-events: none;
}

button[type="submit"].is-loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

button[type="submit"].is-loading .spinner {
    opacity: 1;
    visibility: visible;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* =========================
   Footer
========================= */

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: #a0aaaf;
    font-size: 14px;
}

/* =========================
   Mobile
========================= */

@media (max-width: 900px) {
    body {
        padding: 20px;
    }

    .split-layout {
        flex-direction: column-reverse; 
        gap: 40px;
    }

    .login-container {
        padding: 40px 28px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 32px;
    }

    .image-side {
        max-width: 350px;
    }
}