/* iOS 18/17 Professional Login Theme */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --primary: #ff6b35;
  --primary-light: #ff8c5f;
  --secondary: #1a936f;
  --secondary-light: #2bb58d;
  --accent: #114b5f;
  --accent-light: #1c6a8a;
  --light: #f9f7f3;
  --dark: #2a2d34;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ios-bg: #f2f2f7;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --primary-grad: linear-gradient(135deg, #ff6b35 0%, #ff9f1c 100%);
  --accent-blue: #007aff;
  --sidebar-width: 280px;
  --ios-red: #ff3b30;
  --ios-green: #34c759;
  --ios-gray: #8e8e93;
  --ios-light-gray: #e5e5ea;
  --ios-dark: #1c1c1e;
  --ios-card-bg: rgba(255, 255, 255, 0.9);
  --ios-blur: blur(20px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ios-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  color: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* iPhone screen container */
.iphone-screen {
  width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: 2.5rem;
  overflow: hidden;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3);
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Auth Header */
.auth-header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;

}
.auth-header img{
    width: 150px;
}
.auth-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.auth-header p {
  color: var(--ios-gray);
  font-size: 1rem;
  font-weight: 400;
}

/* iOS Card */
.ios-card {
  background: var(--ios-card-bg);
  backdrop-filter: var(--ios-blur);
  border-radius: 1.5rem;
  margin: 0 1.5rem 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--glass-border);
}

/* Form Elements */
.ios-input-group {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2rem;
}

/* الحاوية الكلية للحقل والاسم */
.ios-input-field {
    display: flex;
    flex-direction: column;
    
    position: relative;
}

/* التسمية العلوية (Label) */
.ios-input-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    margin-left: 0.8rem;
}

.ios-input-field input {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--ios-light-gray);
  border-radius: 0.85rem;
  padding: 0.9rem 1.0rem 0.9rem 2.8rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--dark);
  transition: var(--transition);
  outline: none;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.ios-input-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.02);
  background: white;
}

.ios-input-field .icon {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 1.2rem;
  color: var(--ios-gray);
  transition: color 0.3s ease;
  pointer-events: none;
}

.ios-input-field input:focus + i {
  color: var(--primary);
}
/* الحاوية التي تضم الحقل والأيقونات (السر في هذا التغليف) */
.password-wrapper {
    position: relative; /* مرجع الأيقونات هو الحقل فقط وليس الاسم */
    display: flex;
    align-items: center;
    width: 100%;
}
/* الحقل بأسلوب آيفون */
.password-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--ios-light-gray);
    border-radius: 1.2rem;
    /* بادينج يسار 2.8rem للأيقونة، وبادينج يمين 3rem للزر */
    padding: 0.9rem 3rem 0.9rem 2.8rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--dark);
    transition: var(--transition);
    outline: none;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* حالة التركيز (Focus) */
.password-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.02);
    background: white;
}
/* الأيقونة اليسرى (داخل الحقل) */
.field-icon-left {
    position: absolute;
    left: 1rem;
    top: 50%; /* توسيط عمودي بالنسبة للحقل فقط */
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--ios-gray);
    z-index: 2;
    pointer-events: none; /* لكي لا تمنع الضغط على الحقل */
    transition: color 0.3s ease;
}
/* زر العين (الحل النهائي للضغط) */
#togglePassword {
    position: absolute;
    right: 0.8rem;
    top: 50%; /* توسيط عمودي بالنسبة للحقل فقط */
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 8px; /* منطقة ضغط مريحة للآيفون */
    z-index: 10; /* فوق كل شيء لضمان الاستجابة */
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    font-size:1.2rem ;
}

/* تفاعل الألوان عند الكتابة */
.password-wrapper input:focus ~ .field-icon-left {
    color: var(--primary);
}

/* استجابة الزر عند اللمس */
#togglePassword:active {
    opacity: 0.4;
    transform: translateY(-50%) scale(0.9);
}

/* حالة التركيز (Focus) على الحقل */
.ios-input-field input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}
/* Activation field animation */
.activation-field {
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Primary Button */
.ios-btn-primary {
  background: var(--primary-grad);
  border: none;
  border-radius: 0.8rem;
  padding: 1rem;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
  letter-spacing: 0.3px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ios-btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(255, 107, 53, 0.4);
}

.ios-btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Auth Links */
.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 1.5rem 2rem;
  text-align: center;
}

.ios-link-secondary {
  color: var(--dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.ios-link-secondary span {
  color: var(--primary);
  font-weight: 600;
  position: relative;
}

.ios-link-secondary span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--primary-grad);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.ios-link-secondary:hover span::after {
  transform: scaleX(1);
}

.ios-link-muted {
  color: var(--ios-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  border-bottom: 1px dashed transparent;
}

.ios-link-muted:hover {
  color: var(--primary);
  border-bottom-color: var(--primary-light);
}

/* iOS Notification Container (Alerts) */
.ios-notification-container {
  padding: 0.5rem 1.5rem 0;
  max-width: 400px;
  margin: 0 auto;
}

.ios-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1.2rem;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
  animation: alertSlide 0.3s ease-out;
}

@keyframes alertSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ios-alert.error {
  background: rgba(255, 59, 48, 0.15);
  border-color: rgba(255, 59, 48, 0.3);
  color: #c41e1e;
}

.ios-alert.success {
  background: rgba(52, 199, 89, 0.15);
  border-color: rgba(52, 199, 89, 0.3);
  color: #1e7b3c;
}

.ios-alert i {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ios-alert.error i {
  color: var(--ios-red);
}

.ios-alert.success i {
  color: var(--ios-green);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .iphone-screen {
    border-radius: 2rem;
  }
  
  .auth-header h1 {
    font-size: 2rem;
  }
  
  .ios-card {
    margin: 0 1rem 1rem;
    padding: 1.25rem;
  }
  
  .ios-input-field input {
    padding: 0.8rem 1rem 0.8rem 2.5rem;
  }
  
  .ios-alert {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }
}

