/**
 * turnitin123 Auth — Notion/Vercel-style centered login
 * WeChat-first · transparent logo · same desktop & mobile structure
 */

:root {
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-line: #e3e8ef;
  --auth-soft: #f7f8fa;
  --auth-blue: #2563eb;
  --auth-blue-deep: #1d4ed8;
  --auth-blue-soft: #eff6ff;
  --auth-wx: #07c160;
  --auth-wx-deep: #06ad56;
  --auth-font: "Manrope", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --auth-display: "Sora", "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Kill any leftover navy / gradient auth skins */
html:has(.login-page),
body:has(.login-page),
#app:has(.login-page),
#app:has(.login-page) > * {
  background: #ffffff !important;
  background-image: none !important;
}

/* ===== Full white canvas (Notion) ===== */
.login-page[data-v-5f6bc25f] {
  position: relative !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding:
    max(32px, env(safe-area-inset-top))
    24px
    max(32px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  font-family: var(--auth-font) !important;
  background: #ffffff !important;
  background-image: none !important;
}

/* Pseudo logo off — real clickable brand link below */
.login-page[data-v-5f6bc25f]::before {
  content: none !important;
  display: none !important;
}

.t123-auth-brand {
  order: 1;
  display: block;
  width: 300px;
  max-width: 72%;
  margin: 0 auto 20px;
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
}

.t123-auth-brand__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 54px;
  object-fit: contain;
}

/* Page title — must sit above the card (flex order) */
.login-page[data-v-5f6bc25f]::after {
  content: "登录你的账号" !important;
  display: block !important;
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  order: 2 !important;
  width: min(360px, 100%) !important;
  max-width: 360px !important;
  margin: 0 auto 22px !important;
  padding: 0 !important;
  border: 0 !important;
  z-index: 2 !important;
  color: var(--auth-ink) !important;
  font-family: var(--auth-display) !important;
  font-size: 1.375rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-shadow: none !important;
  white-space: normal !important;
  pointer-events: none !important;
}

/* ===== Form shell: flat, no heavy card ===== */
.card[data-v-5f6bc25f] {
  position: relative !important;
  z-index: 2 !important;
  order: 3 !important;
  width: min(360px, 100%) !important;
  max-width: 360px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: left !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  animation: none !important;
}

.card[data-v-5f6bc25f]::before {
  display: none !important;
  content: none !important;
}

/* Hide Vue brand title — page ::after is the title */
h1.brand-title[data-v-5f6bc25f],
.brand-title[data-v-5f6bc25f] {
  display: none !important;
}

.brand-title[data-v-5f6bc25f]::after {
  display: none !important;
  content: none !important;
}

/* ===== Form fields ===== */
.form-container[data-v-5f6bc25f] {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 4px !important;
}

.input-group[data-v-5f6bc25f] {
  position: relative !important;
}

.input-group[data-v-5f6bc25f]:has(.suffix-btn) .input-field,
.input-group.code-row[data-v-5f6bc25f] .input-field,
.has-suffix .input-field[data-v-5f6bc25f] {
  padding-right: 108px !important;
}

.input-field[data-v-5f6bc25f] {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid var(--auth-line) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  font-family: var(--auth-font) !important;
  color: var(--auth-ink) !important;
  background: #fff !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.input-field[data-v-5f6bc25f]::placeholder {
  color: #94a3b8 !important;
}

.input-field[data-v-5f6bc25f]:hover {
  border-color: #cbd5e1 !important;
}

