/* ==========================================================================
   皮可AI · Piccc AI — Centered Auth Canvas
   Scoped cleanly to .auth-body / .auth-shell so global workspace styles stay untouched.
   ========================================================================== */

.auth-body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--fg);
  overflow-x: hidden;
}

[data-theme="dark"] .auth-body {
  background: var(--bg-canvas);
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: var(--bg-canvas);
}

[data-theme="dark"] .auth-shell {
  background: var(--bg-canvas);
}

/* Subtle architectural dot grid fading softly toward the edges */
.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--fg) 10%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 45%, #000 32%, transparent 92%);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 45%, #000 32%, transparent 92%);
  opacity: .55;
}

/* Soft top-center ambient sky-cyan wash */
.auth-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(760px 360px at 50% -4%, rgba(0, 142, 229, .14), transparent 72%);
  opacity: .9;
}

[data-theme="dark"] .auth-shell::after {
  background: radial-gradient(760px 360px at 50% -4%, rgba(0, 158, 250, .22), transparent 72%);
  opacity: .8;
}

/* 1. Topbar ---------------------------------------------------------------- */
.auth-topbar {
  position: relative;
  z-index: 2;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 20px clamp(16px, 4vw, 32px) 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-topbar .logo-img {
  height: 28px;
}

.auth-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-topbar .home-appearance .i:last-child,
[data-theme="dark"] .auth-topbar .home-appearance .i:first-child {
  display: none;
}

[data-theme="dark"] .auth-topbar .home-appearance .i:last-child {
  display: block;
}

.auth-util-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-hairline);
  background: var(--bg-glass-strong);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  box-shadow: none;
  transition: background var(--dur), border-color var(--dur), color var(--dur);
}

.auth-util-btn:hover {
  background: var(--bg-surface);
  border-color: var(--line-strong);
  box-shadow: none;
  color: var(--fg);
}

.auth-util-btn .i {
  width: 14px;
  height: 14px;
}

/* 2. Centered Card Stage --------------------------------------------------- */
.auth-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 12px 20px 28px;
}

.auth-card {
  width: min(100%, 440px);
  padding: 36px 36px 32px;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--line-hairline);
  box-shadow: var(--shadow-dock);
}

[data-theme="dark"] .auth-card {
  border-color: var(--line-hairline);
  box-shadow: var(--shadow-dock);
}

.auth-header {
  margin-bottom: 22px;
}

.auth-reset-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--fg-2);
}

.auth-reset-back:hover {
  color: var(--fg);
}

.auth-reset-back .i {
  width: 15px;
  height: 15px;
}

.auth-header h1,
.auth-header h2 {
  font-size: clamp(24px, 2.6vw, var(--fs-3xl));
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--fg);
}

.auth-subtitle {
  margin-top: 8px;
  font-size: var(--fs-md);
  color: var(--fg-2);
  line-height: var(--lh-normal);
}

.auth-perk-banner {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--accent-weak);
  border: 1px solid var(--accent-line);
  color: var(--fg);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}

.auth-perk-banner .i {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: none;
}

/* Segmented Login Method Switcher */
.auth-method-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--bg-muted);
}

.auth-method-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.auth-method-tab .i {
  width: 15px;
  height: 15px;
  flex: none;
}

.auth-method-tab:hover {
  color: var(--fg);
}

.auth-method-tab[aria-pressed="true"] {
  background: var(--bg-surface);
  color: var(--fg);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
}

/* Inline Alert Banner */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--danger-weak);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  color: var(--danger);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  animation: fade-up var(--dur) var(--ease-out);
}

.auth-alert .i {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
}

/* Form Controls */
.auth-form {
  display: grid;
  gap: 15px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.auth-label-opt {
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  color: var(--fg-3);
}

.auth-forgot-link {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--accent);
  transition: opacity var(--dur);
}

.auth-forgot-link:hover {
  opacity: .8;
  text-decoration: underline;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--fg-3);
  pointer-events: none;
  transition: color var(--dur);
}

.auth-input {
  height: 46px;
  width: 100%;
  padding: 0 14px 0 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-surface);
  color: var(--fg);
  font-size: var(--fs-md);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.auth-input::placeholder {
  color: var(--fg-3);
}

.auth-input:hover {
  border-color: var(--line-strong);
}

