/* ========================================
   iOS 17 登录页面 - 大气商务版
   Premium Business Edition
   ======================================== */

:root {
    /* iOS 17 精选色彩 */
    --ios-blue: #007AFF;
    --ios-blue-dark: #0051D5;
    --ios-indigo: #5856D6;
    --ios-purple: #AF52DE;
    
    /* 高端灰色系 */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F7;
    --gray-200: #E5E5EA;
    --gray-900: #1D1D1F;
    
    /* 文字色彩 */
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #C7C7CC;
    
    /* 间距系统（更大气的尺寸）*/
    --space-xs: 12px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;
    
    /* 圆角系统 */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ========================================
   全局样式
   ======================================== */

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
    overflow: hidden;
    position: relative;
    
    /* 简洁深色渐变背景 */
    background: linear-gradient(145deg, 
        #1a1a2e 0%,
        #16213e 50%,
        #0f1419 100%);
}

/* 极简装饰光晕 */
body.login-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 40%,
        rgba(0, 122, 255, 0.08) 0%,
        transparent 50%
    );
    animation: gentleRotate 40s linear infinite;
    pointer-events: none;
}

@keyframes gentleRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   登录容器 - 更大尺寸
   ======================================== */

.login-container {
    width: 100%;
    max-width: 560px;  /* 增大宽度 */
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
    animation: elegantFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ========================================
   登录卡片 - 极简商务风
   ======================================== */

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(60px);
    -webkit-backdrop-filter: saturate(180%) blur(60px);
    border-radius: var(--radius-xl);
    padding: var(--space-xxl) 56px;  /* 更大内边距 */
    position: relative;
    
    /* 精致多层阴影 */
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.25),
        0 16px 32px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    /* 细腻边框 */
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

/* 顶部点睛装饰 */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--ios-blue) 50%,
        transparent 100%
    );
    border-radius: 0 0 10px 10px;
    animation: topLinePulse 4s ease-in-out infinite;
}

@keyframes topLinePulse {
    0%, 100% { opacity: 0.4; width: 120px; }
    50% { opacity: 1; width: 160px; }
}

/* ========================================
   Logo 区域 - 更大更突出
   ======================================== */

.login-logo {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.login-logo-img {
    width: 120px;  /* 增大Logo */
    height: 120px;
    border-radius: 28px;
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* 高端阴影 */
    box-shadow: 
        0 20px 40px rgba(0, 122, 255, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
    
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-12px) scale(1.02); 
    }
}

.login-logo-img:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0, 122, 255, 0.4),
        0 12px 24px rgba(0, 0, 0, 0.25);
}

/* ========================================
   标题 - 更大更醒目
   ======================================== */

.login-title {
    font-size: 42px;  /* 增大字号 */
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin: var(--space-lg) 0 var(--space-sm);
    letter-spacing: -1.2px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    
    /* 渐变文字 */
    background: linear-gradient(135deg, 
        #1D1D1F 0%, 
        #5856D6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 17px;  /* 增大副标题 */
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;  /* 增大间距 */
    font-weight: 500;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
}

/* ========================================
   表单
   ======================================== */

#login-form {
    position: relative;
    z-index: 1;
}

.login-form-group {
    margin-bottom: var(--space-lg);  /* 增大间距 */
    position: relative;
}

/* ========================================
   输入框 - 更大更精致
   ======================================== */

.login-input-wrapper {
    position: relative;
}

.login-input {
    width: 100%;
    height: 60px;  /* 增大高度 */
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0 var(--space-md);
    font-size: 17px;  /* 增大字号 */
    font-weight: 500;
    color: var(--text-primary);
    background: var(--gray-50);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* 细腻内阴影 */
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.03),
        0 0 0 0 rgba(0, 122, 255, 0);
}

.login-input:focus {
    border-color: var(--ios-blue);
    background: #FFFFFF;
    outline: none;
    
    /* 发光效果 */
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.03),
        0 0 0 6px rgba(0, 122, 255, 0.08),
        0 8px 20px rgba(0, 122, 255, 0.15);
    
    transform: translateY(-3px);
}

.login-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

