:root {
    --bm-dark: #245476;
    --bm-navy: #156da4;
    --bm-cyan: #35aee2;
    --bm-mid: #219bd7;
    --bm-gray: #687c89;
    --bm-white: #ffffff;
    --bm-border: #dcdada;
    --bm-bg-light: #f8fafc;
}

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

body {
    font-family: "Inter", sans-serif;
    height: 100vh;
    width: 100vw;
    display: flex;
    overflow: hidden;
    background-color: var(--bm-navy);
}

.split-left {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #156da4;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    padding: 40px;
    z-index: 10;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.6s ease-out;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 45px 40px;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-mode-switch {
    display: inline-flex;
    align-self: flex-end;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid #d5e3ee;
    background: #eef4f9;
}

.auth-mode-option {
    min-width: 108px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 12px;
    font-weight: 700;
    color: #4c6375;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.16s ease;
}

.auth-mode-option:hover {
    color: var(--bm-dark);
    background: #f7fbff;
}

.auth-mode-option.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--bm-navy) 0%, var(--bm-mid) 100%);
    box-shadow: 0 4px 10px rgba(21, 109, 164, 0.22);
    cursor: default;
    pointer-events: none;
}

.login-header {
    margin-bottom: 30px;
    text-align: left;
    border-left: 4px solid var(--bm-dark);
    padding-left: 15px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--bm-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--bm-gray);
    line-height: 1.5;
}

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

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--bm-gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bm-mid);
    font-size: 14px;
    pointer-events: none;
}

.form-group--password .form-input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--bm-mid);
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(33, 155, 215, 0.45);
    outline-offset: 1px;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 14px;
    color: var(--bm-dark);
    background-color: var(--bm-bg-light);
    border: 1px solid var(--bm-border);
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    background-color: var(--bm-white);
    border-color: var(--bm-mid);
    box-shadow: 0 0 0 3px rgba(33, 155, 215, 0.15);
}

.form-input::placeholder {
    color: #bdc3c7;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--bm-navy) 0%, var(--bm-mid) 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(21, 109, 164, 0.2);
    position: relative;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(21, 109, 164, 0.3);
}

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

.btn-login:disabled {
    background: var(--bm-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

#login-button.loading .btn-label {
    opacity: 0;
}

#login-button.loading .spinner {
    display: block;
}

.forgot-link-container {
    text-align: center;
    margin-top: 15px;
}

.forgot-link {
    font-size: 12px;
    color: var(--bm-mid);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    display: none;
}

.auth-message.visible {
    display: block;
}

.auth-message.visible.success {
    display: block;
    background: rgba(46, 204, 113, 0.1);
    color: #219150;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.auth-message.visible.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #c0392b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.copyright {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
    margin-top: 0;
    padding-left: 85px;
    width: 100%;
}

.split-right {
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--bm-mid) 0%, var(--bm-cyan) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--bm-white);
    text-align: center;
    padding: 40px;
    overflow: hidden;
}

.split-right::after {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
    transform: rotate(15deg);
}

.brand-container {
    z-index: 2;
    animation: slideInRight 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand-logo-large {
    width: 100px;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.brand-heading {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.95;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
    .split-right {
        display: none;
    }

    .split-left {
        width: 100%;
        padding: 20px;
    }

    .login-card {
        width: 100%;
        max-width: 100%;
    }
}
