/* ============================================================
   Pargar Academy — auth.css
   صفحه ثبت‌نام / ورود (تمام‌صفحه) — مطابق دیزاین Claude Design
   ============================================================ */
.bm-auth-body { margin: 0; }
.bm-auth { display: flex; min-height: 100vh; background: var(--bm-bg); color: var(--bm-text); font-family: 'Yekan Bakh', 'Vazirmatn', Tahoma, sans-serif; }

/* پنل برند */
.bm-auth-brand { flex: 1; background: linear-gradient(160deg, #1E1B4B, #3730A3 55%, #4F46E5); position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; padding: 48px; }
.bm-auth-brand-glow { position: absolute; inset: 0; background: radial-gradient(600px 360px at 80% 10%, rgba(99,102,241,.5), transparent 60%); pointer-events: none; }
.bm-auth-brand-blob { position: absolute; right: -60px; bottom: -80px; width: 300px; height: 300px; border-radius: 50%; background: rgba(245,158,11,.14); }
.bm-auth-brand-inner { position: relative; display: flex; flex-direction: column; height: 100%; }
.bm-auth-logo { display: flex; align-items: center; gap: 12px; color: inherit; }
.bm-auth-logo-mark { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.15); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; position: relative; flex: 0 0 auto; }
.bm-auth-logo-mark.sm { width: 36px; height: 36px; background: linear-gradient(135deg, var(--bm-primary), var(--bm-primary-dark)); }
.bm-auth-logo-mark .d { width: 16px; height: 16px; border: 2.3px solid #fff; border-radius: 5px; transform: rotate(45deg); }
.bm-auth-logo-mark .dot { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: var(--bm-accent); }
.bm-auth-logo span { font-weight: 800; font-size: 1.3rem; }
.bm-auth-brand-mid { margin: auto 0; }
.bm-auth-brand-ico { width: 130px; height: 130px; border-radius: 34px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin-bottom: 34px; animation: bm-auth-float 5s ease-in-out infinite; }
@keyframes bm-auth-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.bm-auth-brand-mid h1 { margin: 0 0 16px; font-size: 2rem; font-weight: 800; line-height: 1.5; letter-spacing: -.5px; max-width: 380px; }
.bm-auth-brand-mid p { margin: 0 0 32px; font-size: .96rem; line-height: 2; color: rgba(255,255,255,.82); max-width: 380px; }
.bm-auth-brand-stats { display: flex; align-items: center; gap: 22px; }
.bm-auth-stat-num { font-size: 1.6rem; font-weight: 800; }
.bm-auth-stat-lbl { font-size: .78rem; color: rgba(255,255,255,.7); }
.bm-auth-stat-sep { width: 1px; height: 34px; background: rgba(255,255,255,.2); }
.bm-auth-brand-foot { font-size: .78rem; color: rgba(255,255,255,.6); }

/* پنل فرم */
.bm-auth-panel { flex: 1; display: flex; flex-direction: column; padding: 32px 48px; position: relative; overflow-y: auto; }
.bm-auth-panel-top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.bm-auth-mobile-logo { display: none; align-items: center; gap: 10px; color: inherit; }
.bm-auth-mobile-logo span { font-weight: 800; font-size: 1.1rem; }
.bm-auth-form-wrap { margin: auto 0; width: 100%; max-width: 410px; margin-inline: auto; padding: 24px 0; }
.bm-auth-form-wrap h2 { margin: 0 0 8px; font-size: 1.75rem; font-weight: 800; letter-spacing: -.5px; }
.bm-auth-switch { margin: 0 0 26px; font-size: .9rem; color: var(--bm-text-sub); }
.bm-auth-switch a { color: var(--bm-primary); font-weight: 700; }
.bm-auth-error { padding: 13px 16px; border-radius: 12px; background: var(--bm-error-soft); color: var(--bm-error); font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }

.bm-auth-form { display: flex; flex-direction: column; gap: 16px; }
.bm-auth-field label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.bm-auth-input { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1.5px solid var(--bm-border); border-radius: 12px; background: var(--bm-surface); transition: border-color .15s; }
.bm-auth-input:focus-within { border-color: var(--bm-primary); }
.bm-auth-input svg:first-child { flex: 0 0 auto; }
.bm-auth-input input { flex: 1; border: none; background: transparent; color: var(--bm-text); font-family: inherit; font-size: .88rem; outline: none; min-width: 0; }
.bm-auth-eye { background: none; border: none; cursor: pointer; color: var(--bm-text-mute); display: flex; flex: 0 0 auto; padding: 0; }
.bm-auth-match { color: var(--bm-success); flex: 0 0 auto; font-size: .95rem; opacity: 0; transition: opacity .2s; }
.bm-auth-match.show { opacity: 1; }

.bm-auth-strength { display: flex; gap: 6px; margin-top: 10px; }
.bm-auth-strength span { flex: 1; height: 5px; border-radius: 999px; background: var(--bm-surface-2); transition: background .25s; }
.bm-auth-strength-lbl { font-size: .72rem; margin-top: 7px; font-weight: 600; min-height: 16px; color: var(--bm-text-mute); }

.bm-auth-terms { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .82rem; color: var(--bm-text-sub); line-height: 1.7; }
.bm-auth-terms input { margin-top: 3px; accent-color: var(--bm-primary); width: 17px; height: 17px; flex: 0 0 auto; }
.bm-auth-terms a { color: var(--bm-primary); font-weight: 700; }
.bm-auth-submit { padding: 15px; border: none; border-radius: 13px; background: var(--bm-primary); color: #fff; font-family: inherit; font-weight: 800; font-size: .98rem; cursor: pointer; box-shadow: 0 10px 24px rgba(79,70,229,.3); transition: all .15s; }
.bm-auth-submit:hover { background: var(--bm-primary-hover); transform: translateY(-2px); }

@media (max-width: 900px) {
    .bm-auth { flex-direction: column; }
    .bm-auth-brand { display: none; }
    .bm-auth-mobile-logo { display: flex; }
    .bm-auth-panel { padding: 24px; }
}

/* ===================== ورود + فراموشی (مخصوص) ===================== */
.bm-auth-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bm-auth-label-row label { margin-bottom: 0; }
.bm-auth-forgot { font-size: .76rem; color: var(--bm-primary); font-weight: 600; }
.bm-auth-remember { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .84rem; color: var(--bm-text-sub); }
.bm-auth-remember input { accent-color: var(--bm-primary); width: 17px; height: 17px; }
.bm-auth-icon-badge { width: 54px; height: 54px; border-radius: 16px; background: var(--bm-primary-soft); color: var(--bm-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.bm-auth-desc { margin: 0 0 30px; font-size: .9rem; color: var(--bm-text-sub); line-height: 1.9; }
.bm-auth-success { padding: 13px 16px; border-radius: 12px; background: var(--bm-success-soft); color: var(--bm-success); font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.bm-auth-hint { display: flex; align-items: flex-start; gap: 9px; margin-top: 4px; }
.bm-auth-hint-ico { color: var(--bm-secondary); flex: 0 0 auto; }
.bm-auth-hint span:last-child { font-size: .76rem; color: var(--bm-text-sub); line-height: 1.7; }
.bm-auth-back { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; font-size: .84rem; color: var(--bm-text-sub); font-weight: 600; }
.bm-auth-back:hover { color: var(--bm-primary); }

/* ===================== تأیید کد OTP ===================== */
.bm-auth-center { text-align: center; }
.bm-auth-center .bm-auth-icon-badge { margin-inline: auto; }
.bm-auth-icon-lg { width: 60px; height: 60px; border-radius: 17px; }
.bm-otp-target { direction: ltr; display: inline-block; font-weight: 700; color: var(--bm-text); }
.bm-otp-boxes { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.bm-otp-input { width: 52px; height: 60px; text-align: center; font-size: 1.5rem; font-weight: 800; border: 1.5px solid var(--bm-border); border-radius: 13px; background: var(--bm-surface); color: var(--bm-text); outline: none; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.bm-otp-input:focus { border-color: var(--bm-primary); box-shadow: 0 0 0 4px var(--bm-ring, rgba(79,70,229,.25)); }
.bm-otp-input.is-filled { border-color: var(--bm-primary); }
.bm-otp-submit { width: 100%; margin-bottom: 22px; }
.bm-otp-resend { font-size: .84rem; color: var(--bm-text-sub); }
.bm-otp-timer { font-weight: 800; color: var(--bm-primary); direction: ltr; display: inline-block; }
.bm-otp-resend-btn { background: none; border: none; font-family: inherit; font-weight: 700; font-size: .84rem; color: var(--bm-primary); cursor: pointer; }
@media (max-width: 420px) { .bm-otp-input { width: 44px; height: 54px; font-size: 1.3rem; } }

/* ===================== اعتبارسنجی زنده ثبت‌نام ===================== */
.bm-auth-fielderr { font-size: .74rem; color: var(--bm-error); margin-top: 7px; min-height: 0; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .15s; }
.bm-auth-fielderr.show { opacity: 1; max-height: 40px; min-height: 16px; }
.bm-auth-pwreq { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.bm-auth-pwreq li { display: flex; align-items: center; gap: 7px; font-size: .72rem; color: var(--bm-text-mute); transition: color .15s; }
.bm-pwreq-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--bm-border-strong); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; position: relative; transition: all .2s ease; }
.bm-auth-pwreq li.is-ok { color: var(--bm-success); }
.bm-auth-pwreq li.is-ok .bm-pwreq-dot { background: var(--bm-success); border-color: var(--bm-success); transform: scale(1.12); }
.bm-auth-pwreq li.is-ok .bm-pwreq-dot::after { content: ""; width: 4px; height: 7px; border-right: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(45deg); margin-bottom: 1px; }
.bm-auth-submit.is-disabled, .bm-auth-submit:disabled { background: var(--bm-border-strong); box-shadow: none; cursor: not-allowed; opacity: .6; transform: none; }
.bm-auth-submit.is-disabled:hover, .bm-auth-submit:disabled:hover { background: var(--bm-border-strong); transform: none; }

/* ===================== پیام موفقیت + تأیید ایمیل ===================== */
.bm-auth-success { display: flex; align-items: center; gap: 9px; padding: 12px 15px; border-radius: 12px; background: var(--bm-success-soft); color: #047857; border: 1px solid #6EE7B7; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.bm-auth-success span { font-weight: 800; }
.bm-auth-verify-sent { text-align: center; padding: 10px 0; }
.bm-auth-verify-ico { font-size: 44px; display: block; margin-bottom: 16px; }
.bm-auth-verify-sent h2 { margin: 0 0 12px; }
.bm-auth-verify-sent p { font-size: 14px; line-height: 1.95; color: var(--bm-text-sub); margin: 0 0 14px; }
.bm-auth-verify-sent strong { color: var(--bm-text); }
.bm-auth-verify-hint { font-size: 12.5px; color: var(--bm-text-mute); }
.bm-auth-verify-resend { margin-top: 8px; }

/* ==========================================================
   Human Check («من ربات نیستم») — v3.0.0-alpha.10
   حالت‌ها: idle → verifying → verified (۴۰s) → expired
   ========================================================== */
.bm-humancheck {
    position: relative;
    margin: 14px 0 6px;
    background: var(--bm-surface-2, #f7f8fb);
    border: 1.5px solid var(--bm-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.bm-humancheck:hover { border-color: var(--bm-primary, #6d28d9); }
.bm-humancheck[data-state="verified"] {
    border-color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 4px 16px -6px rgba(16,185,129,.35);
}
.bm-humancheck[data-state="expired"] {
    border-color: #f59e0b;
    background: #fffbeb;
}
.bm-humancheck[data-state="verifying"] {
    border-color: var(--bm-primary, #6d28d9);
    background: #fff;
}

.bm-hc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}
.bm-hc-input {
    position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.bm-hc-box {
    flex: 0 0 auto;
    position: relative;
    width: 26px; height: 26px;
    border-radius: 7px;
    background: #fff;
    border: 2px solid var(--bm-border, #d1d5db);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    transition: all .2s ease;
}
.bm-hc-check { width: 16px; height: 16px; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .25s cubic-bezier(.4,1.6,.5,1); }
.bm-hc-spinner {
    position: absolute; inset: 2px;
    border-radius: 50%;
    border: 2.5px solid color-mix(in srgb, var(--bm-primary, #6d28d9) 22%, transparent);
    border-top-color: var(--bm-primary, #6d28d9);
    display: none;
    animation: bm-hc-spin .7s linear infinite;
}
@keyframes bm-hc-spin { to { transform: rotate(360deg); } }

.bm-humancheck[data-state="verifying"] .bm-hc-box { border-color: var(--bm-primary, #6d28d9); background: #fff; }
.bm-humancheck[data-state="verifying"] .bm-hc-spinner { display: block; }

.bm-humancheck[data-state="verified"] .bm-hc-box {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 4px 12px -3px rgba(16,185,129,.55);
}
.bm-humancheck[data-state="verified"] .bm-hc-check { opacity: 1; transform: scale(1); }

.bm-humancheck[data-state="expired"] .bm-hc-box {
    background: #fff; border-color: #f59e0b;
}

.bm-hc-input:focus-visible ~ .bm-hc-box {
    outline: 3px solid color-mix(in srgb, var(--bm-primary, #6d28d9) 30%, transparent);
    outline-offset: 2px;
}

.bm-hc-text {
    flex: 1 1 auto;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: .92rem; font-weight: 600;
    color: var(--bm-text, #111827);
    min-height: 24px;
}
.bm-hc-text > span { display: none; align-items: center; gap: 6px; }
.bm-humancheck[data-state="idle"] .bm-hc-lbl-idle,
.bm-humancheck[data-state="verifying"] .bm-hc-lbl-verifying,
.bm-humancheck[data-state="verified"] .bm-hc-lbl-ok,
.bm-humancheck[data-state="expired"] .bm-hc-lbl-expired {
    display: inline-flex;
}
.bm-humancheck[data-state="verifying"] .bm-hc-lbl-verifying { color: var(--bm-primary, #6d28d9); }
.bm-humancheck[data-state="verified"] .bm-hc-lbl-ok { color: #047857; }
.bm-humancheck[data-state="expired"] .bm-hc-lbl-expired { color: #b45309; }
.bm-hc-lbl-ok svg { width: 16px; height: 16px; color: #10b981; }
.bm-hc-timer {
    font-size: .78rem; font-weight: 700;
    background: #d1fae5; color: #047857;
    padding: 2px 8px; border-radius: 999px;
    font-variant-numeric: tabular-nums;
    margin-inline-start: 4px;
}

.bm-hc-shield {
    flex: 0 0 auto; width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--bm-text-mute, #9ca3af); opacity: .7;
}
.bm-hc-shield svg { width: 22px; height: 22px; }
.bm-humancheck[data-state="verified"] .bm-hc-shield { color: #10b981; opacity: 1; }

.bm-hc-progress {
    display: block; height: 3px; width: 100%; background: transparent;
    position: relative;
}
.bm-hc-progress-bar {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 1s linear;
}
.bm-humancheck[data-state="verified"] .bm-hc-progress { background: #d1fae5; }

/* دکمه ارسالِ قفل‌شده تا زمان تایید */
button.is-hc-locked, input.is-hc-locked {
    opacity: .55 !important;
    cursor: not-allowed !important;
    filter: grayscale(.2);
}

/* Shake وقتی کاربر بدون تایید ارسال کند */
@keyframes bm-hc-shake {
    10%,90% { transform: translateX(-2px); }
    20%,80% { transform: translateX(3px); }
    30%,50%,70% { transform: translateX(-5px); }
    40%,60% { transform: translateX(5px); }
}
.bm-hc-shake { animation: bm-hc-shake .45s cubic-bezier(.36,.07,.19,.97) both; }

@media (max-width: 480px) {
    .bm-hc-row { padding: 12px 14px; gap: 10px; }
    .bm-hc-box { width: 24px; height: 24px; }
    .bm-hc-text { font-size: .86rem; }
    .bm-hc-shield { width: 28px; height: 28px; }
    .bm-hc-shield svg { width: 18px; height: 18px; }
}
