/* -----------------------------------------------------------
   FastDrop - Register Page CSS
   iOS Style | Version 2.0
---------------------------------------------------------- */

/* ============================================================
   1. Fonts & Variables
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

:root {
  /* Brand Colors */
  --primary: #ff6b35;
  --primary-dark: #e55a2a;
  --primary-light: #FF8A5C;
  --secondary: #FF9500;

  /* Neutral Colors */
  --dark: #1C1C1E;
  --dark-gray: #2C2C2E;
  --light: #F9F9FB;
  --white: #FFFFFF;
  --gray-bg: #F2F2F7;
  --gray-text: #8E8E93;
  --gray-border: #E5E5EA;

  /* iOS System Colors */
  --ios-success: #34C759;
  --ios-error: #FF3B30;
  --ios-blue: #007AFF;
  --ios-warning: #FF9500;

  /* Shadows */
  --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 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 20px rgba(255, 107, 53, 0.25);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transition */
  --transition: all 0.2s ease;
}

/* ============================================================
   2. Reset & Base
============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: var(--gray-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

/* Hide Scrollbar */
::-webkit-scrollbar {
  display: none;
}

html,
body {
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   3. Flash Notifications (Toast)
============================================================ */
.flash-container {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: auto;
  max-width: 90%;
  pointer-events: none;
}

.flash-box {
  background: rgba(28, 28, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  animation: toastIn 0.3s ease;
}

.flash-box i {
  font-size: 16px;
}

.flash-container.error .flash-box i {
  color: var(--ios-error);
}

.flash-container.success .flash-box i {
  color: var(--ios-success);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px) translateX(-50%);
  }

  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

/* ============================================================
   4. Auth Container & Layout
============================================================ */
.auth-layout {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.auth-form-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px 32px;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   5. Brand Header
============================================================ */
.auth-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  background: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.brand-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 14px;
  color: var(--gray-text);
}

/* ============================================================
   6. Form Section
============================================================ */
.form-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* Form Grid */
.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

/* ============================================================
   7. Floating Inputs (iOS Style)
============================================================ */
.auth-form-group {
  position: relative;
  background: var(--gray-bg);
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: 1px solid transparent;
}

.auth-form-group:focus-within {
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Input & Select */
.auth-form-group input,
.auth-form-group select {
  width: 100%;
  padding: 20px 48px 8px 48px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  font-family: inherit;
  cursor: pointer;
}

/* Select specific */
.auth-form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
}

.auth-form-group select option[value=""][disabled] {
  color: var(--gray-text);
}

.auth-form-group select:invalid {
  color: var(--gray-text);
}

.auth-form-group select option {
  color: var(--dark);
  background: var(--white);
}

/* Label */
.auth-form-group label {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--gray-text);
  pointer-events: none;
  transition: var(--transition);
  font-weight: 400;
}

.auth-form-group input:focus~label,
.auth-form-group input:not(:placeholder-shown)~label,
.auth-form-group select:focus~label,
.auth-form-group select:not([value=""]):valid~label {
  top: 8px;
  font-size: 10px;
  color: var(--primary);
  font-weight: 500;
}

/* Icons */
.auth-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-text);
  font-size: 16px;
  pointer-events: none;
  z-index: 2;
}

.auth-password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-text);
  cursor: pointer;
  z-index: 10;
}

/* ============================================================
   8. Terms Checkbox
============================================================ */
.terms-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 8px 0;
}

.terms-checkbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.terms-checkbox label {
  font-size: 13px;
  color: var(--gray-text);
  cursor: pointer;
}

.terms-checkbox label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.terms-checkbox.error input {
  outline: 2px solid var(--ios-error);
  outline-offset: 2px;
}

/* ============================================================
   9. Buttons
============================================================ */
.auth-btn-register {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.auth-btn-register:active {
  transform: scale(0.98);
  background: var(--primary-dark);
}

/* Divider */
.auth-divider {
  margin: 24px 0;
  text-align: center;
  position: relative;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 0.5px;
  background: var(--gray-border);
}

.auth-divider span {
  background: var(--white);
  padding: 0 12px;
  position: relative;
  color: var(--gray-text);
  font-size: 12px;
}

/* Security Info */
.auth-security-info {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gray-text);
}

.auth-security-info i {
  color: var(--primary);
  font-size: 12px;
}

/* Footer Link */
.auth-footer-navigation {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--gray-text);
}

.auth-footer-navigation a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
/* ============================================================
   Instructions Steps
============================================================ */
.modal-instructions {
  margin: 20px 0;
  padding: 16px;
  background: var(--gray-bg);
  border-radius: 20px;
}

.instruction-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-border);
}