.input-field[data-v-5f6bc25f]:focus {
  border-color: var(--auth-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.disabled-input[data-v-5f6bc25f] {
  background: var(--auth-soft) !important;
  color: #94a3b8 !important;
}

.suffix-btn[data-v-5f6bc25f],
.btn-text.suffix-btn[data-v-5f6bc25f] {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 32px !important;
  padding: 0 10px !important;
  border: none !important;
  border-radius: 6px !important;
  background: var(--auth-blue-soft) !important;
  color: var(--auth-blue-deep) !important;
  font-family: var(--auth-font) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  cursor: pointer;
}

.button-group[data-v-5f6bc25f] {
  display: flex !important;
  gap: 8px !important;
  margin-top: 2px;
}

.btn[data-v-5f6bc25f],
.btn-primary[data-v-5f6bc25f],
.btn-secondary[data-v-5f6bc25f],
.btn-full[data-v-5f6bc25f] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 0 !important;
  min-height: 42px !important;
  margin-top: 4px !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-family: var(--auth-font) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease !important;
  box-shadow: none !important;
  filter: none !important;
}

.btn-primary[data-v-5f6bc25f],
.btn-full[data-v-5f6bc25f] {
  width: 100% !important;
  border: none !important;
  background: var(--auth-ink) !important;
  color: #fff !important;
}

.button-group[data-v-5f6bc25f] .btn-primary[data-v-5f6bc25f] {
  width: auto !important;
}

.btn-secondary[data-v-5f6bc25f] {
  border: 1px solid var(--auth-line) !important;
  background: #fff !important;
  color: var(--auth-ink) !important;
}

.btn-primary[data-v-5f6bc25f]:hover,
.btn-full[data-v-5f6bc25f]:hover {
  opacity: 1 !important;
  background: #1e293b !important;
  filter: none !important;
  box-shadow: none !important;
}

.btn-secondary[data-v-5f6bc25f]:hover {
  opacity: 1 !important;
  background: var(--auth-soft) !important;
  filter: none !important;
}

.links[data-v-5f6bc25f] {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 14px !important;
  font-size: 13px !important;
  font-weight: 500;
  color: var(--auth-muted) !important;
}

.text-gray[data-v-5f6bc25f] {
  color: var(--auth-muted) !important;
}

.link-text[data-v-5f6bc25f] {
  color: var(--auth-blue) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.link-text[data-v-5f6bc25f]:hover {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.separator[data-v-5f6bc25f] {
  color: #cbd5e1 !important;
}

.customer-service[data-v-5f6bc25f] {
  display: none !important;
}

/* ICP / 公安备案 — muted footer like common CN sites (icon + gray links) */
.t123-auth-beian {
  order: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  width: min(360px, 100%);
  margin: 40px auto 8px;
  padding: 0 8px;
  font-family: var(--auth-font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #94a3b8;
  text-align: center;
}

.t123-auth-beian a,
.t123-auth-beian a:visited {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9ca3af !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.t123-auth-beian a:hover {
  color: #6b7280 !important;
}

.t123-auth-beian__icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
}

.t123-auth-beian__sep {
  color: #d1d5db;
  font-weight: 400;
  user-select: none;
}

.global-alert[data-v-5f6bc25f] {
  border-radius: 10px !important;
  font-family: var(--auth-font) !important;
}

.modal-title[data-v-b00fd95a],
.required[data-v-b00fd95a] {
  color: var(--auth-blue) !important;
}

.btn-confirm[data-v-b00fd95a],
.invite-modal .btn.primary[data-v-c3f7037e] {
  background: var(--auth-ink) !important;
  border-radius: 8px !important;
  border: none !important;
  color: #fff !important;
}

.language-switch[data-v-3753c701] {
  position: fixed !important;
  top: max(16px, env(safe-area-inset-top)) !important;
  right: max(16px, env(safe-area-inset-right)) !important;
  z-index: 40 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

/* ===== WeChat block ===== */
.t123-wx-panel {
  margin: 0 0 4px;
  text-align: center;
}

.t123-wx-head {
  margin-bottom: 14px;
}

.t123-wx-title {
  display: none;
}

.t123-wx-sub {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--auth-muted);
}

.t123-wx-qr {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 0;
  margin: 0 auto;
  padding: 18px 16px 12px;
  border-radius: 12px;
  background: var(--auth-soft);
  border: 1px solid var(--auth-line);
  overflow: hidden;
}

#t123-wx-qr-image {
  width: 300px;
  max-width: 100%;
  min-height: 400px;
  margin: 0 auto;
}

.t123-wx-qr iframe,
#t123-wx-qr-image iframe {
  width: 300px !important;
  max-width: 100% !important;
  height: 400px !important;
  border: 0 !important;
}

.t123-wx-img {
  width: 184px;
  height: 184px;
  border-radius: 8px;
}

.t123-wx-loading,
.t123-wx-error {
  padding: 28px 12px;
  color: var(--auth-muted);
  font-size: 14px;
}

.t123-wx-status {
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--auth-muted);
  min-height: 1.2em;
}

.t123-wx-status.ok {
  color: var(--auth-wx);
}

.t123-wx-status.err {
  color: #dc2626;
}

.t123-wx-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.t123-wx-divider::before,
.t123-wx-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-line);
}

.t123-wx-divider--toggle {
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.t123-wx-divider--toggle:hover,
.t123-wx-divider--toggle:focus-visible {
  color: var(--auth-ink);
  outline: none;
}

.t123-wx-open,
.t123-wx-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--auth-wx);
  color: #fff;
  font-family: var(--auth-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease;
}

.t123-wx-open:hover,
.t123-wx-retry:hover {
  background: var(--auth-wx-deep);
}

