@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  --mx-ink: #0b1a33;
  --mx-label: #1a2a47;
  --mx-muted: #64718a;
  --mx-muted-2: #51607c;
  --mx-foot: #8190ab;
  --mx-blue: #2f6df0;
  --mx-blue-deep: #1b3fa8;
  --mx-blue-soft: #3b7bff;
  --mx-field-bg: #f6f8fd;
  --mx-field-border: #dbe3f1;
  --mx-shell-bg: #f3f6fc;
  --mx-red: #dc2626;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body.login-body {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  color: var(--mx-ink);
  background: var(--mx-shell-bg);
}

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  background: var(--mx-shell-bg);
}

/* ── Hero (brand panel) ── */
.login-hero {
  flex: 1.05;
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(2rem, 5vw, 4.5rem);
  gap: 1.75rem;
  background: linear-gradient(160deg, #061226 0%, #0b2250 55%, #12338a 100%);
}

.login-hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 109, 240, 0.55), transparent 70%);
  bottom: -160px;
  left: -120px;
  pointer-events: none;
}

.login-hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 166, 77, 0.28), transparent 70%);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

.login-hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 460px;
  animation: loginRise 0.7s ease-out both;
}

.login-brand-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.login-logo-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 32px;
  padding: 2rem 2.75rem;
  box-shadow:
    0 28px 56px -22px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(18, 51, 138, 0.06);
}

.login-brand-mark {
  width: 200px;
  height: 200px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--mx-blue-soft), var(--mx-blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 6rem;
  color: #fff;
  box-shadow: 0 16px 32px -12px rgba(59, 123, 255, 0.55);
  flex: none;
}

.login-brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(420px, 78vw);
  max-height: 220px;
  object-fit: contain;
  flex: none;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  direction: ltr;
  text-align: left;
}

.login-brand-text strong {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 2px;
}

.login-brand-text span {
  font-size: 0.75rem;
  opacity: 0.7;
  letter-spacing: 1.5px;
}

.login-hero-title {
  margin: 0;
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(90deg, #fff, #9fc0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-lead {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.8;
  color: #c5d4f2;
  max-width: 460px;
}

.login-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 460px;
}

.login-points li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 1rem;
  font-weight: 500;
}

.login-point-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.login-point-icon--blue {
  background: rgba(59, 123, 255, 0.25);
}

.login-point-icon--orange {
  background: rgba(255, 166, 77, 0.22);
}

.login-point-icon svg {
  display: block;
}

/* ── Form panel ── */
.login-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2.5rem;
  position: relative;
  background:
    radial-gradient(circle at 20% 15%, #e4ecff 0%, transparent 45%),
    var(--mx-shell-bg);
}

.login-card {
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 28px;
  padding: 2.75rem 2.5rem;
  box-shadow:
    0 40px 80px -30px rgba(18, 51, 138, 0.35),
    0 0 0 1px rgba(18, 51, 138, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  animation: loginRise 0.7s 0.08s ease-out both;
}

.login-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  align-items: flex-start;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1b4fc9;
  font-size: 0.8125rem;
  font-weight: 600;
}

.login-badge svg {
  flex: none;
}

.login-card-head h2 {
  margin: 0.375rem 0 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--mx-ink);
}

.login-card-head p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--mx-muted);
  line-height: 1.7;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mx-label);
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap > svg {
  position: absolute;
  right: 16px;
  top: 18px;
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 56px;
  border: 1.5px solid var(--mx-field-border);
  border-radius: 14px;
  background: var(--mx-field-bg);
  padding: 0 48px 0 16px;
  font: 500 15px "IBM Plex Sans Arabic", sans-serif;
  color: var(--mx-ink);
  outline: none;
  direction: ltr;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  border-color: var(--mx-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 109, 240, 0.14);
}

.login-field-error {
  display: block;
  color: var(--mx-red);
  font-size: 0.8125rem;
  font-weight: 500;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--mx-muted-2);
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--mx-blue);
  margin: 0;
}

.login-submit {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mx-blue), var(--mx-blue-deep));
  color: #fff;
  font: 700 16px "IBM Plex Sans Arabic", sans-serif;
  cursor: pointer;
  box-shadow: 0 14px 28px -10px rgba(47, 109, 240, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -10px rgba(47, 109, 240, 0.8);
}

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

.login-alert {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.login-alert:empty,
.validation-summary-valid {
  display: none !important;
}

.login-footnote {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mx-foot);
}

.vendor-credit--login {
  display: grid;
  gap: 0.1rem;
  margin-top: 1.1rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  text-decoration: none !important;
  color: #fff !important;
  background: linear-gradient(135deg, #1a237e 0%, #283593 45%, #1565c0 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 18px rgba(26, 35, 126, 0.2);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  direction: ltr;
}

.vendor-credit--login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(26, 35, 126, 0.26);
  filter: brightness(1.05);
  color: #fff !important;
}

.vendor-credit__eyebrow {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.78;
  font-weight: 600;
}

.vendor-credit__name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.vendor-credit__hint {
  font-size: 0.62rem;
  opacity: 0.9;
  line-height: 1.3;
}

.login-apply-cta {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #e4ebf5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  color: #64748b;
}

.login-apply-cta a {
  font-weight: 800;
  color: #2f6fed;
  text-decoration: none;
}

.login-apply-cta a:hover {
  text-decoration: underline;
}

@keyframes loginRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .login-shell {
    flex-direction: column;
  }

  .login-hero {
    flex: none;
    min-height: auto;
    padding: 2rem 1.5rem 2.5rem;
    gap: 1.25rem;
  }

  .login-logo-plate {
    padding: 1.25rem 1.5rem;
    border-radius: 22px;
  }

  .login-brand-logo {
    max-width: min(260px, 70vw);
    max-height: 120px;
  }

  .login-brand-mark {
    width: 112px;
    height: 112px;
    font-size: 3.25rem;
    border-radius: 22px;
  }

  .login-hero-title {
    font-size: 2.75rem;
  }

  .login-lead {
    font-size: 1.05rem;
  }

  .login-points {
    display: none;
  }

  .login-panel {
    padding: 0 1.25rem 2rem;
    margin-top: -1rem;
  }

  .login-card {
    padding: 1.75rem 1.35rem;
    border-radius: 22px;
  }

  .login-card-head h2 {
    font-size: 1.65rem;
  }
}
