login.css 23.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
/**
 * 登录页:夜色地图 + 落点仪器。
 *
 * 构图是三段斜向关系:品牌在左上,标题压在左下,登录卡停在右侧;
 * 底图里一条地址虚线把一个地址标签接到地图上的坐标点位,正好穿过标题与卡片之间。
 * 卡片沿用全站毛玻璃语言,只是翻到深色底图上:浅色玻璃、同一套靛蓝与金色。
 */

.hm-login {
  --hm-login-ink: #f4f6ff;
  --hm-login-ink-2: rgba(226, 232, 255, 0.72);
  --hm-login-ink-3: rgba(203, 214, 245, 0.44);
  --hm-login-line: rgba(200, 214, 255, 0.16);
  /* 两副「仪器」字面:等宽读数字,衬线读标题。只在本页出现,所以留在本页。 */
  --hm-login-mono:
    'IBM Plex Mono', 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --hm-login-serif: 'Songti SC', 'Source Han Serif SC', 'Noto Serif CJK SC', STSong, SimSun, serif;
  /* 输入框底色,以及「浏览器自动回填」用来兜底的那层内阴影。
     两个值是一对:回填色是按这块玻璃叠出来的,改底色的同时必须改它,否则回填又浮出一块。 */
  --hm-login-field-fill: rgba(255, 255, 255, 0.52);
  --hm-login-autofill-fill: rgba(255, 255, 255, 0.26);

  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(400px, 0.85fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 72px);
  padding: clamp(28px, 4vh, 46px) clamp(28px, 5vw, 84px) clamp(28px, 4.4vh, 56px);
  overflow: hidden;
  color: var(--hm-login-ink);
  background:
    radial-gradient(1100px 680px at 70% 80%, rgba(255, 94, 32, 0.16), transparent 62%),
    radial-gradient(900px 620px at 86% 8%, rgba(40, 167, 225, 0.16), transparent 60%),
    radial-gradient(760px 520px at 8% 16%, rgba(92, 111, 180, 0.2), transparent 64%),
    linear-gradient(158deg, #0d1330 0%, #17204a 46%, #10162f 100%);
  isolation: isolate;
}

.hm-login ::selection {
  background: rgba(252, 201, 41, 0.3);
}

/* ------------------------------- 底图 ------------------------------- */

.hm-login__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hm-login__chart {
  display: block;
  width: 100%;
  height: 100%;
  animation: hm-login-scene-in 1.6s ease-out both;
}

.hm-login__chart text {
  font-family: var(--hm-login-mono);
  font-size: 13px;
  letter-spacing: 1.6px;
}

.hm-login__heat {
  animation: hm-login-breathe 16s ease-in-out infinite alternate;
}

.hm-login__route {
  animation: hm-login-dash 2.8s linear infinite;
}

.hm-login__pin-ring {
  fill: none;
  stroke: #fcc929;
  stroke-width: 1.2;
  opacity: 0.6;
  transform-box: fill-box;
  transform-origin: center;
  animation: hm-login-pulse 3.8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.hm-login__pin-ring--late {
  animation-delay: 1.9s;
}

.hm-login__grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.hm-login__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 52% 44%, transparent 38%, rgba(5, 8, 22, 0.5) 100%),
    linear-gradient(
      180deg,
      rgba(5, 8, 22, 0.28) 0%,
      transparent 24%,
      transparent 82%,
      rgba(5, 8, 22, 0.36) 100%
    );
}

/* ------------------------------- 顶栏 ------------------------------- */

.hm-login__top {
  position: relative;
  z-index: 3;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  animation: hm-login-rise 0.8s 0.06s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hm-login .hm-brand__title {
  color: var(--hm-login-ink);
  letter-spacing: 2px;
}

.hm-login .hm-brand__subtitle {
  color: var(--hm-login-ink-3);
  letter-spacing: 1.9px;
}

.hm-login .hm-brand__mark {
  filter: drop-shadow(0 6px 18px rgba(10, 16, 44, 0.55));
}

.hm-login__geo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--hm-login-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--hm-login-ink-3);
  text-transform: uppercase;
  white-space: nowrap;
}

.hm-login__geo-rule {
  width: clamp(28px, 4vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(203, 214, 245, 0.4));
}

.hm-login__geo-coord {
  color: var(--hm-login-ink-2);
}

.hm-login__geo-place {
  padding-left: 12px;
  border-left: 1px solid var(--hm-login-line);
  color: var(--hm-login-ink-3);
}

