/* Rewaq — login page, matching rewaqcorp.sa (dark navy grid hero, cyan accents, white rounded card) */

body[data-path="login"] {
  min-height: 100vh;
  font-family: var(--rq-font);
  color: var(--rq-on-dark);
  background:
    radial-gradient(900px 520px at 85% 0%, rgba(22, 142, 232, .30), transparent 60%),
    radial-gradient(700px 520px at 0% 100%, rgba(57, 217, 237, .14), transparent 60%),
    linear-gradient(180deg, var(--rq-navy-900) 0%, var(--rq-navy-950) 100%) fixed;
}
body[data-path="login"]::before {
  /* blueprint grid like the website hero */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(143, 194, 237, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 194, 237, .10) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
}
body[data-path="login"] .web-footer,
body[data-path="login"] .page-breadcrumbs,
body[data-path="login"] .page-header-wrapper,
body[data-path="login"] .navbar,
body[data-path="login"] header { display: none !important; }

/* ---------- top bar ---------- */
.rq-topbar {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 32px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rq-brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.rq-brand .mark {
  width: 44px; height: 44px; border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(57, 217, 237, .12);
}
.rq-brand .mark img { width: 36px; height: 36px; object-fit: contain; }
.rq-brand b { display: block; color: #fff; font-family: var(--rq-font-ar); font-size: 16px; font-weight: 700; line-height: 1.2; }
.rq-brand span { display: block; color: var(--rq-on-dark-soft); font-family: var(--rq-font-ar); font-size: 11.5px; }
.rq-site {
  color: var(--rq-on-dark) !important; text-decoration: none !important; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 16px;
  transition: background .15s, border-color .15s;
}
.rq-site:hover { background: rgba(255, 255, 255, .06); border-color: rgba(57, 217, 237, .5); }

/* ---------- layout ---------- */
body[data-path="login"] #page-login { position: relative; z-index: 1; }
body[data-path="login"] #page-login > .page-content-wrapper { display: none; } /* moved into .rq-stage by JS */
.rq-stage {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 32px) 40px;
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  min-height: calc(100vh - 90px);
}

/* ---------- hero copy (Arabic, right side like the website) ---------- */
.rq-copy { direction: rtl; text-align: right; font-family: var(--rq-font-ar); }
.rq-eyebrow { color: var(--rq-cyan-400); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 12px; justify-content: flex-start; }
.rq-eyebrow::after { content: ""; width: 36px; height: 1.5px; background: var(--rq-cyan-400); opacity: .7; }
.rq-title { font-size: clamp(38px, 4.6vw, 62px); line-height: 1.18; font-weight: 700; color: #fff; margin: 18px 0 0; }
.rq-title em {
  font-style: normal; display: block;
  background: var(--rq-grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rq-lead { margin-top: 20px; color: var(--rq-on-dark-soft); font-size: 16px; line-height: 1.95; max-width: 560px; }
.rq-lead b { color: var(--rq-on-dark); font-weight: 600; font-family: var(--rq-font); }
.rq-pills { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; color: var(--rq-on-dark-soft); font-size: 13.5px; }
.rq-pills span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rq-mint); margin-left: 8px; box-shadow: 0 0 0 4px rgba(80, 227, 202, .15); }
.rq-stats {
  margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px; overflow: hidden; backdrop-filter: blur(6px);
}
.rq-stats div { padding: 16px 12px; text-align: center; border-left: 1px solid rgba(255, 255, 255, .07); }
.rq-stats div:last-child { border-left: 0; }
.rq-stats b { display: block; font-family: var(--rq-font-display); font-size: 22px; color: #fff; font-weight: 800; }
.rq-stats span { font-size: 12px; color: var(--rq-on-dark-soft); }

/* ---------- sign-in card ---------- */
.rq-card-wrap { position: relative; }
.rq-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px; font-family: var(--rq-font-ar); font-size: 12.5px; font-weight: 500;
  color: #fff; background: rgba(11, 38, 80, .82); border: 1px solid rgba(127, 234, 250, .25);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); backdrop-filter: blur(8px);
  animation: rq-float 6s ease-in-out infinite;
}
.rq-chip svg { width: 16px; height: 16px; stroke: var(--rq-cyan-400); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rq-chip.c1 { top: -18px; right: -26px; }
.rq-chip.c2 { bottom: 46px; left: -34px; animation-delay: -3s; }
@keyframes rq-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

body[data-path="login"] .rq-card-wrap .page-content-wrapper { display: block; }
body[data-path="login"] .rq-card-wrap main.container,
body[data-path="login"] .rq-card-wrap .page_content { max-width: none; width: 100%; padding: 0; margin: 0; }
body[data-path="login"] .page-card {
  max-width: 440px !important;
  width: 100%;
  margin: 0 !important;
  padding: 34px 34px 26px !important;
  border-radius: 28px !important;
  background: #fff !important;
  color: var(--rq-ink);
  border: 1px solid rgba(255, 255, 255, .6) !important;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65), 0 0 0 8px rgba(57, 217, 237, .06) !important;
  font-family: var(--rq-font);
}
body[data-path="login"] .page-card-head { align-items: center !important; text-align: center !important; gap: 12px !important; }
body[data-path="login"] .page-card-head .app-logo { height: 96px !important; max-height: none !important; width: auto !important; max-width: 240px; margin-bottom: 2px; }
body[data-path="login"] .page-card-head h4 {
  font-family: var(--rq-font-display) !important; color: var(--rq-ink) !important;
  font-weight: 800 !important; font-size: 25px !important; text-align: center; letter-spacing: -.2px;
}
body[data-path="login"] .page-card-subtitle { text-align: center; color: var(--rq-muted) !important; }
.rq-welcome-ar { font-family: var(--rq-font-ar); color: var(--rq-blue-600); font-size: 14.5px; text-align: center; width: 100%; margin-top: -4px; }
body[data-path="login"] .page-card label { color: var(--rq-ink-soft) !important; font-weight: 500; font-size: 13px !important; }
body[data-path="login"] .page-card .form-control {
  height: 48px !important; border-radius: 12px !important; border: 1px solid var(--rq-line) !important;
  background: var(--rq-surface-2) !important; color: var(--rq-ink) !important; font-size: 14.5px !important;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
body[data-path="login"] .page-card .form-control:focus {
  border-color: var(--rq-blue-500) !important; background: #fff !important;
  box-shadow: 0 0 0 4px rgba(22, 142, 232, .14) !important;
}
body[data-path="login"] .page-card .es-button[data-variant="solid"] {
  height: 48px !important; border-radius: 14px !important; border: 0 !important;
  font-family: var(--rq-font) !important; font-weight: 700 !important; font-size: 15px !important;
  color: #fff !important; background: var(--rq-grad-btn) !important;
  box-shadow: 0 14px 28px -10px rgba(22, 142, 232, .7);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
body[data-path="login"] .page-card .es-button[data-variant="solid"]:hover { filter: brightness(1.07); transform: translateY(-1px); }
body[data-path="login"] .page-card .btn-login-option {
  height: 46px !important; border-radius: 14px !important; background: #fff !important;
  border: 1px solid var(--rq-line) !important; color: var(--rq-ink) !important; font-weight: 500 !important;
}
body[data-path="login"] .page-card a[href="#forgot"], body[data-path="login"] .page-card a[href="#login"] { color: var(--rq-blue-600) !important; }
.rq-form-foot {
  margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--rq-line);
  text-align: center; font-size: 11.5px; color: var(--rq-muted);
}
.rq-form-foot b { color: var(--rq-ink); }
.rq-foot {
  position: relative; z-index: 2; text-align: center; padding: 0 16px 22px;
  color: var(--rq-on-dark-soft); font-size: 12px; letter-spacing: .3px;
}
.rq-foot span + span::before { content: "·"; margin: 0 10px; color: var(--rq-cyan-400); }

@media (max-width: 980px) {
  .rq-stage { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding-top: 24px; }
  .rq-copy { order: -1; text-align: center; }
  .rq-eyebrow { justify-content: center; }
  .rq-lead { margin-inline: auto; font-size: 14.5px; }
  .rq-pills { justify-content: center; }
  .rq-stats { display: none; }
  .rq-card-wrap { max-width: 440px; width: 100%; margin: 0 auto; }
  .rq-chip { display: none; }
  .rq-site { display: none; }
}
@media (max-width: 480px) {
  .rq-title { font-size: 34px; }
  body[data-path="login"] .page-card { padding: 26px 20px 20px !important; border-radius: 22px !important; }
}
