/* Auth pages — v2 (paired with layouts/guest.php) */
:root {
  --login-bg: #020617;
  --login-text: #f1f5f9;
  --login-text-muted: #94a3b8;
  --login-accent: #3b82f6; /* Monjez Blue Lighter */
  --login-accent-hover: #60a5fa;
  --login-error: #ef4444;
  --login-success: #34d399; /* Monjez Emerald Lighter */
  --login-radius: 0.75rem;
  --login-font: 'Inter', 'Noto Sans Arabic', system-ui, sans-serif;
}

html:not(.dark) {
  --login-bg: #f8fafc;
  --login-text: #0f172a;
  --login-text-muted: #64748b;
  --login-accent: #0062ff; /* Monjez Blue */
  --login-accent-hover: #0052d9;
}

body.erp-login-page {
  margin: 0;
  background: var(--login-bg);
  color: var(--login-text);
  font-family: var(--login-font);
  -webkit-font-smoothing: antialiased;
}

.login-bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: var(--login-accent);
  animation: particleFloat 22s ease-in-out infinite;
}
.p1 { width: 320px; height: 320px; top: -8%; left: -6%; }
.p2 { width: 240px; height: 240px; bottom: 10%; right: -5%; animation-delay: -6s; }
.p3 { width: 180px; height: 180px; top: 35%; left: 40%; opacity: 0.05; animation-delay: -12s; }

@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -24px); }
}

.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}
.login-wrapper-single .login-panel-full {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.login-hero {
  display: none;
  flex: 1;
  padding: 3rem;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
@media (min-width: 1024px) {
  .login-hero { display: flex; }
}
html:not(.dark) .login-hero {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 55%, #eef2ff 100%);
}

.login-hero-inner { max-width: 28rem; }
.login-logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 98, 255, 0.3);
  overflow: hidden;
  padding: 0;
}
.login-logo img {
  width: 100%;
  height: 100%;
  display: block;
}
.login-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--login-text-muted);
  margin: 0 0 0.5rem;
}
.login-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  font-weight: 700;
}
.login-hero-desc {
  color: var(--login-text-muted);
  margin: 0;
  line-height: 1.6;
}

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--login-radius);
  padding: 1.75rem;
  backdrop-filter: blur(8px);
}
html:not(.dark) .login-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}
.login-card-header { margin-bottom: 1.25rem; }
.login-card-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.login-subtitle {
  margin: 0;
  color: var(--login-text-muted);
  font-size: 0.9rem;
}
.login-card-logo-mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
@media (min-width: 1024px) {
  .login-card-logo-mobile { display: none; }
}

.login-alert {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.login-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}
.login-alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.login-field { margin-bottom: 1rem; }
.login-field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--login-text-muted);
}
.login-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: var(--login-text);
  font-size: 1rem;
}
html:not(.dark) .login-field input {
  border-color: rgba(15, 23, 42, 0.16);
  background: #ffffff;
}
.login-field input:focus {
  outline: 2px solid var(--login-accent);
  outline-offset: 1px;
  border-color: transparent;
}

.login-password-wrap { position: relative; }
.login-password-wrap input { padding-right: 2.75rem; }
.login-toggle-pwd {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--login-text-muted);
  min-width: 40px;
  min-height: 40px;
  cursor: pointer;
}

.login-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}
.login-remember {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--login-text-muted);
}
.login-forgot {
  color: #93c5fd;
  text-decoration: none;
}
.login-forgot:hover { text-decoration: underline; }

.login-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--login-accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.login-submit:hover { background: var(--login-accent-hover); }

.login-back {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
}
.login-back a {
  color: #93c5fd;
  text-decoration: none;
}
.login-back a:hover { text-decoration: underline; }

html[dir="rtl"] .login-toggle-pwd {
  right: auto;
  left: 0.5rem;
}
html[dir="rtl"] .login-password-wrap input {
  padding-right: 0.85rem;
  padding-left: 2.75rem;
}