/* ------------------------------- 左侧主文案 ------------------------------- */

.hm-login__main {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding-bottom: 6px;
}

.hm-login__eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 clamp(16px, 2.4vh, 26px);
  font-size: clamp(11px, 0.85vw, 12.5px);
  letter-spacing: 0.32em;
  color: var(--hm-login-ink-2);
  animation: hm-login-rise 0.9s 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 小十字标:判读点位的符号,也是整页唯一会用到的「准星」 */
.hm-login__cross {
  position: relative;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.hm-login__cross::before,
.hm-login__cross::after {
  content: '';
  position: absolute;
  background: #fcc929;
  opacity: 0.85;
}

.hm-login__cross::before {
  top: 6px;
  left: 0;
  width: 13px;
  height: 1px;
}

.hm-login__cross::after {
  top: 0;
  left: 6px;
  width: 1px;
  height: 13px;
}

.hm-login__display {
  position: relative;
  margin: 0;
  font-family: var(--hm-login-serif);
  font-size: clamp(52px, 6.4vw, 104px);
  font-weight: 600;
  font-synthesis: none;
  line-height: 1.04;
  letter-spacing: 0.07em;
  color: #fbfcff;
  text-shadow: 0 22px 70px rgba(5, 9, 26, 0.55);
  animation: hm-login-rise 1s 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 标题末尾的方点:地图上「这里有一个点」的最小记号 */
.hm-login__display-dot {
  display: inline-block;
  width: 0.13em;
  height: 0.13em;
  margin-left: 0.14em;
  vertical-align: baseline;
  background: #fcc929;
  box-shadow: 0 0 26px rgba(252, 201, 41, 0.85);
}

.hm-login__lede {
  margin: clamp(16px, 2.2vh, 24px) 0 0;
  max-width: 34em;
  font-size: clamp(13.5px, 1.1vw, 16px);
  line-height: 1.85;
  letter-spacing: 0.08em;
  color: var(--hm-login-ink-2);
  animation: hm-login-rise 0.9s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 地址 → 坐标 → 点位:这一页的主题动线,用三段小票 + 流动的金点画出来 */
.hm-login__trace {
  display: flex;
  align-items: center;
  margin-top: clamp(22px, 3.4vh, 34px);
  font-family: var(--hm-login-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--hm-login-ink-3);
  animation: hm-login-rise 0.9s 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hm-login__trace-node {
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid var(--hm-login-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.hm-login__trace-node--pin {
  color: #ffe08a;
  border-color: rgba(252, 201, 41, 0.34);
  background: rgba(252, 201, 41, 0.08);
}

.hm-login__trace-line {
  position: relative;
  width: clamp(36px, 4.6vw, 68px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 214, 255, 0.36) 22%,
    rgba(200, 214, 255, 0.36) 78%,
    transparent
  );
}

.hm-login__trace-line i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fcc929;
  box-shadow: 0 0 12px rgba(252, 201, 41, 0.9);
  animation: hm-login-travel 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hm-login__legend {
  width: min(300px, 72%);
  margin-top: clamp(24px, 5vh, 56px);
  animation: hm-login-rise 0.9s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hm-login__legend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-family: var(--hm-login-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--hm-login-ink-3);
}

.hm-login__legend-ramp {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    #2b4ac7 0%,
    #18a8ff 20%,
    #00e0ce 38%,
    #7ade3c 52%,
    #ffce00 66%,
    #ff7600 80%,
    #ff2a2a 90%,
    #e2004a 100%
  );
  box-shadow: 0 0 28px -6px rgba(255, 118, 0, 0.6);
}

/* ------------------------------- 登录卡 ------------------------------- */

.hm-login__panel {
  position: relative;
  z-index: 4;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

/* 卡片左侧的竖排坐标:仪器边上的刻度条,只做方位提示,不参与阅读顺序 */
.hm-login__spine {
  position: absolute;
  top: 50%;
  right: calc(min(392px, 100%) + 22px);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--hm-login-mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: rgba(203, 214, 245, 0.34);
  pointer-events: none;
  white-space: nowrap;
}

.hm-login__card {
  position: relative;
  width: min(392px, 100%);
  padding: 28px 30px 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  color: var(--hm-text-1);
  background: linear-gradient(165deg, rgba(253, 254, 255, 0.88) 0%, rgba(242, 246, 255, 0.74) 100%);
  box-shadow:
    0 44px 96px -32px rgba(4, 8, 24, 0.9),
    0 2px 0 rgba(255, 255, 255, 0.55) inset,
    0 -1px 0 rgba(70, 83, 162, 0.08) inset;
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  animation: hm-login-card-in 0.95s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 卡片顶缘那截渐变线:把「接入」这件事标出来,又不把整张卡框死 */
.hm-login__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 68px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--hm-primary) 0%, var(--hm-accent-cyan) 100%);
}

.hm-login__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hm-login__card-kicker {
  margin: 0;
  font-family: var(--hm-login-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hm-text-3);
}

/* 卡片右上角的十字标:和左侧标题前的准星同源,尺寸压到最小 */
.hm-login__card-mark {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  opacity: 0.5;
}

.hm-login__card-mark::before,
.hm-login__card-mark::after {
  content: '';
  position: absolute;
  background: var(--hm-primary);
}

.hm-login__card-mark::before {
  top: 7px;
  left: 0;
  width: 15px;
  height: 1px;
}

.hm-login__card-mark::after {
  top: 0;
  left: 7px;
  width: 1px;
  height: 15px;
}

.hm-login__card-title {
  margin: 10px 0 4px;
  font-family: var(--hm-login-serif);
  font-size: 26px;
  font-weight: 600;
  font-synthesis: none;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--hm-text-1);
}

.hm-login__card-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--hm-text-2);
}

