/* 企业维修管理系统 - 现代化登录页面样式 */

/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 现代化色彩系统 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-gradient: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    --warning-gradient: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    
    /* 中性色系 */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --gray-800: #212529;
    --gray-900: #000000;
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 边框半径 */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-3xl: 4rem;
    
    /* 字体系统 */
    --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    
    /* 字体大小 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* 间距系统 */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* 过渡动画 */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-family-sans);
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* 动态背景动画 */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    z-index: -1;
    overflow: hidden;
}

.animated-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 浮动粒子效果 */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particle-float 25s linear infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    width: 40px;
    height: 40px;
    left: 25%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.particle:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 50%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 75%;
    animation-delay: 6s;
    animation-duration: 25s;
}

.particle:nth-child(5) {
    width: 30px;
    height: 30px;
    left: 90%;
    animation-delay: 8s;
    animation-duration: 12s;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 登录容器 - 移除容器感 */
.login-container {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
    max-width: none;
    position: relative;
    animation: none;
    overflow: visible;
}

/* Edge浏览器兼容 */
@supports (-ms-ime-align: auto) {
    .login-container {
        padding: 20px;
    }
}

/* 表单卡片 - 独立的浮动元素 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-3xl);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: var(--space-20) var(--space-16);
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Edge/旧浏览器兼容性 */
@supports not (backdrop-filter: blur(10px)) {
    .login-card {
        background: rgba(255, 255, 255, 0.98);
        box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.15);
    }
}

/* Edge特定兼容 */
@supports (-ms-ime-align: auto) {
    .login-card {
        background: rgba(255, 255, 255, 0.97);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo和标题区域 */
.login-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-6);
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: logoFloat 3s ease-in-out infinite;
}

.login-logo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    z-index: -1;
    opacity: 0.5;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes logoGlow {
    from { opacity: 0.3; }
    to { opacity: 0.7; }
}

.login-logo i {
    font-size: var(--text-4xl);
    color: var(--white);
}

.login-title {
    margin: 0;
    font-size: var(--text-3xl);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.login-subtitle {
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-500);
    font-weight: 400;
}

/* 表单样式 */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: var(--space-6);
    position: relative;
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    transition: var(--transition-slow);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 0 2px rgba(102, 126, 234, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* 输入框图标 */
.input-icon {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: var(--text-lg);
    transition: var(--transition);
    pointer-events: none;
}

.form-input:focus + .input-icon {
    color: var(--primary-color);
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--white);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: var(--shadow-lg);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* 加载动画 */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s linear infinite;
    margin-left: var(--space-2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login.loading .loading-spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    opacity: 0.7;
}

/* 警告框样式 */
.alert {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    border: none;
    animation: alertSlideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.alert-success {
    background: rgba(81, 207, 102, 0.1);
    color: #27ae60;
    border: 1px solid rgba(81, 207, 102, 0.2);
}

/* 移动端链接 */
.mobile-link {
    text-align: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--gray-200);
}

.mobile-link a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    transition: var(--transition);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
}

.mobile-link a:hover {
    color: var(--secondary-color);
    background-color: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        margin: var(--space-4);
        padding: var(--space-8) var(--space-6);
        max-width: calc(100vw - var(--space-8));
    }
    
    .login-logo {
        width: 100px;
        height: 100px;
    }
    
    .login-logo i {
        font-size: var(--text-3xl);
    }
    
    .login-title {
        font-size: var(--text-2xl);
    }
    
    .form-input {
        padding: var(--space-4);
        font-size: var(--text-base);
    }
    
    .btn-login {
        padding: var(--space-4);
        font-size: var(--text-base);
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: var(--space-2);
        padding: var(--space-6) var(--space-4);
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
    }
    
    .login-logo i {
        font-size: var(--text-2xl);
    }
    
    .login-title {
        font-size: var(--text-xl);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .login-container {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .form-label {
        color: var(--gray-300);
    }
    
    .form-input {
        background-color: rgba(55, 65, 81, 0.8);
        color: var(--gray-100);
        border-color: var(--gray-600);
    }
    
    .form-input::placeholder {
        color: var(--gray-500);
    }
    
    .mobile-link {
        border-top-color: var(--gray-600);
    }
    
    .mobile-link a:hover {
        background-color: rgba(102, 126, 234, 0.2);
    }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 焦点可见性 */
.btn-login:focus,
.form-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .login-container {
        background: var(--white);
        border: 2px solid var(--gray-900);
    }
    
    .btn-login {
        background: var(--gray-900);
        color: var(--white);
        border: 2px solid var(--gray-900);
    }
    
    .btn-login:hover {
        background: var(--white);
        color: var(--gray-900);
    }
}