.auth-input:focus {
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--accent);
}

.auth-input-wrap--pw .auth-input {
  padding-right: 44px;
}

.auth-pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--fg-3);
  transition: background var(--dur), color var(--dur);
}

.auth-pw-toggle:hover {
  background: var(--bg-hover);
  color: var(--fg);
}

.auth-pw-toggle .i {
  width: 16px;
  height: 16px;
}

/* OTP Row */
.auth-otp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-otp-row .auth-input-wrap {
  flex: 1;
  min-width: 0;
}

.auth-input--otp {
  font-variant-numeric: tabular-nums;
  letter-spacing: .16em;
  font-weight: var(--fw-semibold);
}

.auth-otp-btn {
  height: 46px;
  padding: 0 15px;
  border-radius: 12px;
  border: 0;
  background: var(--bg-subtle);
  color: var(--fg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  flex: none;
  transition: background var(--dur), color var(--dur);
}

.auth-otp-btn:hover:not(:disabled) {
  background: var(--accent-weak);
  color: var(--accent-text);
}

.auth-otp-btn:disabled {
  background: var(--bg-muted);
  color: var(--fg-3);
}

/* Password Strength Meter */
.auth-pw-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

.auth-pw-bars {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  height: 4px;
}

.auth-pw-bars i {
  display: block;
  border-radius: 4px;
  background: var(--bg-muted);
  transition: background var(--dur);
}

.auth-pw-bars[data-level="1"] i:nth-child(1) { background: var(--danger); }
.auth-pw-bars[data-level="2"] i:nth-child(-n+2) { background: var(--warning); }
.auth-pw-bars[data-level="3"] i { background: var(--success); }

/* Invite Toggle */
.auth-invite-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  padding: 2px 0;
}

.auth-invite-toggle:hover {
  color: var(--accent);
}

.auth-invite-toggle .i {
  width: 14px;
  height: 14px;
}

/* Primary Submit CTA */
.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 2px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity var(--dur), transform var(--dur-fast) var(--ease-out), background var(--dur);
}

.auth-submit:hover:not(:disabled) {
  background: var(--accent-grad-hover);
}

.auth-submit:active:not(:disabled) {
  transform: scale(.985);
}

.auth-submit:disabled {
  background: var(--bg-subtle);
  color: var(--fg-3);
  box-shadow: none;
  opacity: 1;
}

.auth-submit .i {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease-out);
}

.auth-submit:hover:not(:disabled) .i {
  transform: translateX(2px);
}

.auth-submit.is-loading .i {
  display: none;
}

.auth-submit.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .32);
  border-top-color: #ffffff;
  animation: spin .7s linear infinite;
}

/* WeChat QR Card */
.auth-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  border-radius: 18px;
  border: 1px solid var(--line-hairline);
  background: var(--bg-subtle);
  gap: 14px;
}

.auth-wx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: var(--r-full);
  background: rgba(7, 193, 96, .12);
  color: #07a652;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.auth-wx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #07c160;
}

.auth-qr-frame {
  position: relative;
  width: 184px;
  height: 184px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line-hairline);
  box-shadow: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.auth-qr-frame canvas {
  display: block;
  width: 160px !important;
  height: 160px !important;
}

.auth-qr-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #56657d;
  font-size: var(--fs-xs);
}

.auth-qr-placeholder .i {
  width: 34px;
  height: 34px;
  color: #162032;
  opacity: .75;
}

.auth-qr-scanline {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #07c160, transparent);
  box-shadow: 0 0 10px rgba(7, 193, 96, .55);
  animation: authScanLine 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes authScanLine {
  0%, 100% { top: 14px; opacity: .2; }
  50% { top: 166px; opacity: .95; }
}

.auth-qr-status {
  font-size: var(--fs-sm);
  color: var(--fg-2);
  line-height: var(--lh-snug);
  min-height: 20px;
}

.auth-qr-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Mode Switch Footer */
.auth-switch {
  margin-top: 22px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

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

.auth-switch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}

.auth-switch-btn {
  font-weight: var(--fw-semibold);
  color: var(--accent);
  padding: 4px 6px;
  border-radius: var(--r-xs);
  transition: background var(--dur);
}

.auth-switch-btn:hover {
  background: var(--accent-weak);
}

[data-theme="dark"] .auth-forgot-link,
[data-theme="dark"] .auth-switch-btn {
  color: #38b6ff;
}

.auth-legal {
  margin-top: 14px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--fg-3);
  line-height: var(--lh-normal);
}

