* { box-sizing: border-box; }

:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #171717;
  --cdhu-red: #d50024;
  --cdhu-dark-red: #a6001c;
  --cdhu-wine: #750012;
  --cdhu-deep-wine: #4f0712;
  --cdhu-black: #161616;
  --cdhu-gray: #666a70;
  --cdhu-light: #f2f4f6;
  --input-border: #e1e3e7;
}

html, body { width: 100%; min-height: 100%; }
body {
  position: relative;
  margin: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f8f9fa;
}
button, input { font: inherit; letter-spacing: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.red-field { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.red-field-shadow { fill: #d50024; opacity: .38; }

.house-background { position: fixed; left: -3vw; top: 50%; width: min(54vw, 880px); height: min(80vh, 820px); transform: translateY(-47%); pointer-events: none; }
.house-background svg { width: 100%; height: 100%; }
.house-background path { stroke: #dfe3e7; stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; opacity: .32; vector-effect: non-scaling-stroke; }

.city-background { position: fixed; left: 0; bottom: 0; width: 60vw; height: min(27vh, 270px); pointer-events: none; }
.city-fill { fill: #e4e7eb; opacity: .56; }
.bridge-lines { fill: none; stroke: #dfe3e7; stroke-width: 3; opacity: .5; vector-effect: non-scaling-stroke; }

.dot-grid { position: fixed; width: 82px; height: 68px; background-image: radial-gradient(circle, var(--cdhu-red) 1.7px, transparent 1.9px); background-size: 16px 15px; pointer-events: none; opacity: .84; }
.dot-grid-top { top: 28px; left: 24px; }
.dot-grid-bottom { left: 42%; bottom: 48px; opacity: .45; }

.left-identity { position: fixed; left: clamp(54px, 8vw, 154px); top: 55%; width: min(31vw, 420px); transform: translateY(-50%); z-index: 1; }
.identity-logo { position: relative; width: min(100%, 380px); aspect-ratio: 2.75 / 1; overflow: hidden; }
.identity-logo img { position: absolute; width: 126%; height: auto; max-width: none; left: 50%; top: 50%; transform: translate(-50%, -50%); mix-blend-mode: multiply; }
.left-identity h2 { margin: 4px 0 0 38px; font-size: clamp(31px, 2.45vw, 44px); line-height: 1.18; font-weight: 650; }
.left-identity h2 span { color: var(--cdhu-red); }
.left-identity p { margin: 14px 0 0 38px; color: var(--cdhu-gray); font-size: clamp(16px, 1.15vw, 21px); font-weight: 400; }

.right-watermark { position: fixed; right: 3.4vw; top: 50%; transform: translateY(-42%); color: rgba(230, 0, 38, .16); font-size: clamp(120px, 11vw, 210px); font-weight: 800; line-height: 1; letter-spacing: 0; text-shadow: 1px 1px 0 rgba(255,255,255,.025), -2px -2px 4px rgba(50,0,8,.12); pointer-events: none; user-select: none; }

.login-card {
  position: absolute;
  left: 50%;
  top: 50%;
  isolation: isolate;
  width: min(510px, 90vw);
  height: min(720px, calc(100vh - 36px));
  min-height: 640px;
  padding: 142px 48px 130px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(28, 31, 35, .07);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(20, 15, 16, .16), 0 5px 14px rgba(20, 15, 16, .08);
  z-index: 5;
  animation: card-enter .46s ease-out both;
}
.card-wave { position: absolute; left: 0; width: 100%; pointer-events: none; z-index: -1; }
.wave-top { top: 0; height: 132px; }
.wave-bottom { bottom: 0; height: 142px; }

.login-brand { text-align: center; margin-bottom: 32px; }
.service-icon { display: block; width: 88px; height: 88px; margin: 0 auto 12px; }
.login-brand h1 { margin: 0; font-size: 40px; line-height: 1.18; font-weight: 700; }
.login-brand h1 span { color: var(--cdhu-red); }
.login-brand p { margin: 8px 0 0; color: var(--cdhu-gray); font-size: 17px; line-height: 1.45; }
.brand-divider { display: block; width: 56px; height: 3px; margin: 17px auto 0; border-radius: 3px; background: var(--cdhu-red); }

#login-form { position: relative; }
.login-field { position: relative; display: flex; align-items: center; height: 61px; margin-bottom: 20px; }
.login-field input { width: 100%; min-width: 0; height: 100%; padding: 0 18px 0 54px; border: 1px solid var(--input-border); border-radius: 9px; outline: none; background: #fff; color: #23262a; font-size: 16px; box-shadow: 0 1px 4px rgba(25, 29, 34, .03); transition: border-color .2s, box-shadow .2s; }
.login-field input::placeholder { color: #5e6168; opacity: 1; }
.login-field input:focus { border-color: var(--cdhu-red); box-shadow: 0 0 0 3px rgba(213, 0, 36, .09); }
.password-field input { padding-right: 58px; }
.icon { display: block; flex: 0 0 auto; width: 22px; height: 22px; background: currentColor; mask-repeat: no-repeat; mask-size: contain; mask-position: center; }
.icon-user { mask-image: url("login/lucide/user-round.svg"); }
.icon-lock { mask-image: url("login/lucide/lock-keyhole.svg"); }
.icon-eye { mask-image: url("login/lucide/eye.svg"); }
.icon-eye-off { mask-image: url("login/lucide/eye-off.svg"); }
.icon-arrow { mask-image: url("login/lucide/arrow-right.svg"); }
.field-icon { position: absolute; left: 17px; color: var(--cdhu-red); pointer-events: none; z-index: 1; }
.password-toggle { position: absolute; right: 5px; width: 50px; height: 50px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #6a6e73; cursor: pointer; }
.password-toggle:hover { background: #f5f6f7; color: var(--cdhu-black); }
.password-toggle:focus-visible, .login-submit:focus-visible { outline: 2px solid var(--cdhu-black); outline-offset: 3px; }
.login-submit { position: relative; width: 100%; height: 62px; margin-top: 4px; padding: 0 56px; border: 0; border-radius: 9px; background: linear-gradient(90deg, #c60021, #df0028); color: #fff; font-size: 17px; font-weight: 700; text-transform: uppercase; cursor: pointer; box-shadow: 0 7px 15px rgba(174, 0, 29, .16); transition: transform .2s, box-shadow .2s, filter .2s; }
.login-submit .icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
.login-submit:hover { filter: brightness(.92); transform: translateY(-1px); box-shadow: 0 9px 20px rgba(145, 0, 24, .2); }
.login-submit:disabled { cursor: wait; opacity: .76; transform: none; }
.login-error { padding: 10px 13px; margin: -14px 0 14px; border-left: 3px solid var(--cdhu-red); border-radius: 4px; background: #fff2f4; color: #921429; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.mfa-guidance{display:grid;gap:4px;margin:-12px 0 16px;padding:12px 14px;border-left:3px solid var(--cdhu-red);border-radius:4px;background:#f7f7f8;color:#30343a;font-size:13px;line-height:1.4}.mfa-guidance strong{font-size:14px}.mfa-cancel{display:block;margin:13px auto 0;border:0;background:transparent;color:#6b202d;font:600 13px Segoe UI,Arial,sans-serif;cursor:pointer;text-decoration:underline}.mfa-cancel:focus-visible{outline:2px solid var(--cdhu-black);outline-offset:3px}
#login-progress{margin:11px 0 0;color:#5b2630;font-size:12px;line-height:1.45;text-align:center}
#login-progress[hidden]{display:none}

.login-footer { position: fixed; left: 31%; bottom: 14px; transform: translateX(-50%); color: var(--cdhu-gray); font-size: 13px; line-height: 1.4; z-index: 2; }

@keyframes card-enter {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-width: 1300px) {
  .left-identity { left: 4vw; width: 300px; }
  .identity-logo { width: 300px; }
  .left-identity h2, .left-identity p { margin-left: 26px; }
  .login-card { left: 50%; width: min(490px, 88vw); }
  .right-watermark { right: 2vw; }
}

@media (min-width: 1301px) and (max-width: 1500px) {
  .left-identity { left: 4.5vw; width: 320px; }
  .identity-logo { width: 320px; }
  .left-identity h2, .left-identity p { margin-left: 24px; }
}

@media (max-width: 1100px) {
  .left-identity { left: 3vw; width: 230px; }
  .identity-logo { width: 230px; }
  .left-identity h2 { margin-left: 18px; font-size: 30px; }
  .left-identity p { margin-left: 18px; font-size: 15px; }
  .login-card { left: 50%; width: 460px; }
  .right-watermark { right: 1vw; font-size: 110px; }
}

@media (max-width: 1000px) {
  .left-identity { display: none; }
}

@media (max-height: 800px) and (min-width: 769px) {
  .login-card { height: calc(100vh - 50px); min-height: 640px; padding: 116px 44px 108px; }
  .wave-top { height: 108px; }
  .wave-bottom { height: 112px; }
  .service-icon { width: 70px; height: 70px; margin-bottom: 7px; }
  .login-brand { margin-bottom: 22px; }
  .login-brand h1 { font-size: 34px; }
  .login-brand p { margin-top: 5px; font-size: 15px; }
  .brand-divider { margin-top: 11px; }
  .login-field { height: 54px; margin-bottom: 16px; }
  .login-submit { height: 55px; }
  .login-footer { bottom: 7px; font-size: 12px; }
}

@media (max-width: 768px) {
  body { height: auto; min-height: 100svh; overflow-x: hidden; overflow-y: auto; display: grid; place-items: center; padding: 12px; background: #f7f8f9; }
  .red-field { width: 100%; height: 100%; opacity: .95; transform: translateX(37%); }
  .house-background { left: -42%; width: 135vw; opacity: .55; }
  .city-background { width: 100%; height: 20vh; opacity: .45; }
  .left-identity, .right-watermark, .dot-grid-bottom { display: none; }
  .dot-grid-top { top: 16px; left: 14px; opacity: .36; }
  .login-card { position: relative; left: auto; top: auto; width: min(480px, calc(100vw - 24px)); height: min(680px, calc(100svh - 24px)); min-height: 620px; padding: 124px 32px 112px; transform: none; }
  .wave-top { height: 112px; }
  .wave-bottom { height: 118px; }
  .service-icon { width: 74px; height: 74px; margin-bottom: 8px; }
  .login-brand { margin-bottom: 24px; }
  .login-brand h1 { font-size: 34px; }
  .login-brand p { font-size: 15px; }
  .brand-divider { margin-top: 12px; }
  .login-field { height: 56px; margin-bottom: 17px; }
  .login-submit { height: 57px; }
  .login-footer { position: absolute; left: 50%; bottom: 4px; width: 100%; padding: 0 12px; text-align: center; transform: translateX(-50%); font-size: 11px; }
  @keyframes card-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 390px), (max-height: 650px) {
  .login-card { min-height: 590px; padding: 108px 24px 100px; }
  .wave-top { height: 96px; }
  .wave-bottom { height: 102px; }
  .service-icon { width: 64px; height: 64px; }
  .login-brand { margin-bottom: 18px; }
  .login-brand h1 { font-size: 30px; }
  .login-brand p { font-size: 14px; }
  .login-field { height: 52px; margin-bottom: 14px; }
  .login-submit { height: 53px; }
}

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