:root {
    --login-right-bg: #ffffff;
    --wave-color: #ffffff;
    --input-icon-color: #6c757d;
    --link-hover-color: #0d6efd;
}
html[data-theme="dark"] {
    --login-right-bg: #2d2d2d;
    --wave-color: #2d2d2d;
    --input-icon-color: #aaa;
    --bs-body-color: #eee;
    --bs-body-bg: #1a1a1a;
}

/* 为不支持CSS变量的浏览器提供回退 */
.right-panel {
    background-color: #ffffff;
}

html[data-theme="dark"] .right-panel {
    background-color: #2d2d2d;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.login-wrapper {
    display: flex;
    height: 100%;
    width: 100%;
    position: relative;
}
.left-panel {
    flex: 2;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}
.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    z-index: 1;
}
.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}
.left-content h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.left-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}
.left-content .features {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}
.left-content .features i {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}
.right-panel {
    flex: 1;
    background-color: var(--login-right-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    transition: background-color 0.3s;
    box-shadow: -5px 0 20px rgba(0,0,0,0.05);
}
.wave-divider {
    position: absolute;
    left: -50px;
    top: 0;
    height: 100%;
    width: 50px;
    pointer-events: none;
    z-index: 10;
}
.wave-divider svg {
    height: 100%;
    width: 50px;
    fill: var(--login-right-bg);
    transition: fill 0.3s;
}
.login-box {
    width: 100%;
    max-width: 300px;
}
.login-box .logo {
    text-align: center;
    margin-bottom: 2.5rem;
}
.login-box .logo img {
    max-height: 50px;
    max-width: 200px;
}
.login-box .system-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 12px;
    color: var(--bs-body-color);
}
.input-group {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    margin-bottom: 1.2rem;
    background: var(--login-right-bg);
    border: 1px solid #dee2e6;
}
html[data-theme="dark"] .input-group {
    border-color: #444;
}
.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
    border-color: #86b7fe;
}
.input-group-text {
    background: transparent;
    border: none;
    color: var(--input-icon-color);
    padding-left: 1rem;
    padding-right: 0.5rem;
}
.form-control {
    border: none;
    background: transparent;
    padding-left: 0;
    box-shadow: none !important;
}
.form-control:focus {
    background: transparent;
}
.password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--input-icon-color);
    padding: 0 1rem;
}
.password-toggle:hover {
    color: #0d6efd;
}
.btn-login {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border: none;
    transition: all 0.2s;
    margin-top: 1rem;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13,110,253,0.4);
}
.form-check-label, .forgot-link {
    font-size: 0.9rem;
}
.forgot-link {
    color: #6c757d;
    text-decoration: none;
}
.forgot-link:hover {
    color: #0d6efd;
}
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #adb5bd;
    margin: 1.5rem 0;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}
.divider:not(:empty)::before {
    margin-right: .5em;
}
.divider:not(:empty)::after {
    margin-left: .5em;
}
.copyright {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #adb5bd;
    text-align: center;
    line-height: 1.6;
}
.copyright a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s;
}
.copyright a:hover {
    font-weight: bold;
    color: #054ed3;
}
@media (max-width: 768px) {
    .left-panel {
        display: none;
    }
    .right-panel {
        flex: none;
        width: 100%;
        box-shadow: none;
    }
    .wave-divider {
        display: none;
    }
    .login-box {
        max-width: 280px;
    }
}

/* 平板端优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .left-content {
        padding: 1.5rem;
        max-width: 400px;
    }
    .left-content h1 {
        font-size: 2.5rem;
    }
    .right-panel {
        padding: 1.5rem;
    }
    .login-box {
        max-width: 280px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .right-panel {
        padding: 1rem;
    }
    .login-box {
        max-width: 100%;
    }
    .left-content h1 {
        font-size: 2rem;
    }
    .left-content p {
        font-size: 1rem;
    }
    .btn-login {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* 触摸屏优化 */
@media (hover: none) and (pointer: coarse) {
    .password-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    .btn-login {
        min-height: 44px;
    }
}