:root {
  color-scheme: light;
  --ink: #17233a;
  --muted: #7a879c;
  --line: #e5ebf4;
  --blue: #3268e8;
  --blue-dark: #234fae;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #f4f7fc; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(62, 117, 235, .13), transparent 28%),
    radial-gradient(circle at 92% 86%, rgba(34, 169, 121, .1), transparent 25%),
    linear-gradient(145deg, #fafcff, #f2f6fc);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; -webkit-tap-highlight-color: transparent; }

.login-shell {
  width: min(940px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(37, 62, 110, .14);
}

.brand-panel {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 54px;
  color: #fff;
  background: linear-gradient(145deg, #224aa7 0%, #3268e8 56%, #4381ec 100%);
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}
.brand-panel::before { width: 380px; height: 380px; right: -210px; top: -130px; }
.brand-panel::after { width: 260px; height: 260px; left: -120px; bottom: -140px; }

.brand-mark {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 19px;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px rgba(255,255,255,.2);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-copy { position: relative; z-index: 1; }
.brand-copy p, .brand-copy h1 { margin: 0; }
.brand-copy p { color: rgba(255,255,255,.67); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.brand-copy h1 { margin-top: 13px; font-size: clamp(34px, 4vw, 48px); line-height: 1.12; letter-spacing: -.04em; }
.brand-copy span { display: block; margin-top: 15px; color: rgba(255,255,255,.72); font-size: 14px; }

.energy-lines { position: relative; z-index: 1; display: flex; gap: 7px; align-items: end; height: 44px; }
.energy-lines i { display: block; width: 7px; border-radius: 99px; background: rgba(255,255,255,.76); }
.energy-lines i:nth-child(1) { height: 18px; }
.energy-lines i:nth-child(2) { height: 34px; opacity: .75; }
.energy-lines i:nth-child(3) { height: 26px; opacity: .5; }

.login-card { display: flex; flex-direction: column; justify-content: center; padding: 58px; }
.login-card header p, .login-card header h2 { margin: 0; }
.login-card header p { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.login-card header h2 { margin-top: 9px; font-size: 31px; letter-spacing: -.03em; }
.login-card header > span { display: block; margin-top: 9px; color: var(--muted); font-size: 13px; }

form { display: grid; gap: 19px; margin-top: 34px; }
.field { display: grid; gap: 8px; }
.field > span { color: #56637a; font-size: 12px; font-weight: 800; }
.input-wrap { height: 50px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; padding: 0 13px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.input-wrap:focus-within { border-color: rgba(50,104,232,.54); background: #fff; box-shadow: 0 0 0 4px rgba(50,104,232,.1); }
.input-wrap i { width: 22px; color: #8c98aa; font-size: 11px; font-style: normal; font-weight: 800; }
.input-wrap input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.input-wrap input::placeholder { color: #aab3c1; }
.password-toggle { border: 0; background: transparent; color: var(--blue); padding: 7px 2px; font-size: 11px; font-weight: 800; cursor: pointer; }

.form-message { min-height: 18px; margin-top: -7px; color: #d34750; font-size: 12px; line-height: 1.45; }
.login-button { height: 50px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--blue), #477ded); color: #fff; padding: 0 19px; font-weight: 900; cursor: pointer; box-shadow: 0 13px 25px rgba(50,104,232,.22); transition: transform .16s ease, opacity .16s ease; }
.login-button:active { transform: scale(.985); }
.login-button:disabled { opacity: .65; cursor: wait; }
.login-button b { font-size: 19px; }

.login-card footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; color: #98a2b2; font-size: 10px; }
.login-card footer i { width: 7px; height: 7px; border-radius: 50%; background: #24ae7c; box-shadow: 0 0 0 5px rgba(36,174,124,.1); }

@media (max-width: 700px) {
  body { place-items: stretch; padding: 0; background: #fff; }
  .login-shell { min-height: 100dvh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .brand-panel { min-height: 220px; padding: max(28px, env(safe-area-inset-top)) 25px 28px; }
  .brand-mark { width: 50px; height: 50px; border-radius: 15px; }
  .brand-copy h1 { margin-top: 8px; font-size: 29px; }
  .brand-copy span { margin-top: 8px; font-size: 12px; }
  .energy-lines { display: none; }
  .login-card { justify-content: flex-start; padding: 34px 24px max(28px, env(safe-area-inset-bottom)); }
  .login-card header h2 { font-size: 27px; }
  form { margin-top: 27px; }
}

@media (max-height: 650px) and (min-width: 701px) {
  .login-shell { min-height: 500px; }
  .brand-panel, .login-card { padding: 38px; }
}

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