.auth-legal a {
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-legal a:hover {
  color: var(--fg);
}

.auth-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  padding: 0 20px 24px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

.auth-foot a:hover {
  color: var(--fg);
}

/* Auth Modal Dialog */
.auth-modal {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow: visible;
}

.auth-modal::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-modal-wrap {
  width: 100%;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 32px 32px 28px;
  border-radius: 24px;
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border-radius: 50%;
}

.auth-modal-card .auth-header {
  padding-right: 32px;
}

/* 3. Responsive ------------------------------------------------------------ */
@media (max-width: 520px) {
  .auth-body,
  .auth-shell {
    background: var(--bg);
  }

  .auth-shell::before {
    opacity: .35;
  }

  .auth-topbar {
    padding: 16px 16px 8px;
  }

  .auth-topbar .logo-img {
    height: 24px;
  }

  .auth-main {
    padding: 8px 16px 20px;
  }

  .auth-shell .auth-card {
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  [data-theme="dark"] .auth-shell .auth-card {
    box-shadow: none;
  }

  .auth-modal-card {
    padding: 24px 20px 22px;
    border-radius: 20px;
  }

  .auth-header {
    margin-bottom: 14px;
  }

  .auth-header h1,
  .auth-header h2 {
    font-size: var(--fs-2xl);
  }

  .auth-subtitle {
    font-size: var(--fs-sm);
  }

  .auth-foot-desktop-only {
    display: none;
  }

  .auth-method-tab {
    font-size: var(--fs-xs);
    padding: 0 4px;
    gap: 4px;
  }

  .auth-method-tab .i {
    width: 14px;
    height: 14px;
  }

  .auth-otp-btn {
    padding: 0 12px;
    font-size: var(--fs-xs);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-qr-scanline,
  .auth-submit.is-loading::before {
    animation: none;
  }
}

/* Passwordless OTP Card Extensions */
.auth-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.auth-brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--fg);
}

.auth-brand-mini .logo-img {
  height: 24px;
}

.auth-modal-top .auth-modal-close {
  position: static;
}

.auth-modal-card .auth-header {
  padding-right: 0;
}

.auth-input--plain {
  padding-left: 14px !important;
  padding-right: 14px;
}

.auth-code-box {
  display: flex;
  align-items: center;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}

.auth-code-box:focus-within {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-weak);
}

.auth-code-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 14px;
  font: inherit;
  font-size: var(--fs-md);
  color: var(--fg);
  outline: none;
}

.auth-code-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  flex: none;
}

.auth-code-send {
  flex: none;
  height: 100%;
  padding: 0 14px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur);
}

.auth-code-send:hover:not(:disabled) {
  color: var(--accent);
}

.auth-code-send:disabled {
  color: var(--fg-3);
  cursor: not-allowed;
}

.auth-aux-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--fg-2);
}

.auth-aux-row.is-invite-open {
  justify-content: center;
}

.auth-aux-row.is-invite-open::before,
.auth-aux-row.is-invite-open::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-aux-invite-btn {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  cursor: pointer;
  transition: color var(--dur);
}

.auth-aux-invite-btn:hover {
  color: var(--accent);
}

.auth-alt-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 2px;
}

.auth-alt-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-hairline);
  background: var(--bg-surface);
  color: var(--fg);
  cursor: pointer;
  box-shadow: none;
  transition: transform var(--dur-fast), background var(--dur), border-color var(--dur), color var(--dur);
}

.auth-alt-icon-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--line-strong);
  color: var(--fg);
  transform: translateY(-1px);
}

.auth-alt-icon-btn .i {
  width: 22px;
  height: 22px;
}

.auth-agree {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--fg-2);
  line-height: var(--lh-snug);
  cursor: pointer;
}

