/**
 * SREDC 登录页面
 * 左侧深蓝品牌区 + 右侧灰白登录区
 */

/* ========== 基础设置 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    background: #f8fafc;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ========== 主容器 ========== */
.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ========== 左侧品牌面板（深蓝色） ========== */
.brand-panel {
    flex: 0 0 42%;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 50%, #1a365d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    z-index: 10;
    animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 背景装饰 */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 80%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(147, 197, 253, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

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

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}

.brand-logo img {
    height: 48px;
    width: auto;
}

.brand-logo span {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.brand-title {
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 20px;
}

.brand-title span {
    color: #60a5fa;
}

.brand-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.8;
    margin-bottom: 40px;
}

.brand-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.brand-stat {
    text-align: center;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.brand-footer {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
}

/* ========== 右侧登录面板（灰白色） ========== */
.login-panel {
    flex: 1;
    background: #f8fafc;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* ========== 登录卡片（纯白色背景） ========== */
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    animation: cardFloatUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #64748b;
}

/* ========== 表单样式 ========== */
.login-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
    color: #1e293b;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:focus {
    outline: none;
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 48px;
}

.toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
}

.toggle-pwd:hover {
    color: #6b7280;
}

.toggle-pwd.active {
    color: #3b82f6;
}

.toggle-pwd svg {
    width: 20px;
    height: 20px;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 28px;
}

.forgot-link {
    font-size: 13px;
    color: #6b7280;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #3b82f6;
}

/* ========== 提交按钮 ========== */
.submit-btn {
    width: 100%;
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 4px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

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

/* ========== 注册链接 ========== */
.register-link {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: #6b7280;
}

.register-link a {
    color: #3b82f6;
    font-weight: 500;
    margin-left: 4px;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ========== 返回首页 ========== */
.back-home {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.25s ease;
    animation: fadeIn 0.5s ease 0.5s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.back-home:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.back-home svg {
    width: 16px;
    height: 16px;
}

/* ========== Layui 兼容 ========== */
.layui-form-item {
    margin: 0;
}

/* ========== 响应式 ========== */
@media screen and (max-width: 1100px) {
    .brand-panel {
        flex-basis: 38%;
        padding: 40px;
    }
    
    .brand-title {
        font-size: 28px;
    }
}

@media screen and (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .brand-panel {
        flex: 0 0 auto;
        padding: 32px 24px;
        min-height: auto;
    }
    
    .brand-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .brand-desc {
        display: none;
    }
    
    .brand-stats {
        margin-bottom: 0;
    }
    
    .brand-footer {
        display: none;
    }
    
    .login-panel {
        flex: 1;
        padding: 32px 24px;
    }
    
    .login-card {
        padding: 40px 32px;
    }
    
    .back-home {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 24px;
    }
}

@media screen and (max-width: 480px) {
    .brand-panel {
        padding: 24px 20px;
    }
    
    .brand-logo span {
        font-size: 22px;
    }
    
    .brand-title {
        font-size: 20px;
    }
    
    .brand-stats {
        gap: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .login-panel {
        padding: 24px 16px;
    }
    
    .login-card {
        padding: 32px 24px;
        border-radius: 12px;
    }
    
    .login-header h2 {
        font-size: 22px;
    }
    
    .form-group input {
        height: 46px;
        font-size: 14px;
    }
    
    .submit-btn {
        height: 46px;
        font-size: 15px;
    }
}

/* 自动填充样式 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #f9fafb inset !important;
    -webkit-text-fill-color: #1e293b !important;
    transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
}
