/* Login page — extracted from pandaaiquant.com/login */

@font-face {
  font-display: swap;
  font-family: Dream;
  font-style: normal;
  src: url('/fonts/Dream-BraveGB-Bold.subset.CaqFULrC.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: PuHuiTi_Regular;
  font-style: normal;
  src: url('/fonts/Alibaba_PuHuiTi_2.0_55_Regular_55_Regular.De4YwiNT.woff2') format('woff2');
}

body.panda-login-active .login-page,
body.panda-login-active .login-page *,
body.panda-login-active .login-page *::before,
body.panda-login-active .login-page *::after {
  box-sizing: border-box;
}

body.panda-login-active {
  height: 100%;
  background: #fff;
  color: #1a1a1a;
  font-family:
    sans-serif,
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Fira Sans',
    'Droid Sans',
    'Helvetica Neue';
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.panda-login-active button,
body.panda-login-active input {
  font: inherit;
}

body.panda-login-active a {
  color: inherit;
  text-decoration: none;
}

.login-page {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  user-select: none;
}

.form-panel {
  position: relative;
  display: flex;
  flex: 0 0 640px;
  flex-direction: column;
  height: 100%;
  max-width: 640px;
  min-width: 0;
}

.brand {
  position: absolute;
  top: 48px;
  left: 96px;
  z-index: 2;
  display: flex;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: inherit;
}

.brand-title {
  color: #1a1a1a;
  font-family: Dream, sans-serif;
  font-size: 25px;
  letter-spacing: 0.5px;
  line-height: 40px;
}

.form-area {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 0 96px;
}

.auth-view {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  animation: authViewIn 0.45s ease;
}

@keyframes authViewIn {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authSpin {
  to {
    transform: rotate(1turn);
  }
}

.auth-title {
  margin: 0 0 34px;
  color: #1a1a1a;
  font-family:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 4px;
  line-height: 1.6;
}

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

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.auth-label {
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
}

.auth-input {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #e6e6e8;
  border-radius: 10px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-input.focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px #1a1a1a0f;
}

.auth-input.error {
  border-color: #e5484d;
  box-shadow: none;
}

.auth-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #1a1a1a;
  font-size: 15px;
}

.auth-input input::placeholder {
  color: #b3b8bf;
}

.cc-select {
  position: relative;
  flex-shrink: 0;
}

.cc-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1a1a1a;
  cursor: pointer;
}

.cc-code {
  color: #1a1a1a;
  font-size: 15px;
}

.cc-chevron {
  color: #9aa0a6;
  transition: transform 0.2s;
}

.code-divider {
  flex-shrink: 0;
  width: 1px;
  height: 18px;
  margin: 0 10px;
  background: #e3e3e6;
}

.pwd-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 6px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9aa0a6;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.pwd-toggle:hover {
  background: #f2f3f5;
  color: #1a1a1a;
}

.send-code-btn {
  flex-shrink: 0;
  height: 24px;
  margin-left: 10px;
  padding: 0 0 0 12px;
  border: none;
  border-left: 1px solid #e6e6e8;
  background: transparent;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.send-code-btn:disabled {
  color: #b3b8bf;
  cursor: not-allowed;
}

.send-code-btn.counting {
  font-weight: 400;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 80px;
  min-width: 80px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: #111;
  color: #fff;
  font-family: PuHuiTi_Regular, Alibaba_PuHuiTi_Regular, sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    width 0.3s ease;
}

.auth-btn:hover:not(.loading) {
  background: #333;
}

.auth-btn.loading {
  width: 116px;
  pointer-events: none;
}

.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid hsla(0, 0%, 100%, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

.auth-forgot {
  color: #8a8f98;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-forgot:hover {
  color: #1a1a1a;
}

.auth-signup {
  margin-top: 20px;
  color: #8a8f98;
  font-size: 14px;
}

.auth-signup + .auth-signup {
  margin-top: 7px;
}

.auth-signup a {
  color: #1a1a1a;
  font-weight: 700;
  cursor: pointer;
}

.auth-signup a:hover {
  text-decoration: underline;
}

.auth-agreement {
  margin-top: 20px;
  color: #8a8f98;
  font-size: 14px;
  line-height: 1.7;
}

.auth-agreement a {
  margin: 0 2px;
  color: #1a1a1a;
  font-weight: 700;
  cursor: pointer;
}

.auth-agreement a:hover {
  text-decoration: underline;
}

.canvas-panel {
  box-sizing: border-box;
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  padding: 48px;
}

.canvas-card,
.agent-canvas {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  box-shadow: 0 10px 40px #0711271f;
  overflow: hidden;
  background: #050505;
  position: relative;
}

.agent-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .canvas-panel {
    display: none;
  }

  .form-panel {
    flex: 1 1 100%;
    max-width: none;
  }

  .form-area {
    align-items: center;
    justify-content: center;
    padding: 0 24px;
  }

  .brand {
    top: 24px;
    left: 24px;
  }

  .auth-view {
    margin: 0 auto;
  }

  .auth-title {
    font-size: 36px;
    letter-spacing: 2px;
  }
}
