/* =====================================================
   登录页样式 - 蓝色主题
   ===================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #0d47a1;
    overflow: hidden;
    height: 100vh;
}

.login-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1976d2 70%, #1e88e5 100%);
}

/* ============ 背景装饰 ============ */
.bg-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.circle-1 {
    width: 600px; height: 600px;
    top: -200px; right: -150px;
    animation: float 8s ease-in-out infinite;
}
.circle-2 {
    width: 400px; height: 400px;
    bottom: -100px; left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}
.circle-3 {
    width: 300px; height: 300px;
    top: 50%; left: 30%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============ 登录容器 ============ */
.login-container {
    position: relative;
    z-index: 1;
    width: 900px;
    max-width: 95vw;
    height: 560px;
    max-height: 90vh;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

/* ============ 左侧品牌区 ============ */
.login-left {
    flex: 1;
    background: linear-gradient(160deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

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

.brand-logo {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.brand-title {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.brand-subtitle {
    position: relative;
    z-index: 1;
    font-size: 12px;
    opacity: 0.6;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.brand-features {
    position: relative;
    z-index: 1;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    opacity: 0.9;
}

.feature-icon {
    color: #64b5f6;
    font-size: 12px;
}

.brand-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 12px;
    opacity: 0.5;
    line-height: 1.8;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 15px;
    width: 100%;
}

/* ============ 右侧表单区 ============ */
.login-right {
    flex: 1;
    padding: 50px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 320px;
}

.form-title {
    font-size: 26px;
    color: #0d47a1;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-desc {
    font-size: 14px;
    color: #78909c;
    margin-bottom: 30px;
}

/* ============ 表单元素 ============ */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #455a64;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 12px;
    color: #90a4ae;
    z-index: 1;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #263238;
    background: #fafbfc;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #1976d2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
}

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

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #90a4ae;
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.toggle-password:hover {
    color: #1976d2;
}

/* ============ 选项 ============ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #607d8b;
    user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #b0bec5;
    border-radius: 5px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.checkbox-wrap input:checked ~ .checkbox-custom {
    background: #1976d2;
    border-color: #1976d2;
}

.checkbox-wrap input:checked ~ .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ============ 错误提示 ============ */
.error-msg {
    background: #ffebee;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid #c62828;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ============ 登录按钮 ============ */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 2px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.45);
}

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    animation: spin 0.8s linear infinite;
}

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

/* ============ 页脚 ============ */
.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: #b0bec5;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .login-container {
        width: 95vw;
        height: auto;
        flex-direction: column;
        max-height: none;
    }

    .login-left {
        padding: 30px 25px;
        min-height: 200px;
    }

    .brand-title { font-size: 18px; }
    .brand-features { display: none; }
    .brand-footer { display: none; }

    .login-right {
        padding: 30px 25px;
    }
}
