@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/ibm-plex-sans-regular.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/ibm-plex-sans-semibold.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/ibm-plex-sans-medium.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/ibm-plex-sans-bold.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/ibm-plex-sans-arabic-regular.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/ibm-plex-sans-arabic-medium.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/ibm-plex-sans-arabic-semibold.ttf") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/ibm-plex-sans-arabic-bold.ttf") format("truetype");
}

:root {
  --font-sans: "IBM Plex Sans", "IBM Plex Sans Arabic", Arial, sans-serif;

  --color-inchaa-red: #af272f;
  --color-inchaa-red-hover: #981f27;
  --color-tint-red: #f4d6d8;
  --color-page: #f0eee9;
  --color-surface: #ffffff;
  --color-text-primary: #212322;
  --color-text-secondary: #5e6869;
  --color-text-on-dark: #b5bebf;
  --color-input-border: #76817f;
  --color-divider: #d3d8d8;
  --color-on-action: #ffffff;
  --color-focus: #212322;
  --color-overlay-transparent: rgba(0, 0, 0, 0);
  --color-overlay-solid: #000000;
  --color-card-shadow: rgba(0, 0, 0, 0.04);

  --space-0: 0;
  --space-2xs: 2px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-sm-md: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 28px;
  --space-2xl: 40px;
  --space-3xl: 56px;
  --space-4xl: 60px;
  --layout-gap: 80px;
  --layout-right: 80px;

  --radius-checkbox: 4px;
  --radius-input: 12px;
  --radius-card: 48px;
  --radius-pill: 9999px;

  --page-height: 1024px;
  --brand-width: 686px;
  --brand-inner-radius: 40px;
  --card-width: 591px;
  --card-content-height: 724px;
  --card-padding-block: clamp(
    20px,
    calc((100vh - var(--card-content-height)) / 2),
    56px
  );
  --card-padding-inline: 56px;
  --input-height: 44px;
  --button-height: 52px;
  --icon-size: 20px;
  --logo-mark-width: 42.3px;
  --logo-mark-height: 40px;
  --brand-logo-width: 171px;

  --text-hero-size: 48px;
  --text-hero-line: 1.21;
  --text-heading-size: 30px;
  --text-heading-line: 1.27;
  --text-body-lg-size: 18px;
  --text-body-lg-line: 1.56;
  --text-body-size: 16px;
  --text-body-line: 1.5;
  --text-small-size: 14px;
  --text-small-line: 1.43;
  --text-caption-size: 12px;
  --text-caption-line: 16px;
  --weight-regular: 400;
  --weight-semibold: 600;
}

html[lang="ar"] {
  --font-sans: "IBM Plex Sans Arabic", "IBM Plex Sans", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: var(--space-0);
  overflow: hidden;
  background: var(--color-page);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-synthesis: none;
}

button,
input {
  font: inherit;
}

button,
a,
input,
label {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--color-inchaa-red);
  text-underline-offset: 2px;
}

.login-shell {
  display: flex;
  align-items: center;
  gap: var(--layout-gap);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding-inline-end: var(--layout-right);
  overflow: hidden;
  background: var(--color-page);
}

.brand-panel {
  position: relative;
  align-self: stretch;
  flex: 0 0 var(--brand-width);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 0 var(--brand-inner-radius) var(--brand-inner-radius) 0;
  color: var(--color-on-action);
}

.brand-panel__back {
  position: absolute;
  z-index: 1;
  top: var(--space-2xl);
  inset-inline-start: var(--space-2xl);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  color: var(--color-on-action);
  font-size: var(--text-small-size);
  font-weight: var(--weight-semibold);
  line-height: var(--text-small-line);
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: background-color 160ms ease;
}

.brand-panel__back-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  color: var(--color-text-primary);
  text-shadow: none;
  transition: transform 160ms ease;
}

.brand-panel__back-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.brand-panel__back:hover {
  color: var(--color-on-action);
  background: rgba(255, 255, 255, 0.1);
}

