.login-page,
.register-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.login-wrapper {
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* الصندوق الرئيسي لتسجيل الدخول */
.login-container,
.register-container {
  background: white;
  padding: 50px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(2, 62, 115, 0.15);
  width: 100%;
  max-width: 450px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #023E73;
}

/* رأس الصفحة */
.login-header {
  margin-bottom: 35px;
  text-align: center;
}

.logo-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-title {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin: 0;
  letter-spacing: -0.5px;
}


/* النموذج */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* رسالة الخطأ */
.error-message {
  background: #fee;
  color: #c33;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #fcc;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.error-text {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

/* حقول النموذج */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s;
  background: #f8f9fa;
  color: #333;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #023E73;
  background: white;
  box-shadow: 0 0 0 4px rgba(2, 62, 115, 0.1);
}

.form-input::placeholder {
  color: #adb5bd;
}

/* input with action wrapper (show password) */
.input-with-action { position: relative; display: flex; align-items: center; }
.input-with-action .form-input { padding-left: 46px; }
.show-pass-btn {
  position: absolute;
  left: 10px; /* RTL layout: icon on left */
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 18px;
  padding: 6px;
  cursor: pointer;
  color: #495057;
  border-radius: 8px;
}
.show-pass-btn:hover { background: rgba(0,0,0,0.03); color: #212529; }

/* قسم نسيان كلمة المرور */
.forgot-password-section {
  display: flex;
  justify-content: flex-end;
  margin-top: -5px;
  margin-bottom: 5px;
}

.forgot-password-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #023E73;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.3s;
  padding: 3px 0;
}

.forgot-password-link:hover:not(.disabled) {
  color: #012D52;
  text-decoration: underline;
}

.forgot-password-link.disabled {
  color: #adb5bd;
  cursor: not-allowed;
  opacity: 0.7;
}

/* زر الإرسال */
.submit-button {
  width: 100%;
  padding: 14px 22px;
  background: #023E73;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  box-shadow: 0 8px 24px rgba(2, 62, 115, 0.15);
}

.submit-button:hover:not(:disabled) {
  background: #012D52;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(2, 62, 115, 0.18);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}


.button-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* قسم التسجيل */
.register-section {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.register-text {
  color: #6c757d;
  font-size: 15px;
  margin: 0;
}

.register-link,
.login-link {
  color: #023E73;
  text-decoration: none;
  font-weight: 600;
  margin-right: 5px;
  transition: all 0.3s;
}

.register-link:hover,
.login-link:hover {
  color: #012D52;
  text-decoration: underline;
}

/* ملاحظات كلمة المرور */
.password-note {
  color: #6c757d;
  font-size: 13px;
  margin-top: 5px;
  display: block;
}

/* مؤشر قوة كلمة المرور */
.password-strength {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-strength[aria-hidden="true"] {
  display: none;
}

.strength-bar {
  height: 6px;
  width: 100%;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.strength-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6b6b, #ffc107, #023E73);
  transition: width 0.3s ease;
}

.strength-text {
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
}

.strength-value {
  font-weight: 600;
}

/* تحسينات إضافية لصفحة التسجيل */
.register-container h1 {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin: 0 0 30px 0;
  text-align: center;
  letter-spacing: -0.5px;
}

.register-container form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-link {
  text-align: center;
  margin-top: 20px;
  color: #6c757d;
  font-size: 15px;
}

/* رسالة استخدام الحاسوب أو الهاتف */
/* نافذة منبثقة للملاحظة - مخفية على الحاسوب */
.device-info-overlay {
  display: none; /* مخفي على الحاسوب */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.device-info-box {
  background: white;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2px solid #023E73;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

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

.device-info-close {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f0f0;
  border: 2px solid #ddd;
  color: #666;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1;
}

.device-info-close:hover {
  background: #e0e0e0;
  border-color: #bbb;
  color: #333;
  transform: rotate(90deg);
}

.device-info-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.device-info-title {
  color: #023E73;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.device-info-text {
  color: #333;
  line-height: 1.8;
  margin-bottom: 30px;
  font-size: 17px;
  font-weight: 400;
}

.device-info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #023E73 0%, #035D9C 100%);
}

.btn-start-phone {
  padding: 16px 32px;
  background: linear-gradient(135deg, #F27052 0%, #d45e3e 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(242, 112, 82, 0.4);
  width: 100%;
  justify-content: center;
}

.btn-start-phone:hover {
  background: #d45e3e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(242, 112, 82, 0.4);
}

.btn-start-phone:active {
  transform: translateY(0);
}


/* التصميم المتجاوب */
@media (max-width: 768px) {
  /* إظهار النافذة المنبثقة على الهاتف فقط */
  .device-info-overlay {
    display: flex;
  }
  
  .login-page {
    padding: 15px;
  }

  .login-container,
  .register-container {
    padding: 35px 25px;
    border-radius: 16px;
  }

  .login-title {
    font-size: 26px;
  }

  .login-subtitle {
    font-size: 14px;
  }

  .form-input {
    padding: 13px 18px;
    font-size: 15px;
  }

  .submit-button {
    padding: 14px 20px;
    font-size: 16px;
  }

  .device-info-box {
    padding: 25px 20px;
    border-radius: 16px;
  }
  
  .device-info-text {
    font-size: 14px;
  }
  
  .btn-start-phone {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .login-container,
  .register-container {
    padding: 30px 20px;
  }

  .login-title {
    font-size: 24px;
  }

  .form-group {
    gap: 8px;
  }

  .form-label {
    font-size: 14px;
  }
}


