:root {
  color-scheme: light;
  --ink: #102a43;
  --muted: #7e91a4;
  --line: #dce6f1;
  --blue: #2864e8;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f3f6fb;
}

button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 10%, rgba(40, 100, 232, .08), transparent 30%),
    radial-gradient(circle at 88% 90%, rgba(40, 100, 232, .06), transparent 27%);
}

.form-panel {
  width: min(100%, 520px);
  padding: 54px 58px 58px;
  background: #fff;
  border: 1px solid rgba(213, 224, 237, .85);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(27, 60, 98, .09);
}

.form-wrap { width: 100%; }

.login-brand {
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .6px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  position: relative;
  overflow: hidden;
  flex: none;
  background: var(--blue);
  border-radius: 13px;
  transform: rotate(-4deg);
  box-shadow: 0 8px 22px rgba(40, 100, 232, .2);
}

.brand-mark span {
  height: 5px;
  position: absolute;
  right: 8px;
  left: 8px;
  background: #fff;
  border-radius: 9px;
}

.brand-mark span:first-child { top: 12px; }
.brand-mark span:last-child { top: 23px; right: 15px; }

.form-wrap h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -1.2px;
}

form { margin-top: 38px; }
.field { display: block; margin-top: 20px; }
.field:first-child { margin-top: 0; }
.field > span { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 750; }

.input-wrap {
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrap:focus-within {
  background: #fff;
  border-color: #7ca4f5;
  box-shadow: 0 0 0 4px rgba(40, 100, 232, .09);
}

.input-wrap > svg {
  width: 19px;
  flex: none;
  fill: none;
  stroke: #7a91a8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-wrap input {
  min-width: 0;
  height: 100%;
  flex: 1;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.input-wrap input::placeholder { color: #a2b0bd; }

.password-toggle {
  width: 32px;
  height: 32px;
  padding: 6px;
  display: grid;
  place-items: center;
  color: #8296aa;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.password-toggle:hover { color: var(--blue); background: #edf3ff; }
.password-toggle svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.form-error {
  min-height: 20px;
  margin-top: 13px;
  color: #c33b2f;
  font-size: 11px;
  line-height: 20px;
}

.form-error:not(:empty) { padding-left: 22px; position: relative; }
.form-error:not(:empty)::before {
  width: 15px;
  height: 15px;
  position: absolute;
  top: 2px;
  left: 0;
  content: "!";
  color: #fff;
  background: #e45345;
  border-radius: 50%;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
}

.submit-button {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(40, 100, 232, .2);
  font-size: 13px;
  font-weight: 750;
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

.submit-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(40, 100, 232, .25); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: .72; }
.submit-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  body { background: #fff; }
  .login-shell { padding: 0; background: #fff; }
  .form-panel {
    min-height: 100vh;
    padding: 34px 24px;
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-brand { margin-bottom: 54px; }
  .form-wrap h2 { font-size: 31px; }
  form { margin-top: 34px; }
}

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