ERP/frontend/assets/login.css
2025-11-24 09:32:37 +08:00

429 lines
7.1 KiB
CSS

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
line-height: 1.5;
overflow: hidden;
}
.login-container {
position: relative;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
/* 背景层 - 工业风格渐变 + 几何图案 */
.login-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:
linear-gradient(135deg, #1e3a8a 0%, #1e40af 25%, #3b82f6 50%, #60a5fa 75%, #93c5fd 100%);
z-index: 0;
}
.login-background::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image:
repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(255, 255, 255, 0.03) 2px,
rgba(255, 255, 255, 0.03) 4px
),
repeating-linear-gradient(
90deg,
transparent,
transparent 2px,
rgba(255, 255, 255, 0.03) 2px,
rgba(255, 255, 255, 0.03) 4px
);
background-size: 50px 50px;
}
.login-background::after {
content: '';
position: absolute;
top: -50%;
right: -20%;
width: 80%;
height: 80%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
border-radius: 50%;
animation: float 20s ease-in-out infinite;
}
@keyframes float {
0%, 100% {
transform: translate(0, 0) scale(1);
}
50% {
transform: translate(-50px, 50px) scale(1.1);
}
}
/* 登录卡片 */
.login-card {
position: relative;
z-index: 1;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20px);
border-radius: 24px;
box-shadow:
0 20px 60px rgba(0, 0, 0, 0.3),
0 0 0 1px rgba(255, 255, 255, 0.1) inset;
padding: 48px;
width: 90%;
max-width: 440px;
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 登录头部 */
.login-header {
text-align: center;
margin-bottom: 40px;
}
.logo-container {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-bottom: 8px;
}
.logo-icon {
width: 64px;
height: 64px;
display: flex;
align-items: center;
justify-content: center;
animation: float-icon 3s ease-in-out infinite;
}
.logo-icon svg {
width: 100%;
height: 100%;
filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}
@keyframes float-icon {
0%, 100% {
transform: translateY(0) scale(1);
}
50% {
transform: translateY(-5px) scale(1.02);
}
}
.system-title {
font-size: 28px;
font-weight: 700;
color: #1e3a8a;
margin: 0;
}
.system-subtitle {
font-size: 13px;
color: #64748b;
letter-spacing: 1px;
text-transform: uppercase;
margin: 0;
}
/* 表单 */
.login-form {
margin-bottom: 32px;
}
.form-group {
margin-bottom: 24px;
}
.form-group label {
display: block;
font-size: 14px;
font-weight: 600;
color: #334155;
margin-bottom: 8px;
}
.input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.input-icon {
position: absolute;
left: 16px;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
z-index: 1;
color: #64748b;
transition: all 0.3s ease;
}
.input-icon svg {
width: 100%;
height: 100%;
}
.form-input {
width: 100%;
padding: 14px 16px 14px 48px;
font-size: 15px;
font-family: inherit;
color: #1e293b;
background: #f8fafc;
border: 2px solid #e2e8f0;
border-radius: 12px;
transition: all 0.3s ease;
outline: none;
}
.form-input::placeholder {
color: #94a3b8;
}
.form-input:focus {
background: #ffffff;
border-color: #3b82f6;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.input-wrapper:focus-within .input-icon {
color: #3b82f6;
transform: scale(1.1);
}
/* 验证码 */
.captcha-wrapper {
display: flex;
gap: 12px;
align-items: center;
}
.captcha-image-wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 120px;
height: 48px;
background: #f8fafc;
border: 2px solid #e2e8f0;
border-radius: 12px;
overflow: hidden;
flex-shrink: 0;
cursor: pointer;
transition: all 0.3s ease;
}
.captcha-image-wrapper:hover {
border-color: #3b82f6;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
transform: scale(1.02);
}
.captcha-image-wrapper:active {
transform: scale(0.98);
}
.captcha-image-wrapper.refreshing {
animation: rotate 0.3s ease;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
.captcha-image {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
pointer-events: none;
}
/* 错误消息 */
.error-message {
background: #fef2f2;
border: 1px solid #fecaca;
color: #dc2626;
padding: 12px 16px;
border-radius: 10px;
font-size: 14px;
margin-bottom: 20px;
animation: shake 0.4s ease;
}
@keyframes shake {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-10px); }
75% { transform: translateX(10px); }
}
/* 登录按钮 */
.login-btn {
width: 100%;
padding: 16px;
font-size: 16px;
font-weight: 600;
font-family: inherit;
color: #ffffff;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
border: none;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
position: relative;
overflow: hidden;
}
.login-btn::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.5s ease;
}
.login-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.login-btn:hover::before {
left: 100%;
}
.login-btn:active {
transform: translateY(0);
}
.login-btn:disabled {
opacity: 0.7;
cursor: not-allowed;
transform: none;
}
.btn-loader {
display: flex;
gap: 6px;
justify-content: center;
align-items: center;
}
.btn-loader .dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #ffffff;
animation: bounce 0.9s ease infinite;
}
.btn-loader .dot:nth-child(2) {
animation-delay: 0.15s;
}
.btn-loader .dot:nth-child(3) {
animation-delay: 0.3s;
}
@keyframes bounce {
0%, 100% {
transform: translateY(0);
opacity: 0.7;
}
50% {
transform: translateY(-8px);
opacity: 1;
}
}
/* 页脚 */
.login-footer {
text-align: center;
padding-top: 24px;
border-top: 1px solid #e2e8f0;
}
.login-footer p {
font-size: 13px;
color: #64748b;
margin: 0;
}
/* 响应式设计 */
@media (max-width: 768px) {
.login-card {
padding: 32px 24px;
max-width: 100%;
margin: 20px;
}
.system-title {
font-size: 24px;
}
.logo-icon {
font-size: 40px;
}
}
@media (max-width: 480px) {
.login-card {
padding: 24px 20px;
}
.system-title {
font-size: 20px;
}
.logo-container {
flex-direction: column;
gap: 8px;
}
}