.brand-panel__back:hover .brand-panel__back-icon {
  transform: translateX(-2px);
}

.brand-panel__photo,
.brand-panel__shade {
  position: absolute;
  inset: var(--space-0);
  width: 100%;
  height: 100%;
}

.brand-panel__photo {
  object-fit: cover;
  filter: grayscale(1);
}

.brand-panel__shade {
  background: linear-gradient(
    to bottom,
    var(--color-overlay-transparent) 50%,
    var(--color-overlay-solid) 100%
  );
}

.brand-panel__content {
  position: absolute;
  right: var(--space-2xl);
  bottom: var(--space-4xl);
  left: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.brand-logo {
  width: var(--brand-logo-width);
  height: auto;
}

.brand-logo img,
.card-logo img,
.button img,
.password-field__icon img,
.check-control__box img {
  display: block;
}

.brand-logo__image {
  width: 100%;
  height: auto;
}

.brand-panel__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 180px;
  transition: opacity 260ms ease, transform 260ms ease;
}

.brand-panel__copy.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.brand-panel__copy h1,
.brand-panel__copy p,
.sign-in-card__header h2,
.sign-in-card__header p,
.sign-in-card__footer p,
.sign-in-card__footer small {
  margin: var(--space-0);
}

.brand-panel__copy h1 {
  font-size: var(--text-hero-size);
  font-weight: var(--weight-semibold);
  line-height: var(--text-hero-line);
  letter-spacing: -0.48px;
  text-transform: capitalize;
}

.brand-panel__copy p {
  max-width: 100%;
  color: var(--color-text-on-dark);
  font-size: var(--text-body-lg-size);
  line-height: var(--text-body-lg-line);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 2.625px;
  height: 7.875px;
}

.carousel-dots button {
  width: 7.875px;
  height: 7.875px;
  padding: var(--space-0);
  background: var(--color-tint-red);
  border: var(--space-0);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: width 220ms ease, background-color 220ms ease;
}

.carousel-dots .carousel-dots__active {
  width: 21px;
  background: var(--color-inchaa-red);
}

.carousel-dots button:focus-visible {
  outline: 2px solid var(--color-on-action);
  outline-offset: 3px;
}

.sign-in-card {
  flex: 0 0 var(--card-width);
  max-width: var(--card-width);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  margin-inline: auto;
  padding: var(--card-padding-block) var(--card-padding-inline);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 20px var(--color-card-shadow);
}

.card-logo {
  position: relative;
  width: var(--logo-mark-width);
  height: var(--logo-mark-height);
}

.card-logo__mark {
  width: 100%;
  height: 100%;
}

.sign-in-card__body,
.sign-in-form,
.form-field,
.form-actions,
.sign-in-card__footer {
  display: flex;
  flex-direction: column;
}

.sign-in-card__body {
  gap: var(--space-lg);
}

.sign-in-card__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sign-in-card__header h2 {
  font-size: var(--text-heading-size);
  font-weight: var(--weight-semibold);
  line-height: var(--text-heading-line);
  text-transform: capitalize;
}

.sign-in-card__header p {
  color: var(--color-text-secondary);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
}

.sign-in-form {
  gap: var(--space-xl);
}

.form-field {
  gap: var(--space-sm);
}

.form-field label,
.check-control {
  font-weight: var(--weight-semibold);
}

.form-field label {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  text-transform: capitalize;
}

.form-field > input,
.password-field {
  width: 100%;
  height: var(--input-height);
  background: var(--color-surface);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-input);
}

.form-field input {
  min-width: var(--space-0);
  padding: var(--space-0) var(--space-md);
  color: var(--color-text-primary);
  font-size: var(--text-body-size);
  line-height: 24px;
  outline: none;
}

.form-field input::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

.form-field > input:focus,
.password-field:focus-within {
  border-color: var(--color-focus);
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
  box-shadow: none;
}

.form-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--color-surface) inset;
}

