:root {
  --ink: #17202b;
  --muted: #687586;
  --line: rgba(23, 32, 43, .12);
  --blue: #285eff;
  --blue-dark: #173ab2;
  --paper: #f4f6f9;
  --white: #fff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(40, 94, 255, .11), transparent 34%),
    linear-gradient(135deg, #f8f9fb 0%, #eef2f7 100%);
}

.login-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr minmax(360px, .75fr);
  align-items: center;
  gap: clamp(40px, 8vw, 100px);
  padding: 50px 0;
}

.brand-panel { padding: 24px; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-lockup img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(26, 57, 143, .18);
}

.brand-lockup span,
.login-card header > span {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.brand-lockup h1 {
  margin: 7px 0 0;
  font: 500 clamp(30px, 4vw, 48px)/1.1 Georgia, "Songti SC", serif;
}

.brand-panel > p {
  max-width: 560px;
  margin: 46px 0 28px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.65;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(12px);
}

.security-note b { color: var(--blue-dark); }
.security-note span { color: var(--muted); font-size: 13px; }

.login-card {
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 26px 80px rgba(36, 49, 73, .12);
}

.login-card h2 {
  margin: 12px 0 8px;
  font: 500 34px/1.2 Georgia, "Songti SC", serif;
}

.login-card header p,
.login-card footer { color: var(--muted); font-size: 13px; }

form { margin-top: 34px; }

label {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
  color: #344052;
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fbfcfd;
  color: var(--ink);
  font: inherit;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

input:focus {
  border-color: rgba(40, 94, 255, .72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(40, 94, 255, .1);
}

button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font: 700 15px/1 inherit;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(40, 94, 255, .24);
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

button:hover { transform: translateY(-1px); box-shadow: 0 15px 32px rgba(40, 94, 255, .3); }
button:disabled { cursor: wait; opacity: .64; transform: none; }

.error-message {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 51, 65, .18);
  border-radius: 8px;
  background: #fff6f7;
  color: #a92d3a;
  font-size: 13px;
}

.login-card footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 30px 0;
  }
  .brand-panel { padding: 12px; }
  .brand-panel > p { margin: 24px 0 18px; font-size: 17px; }
  .login-card { padding: 30px 24px; }
}

@media (max-width: 480px) {
  .login-shell { width: min(100% - 24px, 1120px); }
  .brand-lockup img { width: 54px; height: 54px; }
  .brand-lockup h1 { font-size: 27px; }
  .security-note { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 560px) {
  body {
    min-height: 100dvh;
    padding:
      max(14px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .login-shell {
    width: 100%;
    min-height: calc(100dvh - 32px);
    align-content: center;
    gap: 16px;
    padding: 0;
  }

  .brand-panel { padding: 4px 8px; }
  .brand-lockup { gap: 12px; }
  .brand-lockup img { width: 46px; height: 46px; }
  .brand-lockup span { font-size: 8px; }
  .brand-lockup h1 { margin-top: 4px; font-size: 24px; }
  .brand-panel > p { margin: 14px 0 0; font-size: 14px; line-height: 1.55; }
  .security-note { display: none; }

  .login-card {
    padding: 26px 20px 22px;
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(36,49,73,.11);
  }

  .login-card h2 { margin-top: 9px; font-size: 29px; }
  form { margin-top: 25px; }
  label { margin-bottom: 16px; }
  input {
    height: 50px;
    font-size: 16px;
  }
  button { min-height: 50px; }
  .login-card footer { margin-top: 22px; padding-top: 16px; }
}
