| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- /* 基础样式 */
- * {
- 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; /* 使用你的紫色主题色 */
- }
- }
- }
- }
- }
|