:root {
  color-scheme: light;
  font-family: "PingFang SC", Inter, "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #182635;
  background: #f8f8f4;
  --auth-muted: #586472;
  --auth-blue: #175086;
  --auth-border: #d5dde1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, p { margin: 0; }
input, button { font: inherit; }
button, summary { cursor: pointer; }
a { color: var(--auth-blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid #1768a9; outline-offset: 3px; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(12px, 1.4vw, 24px);
}

.auth-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  min-height: 520px;
  border-radius: 18px;
  padding: clamp(28px, 3.3vw, 58px);
  color: #fff;
  background: linear-gradient(180deg, #0418278a, transparent 29%, transparent 62%, #051724ed),
    url("/auth-harbor.webp") 55% 50% / cover no-repeat #0a2639;
  box-shadow: 0 12px 32px #122f451b;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  font-size: 23px;
  letter-spacing: .08em;
}
.auth-mark {
  display: grid;
  place-content: center;
  gap: 4px;
  inline-size: 42px;
  block-size: 42px;
  border-radius: 11px;
  border: 1px solid #e0eff780;
  background: #153d56b3;
  color: #fff;
}
.auth-mark i { width: 19px; height: 2px; border-radius: 4px; background: currentColor; transform: skewY(-27deg); }
.auth-mark i:nth-child(2) { width: 15px; }
.auth-mark i:nth-child(3) { width: 10px; }

.auth-cover-copy p { font-size: clamp(34px, 3.7vw, 64px); font-weight: 650; line-height: 1.15; letter-spacing: -.035em; }
.auth-route {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  color: #e0ebf3;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: .045em;
}
.auth-route-line { position: relative; width: 40px; height: 1px; background: currentColor; }
.auth-route-line::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.auth-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.auth-panel { display: grid; place-items: center; min-width: 0; padding: clamp(28px, 4.7vw, 76px); }
.auth-content { width: min(100%, 420px); }
.auth-content h1 { font-size: clamp(28px, 2.8vw, 43px); font-weight: 720; letter-spacing: -.045em; line-height: 1.2; }
.auth-description { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--auth-muted); }

.auth-form { display: grid; gap: 20px; margin-top: 30px; }
.auth-form label { display: block; font-size: 14px; font-weight: 650; }
.auth-form input:not([type=hidden]) {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  color: #182635;
  background: #fff;
  font-size: 16px;
  font-weight: 450;
}
.auth-form input:hover { border-color: #9faeb8; }
.auth-form input:focus { border-color: #2873a7; outline: 3px solid #2873a723; outline-offset: 1px; }
.auth-secret { position: relative; }
.auth-secret input:not([type=hidden]) { padding-right: 69px; }
.auth-secret:has(.auth-reveal[hidden]) input { padding-right: 14px; }
.auth-hint { margin-inline-start: 7px; font-size: 12px; font-weight: 500; color: var(--auth-muted); }
.auth-reveal {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 54px;
  height: 40px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--auth-blue);
  font-size: 13px;
  font-weight: 650;
}
.auth-reveal:hover { background: #eaf1f7; }

.auth-submit {
  min-height: 50px;
  margin-top: 4px;
  padding: 10px 16px;
  border: 1px solid #154779;
  border-radius: 9px;
  background: #174b7c;
  box-shadow: 0 4px 10px #174b7c24;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.auth-submit:hover { background: #12395f; }
.auth-submit:active { background: #0c2e51; }

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--auth-border);
  color: var(--auth-muted);
  font-size: 14px;
}
.auth-links a { font-weight: 650; }
.auth-links a span { margin-inline-start: 2px; }

.auth-message { margin-top: 20px; padding: 10px 13px; border-radius: 8px; color: #205943; background: #e5f3eb; font-size: 14px; line-height: 1.5; }
.auth-message.error { color: #8a2d20; background: #fbece6; }
.auth-message + .auth-form { margin-top: 18px; }

.auth-layout--account { grid-template-columns: minmax(0, 1fr); }
.auth-layout--account .auth-panel { align-items: start; }
.auth-layout--account .auth-content { width: min(100%, 540px); padding: clamp(18px, 4vw, 36px); border: 1px solid var(--auth-border); border-radius: 16px; background: #fff; }
.auth-layout--account .auth-brand { margin-bottom: 22px; }
.auth-layout--account .auth-content h1 { font-size: 30px; }
.auth-nav, .auth-accounts li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.auth-nav { margin-top: 15px; }
.auth-user { margin: 10px 0 18px; font-size: 14px; color: var(--auth-muted); }
.auth-layout--account details, .auth-accounts li { padding: 13px 0; border-top: 1px solid var(--auth-border); }
.auth-layout--account summary { font-weight: 650; }
.auth-layout--account .auth-form { margin-top: 14px; }
.auth-accounts { padding: 0; margin-bottom: 0; }
.auth-text-button { padding: 4px 0; border: 0; background: transparent; color: var(--auth-blue); }
.auth-text-button:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; padding: 0; }
  .auth-cover {
    min-height: 0;
    height: clamp(164px, 29vh, 252px);
    gap: 8px;
    padding: 18px clamp(19px, 5vw, 32px);
    border-radius: 0 0 14px 14px;
    background-position: 58% 46%;
  }
  .auth-brand { gap: 9px; font-size: 18px; }
  .auth-mark { inline-size: 33px; block-size: 33px; border-radius: 8px; }
  .auth-cover-copy p { font-size: clamp(28px, 6vw, 38px); }
  .auth-route { margin-top: 8px; gap: 9px; font-size: 12px; }
  .auth-route-line { width: 27px; }
  .auth-panel { place-items: start center; padding: 29px clamp(19px, 5vw, 34px); }
  .auth-description { margin-top: 8px; font-size: 14px; }
  .auth-form { gap: 15px; margin-top: 21px; }
  .auth-form input:not([type=hidden]) { height: 46px; margin-top: 6px; }
  .auth-reveal { height: 36px; }
  .auth-submit { min-height: 46px; }
  .auth-links { margin-top: 19px; padding-top: 15px; }
  .auth-layout--account { grid-template-rows: 1fr; }
}

@media (max-height: 640px) and (max-width: 820px) {
  .auth-cover { height: 126px; padding-block: 12px; }
  .auth-cover-copy p { font-size: 24px; }
  .auth-route { margin-top: 4px; }
  .auth-panel { padding-block: 21px; }
  .auth-form { gap: 12px; margin-top: 17px; }
  .auth-form input:not([type=hidden]) { height: 44px; }
  .auth-reveal { height: 34px; }
}
