/* ========================================
   AIGIRI NANDINI - AUTHENTICATION STYLES
   Login, Signup, Forgot Password Pages
   ======================================== */

/* CSS VARIABLES */
:root {
  --bg: #0b0b0b;
  --card: #0f1720;
  --accent: #00d166;
  --accent-light: #00ff88;
  --accent-dark: #00a855;
  --error: #ff4d4d;
  --success: #00d166;
  --warning: #ffa500;
  --muted: #9aa7a0;
  --text: #e6efe9;
  --text-dark: #03110a;
  --border: rgba(255,255,255,0.1);
  --glass: rgba(255,255,255,0.05);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* RESET & BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #0b0b0b 0%, #0f1720 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   AUTH CONTAINER LAYOUT
   ======================================== */
.auth-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ========================================
   LEFT SIDE - BRANDING
   ======================================== */
.auth-branding {
  flex: 1;
  background: linear-gradient(135deg, 
    rgba(0,209,102,0.15) 0%, 
    rgba(0,255,136,0.1) 50%, 
    rgba(0,209,102,0.15) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,209,102,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.branding-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0,209,102,0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,255,136,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.branding-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

/* Logo Section */
.logo-section {
  text-align: center;
  margin-bottom: 50px;
}

.logo-icon img {
    width: 100px;  /* Adjust size as needed */
    height: 100px;
    object-fit: contain;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.brand-name {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0,209,102,0.3);
}

.brand-tagline {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
}

/* Features List */
.branding-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 50px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255,255,255,0.05);
  padding: 18px 24px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(0,209,102,0.1);
  border-color: var(--accent);
  transform: translateX(10px);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.feature-item span:last-child {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

/* Testimonial */
.testimonial {
  background: rgba(0,209,102,0.1);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(0,209,102,0.3);
  backdrop-filter: blur(10px);
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.6;
}

.testimonial-author {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
}

/* Stats Grid (for signup) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

/* Security Features (forgot password) */
.security-features {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 40px;
}

.security-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.security-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.security-content h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
}

.security-content p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Help Section */
.help-section {
  background: rgba(0,209,102,0.1);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(0,209,102,0.3);
  text-align: center;
}

.help-section h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 10px;
}

.help-section p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.help-email {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.help-email:hover {
  text-decoration: underline;
}

/* Password Tips */
.password-tips {
  background: rgba(255,255,255,0.05);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.password-tips h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 20px;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tip-icon {
  color: var(--accent);
  font-weight: 800;
}

/* ========================================
   RIGHT SIDE - FORM CONTAINER
   ======================================== */
.auth-form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow-y: auto;
}

.auth-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  max-width: 580px;
  margin: 0 auto;
  width: 100%;
}

/* Form Header */
.form-header {
  margin-bottom: 40px;
  text-align: center;
}

.back-button {
  margin-bottom: 20px;
  text-align: left;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-5px);
}

.form-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.2;
}

.form-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Alert Messages */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-error {
  background: rgba(255,77,77,0.1);
  border: 1px solid rgba(255,77,77,0.3);
  color: #ffaaaa;
}

.alert-success {
  background: rgba(0,209,102,0.1);
  border: 1px solid rgba(0,209,102,0.3);
  color: var(--accent);
}

.alert-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alert p {
  margin: 4px 0;
}

/* Form Elements */
.auth-form {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 2;
}

.form-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,209,102,0.1);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-input[type="password"] {
  padding-right: 52px;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa7a0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
}

/* Toggle Password Button */
.toggle-password {
  position: absolute;
  right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  color: var(--muted);
  transition: all 0.3s ease;
  z-index: 2;
}

.toggle-password:hover {
  color: var(--accent);
}

.eye-icon {
  display: block;
}

/* Error Messages */
.error-message {
  display: block;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 20px;
}

.input-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 10px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.password-strength::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
}

.password-strength.weak::before {
  width: 33%;
  background: var(--error);
}

.password-strength.medium::before {
  width: 66%;
  background: var(--warning);
}

.password-strength.strong::before {
  width: 100%;
  background: var(--success);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '✓';
  color: var(--text-dark);
  font-weight: 800;
  font-size: 0.9rem;
}

.checkbox-text {
  font-size: 0.95rem;
  color: var(--text);
}

/* Links */
.link-text {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.link-text:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.link-primary {
  font-size: 1.05rem;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,209,102,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  text-align: center;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0,209,102,0.5);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-loader {
  display: none;
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .btn-loader {
  display: block;
}

/* Loader Animation */
.loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(3,17,10,0.3);
  border-top-color: var(--text-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  text-align: center;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  padding: 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Social Login */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.btn-social {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-social:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.social-icon {
  font-size: 1.3rem;
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: 20px;
}

.footer-text {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Auth Footer */
.auth-footer {
  padding: 30px 60px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ========================================
   SUCCESS/ERROR CONTAINERS
   ======================================== */
.success-container,
.error-container {
  text-align: center;
  padding: 40px 20px;
}

.success-icon,
.error-icon {
  font-size: 5rem;
  margin-bottom: 25px;
  display: inline-block;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-message {
  background: rgba(0,209,102,0.1);
  border: 1px solid rgba(0,209,102,0.3);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
  color: var(--text);
}

.success-steps {
  margin: 35px 0;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.step-text {
  color: var(--text);
  font-size: 1rem;
}

.success-actions {
  margin-top: 35px;
}

.resend-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.btn-resend {
  width: 100%;
  padding: 16px;
  background: rgba(0,209,102,0.1);
  border: 2px solid var(--accent);
  border-radius: 12px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.btn-resend:hover:not(:disabled) {
  background: rgba(0,209,102,0.2);
}

.btn-resend:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-back {
  display: block;
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

/* Error Container Specific */
.error-reasons {
  text-align: left;
  background: rgba(255,77,77,0.05);
  border: 1px solid rgba(255,77,77,0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
}

.error-reasons p {
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 600;
}

.error-reasons ul {
  list-style-position: inside;
  color: var(--muted);
  line-height: 1.8;
}

.error-actions {
  margin-top: 35px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Alternative Options */
.alternative-options {
  margin-top: 35px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.option-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.option-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.option-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets & Below (≤992px) */
@media (max-width: 992px) {
  .auth-container {
    flex-direction: column;
  }
  
  .auth-branding {
    min-height: 350px;
    padding: 40px;
  }
  
  .branding-features,
  .security-features {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .auth-form-wrapper {
    padding: 40px;
  }
  
  .auth-footer {
    padding: 25px 40px;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .auth-branding {
    min-height: 300px;
    padding: 30px 20px;
  }
  
  .logo-icon {
    font-size: 3.5rem;
  }
  
  .brand-name {
    font-size: 2rem;
  }
  
  .brand-tagline {
    font-size: 1rem;
  }
  
  .testimonial,
  .password-tips {
    padding: 20px;
  }
  
  .auth-form-wrapper {
    padding: 30px 20px;
  }
  
  .form-title {
    font-size: 2rem;
  }
  
  .form-subtitle {
    font-size: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .social-login {
    gap: 10px;
  }
  
  .auth-footer {
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .auth-branding {
    min-height: 250px;
    padding: 25px 15px;
  }
  
  .logo-icon {
    font-size: 3rem;
  }
  
  .brand-name {
    font-size: 1.6rem;
  }
  
  .auth-form-wrapper {
    padding: 25px 15px;
  }
  
  .form-title {
    font-size: 1.8rem;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-input {
    padding: 14px 18px 14px 48px;
    font-size: 0.95rem;
  }
  
  .btn-submit {
    padding: 16px;
    font-size: 1rem;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}