/* ==========================
   JD KNOWLEDGE AUTH PAGES
   Login + Registration
========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    padding: 14px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow-y: auto;

    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #07162f, #0d326b);
}

.login-page,
.login-main {
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================
   LOGIN PAGE
========================== */

.login-card {
    width: 100%;
    max-width: 500px;
    padding: 24px 36px;

    background: #ffffff;
    border-radius: 20px;

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.34);

    text-align: center;
}

.login-logo {
    display: block;
    width: 82px;
    height: auto;

    margin: 0 auto 12px;
}

h1 {
    margin-bottom: 6px;

    color: #0b1f3a;
    font-size: 30px;
    line-height: 1.15;
}

.login-subtitle {
    margin-bottom: 16px;

    color: #626b78;
    font-size: 16px;
    line-height: 1.4;
}

label {
    display: block;

    margin-top: 10px;
    margin-bottom: 5px;

    color: #0b1f3a;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;

    border: 1px solid #bfc5cc;
    border-radius: 9px;

    background: #ffffff;
    color: #1f2937;

    font-family: inherit;
    font-size: 16px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

input::placeholder {
    color: #8a929d;
}

input:focus {
    outline: none;

    border-color: #d4af37;

    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.18);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    margin: 13px 0;

    font-size: 14px;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 7px;

    margin: 0;
    font-weight: 500;
}

.remember-option input {
    width: 17px;
    min-height: 17px;
    height: 17px;
}

.text-button {
    padding: 3px;

    border: none;
    background: none;

    color: #0d326b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.text-button:hover {
    color: #b38d19;
    text-decoration: underline;
}

.sign-in-button,
.login-button,
.create-account-button {
    display: block;

    width: 100%;
    min-height: 46px;
    padding: 11px 16px;

    border-radius: 9px;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.sign-in-button,
.login-button {
    border: none;

    background: #0b1f3a;
    color: #ffffff;
}

.sign-in-button:hover,
.login-button:hover {
    background: #d4af37;
    color: #0b1f3a;

    transform: translateY(-1px);
}

.sign-in-button:disabled,
.login-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.create-account-button {
    margin-top: 10px;

    border: 2px solid #0b1f3a;

    background: #ffffff;
    color: #0b1f3a;
}

.create-account-button:hover {
    border-color: #d4af37;

    background: #f9f2dc;
    color: #0b1f3a;

    transform: translateY(-1px);
}

.home-link {
    display: block;

    margin-top: 10px;

    color: #0d326b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.home-link:hover {
    color: #b38d19;
    text-decoration: underline;
}

.login-message {
    min-height: 18px;
    margin: 6px 0;

    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

/* ==========================
   REGISTRATION PAGE ONLY
========================== */

body:has(#register-form) {
    padding: 8px;
}

body:has(#register-form) .login-card {
    max-width: 500px;
    padding: 15px 34px;
}

body:has(#register-form) .login-logo {
    width: 62px;
    margin-bottom: 6px;
}

body:has(#register-form) h1 {
    margin-bottom: 3px;
    font-size: 25px;
}

body:has(#register-form) .login-subtitle {
    margin-bottom: 7px;
    font-size: 14px;
}

body:has(#register-form) label {
    margin-top: 6px;
    margin-bottom: 3px;
    font-size: 14px;
}

body:has(#register-form) input {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 14px;
}

body:has(#register-form) .login-message {
    min-height: 14px;
    margin: 3px 0;
    font-size: 12px;
}

body:has(#register-form) .login-button {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

body:has(#register-form) .home-link {
    margin-top: 6px;
    font-size: 13px;
}

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

@media (max-width: 600px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .login-card {
        max-width: 100%;
        padding: 22px;
        border-radius: 17px;
    }

    .login-logo {
        width: 72px;
    }

    h1 {
        font-size: 27px;
    }

    .login-subtitle {
        font-size: 15px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    body:has(#register-form) .login-card {
        padding: 14px 20px;
    }

    body:has(#register-form) .login-logo {
        width: 56px;
    }

    body:has(#register-form) h1 {
        font-size: 23px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 18px 15px;
    }

    .login-logo {
        width: 64px;
    }

    h1 {
        font-size: 24px;
    }

    body:has(#register-form) .login-card {
        padding: 12px 14px;
    }
}