/**
 * Register/Login Page Styles
 * Modern Glassmorphism Design with Abatanado Branding
 */

/* ===== GLOBAL BACKGROUND - MATCHING INDEX.EJS ===== */
body {
  background: var(--business-darker) !important;
}

/* ===== MAIN AUTH WRAPPER ===== */
.auth-main-wrapper {
  min-height: 100vh;
  background: var(--business-darker) !important;
  position: relative;
  overflow-x: hidden;
}

/* ===== AUTH SECTION ===== */
.auth-section {
  min-height: 100vh;
  padding: 2rem 0;
  position: relative;
  background: var(--business-darker) !important;
  overflow: hidden;
}

.auth-section:hover {
  background: var(--business-darker) !important;
}

/* Animated Background Elements - Disabled */
.auth-bg-elements {
  display: none;
}

.auth-bg-orb {
  display: none;
}

/* ===== AUTH CARD CONTAINER ===== */
.auth-card-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--glass-bg, rgba(42, 47, 52, 0.7));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg, 28px);
  overflow: hidden;
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(0, 0, 0, 0.35)),
              0 0 0 1px var(--glass-border, rgba(255, 255, 255, 0.1));
  min-height: 700px;
}

/* ===== BRAND PANEL (Left Side) ===== */
.auth-brand-panel {
  background: linear-gradient(135deg, 
    var(--business-primary, #df691a) 0%, 
    var(--business-secondary, #fd7e14) 100%);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 15px 15px, rgba(255, 255, 255, 0.08) 2px, transparent 2px),
    radial-gradient(circle at 45px 45px, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 30px 30px, 60px 60px;
  z-index: 1;
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

/* Brand Logo */
.auth-brand-logo {
  margin-bottom: 2rem;
}

.brand-icon-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.brand-icon-wrapper i {
  font-size: 3rem;
  color: white;
}

/* Brand Title & Subtitle */
.auth-brand-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-brand-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Feature Items */
.auth-features {
  margin-top: 3rem;
  text-align: left;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 12px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.6s ease-out forwards;
  transition: all var(--transition, 0.3s ease);
}

.auth-feature-item:nth-child(1) { animation-delay: 0.1s; }
.auth-feature-item:nth-child(2) { animation-delay: 0.2s; }
.auth-feature-item:nth-child(3) { animation-delay: 0.3s; }
.auth-feature-item:nth-child(4) { animation-delay: 0.4s; }

.auth-feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: all var(--transition, 0.3s ease);
}

.auth-feature-item:hover .feature-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.feature-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.25rem 0;
}

.feature-text p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* Trust Badge */
.auth-trust-badge {
  margin-top: 3rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md, 20px);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out 0.5s forwards;
  transition: all var(--transition, 0.3s ease);
}

.auth-trust-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-trust-badge i {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  animation: pulse 2s ease-in-out infinite;
}

/* ===== FORM PANEL (Right Side) ===== */
.auth-form-panel {
  padding: 3rem 2.5rem;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.4);
  backdrop-filter: blur(10px);
  position: relative;
}

.auth-form-wrapper {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 3rem;
  left: 2.5rem;
  right: 2.5rem;
  transition: all var(--transition-normal, 0.3s);
  transform: translateX(30px);
}

.auth-form-wrapper.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  transform: translateX(0);
}

.auth-form-wrapper.exit-left {
  animation: exitLeft 0.4s ease-out forwards;
}

.auth-form-wrapper.enter-right {
  animation: enterRight 0.4s ease-out forwards;
}

@keyframes exitLeft {
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

@keyframes enterRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Form Header */
.auth-form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-form-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--business-text, #ffffff);
  margin-bottom: 0.5rem;
}

.auth-form-subtitle {
  font-size: 1rem;
  color: var(--business-text-muted, #a8b2bd);
  font-weight: 400;
}

/* Form Elements */
.auth-form {
  width: 100%;
}

.auth-form-group {
  margin-bottom: 1.5rem;
}

.auth-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--business-text, #ffffff);
  margin-bottom: 0.5rem;
}

