/* 基础样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } :host { display: flex; height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); align-items: center; justify-content: center; } /* 登录容器 */ .login-container { width: 100%; max-width: 420px; padding: 20px; } /* 登录卡片 */ .login-card { background: white; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; } .login-card:hover { transform: translateY(-4px); box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15); } /* 卡片头部 */ .card-header { padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: white; } .logo-container { display: flex; flex-direction: column; align-items: center; gap: 16px; } .logo-icon { width: 64px; height: 64px; background: rgba(255, 255, 255, 0.2); border-radius: 16px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); } .logo-icon .icon { font-size: 32px; width: 32px; height: 32px; color: white; } .title { font-size: 24px; font-weight: 600; letter-spacing: 0.5px; } .subtitle { font-size: 14px; opacity: 0.9; margin-top: 8px; } /* 表单区域 */ .login-form { padding: 40px; } .form-group { margin-bottom: 24px; } .full-width { width: 100%; } /* 错误消息 */ .error-message { background-color: #fee2e2; border: 1px solid #fecaca; border-radius: 8px; padding: 12px 16px; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; color: #dc2626; font-size: 14px; animation: fadeIn 0.3s ease; } .error-message .mat-icon { font-size: 20px; width: 20px; height: 20px; color: #dc2626; } /* 登录按钮 */ .login-button { width: 100%; height: 48px; border-radius: 12px; font-weight: 600; font-size: 15px; letter-spacing: 0.5px; text-transform: none; transition: all 0.3s ease; position: relative; overflow: hidden; } .login-button:not(:disabled) { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); } .login-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3); } .login-button:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; } .button-content { display: flex; align-items: center; justify-content: center; gap: 8px; } .button-content .mat-icon { font-size: 20px; width: 20px; height: 20px; } ::ng-deep .spinner { margin: 0 auto; } ::ng-deep .spinner .mdc-circular-progress__indeterminate-container circle { stroke: white !important; } /* 卡片底部 */ .card-footer { padding: 24px 40px; background-color: #f8fafc; border-top: 1px solid #e2e8f0; text-align: center; font-size: 13px; color: #64748b; line-height: 1.5; } .card-footer p:first-child { margin-bottom: 8px; color: #4f46e5; font-weight: 500; } .card-footer p:last-child { font-size: 12px; } /* 动画 */ @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } /* 响应式设计 */ @media (max-width: 480px) { .login-card { margin: 0 10px; } .card-header, .login-form { padding: 30px 24px; } .card-footer { padding: 20px 24px; } } /* 简洁版:只修复连接线,调整边框颜色 */ :host ::ng-deep { .mat-mdc-form-field { /* 核心修复:只去除 leading 的右边框 */ .mdc-notched-outline__leading { border-right: none !important; } /* 核心修复:只去除 notch 的左右边框 */ .mdc-notched-outline__notch { border-left: none !important; border-right: none !important; } /* 图标无右边框 */ .mat-mdc-form-field-icon-prefix { border-right: none !important; } /* 调整边框颜色,与整体设计协调 */ .mdc-text-field--outlined { .mdc-notched-outline { .mdc-notched-outline__leading, .mdc-notched-outline__notch, .mdc-notched-outline__trailing { border-color: #cbd5e1 !important; /* 更柔和的灰色 */ } } /* 聚焦状态使用主题色 */ &.mdc-text-field--focused .mdc-notched-outline { .mdc-notched-outline__leading, .mdc-notched-outline__notch, .mdc-notched-outline__trailing { border-color: #7c3aed !important; /* 使用你的紫色主题色 */ } } } } }