:root {
  color-scheme: light dark;
  --page: #fff;
  --surface: #fff;
  --ink: #171717;
  --muted: #656763;
  --line: #c8c9c5;
  --edge: #e5e5e3;
  --accent: #a8ff00;
  --hover: #96e600;
  --on-accent: #1c2906;
  --accent-ink: #45661c;
  --focus: #597b38;
  --brand-start: #163f34;
  --brand-mid: #297043;
  --brand-glint: #668c1b;
  --error: #9c382e;
  --sea: #f3f9e7;
  --ripple: rgb(74 151 123 / 57%);
  --water-glow: rgb(141 191 128 / 23%);
  --shadow: rgb(30 30 30 / 8%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #151912;
    --surface: #20261c;
    --ink: #f2f6ec;
    --muted: #b8c2ae;
    --line: #66735c;
    --edge: #3b4534;
    --accent-ink: #bbeb71;
    --focus: #b3d985;
    --brand-start: #c4eee2;
    --brand-mid: #79d69b;
    --brand-glint: #c6ff62;
    --error: #ffaea1;
    --sea: #25371a;
    --ripple: rgb(140 228 193 / 65%);
    --water-glow: rgb(121 199 142 / 18%);
    --shadow: rgb(0 0 0 / 20%);
  }
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--page);
  font: 16px/1.5 system-ui, "Microsoft YaHei", sans-serif;
}
main {
  width: min(100%, 1180px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center;
  gap: clamp(32px, 7vw, 100px);
  padding: 48px clamp(28px, 5vw, 72px);
}
.brand { display: grid; justify-items: center; min-width: 0; }
.ocean {
  --rise: clamp(55px, 7vw, 90px);
  --bob: -5px;
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1.47;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, var(--sea), transparent 70%);
  pointer-events: none;
}
.whale {
  position: relative;
  width: 65%;
  height: auto;
  margin-top: -8%;
  filter: drop-shadow(0 12px 15px var(--shadow));
}
.ripples {
  position: absolute;
  width: 76%;
  height: 20%;
  bottom: 1%;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--water-glow), transparent 68%);
}
.ripples > i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ripple);
  border-radius: 50%;
  box-shadow: inset 0 -1px 2px var(--water-glow);
  transform: scale(.48);
}
.ripples > :nth-child(2) { transform: scale(.74); opacity: .66; --phase: -1.6s; }
.ripples > :nth-child(3) { transform: scale(1); opacity: .36; --phase: -3.2s; }
.bubble {
  position: absolute;
  width: 6%;
  aspect-ratio: 1;
  border: 1px solid var(--ripple);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, #fff 0 8%, transparent 20%),
    radial-gradient(circle at 40% 37%, transparent 36%, var(--water-glow) 76%, var(--ripple));
}
.bubble-left { left: 9%; top: 60%; --period: 5.8s; --phase: -2.8s; --drift: 6px; }
.bubble-right { right: 9%; top: 39%; width: 4%; --period: 6.7s; --phase: -4.2s; --drift: -5px; }
.bubble-left-small { left: 16%; top: 42%; width: 2.3%; --period: 6.4s; --phase: -1.3s; --drift: -4px; }
.bubble-right-small { right: 15%; top: 66%; width: 2.8%; --period: 5.1s; --phase: -1.9s; --drift: 5px; }
@media (prefers-reduced-motion: no-preference) {
  .ripples > i { animation: water-ring 4.8s linear var(--phase, 0s) infinite; }
  .bubble { animation: bubble-rise var(--period) ease-in-out var(--phase) infinite; }
  .whale { animation: whale-float 4.8s ease-in-out -1.2s infinite; }
}
@keyframes water-ring {
  0% { transform: scale(.32); opacity: 0; }
  14% { opacity: .95; }
  65% { opacity: .62; }
  100% { transform: scale(1.08); opacity: 0; }
}
@keyframes bubble-rise {
  0% { transform: translate(0, 0) scale(.76); opacity: 0; }
  18% { opacity: .94; }
  52% { transform: translate(var(--drift), calc(var(--rise) * -.5)) scale(.96); }
  76% { opacity: .84; }
  100% { transform: translate(0, calc(-1 * var(--rise))) scale(1.04); opacity: 0; }
}
@keyframes whale-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--bob)); }
}
.wordmark {
  margin: 22px 0 0;
  font-size: clamp(40px, 5.3vw, 64px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.28;
  padding: 0 .05em .08em;
  color: var(--brand-start);
}
@supports (background-clip: text) {
  .wordmark {
    background-image: linear-gradient(105deg, var(--brand-start) 8%, var(--brand-mid) 36%, var(--brand-glint) 52%, var(--brand-mid) 69%, var(--brand-start) 95%);
    background-size: 145% 100%;
    background-position: 58% center;
    background-clip: text;
    color: transparent;
  }
  @media (prefers-reduced-motion: no-preference) {
    .wordmark { animation: whale-wordmark-light 2100ms ease-out; }
    @keyframes whale-wordmark-light {
      from { background-position: 0% center; }
      to { background-position: 58% center; }
    }
  }
  @media (forced-colors: active) {
    .wordmark { color: CanvasText; background: none; animation: none; }
  }
}
.card {
  width: min(100%, 420px);
  justify-self: center;
  padding: clamp(32px, 4.5vw, 56px) clamp(26px, 3.2vw, 44px);
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 40px -12px var(--shadow);
}
.card header { margin-bottom: 32px; text-align: center; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.25; font-weight: 500; letter-spacing: -.035em; }
form, dl { display: grid; gap: 20px; }
.row { display: grid; gap: 7px; }
label { font-size: .94rem; font-weight: 500; }
input, button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}
button:not(.reveal) {
  min-height: 54px;
  margin-top: 8px;
  cursor: pointer;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
}
.entry { position: relative; }
.remember { display: flex; align-items: center; gap: 9px; width: fit-content; min-height: 30px; cursor: pointer; color: var(--muted); }
.remember input { width: 17px; height: 17px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.remember + button[type=submit] { margin-top: 0; }
.entry input { height: 54px; border-radius: 10px; }
.entry input::placeholder { color: var(--muted); }
.account input { padding-left: 42px; }
.entry > svg { position: absolute; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.account > svg, .password > svg { left: 14px; }
.password input { padding-inline: 42px 48px; }
.password input::-ms-reveal { display: none; }
.reveal {
  position: absolute;
  inset-block: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.reveal[hidden], .password input[type=password] + .reveal .slash { display: none; }
@media (hover: hover) {
  button:not(.reveal):hover { background: var(--hover); }
  .reveal:hover { color: var(--ink); background: var(--sea); }
}
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
input:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
[role=alert] { margin: 0 0 18px; color: var(--error); }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 3px 0 0; overflow-wrap: anywhere; }
a { color: var(--accent-ink); }
.company-code { border-top: 1px solid var(--edge); min-width: 0; }
.company-code summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 10px 2px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink);
  font-size: .9rem;
}
.company-code summary::-webkit-details-marker { display: none; }
.company-code summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  margin: 0 4px;
}
.company-code[open] summary::after { transform: translateY(2px) rotate(225deg); }
.company-code .code-value {
  margin-left: auto;
  color: var(--muted);
  font-size: .8rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.company-code summary > :first-child { flex: 0 0 auto; }
.company-code input { margin-top: 2px; }
.card:has(.company-code) { padding-bottom: clamp(14px, 2.4vw, 24px); }
@media (max-width: 740px) {
  main { max-width: 476px; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px 18px; }
  .brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
  .ocean { width: 76px; aspect-ratio: 76 / 66; --rise: 19px; --bob: -2px; }
  .whale { width: 82%; margin-top: -5%; }
  .bubble-left { left: 2%; width: 7%; --drift: 2px; }
  .bubble-right { right: 2%; width: 6%; --drift: -2px; }
  .bubble-left-small, .bubble-right-small { display: none; }
  .wordmark { margin: 0; font-size: 30px; }
  .card { padding: 26px clamp(20px, 6vw, 32px); }
}
