/* rider-login.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #5B21B6;
  --primary-light: #7C3AED;
  --primary-dark: #4C1D95;
  --secondary: #F97316;
  --secondary-light: #FB923C;
  --text-dark: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --white: #FFFFFF;
  --bg-page: #F8FAFC;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #DC2626;
  --border-light: #E5E7EB;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.app-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 40px;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeSlide 0.6s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  margin-bottom: 24px;
}

.logo {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  background: none;
  -webkit-text-fill-color: var(--secondary);
}

.slogan {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 2px;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

.login-header .subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Login Card */
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  animation: fadeSlide 0.8s ease;
}

/* Method Toggle */
.method-toggle {
  display: flex;
  background: var(--bg-page);
  border-radius: 60px;
  padding: 4px;
  margin-bottom: 24px;
}

.method-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 60px;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.method-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.method-btn:hover {
  color: var(--primary);
}

/* Forms */
.login-form {
  display: none;
}

.login-form.active {
  display: block;
  animation: fadeSlide 0.4s ease;
}

/* Form Groups */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  background: transparent;
  color: var(--text-dark);
}

.input-wrapper input::placeholder {
  color: var(--text-light);
}

.toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.error-message {
  font-size: 0.7rem;
  color: var(--error);
  margin-top: 4px;
  min-height: 20px;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.forgot-link {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  color: var(--primary-light);
}

/* Login Buttons */
.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 60px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.otp-btn {
  width: 100%;
  padding: 14px;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 60px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.otp-btn:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
}

.resend-otp-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 8px;
}

.resend-otp-btn:hover {
  color: var(--primary-light);
}

/* Security Badges */
.security-badges {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 6px 12px;
  border-radius: 40px;
}

.badge i {
  color: var(--primary);
}

/* Create Account */
.create-account {
  text-align: center;
  margin-top: 24px;
}

.create-account p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.create-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 32px;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 60px;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.create-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* Login History */
.login-history {
  margin-top: 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-item i {
  color: var(--primary);
  font-size: 1rem;
}

.history-item div {
  display: flex;
  flex-direction: column;
}

.history-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.history-value {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
  .app-container {
    padding: 24px 16px 32px;
  }
  
  .login-card {
    padding: 24px 16px;
  }
  
  .logo {
    font-size: 2rem;
  }
  
  .security-badges {
    flex-wrap: wrap;
  }
  
  .method-toggle {
    flex-direction: row;
  }
}