:root {
  --petrol: #00413c;
  --petrol-deep: #062e2b;
  --canary: #f3df63;
  --canary-deep: #c2a91f;
  --paper: #f4f7f2;
  --ink: #102522;
  --muted: #687873;
  --line: #dce7dc;
  --white: #fff;
  --ui: "Tajawal", sans-serif;
  --display: "El Messiri", "Tajawal", sans-serif;
  --naskh: "Noto Naskh Arabic", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--ui);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--canary);
  outline-offset: 3px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(520px, 58%);
  direction: ltr;
}

.auth-visual {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px clamp(30px, 4vw, 72px) 54px;
  overflow: hidden;
  color: var(--white);
  direction: rtl;
  background: var(--petrol-deep) url("assets/landing/hero-arabic-learning.webp") center / cover no-repeat;
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 35, 32, .38), rgba(3, 35, 32, .94));
}
.auth-visual > * { position: relative; z-index: 1; }

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  direction: rtl;
}
.auth-brand > span:last-child { display: grid; line-height: 1.2; }
.auth-brand b { font-family: var(--display); font-size: 24px; }
.auth-brand small { margin-top: 3px; font-size: 10px; opacity: .76; }
.auth-brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--canary);
  color: var(--petrol-deep);
  font-family: var(--naskh);
  font-size: 30px;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 rgba(194, 169, 31, .24);
}
.visual-copy { max-width: 520px; }
.visual-copy > p {
  margin: 0 0 10px;
  color: var(--canary);
  font-size: 14px;
  font-weight: 800;
}
.visual-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.35;
}
.visual-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.visual-points span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  font-size: 12px;
  font-weight: 700;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 48px clamp(28px, 7vw, 110px);
  direction: rtl;
  background: var(--white);
}
.auth-panel-inner { width: min(100%, 520px); }
.auth-brand-mobile { display: none; }
.auth-heading { margin-bottom: 28px; }
.auth-kicker { margin: 0 0 7px; color: var(--canary-deep); font-weight: 800; }
.auth-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.35;
}
.auth-heading > p:last-child { margin: 10px 0 0; color: var(--muted); line-height: 1.8; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: #edf3ee;
}
.auth-tabs button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}
.auth-tabs button.active {
  color: var(--petrol);
  background: var(--white);
  box-shadow: 0 8px 24px -20px rgba(0, 65, 60, .5);
}
.google-button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 12px 28px -24px rgba(6, 46, 43, .7);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.google-button:hover {
  border-color: #aebdb6;
  background: #fbfdfb;
  box-shadow: 0 16px 30px -22px rgba(6, 46, 43, .55);
}
.google-button:disabled { cursor: wait; opacity: .68; }
.google-button img { width: 22px; height: 22px; flex: 0 0 auto; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
#authForm { display: grid; gap: 17px; }
.field { display: grid; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 800; }
.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdfb;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus {
  border-color: var(--petrol);
  box-shadow: 0 0 0 4px rgba(0, 65, 60, .08);
  outline: 0;
}
.password-field { position: relative; display: block; }
.password-field input { padding-inline-end: 78px; }
.password-field button {
  position: absolute;
  inset-inline-end: 8px;
  top: 8px;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: var(--petrol);
  background: #eaf2ed;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.form-actions { display: flex; justify-content: flex-start; margin-top: -6px; }
.text-button {
  padding: 2px 0;
  border: 0;
  color: var(--petrol);
  background: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.auth-message { min-height: 24px; color: #9b2d24; font-size: 13px; font-weight: 700; line-height: 1.7; }
.auth-message.success { color: #237557; }
.submit-button {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--petrol);
  box-shadow: 0 18px 30px -22px rgba(0, 65, 60, .7);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.submit-button:hover { background: #07534d; }
.submit-button:disabled { cursor: wait; opacity: .68; }
.auth-note { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.back-home { display: inline-block; margin-top: 18px; color: var(--petrol); font-size: 13px; font-weight: 800; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100svh; padding: 28px 20px 42px; align-items: start; }
  .auth-brand-mobile { display: inline-flex; margin-bottom: 48px; }
  .auth-heading h2 { font-size: 29px; }
}

@media (max-width: 420px) {
  .auth-panel { padding-inline: 18px; }
  .auth-brand-mobile { margin-bottom: 34px; }
  .auth-brand-mark { width: 44px; height: 44px; font-size: 27px; }
  .auth-tabs button { min-height: 44px; font-size: 13px; }
}
