/* ===== الخطوط والمتغيرات ===== */
@font-face {
    font-family: 'FrutigerArabic';
    src: url('https://raw.githubusercontent.com/KSA2060/assets/main/FrutigerLTArabic-65Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
  
  :root {
    --primary: #00B9AD;
    --primary-2: #00d4c4;
    --bg-primary: #0b1f1e;
    --bg-secondary: #0e2f2c;
    --bg-gradient: linear-gradient(135deg, #061a19, #0e2f2c);
    --glass: rgba(255, 255, 255, 0.10);
    --glass-card: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    --text-primary: #eaf4f3;
    --text-secondary: #c9e2df;
    --text-muted: #a7c3bf;
    --border-strong: rgba(255, 255, 255, 0.18);
    --border-soft: rgba(255, 255, 255, 0.10);
    --success: #10b981;
    --danger: #ef4444;
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .35);
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --transition-normal: .3s ease;
  }
  
  /* ===== الأساسيات ===== */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html, body {
    height: 100%;
  }
  
  body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    font-family: 'FrutigerArabic', 'Tajawal', system-ui, -apple-system, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
  }
  
  /* خلفية متحركة */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
      radial-gradient(1000px 700px at 20% 50%, rgba(0, 185, 173, 0.15) 0%, transparent 60%),
      radial-gradient(900px 600px at 80% 20%, rgba(0, 212, 196, 0.12) 0%, transparent 60%);
    animation: bgMove 20s ease-in-out infinite;
  }
  
  @keyframes bgMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -15px); }
  }
  
  /* ===== الحاوية الرئيسية ===== */
  .login-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
  }
  
  .login-card {
    background: var(--glass-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
  }
  
  /* ===== الرأس ===== */
  .login-header {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .login-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 8px;
  }
  
  .login-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
  }
  
  /* ===== النموذج ===== */
  .login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .form-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .form-label i {
    width: 16px;
    height: 16px;
    color: var(--primary);
  }
  
  .input-container {
    position: relative;
  }
  
  .form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 16px;
    font-weight: 600;
    transition: all var(--transition-normal);
    backdrop-filter: blur(8px);
  }
  
  .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 185, 173, 0.20);
    background: rgba(255, 255, 255, 0.08);
  }
  
  .form-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
  }
  
  .password-toggle {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all var(--transition-normal);
  }
  
  .password-toggle:hover {
    color: var(--primary);
    background: rgba(0, 185, 173, 0.1);
  }
  
  .password-toggle i {
    width: 18px;
    height: 18px;
  }
  
  /* ===== زر تسجيل الدخول ===== */
  .login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #052826;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
  }
  
  .login-btn:hover {
    box-shadow: 0 12px 30px rgba(0, 185, 173, 0.4);
    transform: translateY(-2px);
  }
  
  .login-btn:active {
    transform: translateY(0);
  }
  
  .login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
  }
  
  .btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--transition-normal);
  }
  
  .btn-content i {
    width: 20px;
    height: 20px;
  }
  
  .btn-loader {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
  }
  
  .login-btn.loading .btn-content {
    opacity: 0;
  }
  
  .login-btn.loading .btn-loader {
    display: flex;
  }
  
  .spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(5, 40, 38, 0.3);
    border-top: 2px solid #052826;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* ===== رسائل الحالة ===== */
  .status-message {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
  }
  
  .status-message.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  .status-message.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
  }
  
  .status-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
  }
  
  .status-message i {
    width: 16px;
    height: 16px;
  }
  
  /* ===== الاستجابة ===== */
  @media (max-width: 480px) {
    .login-container {
      padding: 16px;
    }
    
    .login-card {
      padding: 30px 24px;
    }
    
    .login-title {
      font-size: 24px;
    }
    
    .form-input {
      padding: 14px 18px;
      font-size: 15px;
    }
    
    .login-btn {
      padding: 16px;
      font-size: 15px;
      min-height: 56px;
    }
  }
  
  /* ===== تأثيرات إضافية ===== */
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
  }
  
  .form-input.error {
    border-color: var(--danger) !important;
    animation: shake 0.5s ease-in-out;
  }
  
  /* ===== تحسينات الوصولية ===== */
  button:focus-visible,
  input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }
  
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }