/* Login / signup / password pages (layouts/auth.html) and the public plans (partials/pricing.html, /pricing).
   Desktop: dark side panel + form. Phone: a dark brand header with what the system is, the form on a sheet
   above it, and a footer with «الباقات والأسعار». */
.auth-main { flex-direction: column; justify-content: center; gap: 24px; }
.auth-body { width: 100%; display: flex; justify-content: center; }
.auth-hero { display: none; }
.auth-hero {
  flex-direction: column; gap: 12px; position: relative; overflow: hidden; width: 100%;
  padding: max(22px, env(safe-area-inset-top)) 20px 44px; background: var(--nav-bg); color: var(--nav-text);
}
.auth-hero > * { position: relative; }
.auth-hero .grid-art {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--nav-border) 1px, transparent 1px), linear-gradient(90deg, var(--nav-border) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: radial-gradient(ellipse at 80% 0%, #000 15%, transparent 70%);
}
.auth-hero .brand-name b { color: var(--nav-text); font-size: 17px; }
.auth-hero .brand-name small { color: var(--nav-muted); }
.auth-hero-t { margin: 4px 0 0; font-family: "Noto Kufi Arabic", "Almarai", sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.6; }
.auth-hero-t em { font-style: normal; color: var(--primary); }
.auth-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.auth-chips li {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 12px;
  background: var(--nav-active); border: 1px solid var(--nav-border); color: var(--nav-text);
}
.auth-chips svg { color: var(--primary); }
.auth.wide .auth-hero { display: flex; }
.auth-footer { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.auth-footer .legal-links { margin: 0; }
.auth-copy { font-size: 12px; color: var(--muted); }
.auth-pricing-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700;
}
.auth-pricing-btn:hover { border-color: var(--primary); color: var(--primary); }
.auth-pricing-btn svg { color: var(--primary); }
.auth-side-pricing {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--nav-border); background: var(--nav-active); color: var(--nav-text); font: inherit; font-weight: 700;
  font-size: 14px; cursor: pointer;
}
.auth-side-pricing:hover { border-color: var(--primary); }
.auth-side-pricing svg:first-child { color: var(--primary); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-new svg { color: var(--primary); }
/* first visit only (login.html removes it for a browser that already logged in here) */
.auth-newcomer { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1.5px solid var(--primary); border-radius: 14px; background: var(--surface); }
.auth-newcomer-t { font-weight: 700; font-size: 1.05rem; }
.auth-newcomer p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
  .auth-hero { display: flex; }
  body.auth-page { background: var(--nav-bg); }
  .auth { min-height: 100dvh; background: var(--nav-bg); }
  .auth-main { padding: 0; justify-content: flex-start; gap: 0; min-height: 100dvh; }
  .auth-body {
    flex: 1; margin-top: -24px; position: relative; z-index: 1; background: var(--surface);
    border-radius: 24px 24px 0 0; padding: 26px 20px 8px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
  }
  .auth-card { gap: 16px; }
  .auth-card h1 { font-size: 1.45rem; }
  .auth-footer { max-width: none; background: var(--surface); padding: 12px 20px max(20px, env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------- public plans (.pr-*) */
/* the plan cards (.pr-*) are in pricing_cards.css */

/* /pricing page */
.pricing-page { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 18px; }
.pricing-page > h1 { font-size: 1.6rem; text-align: center; margin: 0; }
.pricing-page > p { text-align: center; color: var(--muted); margin: 0; }
.pricing-page .pr-login { text-align: center; font-size: 13.5px; color: var(--muted); }

/* /pricing: one column on every screen, the brand header on top */
.auth.wide { grid-template-columns: minmax(0, 1fr); }
.auth.wide .auth-side { display: none; }
.auth.wide .auth-main { padding: 0; justify-content: flex-start; gap: 0; }
.auth.wide .auth-hero { padding: 26px max(20px, calc((100% - 980px) / 2)) 48px; }
.auth.wide .auth-body { margin-top: -24px; position: relative; z-index: 1; background: var(--surface); border-radius: 24px 24px 0 0; padding: 28px 20px 8px; }
.auth.wide .auth-footer { max-width: none; padding: 16px 20px 24px; }

/* ================================================================ motion (layouts/auth.html, js/pages/auth-fx.js)
   Same pages, same look - only movement: the page settles in once, the side panel breathes slowly, a sale is rung
   up on a small receipt, and «ادخل» answers at once while the server works. Pure CSS on load (nothing is hidden
   when scripts are off); everything stops for devices that ask for reduced motion. */
@keyframes fx-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fx-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-60px, 40px) scale(1.12); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes fx-pan { from { background-position: 0 0, 0 0; } to { background-position: 0 44px, 44px 0; } }
@keyframes fx-shake { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } 90% { transform: translateX(1px); } }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes fx-shine { from { transform: translateX(120%); } to { transform: translateX(-120%); } }

/* side panel: a warm light moving slowly behind the grid, the grid itself drifting */
.auth-side .grid-art { animation: fx-pan 14s linear infinite; }
.auth-glow { position: absolute; width: 560px; height: 560px; top: -140px; left: -160px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(212, 70, 28, .30), rgba(212, 70, 28, .08) 45%, transparent 70%);
  filter: blur(10px); animation: fx-drift 18s ease-in-out infinite; }
