:root {
  /* Color Palette */
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: #eef2ff;
  --secondary: #06d6a0; /* Green for Success */
  --danger: #ef476f;
  --warning: #ffd166;
  --info: #3da9fc;
  --dark: #1a1a2e;
  --dark-light: #2d2d44;
  --gray-900: #4a4a6a;
  --gray-700: #6c6c8a;
  --gray-500: #a0a0b8;
  --gray-300: #d1d1e0;
  --gray-100: #f8f9ff;
  --white: #ffffff;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 50px;
  
  /* Transitions */
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 14px; /* Base size for Mobile */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #f5f7ff 0%, #f0f2ff 100%);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  line-height: 1.4;
}

/* =========================================
   Toast Notifications (Custom Alert)
   ========================================= */
#toast-box {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  width: 100%;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center; /* Vertically Center */
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--gray-300);
  animation: slideIn 0.3s forwards;
  position: relative;
}

.toast.show {
  transform: translateX(0);
}

/* Border Colors based on Type */
.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast.pending { border-left-color: var(--warning); }

/* Icon Image */
.toast-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.toast-msg {
  flex-grow: 1;
}

.toast-msg h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2px;
}

.toast-msg p {
  font-size: 12px;
  color: var(--gray-700);
  margin: 0;
}

/* Close Button (X) */
.toast-close {
  color: var(--gray-500);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  align-self: flex-start;
  margin-top: -4px;
}

.toast-close:hover {
  color: var(--danger);
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

/* =========================================
   Main Container
   ========================================= */
.container-box {
  display: flex;
  width: 100%;
  max-width: 350px; /* Compact Mobile Default */
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
  flex-direction: column;
  margin: 0 auto;
}

/* Brand Side */
.brand-side {
  background: linear-gradient(135deg, var(--primary) 0%, #5a7cff 100%);
  padding: 24px 20px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  text-align: center;
}

.brand-side::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

/* Logo Styling – White Card */
.brand-logo {
  max-width: 200px;
  height: auto;
  display: inline-block;

  /* White card effect */
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;

  /* Light shadow for depth */
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);

  margin-bottom: 15px;
}

/* Mobile ke liye thoda chhota size */
@media (max-width: 768px) {
  .brand-logo {
    max-width: 150px;
    padding: 10px 14px;
  }
}



.brand-header { position: relative; z-index: 1; }

.brand-side h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}

.brand-side p {
  font-size: 13px;
  opacity: 0.95;
  margin-bottom: 0;
}

.features { display: none; }

/* Form Side */
.form-side {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#main-form, #otp-panel { width: 100%; }

.header {
  margin-bottom: 20px;
  text-align: center;
}

.header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.header p {
  color: var(--gray-700);
  font-size: 13px;
}

/* Input Fields */
.input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.input-wrap label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.input-field {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-field::placeholder {
  color: var(--gray-500);
  font-size: 12px;
}

.icon {
  position: absolute;
  left: 12px;
  bottom: 11px;
  width: 15px;
  height: 15px;
  color: var(--gray-500);
  pointer-events: none;
  transition: var(--transition);
}

.input-field:focus + .icon { color: var(--primary); }

/* Buttons */
.btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, var(--primary) 0%, #5a7cff 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Links & Text */
.flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.link:hover { text-decoration: underline; }

.center-text {
  text-align: center;
  font-size: 12px;
  color: var(--gray-700);
  margin-top: 16px;
}

/* OTP Styling */
.otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.otp-digit {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--dark);
  outline: none;
  transition: var(--transition);
  background: var(--white);
}

.otp-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.otp-digit.filled {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Timer */
#timer-label {
  font-size: 12px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#timer {
  color: var(--primary);
  font-weight: 700;
}

#resend-link { font-weight: 600; cursor: pointer; }

/* Utilities */
.hidden { display: none !important; }

.fade-up { animation: fadeUp 0.3s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Checkbox */
input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Terms */
.terms {
  margin: 14px 0;
  font-size: 11px;
  color: var(--gray-700);
}

.terms label {
  display: flex; align-items: flex-start; gap: 6px; cursor: pointer;
}

.terms input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

/* =========================================
   DESKTOP PREMIUM STYLES (110% Look)
   ========================================= */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }

  .container-box {
    max-width: 900px; /* Big Premium Width */
    flex-direction: row;
    min-height: 550px;
  }
  
  /* Brand Side Desktop */
  .brand-side {
    flex: 0.45;
    padding: 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .brand-side h1 {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .brand-side p {
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
  }
  
  .features {
    display: block;
    list-style: none;
    margin-top: 20px;
  }
  
  .features li {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
  }
  
  .features li i {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    font-size: 14px;
  }
  
  /* Form Side Desktop */
  .form-side {
    flex: 0.55;
    padding: 50px;
  }
  
  .header { text-align: left; margin-bottom: 32px; }
  
  .header h2 { font-size: 28px; margin-bottom: 8px; }
  
  .header p { font-size: 15px; }
  
  /* Inputs Desktop */
  .input-wrap { margin-bottom: 22px; }
  
  .input-wrap label { font-size: 14px; margin-bottom: 8px; }
  
  .input-field {
    padding: 14px 16px 14px 44px;
    font-size: 15px;
    border-radius: var(--radius-md);
  }
  
  .icon {
    width: 18px; height: 18px;
    bottom: 14px; left: 16px;
  }
  
  .btn {
    padding: 15px;
    font-size: 16px;
    margin-top: 12px;
  }
  
  .otp-digit {
    width: 55px;
    height: 55px;
    font-size: 24px;
  }
  
  .link, .center-text, .flex-row { font-size: 14px; }
}

/* =========================================
   VERY SMALL MOBILE
   ========================================= */
@media (max-width: 320px) {
  .container-box { max-width: 100%; border-radius: var(--radius-sm); }
  .form-side { padding: 16px 12px; }
  .otp-digit { width: 38px; height: 38px; }
  .brand-side h1 { font-size: 18px; }
}