/* ============================================================
   HEFZAK (حفظك) — wp-login.php Theme Override
   Matches /role-login/ Emerald & Gold Design System
   ============================================================ */

/* ---------- Design Tokens (aligned with modern-ui.css) ---------- */
body.login {
  --hfzk-primary-900: #022c22;
  --hfzk-primary-800: #064e3b;
  --hfzk-primary-700: #065f46;
  --hfzk-primary-600: #047857;
  --hfzk-primary-500: #059669;
  --hfzk-primary-400: #34d399;
  --hfzk-gold-600: #b8960c; 
  --hfzk-gold-500: #d4af37;
  --hfzk-gold-400: #e2c668;
  --hfzk-slate-800: #1e293b;
  --hfzk-slate-700: #334155;
  --hfzk-slate-600: #475569;
  --hfzk-slate-200: #e2e8f0;
  --hfzk-slate-50: #f8fafc;
  --hfzk-radius-md: 10px;
  --hfzk-radius-lg: 16px;
  --hfzk-radius-xl: 24px;
  --hfzk-radius-full: 9999px;
  --hfzk-font: 'IBM Plex Sans Arabic', 'Segoe UI', sans-serif;
}

/* ---------- Base & Background ---------- */
body.login {
  font-family: var(--hfzk-font) !important;
  background: linear-gradient(135deg, var(--hfzk-primary-900), var(--hfzk-primary-800)) !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
    /*background-image: url("https://hefzak.com/wp-content/uploads/2026/03/Untitled-design-17.png");*/
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

body.login::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- Login Wrapper (#login) ---------- */
body.login #login {
  width: 100%;
  max-width: 420px;
  padding: 0;
}

/* ---------- Logo ---------- */
body.login #login h1 a {
  display: block !important;
  width: auto !important;
  height: 72px !important;
  margin: 0 auto 1.5rem !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* ---------- User Type Message (under logo) ---------- */
body.login .user-type-message {
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 0 1.5rem !important;
    text-align: center;
    border-bottom: 1px solid #2271b1;
    display: table;
    padding-bottom: 4px;
    margin: 0 auto !important;
}

/* ---------- Form Card ---------- */
body.login #loginform,
body.login #registerform,
body.login #lostpasswordform {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 2px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--hfzk-radius-xl) !important;
  padding: 2rem 2rem 1.5rem !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

/* ---------- Form Labels ---------- */
body.login .login form label {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

/* ---------- Form Inputs ---------- */
body.login .login input[type="text"],
body.login .login input[type="password"],
body.login .login input[type="email"] {
  width: 100% !important;
  padding: 0.75rem 1rem !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--hfzk-radius-md) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  font-family: var(--hfzk-font) !important;
  font-size: 1rem !important;
  direction: rtl !important;
  transition: border-color 0.2s, background 0.2s !important;
}

body.login .login input[type="text"]::placeholder,
body.login .login input[type="password"]::placeholder,
body.login .login input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

body.login .login input[type="text"]:focus,
body.login .login input[type="password"]:focus,
body.login .login input[type="email"]:focus {
  border-color: var(--hfzk-gold-500) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* ---------- Submit Button ---------- */
body.login .login .button-primary {
  width: 100% !important;
  padding: 0.85rem 1.5rem !important;
  background: linear-gradient(135deg, var(--hfzk-gold-500), var(--hfzk-gold-600)) !important;
  border: none !important;
  border-radius: var(--hfzk-radius-full) !important;
  color: #022c22 !important;
  font-family: var(--hfzk-font) !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(184, 150, 12, 0.35) !important;
}

body.login .login .button-primary:hover,
body.login .login .button-primary:focus {
  background: linear-gradient(135deg, var(--hfzk-gold-400), var(--hfzk-gold-500)) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(184, 150, 12, 0.4) !important;
}

/* ---------- Links ---------- */
body.login #nav a,
body.login #backtoblog a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    transition: color 0.2s !important;
    font-weight: bolder;
    padding: 5px 15px;
    border-radius: 10px;
}

.login label,
.forgetmenot label {
    color: #fff;
    font-weight: bold;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
  color: var(--hfzk-gold-400) !important;
}

/* ---------- Messages & Errors ---------- */
body.login .message,
body.login .success {
  background: rgba(34, 197, 94, 0.2) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  border-radius: var(--hfzk-radius-md) !important;
  color: #000 !important;
  padding: 1rem !important;
  margin-bottom: 1.5rem !important;
}

body.login #login_error {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  border-radius: var(--hfzk-radius-md) !important;
  color: #fff !important;
  padding: 1rem !important;
  margin-bottom: 1.5rem !important;
}

/* ---------- Remember Me ---------- */
body.login .login .forgetmenot label {
  color: rgba(255, 255, 255, 0.8) !important;
}

body.login .login input[type="checkbox"] {
  accent-color: var(--hfzk-gold-500);
}

/* ---------- Back to site link ---------- */
body.login #backtoblog {
  margin-top: 1.5rem;
  text-align: center;
}

body.login #backtoblog a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Language Switcher ---------- */
body.login .language-switcher {
  margin-bottom: 1rem;
}

body.login .language-switcher label {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  body.login {
    padding: 1rem;
  }
  body.login #loginform,
  body.login #registerform,
  body.login #lostpasswordform {
    padding: 1.5rem 1.25rem !important;
  }
}