.auth-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-side > .auth-top { animation: fx-fade .6s .05s both; }
.auth-side h2.fx-h > * { display: inline; }
.auth-side h2.fx-h { animation: fx-up .7s .12s cubic-bezier(.2, .8, .2, 1) both; }
.auth-side h2 em { position: relative; white-space: nowrap; }
.auth-side h2 em::after { content: ""; position: absolute; right: 0; left: 0; bottom: -2px; height: 3px; border-radius: 2px; background: var(--primary);
  transform-origin: right; animation: fx-line .7s .75s cubic-bezier(.6, 0, .2, 1) both; opacity: .9; }
.auth-side .feat > div { animation: fx-up .55s cubic-bezier(.2, .8, .2, 1) both; }
.auth-side .feat > div:nth-child(1) { animation-delay: .3s; }
.auth-side .feat > div:nth-child(2) { animation-delay: .4s; }
.auth-side .feat > div:nth-child(3) { animation-delay: .5s; }
.auth-side .feat .tile-ic { transition: transform .25s, background .25s; }
.auth-side .feat > div:hover .tile-ic { transform: translateY(-2px); background: rgba(212, 70, 28, .18); }
.auth-side-pricing { animation: fx-up .55s .6s cubic-bezier(.2, .8, .2, 1) both; transition: border-color .2s, transform .2s; }
.auth-side-pricing:hover { transform: translateX(-3px); }

/* the receipt: a sale rung up line by line, the total, then «اتدفعت» (auth-fx.js loops it while the tab is visible) */
.auth-receipt { position: absolute; z-index: 1; top: 96px; left: 40px; width: 230px; padding: 14px 16px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .8); color: var(--nav-text); font-size: 12.5px;
  animation: fx-up .7s .7s cubic-bezier(.2, .8, .2, 1) both, fx-bob 7s 1.4s ease-in-out infinite; }