.hm-login__form {
  margin-top: 24px;
}

.hm-login__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--hm-text-2);
}

.hm-login__label-no {
  font-family: var(--hm-login-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--hm-text-3);
}

/* ------------------------------------------------------------------ 验证码 */

/*
 * 「换一张」跟在标签文字后面,而不是飘到右端 —— 标签在 antd 里是 inline-flex,
 * 宽度不占满整行,用 margin-left:auto 推不到右边缘,只会挤在自己那一小段的末尾。
 * 所以这里做成「文字后面一个细链接」,靠一条短分隔线跟正文分开。
 */
.hm-login__label-action {
  position: relative;
  margin-inline-start: 2px;
  padding: 0 0 0 11px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--hm-primary);
  transition: opacity 0.18s ease;
}

.hm-login__label-action::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 9px;
  margin-top: -4.5px;
  background: rgba(34, 43, 95, 0.18);
}

.hm-login__label-action:hover:not(:disabled) {
  opacity: 0.72;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hm-login__label-action:disabled {
  cursor: default;
  opacity: 0.45;
}

/*
 * 验证码缩略图。源图是 132×44(3:1),这里固定成 108×36 保持同一比例 ——
 * 换成别的宽高比再用 object-fit 裁,两端的字符会被切掉半个,反而更难认。
 */
.hm-login__captcha-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 108px;
  height: 36px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(34, 43, 95, 0.16);
  border-radius: 7px;
  background: #eef2fb;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.hm-login__captcha-btn:hover:not(:disabled) {
  border-color: rgba(70, 83, 162, 0.42);
  box-shadow: 0 0 0 3px rgba(70, 83, 162, 0.1);
}

.hm-login__captcha-btn:disabled {
  cursor: default;
}

.hm-login__captcha-btn img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.hm-login__captcha-fallback {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--hm-text-3);
}

/* 换图期间压一层浅色遮罩,避免旧图与新图之间出现「点了没反应」的空窗 */
.hm-login__captcha-mask {
  position: absolute;
  inset: 0;
  background: rgba(246, 248, 253, 0.72);
  backdrop-filter: blur(1px);
}
.hm-login__captcha-input{
  padding: 0 4px 0 13px !important;
}
/* 输入的是大写码,显示也统一大写,跟图上的字形对得上 */
.hm-login__captcha-input input {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-family: var(--hm-login-mono);
}

.hm-login__captcha-error {
  font-size: 11px;
  color: var(--hm-error);
}

.hm-login__card-rule {
  height: 1px;
  margin: 20px 0 11px;
  background: linear-gradient(90deg, transparent, rgba(34, 43, 95, 0.16), transparent);
}

.hm-login__card-serial {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--hm-login-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hm-text-3);
}

/* ---------------------------- 登录卡里的 antd ---------------------------- */

.hm-login .ant-form-item {
  margin-bottom: 16px;
}

.hm-login .ant-form-item-label {
  padding: 0 0 7px;
}

