﻿/* ============================================================
   插件管理平台 - 登录页面样式
   参考 newch-brand 设计语言，差异化插件平台风格
   ============================================================ */

/* ---- Reset & Base ---- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background: #F0F2F7;
    overflow: hidden;
}

/* ---- Main Container: Flex Left-Right ---- */
.login-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   左侧品牌展示区
   ============================================================ */
.login-brand {
    flex: 1;
    background-image: url(../img/login-background.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
    min-width: 0;
}

/* 深色遮罩层 - 区别于 newch-brand 的透明风格 */
.brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(8, 20, 45, 0.88) 0%, rgba(14, 58, 107, 0.72) 50%, rgba(0, 82, 217, 0.55) 100%);
    z-index: 0;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
}

/* ---- Brand Header ---- */
.brand-header {
    margin-bottom: 48px;
}

.brand-logo-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.brand-logo-icon i {
    font-size: 30px;
    color: #fff;
}

.brand-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.brand-slogan {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
    letter-spacing: 1px;
}

/* ---- Feature Cards ---- */
.brand-features {
    margin-bottom: 40px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0052D9 0%, #4A90E2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 82, 217, 0.35);
}

.feature-icon i {
    font-size: 20px;
    color: #fff;
}

.feature-info h4 {
    font-size: 15px;
    color: #fff;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.feature-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* ---- Stats Bar - 差异化：newch-brand 没有此区域 ---- */
.brand-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 16px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    backdrop-filter: blur(6px);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* ============================================================
   右侧登录表单区
   ============================================================ */
.login-form-side {
    width: 480px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.login-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 48px 32px;
    overflow-y: auto;
}

/* ---- Form Header ---- */
.form-header {
    margin-bottom: 36px;
}

.form-title {
    font-size: 26px;
    font-weight: 600;
    color: #0B1220;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.form-subtitle {
    font-size: 14px;
    color: #9CA3AF;
    margin: 0;
    font-weight: 400;
}

/* ---- Form ---- */
.login-form {
    margin-bottom: 0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

/* Input with prefix icon */
.input-icon-wrapper {
    position: relative;
}

.input-prefix-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9CA3AF;
    z-index: 2;
    transition: color 0.2s ease;
}

.login-form .form-control {
    display: block;
    width: 100%;
    height: 48px !important;
    padding: 10px 16px 10px 44px !important;
    font-size: 14px;
    color: #0B1220;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px !important;
    transition: all 0.25s ease;
    box-shadow: none !important;
    margin: 0;
}

.login-form .form-control:focus {
    background: #fff;
    border-color: #0052D9 !important;
    box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1) !important;
    outline: none;
}

.login-form .form-control:focus + .input-prefix-icon,
.input-icon-wrapper:focus-within .input-prefix-icon {
    color: #0052D9;
}

.login-form .form-control::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

/* Remove old background icons - use Font Awesome instead */
.login-form .uname,
.login-form .pword {
    background-image: none !important;
}

/* ---- Captcha ---- */
.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.captcha-input {
    flex: 1;
}

.captcha-image-link {
    display: block;
    width: 130px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
    cursor: pointer;
}

.captcha-image-link:hover {
    border-color: #0052D9;
    box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.captcha-image-link .imgcode {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Login Options ---- */
.login-options {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Checkbox - redesigned for white background */
.checkbox-custom {
    position: relative;
    padding-left: 26px;
    display: inline-block;
    margin: 0;
    cursor: pointer;
}

.checkbox-custom input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    z-index: 2;
    left: 0;
    top: 50%;
    margin-top: -8px;
    width: 18px;
    height: 18px;
}

.checkbox-custom label {
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
    color: #4B5563;
    font-size: 14px;
    line-height: 1.4;
    user-select: none;
}

.checkbox-custom label:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 4px;
    border: 1px solid #D1D5DB;
    background: #fff;
    transition: all 0.2s ease;
}

.checkbox-custom input[type="checkbox"]:checked + label:before {
    background: #0052D9;
    border-color: #0052D9;
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    position: absolute;
    display: inline-block;
    font-family: 'FontAwesome';
    content: "\f00c";
    top: 50%;
    left: 3px;
    margin-top: -7px;
    font-size: 12px;
    line-height: 1;
    color: #fff;
}

/* ---- Login Button ---- */
.btn-login {
    height: 48px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 4px;
    border-radius: 8px;
    background: #0052D9;
    border-color: #0052D9;
    color: #fff;
    transition: all 0.3s ease;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover,
.btn-login:focus {
    background: #3370E0;
    border-color: #3370E0;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 82, 217, 0.35);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 82, 217, 0.3);
}

/* ---- Login Extra: Security Tips - 差异化 ---- */
.login-extra {
    margin-top: 32px;
}

.login-divider {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: #E5E7EB;
}

.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

.login-divider span {
    display: inline-block;
    padding: 0 16px;
    background: #fff;
    color: #9CA3AF;
    font-size: 13px;
}

.security-tips {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9CA3AF;
}

.tip-item i {
    font-size: 13px;
    color: #2BA471;
}

/* ---- Footer ---- */
.login-footer {
    padding: 18px 48px;
    text-align: center;
    border-top: 1px solid #F3F4F6;
    background: #F9FAFB;
}

.login-footer span {
    color: #9CA3AF;
    font-size: 12px;
}

/* ---- Validation Error ---- */
.login-form label.error {
    position: inherit;
    color: #E34D59;
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 0;
    font-weight: 400;
    display: block;
}

/* ---- Layer Popup Override ---- */
body .layer-ext-moon-msg[type="dialog"] {
    min-width: 100px !important;
}

body .layer-ext-moon-msg {
    background-color: rgba(11, 18, 32, 0.88);
    color: #fff;
    border: none;
    border-radius: 8px;
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 12px 25px;
    text-align: center;
}

/* ============================================================
   Responsive Design
   ============================================================ */

/* Tablet & small desktop: hide brand area */
@media screen and (max-width: 1024px) {
    .login-brand {
        display: none;
    }
    .login-form-side {
        width: 100%;
        box-shadow: none;
    }
    .login-form-wrapper {
        max-width: 440px;
        margin: 0 auto;
        width: 100%;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    body.login-page {
        background: #fff;
    }
    .login-form-wrapper {
        padding: 40px 24px 24px;
    }
    .login-footer {
        padding: 16px 24px;
    }
    .security-tips {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* Small mobile */
@media screen and (max-width: 375px) {
    .form-title {
        font-size: 22px;
    }
    .login-form-wrapper {
        padding: 32px 16px 16px;
    }
    .captcha-image-link {
        width: 110px;
    }
}

/* Large screens: wider brand area */
@media screen and (min-width: 1600px) {
    .login-form-side {
        width: 520px;
    }
    .login-form-wrapper {
        padding: 60px 56px 40px;
    }
    .brand-title {
        font-size: 42px;
    }
}

/* ---- Form controls global reset for login page ---- */
.login-form .form-control,
.login-form .form-control:focus,
.login-form .has-error .form-control:focus,
.login-form .has-success .form-control:focus,
.login-form .has-warning .form-control:focus {
    box-shadow: none;
}