.auth-agree input {
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-agree a {
  color: var(--fg);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-agree.is-attention {
  color: var(--danger);
}

.auth-wx-iframe-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-wx-iframe-wrap iframe {
  width: min(100%, 300px);
  height: 360px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.req-phone-foot {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* Access Denied & Auth Status Card */
.auth-status-card {
  width: min(100%, 480px);
  padding: 32px 32px 28px;
  border-radius: var(--r-xl);
  background: var(--bg-surface);
  border: 1px solid var(--line-hairline);
  box-shadow: none;
}

.auth-status-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-status-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--danger-weak);
  color: var(--danger);
  display: grid;
  place-items: center;
}

.auth-status-icon .i {
  width: 22px;
  height: 22px;
}

.auth-status-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-full);
  background: var(--bg-subtle);
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}

.auth-status-title {
  margin: 0 0 10px;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg);
}

.auth-status-desc {
  margin: 0 0 20px;
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--fg-2);
}

.auth-status-meta {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
}

.auth-status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
}

.auth-status-label {
  color: var(--fg-3);
  flex: none;
}

.auth-status-val {
  color: var(--fg);
  font-weight: var(--fw-medium);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-status-path {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--fg-2);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

@media (max-width: 520px) {
  .auth-status-card {
    padding: 24px 20px 22px;
  }

  .auth-status-title {
    font-size: var(--fs-xl);
  }

  .auth-status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .auth-status-val,
  .auth-status-path {
    text-align: left;
  }

  .auth-status-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-status-actions .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Send-Code Captcha Modal (CN Self-Hosted Slider + Global Turnstile)
   -------------------------------------------------------------------------- */
.auth-turnstile-slot {
  display: flex;
  justify-content: center;
  min-height: 0;
}

.auth-turnstile-slot[hidden] {
  display: none;
}

.captcha-modal {
  width: min(376px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  padding: 0;
  border: 1px solid var(--line-hairline);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: var(--shadow-pop);
}

.cap-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.cap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cap-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cap-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--accent-weak);
  color: var(--accent-text);
  display: inline-grid;
  place-items: center;
  flex: none;
}

.cap-title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--fg);
}

.cap-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cap-subtitle {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--fg-2);
  line-height: var(--lh-snug);
}

.cap-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--line-hairline);
  user-select: none;
}

.cap-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cap-piece {
  position: absolute;
  left: 0;
  height: auto;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, .35));
}

.cap-stage-loading {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: var(--bg-subtle);
  color: var(--fg-3);
  font-size: var(--fs-xs);
}

.cap-stage.is-loading .cap-stage-loading {
  display: grid;
}

.cap-stage.is-loading .cap-bg,
.cap-stage.is-loading .cap-piece {
  opacity: 0;
}

.cap-track {
  position: relative;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  box-shadow: none;
}

.cap-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent-weak);
  border-right: 1px solid var(--accent-line);
  pointer-events: none;
  transition: background var(--dur-fast) var(--ease);
}

.cap-track-label {
  position: relative;
  z-index: 1;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--fg-3);
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease);
}

.cap-thumb {
  position: absolute;
  left: 2px;
  top: 2px;
  z-index: 2;
  width: 44px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
  box-shadow: none;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.cap-thumb:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
}

.cap-thumb:active {
  cursor: grabbing;
}

.cap-track[data-state="dragging"] .cap-thumb {
  transition: none;
  background: var(--accent-grad);
  border-color: transparent;
  color: var(--fg-inverse);
}

.cap-track[data-state="dragging"] .cap-piece,
.cap-track.no-anim .cap-thumb {
  transition: none;
}

.cap-track[data-state="success"] .cap-fill {
  background: var(--success-weak);
  border-color: var(--success);
}

.cap-track[data-state="success"] .cap-thumb {
  background: var(--success);
  border-color: transparent;
  color: var(--fg-inverse);
}

.cap-track[data-state="error"] .cap-fill {
  background: var(--danger-weak);
  border-color: var(--danger);
}

.cap-track[data-state="error"] .cap-thumb {
  background: var(--danger);
  border-color: transparent;
  color: var(--fg-inverse);
}

.cap-status {
  min-height: 18px;
  font-size: var(--fs-xs);
  color: var(--fg-2);
  text-align: center;
}

.cap-status[data-state="success"] {
  color: var(--success);
}

.cap-status[data-state="error"] {
  color: var(--danger);
}

.cap-turnstile-mount {
  display: flex;
  justify-content: center;
  min-height: 66px;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .cap-fill,
  .cap-track-label,
  .cap-thumb {
    transition: none;
  }
}


