body { overflow: hidden; }

.grad-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(108, 99, 255, 0.35), transparent 52%),
    radial-gradient(circle at 85% 10%, rgba(168, 85, 247, 0.25), transparent 48%),
    radial-gradient(circle at 30% 85%, rgba(6, 182, 212, 0.2), transparent 45%),
    #0d0f1a;
}

html[data-theme="light"] .grad-bg {
  background:
    radial-gradient(circle at 12% 12%, rgba(41, 82, 255, 0.22), transparent 50%),
    radial-gradient(circle at 86% 8%, rgba(20, 184, 166, 0.2), transparent 46%),
    radial-gradient(circle at 28% 86%, rgba(56, 189, 248, 0.18), transparent 44%),
    #f6f7fb;
}

.login-theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.login-theme-toggle svg {
  font-size: 18px;
}

.grad-orb:nth-child(1) {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6c63ff, transparent 70%);
  top: -10%; left: -10%;
  animation-delay: 0s;
}
.grad-orb:nth-child(2) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #a855f7, transparent 70%);
  bottom: -10%; right: -5%;
  animation-delay: -3s;
}
.grad-orb:nth-child(3) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: 20%; left: 30%;
  animation-delay: -5s;
  opacity: 0.3;
}

.center {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: none;
  transition: opacity 0.6s ease;
}

.logo-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.logo-icon {
  width: 300px;
  height: 300px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: none;
  padding: 18px;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.25));
}

.logo-icon--text {
  width: auto;
  height: auto;
  max-width: 720px;
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
}

@keyframes icon-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: none; }
}

.logo-name {
  font-family: 'Inter', sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
}

.logo-name span { color: var(--color-accent); }

.logo-hint {
  color: var(--color-text-muted);
  font-size: 14px;
  letter-spacing: 0.5px;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.login-card {
  width: 420px;
  padding: 40px;
  position: absolute;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.login-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-small {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: none;
  padding: 10px;
}

.login-logo-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-logo-text {
  display: inline-block;
  max-width: 100%;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  white-space: nowrap;
}

.login-logo-small--text {
  width: auto;
  max-width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .login-card {
    width: calc(100% - 32px);
    position: relative;
    margin: 40px auto 0;
  }
}

@media (max-width: 640px) {
  .login-card { padding: 28px; }
  .login-logo-small { width: 56px; height: 56px; }
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--color-text-muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.biometric-btn {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  cursor: pointer;
}

.biometric-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--color-text-muted);
}

.forgot-link {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

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

.password-wrap { position: relative; }

.password-input { padding-right: 44px; }

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
}

.timeout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
}

.timeout-bar.is-hidden { display: none; }

.timeout-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #a855f7);
  animation: timeout-countdown 60s linear forwards;
}

@keyframes timeout-countdown {
  from { width: 100%; }
  to { width: 0%; }
}

.error-box {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--color-danger);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
