/* ===== LOGIN PAGE STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --accent: #6c63ff;
  --accent-light: #8b83ff;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --pink: #f472b6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --glass-border: rgba(255, 255, 255, 0.08);
  --rose: #fb7185;
  --emerald: #34d399;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary, #090e1a);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ── Animated Background ── */
.login-bg {
  position: fixed;
  inset: 0;
  background: var(--bg-gradient, radial-gradient(circle at top right, #111827, #090e1a));
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbPulse 6s ease-in-out infinite;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.18), transparent 70%);
  top: -150px; right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.12), transparent 70%);
  bottom: -100px; left: -80px;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.08), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -1.5s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.6; }
  50% { transform: scale(1.15) translate(20px, -20px); opacity: 1; }
}

/* ── Login Container ── */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  animation: loginAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginAppear {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Card ── */
.login-card {
  background: var(--bg-card, rgba(15, 23, 42, 0.85));
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.09));
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow: var(--shadow-md, 0 32px 80px rgba(0,0,0,0.6)), 0 0 0 1px rgba(108, 99, 255, 0.1);
}

/* ── Logo Area ── */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px var(--accent-glow);
  position: relative;
}

.login-avatar::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 23px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  z-index: -1;
  opacity: 0.3;
  filter: blur(8px);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ── Form ── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.form-input {
  width: 100%;
  background: var(--bg-card, rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 13px 16px 13px 42px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.14);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent-light);
}

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

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
  padding: 4px;
}

.toggle-password:hover { color: var(--text-secondary); }

/* ── Remember Me ── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
}

/* ── Submit Button ── */
.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--accent-glow);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.login-btn:hover::before { opacity: 1; }
.login-btn:active { transform: translateY(0); }

.login-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-text { transition: var(--transition); }
.btn-loader { display: none; }
.login-btn.loading .btn-text { display: none; }
.login-btn.loading .btn-loader { display: inline-block; }

/* ── Error Message ── */
.error-message {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 12px;
  font-size: 13px;
  color: var(--rose);
}

.error-message.show {
  display: flex;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Footer ── */
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Floating particles ── */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(108, 99, 255, 0.4);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