.auth-form-label i {
  font-size: 0.875rem;
  color: var(--business-primary, #df691a);
}

/* Input Wrapper */
.auth-input-wrapper {
  position: relative;
}

.auth-form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.6);
  border: 1px solid var(--business-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 12px);
  color: var(--business-text, #ffffff);
  font-size: 0.95rem;
  transition: all var(--transition-fast, 0.15s);
  backdrop-filter: blur(10px);
}

.auth-form-input:focus {
  outline: none;
  border-color: var(--business-primary, #df691a);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 223, 105, 26), 0.1),
              0 4px 12px rgba(0, 0, 0, 0.2);
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.8);
}

.auth-form-input::placeholder {
  color: var(--business-text-muted, #a8b2bd);
  opacity: 0.6;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--business-text-muted, #a8b2bd);
  font-size: 1rem;
  pointer-events: none;
  transition: color var(--transition-fast, 0.15s);
}

.auth-form-input:focus + .input-icon {
  color: var(--business-primary, #df691a);
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--business-text-muted, #a8b2bd);
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--transition-fast, 0.15s);
  z-index: 10;
}

.password-toggle:hover {
  color: var(--business-primary, #df691a);
}

.password-toggle:focus {
  outline: none;
  color: var(--business-primary, #df691a);
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
  display: none;
}

.password-strength.active {
  display: block;
}

.strength-bar {
  height: 4px;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.6);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all var(--transition-normal, 0.3s);
  border-radius: 2px;
}

.strength-fill.weak {
  width: 33%;
  background: #dc3545;
}

.strength-fill.medium {
  width: 66%;
  background: var(--business-accent, #ffc107);
}

.strength-fill.strong {
  width: 100%;
  background: var(--success-color, #28a745);
}

.strength-text {
  font-size: 0.75rem;
  color: var(--business-text-muted, #a8b2bd);
}

/* Form Help Text */
.auth-form-help {
  display: block;
  font-size: 0.8rem;
  color: var(--business-text-muted, #a8b2bd);
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.auth-form-help i {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Form Error Messages */
.auth-form-error {
  display: block;
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 0.25rem;
  min-height: 1rem;
  opacity: 0;
  transition: opacity var(--transition-fast, 0.15s);
}

.auth-form-error.show {
  opacity: 1;
}

/* Input Error State */
.auth-form-input.error {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.auth-form-input.error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.auth-country-select.error {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

/* Form Options (Remember Me & Forgot Password) */
.auth-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Custom Checkbox */
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--business-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.6);
  position: relative;
  transition: all var(--transition-fast, 0.15s);
}

.auth-checkbox input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--business-primary, #df691a);
  border-color: var(--business-primary, #df691a);
}

.auth-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--business-text-muted, #a8b2bd);
}

/* Checkbox Group */
.auth-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .auth-checkbox-group {
    grid-template-columns: 1fr;
  }
}

/* Links */
.auth-link-primary {
  color: var(--business-primary, #df691a);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast, 0.15s);
}

.auth-link-primary:hover {
  color: var(--business-secondary, #fd7e14);
  text-decoration: underline;
}

/* Primary Button */
.auth-btn-primary {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, 
    var(--business-primary, #df691a) 0%, 
    var(--business-secondary, #fd7e14) 100%);
  border: none;
  border-radius: var(--radius-sm, 12px);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal, 0.3s);
  box-shadow: 0 4px 16px rgba(var(--primary-color-rgb, 223, 105, 26), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--primary-color-rgb, 223, 105, 26), 0.4);
}

.auth-btn-primary:active {
  transform: translateY(0);
}

.auth-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-btn-primary:hover::before {
  left: 100%;
}

.btn-loader {
  display: none;
}

.auth-btn-primary.loading .btn-text,
.auth-btn-primary.loading .btn-icon {
  display: none;
}

.auth-btn-primary.loading .btn-loader {
  display: inline-block;
}

.btn-icon {
  transition: transform var(--transition-normal, 0.3s);
}

.auth-btn-primary:hover .btn-icon {
  transform: translateX(5px);
}

/* Divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 2rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--business-border, rgba(255, 255, 255, 0.08));
}

.auth-divider span {
  position: relative;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.4);
  padding: 0 1rem;
  color: var(--business-text-muted, #a8b2bd);
  font-size: 0.875rem;
  z-index: 1;
}

/* Social Buttons */
.auth-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.auth-social-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.6);
  border: 1px solid var(--business-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 12px);
  color: var(--business-text, #ffffff);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.auth-social-btn:hover {
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.8);
  border-color: var(--business-border-light, rgba(255, 255, 255, 0.12));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-social-btn i {
  font-size: 1.1rem;
}

.google-btn:hover {
  border-color: #4285f4;
  color: #4285f4;
}

.facebook-btn:hover {
  border-color: #1877f2;
  color: #1877f2;
}

/* Phone Number Input */
.auth-phone-wrapper {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.auth-country-select {
  flex: 0 0 120px;
  padding: 0.875rem 0.5rem 0.875rem 0.75rem;
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.4);
  border: 1px solid var(--business-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 12px);
  color: var(--business-text, #ffffff);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition, 0.3s ease);
  backdrop-filter: blur(10px);
  outline: none;
  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='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

.auth-country-select:focus {
  border-color: var(--business-primary, #df691a);
  background: rgba(var(--card-bg-rgb, 58, 63, 68), 0.6);
}

.auth-country-select option {
  background: var(--business-dark, #1a1d21);
  color: var(--business-text, #ffffff);
  padding: 0.5rem;
}

.auth-phone-input {
  flex: 1;
}

.auth-phone-input input[type="tel"] {
  letter-spacing: 0.5px;
}

/* Form Footer */
.auth-form-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-form-footer p {
  font-size: 0.9rem;
  color: var(--business-text-muted, #a8b2bd);
  margin: 0;
}

/* ===== TOAST NOTIFICATION ===== */
.auth-toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--glass-bg, rgba(42, 47, 52, 0.9));
  backdrop-filter: blur(20px);
  border-radius: var(--radius-md, 20px);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(0, 0, 0, 0.35));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100px);
  transition: all var(--transition-normal, 0.3s);
}

.auth-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.toast-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, 
    var(--business-primary, #df691a) 0%, 
    var(--business-secondary, #fd7e14) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.toast-icon.error {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--business-text, #ffffff);
  margin: 0 0 0.25rem 0;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--business-text-muted, #a8b2bd);
  margin: 0;
}

.toast-close {
  background: none;
  border: none;
  color: var(--business-text-muted, #a8b2bd);
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--transition-fast, 0.15s);
}

.toast-close:hover {
  color: var(--business-text, #ffffff);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
  .auth-card-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand-panel {
    padding: 2rem 1.5rem;
  }

  .auth-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .auth-feature-item {
    margin-bottom: 0;
  }

  .auth-form-panel {
    padding: 2rem 1.5rem;
  }

  .auth-form-wrapper {
    left: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 767px) {
  .auth-section {
    padding: 1rem 0;
  }

  .auth-brand-title {
    font-size: 2rem;
  }

  .auth-brand-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .brand-icon-wrapper {
    width: 80px;
    height: 80px;
  }

  .brand-icon-wrapper i {
    font-size: 2.5rem;
  }

  .auth-form-title {
    font-size: 1.75rem;
  }

  .auth-social-buttons {
    grid-template-columns: 1fr;
  }

  .auth-toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  .auth-features {
    margin-top: 2rem;
  }

  .auth-trust-badge {
    margin-top: 2rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 575px) {
  .auth-card-container {
    border-radius: var(--radius-md, 20px);
  }

  .auth-form-panel,
  .auth-brand-panel {
    padding: 1.5rem 1rem;
  }

  .auth-form-header {
    margin-bottom: 1.5rem;
  }

  .auth-form-title {
    font-size: 1.5rem;
  }

  .auth-form-subtitle {
    font-size: 0.9rem;
  }

  .auth-form-group {
    margin-bottom: 1.25rem;
  }

  .auth-form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
.auth-form-input:focus-visible,
.auth-btn-primary:focus-visible,
.auth-social-btn:focus-visible,
.password-toggle:focus-visible {
  outline: 2px solid var(--business-primary, #df691a);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .auth-form-input,
  .auth-social-btn {
    border-width: 2px;
  }

  .auth-form-input:focus {
    border-width: 3px;
  }
}

/* ============================================================================
   ENHANCED MOBILE-FIRST RESPONSIVE DESIGN - REGISTER/LOGIN PAGE
   ============================================================================ */

/* Force no horizontal scroll */
html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box;
}

body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  position: relative;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* Additional mobile breakpoint - 480px */
@media (max-width: 480px) {
  .auth-section {
    padding: 0.75rem 0;
  }
  
  .auth-card-container {
    border-radius: var(--radius-sm, 16px);
    margin: 0 0.5rem;
  }
  
  .auth-form-panel,
  .auth-brand-panel {
    padding: 1.25rem 0.875rem;
  }
  
  .auth-brand-title {
    font-size: 1.5rem;
  }
  
  .auth-brand-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }
  
  .brand-icon-wrapper {
    width: 65px;
    height: 65px;
  }
  
  .brand-icon-wrapper i {
    font-size: 2rem;
  }
  
  .auth-form-header {
    margin-bottom: 1.25rem;
  }
  
  .auth-form-title {
    font-size: 1.35rem;
  }
  
  .auth-form-subtitle {
    font-size: 0.85rem;
  }
  
  .auth-form-group {
    margin-bottom: 1rem;
  }
  
  .auth-form-label {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
  }
  
  .auth-form-input {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .auth-input-wrapper .input-icon {
    font-size: 0.85rem;
  }
  
  .password-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .auth-btn-primary {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .auth-feature-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .feature-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 1rem;
  }
  
  .feature-text h4 {
    font-size: 0.85rem;
  }
  
  .feature-text p {
    font-size: 0.75rem;
    line-height: 1.4;
  }
  
  .auth-social-btn {
    padding: 0.65rem 0.75rem;
  }
  
  .auth-social-btn i {
    font-size: 1rem;
  }
  
  .auth-social-btn span {
    font-size: 0.8rem;
  }
  
  .auth-form-options {
    font-size: 0.8rem;
  }
  
  .auth-trust-badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  .auth-form-footer {
    font-size: 0.85rem;
    margin-top: 1.5rem;
  }
}

/* Very small devices - 400px */
@media (max-width: 400px) {
  .auth-section {
    padding: 0.5rem 0;
  }
  
  .auth-card-container {
    border-radius: var(--radius-sm, 14px);
    margin: 0 0.35rem;
  }
  
  .auth-form-panel,
  .auth-brand-panel {
    padding: 1rem 0.75rem;
  }
  
  .auth-brand-title {
    font-size: 1.35rem;
  }
  
  .auth-brand-subtitle {
    font-size: 0.8rem;
  }
  
  .brand-icon-wrapper {
    width: 55px;
    height: 55px;
  }
  
  .brand-icon-wrapper i {
    font-size: 1.75rem;
  }
  
  .auth-form-title {
    font-size: 1.25rem;
  }
  
  .auth-form-subtitle {
    font-size: 0.8rem;
  }
  
  .auth-form-input {
    padding: 0.65rem 2.25rem 0.65rem 0.875rem;
    font-size: 0.85rem;
  }
  
  .auth-btn-primary {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }
  
  .feature-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 0.9rem;
  }
  
  .feature-text h4 {
    font-size: 0.8rem;
  }
  
  .feature-text p {
    font-size: 0.7rem;
  }
}

/* Touch-friendly enhancements for auth page */
@media (hover: none) and (pointer: coarse) {
  .auth-form-input,
  .auth-btn-primary,
  .auth-social-btn,
  .password-toggle,
  .auth-form-checkbox label {
    min-height: 44px;
  }
  
  /* Add active states for touch feedback */
  .auth-btn-primary:active,
  .auth-social-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
  .auth-section {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Landscape mode adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .auth-section {
    padding: 0.5rem 0;
  }
  
  .auth-card-container {
    min-height: auto;
  }
  
  .auth-brand-panel {
    padding: 1.5rem 1rem;
  }
  
  .auth-form-panel {
    padding: 1.5rem 1rem;
  }
  
  .auth-features {
    margin-top: 1rem;
  }
  
  .auth-feature-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
}


