/* ============================================================================
   auth.css — shared professional design system for the authentication pages
   (Sign in · Register · Forgot password · Reset password)
   Split-panel layout: a branded panel + a clean form panel. RTL-aware.
   ========================================================================== */

:root {
  --auth-primary: #4f46e5;
  --auth-primary-2: #7c3aed;
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-line: #e2e8f0;
  --auth-bg: #f1f5f9;
  --auth-danger: #dc2626;
  --auth-ok: #16a34a;
}

.auth-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 100% -10%, #ede9fe 0%, transparent 55%),
    radial-gradient(1000px 500px at -10% 110%, #e0e7ff 0%, transparent 55%),
    var(--auth-bg);
  font-family: 'Tajawal', 'Inter', sans-serif;
}

/* ── Shell: two panels side by side ─────────────────────────────────────── */
.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  max-width: 940px;
  min-height: 580px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(30, 27, 75, .35);
  animation: authRise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes authRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── Brand panel ────────────────────────────────────────────────────────── */
.auth-brand {
  position: relative;
  padding: 46px 42px;
  color: #fff;
  background: linear-gradient(150deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-brand::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(300px 300px at 85% 15%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(260px 260px at 10% 90%, rgba(255,255,255,.10), transparent 60%);
  pointer-events: none;
}
.auth-brand-logo {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 26px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.auth-brand-logo img { width: 40px; height: 40px; object-fit: contain; }
.auth-brand h2 { font-size: 26px; font-weight: 800; line-height: 1.3; margin: 0 0 12px; position: relative; }
.auth-brand p  { font-size: 14.5px; opacity: .85; line-height: 1.7; margin: 0 0 30px; position: relative; }
.auth-feats { list-style: none; padding: 0; margin: auto 0 0; position: relative; }
.auth-feats li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 14px; }
.auth-feats i {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.auth-feats b { display: block; font-weight: 700; margin-bottom: 1px; }
.auth-feats span { opacity: .8; font-size: 12.5px; }

/* ── Form panel ─────────────────────────────────────────────────────────── */
.auth-form-panel {
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-head { margin-bottom: 26px; }
.auth-head h1 { font-size: 24px; font-weight: 800; color: var(--auth-ink); margin: 0 0 6px; }
.auth-head p  { font-size: 14px; color: var(--auth-muted); margin: 0; }

.auth-field { margin-bottom: 16px; }
.auth-field > label {
  display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px;
}
.auth-input { position: relative; }
.auth-input > i.lead {
  position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: 15px; transition: color .2s;
}
.auth-input .form-control {
  height: 52px;
  border: 1.6px solid var(--auth-line);
  border-radius: 12px;
  padding-inline: 44px 44px;
  font-size: 14.5px;
  background: #f8fafc;
  transition: border-color .2s, box-shadow .2s, background .2s;
  width: 100%;
}
.auth-input .form-control:focus {
  outline: none;
  border-color: var(--auth-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
.auth-input:focus-within > i.lead { color: var(--auth-primary); }
.auth-input .form-control::placeholder { color: #a3adbd; }
.auth-toggle {
  position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer; padding: 6px; font-size: 15px;
}
.auth-toggle:hover { color: var(--auth-primary); }

.auth-btn {
  height: 52px; width: 100%;
  border: none; border-radius: 12px;
  font-size: 15.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-2));
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, .5);
  transition: transform .15s, box-shadow .2s, opacity .2s;
  margin-top: 6px;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(79, 70, 229, .6); }
.auth-btn:active { transform: none; }
.auth-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.auth-alt { text-align: center; font-size: 13.5px; color: var(--auth-muted); margin-top: 20px; }
.auth-alt a { color: var(--auth-primary); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-sep { display: inline-block; margin: 0 8px; color: #cbd5e1; }

.auth-note {
  border-radius: 12px; padding: 11px 14px; font-size: 13px; margin-bottom: 14px;
  display: none; word-break: break-word; line-height: 1.6;
}
.auth-note.show { display: block; }
.auth-note.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-note.ok  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.auth-foot { margin-top: 26px; text-align: center; font-size: 12px; color: #94a3b8; }

#fingerprintSection { margin-top: 14px; }
#status { color: var(--auth-muted); font-size: 13px; text-align: center; }

/* ── Responsive: stack, hide brand panel on small screens ───────────────── */
@media (max-width: 800px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; min-height: 0; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 38px 28px; }
}
