/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  /* Same gradient as the sidebar — makes the login page feel part of the same brand */
  background: linear-gradient(170deg, #7c3aed 0%, #a855f7 48%, #db2777 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.login-wrapper {
  width: 100%;
  max-width: 400px;
}

/* ── Login box ──────────────────────────────────────────────── */
.login-box {
  background: #ffffff;
  padding: 40px 40px 36px;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.12);
  animation: fadeUp 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-box h2 {
  margin-bottom: 8px;
  color: #111827;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.login-box .subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Input group (floating label) ───────────────────────────── */
.input-group {
  position: relative;
  margin-bottom: 22px;
}

.input-group input {
  width: 100%;
  padding: 13px 14px 11px;
  font-size: 14px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  color: #111827;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
}

.input-group input::placeholder {
  color: transparent;
}

.input-group input:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  transition: all 0.18s ease;
  font-size: 14px;
  background: transparent;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: -9px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #ffffff;
  padding: 0 5px;
  border-radius: 4px;
}

/* ── Checkbox ───────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #6366f1;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── Login button ───────────────────────────────────────────── */
.btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
  letter-spacing: 0.02em;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.40);
}

.btn:hover {
  opacity: 0.92;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.50);
}

.btn:active {
  transform: scale(0.98);
}

/* ── Alert boxes ────────────────────────────────────────────── */
.error-box {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.info-box {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: 8px;
  font-size: 13px;
}

.info-box a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.info-box a:hover {
  text-decoration: underline;
}

/* ── NTES secondary box ─────────────────────────────────────── */
.login-box.secondary {
  padding: 22px 28px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.30);
  text-align: center;
  backdrop-filter: blur(8px);
}

.login-box.secondary h2 {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.login-box.secondary a {
  display: inline-block;
}

.login-box.secondary img {
  border-radius: 10px;
  opacity: 0.9;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.login-box.secondary img:hover {
  opacity: 1;
  transform: scale(1.06);
}

/* ── Animation ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
