:root {
  color-scheme: light;
  --mint: #65d6ad;
  --navy: #243b53;
  --paper: #f7f9fc;
  --white: #ffffff;
  --muted: #66778a;
  --line: #dce4eb;
  --error: #a52e3c;
  --focus: #137b63;
  --shadow: 0 22px 60px rgb(36 59 83 / 8%), 0 2px 8px rgb(36 59 83 / 4%);
  --brand-panel: var(--mint);
  --brand-secondary: #28485a;
  --brand-copy: #2e4a5e;
  --brand-footer: #29445a;
  --feature-border: rgb(36 59 83 / 30%);
  --active-control: #e9f8f2;
  --card-border: #edf0f4;
  --eyebrow: #4d7b6d;
  --placeholder: #93a0ae;
  --checkbox-border: #aebbc8;
  --checkmark-color: var(--white);
  --link: #256b57;
  --error-border: #f0cbd0;
  --error-background: #fff6f7;
  --info-border: #d5e9e1;
  --info-color: #285d4d;
  --info-background: #f2fbf7;
  --placeholder-border: #ead58a;
  --placeholder-color: #654d0b;
  --placeholder-background: #fff8dc;
  --submit-text: var(--navy);
  --submit-hover: #55c99e;
  --footnote: #758497;
  --theme-selected: #e9f8f2;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #e5edf5;
  --paper: #111b24;
  --white: #1c2934;
  --muted: #a8b7c6;
  --line: #3a4a58;
  --error: #ff9ba7;
  --focus: #79ddb9;
  --shadow: 0 22px 60px rgb(0 0 0 / 28%), 0 2px 8px rgb(0 0 0 / 16%);
  --brand-panel: #173c37;
  --brand-secondary: #d1e6dd;
  --brand-copy: #c0d8d0;
  --brand-footer: #c0d8d0;
  --feature-border: rgb(229 237 245 / 42%);
  --active-control: #263b3b;
  --card-border: #344451;
  --eyebrow: #8ed5ba;
  --placeholder: #a8b7c5;
  --checkbox-border: #718091;
  --checkmark-color: #183129;
  --link: #86dfbf;
  --error-border: #67414a;
  --error-background: #321f27;
  --info-border: #335448;
  --info-color: #a9e4c8;
  --info-background: #1d342e;
  --placeholder-border: #63552f;
  --placeholder-color: #f0d98c;
  --placeholder-background: #332e20;
  --submit-text: #17382f;
  --submit-hover: #79e0b9;
  --footnote: #a8b7c6;
  --theme-selected: #263b3b;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--navy);
  background: var(--paper);
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  direction: ltr;
}

.brand-topline,
.brand-features,
.top-controls,
.login-card,
.panel-footnote {
  animation: page-enter 1s cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.brand-features {
  animation-delay: 90ms;
}

.top-controls {
  animation-delay: 60ms;
}

.login-card {
  animation-delay: 130ms;
}

.panel-footnote {
  animation-delay: 210ms;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-panel {
  position: relative;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px) clamp(34px, 7vw, 96px) 32px;
  background: var(--brand-panel);
  text-align: center;
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  z-index: 0;
  aspect-ratio: 1;
  border: 1px solid rgb(36 59 83 / 16%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.brand-panel::before {
  top: 8%;
  inset-inline-start: -8rem;
  width: clamp(220px, 28vw, 380px);
  box-shadow:
    0 0 0 24px rgb(36 59 83 / 5%),
    0 0 0 48px rgb(36 59 83 / 4%);
  animation: brand-orbit 10s ease-in-out infinite;
}

.brand-panel::after {
  right: 5%;
  bottom: -10rem;
  width: clamp(200px, 24vw, 320px);
  box-shadow:
    0 0 0 20px rgb(36 59 83 / 5%),
    0 0 0 40px rgb(36 59 83 / 4%);
  animation: brand-orbit-reverse 13s ease-in-out infinite;
}

@keyframes brand-orbit {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.94);
  }

  50% {
    transform: translate3d(64px, 48px, 0) scale(1.08);
  }
}

@keyframes brand-orbit-reverse {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.06);
  }

  50% {
    transform: translate3d(-56px, -42px, 0) scale(0.92);
  }
}

.brand-topline {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  background-color: #224b3c8a;
  border-radius: 15px;
}

.brand-wordmark {
  color: var(--navy);
  font-size: 69px;
  font-weight: 800;
}

.brand-features {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  direction: ltr;
  width: fit-content;
  max-width: 100%;
  gap: 11px;
  margin: 20px auto 0;
  padding: 0;
  color: var(--brand-secondary);
  font-size: 16px;
  font-weight: 650;
  list-style: none;
  justify-content: center;
}

html[dir="rtl"] .brand-features {
  direction: ltr;
}

