.login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-canvas);
}

.login-visual {
    flex: 1;
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.login-visual::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    border-radius: 50%;
    z-index: 0;
}

.brand-content {
    z-index: 1;
    text-align: center;
    max-width: 600px;
}

.brand-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.brand-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.6;
}

.login-form-container {
    flex: 0 0 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    background-color: var(--bg-surface);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.02);
    overflow-y: auto;
}

.login-header {
    margin-bottom: 3rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    opacity: 0.5;
    pointer-events: none;
    fill: var(--text-muted);
}

[data-theme="dark"] .input-icon {
    fill: var(--text-main);
    opacity: 0.8;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px var(--blue-100);
    background-color: var(--bg-surface);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    opacity: 1;
}

[data-theme="dark"] .password-toggle img {
    filter: invert(1) brightness(2);
}

.user-selection-area {
    margin-bottom: 2rem;
}

.user-list-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.user-grid::-webkit-scrollbar {
    width: 4px;
}

.user-grid::-webkit-scrollbar-thumb {
    background-color: var(--border-subtle);
    border-radius: 4px;
}

.user-card-item {
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-card-item:hover {
    border-color: var(--blue-600);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.user-card-item.selected {
    background-color: var(--blue-50);
    border-color: var(--blue-600);
    color: var(--blue-800);
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    background: var(--blue-100);
    color: var(--blue-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-name-text {
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-user-feedback {
    background-color: var(--blue-50);
    border-left: 3px solid var(--blue-600);
    padding: 0.75rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

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

.secondary-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.link-mute {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-mute:hover {
    color: var(--blue-600);
}

@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        overflow-y: auto;
    }

    .login-visual {
        flex: 0 0 200px;
        padding: 2rem;
    }

    .brand-title {
        font-size: 2rem;
    }

    .brand-tagline {
        display: none;
    }

    .login-form-container {
        flex: 1;
        width: 100%;
        padding: 2rem;
        box-shadow: none;
        border-radius: 20px 20px 0 0;
        margin-top: -20px;
        position: relative;
        z-index: 2;
    }
}