/**
 * Bayan — authentication shell (login / register / password reset).
 * Split-screen: branded hero panel + form panel. No build step exists, so
 * this is hand-authored CSS. RTL-aware (the flex row mirrors automatically
 * under dir="rtl", placing the hero on the right for Arabic).
 */

:root {
  --bayan-grad-from: #6366f1;
  --bayan-grad-to: #3b82f6;
  --bayan-ink: #0f172a;
  --bayan-muted: #64748b;
  --bayan-surface: #f1f5f9;
}

/* Neutralise the legacy full-page gradient from extracss_auth. */
body.bayan-auth-body {
  background: var(--bayan-surface) !important;
  margin: 0;
}
body.bayan-auth-body h1 { color: inherit; }

.bayan-auth {
  display: flex;
  min-height: 100vh;
  width: 100%;
  font-family: var(--lubda-font, "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif);
}

/* ---------------------------------------------------------------- Hero ---- */
.bayan-auth__hero {
  position: relative;
  flex: 0 0 42%;
  max-width: 560px;
  padding: 3rem 3rem 2.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--bayan-grad-from) 0%, var(--bayan-grad-to) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
/* Soft decorative blobs. */
.bayan-auth__hero::before,
.bayan-auth__hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(2px);
  pointer-events: none;
}
.bayan-auth__hero::before { width: 320px; height: 320px; top: -90px; inset-inline-end: -120px; }
.bayan-auth__hero::after  { width: 220px; height: 220px; bottom: -80px; inset-inline-start: -70px; background: rgba(255,255,255,0.08); }

.bayan-hero__top { position: relative; z-index: 1; }
.bayan-hero__center { position: relative; z-index: 1; margin: auto 0; }
.bayan-hero__tagline {
  font-size: 1.35rem;
  line-height: 1.7;
  font-weight: 600;
  max-width: 22rem;
  margin: 0;
}
.bayan-hero__features {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 0.65rem;
}
.bayan-hero__features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}
.bayan-hero__features li i { opacity: 0.9; }
.bayan-hero__foot {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ----------------------------------------------------------- Wordmark ---- */
.bayan-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.bayan-wordmark__ar {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
}
.bayan-wordmark__en {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ------------------------------------------------------------- Form ------ */
.bayan-auth__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bayan-surface);
}
.bayan-auth__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.6rem;
  flex-wrap: wrap;
}
.bayan-auth__topbar .bayan-wordmark { color: var(--bayan-ink); display: none; }
.bayan-topbar__links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-inline-start: auto;
}
.bayan-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bayan-muted);
  text-decoration: none;
}
.bayan-link:hover { color: var(--bayan-ink); }
.bayan-btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1.1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bayan-ink);
  text-decoration: none;
  transition: all 0.15s ease;
}
.bayan-btn-ghost:hover { border-color: var(--bayan-grad-to); color: var(--bayan-grad-to); }

/* Language switcher sits on the light topbar -> dark text. */
.bayan-auth__topbar .tw-dw-dropdown > summary { color: var(--bayan-ink) !important; }
.bayan-auth__topbar .tw-dw-dropdown > summary:hover { color: var(--bayan-grad-to) !important; }

.bayan-auth__body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem 3rem;
  overflow-y: auto;
}
.bayan-auth__inner {
  width: 100%;
  max-width: 26rem;
}
.bayan-auth__inner--wide { max-width: 56rem; }

/* Card used by the auth pages. */
.bayan-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  border: 1px solid #e7ebf0;
  padding: 1.75rem;
}
.bayan-card__head { text-align: center; margin-bottom: 1.25rem; }
.bayan-card__title { font-size: 1.3rem; font-weight: 700; color: var(--bayan-ink); margin: 0; }
.bayan-card__sub { font-size: 0.9rem; color: var(--bayan-muted); margin: 0.35rem 0 0; }

/* ------------------------------------------------------- Responsive ------ */
@media (max-width: 991px) {
  .bayan-auth__hero { flex-basis: 38%; padding: 2rem; }
  .bayan-hero__tagline { font-size: 1.15rem; }
}
@media (max-width: 767px) {
  .bayan-auth { flex-direction: column; }
  .bayan-auth__hero { display: none; }
  .bayan-auth__topbar .bayan-wordmark { display: inline-flex; }
  .bayan-auth__topbar .bayan-wordmark__ar { font-size: 1.5rem; }
  .bayan-auth__topbar .bayan-wordmark__en { display: none; }
  .bayan-card { padding: 1.25rem; box-shadow: 0 6px 20px -12px rgba(15,23,42,.2); }
  .bayan-auth__body { padding: 0.5rem 1rem 2rem; }
}
