/* =============================================================
   NINE-FX — AUTH PAGE STYLESHEET
   روی توکن‌های style.css سوار است (رنگ‌ها، فونت‌ها، دکمه‌ها).

   بخش‌ها:
   1. SHELL & VISUAL PANEL   → پنل تزئینی برند (سمت راست)
   2. FORM SIDE               → پنل فرم (سمت چپ)
   3. TABS                    → تب ورود/ثبت‌نام
   4. FORM FIELDS             → ورودی‌ها و دکمه‌ها
   5. RESPONSIVE
   ============================================================= */

.auth-body{ background:var(--bg); min-height:100vh; }

.auth-shell{
  display:flex; min-height:100vh;
}

/* =============================================================
   1. FORM SIDE
   پنل تزئینی حذف شد؛ کل صفحه حالا یک صحنه‌ی واحد و متمرکز است —
   پس‌زمینه با چند لایه‌ی نور و یک بافت شبکه‌ای ظریف، حس یک
   پلتفرم معاملاتی حرفه‌ای را بدون نیاز به تصویر منتقل می‌کند.
   ============================================================= */
.auth-form-side{
  position:relative; display:flex; align-items:center; justify-content:center;
  width:100%; padding:32px 24px; overflow-x:hidden;
  background:var(--bg);
}