.hm-login .ant-form-item-label > label {
  height: auto;
  color: var(--hm-text-2);
}

.hm-login .ant-form-item-explain-error {
  padding-top: 4px;
  font-size: 11px;
}

.hm-login .ant-input-affix-wrapper {
  height: 44px;
  padding: 0  13px;
  border: 1px solid rgba(34, 43, 95, 0.16);
  border-radius: 10px;
  background: var(--hm-login-field-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.hm-login .ant-input-affix-wrapper:hover {
  border-color: rgba(70, 83, 162, 0.38);
  background: rgba(255, 255, 255, 0.68);
}

.hm-login .ant-input-affix-wrapper-focused,
.hm-login .ant-input-affix-wrapper:focus-within {
  border-color: var(--hm-primary) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(70, 83, 162, 0.12) !important;
}

.hm-login .ant-input-affix-wrapper > input.ant-input {
  background: transparent;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--hm-text-1);
}

.hm-login .ant-input-prefix {
  margin-inline-end: 10px;
  color: var(--hm-text-3);
  font-size: 14px;
  transition: color 0.18s ease;
}

.hm-login .ant-input-affix-wrapper-focused .ant-input-prefix,
.hm-login .ant-input-affix-wrapper:focus-within .ant-input-prefix {
  color: var(--hm-primary);
}

.hm-login .ant-input::placeholder {
  color: rgba(85, 90, 102, 0.5);
  letter-spacing: 0.02em;
}

.hm-login .ant-input-password-icon.anticon {
  color: var(--hm-text-3);
}

/*
 * 浏览器「自动填充」回填出来的用户名/密码。
 *
 * Chrome / Edge / Safari / Firefox 会给填过内容的 input 自己刷一层底色(那层是画在
 * input 自己身上的,而 antd 的输入框底色在外层 wrapper 上),于是回填后字段中间会多出
 * 一块比输入框更实、更偏灰黄的矩形 —— 就是用户说的「突兀」。
 *
 * 两层一起压掉:
 * 1) `background-color: transparent` + 极长的 background-color 过渡:浏览器改底色是
 *    走过渡的,把时长拉到 999999s,那层颜色永远过渡不到,等于不出现。
 * 2) 内阴影兜底:万一某个版本不走过渡(Chrome 改过实现),内阴影会盖住那层底色。
 *    这里给的是**半透明白**而不是实色 —— 玻璃卡片压在深色底图上,实色白会明显比
 *    四周的玻璃更亮,反而制造新的色差;半透明白叠在原底色上只提亮几个色阶,读不出来。
 *    聚焦时外层本来就铺成纯白,此时叠一层白等于没叠,仍然一致。
 *
 * 选择器用 `:is(:-webkit-autofill, :autofill)`::-webkit- 前缀在 Firefox、
 * :autofill 在旧 WebKit 里都是「无法识别的选择器」,写在一个逗号列表里会让整条规则被
 * 丢掉;包进 :is() 之后不认识的那半只被忽略,两种引擎都能命中。
 */
.hm-login input:is(:-webkit-autofill, :autofill) {
  -webkit-text-fill-color: var(--hm-text-1);
  caret-color: var(--hm-text-1);
  color-scheme: light;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: 0 0 0 1000px var(--hm-login-autofill-fill) inset !important;
  transition:
    background-color 999999s ease-in-out 0s,
    -webkit-text-fill-color 999999s ease-in-out 0s;
}

/* 聚焦时外层已是纯白,内阴影换成同一支白,避免字段中间再浮出一块 */
.hm-login input:is(:-webkit-autofill, :autofill):focus {
  box-shadow: 0 0 0 1000px #ffffff inset !important;
}

.hm-login__submit-item {
  margin-top: 8px;
  margin-bottom: 0 !important;
}

.hm-login__submit-item .ant-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  border: 0 !important;
  border-radius: 10px;
  overflow: hidden;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  background-color: #3a4694;
  background-image: linear-gradient(120deg, #4653a2 0%, #333d8f 55%, #222b5f 100%);
  box-shadow:
    0 16px 32px -18px rgba(34, 43, 95, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
}

.hm-login__submit-item .ant-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 22%,
    rgba(255, 255, 255, 0.2) 48%,
    transparent 72%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.hm-login__submit-item .ant-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow:
    0 22px 38px -18px rgba(20, 28, 70, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.hm-login__submit-item .ant-btn:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.hm-login__submit-item .ant-btn:active:not(:disabled) {
  transform: translateY(0);
}

.hm-login__submit-item .ant-btn:focus-visible {
  outline: 2px solid var(--hm-accent-cyan);
  outline-offset: 2px;
}

.hm-login__submit-arrow {
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  transition: transform 0.18s ease;
}

.hm-login__submit-item .ant-btn:hover .hm-login__submit-arrow {
  transform: translateX(4px);
}

/* ------------------------------- 动效 ------------------------------- */

@keyframes hm-login-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hm-login-card-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hm-login-scene-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hm-login-breathe {
  from {
    opacity: 0.82;
  }
  to {
    opacity: 1;
  }
}

@keyframes hm-login-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(2.1);
    opacity: 0;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes hm-login-dash {
  to {
    stroke-dashoffset: -40;
  }
}

@keyframes hm-login-travel {
  0% {
    left: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 5px);
    opacity: 0;
  }
}

/* ------------------------------- 响应式 ------------------------------- */

/* 卡片与底图批注在窄屏上会撞在一起:先撤批注,保留经纬网、热力与落点 */
@media (max-width: 1360px) {
  .hm-login__map-note {
    display: none;
  }
}

@media (max-width: 1180px) {
  .hm-login {
    grid-template-columns: minmax(0, 1fr) 380px;
    column-gap: 32px;
    padding-left: 48px;
    padding-right: 48px;
  }

  .hm-login__display {
    font-size: clamp(48px, 6vw, 78px);
  }

  .hm-login__card {
    padding: 26px 26px 20px;
  }

  .hm-login__spine {
    display: none;
  }
}

/* 单列:标题在上、卡片在下,底图退成整页背景 */
@media (max-width: 980px) {
  .hm-login {
    display: block;
    overflow-y: auto;
    padding: 26px 24px 40px;
  }

  .hm-login__top {
    display: flex;
  }

  .hm-login__main {
    display: block;
    padding: 8vh 0 0;
  }

  .hm-login__intro {
    max-width: 640px;
  }

  .hm-login__display {
    font-size: clamp(44px, 10.5vw, 76px);
  }

  .hm-login__lede {
    max-width: 30em;
  }

  .hm-login__legend {
    width: 260px;
    margin-top: 30px;
  }

  .hm-login__panel {
    display: block;
    margin-top: 44px;
  }

  .hm-login__card {
    width: min(430px, 100%);
  }
}

@media (max-width: 640px) {
  .hm-login {
    padding: 22px 18px 32px;
  }

  .hm-login__geo-rule,
  .hm-login__geo-place {
    display: none;
  }

  .hm-login__geo {
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .hm-login__main {
    padding-top: 6vh;
  }

  .hm-login__eyebrow {
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .hm-login__display {
    font-size: clamp(38px, 12vw, 56px);
    letter-spacing: 0.05em;
  }

  .hm-login__lede {
    font-size: 13.5px;
    line-height: 1.8;
  }

  .hm-login__trace {
    font-size: 9.5px;
    letter-spacing: 0.16em;
  }

  .hm-login__trace-node {
    padding: 4px 9px;
  }

  .hm-login__trace-line {
    width: 32px;
  }

  .hm-login__legend {
    width: min(220px, 78%);
    margin-top: 26px;
  }

  .hm-login__panel {
    margin-top: 32px;
  }

  .hm-login__card {
    margin: 0 auto;
    padding: 24px 20px 18px;
    border-radius: 14px;
  }

  .hm-login__card::before {
    left: 20px;
  }

  .hm-login__card-title {
    font-size: 23px;
  }

  .hm-login__card-serial {
    font-size: 8px;
    letter-spacing: 0.16em;
  }
}

/* 矮屏:把纵向的装饰性留白先收掉,卡片与标题都还看得全 */
@media (max-height: 760px) and (min-width: 981px) {
  .hm-login__lede,
  .hm-login__trace {
    margin-top: 18px;
  }

  .hm-login__legend {
    margin-top: 22px;
  }

  .hm-login__display {
    font-size: clamp(48px, 5.6vw, 82px);
  }

  .hm-login__card {
    padding: 24px 26px 18px;
  }

  .hm-login__card-title {
    margin-top: 6px;
    font-size: 24px;
  }

  .hm-login__form {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-login *,
  .hm-login *::before,
  .hm-login *::after {
    animation: none !important;
    transition: none !important;
  }
}