/* Anjzha Auth — immersive cream + teal experience */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700;800&display=swap');

:root {
  --auth-primary: #79B4B7;
  --auth-primary-alt: #62999C;
  --auth-primary-dark: #528386;
  --auth-grad: linear-gradient(135deg, #79B4B7 0%, #528386 100%);
  --auth-cream: #FEFBF3;
  --auth-sand: #F8F0DF;
  --auth-line: #E5DDCB;
  --auth-ink: #1A202C;
  --auth-soft: #2D3748;
  --auth-muted: #9D9D9D;
  --auth-white: #FFFFFF;
  --auth-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html.auth-html {
  background: var(--auth-cream);
  -webkit-text-size-adjust: 100%;
}

body.auth-shell {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color: var(--auth-ink);
  background: var(--auth-cream);
  display: grid;
  grid-template-columns: 1fr;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

@keyframes authRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes authDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 14px) scale(1.04); }
}
@keyframes authDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(16px, -20px) scale(1.06); }
}
@keyframes authSheen {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes authPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---- Visual panel ---- */
.auth-visual {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 3.25rem);
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 15% 10%, rgba(121, 180, 183, 0.28), transparent 55%),
    radial-gradient(70% 55% at 90% 85%, rgba(82, 131, 134, 0.18), transparent 50%),
    linear-gradient(160deg, #F8F0DF 0%, #FEFBF3 45%, #F0E6D0 100%);
  color: var(--auth-ink);
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-visual-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}
.auth-visual-orb.o1 {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  top: -12%;
  inset-inline-end: -10%;
  background: radial-gradient(circle, rgba(121, 180, 183, 0.45), transparent 68%);
  animation: authDrift 11s ease-in-out infinite;
}
.auth-visual-orb.o2 {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  bottom: 8%;
  inset-inline-start: -8%;
  background: radial-gradient(circle, rgba(82, 131, 134, 0.28), transparent 70%);
  animation: authDrift2 14s ease-in-out infinite;
}

.auth-visual-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(82, 131, 134, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 131, 134, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 40% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 40% 30%, black 20%, transparent 75%);
}

.auth-visual-top,
.auth-visual-mid,
.auth-visual-bot {
  position: relative;
  z-index: 1;
}

.auth-visual-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  animation: authRise 0.7s var(--auth-ease) both;
}
.auth-visual-brand img {
  height: 36px;
  width: auto;
}

.auth-visual-mid {
  max-width: 28rem;
  animation: authRise 0.8s var(--auth-ease) 0.1s both;
}
.auth-visual-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--auth-primary-dark);
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}
.auth-visual-kicker::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--auth-grad);
  border-radius: 2px;
}
.auth-visual-mid h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--auth-ink);
}
.auth-visual-mid p {
  margin: 0;
  color: var(--auth-soft);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 34ch;
  opacity: 0.9;
}

.auth-visual-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin-top: 2rem;
  animation: authRise 0.8s var(--auth-ease) 0.2s both;
}
.auth-visual-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--auth-primary-dark);
  letter-spacing: -0.02em;
}
.auth-visual-stat span {
  font-size: 0.8rem;
  color: var(--auth-muted);
  font-weight: 600;
}

.auth-visual-bot {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--auth-soft);
  font-size: 0.88rem;
  font-weight: 600;
  animation: authRise 0.8s var(--auth-ease) 0.28s both;
}
.auth-visual-bot i {
  width: 22px;
  height: 22px;
  color: var(--auth-primary-dark);
}

/* ---- Form panel ---- */
.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.5rem);
  background: var(--auth-cream);
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 100% 0%, rgba(121, 180, 183, 0.1), transparent 60%),
    radial-gradient(50% 35% at 0% 100%, rgba(248, 240, 223, 0.9), transparent 55%);
}

.auth-panel-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  animation: authRise 0.65s var(--auth-ease) both;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--auth-muted);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  transition: color 0.2s ease;
}
.auth-back:hover { color: var(--auth-primary-dark); }
.auth-back i { width: 16px; height: 16px; }

.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}
.auth-mobile-brand img {
  height: 32px;
  width: auto;
}

.auth-head {
  margin-bottom: 1.75rem;
}
.auth-head-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--auth-grad);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 10px 28px rgba(121, 180, 183, 0.35);
  animation: authPulse 4s ease-in-out infinite;
}
.auth-head-icon i { width: 24px; height: 24px; }
.auth-head h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
  line-height: 1.3;
}
.auth-head p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.auth-form .form-group { margin-bottom: 1.15rem; }
.auth-form .form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--auth-soft);
  margin-bottom: 0.45rem;
}
.auth-form .form-control {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--auth-line);
  border-radius: 14px;
  background: var(--auth-white);
  color: var(--auth-ink);
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-form .form-control:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(121, 180, 183, 0.18);
}
.auth-form .form-control::placeholder { color: #B8B0A0; }

.auth-form .input-wrap { position: relative; }
.auth-form .input-wrap .form-control { padding-inline-start: 2.75rem; }
.auth-form .toggle-pass {
  position: absolute;
  inset-inline-start: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--auth-muted);
  padding: 0.35rem;
  display: grid;
  place-items: center;
}
.auth-form .toggle-pass:hover { color: var(--auth-primary-dark); }

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.auth-label-row .form-label { margin: 0; }
.auth-forgot {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--auth-primary-dark);
}
.auth-forgot:hover { color: var(--auth-primary); }

.auth-submit {
  width: 100%;
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 16px;
  background: var(--auth-grad);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(121, 180, 183, 0.32);
  transition: transform 0.2s var(--auth-ease), box-shadow 0.2s ease;
  animation: authSheen 8s ease infinite alternate;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(82, 131, 134, 0.38);
}
.auth-submit:active { transform: scale(0.98); }
.auth-submit i { width: 20px; height: 20px; }

.auth-foot {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--auth-line);
  text-align: center;
  font-size: 0.92rem;
  color: var(--auth-muted);
}
.auth-foot a {
  color: var(--auth-primary-dark);
  font-weight: 800;
  margin-inline-start: 0.35rem;
}
.auth-foot a:hover { color: var(--auth-primary); }

.auth-error {
  background: rgba(239, 68, 68, 0.08);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.auth-info {
  background: rgba(121, 180, 183, 0.12);
  color: var(--auth-primary-dark);
  border: 1px solid rgba(121, 180, 183, 0.28);
  padding: 1rem 1.1rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.auth-info.success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}

.auth-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.auth-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(121, 180, 183, 0.08);
  border: 1px solid rgba(121, 180, 183, 0.16);
  color: var(--auth-soft);
  font-size: 0.75rem;
  font-weight: 650;
}
.auth-trust i {
  width: 14px;
  height: 14px;
  color: var(--auth-primary-dark);
}

/* Desktop split */
@media (min-width: 920px) {
  body.auth-shell {
    grid-template-columns: minmax(340px, 1.05fr) minmax(380px, 0.95fr);
  }
  .auth-visual { display: flex; }
  .auth-mobile-brand { display: none; }
  .auth-panel {
    border-inline-start: 1px solid var(--auth-line);
  }
}

@media (max-width: 919px) {
  .auth-panel {
    padding-top: 1.35rem;
    padding-bottom: 2.5rem;
  }
}
