/* ==========================================================================
   Student OS — sign in / sign up / recovery pages, in the landing page's style.
   Phones: branded header on the dark gradient, the form as a sheet below it.
   Wide screens: showcase panel on one side, the form on the other.
   ========================================================================== */

.ax {
  --ax-ink: #0f0d2e;
  --ax-ink-2: #1e1b4b;
  --ax-a: #6366f1;
  --ax-b: #8b5cf6;
  --ax-pink: #ec4899;
  --ax-gutter: clamp(16px, 5vw, 28px);
  display: block; place-items: initial; padding: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(120% 70% at 50% 0%, #2a2470 0%, var(--ax-ink-2) 42%, var(--ax-ink) 100%);
  overflow-x: clip;
}
.ax .icon { flex-shrink: 0; }

/* Decorative background */
.ax-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ax-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.ax-glow-1 { width: 360px; height: 360px; background: var(--ax-b); inset-block-start: -140px; inset-inline-end: -120px; }
.ax-glow-2 { width: 300px; height: 300px; background: var(--ax-pink); inset-block-start: 180px; inset-inline-start: -160px; opacity: .3; }
.ax-grid { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 65%); mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 65%); }

.ax-shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Showcase / phone header */
.ax-show { color: #fff; padding: calc(12px + env(safe-area-inset-top)) max(var(--ax-gutter), env(safe-area-inset-right)) 0 max(var(--ax-gutter), env(safe-area-inset-left)); }
.ax-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; }
.ax-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.12rem; direction: ltr; }
.ax-brand:hover { text-decoration: none; color: #fff; }
.ax-brand img { border-radius: 10px; box-shadow: 0 4px 14px rgba(99, 102, 241, .55); }
.ax-lang { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: rgba(255, 255, 255, .88); font-weight: 600; font-size: .88rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.ax-lang:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .14); }
.ax-show-body { padding: 18px 0 26px; text-align: center; }
.ax-title { margin: 0; font-size: clamp(1.7rem, 8.5vw, 2.3rem); font-weight: 900; line-height: 1.15; color: #fff; }
.ax-gradient { background: linear-gradient(90deg, #a5b4fc, #f0abfc, #67e8f9, #a5b4fc); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ax-shine 8s linear infinite; display: inline-block; padding-bottom: .06em; }
.ax-sub { margin: 8px auto 0; max-width: 420px; color: rgba(255, 255, 255, .75); font-size: .95rem; }
.ax-points, .ax-chips, .ax-trial { display: none; }

/* The form: a sheet on phones */
.ax-main { flex: 1; display: flex; flex-direction: column; }
.ax .auth-card { position: relative; flex: 1; width: 100%; max-width: none; margin: 0; border: 0; border-radius: 28px 28px 0 0; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .55); padding: 28px max(var(--ax-gutter), env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(var(--ax-gutter), env(safe-area-inset-left)); animation: ax-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.ax .auth-card::before { content: ""; position: absolute; inset-block-start: 10px; inset-inline-start: 50%; width: 42px; height: 5px; border-radius: 999px; background: var(--border-strong); transform: translateX(-50%); opacity: .7; }
[dir="rtl"].ax .auth-card::before, [dir="rtl"] .ax .auth-card::before { transform: translateX(50%); }
.ax .auth-card > .brand { display: none; }
.ax .auth-card h1 { margin: 6px 0 6px; font-size: 1.6rem; font-weight: 850; letter-spacing: -.01em; }
.ax .auth-card > .muted { font-size: .95rem; line-height: 1.6; }
.ax .auth-card .form { gap: 16px; margin-top: 22px; }

/* Fields: 16px text so iPhones do not zoom in; big touch targets */
.ax .field > label, .ax .field-label { font-size: .88rem; font-weight: 700; color: var(--text-2); }
.ax input.input { height: 52px; font-size: 16px; border-radius: 14px; padding: 0 16px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color .15s, background .15s, box-shadow .15s; }
.ax input.input:hover { border-color: var(--border-strong); }
.ax input.input:focus { background: var(--surface); border-color: var(--ax-a); box-shadow: 0 0 0 4px rgba(99, 102, 241, .18); }
.ax input.input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.ax .field .hint { font-size: .8rem; }
.ax .field .error { font-size: .84rem; font-weight: 600; }
.ax .field .row-between a { font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; padding-inline: 4px; }

/* Password show/hide */
/* Passwords are typed left-to-right in both languages, so the button is placed physically:
   on the left in Arabic pages (the text is right-aligned there), on the right in English. */
.ax-pass { position: relative; }
.ax-pass input.input { padding-right: 52px; }
[dir="rtl"] .ax-pass input.input { padding-right: 16px; padding-left: 52px; text-align: right; }
.ax-eye { position: absolute; inset-block-start: 50%; right: 6px; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 12px; background: none; color: var(--text-3); display: grid; place-items: center; cursor: pointer; }
.ax-eye:hover { color: var(--text); background: var(--surface-3); }
[dir="rtl"] .ax-eye { right: auto; left: 6px; }

/* Buttons */
.ax .btn-lg { height: 54px; border-radius: 16px; font-size: 1.02rem; font-weight: 750; }
.ax .btn-primary { border: 0; background: linear-gradient(135deg, var(--ax-a), var(--ax-b)); color: #fff; box-shadow: 0 12px 28px -12px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .22); transition: transform .15s, filter .2s, box-shadow .2s; }
.ax .btn-primary:hover { background: linear-gradient(135deg, var(--ax-a), var(--ax-b)); filter: brightness(1.07); transform: translateY(-1px); }
.ax .btn-primary:active { transform: translateY(0); }
.ax .btn-primary[disabled] { filter: saturate(.6); opacity: .75; transform: none; }
.ax .btn-google { height: 54px; border-radius: 16px; margin-top: 18px; background: var(--surface); border: 1.5px solid var(--border-strong); font-size: 1rem; }
.ax .btn-google:hover { background: var(--surface-2); }
.ax .btn-whatsapp { height: 54px; border-radius: 16px; }
.ax .auth-divider { margin-top: 20px; }
.ax .auth-foot { margin-top: 22px; font-size: .95rem; }
.ax .auth-foot a { font-weight: 750; display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; }
.ax .alert { border-radius: 14px; }

/* Wider phones and small tablets: the form becomes a floating card */
@media (min-width: 560px) {
  .ax-main { align-items: center; padding: 0 var(--ax-gutter) 40px; }
  .ax .auth-card { flex: 0 0 auto; max-width: 460px; border-radius: 28px; padding: 36px 34px; box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .6); }
  .ax .auth-card::before { display: none; }
  .ax-show-body { padding-bottom: 30px; }
}

/* Desktop: showcase beside the form */
@media (min-width: 1000px) {
  .ax-shell { flex-direction: row; }
  .ax-show { flex: 1.1; display: flex; flex-direction: column; padding: 28px 56px; }
  .ax-show-body { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: start; max-width: 520px; padding: 0; }
  .ax-title { font-size: 3.2rem; }
  .ax-sub { margin: 16px 0 0; font-size: 1.1rem; }
  .ax-points { display: grid; gap: 14px; list-style: none; padding: 0; margin: 32px 0 0; }
  .ax-points li { display: flex; align-items: center; gap: 14px; font-weight: 650; color: rgba(255, 255, 255, .9); }
  .ax-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
  .ax-ico.tone-a { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
  .ax-ico.tone-b { background: linear-gradient(135deg, #ec4899, #f472b6); }
  .ax-ico.tone-c { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
  .ax-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
  .ax-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 14px; background: rgba(255, 255, 255, .95); font-size: .82rem; font-weight: 750; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); animation: ax-float 5s ease-in-out infinite; }
  .ax-chip .icon { width: 16px; height: 16px; }
  .ax-chip.c1 { color: #be185d; }
  .ax-chip.c2 { color: #15803d; animation-delay: -2.5s; }
  .ax-trial { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fde68a; font-weight: 700; align-self: flex-start; }
  .ax-main { flex: 1; justify-content: center; padding: 40px 56px; background: color-mix(in srgb, var(--bg) 96%, transparent); border-start-start-radius: 36px; border-end-start-radius: 36px; box-shadow: -30px 0 80px -40px rgba(0, 0, 0, .6); }
  [dir="rtl"] .ax-main { box-shadow: 30px 0 80px -40px rgba(0, 0, 0, .6); }
  .ax .auth-card { background: transparent; box-shadow: none; padding: 0; max-width: 420px; animation: none; }
}

/* Error pages: just the card, centred on the gradient */
.ax-solo { justify-content: center; }
.ax-solo .ax-main { flex: 0 0 auto; align-items: center; justify-content: center; padding: 24px var(--ax-gutter); background: none; box-shadow: none; border-radius: 0; }
.ax-solo .auth-card { flex: 0 0 auto; max-width: 460px; border-radius: 28px; padding: 36px 30px; background: var(--surface); box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .6); }
.ax-solo .auth-card::before { display: none; }
.ax-solo .auth-card h1 { font-size: 1.5rem; }

/* Landscape phones: keep the header short */
@media (max-height: 520px) and (orientation: landscape) {
  .ax-show-body { display: none; }
}

@keyframes ax-rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ax-shine { to { background-position: 300% 0; } }
@keyframes ax-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .ax *, .ax *::before { animation: none !important; transition: none !important; }
}
/* "X invited you" banner on the sign-up page */
.invite-banner { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(219, 39, 119, .18), rgba(124, 58, 237, .18)); border: 1px solid rgba(219, 39, 119, .35); }
.invite-banner .icon { color: #f472b6; flex: none; width: 22px; height: 22px; }
.invite-banner p { margin: 0; font-size: .9rem; font-weight: 650; line-height: 1.5; }

/* ---- shared class schedule (share.php) ---- */
.share-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .78rem; font-weight: 700; margin-top: 6px; }
.share-card h1 { margin-top: 10px; }
.share-sub { margin: 0 0 18px; }
.share-actions { display: grid; gap: 10px; }
.share-actions .btn-lg { height: 52px; border-radius: 16px; gap: 8px; }
.share-note { margin: 2px 0 0; text-align: center; line-height: 1.6; }
.share-list-title { font-size: .95rem; font-weight: 750; margin: 24px 0 10px; color: var(--text-2); }
.share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.share-course { position: relative; padding: 12px 14px 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.share-course::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--c); }
.share-course-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.share-slots { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.share-slots li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .84rem; padding: 6px 9px; border-radius: 10px; background: var(--surface-2); }
.share-slot-days { font-weight: 700; }
.share-slot-time { font-variant-numeric: tabular-nums; color: var(--text-2); }
.share-slot-kind { color: var(--text-3); font-size: .78rem; margin-inline-start: auto; }
.share-exams { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .78rem; color: var(--warning); font-weight: 650; }
.share-privacy { display: flex; gap: 6px; align-items: flex-start; margin: 16px 0 0; line-height: 1.6; }
.share-privacy .icon { flex: none; margin-top: 2px; }
.share-gone { text-align: center; padding: 20px 0; }
.share-gone-ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.share-gone-ico .icon { width: 28px; height: 28px; }
