/* 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;
  --error: #DC2626;
  --success: #10B981;
  --border-light: #E5E7EB;
  --glass-bg: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(91, 33, 182, 0.15);
  --radius-md: 20px;
  --radius-lg: 28px;
  --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--white);
  overflow-x: hidden;
  height: 100vh;
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ============================================================
   LEFT SIDE - SPLIT (Desktop)
   ============================================================ */
.split-left {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #5B21B6 0%, #F97316 100%);
  min-height: 100vh;
}

.bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

.left-content {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 520px;
  width: 100%;
  color: var(--white);
}

.logo-area {
  margin-bottom: 60px;
}

.logo {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo span {
  color: var(--secondary);
  text-shadow: none;
}

.slogan {
  font-size: 0.85rem;
  opacity: 0.8;
  letter-spacing: 1px;
  margin-top: 6px;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 380px;
}

/* Illustration area */
.illustration-area {
  margin-top: 60px;
  position: relative;
  height: 260px;
}

.ill-card {
  position: relative;
  width: 100%;
  height: 100%;
}

.floating-icon {
  position: absolute;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 60px;
  padding: 16px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  animation: float 4s ease-in-out infinite;
}

.icon-1 {
  top: 0;
  left: 10%;
  animation-delay: 0s;
}

.icon-2 {
  bottom: 20%;
  right: 0;
  animation-delay: 1.2s;
  background: rgba(249,115,22,0.3);
}

.icon-3 {
  bottom: 0;
  left: 25%;
  animation-delay: 0.6s;
  background: rgba(255,255,255,0.25);
}

.route-line {
  position: absolute;
  bottom: 40px;
  left: 30%;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), var(--secondary), rgba(255,255,255,0.3));
  border-radius: 3px;
  animation: pulseLine 2s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes pulseLine {
  0%, 100% { opacity: 0.5; width: 55%; }
  50% { opacity: 1; width: 65%; }
}

/* ============================================================
   RIGHT SIDE - LOGIN CARD
   ============================================================ */
.split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  padding: 24px;
}

.login-card {
  max-width: 460px;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(91, 33, 182, 0.1);
  transition: transform 0.4s ease, opacity 0.5s ease;
  animation: fadeSlideUp 0.6s ease-out;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-header {
  text-align: center;
  margin-bottom: 32px;
}

.badge {
  display: inline-block;
  background: rgba(91, 33, 182, 0.1);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 60px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.card-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.phone-input-wrapper {
  display: flex;
  gap: 8px;
  border: 1.5px solid var(--border-light);
  border-radius: 60px;
  background: var(--white);
  transition: var(--transition);
  overflow: hidden;
}

.phone-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.country-code {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background: #F9FAFB;
  border-right: 1px solid var(--border-light);
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.country-code i {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.input-icon-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 16px;
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
}

.input-icon-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
}

.password-wrapper input {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  padding: 0;
}

.toggle-password:hover {
  color: var(--primary);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  position: relative;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: 4px;
  transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.forgot-link:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Login Button */
.btn-login {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 60px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(91, 33, 182, 0.3);
  margin-top: 8px;
}

.btn-login:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 33, 182, 0.4);
}

.btn-login:active {
  transform: translateY(1px);
}

.btn-loader {
  font-size: 0.9rem;
  gap: 8px;
  display: flex;
  align-items: center;
}

/* Form Message */
.form-message {
  padding: 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  text-align: center;
  background: rgba(220, 38, 38, 0.08);
  color: var(--error);
  border-left: 3px solid var(--error);
}

.form-message.success {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border-left-color: var(--success);
}

.error-message {
  font-size: 0.7rem;
  color: var(--error);
  margin-top: 4px;
  min-height: 20px;
}

/* Auth Footer */
.auth-footer {
  margin-top: 32px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
}

.auth-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-footer a:hover {
  color: var(--secondary);
}

.home-link a {
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

/* Demo Modal */
.demo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.demo-modal-content {
  background: var(--white);
  max-width: 380px;
  width: 90%;
  padding: 32px;
  border-radius: 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideUp 0.3s ease;
}

.demo-modal-content i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.demo-modal-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.demo-modal-content p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 60px;
  font-weight: 600;
  cursor: pointer;
}

.close-modal {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 992px) {
  .app-wrapper {
    flex-direction: column;
  }

  .split-left {
    min-height: 380px;
    align-items: flex-start;
  }

  .left-content {
    padding: 40px 32px;
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .illustration-area {
    height: 180px;
    margin-top: 30px;
  }

  .split-right {
    padding: 40px 24px;
    min-height: auto;
  }

  .login-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 32px 28px;
  }
}

@media (max-width: 640px) {
  .left-content {
    padding: 32px 24px;
  }

  .logo {
    font-size: 1.8rem;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .login-card {
    padding: 28px 20px;
  }

  .card-header h2 {
    font-size: 1.5rem;
  }

  .phone-input-wrapper {
    flex-wrap: wrap;
    border-radius: 28px;
  }

  .country-code {
    width: 100%;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 10px 16px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .btn-login {
    padding: 12px 20px;
  }
}

/* Input focus animations */
.input-icon-wrapper input:focus {
  background: transparent;
}

.input-icon-wrapper input:focus + .input-icon-left {
  color: var(--primary);
}

/* Keyboard focus ring */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}