Files
leaudit-platform-frontend/app/styles/pages/login.css
T

620 lines
10 KiB
CSS

/* 登录页面样式 */
.login-page {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: url('/images/登录页背景-min.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
/* 加载图标旋转动画 */
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.ri-loader-4-line {
animation: spin 1s linear infinite;
}
.login-container {
width: 100%;
max-width: 480px;
min-width: 320px;
height: auto;
min-height: 600px;
max-height: 800px;
padding: 2rem;
perspective: 1000px;
}
.login-card {
position: relative;
width: 100%;
height: auto;
min-height: 100%;
transition: transform 0.8s;
transform-style: preserve-3d;
}
.login-container.flipped .login-card {
transform: rotateY(180deg);
}
.login-card-front,
.login-card-back {
position: absolute;
width: 100%;
height: auto;
min-height: 100%;
backface-visibility: hidden;
background-color: white;
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
padding: 2rem;
display: flex;
flex-direction: column;
}
.login-card-back {
transform: rotateY(180deg);
}
.login-header {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 2rem;
}
.login-logo {
height: 60px;
margin-bottom: 1rem;
}
.login-title {
font-size: 1.5rem;
font-weight: 600;
color: #015c42;
text-align: center;
}
.login-subtitle {
font-size: 1.25rem;
font-weight: 500;
color: #333;
margin-bottom: 1.5rem;
text-align: center;
}
.login-form-container {
margin-bottom: 2rem;
position: relative;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
/* OAuth2.0 登录样式 */
.oauth-login-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.5rem;
}
.login-description {
text-align: center;
color: #666;
margin-bottom: 1rem;
}
.login-description p {
font-size: 0.95rem;
line-height: 1.5;
}
.oauth-login-button {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
width: 100%;
padding: 0.875rem 1.5rem;
background: linear-gradient(135deg, #015c42 0%, #01704e 100%);
color: white;
border: none;
border-radius: 6px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.oauth-login-button:hover {
background: linear-gradient(135deg, #01704e 0%, #015c42 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(1, 92, 66, 0.3);
}
.oauth-login-button:active {
transform: translateY(0);
}
.oauth-login-button i {
font-size: 1.25rem;
opacity: 0.9;
}
.login-tips {
text-align: center;
color: #888;
font-size: 0.85rem;
margin-top: 1rem;
}
.login-tips p {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
margin: 0;
}
.login-tips i {
font-size: 0.95rem;
color: #999;
}
/* 管理员登录链接样式 */
.admin-login-link {
position: absolute;
bottom: 0;
right: 0;
margin-top: 1rem;
}
.admin-login-text {
background: none;
border: none;
color: #015c42;
font-size: 0.85rem;
cursor: pointer;
text-decoration: underline;
transition: color 0.3s ease;
}
.admin-login-text:hover {
color: #01704e;
}
/* 管理员登录表单样式 */
.admin-login-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-label {
font-size: 0.9rem;
font-weight: 500;
color: #333;
}
.form-input {
padding: 0.75rem 1rem;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 1rem;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
outline: none;
border-color: #015c42;
box-shadow: 0 0 0 3px rgba(1, 92, 66, 0.1);
}
.form-input::placeholder {
color: #9ca3af;
}
/* 密码输入框包装器 */
.password-input-wrapper {
position: relative;
width: 100%;
}
.password-input-wrapper .form-input {
padding-right: 3rem;
}
/* 密码切换按钮 */
.password-toggle-button {
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 3rem;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
color: #6b7280;
cursor: pointer;
transition: color 0.2s ease;
font-family: 'remixicon' !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
}
.password-toggle-button:hover {
color: #015c42;
}
.password-toggle-button:focus {
outline: none;
color: #015c42;
}
.password-toggle-button i {
font-size: 1.25rem;
pointer-events: none;
}
.admin-login-button {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
width: 100%;
padding: 0.875rem 1.5rem;
background: linear-gradient(135deg, #015c42 0%, #01704e 100%);
color: white;
border: none;
border-radius: 6px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 1rem;
}
.admin-login-button:hover {
background: linear-gradient(135deg, #01704e 0%, #015c42 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(1, 92, 66, 0.3);
}
.admin-login-button:active {
transform: translateY(0);
}
.admin-login-button i {
font-size: 1.25rem;
opacity: 0.9;
}
/* 返回按钮样式 */
.back-to-oauth {
margin-top: 1.5rem;
text-align: center;
}
.back-button {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
background: none;
border: 1px solid #d1d5db;
color: #666;
padding: 0.5rem 1rem;
border-radius: 6px;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.3s ease;
}
.back-button:hover {
border-color: #015c42;
color: #015c42;
background-color: rgba(1, 92, 66, 0.05);
}
.back-button i {
font-size: 1rem;
}
/* 错误消息样式 */
.error-message-container {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.75rem 1rem;
background-color: #fef2f2;
border-left: 4px solid #ef4444;
border-radius: 4px;
margin-bottom: 1.5rem;
animation: fadeIn 0.3s ease;
word-wrap: break-word;
overflow-wrap: break-word;
align-items: center;
}
.error-icon {
color: #ef4444;
font-size: 1.1rem;
flex-shrink: 0;
margin-top: 0.1rem;
}
.error-text {
color: #dc2626;
font-size: 0.9rem;
line-height: 1.4;
flex: 1;
word-break: break-word;
}
.login-footer {
text-align: center;
color: #888;
font-size: 0.85rem;
margin-top: auto;
flex-shrink: 0;
}
.login-footer p {
margin: 0;
}
/* 动画效果 */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
/* 响应式设计 */
/* 大屏幕 (1200px 及以上) */
@media (min-width: 1200px) {
.login-container {
max-width: 600px;
min-height: 700px;
max-height: 900px;
padding: 2.5rem;
}
.login-title {
font-size: 1.8rem;
}
.login-subtitle {
font-size: 1.4rem;
}
.oauth-login-button,
.admin-login-button {
padding: 1rem 2rem;
font-size: 1.1rem;
}
.form-input {
padding: 1rem 1.25rem;
font-size: 1.1rem;
}
}
/* 中等屏幕 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
.login-container {
max-width: 540px;
min-height: 650px;
max-height: 850px;
padding: 2.25rem;
}
.login-title {
font-size: 1.6rem;
}
.login-subtitle {
font-size: 1.3rem;
}
.oauth-login-button,
.admin-login-button {
padding: 0.875rem 1.75rem;
font-size: 1.05rem;
}
}
/* 小屏幕 (640px - 767px) */
@media (min-width: 640px) and (max-width: 767px) {
.login-container {
max-width: 500px;
min-height: 600px;
max-height: 800px;
padding: 2rem;
}
.login-title {
font-size: 1.4rem;
}
.login-subtitle {
font-size: 1.2rem;
}
}
/* 移动设备 (640px 及以下) */
@media (max-width: 640px) {
.login-container {
margin: 1rem;
padding: 1.5rem;
min-height: 550px;
max-height: 700px;
}
.login-card-front,
.login-card-back {
padding: 1.5rem;
}
.login-title {
font-size: 1.3rem;
}
.login-subtitle {
font-size: 1.1rem;
}
.oauth-login-button,
.admin-login-button {
padding: 0.75rem 1.25rem;
font-size: 0.95rem;
}
.form-input {
padding: 0.75rem 1rem;
font-size: 0.95rem;
}
.form-label {
font-size: 0.85rem;
}
}
/* 超小屏幕 (480px 及以下) */
@media (max-width: 480px) {
.login-container {
margin: 0.5rem;
padding: 1rem;
min-height: 500px;
max-height: 650px;
min-width: 280px;
}
.login-card-front,
.login-card-back {
padding: 1rem;
}
.login-title {
font-size: 1.2rem;
}
.login-subtitle {
font-size: 1rem;
}
.oauth-login-button,
.admin-login-button {
padding: 0.625rem 1rem;
font-size: 0.9rem;
}
.form-input {
padding: 0.625rem 0.875rem;
font-size: 0.9rem;
}
.form-label {
font-size: 0.8rem;
}
.login-header {
margin-bottom: 1.5rem;
}
.login-form-container {
margin-bottom: 1.5rem;
}
}
/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
.login-card-front,
.login-card-back {
background-color: #1f2937;
color: #f9fafb;
}
.login-subtitle {
color: #e5e7eb;
}
.login-description {
color: #9ca3af;
}
.login-tips {
color: #6b7280;
}
.login-footer {
color: #6b7280;
}
.form-label {
color: #e5e7eb;
}
.form-input {
background-color: #374151;
border-color: #4b5563;
color: #f9fafb;
}
.form-input:focus {
border-color: #015c42;
}
.back-button {
border-color: #4b5563;
color: #9ca3af;
}
.back-button:hover {
border-color: #015c42;
color: #015c42;
background-color: rgba(1, 92, 66, 0.1);
}
.admin-login-text {
color: #60a5fa;
}
.admin-login-text:hover {
color: #93c5fd;
}
.password-toggle-button {
color: #9ca3af;
}
.password-toggle-button:hover,
.password-toggle-button:focus {
color: #60a5fa;
}
}