:root {
    --q2-blue: #087ec1;
    --q2-blue-dark: #075e98;
    --q2-blue-light: #1aaee8;
    --text-dark: #172033;
    --text-muted: #687386;
    --border: #dfe5ec;
    --background: #f5f8fb;
    --white: #ffffff;
    --danger: #c62828;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text-dark);
}

.login-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(480px, 1.08fr) minmax(440px, 0.92fr);
}

/* =========================
   LEFT VISUAL AREA
   ========================= */

.login-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 64px;
    background:
        linear-gradient(
            180deg,
            rgba(5, 27, 48, 0.05) 0%,
            rgba(5, 27, 48, 0.30) 52%,
            rgba(5, 27, 48, 0.88) 100%
        ),
        url("../images/Design01.jpeg") center center / cover no-repeat;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            135deg,
            rgba(0, 112, 184, 0.15),
            transparent 55%
        );
    pointer-events: none;
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: #ffffff;
}

.visual-content h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -1px;
}

.visual-content p {
    margin: 0;
    max-width: 560px;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

/* =========================
   RIGHT LOGIN AREA
   ========================= */

.login-area {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #ffffff;
}

.login-container {
    width: 100%;
    max-width: 430px;
}

/* =========================
   Q2 BRAND
   ========================= */

.brand {
    margin-bottom: 42px;
}

.brand-logo {
    display: block;
    width: 230px;
    max-width: 72%;
    height: auto;
    object-fit: contain;
    margin-bottom: 28px;
}

.brand h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-dark);
}

.brand p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* =========================
   FORM
   ========================= */

#loginForm {
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: #354052;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: var(--text-dark);
    font-size: 15px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #a0a9b7;
}

.form-group input:focus {
    border-color: var(--q2-blue);
    box-shadow: 0 0 0 3px rgba(8, 126, 193, 0.12);
}

/* =========================
   PASSWORD
   ========================= */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 86px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    padding: 7px 8px;
    background: transparent;
    color: var(--q2-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--q2-blue-dark);
}

/* =========================
   LOGIN MESSAGE
   ========================= */

.login-message {
    display: none;
    margin: 4px 0 18px;
    padding: 11px 13px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.45;
}

.login-message.error {
    display: block;
    background: #fff2f2;
    border: 1px solid #f1caca;
    color: var(--danger);
}

.login-message.success {
    display: block;
    background: #edf9f2;
    border: 1px solid #c5e9d2;
    color: #187a40;
}

/* =========================
   LOGIN BUTTON
   ========================= */

#loginButton {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(
        135deg,
        var(--q2-blue-dark),
        var(--q2-blue-light)
    );
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(8, 126, 193, 0.20);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

#loginButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 27px rgba(8, 126, 193, 0.27);
}

#loginButton:active {
    transform: translateY(0);
}

#loginButton:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

/* =========================
   FOOTER
   ========================= */

.login-footer {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid #edf0f4;
    text-align: center;
    color: #8b94a3;
    font-size: 12px;
    line-height: 1.5;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 360px;
        padding: 42px;
    }

    .login-area {
        min-height: auto;
        padding: 60px 28px;
    }
}

@media (max-width: 600px) {
    .login-visual {
        min-height: 280px;
        padding: 28px 24px;
    }

    .visual-content h2 {
        font-size: 30px;
    }

    .visual-content p {
        font-size: 15px;
    }

    .login-area {
        padding: 42px 22px;
    }

    .brand {
        margin-bottom: 32px;
    }

    .brand-logo {
        width: 190px;
    }
}
