:root {
  --panel-width: min(658px, calc(100vw - 80px));
  --panel-padding-x: clamp(28px, 3.3vw, 66px);
  --panel-padding-top: clamp(34px, 4.8vh, 66px);
  --panel-padding-bottom: clamp(28px, 4vh, 50px);
  --input-height: 62px;
  --input-border: #d3dae4;
  --placeholder: #b5bcc5;
  --button-blue-start: #486be7;
  --button-blue-end: #5873ee;
  --focus-blue: #6f8cff;
  --accent-red: #ff7f7f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: #1c1c1c;
}

body {
  min-height: 100vh;
  overflow: hidden;
  background: #8dc6e9;
}

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.page-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.login-panel {
  position: absolute;
  top: clamp(34px, 9.6vh, 120px);
  right: clamp(18px, 5.6vw, 115px);
  width: var(--panel-width);
  min-height: min(800px, calc(100vh - 72px));
  padding: var(--panel-padding-top) var(--panel-padding-x) var(--panel-padding-bottom);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 16px rgba(24, 56, 94, 0.28);
  border: 1px solid rgba(166, 181, 199, 0.72);
  backdrop-filter: blur(2px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}

.brand-logo {
  width: 67px;
  height: 74px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-title {
  width: min(470px, calc(100% - 89px));
  height: auto;
  object-fit: contain;
}

.login-form {
  margin-top: 48px;
}

.form-group + .form-group {
  margin-top: 30px;
}

.field-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.2;
  color: #1e1e1e;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--input-height);
  border: 1px solid var(--input-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-shell::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 16px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translateY(-50%);
  opacity: 0.95;
}

.icon-user::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23adb5c0' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 21a6 6 0 0 0-12 0'/%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3C/svg%3E");
}

.icon-lock::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23adb5c0' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='1.6'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

.icon-verify::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23adb5c0' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3 10 14'/%3E%3Cpath d='M21 3 14.5 21l-3.5-7.5L3.5 10 21 3Z'/%3E%3C/svg%3E");
}

.input-shell input {
  width: 100%;
  height: 100%;
  padding: 0 18px 0 46px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #3e4753;
  caret-color: #5873ee;
}

.input-shell input::placeholder {
  color: var(--placeholder);
}

.input-shell:focus-within {
  border-color: var(--focus-blue);
  box-shadow: 0 0 0 3px rgba(96, 125, 245, 0.08);
}

.field-error {
  display: none;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 24px;
  color: #ff6b6b;
}

.form-group.is-error .input-shell {
  border-color: var(--accent-red);
}

.form-group.is-error .field-error {
  display: block;
}

.verify-group {
  margin-top: 4px;
}

.verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 20px;
  align-items: center;
}

.verify-button {
  height: var(--input-height);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #9da4af;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.verify-button:hover {
  border-color: #c4cddd;
  color: #8d95a3;
}

.verify-button:focus-visible {
  outline: none;
  border-color: var(--focus-blue);
  box-shadow: 0 0 0 3px rgba(96, 125, 245, 0.08);
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 60px;
  margin-top: 76px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--button-blue-start), var(--button-blue-end));
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0.28em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(69, 104, 229, 0.24);
}

.button-arrow {
  margin-left: -0.1em;
  font-size: 23px;
  line-height: 1;
  letter-spacing: normal;
  transform: translateY(-1px);
}

.forgot-link {
  display: block;
  width: fit-content;
  margin: 30px 0 0 auto;
  color: #4a76ff;
  font-size: 16px;
  text-decoration: none;
}

@media (max-width: 1280px) {
  body {
    overflow: auto;
  }

  .page-shell {
    min-height: 960px;
  }

  .login-panel {
    top: 40px;
    right: 24px;
    min-height: 760px;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .page-shell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 980px;
    padding: 30px 16px 56px;
  }

  .page-background {
    object-fit: cover;
  }

  .login-panel {
    position: relative;
    top: 0;
    right: 0;
    width: min(680px, 100%);
    min-height: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --input-height: 56px;
  }

  .brand-row {
    gap: 14px;
  }

  .brand-logo {
    width: 54px;
    height: 60px;
  }

  .brand-title {
    width: min(100%, 340px);
  }

  .field-label {
    font-size: 16px;
  }

  .verify-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .verify-button,
  .login-button {
    width: 100%;
  }
}
