/* 密巡 CredPatrol 登录页样式：浅蓝波带背景、云盾与玻璃卡片轨道。
   本文件位于 /static/credpatrol/login.css，url() 使用相对本文件的资源路径。 */
:root {
  color-scheme: light;
  --ink: #10284a;
  --muted: #7486a2;
  --blue: #1781f0;
  --line: #dfe9f5;
  --danger: #b42318;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: #f2f8ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; background: radial-gradient(ellipse at 18% 12%, #fff 0, #ffffff80 32%, transparent 65%), linear-gradient(135deg, #f5faff, #edf7ff 66%, #f4faff); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button, input, a { outline-offset: 5px; }
:focus-visible { outline: 3px solid #2695f5; }
[hidden] { display: none !important; }
/* 装饰层不参与命中测试与无障碍树。 */
.reference-background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.background-plate { position: absolute; inset: -4%; background: url("assets/wave-background.png") center / cover no-repeat; animation: wave-drift 24s ease-in-out infinite; }
.ambient-waves { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: .55; }
.background-glow { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 15% 75%, #81d8ff26, transparent 53%), radial-gradient(ellipse at 90% 35%, #7ab8ff15, transparent 50%); }
.page-shell { position: relative; max-width: 1580px; margin: auto; padding: 40px 72px 28px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 18px; color: var(--ink); flex-shrink: 0; }
.brand-mark { display: block; width: 54px; height: 54px; filter: drop-shadow(0 6px 10px #2387e623); }
.brand-name { font-size: 34px; font-weight: 750; letter-spacing: -.045em; }
.brand-divider { height: 26px; width: 1px; background: #bfd4ec; margin: 0 2px; }
.brand-english { font-size: 24px; letter-spacing: .07em; font-weight: 650; color: #547499; }
.brand-note { color: #6b83a4; font-size: 14px; letter-spacing: .06em; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(380px, .9fr); gap: clamp(40px, 5vw, 90px); align-items: center; min-height: calc(100svh - 122px); padding: 44px 0 28px; }
.visual-column { position: relative; top: -56px; min-width: 0; align-self: center; }
.hero-copy { position: relative; z-index: 2; animation: entrance .8s both; }
h1 { margin: 0; color: #102646; font-size: clamp(34px, 3.65vw, 56px); line-height: 1.35; letter-spacing: -.04em; font-weight: 750; white-space: nowrap; }
.hero-subtitle { margin: 17px 0 0; font-size: clamp(18px, 1.7vw, 25px); color: #5d7390; letter-spacing: .07em; line-height: 1.6; }
/* 轨道容器宽度受列宽约束，卡片水平极限由 login.js 按实测宽高换算并收敛。 */
.hero-stage { position: relative; width: 100%; max-width: 100%; height: clamp(320px, 33vw, 480px); margin: 4px 0 -30px; isolation: isolate; animation: entrance 1.1s .1s both; }
.stage-aura { position: absolute; width: 66%; height: 48%; left: 18%; bottom: 7%; background: radial-gradient(ellipse, #4abaff2e, transparent 68%); filter: blur(20px); }
.hero-float { position: absolute; z-index: 2; width: 70%; max-width: 485px; aspect-ratio: 1; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%); animation: cloud-float 8s ease-in-out infinite; }
.cloud-shield { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 22px 23px #459eec16); }
.orbital-paths { position: absolute; inset: 0; width: 100%; height: 100%; stroke-width: 1.15; z-index: 0; }
.orbit-point { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff, #77d1ef 65%, #37a9df); box-shadow: 0 0 12px #88d6f66b; transform: translate(-50%, -50%); }
.glass-tile { position: absolute; width: 120px; height: 120px; background-image: url("assets/orbit-icons.png"); background-size: 300% 200%; background-repeat: no-repeat; transform: translate(-50%, -50%); }
.tile-chart { background-position: 0 0; }
.tile-file { background-position: 50% 0; }
.tile-shield { background-position: 100% 0; }
.tile-server { background-position: 0 100%; }
.tile-gear { background-position: 50% 100%; }
.spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 13px 3px #75d4fb68; animation: breathe 4s ease-in-out infinite; }
.spark-one { top: 55%; left: 1%; }
.spark-two { top: 20%; right: 29%; animation-delay: -2s; }
.spark-three { bottom: 6%; right: 16%; animation-delay: -1s; }
.login-card { position: relative; top: -24px; background: #ffffffeb; border: 1px solid #fff; border-radius: 26px; box-shadow: 0 20px 70px #4b88bf0b, 0 2px 8px #4b88bf04; padding: 48px 42px 35px; width: 100%; max-width: 490px; justify-self: end; animation: entrance .8s .12s both; }
.card-heading h2 { margin: 0; font-size: clamp(26px, 2.5vw, 36px); letter-spacing: -.04em; line-height: 1.35; font-weight: 730; }
.card-heading h2 span { letter-spacing: -.035em; }
.card-heading p { margin: 10px 0 0; color: #5d7390; font-size: 17px; letter-spacing: .03em; line-height: 1.6; }
.login-form { margin-top: 26px; }
.form-field { margin-bottom: 26px; }
.form-field label { display: block; margin-bottom: 10px; color: #566c8a; font-size: 17px; font-weight: 550; }
.input-wrap { position: relative; display: flex; align-items: center; border: 1px solid var(--line); background: #fcfdff; border-radius: 10px; min-height: 55px; transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap:focus-within { border-color: #62b0f4; background: #fff; box-shadow: 0 0 0 3px #258cf00b; }
.input-wrap:has(input[aria-invalid="true"]) { border-color: #e08b83; background: #fffaf9; }
.input-icon { width: 20px; height: 20px; margin-left: 17px; color: #8396b0; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap input { display: block; width: 100%; min-width: 0; min-height: 53px; background: transparent; color: var(--ink); border: none; padding: 12px 14px; font-size: 17px; border-radius: 10px; }
.input-wrap input::placeholder { color: #7b8ca6; }
.input-wrap input:focus { outline: none; }
.input-wrap input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f9fcff inset; -webkit-text-fill-color: var(--ink); }
/* 页面已有显隐按钮，避免 Edge 首次手动输入时再显示原生眼睛。 */
#password::-ms-reveal { display: none; }
.password-toggle { display: grid; place-items: center; flex-shrink: 0; align-self: stretch; width: 46px; padding: 0; border: 0; border-radius: 9px; color: #8b9bb1; background: transparent; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle:hover { color: #1781f0; background: #edf7ff; }
.login-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border-radius: 10px; border: 1px solid #1672d5; margin-top: 30px; background: linear-gradient(105deg, #1376d5, #0866d6); color: #fff; font-size: 17px; font-weight: 600; letter-spacing: .1em; box-shadow: 0 7px 17px #1d8bea18; overflow: hidden; transition: transform .2s, box-shadow .2s, filter .2s; }
.login-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 24px #1d8bea2e; }
.login-button:active:not(:disabled) { transform: translateY(0); }
.login-button:disabled { border-color: #a9c6e6; background: linear-gradient(105deg, #9dbfe2, #86aed8); box-shadow: none; }
/* 旋转指示器只在实际提交阶段出现，避免占用按钮文案节点。 */
.login-form[aria-busy="true"] .login-button::before { content: ""; width: 16px; height: 16px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.form-error { color: var(--danger); background: #fff4f2; border: 1px solid #f0c4bf; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.7; margin: 18px 0 0; }
.form-status { color: #526c8e; background: #edf7ff; padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.75; margin: 16px 0 0; min-height: 38px; }
/* 状态行为空时收起底色，避免登录完成后残留一条无意义的浅蓝条。 */
.form-status:empty { min-height: 0; padding: 0; background: transparent; margin-top: 12px; }
.direct-link { display: block; margin-top: 18px; padding: 13px 14px; text-align: center; color: #1267b4; background: #edf7ff; border: 1px solid #cfe4fa; border-radius: 10px; font-weight: 600; text-decoration: none; }
.direct-link:hover { background: #e2f1ff; }
.support-links { display: flex; align-items: center; justify-content: center; gap: 21px; margin-top: 26px; font-size: 13px; }
.support-links button { padding: 7px 0; color: #526d91; border: none; background: none; transition: color .2s; }
.support-links button:hover { color: #1267b4; text-decoration: underline; text-underline-offset: 4px; }
.support-links span { color: #c2d1e5; }
.help-dialog { border: 1px solid #e2edf8; border-radius: 22px; padding: 36px; max-width: min(420px, calc(100% - 40px)); color: var(--ink); box-shadow: 0 24px 100px #18396025; }
.help-dialog::backdrop { background: #193a5d38; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 11px; right: 13px; border: 0; background: transparent; color: #7f93ad; font-size: 25px; width: 34px; height: 34px; border-radius: 8px; }
.dialog-close:hover { background: #edf7ff; }
.help-symbol { display: grid; place-items: center; width: 49px; height: 49px; color: #238ef0; background: #edf7ff; border-radius: 14px; }
.help-symbol svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.help-dialog h2 { font-size: 22px; margin: 21px 0 12px; }
.help-dialog p { font-size: 14px; line-height: 1.9; color: #5d7390; margin: 0; }
.dialog-confirm { display: block; width: 100%; padding: 12px; margin-top: 25px; border: 0; background: #1376d5; color: #fff; border-radius: 9px; }
@keyframes entrance { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cloud-float { 0%, 100% { transform: translate(-50%, calc(-50% + 4px)); } 50% { transform: translate(-50%, calc(-50% - 4px)); } }
@keyframes wave-drift { 0%, 100% { transform: translate3d(-1.2%, .6%, 0) scale(1.035); } 50% { transform: translate3d(1.2%, -.6%, 0) scale(1.06); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes breathe { 50% { opacity: .3; scale: .7; } }
body[data-motion="paused"] *, body[data-motion="paused"] *::before { animation-play-state: paused !important; }
body[data-page-hidden="true"] *, body[data-page-hidden="true"] *::before { animation-play-state: paused !important; }
@media (min-width: 1550px) {
  .page-shell { padding-top: 48px; }
  .login-card { padding: 57px 48px 40px; }
  .login-form { margin-top: 32px; }
  .hero-stage { height: 490px; }
  .hero-float { max-width: 535px; }
}
@media (max-width: 1190px) {
  .page-shell { padding: 32px 44px 24px; }
  .login-layout { gap: 38px; grid-template-columns: minmax(0, 1fr) 390px; }
  .login-card { padding: 40px 30px 30px; }
  .brand-name { font-size: 30px; }
  .brand-english { font-size: 21px; }
  .brand-mark { width: 49px; height: 49px; }
  .glass-tile { width: 104px; height: 104px; }
  .card-heading h2 { font-size: 29px; }
}
@media (max-width: 930px) {
  .page-shell { padding: 28px 28px 38px; }
  .login-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; min-height: calc(100svh - 112px); padding-top: 38px; }
  .login-card { padding: 35px 26px 26px; border-radius: 22px; }
  h1 { font-size: clamp(25px, 3.35vw, 31px); }
  .hero-subtitle { font-size: 17px; letter-spacing: .02em; }
  .hero-stage { height: 300px; margin-top: 18px; }
  .glass-tile { width: 88px; height: 88px; }
  .brand { gap: 13px; }
  .brand-name { font-size: 28px; }
  .brand-english { font-size: 20px; }
  .brand-mark { width: 45px; height: 45px; }
  .brand-note { display: none; }
  .card-heading h2 { font-size: 27px; }
  .card-heading p { font-size: 16px; }
  .login-form { margin-top: 19px; }
}
@media (max-width: 760px) {
  .page-shell { max-width: 540px; padding: 25px 22px 34px; }
  .brand { gap: 11px; }
  .brand-mark { width: 41px; height: 41px; }
  .brand-name { font-size: 26px; }
  .brand-divider { height: 21px; margin: 0; }
  .brand-english { font-size: 17px; letter-spacing: .045em; }
  .page-header { gap: 10px; }
  .login-layout { display: flex; flex-direction: column; gap: 20px; min-height: auto; padding: 39px 0 0; }
  .visual-column { width: 100%; top: -12px; }
  .hero-copy { text-align: center; }
  h1 { font-size: clamp(22px, 6vw, 30px); line-height: 1.4; white-space: normal; }
  .hero-subtitle { font-size: 16px; margin-top: 10px; }
  .hero-stage { height: 215px; width: min(100%, 400px); margin: 5px auto -3px; }
  .hero-float { width: 64%; max-width: 275px; }
  .glass-tile { width: 76px; height: 76px; }
  .orbit-point { width: 8px; height: 8px; }
  .login-card { top: -12px; width: 100%; max-width: none; padding: 29px 26px 23px; }
  .card-heading h2 { font-size: 28px; }
  .card-heading p { font-size: 16px; margin-top: 7px; }
  .login-form { margin-top: 15px; }
  .form-field { margin-bottom: 22px; }
  .form-field label { font-size: 17px; margin-bottom: 8px; }
  .input-wrap input { font-size: 17px; }
  .login-button { margin-top: 27px; height: 53px; }
  .support-links { margin-top: 20px; }
}
@media (max-width: 370px) {
  .page-shell { padding-inline: 17px; }
  .brand { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 24px; }
  .brand-english { font-size: 15px; }
  .login-card { padding-inline: 23px; }
  .hero-stage { height: 190px; }
}
@media (min-width: 761px) and (max-height: 820px) { .visual-column { top: -32px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