.ar-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, .14); }
.ar-head b { font-size: 13px; }
.ar-head small { margin-inline-start: auto; color: var(--nav-muted); font-family: var(--font-mono); }
.ar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(23, 128, 79, .25); }
.ar-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 66px; }
.ar-lines li { display: flex; justify-content: space-between; gap: 10px; color: var(--nav-muted); }
.ar-lines li b { color: var(--nav-text); font-family: var(--font-mono); font-weight: 700; }
.ar-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); }
.ar-total b { font-size: 16px; color: #fff; }
.ar-total b span { font-family: var(--font-mono); }
.ar-paid { position: absolute; bottom: -12px; left: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  background: var(--ok); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 6px 14px -6px rgba(23, 128, 79, .9); }
/* the loop (data-step on the receipt, set by auth-fx.js): lines appear, the total counts, the paid stamp lands */
.auth-receipt[data-step] .ar-lines li { opacity: 0; transform: translateX(10px); transition: opacity .3s, transform .3s; }
.auth-receipt[data-step] .ar-paid { opacity: 0; transform: scale(1.6) rotate(-8deg); transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.auth-receipt[data-step="1"] .ar-lines li:nth-child(-n+1), .auth-receipt[data-step="2"] .ar-lines li:nth-child(-n+2),
.auth-receipt[data-step="3"] .ar-lines li, .auth-receipt[data-step="4"] .ar-lines li { opacity: 1; transform: none; }
.auth-receipt[data-step="4"] .ar-paid { opacity: 1; transform: rotate(-4deg); }
@media (max-height: 760px), (max-width: 1180px) { .auth-receipt { display: none; } }
.auth-receipt .ar-lines, .auth-receipt .ar-kind { transition: opacity .25s; }
.auth-receipt.is-swap .ar-lines, .auth-receipt.is-swap .ar-kind { opacity: 0; }
.ar-kind { padding: 1px 8px; border-radius: 999px; background: rgba(212, 70, 28, .18); color: #FFB59C; font-size: 11px; font-weight: 700; }
.ar-lines li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- ambient (html.amb-*, auth-fx.js): "auto" with no
   feast - the side panel changes with the hour of this device: morning light / goods floating at noon / an aurora at
   sunset / stars and shooting stars at night. Low contrast, behind the text. */
.amb { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
html.amb-morning .amb-morning, html.amb-noon .amb-noon, html.amb-evening .amb-evening, html.amb-night .amb-night { display: block; animation: fx-fade 1.4s .2s both; }
html.amb-morning .auth-glow, html.amb-evening .auth-glow { opacity: .55; }
/* morning: soft rays from the top corner, a warm sun, dust floating in the light */
.amb-sun { position: absolute; top: -90px; left: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 150, .5), rgba(255, 170, 90, .14) 45%, transparent 70%); animation: amb-breathe 6s ease-in-out infinite; }
.amb-ray { position: absolute; top: -20%; left: -10%; width: 140%; height: 70px; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 220, 160, .16), rgba(255, 220, 160, .05) 55%, transparent 80%);
  transform: rotate(calc(18deg + var(--i) * 9deg)); animation: amb-ray 9s calc(var(--i) * -1.7s) ease-in-out infinite; filter: blur(2px); }
.amb-dust { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 228, 180, .7);
  animation: amb-dust 11s var(--d) ease-in-out infinite; }
