/* ============================================================
   天蝎客 · 平台运营后台登录页
   基础层：Bootstrap 5.3.3（Reset / 栅格 / 工具类）
   本文件：品牌视觉与登录表单样式
   ============================================================ */

:root {
  --tk-ink: #0f172a;
  --tk-slate: #475569;
  --tk-muted: #64748b;
  --tk-line: #e6eaf2;
  --tk-indigo: #4f46e5;
  --tk-violet: #7c3aed;
  --tk-panel: #f7f8fc;
  --tk-radius: 12px;
  --tk-card-radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.tk-body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tk-ink);
  background: var(--tk-panel);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(99, 102, 241, 0.22);
}

/* ------------------------------------------------------------
   整体布局：左品牌 / 右表单
   ------------------------------------------------------------ */

.tk-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(520px, 0.95fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ------------------------------------------------------------
   品牌区
   ------------------------------------------------------------ */

.tk-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(36px, 4.4vw, 72px);
  color: #fff;
  background:
    radial-gradient(120% 80% at 15% 10%, rgba(99, 102, 241, 0.26), transparent 55%),
    radial-gradient(90% 70% at 85% 90%, rgba(168, 85, 247, 0.2), transparent 60%),
    linear-gradient(150deg, #070b18 0%, #0e1030 46%, #170f37 100%);
}

.tk-brand__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.tk-brand__glow--1 {
  width: 420px;
  height: 420px;
  left: -120px;
  top: -80px;
  background: #4f46e5;
  animation: tk-float 14s ease-in-out infinite;
}

.tk-brand__glow--2 {
  width: 360px;
  height: 360px;
  right: -100px;
  bottom: -120px;
  background: #a855f7;
  animation: tk-float 18s ease-in-out infinite reverse;
}

.tk-brand__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(70% 60% at 35% 35%, #000 20%, transparent 78%);
  mask-image: radial-gradient(70% 60% at 35% 35%, #000 20%, transparent 78%);
}

.tk-brand__constellation {
  position: absolute;
  right: -170px;
  bottom: -140px;
  width: 640px;
  height: 640px;
  pointer-events: none;
  opacity: 0.85;
}

.tk-brand__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Logo */

.tk-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: #fff;
  text-decoration: none;
}

.tk-logo:hover {
  color: #fff;
}

.tk-logo__mark {
  display: block;
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 10px 20px rgba(99, 102, 241, 0.35));
}

.tk-logo__text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

/* 主文案 */

.tk-brand__copy {
  margin: auto 0;
  padding: 48px 0;
  max-width: 640px;
  animation: tk-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tk-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.tk-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.tk-headline {
  margin: 0;
  font-size: clamp(40px, 4.3vw, 66px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tk-headline__accent {
  color: #ffc98b;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tk-headline__accent {
    background: linear-gradient(105deg, #ffe0b3 0%, #ffb26b 45%, #ff8a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.tk-sub {
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.6);
}

.tk-points {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.tk-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.68);
}

.tk-points svg {
  flex: none;
  width: 17px;
  height: 17px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #c7d2fe;
}

/* 品牌区底部 */

.tk-brand__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.34);
}

.tk-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.45);
}

.tk-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

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

.tk-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  background:
    radial-gradient(760px 460px at 100% 0%, #edefff 0%, rgba(237, 239, 255, 0) 62%),
    var(--tk-panel);
}

.tk-card {
  width: 100%;
  max-width: 436px;
  padding: 42px 42px 30px;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: var(--tk-card-radius);
  box-shadow:
    0 34px 70px -34px rgba(15, 23, 42, 0.22),
    0 6px 18px -12px rgba(15, 23, 42, 0.08);
  animation: tk-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef0ff;
  color: var(--tk-indigo);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.tk-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6366f1;
}

.tk-card__head h2 {
  margin: 20px 0 8px;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tk-card__head p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--tk-muted);
}

/* 登录失败提示 */

.tk-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
  padding: 11px 13px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  line-height: 1.6;
  animation: tk-rise 0.3s ease both;
}

.tk-alert svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* 表单 */

.tk-form {
  margin-top: 28px;
}

