.login-page {
  min-height: 100vh;
  background: #f5f9fd;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
  min-height: 100vh;
}

.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 34px clamp(32px, 5vw, 76px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 15%, rgba(67, 169, 255, .42), transparent 30%),
    linear-gradient(145deg, #0b2545 0%, #14559a 58%, #1d6fc4 100%);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.login-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.showcase-content {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin-block: auto;
  padding-block: 70px;
}

.showcase-badge {
  display: inline-flex;
  padding: 7px 15px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: .88rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.showcase-content h1 {
  margin-top: 20px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.2;
}

.showcase-content > p {
  max-width: 460px;
  margin-top: 16px;
  color: rgba(255, 255, 255, .82);
  font-size: 1.12rem;
}

.showcase-features {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.showcase-features li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
}

.feature-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .17);
  color: #8ff0ba;
  font-size: .8rem;
}

.showcase-orb {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  animation: orbFloat 7s ease-in-out infinite;
}

.orb-one { width: 320px; height: 320px; inset: auto -100px -90px auto; }
.orb-two { width: 150px; height: 150px; inset: 16% auto auto -60px; animation-delay: -3s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

.login-form-side {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 76px clamp(24px, 6vw, 90px) 48px;
  background:
    radial-gradient(circle at 90% 10%, rgba(43, 138, 230, .09), transparent 28%),
    #f7fafe;
}

.back-home {
  position: absolute;
  top: 28px;
  inset-inline-start: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 600;
  transition: color .2s ease, transform .2s ease;
}

.back-home svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-home:hover { color: var(--blue-600); transform: translateX(4px); }

.login-card {
  width: min(100%, 460px);
  animation: cardEnter .55s cubic-bezier(.2, .8, .2, 1) both;
}

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

.login-heading { margin-bottom: 32px; }
.login-heading h2 {
  color: var(--blue-900);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.login-heading p { margin-top: 7px; color: var(--muted); }
.mobile-logo { display: none; }

.form-group { margin-bottom: 20px; }
.form-group label, .label-row {
  color: var(--blue-900);
  font-size: .95rem;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.form-group > label { display: block; margin-bottom: 8px; }
.forgot-link { color: var(--blue-600); font-size: .85rem; font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }

.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 48px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  direction: rtl;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.input-wrap input::placeholder { color: #9aa8b8; }
.input-wrap input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(43, 138, 230, .11);
}

.input-wrap.has-error input {
  border-color: #df4d5a;
  box-shadow: 0 0 0 4px rgba(223, 77, 90, .09);
}

.input-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  inset-inline-start: 17px;
  width: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: #7f90a5;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #7f90a5;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.password-toggle:hover { color: var(--blue-600); background: var(--blue-50); }
.password-toggle svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eye-closed { display: none; }
.password-toggle.visible .eye-open { display: none; }
.password-toggle.visible .eye-closed { display: block; }

.field-error {
  display: block;
  min-height: 20px;
  padding-top: 4px;
  color: #c93643;
  font-size: .8rem;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-top: -4px;
  color: var(--muted);
  font-size: .9rem;
  cursor: pointer;
}
.remember-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.custom-check {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1.5px solid #b8c4d2;
  border-radius: 5px;
  background: #fff;
  transition: background .2s ease, border-color .2s ease;
}
.custom-check svg {
  width: 11px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s ease, transform .2s ease;
}
.remember-row input:checked + .custom-check { border-color: var(--blue-600); background: var(--blue-600); }
.remember-row input:checked + .custom-check svg { opacity: 1; transform: scale(1); }
.remember-row input:focus-visible + .custom-check { box-shadow: 0 0 0 4px rgba(43, 138, 230, .13); }

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 55px;
  margin-top: 25px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  font: 700 1rem "Tajawal", sans-serif;
  box-shadow: 0 10px 24px rgba(29, 111, 196, .27);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.login-submit svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(29, 111, 196, .34); }
.login-submit:hover svg { transform: translateX(-4px); }
.login-submit:active { transform: translateY(0); }

.login-notice {
  min-height: 24px;
  margin-top: 12px;
  text-align: center;
  color: var(--blue-700);
  font-size: .88rem;
}

.support-text {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}
.support-text a { color: var(--blue-600); font-weight: 700; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .login-form-side { padding: 84px 20px 42px; }
  .mobile-logo {
    display: inline-flex;
    width: 68px;
    height: 68px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .mobile-logo img { width: 100%; height: 100%; object-fit: contain; }
}

@media (max-width: 480px) {
  .login-form-side { place-items: start center; }
  .back-home { top: 22px; inset-inline-start: 20px; }
  .login-heading { margin-bottom: 26px; }
  .input-wrap input { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-orb, .login-card { animation: none; }
}