.instruction-step:last-child {
  border-bottom: none;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.step-text {
  flex: 1;
  font-size: 13px;
  color: var(--dark);
  text-align: right;
}

/* Modal Warning */
.modal-warning {
  margin: 16px 0 8px;
  padding: 10px;
  background: rgba(255, 107, 53, 0.08);
  border-radius: 12px;
  font-size: 11px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-warning i {
  font-size: 12px;
}

/* RTL Support for Instructions */
[dir="rtl"] .instruction-step {
  flex-direction: row-reverse;
}

[dir="rtl"] .step-text {
  text-align: left;
}

/* Responsive */
@media (max-width: 480px) {
  .instruction-step {
    gap: 10px;
    padding: 8px 0;
  }

  .step-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .step-text {
    font-size: 12px;
  }

  .modal-warning {
    font-size: 10px;
  }
}
/* ============================================================
   10. Modal Overlay
============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  display: flex;
}

/* ============================================================
   11. Modal Container
============================================================ */
.modal-container {
  width: 100%;
  max-width: 360px;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   12. Modal Content
============================================================ */
.modal-content {
  background: var(--white);
  border-radius: 32px;
  padding: 28px 24px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   13. Modal Icon
============================================================ */
.modal-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal-icon i {
  font-size: 32px;
  color: var(--white);
}

.modal-icon.success-icon {
  background: var(--ios-success);
}

/* ============================================================
   14. Modal Typography
============================================================ */
.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.modal-desc {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 20px;
  line-height: 1.4;
}

.modal-hint {
  font-size: 11px;
  color: var(--gray-text);
  margin-top: 12px;
}

/* ============================================================
   15. Phone Display
============================================================ */
.modal-phone-display {
  background: var(--gray-bg);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--dark);
}

.modal-phone-display i {
  color: var(--primary);
}

/* ============================================================
   16. Modal Section
============================================================ */
.modal-section {
  margin: 16px 0;
  padding: 12px;
  background: var(--gray-bg);
  border-radius: 20px;
}

.modal-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
}

.modal-section-title i {
  color: var(--primary);
}

/* ============================================================
   17. QR Code Container
============================================================ */
.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  background: var(--white);
  border-radius: 16px;
  padding: 12px;
}

.qr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-text);
}

.qr-loading i {
  font-size: 28px;
  color: var(--primary);
}

#qrCode {
  width: 120px;
  height: 120px;
  display: block;
}

#qrCode canvas {
  width: 120px !important;
  height: 120px !important;
}

