/* ——— Login Page ——— */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

/* ——— Scene & Atmosphere ——— */

.login-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
}

.login-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.02) 40%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

/* ——— Card ——— */

.login-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 36px 32px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 20px 60px -12px rgba(0, 0, 0, 0.5),
    0 0 120px -40px rgba(239, 68, 68, 0.08);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ——— Header ——— */

.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.login-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}

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

/* ——— Form ——— */

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

.login-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  animation: fieldIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-field:nth-child(1) { animation-delay: 0.08s; }
.login-field:nth-child(2) { animation-delay: 0.14s; }

@keyframes fieldIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-field input {
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.login-field input::placeholder {
  color: var(--text-muted);
}

/* ——— Error ——— */

.login-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 0;
  transition: all 0.2s;
}

.login-error:not(:empty) {
  min-height: 20px;
  padding: 8px 12px;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.12);
  border-radius: var(--radius);
  animation: shakeIn 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shakeIn {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ——— Button ——— */

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fieldIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  margin-top: 2px;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(250, 250, 250, 0.15);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-btn-arrow {
  transition: transform 0.2s;
}

.login-btn:hover:not(:disabled) .login-btn-arrow {
  transform: translateX(3px);
}
