/* ============================================================
   pages/login.css — استایل‌های اختصاصی صفحه ورود / آپلود مهمان
   ============================================================ */

body.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
}

.login-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto; margin-right: auto;
    width: 100%;
}
.site-logo {
    font-size: 1.2rem; font-weight: 800; color: var(--accent);
    display: flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.theme-btn {
    width: 40px; height: 40px;
    border-radius: 40px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary);
    transition: .2s;
}

.main-container { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 500px; margin: 0 auto; }

.tabs {
    display: flex; gap: 10px;
    background: var(--surface);
    padding: 6px;
    border-radius: 60px;
    margin-bottom: 25px;
    width: fit-content;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.tab {
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 700; font-size: .95rem;
    cursor: pointer;
    transition: all .3s;
    color: var(--text-muted);
    background: transparent;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
}
.tab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.tab:not(.active):hover { background: var(--accent-faint); color: var(--accent); }

.form-card {
    background: var(--surface);
    border-radius: 32px;
    padding: 32px 28px;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-lg);
    width: 100%;
    transition: opacity .3s cubic-bezier(.2,.9,.4,1.1), transform .3s cubic-bezier(.2,.9,.4,1.1);
}
.form-card.hiding { opacity: 0; transform: scale(.96); }
.form-card.hidden { display: none; }

.card-icon  { font-size: 2rem; margin-bottom: 12px; display: block; text-align: center; }
.card-title { font-size: 1.3rem; font-weight: 800; text-align: center; margin-bottom: 20px; }

.login-page .inp {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: .95rem;
    margin-bottom: 12px;
}
.inp-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: .9rem;
    outline: none;
    cursor: pointer;
    margin-bottom: 12px;
}

/* ── کپچا و کد یک‌بار مصرف ────────────────────────────────── */
.captcha-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.captcha-box {
    flex: 0 0 120px; height: 52px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--bg-page);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 900; letter-spacing: 4px;
    cursor: pointer; user-select: none;
    position: relative;
    direction: ltr; /* نمایش اعداد به ترتیب چپ به راست */
}
.otp-group { display: flex; gap: 8px; flex: 1; justify-content: space-between; direction: ltr; }
.otp-inp {
    width: 100%; height: 52px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.4rem;
    text-align: center;
    outline: none;
    transition: .2s;
}
.otp-inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-faint); }

/* ── دکمه‌های ورود/آپلود ──────────────────────────────────── */
.btn {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700; font-size: .95rem;
    cursor: pointer; transition: .2s;
    display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-accent  { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-faint); }
.btn:disabled { opacity: .6; pointer-events: none; }

/* ── ناحیه رهاسازی فایل (Dropzone مهمان) ──────────────────── */
.login-page .dropzone {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 12px;
}
.choose-label {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 10px;
    padding: 7px 18px;
    border-radius: 40px;
    background: var(--accent-faint);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-family: 'Vazirmatn', sans-serif;
    font-size: .8rem; font-weight: 700;
    cursor: pointer; transition: .2s;
}
.choose-label:hover { background: var(--accent); color: #fff; }
.selected-name {
    margin-top: 10px;
    background: var(--bg-page);
    border-radius: 14px;
    padding: 8px 12px;
    font-size: .75rem;
    word-break: break-all;
    color: var(--text-secondary);
    display: none;
}

/* ── نوار پیشرفت آپلود مهمان ──────────────────────────────── */
.login-page .prog-wrap  { margin-top: 12px; display: none; }
.login-page .prog-track { background: var(--border); border-radius: 30px; height: 6px; overflow: hidden; }
.login-page .prog-fill  { height: 100%; width: 0; border-radius: 30px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.login-page .prog-text  { font-size: .7rem; color: var(--text-muted); text-align: center; margin-top: 6px; }

/* ── توست محلی صفحه ورود ──────────────────────────────────── */
.toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast-container .toast { border-radius: 16px; padding: 10px 18px; max-width: 280px; }
.toast-container .toast.success { border-right: 4px solid var(--success); }
.toast-container .toast.error   { border-right: 4px solid var(--danger); }

@media (max-width: 500px) {
    .form-card   { padding: 24px 20px; }
    .otp-inp     { height: 46px; font-size: 1.2rem; }
    .captcha-box { flex: 0 0 110px; font-size: 1.6rem; }
    .tab         { padding: 8px 18px; font-size: .85rem; }
}