.login-input:disabled {
    background: var(--gray-100);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 带图标的输入框 */
.login-input-icon {
    padding-left: 60px;
}

.login-input-icon-left {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-input-wrapper.focused .login-input-icon-left,
.login-input:focus + .login-input-icon-left {
    color: var(--ios-blue);
    transform: translateY(-50%) scale(1.15);
}

/* ========================================
   验证码
   ======================================== */

.captcha-group {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
}

.captcha-group .login-input {
    flex: 1;
}

.captcha-img-wrapper {
    width: 150px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.captcha-img-wrapper:hover {
    border-color: var(--ios-blue);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.captcha-img-wrapper:active {
    transform: translateY(0) scale(0.98);
}

.captcha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   复选框
   ======================================== */

.checkbox-group {
    display: flex;
    align-items: center;
    margin: var(--space-xl) 0;  /* 增大间距 */
    gap: var(--space-sm);
}

.checkbox-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--ios-blue);
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s;
}

.checkbox-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.checkbox-group label {
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: 500;
    transition: color 0.2s;
}

.checkbox-group label:hover {
    color: var(--ios-blue);
}

/* ========================================
   登录按钮 - 大气商务风
   ======================================== */

.btn-login {
    width: 100%;
    height: 64px;  /* 增大高度 */
    background: linear-gradient(135deg, 
        var(--ios-blue) 0%, 
        var(--ios-blue-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 19px;  /* 增大字号 */
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: var(--space-md);
    position: relative;
    overflow: hidden;
    
    /* 强烈立体感 */
    box-shadow: 
        0 12px 32px rgba(0, 122, 255, 0.45),
        0 4px 12px rgba(0, 122, 255, 0.35),
        inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

/* 光泽层 */
.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login:hover::before {
    left: 150%;
}

.btn-login:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 122, 255, 0.5),
        0 8px 20px rgba(0, 122, 255, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.btn-login:active {
    transform: translateY(-2px) scale(1);
    box-shadow: 
        0 8px 24px rgba(0, 122, 255, 0.4),
        0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-login:disabled {
    background: linear-gradient(135deg, #C7C7CC 0%, #AEAEB2 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   加载状态
   ======================================== */

.btn-login.loading {
    pointer-events: none;
}

.btn-login.loading span {
    opacity: 0;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    margin-top: -14px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   错误提示 - 简洁商务风
   ======================================== */

.login-error {
    background: rgba(255, 59, 48, 0.06);
    border: 1.5px solid rgba(255, 59, 48, 0.2);
    border-left: 5px solid #FF3B30;
    color: #D32F2F;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: errorSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.12);
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-error::before {
    content: '⚠️';
    font-size: 20px;
}

.login-error.hide {
    display: none;
}

/* ========================================
   底部信息（可选）
   ======================================== */

.login-footer {
    text-align: center;
    margin-top: var(--space-xl);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #FFFFFF;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 640px) {
    .login-container {
        max-width: 480px;
        padding: var(--space-md);
    }
    
    .login-card {
        padding: var(--space-xl) 36px;
    }
    
    .login-logo-img {
        width: 100px;
        height: 100px;
    }
    
    .login-title {
        font-size: 36px;
    }
    
    .login-subtitle {
        font-size: 16px;
    }
    
    .login-input {
        height: 56px;
        font-size: 16px;
    }
    
    .btn-login {
        height: 58px;
        font-size: 18px;
    }
    
    .captcha-img-wrapper {
        width: 130px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 40px 28px;
        border-radius: var(--radius-lg);
    }
    
    .login-logo-img {
        width: 88px;
        height: 88px;
    }
    
    .login-title {
        font-size: 32px;
    }
    
    .login-subtitle {
        font-size: 15px;
    }
    
    .login-input {
        height: 52px;
        font-size: 16px;
    }
    
    .btn-login {
        height: 54px;
        font-size: 17px;
    }
}

@media (max-width: 360px) {
    body.login-page {
        padding: var(--space-sm);
    }
    
    .login-card {
        padding: var(--space-lg) var(--space-md);
    }
}

/* ========================================
   可访问性增强
   ======================================== */

.login-input:focus-visible {
    outline: 3px solid var(--ios-blue);
    outline-offset: 4px;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .login-input {
        border-width: 3px;
    }
    
    .btn-login {
        border: 2px solid currentColor;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   性能优化
   ======================================== */

.login-card,
.login-logo-img,
.login-input,
.btn-login {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ========================================
   END - Premium Business Login
   ======================================== */