.t123-wx-open__icon {
  width: 18px;
  height: 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9.5 4C5.91 4 3 6.69 3 10c0 1.89 1.08 3.56 2.78 4.54L5 17l2.5-1.5c.63.18 1.3.28 2 .28.2 0 .4 0 .59-.03C9.4 15.1 9 14.1 9 13c0-3.31 3.13-6 7-6 .19 0 .38.01.56.03C15.64 5.18 12.78 4 9.5 4zm-2 2.5a1 1 0 110 2 1 1 0 010-2zm5 0a1 1 0 110 2 1 1 0 010-2zM16 9c-2.76 0-5 1.79-5 4s2.24 4 5 4c.45 0 .88-.06 1.28-.16L19 18l-.55-1.64C19.42 15.5 20 14.32 20 13c0-2.21-2.24-4-4-4zm-1.5 2.25a.75.75 0 110 1.5.75.75 0 010-1.5zm3 0a.75.75 0 110 1.5.75.75 0 010-1.5z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  flex: 0 0 auto;
}

.t123-wx-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

/* Compact: email folded */
.card.t123-auth-compact:not(.t123-email-open) .form-container[data-v-5f6bc25f],
.card.t123-auth-compact:not(.t123-email-open) .form-container,
.card.t123-auth-compact:not(.t123-email-open) .links[data-v-5f6bc25f],
.card.t123-auth-compact:not(.t123-email-open) .links {
  display: none !important;
}

/* Compact: no QR cage — just the green button */
.card.t123-auth-compact .t123-wx-qr,
html.t123-auth-compact .t123-wx-qr,
.login-page.t123-auth-compact .t123-wx-qr {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.card.t123-auth-compact .t123-wx-status:not(.ok):not(.err),
html.t123-auth-compact .t123-wx-status:not(.ok):not(.err) {
  display: none;
}

/* ===== Mobile / tablet ===== */
@media (max-width: 960px) {
  .login-page[data-v-5f6bc25f],
  .login-page.t123-auth-compact,
  html.t123-auth-compact .login-page[data-v-5f6bc25f] {
    justify-content: flex-start !important;
    padding:
      max(24px, env(safe-area-inset-top))
      20px
      max(20px, env(safe-area-inset-bottom)) !important;
    background: #ffffff !important;
  }

  .login-page[data-v-5f6bc25f]::before,
  html.t123-auth-compact .login-page[data-v-5f6bc25f]::before {
    content: none !important;
    display: none !important;
  }

  .t123-auth-brand {
    width: 152px;
    max-width: 42%;
    margin: 10px auto 12px;
  }

  .t123-auth-brand__img {
    max-height: 28px;
  }

  .login-page[data-v-5f6bc25f]::after,
  html.t123-auth-compact .login-page[data-v-5f6bc25f]::after {
    content: "登录你的账号" !important;
    width: min(360px, 100%) !important;
    margin: 0 auto 20px !important;
    font-size: 1.25rem !important;
    color: #0f172a !important;
  }

  .card[data-v-5f6bc25f],
  html.t123-auth-compact .card[data-v-5f6bc25f] {
    width: 100% !important;
    max-width: 360px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Only strip QR cage when compact CTA mode is active */
  html.t123-auth-compact .t123-wx-qr,
  .card.t123-auth-compact .t123-wx-qr {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  html.t123-auth-compact #t123-wx-qr-image,
  .card.t123-auth-compact #t123-wx-qr-image {
    display: none !important;
    width: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  html.t123-auth-compact .t123-wx-qr iframe,
  html.t123-auth-compact #t123-wx-qr-image iframe,
  .card.t123-auth-compact .t123-wx-qr iframe,
  .card.t123-auth-compact #t123-wx-qr-image iframe {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  .t123-wx-open,
  .t123-wx-retry {
    min-height: 48px;
    font-size: 16px;
    border-radius: 10px;
  }

  .t123-wx-divider {
    margin: 22px 0 10px;
  }

  .button-group[data-v-5f6bc25f] {
    flex-direction: column !important;
  }

  .button-group[data-v-5f6bc25f] .btn-primary[data-v-5f6bc25f],
  .button-group[data-v-5f6bc25f] .btn-secondary[data-v-5f6bc25f] {
    width: 100% !important;
    flex: none !important;
    min-height: 46px !important;
  }

  .input-field[data-v-5f6bc25f] {
    font-size: 16px !important;
    min-height: 46px !important;
  }

  .t123-auth-beian {
    margin-top: 32px;
    margin-bottom: 6px;
    font-size: 11px;
    gap: 4px 8px;
  }

  .t123-auth-beian__icon {
    width: 13px;
    height: 13px;
  }

  .t123-wx-sub {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .t123-auth-brand {
    width: 136px;
    max-width: 40%;
    margin: 6px auto 10px;
  }

  .t123-auth-brand__img {
    max-height: 24px;
  }

  .login-page[data-v-5f6bc25f]::after {
    font-size: 1.2rem !important;
    margin-bottom: 16px !important;
  }

  .t123-auth-beian {
    margin-top: 28px;
    font-size: 11px;
  }
}