.password-field {
  display: flex;
  align-items: center;
  padding-right: var(--space-sm-md);
}

.password-field input {
  flex: 1;
  height: 100%;
  border: var(--space-0);
  background: transparent;
}

.password-field__icon {
  display: grid;
  width: var(--icon-size);
  height: var(--icon-size);
  place-items: center;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2xs);
}

.form-options a,
.check-control {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
}

.form-options a {
  font-weight: var(--weight-semibold);
}

.check-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.check-control__box {
  display: grid;
  width: var(--icon-size);
  height: var(--icon-size);
  background: var(--color-inchaa-red);
  border-radius: var(--radius-checkbox);
  place-items: center;
}

.check-control input:not(:checked) + .check-control__box {
  background: var(--color-surface);
  border: 1px solid var(--color-input-border);
}

.check-control input:not(:checked) + .check-control__box img {
  opacity: 0;
}

.check-control input:focus-visible + .check-control__box {
  outline: 3px solid color-mix(in srgb, var(--color-focus) 25%, transparent);
  outline-offset: 2px;
}

.form-actions {
  gap: var(--space-lg);
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  height: var(--button-height);
  padding: var(--space-0) var(--space-xl);
  border-radius: var(--radius-pill);
  font-size: var(--text-body-size);
  font-weight: var(--weight-semibold);
  line-height: var(--text-body-line);
  cursor: pointer;
}

.button--primary {
  color: var(--color-on-action);
  background: var(--color-inchaa-red);
  border: 1px solid var(--color-inchaa-red);
}

.button--primary:hover {
  background: var(--color-inchaa-red-hover);
  border-color: var(--color-inchaa-red-hover);
}

.button--outline {
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-input-border);
}

.button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-focus) 35%, transparent);
  outline-offset: 3px;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--color-divider);
}

.divider--labelled {
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  height: var(--text-caption-line);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--text-caption-size);
  line-height: var(--text-caption-line);
}

.divider--labelled::before,
.divider--labelled::after {
  flex: 1;
  height: 1px;
  background: var(--color-divider);
  content: "";
}

.sign-in-card__footer {
  align-items: center;
  gap: 10px;
  color: var(--color-text-secondary);
  text-align: center;
}

.sign-in-card__footer .divider {
  margin-bottom: 13px;
}

.sign-in-card__footer p {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
  text-transform: capitalize;
}

.sign-in-card__footer small {
  font-size: var(--text-caption-size);
  line-height: var(--text-caption-line);
}

@media (max-width: 1180px) {
  :root {
    --layout-gap: 48px;
    --layout-right: 48px;
  }

  .brand-panel {
    flex-basis: 44%;
  }

  .sign-in-card {
    flex: 1 1 var(--card-width);
  }
}

@media (max-width: 820px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body {
    padding: var(--space-md);
    overflow: auto;
  }

  .login-shell {
    display: block;
    height: auto;
    min-height: calc(100vh - (var(--space-md) * 2));
    padding: var(--space-lg);
  }

  .brand-panel {
    display: none;
  }

  .sign-in-card {
    width: min(100%, var(--card-width));
    margin: var(--space-lg) auto;
  }
}

html[dir="rtl"] .brand-panel {
  border-radius: var(--brand-inner-radius) 0 0 var(--brand-inner-radius);
}

html[dir="rtl"] {
  --brand-width: clamp(686px, 40vw, 760px);
}

html[dir="rtl"] .brand-panel__back {
  padding: 4px 4px 4px 12px;
}

html[dir="rtl"] .button img {
  transform: scaleX(-1);
}

html[dir="rtl"] .brand-panel__back:hover .brand-panel__back-icon {
  transform: translateX(2px);
}

@media (max-width: 1180px) {
  html[dir="rtl"] .brand-panel {
    flex-basis: 48%;
  }
}

html[dir="rtl"] .password-field {
  padding-right: 0;
  padding-left: var(--space-sm-md);
}

html[dir="rtl"] input[type="email"] {
  direction: ltr;
  text-align: left;
}

