/* Modern login theme v2 - split brand layout. Visual only. */

:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --blue-line: #bfdbfe;
  --brand-deep: #0c447c;

  --page: #f4f6f9;
  --surface: #ffffff;
  --soft: #f7f8fa;

  --text: #1a1d21;
  --text-2: #616a73;
  --text-3: #949ca4;

  --line: #ebedf0;
  --line-2: #dcdfe4;

  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 分栏骨架 ---------- */

main {
  padding: 0;
  margin: 0;
  display: flex;
  place-items: stretch;
  width: 100%;
  min-height: 100dvh;
}

.login-split {
  width: 100%;
  min-height: 100dvh;
  display: flex;
}

/* ---------- 左侧品牌区 ---------- */

.login-brand {
  flex: 1.1 1 0;
  display: flex;
  flex-direction: column;
  background: var(--brand-deep);
  color: #fff;
  padding: 44px 52px;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-head .brand-mark,
.brand-head img {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
}

.brand-head b {
  display: block;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.2px;
}

.brand-head small {
  display: block;
  margin-top: 2px;
  color: #85b7eb;
  font-size: 12px;
}

.brand-body {
  margin-top: auto;
  margin-bottom: auto;
  padding: 32px 0;
}

.brand-body h2 {
  margin: 0 0 22px;
  font-size: 30px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -.5px;
}

.brand-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-body li {
  position: relative;
  padding-left: 22px;
  color: #b5d4f4;
  font-size: 14px;
  line-height: 1.6;
}

.brand-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5dcaa5;
}

.brand-route {
  display: block;
  width: min(320px, 80%);
  margin-top: 34px;
  opacity: .9;
}

.brand-foot {
  color: rgba(255, 255, 255, .45);
  font-size: 12px;
}

/* ---------- 右侧表单区 ---------- */

.login-panel {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page);
  padding: 32px 24px;
}

.login-box {
  width: min(100%, 360px);
}

.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.identity > span, .identity > img {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--blue);
  color: #fff;
  font-size: 19px;
  font-weight: 500;
}

.identity h1 {
  margin: 0 0 3px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.2px;
  color: var(--text);
}

.identity p {
  margin: 0;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

label {
  display: block;
  color: var(--text-2);
  font-size: 13px;
  margin: 0 0 16px;
}

input {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font: 15px var(--font);
  transition: border-color .15s, box-shadow .15s;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

input::placeholder { color: var(--text-3); }

button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

button:hover:not(:disabled) { background: var(--blue-dark); }
button:active:not(:disabled) { transform: scale(.995); }
button:disabled { opacity: .55; cursor: default; }

#error {
  min-height: 20px;
  margin: -4px 0 10px;
  color: #c0392b;
  font-size: 12px;
}

footer {
  margin: 0;
  text-align: center;
  margin-top: 26px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.6;
}

footer small {
  display: block;
  margin-top: 4px;
  color: inherit;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) and (min-width: 881px) {
  .login-brand { padding: 32px; }
  .brand-head b { font-size: 15px; }
  .brand-head small { font-size: 11px; }
  .brand-body { padding: 20px 0; }
  .brand-body h2 { font-size: 22px; margin-bottom: 14px; }
  .brand-body ul { gap: 8px; }
  .brand-body li { font-size: 13px; }
  .brand-route { margin-top: 20px; width: 100%; }
  .login-panel { padding: 24px 20px; }
}

/* ---------- 移动端品牌主角区（悬浮呼吸 + 倒影 + 水波纹） ---------- */

.brand-mobile { display: none; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(-4px); }
  50% { transform: translateY(4px); }
}

@keyframes heroRipple {
  0% { transform: translate(-50%, 0) scale(.4); opacity: .85; }
  100% { transform: translate(-50%, 0) scale(1.3); opacity: 0; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 880px) {
  .login-split { flex-direction: column; }
  .brand-head, .brand-body, .brand-foot { display: none; }

  .login-brand {
    flex: none;
    padding: 40px 24px 76px;
    overflow: hidden;
  }

  .brand-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-hero {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
  }

  .login-mark {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    flex: none;
    object-fit: contain;
    border-radius: 20px;
    background: linear-gradient(160deg, #5b8def, #2563eb 62%);
    color: #fff;
    font-size: 29px;
    font-weight: 500;
    box-shadow: 0 14px 30px rgba(20, 60, 160, .42);
    -webkit-box-reflect: below 10px linear-gradient(transparent 52%, rgba(255, 255, 255, .22));
    animation: heroFloat 3.6s ease-in-out infinite, riseIn .7s ease-out both;
  }

  .ripple {
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 94px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(93, 202, 165, .65);
    transform: translate(-50%, 0) scale(.4);
    opacity: 0;
    animation: heroRipple 3s ease-out infinite;
    pointer-events: none;
  }

  .brand-mobile b {
    font-size: 21px;
    font-weight: 500;
    letter-spacing: 1px;
    animation: riseIn .6s .08s ease-out both;
  }

  .brand-mobile p {
    margin: 12px 0 0;
    color: #b5d4f4;
    font-size: 15px;
    letter-spacing: .5px;
    animation: riseIn .6s .18s ease-out both;
  }

  .brand-mobile small {
    display: block;
    margin-top: 7px;
    color: rgba(255, 255, 255, .42);
    font-size: 12px;
    animation: riseIn .6s .28s ease-out both;
  }

  .login-panel {
    padding: 0 16px 32px;
    align-items: flex-start;
  }

  .login-box {
    margin-top: -44px;
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 26px 22px 20px;
    box-shadow: 0 2px 6px rgba(20, 26, 38, .05), 0 16px 40px rgba(20, 26, 38, .09);
    animation: riseIn .6s .34s ease-out both;
  }

  .identity { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-mark, .ripple, .brand-mobile b,
  .brand-mobile p, .brand-mobile small, .login-box { animation: none; }
}
