/* ============================================================
   SEIFCO - Login Page Styles (Mobile Responsive Fixed)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport for mobile */
  background: linear-gradient(135deg, #0f2540 0%, #1a3c5e 50%, #1e4d78 100%);
  position: relative;
  overflow-x: hidden;
}

/* Decorative shapes */
body::before {
  content: '';
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(201,147,58,.07);
  top: -120px; left: -120px;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -80px; right: -80px;
  pointer-events: none;
}

/* ── Page wrapper ───────────────────────────────────────── */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
}

/* ── Login Card ─────────────────────────────────────────── */
.login-wrapper {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  width: 100%;
}

/* ── Logo ───────────────────────────────────────────────── */
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #1a3c5e, #234f7d);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(26,60,94,.3);
}

.login-logo-icon i { font-size: 1.8rem; color: #c9933a; }

.login-brand {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1a3c5e;
  letter-spacing: 1px;
  line-height: 1.1;
}

.login-subtitle {
  font-size: .82rem;
  color: #64748b;
  margin-top: 5px;
}

/* ── Form ───────────────────────────────────────────────── */
.login-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  text-align: center;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: .9rem;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 11px 38px 11px 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-family: 'Cairo', sans-serif;
  font-size: .92rem;
  color: #1e293b;
  background: #f8fafc;
  transition: all .2s;
  direction: rtl;
  text-align: right;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: #1a3c5e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,60,94,.1);
}

.form-control::placeholder { color: #b0b9c6; }

/* Password toggle */
.toggle-pass {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: .9rem;
  padding: 4px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.toggle-pass:hover { color: #1a3c5e; }

/* ── Submit Button ──────────────────────────────────────── */
.btn-login {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a3c5e, #234f7d);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(26,60,94,.3);
  -webkit-appearance: none;
  touch-action: manipulation;
}

.btn-login:hover {
  background: linear-gradient(135deg, #234f7d, #2a5f90);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26,60,94,.4);
}

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

/* ── Alert Error ────────────────────────────────────────── */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Footer ─────────────────────────────────────────────── */
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .76rem;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════════════════════════════════ */

/* Large phones */
@media (max-width: 480px) {
  .login-page   { padding: 12px; justify-content: center; }
  .login-card   { padding: 30px 22px; border-radius: 16px; }
  .login-brand  { font-size: 1.5rem; }

  .login-logo-icon {
    width: 60px; height: 60px;
    border-radius: 14px;
  }
  .login-logo-icon i { font-size: 1.6rem; }
  .login-logo  { margin-bottom: 22px; }

  .form-control { font-size: .9rem; padding: 11px 36px 11px 38px; }
  .btn-login    { font-size: .92rem; padding: 12px; }
}

/* Small phones */
@media (max-width: 360px) {
  .login-card   { padding: 24px 18px; }
  .login-brand  { font-size: 1.35rem; }
  .form-control { font-size: .88rem; }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .login-page  { justify-content: flex-start; padding-top: 12px; }
  .login-logo  { margin-bottom: 14px; }
  .login-logo-icon { width: 50px; height: 50px; }
  .login-logo-icon i { font-size: 1.4rem; }
  .login-brand { font-size: 1.3rem; }
  .login-subtitle { display: none; }
  .login-card  { padding: 20px 22px; }
  .form-group  { margin-bottom: 12px; }
}