@keyframes amb-breathe { 50% { transform: scale(1.12); opacity: .8; } }
@keyframes amb-ray { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes amb-dust { 0%, 100% { transform: translate(0, 0); opacity: .2; } 50% { transform: translate(18px, -26px); opacity: .9; } }
/* noon: the things a shop sells and counts, drifting up slowly */
.amb-ic { position: absolute; left: var(--x); bottom: -40px; color: rgba(255, 255, 255, .26); animation: amb-float var(--t) var(--d) linear infinite; }
.amb-ic:nth-child(3n) { color: rgba(240, 100, 58, .6); }
@keyframes amb-float { from { transform: translateY(0) rotate(-8deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; }
  to { transform: translateY(calc(-100vh - 80px)) rotate(10deg); opacity: 0; } }
/* sunset: an aurora of warm and cool light moving slowly */
.amb-au { position: absolute; border-radius: 50%; filter: blur(36px); opacity: .85; }
.amb-au1 { width: 70%; height: 38%; top: 8%; left: -10%; background: radial-gradient(closest-side, rgba(240, 100, 58, .55), transparent); animation: amb-au 16s ease-in-out infinite; }
.amb-au2 { width: 60%; height: 34%; top: 30%; left: 40%; background: radial-gradient(closest-side, rgba(150, 80, 200, .45), transparent); animation: amb-au 19s -6s ease-in-out infinite reverse; }
.amb-au3 { width: 55%; height: 30%; bottom: 6%; left: 5%; background: radial-gradient(closest-side, rgba(47, 158, 122, .35), transparent); animation: amb-au 22s -11s ease-in-out infinite; }
@keyframes amb-au { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(12%, 8%) scale(1.15); } 66% { transform: translate(-8%, 4%) scale(.92); } }
/* night: stars, now and then a shooting star, a few fireflies */
.amb-star { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .7;
  animation: ss-tw 3.4s var(--d) ease-in-out infinite; }
.amb-shoot { position: absolute; top: var(--y); left: 105%; width: 120px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .9), transparent); transform: rotate(-20deg); animation: amb-shoot 10s var(--d) ease-in infinite; }
@keyframes amb-shoot { 0%, 88% { opacity: 0; transform: translate(0, 0) rotate(-20deg); } 89% { opacity: 1; } 100% { opacity: 0; transform: translate(-130%, 260px) rotate(-20deg); } }
.amb-fly { position: absolute; left: var(--x); top: var(--y); width: 5px; height: 5px; border-radius: 50%; background: #FFD27A;
  box-shadow: 0 0 10px 3px rgba(255, 196, 90, .55); animation: amb-fly 9s var(--d) ease-in-out infinite; }
@keyframes amb-fly { 0%, 100% { transform: translate(0, 0); opacity: .15; } 30% { opacity: .9; } 50% { transform: translate(24px, -30px); opacity: .5; } 75% { transform: translate(-14px, -12px); opacity: 1; } }
.amb-shoot { left: 100%; }
.auth-hero .amb-sun { width: 180px; height: 180px; top: -70px; left: -60px; }
.auth-hero .amb-ray { height: 46px; }

/* ---------------------------------------------------------------- seasons (html.season-*, set by auth-fx.js) */
.ss { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
html.season-ramadan .ss-ramadan, html.season-eid .ss-eid, html.season-christmas .ss-christmas { display: block; animation: fx-fade 1.2s .2s both; }
.ss-greet { display: none; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .2px;
  border: 1px solid rgba(246, 199, 106, .45); color: #F6C76A; background: rgba(246, 199, 106, .08); position: relative; overflow: hidden; }
.ss-greet > span { display: none; }
html.season-ramadan .ss-greet, html.season-eid .ss-greet, html.season-christmas .ss-greet { display: inline-block; animation: fx-up .6s .5s both; }
.auth-side .ss-greet { align-self: flex-start; margin-bottom: -10px; }
html.season-ramadan .sg-ramadan, html.season-eid .sg-eid, html.season-christmas .sg-christmas { display: inline; }
.ss-greet.is-custom { display: inline-block; animation: fx-up .6s .5s both; }
html.season-christmas .ss-greet { border-color: rgba(229, 72, 77, .45); color: #FFB3B5; background: rgba(229, 72, 77, .1); }
.ss-greet::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35), transparent 70%);
  transform: translateX(-120%); animation: ss-sheen 5s 1.4s ease-in-out infinite; }