html[dir="rtl"] .brand-features li:nth-child(-n + 3) {
  grid-column: 2;
}

html[dir="rtl"] .brand-features li:nth-child(n + 4) {
  grid-column: 1;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1.5;
  direction: rtl;
}

html[dir="ltr"] .brand-features li {
  direction: ltr;
}

.feature-mark {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
  border: 1px solid var(--feature-border);
  border-radius: 50%;
}

.feature-mark::after {
  width: 7px;
  height: 4px;
  transform: translateY(-1px) rotate(-45deg);
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  content: "";
}

.brand-copy {
  z-index: 1;
  width: min(100%, 500px);
  margin-block: 50px;
}

.brand-kicker,
.eyebrow {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.brand-kicker {
  margin-bottom: 19px;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(36px, 4.3vw, 58px);
  font-weight: 800;
  line-height: 1.4;
}

.brand-description {
  max-width: 410px;
  margin: 23px 0 0;
  color: var(--brand-copy);
  font-size: 17px;
  line-height: 1.95;
}

.brand-footer {
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--brand-footer);
  font-size: 13px;
  font-weight: 600;
}

.footer-rule {
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.login-panel {
  position: relative;
  display: flex;
  grid-column: 1;
  grid-row: 1;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 24px 28px;
  background: var(--paper);
  direction: rtl;
}

html[dir="ltr"] .brand-panel {
  grid-column: 1;
}

html[dir="ltr"] .login-panel {
  grid-column: 2;
  direction: ltr;
}

.top-controls {
  position: absolute;
  top: 30px;
  inset-inline-end: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-switch,
.theme-switch {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.theme-switch {
  gap: 2px;
  padding: 4px;
}

.language-option {
  min-width: 74px;
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.language-option.is-active {
  color: var(--navy);
  background: var(--active-control);
}

.theme-option {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 3px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.theme-option.is-active {
  background: var(--theme-selected);
}

.theme-icon {
  display: block;
  width: 26px;
  height: 26px;
}

.theme-option.is-animating .theme-icon {
  animation: theme-icon-select 240ms ease-out;
}

@keyframes theme-icon-select {
  0% {
    transform: scale(0.8) rotate(-12deg);
  }

  65% {
    transform: scale(1.12) rotate(4deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

.language-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.login-card {
  width: min(100%, 410px);
  padding: 28px 30px 24px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.signup-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  padding: 26px 30px 30px;
  overflow-y: auto;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--navy);
  background: var(--white);
  box-shadow: var(--shadow);
}

.signup-dialog[open] {
  animation: page-enter 1s cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.signup-dialog::backdrop {
  background: rgb(15 23 42 / 55%);
  backdrop-filter: blur(3px);
}

.signup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.signup-header .eyebrow {
  margin-bottom: 4px;
}

.signup-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
}

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--navy);
  background: var(--active-control);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.signup-dialog .field-group:last-of-type {
  margin-bottom: 14px;
}

.form-heading {
  margin-bottom: 20px;
}

.heading-mark {
  display: block;
  width: 32px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 99px;
  background: var(--mint);
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--eyebrow);
  font-size: 13px;
}

.form-heading h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.5;
}

.form-intro {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.field-group {
  margin-bottom: 14px;
}

.field-group > label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 650;
}

.field-group input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  color: var(--navy);
  background: var(--white);
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field-group input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.field-group input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(19 123 99 / 14%);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-inline-end: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 5px;
  display: grid;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.form-options {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -1px;
  margin-bottom: 14px;
  font-size: 13px;
}

.remember-control {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  cursor: pointer;
  user-select: none;
}

.remember-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-checkbox {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid var(--checkbox-border);
  border-radius: 4px;
  background: var(--white);
}

.remember-control input:checked + .custom-checkbox {
  border-color: var(--navy);
  background: var(--navy);
}

.remember-control input:checked + .custom-checkbox::after {
  width: 8px;
  height: 4px;
  transform: rotate(-45deg) translateY(-1px);
  border-bottom: 2px solid var(--checkmark-color);
  border-left: 2px solid var(--checkmark-color);
  content: "";
}

.remember-control input:focus-visible + .custom-checkbox {
  outline: 3px solid rgb(19 123 99 / 26%);
  outline-offset: 2px;
}

.text-link {
  color: var(--link);
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}

.text-link:hover {
  text-decoration: underline;
}

.form-message {
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid var(--error-border);
  border-radius: 5px;
  color: var(--error);
  background: var(--error-background);
  font-size: 13px;
  line-height: 1.65;
}

.form-message.is-info {
  border-color: var(--info-border);
  color: var(--info-color);
  background: var(--info-background);
}

.form-message.is-placeholder {
  border-color: var(--placeholder-border);
  color: var(--placeholder-color);
  background: var(--placeholder-background);
}

.verification-message {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.verification-actions {
  display: grid;
  gap: 10px;
}

.verification-secondary {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.verification-secondary:hover {
  background: var(--active-control);
}

.submit-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: var(--submit-text);
  background: var(--mint);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  transition: background-color 140ms ease, transform 140ms ease;
}

.submit-button:hover {
  background: var(--submit-hover);
}

.submit-button:active {
  transform: translateY(1px);
}

.register-prompt {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-footnote {
  margin: 14px 0 0;
  color: var(--footnote);
  font-size: 12px;
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgb(19 123 99 / 32%);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 761px) and (max-height: 760px) {
  .brand-panel {
    padding-block: clamp(18px, 4vh, 34px);
  }

  .brand-copy {
    margin-block: clamp(14px, 3vh, 28px);
  }

  .brand-copy h1 {
    font-size: clamp(32px, 3.7vw, 48px);
  }

  .brand-description {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.7;
  }

  .login-panel {
    padding: 56px 20px 12px;
  }

  .login-card {
    padding: 18px 24px 16px;
  }

  .form-heading {
    margin-bottom: 12px;
  }

  .heading-mark {
    margin-bottom: 8px;
  }

  .form-heading h2 {
    font-size: 22px;
    line-height: 1.4;
  }

  .form-intro {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.6;
  }

  .field-group {
    margin-bottom: 9px;
  }

  .field-group > label {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .field-group input {
    height: 40px;
  }

  .form-options {
    margin-bottom: 10px;
  }

  .submit-button {
    min-height: 44px;
  }

  .register-prompt {
    margin-top: 12px;
  }

  .panel-footnote {
    margin-top: 8px;
  }
}

@media (min-width: 761px) and (max-height: 560px) {
  .login-panel {
    padding: 58px 24px 12px;
  }

  .login-card {
    padding: 18px 28px 16px;
  }

  .form-heading {
    margin-bottom: 14px;
  }

  .field-group {
    margin-bottom: 11px;
  }

  .form-options {
    margin-bottom: 11px;
  }

  .register-prompt {
    margin-top: 12px;
  }

  .panel-footnote {
    display: none;
  }
}

@media (min-width: 761px) and (max-height: 500px) {
  .brand-panel {
    padding-block: 12px;
  }

  .brand-logo {
    width: 88px;
    height: 88px;
  }

  .brand-topline {
    gap: 8px;
  }

  .brand-wordmark {
    font-size: 52px;
  }

  .brand-features {
    gap: 5px;
    margin-top: 10px;
    font-size: 13px;
  }

  .brand-features li {
    gap: 8px;
  }

  .feature-mark {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .brand-copy {
    margin-block: 8px;
  }

  .brand-kicker {
    margin-bottom: 10px;
  }

  .brand-description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .login-card {
    padding: 14px 24px 12px;
  }

  .form-heading {
    margin-bottom: 10px;
  }

  .heading-mark {
    margin-bottom: 8px;
  }

  .field-group {
    margin-bottom: 8px;
  }

  .form-options {
    margin-bottom: 8px;
  }

  .register-prompt {
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  html[dir="ltr"] .brand-panel {
    grid-column: 1;
    grid-row: 1;
  }

  html[dir="ltr"] .login-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .brand-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: auto;
    padding: 25px 26px 30px;
  }

  .brand-topline {
    gap: 10px;
  }

  .brand-logo {
    width: 70px;
    height: 70px;
  }

  .brand-wordmark {
    font-size: 26px;
  }

  .brand-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 460px);
    gap: 7px;
    margin-top: 15px;
    font-size: 14px;
  }

  .brand-features li {
    gap: 9px;
  }

  .feature-mark {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .brand-copy {
    width: min(100%, 550px);
    margin: 25px 0 8px;
  }

  .brand-kicker {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .brand-copy h1 {
    font-size: 29px;
    line-height: 1.45;
  }

  .brand-description {
    max-width: 530px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.75;
  }

  .brand-footer {
    display: none;
  }

  .login-panel {
    grid-column: 1;
    grid-row: 2;
    min-height: auto;
    justify-content: flex-start;
    padding: 76px 20px 36px;
  }

  .top-controls {
    top: 18px;
    inset-inline-end: 20px;
  }

  .login-card {
    width: min(100%, 440px);
    padding: 30px 26px 27px;
  }

  .panel-footnote {
    margin-top: 18px;
  }
}

@media (max-width: 380px) {
  .brand-panel {
    padding-inline: 20px;
  }

  .login-card {
    padding-inline: 20px;
  }

  .form-heading h2 {
    font-size: 22px;
  }

  .form-options {
    gap: 8px;
    font-size: 12px;
  }
}