/* بافت شبکه‌ای ظریف — الگوی خطوط ریز شبیه چارت/گرید معاملاتی */
.auth-form-side::before{
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(var(--divider) 1px, transparent 1px),
    linear-gradient(90deg, var(--divider) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 900px 620px at 50% 38%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 900px 620px at 50% 38%, #000 0%, transparent 72%);
  opacity:.55;
}

/* دو هاله‌ی نور طلایی/آبی که صحنه را عمق می‌دهند */
.auth-form-side::after{
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(ellipse 640px 460px at 20% 15%, rgba(205,161,48,.10), transparent 65%),
    radial-gradient(ellipse 560px 420px at 82% 85%, rgba(70,120,210,.08), transparent 65%);
}

.theme-btn-float{
  position:absolute; top:28px; left:28px; width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; border:1px solid var(--glass-border);
  color:var(--text-dim); transition:.2s; z-index:2; background:var(--glass); backdrop-filter:blur(6px);
}
.theme-btn-float:hover{ color:var(--gold); border-color:var(--glass-border-strong); }
.theme-btn-float svg{ width:17px; height:17px; }

.auth-card{
  position:relative; z-index:1; width:100%; max-width:412px;
  padding:30px 32px 24px;
  background:var(--surface);
  border:1px solid var(--glass-border);
  border-radius:18px;
  box-shadow: 0 24px 70px -20px rgba(0,0,0,.45), 0 0 0 1px rgba(205,161,48,.04);
  animation: cardIn .6s var(--ease) both;
}
@keyframes cardIn{ from{ opacity:0; transform:translateY(14px);} to{ opacity:1; transform:none;} }

/* لوگو و تگ‌لاین برند — همیشه بالای کارت نمایش داده می‌شود */
.brand-logo{ display:flex; align-items:center; justify-content:center; gap:9px; font-weight:800; font-size:17px; }
.brand-logo .mark{
  width:30px; height:30px; border-radius:9px;
  display:block; object-fit:contain; flex-shrink:0;
  box-shadow: 0 6px 18px -6px rgba(205,161,48,.6);
}
.brand-logo .brand-txt span{ color:var(--gold); }
.brand-tagline{
  text-align:center; font-size:11.5px; color:var(--text-faint);
  margin:4px 0 18px;
}

.auth-tabs{
  display:flex; background:var(--glass); border:1px solid var(--glass-border); border-radius:12px; padding:4px;
  margin-bottom:20px;
}
.a-tab{ flex:1; padding:9px; border-radius:9px; font-size:14px; font-weight:600; color:var(--text-dim); transition:background .3s var(--ease), color .3s, box-shadow .3s; }
.a-tab.active{ background:linear-gradient(155deg, var(--gold-bright), var(--gold)); color:#120d02; box-shadow:0 6px 16px -8px rgba(205,161,48,.55); }


/* =============================================================
   3. TABS (ورود / ثبت‌نام)
   ============================================================= */
.auth-form{ display:none; flex-direction:column; gap:13px; }
.auth-form.active{ display:flex; animation: formIn .35s var(--ease); }
@keyframes formIn{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }

/* =============================================================
   4. FORM FIELDS
   ============================================================= */
.f-field{ display:flex; flex-direction:column; gap:7px; }
.f-field label{ font-size:12.5px; color:var(--text-dim); }
.f-field label .opt{ color:var(--text-faint); }

.input-wrap{ position:relative; display:flex; align-items:center; }
.f-icon{
  position:absolute; right:14px; width:16px; height:16px; color:var(--text-faint);
  pointer-events:none; transition:color .2s;
}
.input-wrap input{
  width:100%; background:var(--glass); border:1px solid var(--glass-border); border-radius:10px;
  padding:10px 14px 10px 14px; padding-right:40px;
  color:var(--text); font-family:inherit; font-size:14px; outline:none;
  transition:border-color .2s, box-shadow .2s;
}
.input-wrap input:focus{ border-color:var(--glass-border-strong); box-shadow:0 0 0 3px color-mix(in srgb, var(--gold) 16%, transparent); }
.input-wrap:focus-within .f-icon{ color:var(--gold); }
.input-wrap input::placeholder{ color:var(--text-faint); }
.input-wrap .pw-eye-toggle{ position:absolute; left:10px; top:50%; transform:translateY(-50%); width:26px; height:26px; border:none; background:transparent; color:var(--text-faint); cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center; transition:.15s; }
.input-wrap .pw-eye-toggle svg{ width:17px; height:17px; }
.input-wrap .pw-eye-toggle:hover{ color:var(--text); background:rgba(255,255,255,.12); }
.input-wrap .pw-eye-toggle.active{ color:var(--gold); }
.input-wrap.has-pw-eye input{ padding-left:42px; }
.row-between{ display:flex; align-items:center; justify-content:space-between; font-size:13px; }
.check-row{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-dim); }
.check-row input{ accent-color:var(--gold); width:15px; height:15px; }
.link-sm{ color:var(--gold); font-size:13px; }
.link-sm:hover{ text-decoration:underline; }
button.link-sm{ background:none; border:none; padding:0; font-family:inherit; cursor:pointer; }

.btn-full{ width:100%; padding:11px; }
.btn-sm{ padding:8px 16px; font-size:13px; white-space:nowrap; }
.google-btn{ display:flex; align-items:center; justify-content:center; gap:10px; }

/* افکت درخشش ملایم روی هاور دکمه‌ی طلایی — فقط داخل کارت ورود، لمسی لوکس بدون شلوغی */
.auth-card .btn-gold{ position:relative; overflow:hidden; }
.auth-card .btn-gold::after{
  content:''; position:absolute; top:0; right:-60%; width:40%; height:100%;
  background:linear-gradient(120deg, transparent, rgba(255,255,255,.32), transparent);
  transform:skewX(-20deg); transition:right .6s var(--ease);
}
.auth-card .btn-gold:hover::after{ right:130%; }

.divider-row{ display:flex; align-items:center; gap:12px; color:var(--text-faint); font-size:12px; }
.divider-row::before, .divider-row::after{ content:''; flex:1; height:1px; background:linear-gradient(90deg, transparent, var(--divider) 50%, transparent); }

.fine-note{ font-size:12px; color:var(--text-faint); text-align:center; line-height:1.7; margin-top:2px; }
.auth-switch-text{ text-align:center; font-size:13px; color:var(--text-dim); margin-top:16px; }
.auth-switch-text button{ color:var(--gold); font-weight:600; }
.auth-switch-text button:hover{ text-decoration:underline; }

/* نوار اعتماد — سه مزیت کوتاه زیر کارت، جایگزین تصویر برند */
.trust-strip{
  display:flex; align-items:center; justify-content:center; gap:12px;
  margin-top:14px; padding-top:12px; border-top:1px solid var(--divider);
}
.trust-item{
  display:flex; align-items:center; gap:5px;
  font-size:10.5px; color:var(--text-faint); white-space:nowrap;
}
.trust-item svg{ width:13px; height:13px; color:var(--gold); flex-shrink:0; }


/* =============================================================
   5. RESPONSIVE
   ============================================================= */
@media (max-width: 560px){
  .auth-form-side{ padding:28px 16px; }
  .auth-card{ padding:26px 20px 20px; border-radius:16px; }
  .trust-strip{ flex-wrap:wrap; gap:8px 14px; }
}


/* =============================================================
   6. LEGAL MODAL (قوانین استفاده / حریم خصوصی)
   ============================================================= */
.modal-overlay{
  position:fixed; inset:0; z-index:100; display:none; align-items:center; justify-content:center;
  background:rgba(8,6,2,.6); backdrop-filter:blur(3px); padding:24px;
}
.modal-overlay.open{ display:flex; animation:overlayIn .2s var(--ease); }
@keyframes overlayIn{ from{ opacity:0; } to{ opacity:1; } }

.modal-box{
  width:100%; max-width:520px; max-height:80vh; display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--glass-border-strong); border-radius:16px;
  box-shadow:var(--card-shadow); animation:modalIn .25s var(--ease);
}
@keyframes modalIn{ from{ opacity:0; transform:translateY(10px) scale(.98); } to{ opacity:1; transform:none; } }

.modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:18px 20px; border-bottom:1px solid var(--divider); flex-shrink:0;
}
.modal-head h3{ font-size:16px; font-weight:800; }
.modal-close{
  width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  color:var(--text-dim); flex-shrink:0; transition:.2s;
}
.modal-close:hover{ color:var(--gold); background:var(--glass); }
.modal-close svg{ width:16px; height:16px; }

.modal-body{
  padding:20px; overflow-y:auto; font-size:13.5px; line-height:2; color:var(--text-dim);
}
.modal-body h4{ font-size:14px; font-weight:700; color:var(--text); margin:16px 0 8px; }
.modal-body h4:first-child{ margin-top:0; }
.modal-body p{ margin-bottom:10px; }

.modal-foot{ padding:14px 20px; border-top:1px solid var(--divider); flex-shrink:0; text-align:left; }