@keyframes ss-sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Ramadan: a crescent, stars, and three fawanees swinging softly with a warm flicker */
.ss-crescent { position: absolute; top: 26px; left: 34px; filter: drop-shadow(0 0 18px rgba(246, 199, 106, .55)); animation: ss-glow 5s ease-in-out infinite; }
@keyframes ss-glow { 50% { filter: drop-shadow(0 0 30px rgba(246, 199, 106, .8)); } }
.ss-fanous { position: absolute; top: 0; left: var(--x); transform-origin: 50% 0; animation: ss-swing 4.6s var(--d) ease-in-out infinite; display: flex; flex-direction: column; align-items: center; }
.ss-fanous i { width: 1.5px; height: var(--h); background: linear-gradient(#C9A45C, rgba(201, 164, 92, .4)); }
.ss-fanous svg { margin-top: -1px; filter: drop-shadow(0 6px 18px rgba(255, 190, 90, .45)); }
.ss-glass { fill: #FFC870; animation: ss-flick 2.4s var(--d) ease-in-out infinite; }
@keyframes ss-swing { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }
@keyframes ss-flick { 0%, 100% { opacity: 1; } 40% { opacity: .78; } 60% { opacity: .95; } }
.ss-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #F6E3B0; box-shadow: 0 0 6px #F6E3B0; animation: ss-tw 3s ease-in-out infinite; }
@keyframes ss-tw { 50% { opacity: .25; transform: scale(.6); } }

/* Eid: colourful bunting swaying along the top and slow confetti */
.ss-bunting { position: absolute; top: 0; left: 0; right: 0; height: 46px; display: flex; justify-content: space-between; padding: 0 8px;
  border-top: 2px solid rgba(246, 199, 106, .5); }
.ss-bunting i { width: 26px; height: 32px; margin-top: 2px; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0;
  background: #F6C76A; animation: ss-flap 3s calc(var(--i) * -.21s) ease-in-out infinite; opacity: .92; }
.ss-bunting i:nth-child(4n+2) { background: #D4461C; } .ss-bunting i:nth-child(4n+3) { background: #2F9E7A; } .ss-bunting i:nth-child(4n) { background: #5B7DB1; }
@keyframes ss-flap { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-5deg); } }
.ss-confetti i { position: absolute; top: -12px; left: var(--x); width: 7px; height: 11px; border-radius: 2px; background: var(--c); opacity: .85;
  animation: ss-fall 9s var(--d) linear infinite; }
.ss-confetti i:nth-child(3n) { animation-duration: 12s; width: 6px; height: 6px; border-radius: 50%; }
.ss-confetti i:nth-child(3n+1) { animation-duration: 10.5s; animation-delay: calc(var(--d) * -6); }
@keyframes ss-fall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(-40px, 110vh) rotate(540deg); } }

/* Christmas - New Year: a string of soft lights blinking and light snow */
.ss-lights { position: absolute; top: 10px; left: 0; right: 0; height: 30px; display: flex; justify-content: space-between; padding: 0 10px;
  background: radial-gradient(ellipse at 50% -140%, transparent 70%, rgba(255, 255, 255, .22) 71%, transparent 73%) 0 0 / 100% 100%; }
.ss-lights i { width: 9px; height: 13px; border-radius: 50% 50% 45% 45%; margin-top: calc(10px * (1 - (var(--i) - 8.5) * (var(--i) - 8.5) / 72)); background: var(--c);
  box-shadow: 0 0 10px 2px var(--c); animation: ss-blink 2.4s calc(var(--i) * .27s) ease-in-out infinite; }
@keyframes ss-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; box-shadow: none; } }
.ss-snow i { position: absolute; top: -8px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .75;
  animation: ss-snow var(--t) var(--d) linear infinite; }
@keyframes ss-snow { from { transform: translate(0, 0); } 50% { transform: translate(14px, 55vh); } to { transform: translate(-6px, 110vh); } }

/* the phone header: smaller and out of the text's way */
.auth-hero .ss-bunting { height: 30px; } .auth-hero .ss-bunting i { width: 18px; height: 22px; }
.auth-hero .ss-lights { top: 4px; }
.auth-hero .auth-top { position: relative; }
.auth-hero .ss-greet { font-size: 11.5px; padding: 4px 10px; }
html.season-ramadan .auth-hero .auth-top, html.season-eid .auth-hero .auth-top, html.season-christmas .auth-hero .auth-top { padding-top: 10px; }

