/* 易宝阁登录页 */
:root {
  --tb-cream: #f4f0e6;
  --tb-ink: #2a2a2a;
  --tb-muted: #8a8680;
  --tb-line: #e5e0d6;
  --tb-card: rgba(255, 255, 255, 0.92);
  --tb-brick: #b33a2b;
  --tb-brick-press: #9a2f22;
  --tb-link: #b33a2b;
  --tb-radius: 10px;
  --tb-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --tb-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  font-family: var(--tb-sans);
  color: var(--tb-ink);
  background: #ebe6dc;
  margin: 0;
  padding: 0;
}

body.tb-login-body {
  min-height: 100vh;
  background: #ebe6dc;
  display: flex;
  justify-content: center;
}

/* 背景仅铺在 H5 画布内，不铺满浏览器 */
.tb-login {
  position: relative;
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px 28px 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--tb-cream) url("./bg.png") no-repeat center center;
  background-size: cover;
  box-sizing: border-box;
}

.tb-login__brand {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 28px;
  animation: tb-rise 0.7s ease both;
}

.tb-login__logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: block;
  margin: 0 auto 18px;
  box-shadow: 0 8px 24px rgba(40, 30, 20, 0.12);
  object-fit: cover;
  background: #111;
}

.tb-login__title {
  font-family: var(--tb-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--tb-ink);
  line-height: 1.2;
  text-indent: 0.18em;
}

.tb-login__slogan {
  margin-top: 10px;
  font-size: 13px;
  color: var(--tb-muted);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

.tb-login__form {
  flex: 1;
  animation: tb-rise 0.7s ease 0.08s both;
}

.tb-field {
  margin-bottom: 18px;
}

.tb-field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #6d6862;
  letter-spacing: 0.06em;
}

.tb-field__box {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  background: var(--tb-card);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--tb-radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.tb-field__prefix {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
  color: var(--tb-ink);
  font-size: 15px;
  font-weight: 500;
}

.tb-field__prefix::after {
  content: "";
  width: 1px;
  height: 16px;
  background: #d8d2c8;
}

.tb-field__box input {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--tb-ink);
  font-family: var(--tb-sans);
}

.tb-field__box input::placeholder {
  color: #b5afa6;
}

.tb-eye {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  opacity: 0.55;
}

.tb-eye::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 11px;
  margin: -5.5px 0 0 -9px;
  border: 1.6px solid #666;
  border-radius: 50%;
}

.tb-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #666;
}

.tb-eye.is-off {
  opacity: 0.35;
}

.tb-eye.is-off::after {
  width: 18px;
  height: 1.6px;
  margin: -0.8px 0 0 -9px;
  border-radius: 0;
  background: #666;
  transform: rotate(-28deg);
}

.tb-login__links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 26px;
  font-size: 13px;
}

.tb-login__links a {
  color: var(--tb-muted);
  text-decoration: none;
}

.tb-login__links a:active {
  opacity: 0.7;
}

.tb-btn {
  display: block;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--tb-radius);
  background: var(--tb-brick);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  font-family: var(--tb-sans);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(179, 58, 43, 0.22);
  transition: background 0.2s ease, transform 0.15s ease;
}

.tb-btn:active {
  background: var(--tb-brick-press);
  transform: translateY(1px);
}

.tb-login__reg {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--tb-muted);
}

.tb-login__reg a {
  color: var(--tb-link);
  text-decoration: none;
  margin-left: 4px;
}

.tb-agree {
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--tb-muted);
  line-height: 1.55;
}

.tb-agree input {
  margin-top: 3px;
  flex: none;
  accent-color: var(--tb-brick);
}

.tb-agree a {
  color: var(--tb-link);
  text-decoration: none;
}

.tb-login__footer {
  position: relative;
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  animation: tb-rise 0.7s ease 0.16s both;
}

.tb-login__mark {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  font-family: var(--tb-serif);
  font-size: 148px;
  line-height: 1;
  color: rgba(90, 80, 70, 0.06);
  pointer-events: none;
  user-select: none;
  letter-spacing: 0;
}

.tb-login__foottext {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #a39c93;
  letter-spacing: 0.18em;
}

@keyframes tb-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  body.tb-login-body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 0;
    background: #dcd6cb;
  }

  .tb-login {
    max-width: 375px;
    min-height: 812px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(60, 45, 30, 0.12);
  }
}