.tk-field {
  margin-bottom: 17px;
}

.tk-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.tk-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tk-link {
  font-size: 12px;
  font-weight: 500;
  color: #6366f1;
  text-decoration: none;
}

.tk-link:hover {
  color: #4338ca;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tk-control {
  position: relative;
}

.tk-control > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.tk-input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 42px;
  border: 1px solid #e2e8f0;
  border-radius: var(--tk-radius);
  background: #f8fafc;
  color: var(--tk-ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.tk-input::placeholder {
  color: #a8b3c4;
}

.tk-input:hover {
  border-color: #cbd5e1;
}

.tk-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.tk-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.15s, color 0.15s;
}

.tk-eye:hover {
  background: #f1f5f9;
  color: #475569;
}

.tk-eye svg {
  width: 18px;
  height: 18px;
}

.tk-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 22px;
  font-size: 12.5px;
  color: var(--tk-muted);
  cursor: pointer;
  user-select: none;
}

.tk-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #6366f1;
  cursor: pointer;
}

.tk-submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: var(--tk-radius);
  background: linear-gradient(118deg, #5b5bf0 0%, #7c3aed 100%);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  cursor: pointer;
  box-shadow: 0 16px 30px -14px rgba(93, 76, 240, 0.72);
  transition: transform 0.16s, box-shadow 0.16s, filter 0.16s;
}

.tk-submit:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow: 0 20px 34px -14px rgba(93, 76, 240, 0.8);
}

.tk-submit:active {
  transform: translateY(0);
}

.tk-submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.25),
    0 16px 30px -14px rgba(93, 76, 240, 0.72);
}

/* 安全能力 */

.tk-secure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed #e8ecf3;
  font-size: 11.5px;
  color: #94a3b8;
}

.tk-secure span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tk-secure svg {
  width: 14px;
  height: 14px;
  color: #a5b4fc;
}

/* 卡片底部 */

.tk-card__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
  font-size: 11.5px;
  color: #a3adbf;
}

.tk-card__foot a {
  color: #7c869a;
  text-decoration: none;
}

.tk-card__foot a:hover {
  color: var(--tk-indigo);
}

.tk-dot {
  display: inline-block;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #cbd5e1;
}

.tk-version {
  margin: 20px 0 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #b3bccd;
}

/* 轻提示 */

.tk-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 50;
  padding: 12px 20px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.22s, transform 0.22s;
}

.tk-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------
   动效
   ------------------------------------------------------------ */

@keyframes tk-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(24px, -18px, 0);
  }
}

@keyframes tk-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 1080px) {
  .tk-shell {
    grid-template-columns: 1fr;
  }

  .tk-brand {
    min-height: 210px;
    padding: 26px 24px 40px;
  }

  .tk-brand__copy {
    margin: 22px 0 0;
    padding: 0;
  }

  .tk-brand__foot,
  .tk-points,
  .tk-sub {
    display: none;
  }

  .tk-eyebrow {
    margin-bottom: 10px;
  }

  .tk-headline {
    font-size: clamp(26px, 6vw, 34px);
  }

  .tk-logo__mark {
    width: 38px;
    height: 38px;
  }

  .tk-logo__text {
    font-size: 17px;
  }

  .tk-brand__glow {
    opacity: 0.35;
  }

  .tk-brand__constellation {
    right: -220px;
    bottom: -260px;
    opacity: 0.6;
  }

  .tk-panel {
    justify-content: flex-start;
    padding: 0 18px 36px;
  }

  .tk-card {
    margin-top: -26px;
    padding: 30px 24px 24px;
    border-radius: 20px;
  }

  .tk-card__head h2 {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .tk-card {
    padding: 26px 18px 20px;
  }
}

@media (max-width: 340px) {
  .tk-secure {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* 商家入驻入口 */

.tk-join-entry {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: #94a3b8;
}

.tk-join-entry a {
  color: #4f46e5;
  font-weight: 500;
  text-decoration: none;
}

.tk-join-entry a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tk-join-entry .tk-dot {
  margin: 0 7px;
  vertical-align: middle;
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