@media (max-width: 560px) {
  :root {
    --card-padding-block: 28px;
    --card-padding-inline: 28px;
    --radius-card: 28px;
    --text-heading-size: 26px;
  }

  body {
    padding: var(--space-0);
  }

  .login-shell {
    min-height: 100vh;
    padding: var(--space-md);
    border-radius: var(--space-0);
  }

  .sign-in-card {
    margin: var(--space-0) auto;
  }

  .form-options {
    align-items: flex-start;
    gap: var(--space-sm-md);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: background-color 160ms ease, border-color 160ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-panel__copy,
  .carousel-dots button,
  .brand-panel__back,
  .brand-panel__back-icon {
    transition: none;
  }
}

.sign-in-card--reset {
  --card-content-height: 394px;
}

.sign-in-card--email-check {
  --card-content-height: 294px;
}

.sign-in-card--new-password {
  --card-content-height: 558px;
}

.sign-in-card--activation {
  --card-content-height: 686px;
}

.auth-card__content,
.auth-card__primary,
.auth-card__section,
.auth-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.auth-card__content--with-footer,
.auth-card__primary,
.auth-card__section {
  gap: var(--space-lg);
}

.auth-form {
  gap: var(--space-xl);
}

.sign-in-card__header--capitalized {
  text-transform: capitalize;
}

.sign-in-card__header--accent h2 {
  color: var(--color-inchaa-red);
}

.sign-in-card__header strong {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

.auth-card__footer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  color: var(--color-text-secondary);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
  text-align: center;
  text-transform: capitalize;
  white-space: nowrap;
}

.auth-card__footer p {
  margin: var(--space-0);
}

@media (max-width: 560px) {
  .auth-card__footer {
    flex-wrap: wrap;
    white-space: normal;
  }
}

.sign-in-card--login {
  --card-content-height: 608px;
}

.sign-in-card--confirmation {
  --card-content-height: 294px;
}

.sign-in-card--invalid {
  --card-content-height: 350px;
}

.auth-card__content {
  gap: var(--space-lg);
}

.password-field__icon {
  flex: 0 0 var(--icon-size);
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.password-field__icon:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.form-field input[readonly] {
  background: var(--color-page);
  color: var(--color-text-secondary);
  cursor: default;
}

.form-field input[readonly]:focus {
  border-color: var(--color-input-border);
  box-shadow: none;
}

.form-field .field-validation-error {
  color: var(--color-inchaa-red);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
}

.form-field input.input-validation-error,
.form-field .password-field:has(input.input-validation-error) {
  border-color: var(--color-inchaa-red);
}

.alerts,
.auth-errors,
.auth-errors ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.auth-errors ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.alert-msg,
.auth-errors li {
  padding: var(--space-sm-md) var(--space-md);
  border: 1px solid currentColor;
  border-radius: var(--radius-input);
  font-size: var(--text-small-size);
}

.alert-msg.is-danger,
.auth-errors li {
  color: #a51e28;
  background: #fdf0f0;
}

.alert-msg.is-warning {
  color: #825a00;
  background: #fff7e5;
}

.alert-msg.is-success {
  color: #23662f;
  background: #eff8f0;
}

.alert-msg.is-info {
  color: #255a8a;
  background: #eef4fb;
}

.button:is(a) {
  text-decoration: none;
}

.button img {
  width: var(--icon-size);
  height: var(--icon-size);
}

.button.is-loading {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 1439px) and (min-width: 821px) {
  :root {
    --layout-gap: clamp(24px, 4vw, 48px);
    --layout-right: clamp(24px, 4vw, 48px);
    --card-padding-inline: clamp(24px, 4vw, 56px);
  }

  .brand-panel {
    flex-basis: min(var(--brand-width), 50vw);
  }

  .sign-in-card {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (min-width: 821px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .login-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .brand-panel {
    height: auto;
    min-height: 100dvh;
  }

  .sign-in-card {
    margin-block: auto;
  }
}