/* the form settles in, field after field */
.auth-card > * { animation: fx-up .5s cubic-bezier(.2, .8, .2, 1) both; }
.auth-card > :nth-child(1) { animation-delay: .04s; } .auth-card > :nth-child(2) { animation-delay: .08s; }
.auth-card > :nth-child(3) { animation-delay: .12s; } .auth-card > :nth-child(4) { animation-delay: .16s; }
.auth-card > :nth-child(5) { animation-delay: .2s; }  .auth-card > :nth-child(6) { animation-delay: .24s; }
.auth-card > :nth-child(7) { animation-delay: .28s; } .auth-card > :nth-child(8) { animation-delay: .32s; }
.auth-card > :nth-child(n+9) { animation-delay: .36s; }
.auth-card .input-icon .ic { transition: color .2s, transform .2s; }
.auth-card .input-icon:focus-within .ic { color: var(--primary); transform: translateY(-50%) scale(1.08); }
.auth-card .input-icon.is-done .ic { color: var(--ok); }
.auth-card .alert-bad { animation: fx-up .35s both, fx-shake .45s .1s; }
.auth-card.is-bad .input-lg { border-color: var(--bad); }

/* password: show / hide, and a caps-lock note (auth-fx.js) */
.pw-eye { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.pw-eye:hover { background: var(--surface-2); color: var(--text); }
.input-icon.has-eye .input { padding-left: 46px; }
.caps-note { display: none; font-size: 12.5px; color: var(--warn); font-weight: 700; }
.caps-note.is-on { display: block; animation: fx-up .25s both; }

/* «ادخل» answers at once: a spinner and a light sweep while the server checks, and the page eases back */
.auth-card .btn-primary { position: relative; overflow: hidden; transition: transform .12s, box-shadow .2s, filter .2s; }
.auth-card .btn-primary:hover { box-shadow: 0 10px 22px -12px rgba(212, 70, 28, .9); }
.auth-card .btn-primary:active { transform: scale(.985); }
.auth-card .btn-primary .fx-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: fx-spin .7s linear infinite; }
.auth-card.is-sending .btn-primary { pointer-events: none; }
.auth-card.is-sending .btn-primary .fx-spin { display: inline-block; }
.auth-card.is-sending .btn-primary svg { display: none; }
.auth-card.is-sending .btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  animation: fx-shine 1s linear infinite; }
.auth-card.is-sending > :not(.btn-primary):not(.alert) { opacity: .55; transition: opacity .3s; }

