:root {
  --navy: #111827;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --ink: #182230;
  --muted: #667085;
  --line: #dfe4e8;
  --surface: #f7f9fa;
  --white: #ffffff;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--surface);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 1.2em;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  direction: ltr;
  font-feature-settings: "liga";
  letter-spacing: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(340px, .78fr) minmax(520px, 1.22fr);
  min-height: 100vh;
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 62px);
  color: var(--white);
  background: var(--navy);
  overflow: hidden;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 78%);
  mask-image: linear-gradient(135deg, #000, transparent 78%);
}

.auth-logo,
.auth-brand-copy,
.auth-brand-panel > small {
  position: relative;
  z-index: 1;
}

.auth-logo { display: flex; align-items: center; gap: 13px; width: max-content; }
.auth-logo img { width: 126px; height: 55px; object-fit: contain; filter: brightness(0) invert(1); }
.auth-logo span { padding-inline-start: 13px; color: #5eead4; border-inline-start: 1px solid rgba(255,255,255,.2); font-size: .8rem; font-weight: 800; }

.auth-brand-copy { margin-block: auto; }
.auth-brand-copy > p { margin: 0 0 8px; color: #5eead4; font-size: .8rem; font-weight: 800; }
.auth-brand-copy h1 { max-width: 560px; margin: 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.17; }
.auth-brand-copy ul { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.auth-brand-copy li { display: flex; align-items: center; gap: 9px; color: #d8e0e8; font-weight: 650; }
.auth-brand-copy li .material-symbols-rounded { color: #5eead4; font-variation-settings: "FILL" 1; }
.auth-brand-panel > small { color: #98a2b3; }

.auth-form-panel { display: grid; place-items: center; min-width: 0; padding: 32px clamp(20px, 6vw, 88px); background: var(--white); }
.auth-form-wrap { width: min(100%, 500px); }
.auth-heading p, .auth-heading h2 { margin: 0; }
.auth-heading p { color: var(--teal-dark); font-size: .78rem; font-weight: 800; }
.auth-heading h2 { color: var(--navy); font-size: clamp(1.65rem, 3vw, 2.35rem); }

.auth-alert { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 11px 13px; border: 1px solid; border-radius: 7px; font-size: .82rem; }
.auth-alert.is-error { color: var(--danger); background: #fff1f0; border-color: #fecdca; }
.auth-alert.is-success { color: #067647; background: #ecfdf3; border-color: #abefc6; }

.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin: 24px 0 20px; padding: 4px; background: #eef2f4; border-radius: 7px; }
.auth-tabs button { min-height: 40px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; font-weight: 800; cursor: pointer; }
.auth-tabs button.is-active { color: var(--navy); background: var(--white); box-shadow: 0 2px 9px rgba(17,24,39,.08); }

.auth-form { display: none; gap: 15px; }
.auth-form.is-active { display: grid; }
.auth-form label { display: grid; gap: 6px; }
.auth-form label > span { color: #344054; font-size: .8rem; font-weight: 750; }

.input-wrap { display: flex; align-items: center; min-height: 46px; padding-inline-start: 12px; color: #98a2b3; background: #fbfcfc; border: 1px solid #d7dde3; border-radius: 6px; }
.input-wrap:focus-within { background: var(--white); border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,184,166,.13); }
.input-wrap input, .input-wrap select { flex: 1; min-width: 0; height: 44px; padding: 8px 10px; color: var(--ink); background: transparent; border: 0; outline: none; }
.input-wrap select { cursor: pointer; }
.password-toggle { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; }

.submit-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; margin-top: 4px; padding: 9px 16px; color: var(--white); background: var(--teal); border: 0; border-radius: 7px; box-shadow: 0 12px 26px rgba(20,184,166,.22); font-weight: 800; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease; }
.submit-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(20,184,166,.28); }
.auth-note { margin: 18px 0 0; color: var(--muted); font-size: .7rem; text-align: center; }

@media (max-width: 880px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 230px; padding: 22px 20px; }
  .auth-brand-copy { margin-top: 28px; }
  .auth-brand-copy h1 { max-width: 620px; font-size: clamp(1.55rem, 7vw, 2.4rem); }
  .auth-brand-copy ul, .auth-brand-panel > small { display: none; }
  .auth-form-panel { padding: 28px 18px 42px; }
}

@media (max-width: 480px) {
  .auth-brand-panel { min-height: 205px; }
  .auth-logo img { width: 108px; height: 46px; }
  .auth-form-panel { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
