/* ==========================================================================
   Auth Modern 2026 — صفحه ورود کاربر (مدرن، حرفه‌ای و رنگی)
   مستقل از style.css؛ همه‌ی کلاس‌ها با پیشوند am- هستند تا با استایل‌های
   قدیمی سایت (و !important های آن) تداخل نداشته باشند.
   ========================================================================== */

:root{
  --am-ink:#0f2a24;
  --am-muted:#5d726b;
  --am-line:#e1ece6;
  --am-field:#f6faf8;
  --am-emerald:#10b981;
  --am-teal:#0d9488;
  --am-sky:#0ea5e9;
  --am-violet:#8b5cf6;
  --am-coral:#fb7185;
  --am-gold:#f5b942;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}

.am-body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  position:relative;
  overflow-x:hidden;
  color:var(--am-ink);
  background:#f4faf7;
  font-family:'RestaurantArabic','Vazirmatn',Tahoma,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.am-body button,.am-body input{font-family:inherit}

/* ---------- Background ---------- */
.am-bg{
  position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;
  background:
    radial-gradient(60% 50% at 8% 10%,#c8f3df 0,transparent 62%),
    radial-gradient(50% 45% at 94% 6%,#cde7ff 0,transparent 62%),
    radial-gradient(55% 50% at 92% 96%,#ffe7b8 0,transparent 62%),
    radial-gradient(45% 45% at 4% 94%,#ffd7e0 0,transparent 62%),
    #f4faf7;
}
.am-orb{position:absolute;border-radius:50%;filter:blur(64px);opacity:.5;animation:am-float 20s ease-in-out infinite}
.am-orb.o1{width:340px;height:340px;background:#34d399;top:-90px;right:-70px}
.am-orb.o2{width:300px;height:300px;background:#38bdf8;bottom:-100px;left:-80px;animation-delay:-7s}
.am-orb.o3{width:220px;height:220px;background:#fbbf24;top:52%;right:10%;opacity:.32;animation-delay:-12s}

/* ---------- Top bar ---------- */
.am-topbar{
  position:relative;z-index:5;
  width:min(1080px,calc(100% - 32px));
  margin:18px auto 0;
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
}
.am-spacer{flex:1}
.am-pill{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:42px;padding:8px 16px;
  border-radius:999px;
  border:1px solid rgba(15,42,36,.08);
  background:rgba(255,255,255,.78);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  color:var(--am-ink);
  font-size:14px;font-weight:700;line-height:1;text-decoration:none;white-space:nowrap;cursor:pointer;
  box-shadow:0 6px 18px rgba(6,57,44,.07);
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
.am-pill:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(6,57,44,.13);background:#fff}
.am-pill svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.am-pill.is-home{color:#065f46}
.am-pill.is-admin{
  background:linear-gradient(135deg,#fde68a,#f5b942);
  border-color:transparent;color:#4a3208;
  box-shadow:0 8px 20px rgba(245,185,66,.35);
}
.am-pill.is-admin:hover{background:linear-gradient(135deg,#fef08a,#f5b942)}
/* دکمه زبان: app.js متن دکمه را با textContent عوض می‌کند، پس آیکن با ::before ساخته می‌شود */
.am-lang::before{
  content:"";width:18px;height:18px;flex:none;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E") center/contain no-repeat;
}
.am-lang{color:#0369a1}

/* ---------- Layout ---------- */
.am-main{position:relative;z-index:2;flex:1;display:grid;place-items:center;padding:22px 16px 44px}

.am-shell{
  position:relative;
  width:min(1080px,100%);
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,1fr);
  background:#fff;
  border-radius:32px;
  overflow:hidden;
  box-shadow:0 44px 90px -24px rgba(6,57,44,.32),0 10px 28px rgba(6,57,44,.08);
  animation:am-rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.am-shell::before{
  content:"";position:absolute;top:0;right:0;left:0;height:5px;z-index:4;
  background:linear-gradient(90deg,#10b981,#0ea5e9,#8b5cf6,#fb7185,#f5b942);
}

/* ---------- Form panel ---------- */
.am-form-panel{padding:clamp(28px,5vw,56px);display:flex;flex-direction:column;justify-content:center;min-width:0}

.am-eyebrow{
  align-self:flex-start;
  display:inline-flex;align-items:center;gap:9px;
  padding:7px 15px;border-radius:999px;
  background:linear-gradient(135deg,#d1fae5,#cffafe);
  color:#065f46;font-size:13px;font-weight:800;
}
.am-eyebrow::before{
  content:"";width:8px;height:8px;border-radius:50%;
  background:linear-gradient(135deg,#10b981,#0ea5e9);
  box-shadow:0 0 0 4px rgba(16,185,129,.18);
}
.am-title{
  margin:16px 0 8px;text-wrap:balance;
  font-size:clamp(28px,4vw,38px);line-height:1.4;font-weight:700;
  background:linear-gradient(90deg,#065f46 0%,#0e7490 60%,#6d28d9 100%);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
}
.am-lead{margin:0 0 6px;color:var(--am-muted);font-size:15px;line-height:2}

/* ---------- Alerts ---------- */
.am-alert{
  display:flex;align-items:flex-start;gap:12px;
  margin:16px 0 2px;padding:14px 16px;border-radius:16px;
  font-size:14.5px;line-height:1.9;
  animation:am-rise .4s ease both;
}
.am-alert svg{width:22px;height:22px;flex:none;margin-top:3px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.am-alert.success{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46}
.am-alert.error{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239;animation:am-rise .4s ease both,am-shake .5s .35s ease}

/* ---------- Fields ---------- */
.am-form{margin-top:12px}
.am-field{margin-top:16px}
.am-field label{display:block;margin:0 2px 8px;font-size:14px;font-weight:800;color:#1f4a3d}
.am-input{
  display:flex;align-items:center;
  border:1.5px solid var(--am-line);border-radius:16px;
  background:var(--am-field);
  transition:border-color .2s,box-shadow .2s,background .2s;
}
.am-input:hover{border-color:#c5dcd2}
.am-input:focus-within{
  border-color:#14b8a6;background:#fff;
  box-shadow:0 0 0 5px rgba(20,184,166,.16);
}
.am-input>svg{
  width:20px;height:20px;flex:none;margin-inline-start:16px;
  stroke:#8ea59c;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
  transition:stroke .2s;
}
.am-input:focus-within>svg{stroke:#0d9488}
.am-input input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  padding:16px 12px;font-size:16px;color:var(--am-ink);
  direction:ltr;text-align:right;
}
.am-input input::placeholder{color:#a3b5ae;opacity:1;direction:ltr}
.am-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px #eef8f4 inset;-webkit-text-fill-color:var(--am-ink)}

.am-eye{
  border:0;background:transparent;cursor:pointer;
  align-self:stretch;padding:0 16px;display:grid;place-items:center;
  color:#7f968d;
  transition:color .2s;
}
.am-eye:hover{color:#0d9488}
.am-eye svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.am-eye .i-hide{display:none}
.am-eye.on .i-show{display:none}
.am-eye.on .i-hide{display:block}

/* ---------- Submit ---------- */
.am-submit{
  position:relative;width:100%;min-height:56px;margin-top:22px;
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  border:0;border-radius:16px;cursor:pointer;
  color:#fff;font-size:17px;font-weight:800;
  background:linear-gradient(120deg,#059669 0%,#0d9488 48%,#0284c7 100%);
  background-size:180% 100%;background-position:0 0;
  box-shadow:0 16px 32px -10px rgba(13,148,136,.6);
  transition:transform .2s ease,box-shadow .25s ease,background-position .5s ease;
}
.am-submit:hover{transform:translateY(-2px);background-position:100% 0;box-shadow:0 22px 40px -12px rgba(2,132,199,.6)}
.am-submit:active{transform:translateY(0)}
.am-submit svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.am-submit:hover svg{transform:translateX(-4px)}
.am-submit.is-loading{pointer-events:none;opacity:.88}
.am-submit.is-loading svg{display:none}
.am-submit.is-loading::after{
  content:"";width:20px;height:20px;border-radius:50%;
  border:3px solid rgba(255,255,255,.4);border-top-color:#fff;
  animation:am-spin .7s linear infinite;
}

/* ---------- Secondary actions ---------- */
.am-or{display:flex;align-items:center;gap:12px;margin:26px 0 14px;color:var(--am-muted);font-size:13px;font-weight:700}
.am-or::before,.am-or::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#d6e4dd,transparent)}

.am-register{
  display:flex;align-items:center;justify-content:center;gap:10px;
  min-height:52px;padding:10px 16px;border-radius:16px;
  text-decoration:none;font-size:15.5px;font-weight:800;color:#7c2d12;
  background:linear-gradient(135deg,#fff8e1,#ffe4ea);
  border:1.5px solid #fde2a6;
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.am-register svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.am-register:hover{transform:translateY(-2px);border-color:#f9c76a;box-shadow:0 14px 28px -10px rgba(245,158,11,.4)}

.am-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;margin-top:18px}
.am-links a{
  display:inline-flex;align-items:center;gap:7px;
  color:#0f766e;font-size:14px;font-weight:700;text-decoration:none;
  padding:4px 2px;border-bottom:1.5px solid transparent;transition:color .2s,border-color .2s;
}
.am-links a:hover{color:#0369a1;border-color:currentColor}
.am-links svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- Showcase panel ---------- */
.am-showcase{
  position:relative;isolation:isolate;overflow:hidden;
  padding:clamp(28px,4vw,52px);
  display:flex;flex-direction:column;justify-content:space-between;gap:30px;
  color:#fff;margin-inline-start:-1px;
  background:linear-gradient(155deg,#064e3b 0%,#0f766e 42%,#0369a1 100%);
}
.am-showcase::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background-image:radial-gradient(rgba(255,255,255,.18) 1.2px,transparent 1.5px);
  background-size:22px 22px;
  -webkit-mask-image:linear-gradient(160deg,#000 0,transparent 72%);
          mask-image:linear-gradient(160deg,#000 0,transparent 72%);
}
.am-blob{position:absolute;border-radius:50%;z-index:-1;pointer-events:none;animation:am-float 18s ease-in-out infinite}
.am-blob.b1{width:300px;height:300px;top:-100px;left:-80px;background:radial-gradient(circle,rgba(251,191,36,.8),rgba(251,191,36,0) 68%)}
.am-blob.b2{width:340px;height:340px;bottom:-130px;right:-90px;background:radial-gradient(circle,rgba(244,114,182,.65),rgba(244,114,182,0) 68%);animation-delay:-6s}
.am-blob.b3{width:230px;height:230px;top:40%;left:-70px;background:radial-gradient(circle,rgba(56,189,248,.6),rgba(56,189,248,0) 68%);animation-delay:-11s}
.am-wave{position:absolute;right:0;left:0;bottom:0;width:100%;height:120px;z-index:-1;opacity:.16;pointer-events:none}

.am-brand{display:flex;align-items:center;gap:14px}
.am-logo{
  width:66px;height:66px;flex:none;border-radius:50%;background:#fff;padding:3px;
  box-shadow:0 12px 30px rgba(0,0,0,.28),0 0 0 6px rgba(255,255,255,.14);
}
.am-logo img{display:block;width:100%;height:100%}
.am-brand-name{font-size:19px;font-weight:800;line-height:1.5}

.am-show-body h2{text-wrap:balance;margin:0 0 12px;font-size:clamp(24px,3vw,32px);line-height:1.5;font-weight:700}
.am-show-body p{margin:0;color:rgba(255,255,255,.86);font-size:15px;line-height:2;max-width:38ch}

.am-feats{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.am-feats li{
  display:flex;align-items:center;gap:14px;
  padding:13px 15px;border-radius:18px;
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  transition:transform .25s ease,background .25s ease;
}
.am-feats li:hover{transform:translateX(-6px);background:rgba(255,255,255,.18)}
.am-ico{
  width:46px;height:46px;flex:none;display:grid;place-items:center;border-radius:14px;
  box-shadow:0 8px 18px rgba(0,0,0,.2);
}
.am-ico svg{width:23px;height:23px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.am-ico.c1{background:linear-gradient(135deg,#34d399,#059669)}
.am-ico.c2{background:linear-gradient(135deg,#fcd34d,#f59e0b)}
.am-ico.c3{background:linear-gradient(135deg,#f9a8d4,#a855f7)}
.am-feats b{display:block;font-size:15px;font-weight:800;line-height:1.6}
.am-feats small{display:block;margin-top:1px;color:rgba(255,255,255,.78);font-size:12.5px;line-height:1.7}

/* ---------- Motion ---------- */
@keyframes am-rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes am-float{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(18px,-22px) scale(1.06)}}
@keyframes am-spin{to{transform:rotate(360deg)}}
@keyframes am-shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}

/* ---------- Focus ---------- */
.am-pill:focus-visible,.am-submit:focus-visible,.am-register:focus-visible,.am-links a:focus-visible,.am-eye:focus-visible{
  outline:3px solid rgba(14,165,233,.55);outline-offset:3px;
}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .am-shell{grid-template-columns:1fr;max-width:560px}
  .am-showcase{order:-1;padding:26px 24px;gap:14px}
  .am-feats,.am-show-body p{display:none}
  .am-show-body h2{margin:0;font-size:22px}
  .am-logo{width:56px;height:56px}
  .am-brand-name{font-size:17px}
  .am-wave{height:80px}
}
@media (max-width:480px){
  .am-topbar{margin-top:12px;gap:8px}
  .am-pill{min-height:40px;padding:8px 13px;font-size:13px}
  .am-main{padding:16px 12px 32px}
  .am-shell{border-radius:26px}
  .am-form-panel{padding:26px 20px 30px}
  .am-links{gap:6px 16px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}

/* ==========================================================================
   افزونه‌ها: ثبت‌نام و صفحه انتخاب نوع ورود
   ========================================================================== */
.am-pill.is-cta{
  background:linear-gradient(120deg,#059669,#0d9488 55%,#0284c7);
  border-color:transparent;color:#fff;
  box-shadow:0 10px 22px -6px rgba(13,148,136,.55);
}
.am-pill.is-cta:hover{background:linear-gradient(120deg,#047857,#0f766e 55%,#0369a1)}

/* فیلد متن فارسی (مثل نام) */
.am-input.is-rtl input{direction:rtl;text-align:right}
.am-input.is-rtl input::placeholder{direction:rtl}
.am-hint{margin:8px 4px 0;color:var(--am-muted);font-size:12.5px;line-height:1.8}

/* کارت تک‌ستونه (صفحه انتخاب نوع ورود) */
.am-shell.is-single{grid-template-columns:1fr;max-width:980px}
.am-choose{padding:clamp(28px,5vw,56px);display:flex;flex-direction:column;align-items:center;text-align:center}
.am-choose-logo{
  width:78px;height:78px;border-radius:50%;background:#fff;padding:3px;margin-bottom:16px;
  box-shadow:0 14px 34px rgba(6,57,44,.22),0 0 0 6px #d1fae5;
}
.am-choose-logo img{display:block;width:100%;height:100%}
.am-choose .am-eyebrow{align-self:center}
.am-choose .am-title{margin-top:14px}
.am-choose .am-lead{max-width:62ch}

.am-choices{
  width:100%;margin-top:30px;text-align:right;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;
}
.am-choice{
  --c1:#10b981;--c2:#0d9488;--tint:#d1fae5;--glow:rgba(13,148,136,.4);--txt:#0f766e;
  position:relative;overflow:hidden;isolation:isolate;
  display:flex;flex-direction:column;gap:10px;
  padding:26px 22px 20px;border-radius:24px;
  background:#fff;border:1.5px solid var(--am-line);
  color:var(--am-ink);text-decoration:none;
  transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}
.am-choice::before{content:"";position:absolute;top:0;right:0;left:0;height:5px;background:linear-gradient(90deg,var(--c1),var(--c2))}
.am-choice::after{
  content:"";position:absolute;z-index:-1;width:220px;height:220px;border-radius:50%;
  left:-80px;bottom:-110px;background:radial-gradient(circle,var(--tint),transparent 70%);
  transition:transform .5s ease;
}
.am-choice:hover{transform:translateY(-6px);border-color:var(--c1);box-shadow:0 28px 50px -20px var(--glow)}
.am-choice:hover::after{transform:scale(1.35)}
.am-choice.admin{--c1:#fbbf24;--c2:#f59e0b;--tint:#fff0c7;--glow:rgba(245,158,11,.5);--txt:#b45309}
.am-choice.restaurant{--c1:#fb7185;--c2:#f97316;--tint:#ffe1e0;--glow:rgba(249,115,22,.45);--txt:#c2410c}
.am-choice.member{--c1:#10b981;--c2:#0d9488;--tint:#d1fae5;--glow:rgba(13,148,136,.45);--txt:#0f766e}
.am-choice .am-ico{
  width:58px;height:58px;border-radius:18px;margin-bottom:4px;
  background:linear-gradient(135deg,var(--c1),var(--c2));
}
.am-choice .am-ico svg{width:28px;height:28px}
.am-choice strong{font-size:19px;line-height:1.6}
.am-choice small{display:block;color:var(--am-muted);font-size:13.5px;line-height:1.95;min-height:3.9em}
.am-go{margin-top:auto;padding-top:6px;display:inline-flex;align-items:center;gap:8px;color:var(--txt);font-size:14.5px;font-weight:800}
.am-go svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.am-choice:hover .am-go svg{transform:translateX(-5px)}
.am-choice:focus-visible{outline:3px solid rgba(14,165,233,.55);outline-offset:3px}

.am-note{
  width:100%;margin-top:22px;padding:14px 18px;border-radius:16px;text-align:right;
  display:flex;align-items:flex-start;gap:12px;
  background:linear-gradient(135deg,#f0fdf4,#eff6ff);border:1px solid #d6eadf;
  color:#3b5a4f;font-size:13.5px;line-height:2;
}
.am-note svg{width:20px;height:20px;flex:none;margin-top:5px;stroke:#0d9488;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

@media (max-width:900px){
  .am-choices{grid-template-columns:1fr}
  .am-choice small{min-height:0}
}