/* phone: the dark header and the sheet arrive together */
@media (max-width: 760px) {
  .auth-hero .brand { animation: fx-fade .5s both; }
  .auth-hero-t { animation: fx-up .55s .08s cubic-bezier(.2, .8, .2, 1) both; }
  .auth-chips li { animation: fx-up .45s cubic-bezier(.2, .8, .2, 1) both; }
  .auth-chips li:nth-child(1) { animation-delay: .16s; } .auth-chips li:nth-child(2) { animation-delay: .22s; } .auth-chips li:nth-child(3) { animation-delay: .28s; }
  .auth-hero::after { content: ""; position: absolute; width: 320px; height: 320px; top: -120px; left: -120px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(212, 70, 28, .32), transparent 68%); animation: fx-drift 16s ease-in-out infinite; }
  .auth-body { animation: fx-sheet .55s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes fx-sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* ---------------------------------------------------------------- the way in, phase 1 (auth-fx.js cover()):
   the dark covers the screen while the server checks; phase 2 is on the first page of the system (app.css) */
.fx-cover { position: fixed; inset: 0; z-index: 2000; color: var(--nav-text); display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.fx-bg { position: absolute; inset: 0; background: var(--nav-bg); overflow: hidden; will-change: transform; }
.fx-bg::before { content: ""; position: absolute; inset: 0; opacity: .45;
  background-image: linear-gradient(var(--nav-border) 1px, transparent 1px), linear-gradient(90deg, var(--nav-border) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 50%, #000 10%, transparent 65%); }
.fx-bg::after { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; left: calc(50% - 310px); top: calc(50% - 310px);
  background: radial-gradient(circle, rgba(212, 70, 28, .28), transparent 65%); }
.fx-cover-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: 0; transform: translateY(8px);
  transition: opacity .3s .22s, transform .4s .22s cubic-bezier(.2, .8, .2, 1); }
.fx-cover-in .brand-mark { width: 58px; height: 58px; font-size: 20px; border-radius: 16px; box-shadow: 0 16px 40px -14px rgba(212, 70, 28, .9); }
.fx-cover-in b { font-family: var(--font-display); font-size: 18px; letter-spacing: .3px; }
.fx-bar { width: 140px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; position: relative; }
.fx-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 3px; background: var(--primary); animation: fx-load 1s ease-in-out infinite; }
@keyframes fx-load { from { transform: translateX(260%); } to { transform: translateX(-120%); } }
.fx-cover.is-on .fx-cover-in { opacity: 1; transform: none; }
.fx-cover .fx-bg { transition: transform .5s cubic-bezier(.7, 0, .2, 1); }

@media (prefers-reduced-motion: reduce) {
  .auth *, .auth *::before, .auth *::after { animation: none !important; transition: none !important; }
  .auth-card.is-sending .btn-primary .fx-spin { animation: fx-spin 1.4s linear infinite !important; }
}
.auth-side > .col, .auth-side > .tiny { z-index: 1; }

/* signup (2026-10-18): the company code / username suggestion sits above the field, a tap types it */
.sug-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 4px 10px;
  border: 1px dashed var(--primary); border-radius: 999px; background: color-mix(in srgb, var(--primary) 7%, transparent);
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.sug-chip[hidden] { display: none; }
.sug-chip b { color: var(--primary); font-family: var(--font-mono, monospace); }
.sug-chip span { color: var(--muted); font-size: 12px; }

/* «دولة المحل» + «متنساش كود الشركة» on the signup page (2026-11-09d) */
.su-remember { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 10px 12px; border-radius: var(--r);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  font-size: 13px; line-height: 1.6; }
.su-remember svg { flex: none; margin-top: 3px; color: var(--warn); }
.su-country { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--border);
  border-radius: var(--r); font-size: 13px; color: var(--muted); }
.su-country label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.su-country .select { width: auto; min-width: 140px; height: 36px; font-size: 14px; }
.su-country-note { font-size: 12px; }
.su-other { font-size: 13px; }
.su-other a { font-weight: 700; margin-inline-start: 6px; white-space: nowrap; }

/* «دولة المحل» picker (2026-11-09e): a quiet flag button + its list */
.cty { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.cty-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; }
.cty-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, var(--border)); }
.cty-flag { display: inline-flex; width: 21px; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.cty-flag svg { width: 100%; height: 100%; display: block; }
.cty-caret { width: 9px; height: 6px; opacity: .6; }
.cty-menu { position: absolute; z-index: 30; bottom: calc(100% + 6px); min-width: 230px; padding: 6px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 16px 40px -12px rgba(0,0,0,.28); }
.cty-menu-h { padding: 6px 8px 8px; font-size: 12.5px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.cty-menu-h small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.cty-menu-f { padding: 8px 8px 4px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 4px; }
.cty-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--text); text-align: start; }
.cty-opt:hover, .cty-opt.on { background: var(--surface-2); }
.cty-opt.on { font-weight: 700; }
.cty-opt-dial { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.cty-other { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.cty-other svg { flex: none; margin-top: 3px; color: var(--warn); }
.cty-other a { font-weight: 700; white-space: nowrap; }
/* a: the card's last line */
.cty-bottom { display: flex; flex-direction: column; align-items: center; margin-top: -4px; }
.cty-a .cty-btn { border-color: transparent; background: transparent; }
.cty-a .cty-btn:hover { border-color: var(--border); }
/* each card row is its own layer (the entry animation): the row with the open list goes on top */
.auth-card > :has(.cty-menu:not([hidden])), .auth-form-grid > :has(.cty-menu:not([hidden])), .field:has(.cty-menu:not([hidden])) { position: relative; z-index: 60; }
.cty-menu { z-index: 60; }