/* ============================================================
   18. Link Container & Buttons
============================================================ */
.link-container {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-link-input {
  flex: 1;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  font-size: 11px;
  font-family: monospace;
  color: var(--dark);
  text-align: center;
  outline: none;
}

.modal-link-input:focus {
  border-color: var(--primary);
}

.copy-link-btn {
  width: 44px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}

.copy-link-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* WhatsApp Button */
.whatsapp-btn {
  width: 100%;
  padding: 12px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.whatsapp-btn:active {
  transform: scale(0.97);
}

/* ============================================================
   19. Modal Buttons
============================================================ */
.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.modal-btn-primary {
  background: var(--primary);
  color: white;
}

.modal-btn-primary:active {
  transform: scale(0.97);
  background: var(--primary-dark);
}

.modal-btn-secondary {
  background: var(--gray-bg);
  color: var(--dark);
}

.modal-btn-secondary:active {
  transform: scale(0.97);
  background: var(--gray-border);
}

/* ============================================================
   20. Success Modal
============================================================ */
.success-container .modal-content {
  text-align: center;
}

/* ============================================================
   21. Loading Spinner
============================================================ */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   22. Responsive (Mobile)
============================================================ */
@media (max-width: 560px) {
  body {
    padding: 16px;
    align-items: flex-start;
    padding-top: 30px;
  }

  .auth-form-container {
    padding: 20px 18px 28px;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .brand-title {
    font-size: 24px;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-logo img {
    width: 30px;
    height: 30px;
  }

  .auth-btn-register {
    padding: 12px 16px;
  }

  .auth-form-group input,
  .auth-form-group select {
    padding: 20px 42px 8px 42px;
  }

  .auth-icon {
    left: 14px;
  }

  .auth-password-toggle {
    right: 14px;
  }

  .auth-form-group label {
    right: 42px;
  }
}

/* Modal Responsive */
@media (max-width: 480px) {
  .modal-container {
    max-width: 320px;
  }

  .modal-content {
    padding: 24px 20px 28px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-icon {
    width: 56px;
    height: 56px;
  }

  .modal-icon i {
    font-size: 28px;
  }

  .modal-btn {
    padding: 12px;
    font-size: 15px;
  }

  .whatsapp-btn {
    padding: 10px;
    font-size: 13px;
  }

  #qrCode {
    width: 100px;
    height: 100px;
  }

  #qrCode canvas {
    width: 100px !important;
    height: 100px !important;
  }
}

/* ============================================================
   23. RTL Support (Arabic)
============================================================ */
[dir="rtl"] .auth-icon {
  left: auto;
  right: 16px;
}

[dir="rtl"] .auth-password-toggle {
  right: auto;
  left: 16px;
}

[dir="rtl"] .form-section-title {
  border-right: 3px solid var(--primary);
  border-left: none;
  padding-right: 12px;
  padding-left: 0;
}

[dir="rtl"] .terms-checkbox {
  flex-direction: row-reverse;
}

[dir="rtl"] .auth-form-group select {
  background-position: right 16px center;
}

[dir="rtl"] .auth-form-group label {
  right: auto;
  left: 48px;
}

[dir="rtl"] .modal-buttons {
  flex-direction: row-reverse;
}

[dir="rtl"] .modal-section-title {
  flex-direction: row-reverse;
}

[dir="rtl"] .link-container {
  flex-direction: row;
}
 /* ============================================================
           تنسيقات مودال التحقق (OTP) - iOS Style
        ============================================================ */
 .modal-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.5);
   backdrop-filter: blur(8px);
   -webkit-backdrop-filter: blur(8px);
   display: none;
   align-items: center;
   justify-content: center;
   z-index: 20000;
   padding: 20px;
   opacity: 0;
   visibility: hidden;
   transition: all 0.3s ease;
 }

 .modal-overlay.active {
   opacity: 1;
   visibility: visible;
   display: flex;
 }

 .modal-container {
   width: 100%;
   max-width: 380px;
   animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
 }

 @keyframes modalSlideUp {
   from {
     opacity: 0;
     transform: translateY(40px) scale(0.95);
   }

   to {
     opacity: 1;
     transform: translateY(0) scale(1);
   }
 }

 .modal-content {
   background: #ffffff;
   border-radius: 28px;
   padding: 32px 24px 28px;
   text-align: center;
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
 }

 .modal-icon {
   width: 72px;
   height: 72px;
   background: linear-gradient(135deg, #007AFF, #0055CC);
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   margin: 0 auto 16px;
   box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
 }

 .modal-icon i {
   font-size: 32px;
   color: #ffffff;
 }

 .modal-icon.success-icon {
   background: linear-gradient(135deg, #34C759, #28A745);
   box-shadow: 0 8px 24px rgba(52, 199, 89, 0.3);
 }

 .modal-title {
   font-size: 22px;
   font-weight: 700;
   color: #1C1C1E;
   margin-bottom: 6px;
   letter-spacing: -0.5px;
 }

 .modal-desc {
   font-size: 14px;
   color: #8E8E93;
   margin-bottom: 24px;
   line-height: 1.5;
 }

 /* حقول OTP */
 .otp-inputs-container {
   display: flex;
   justify-content: center;
   gap: 10px;
   margin: 20px 0 24px;
   direction: ltr;
 }

 .otp-field {
   width: 48px;
   height: 56px;
   font-size: 24px;
   font-weight: 700;
   text-align: center;
   border-radius: 12px;
   border: 2px solid #D1D1D6;
   background-color: #F2F2F7;
   color: #1C1C1E;
   transition: all 0.2s ease;
 }

 .otp-field:focus {
   border-color: #007AFF;
   background-color: #FFFFFF;
   box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
   outline: none;
 }

 .otp-field.error {
   border-color: #FF3B30;
   background-color: #FFEBEE;
   animation: shake 0.3s ease;
 }

 @keyframes shake {

   0%,
   100% {
     transform: translateX(0);
   }

   20% {
     transform: translateX(-8px);
   }

   40% {
     transform: translateX(8px);
   }

   60% {
     transform: translateX(-4px);
   }

   80% {
     transform: translateX(4px);
   }
 }

 .error-message-pop {
   color: #FF3B30;
   font-size: 13px;
   margin-top: 8px;
   display: none;
   font-weight: 500;
   padding: 8px 12px;
   background: #FFEBEE;
   border-radius: 8px;
 }

 /* أزرار */
 .modal-btn-primary {
   background: #007AFF;
   color: #FFFFFF;
   width: 100%;
   border: none;
   padding: 14px 20px;
   border-radius: 12px;
   font-size: 16px;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s ease;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
 }

 .modal-btn-primary:disabled {
   background: #A2A2A7;
   cursor: not-allowed;
 }

 .modal-btn-primary:not(:disabled):hover {
   background: #0055CC;
   transform: scale(1.02);
 }

 .modal-btn-primary:not(:disabled):active {
   transform: scale(0.97);
 }

 .modal-btn-secondary {
   background: transparent;
   color: #007AFF;
   width: 100%;
   border: none;
   padding: 14px 20px;
   border-radius: 12px;
   font-size: 16px;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s ease;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
 }

 .modal-btn-secondary:hover {
   background: rgba(0, 122, 255, 0.08);
 }

 .modal-buttons {
   margin-top: 8px;
 }

 /* إعادة إرسال */
 .resend-container {
   margin-top: 16px;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   font-size: 13px;
   color: #8E8E93;
 }

 .resend-btn {
   background: none;
   border: none;
   color: #007AFF;
   font-weight: 600;
   cursor: pointer;
   font-size: 13px;
   padding: 4px 8px;
 }

 .resend-btn:disabled {
   color: #A2A2A7;
   cursor: not-allowed;
 }

 .resend-btn:not(:disabled):hover {
   text-decoration: underline;
 }

 .timer-text {
   color: #8E8E93;
   font-weight: 500;
 }