/* ═══════════════════════════════════════════════════════
   استایل صفحه لاگین عمومی
   ═══════════════════════════════════════════════════════ */

.tr-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: Tahoma, 'Segoe UI', sans-serif;
    direction: rtl;
    box-sizing: border-box;
}

.tr-login-box {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    padding: 40px 35px 30px;
    animation: trFadeIn .5s ease;
    box-sizing: border-box;
}

@keyframes trFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══ هدر ═══ */
.tr-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.tr-login-logo {
    font-size: 56px;
    margin-bottom: 12px;
    line-height: 1;
    animation: trBounce 2s infinite;
}

@keyframes trBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.tr-login-header h2 {
    font-size: 22px;
    color: #1a1a1a;
    margin: 0 0 8px;
    font-weight: bold;
    line-height: 1.4;
}

.tr-login-header p {
    font-size: 13.5px;
    color: #888;
    margin: 0;
    line-height: 1.6;
}

/* ═══ فیلدها ═══ */
.tr-field {
    margin-bottom: 18px;
}

.tr-field label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}

.tr-field input[type="text"],
.tr-field input[type="password"] {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all .2s;
    box-sizing: border-box;
    direction: rtl;
    background: #fafafa;
}

.tr-field input[type="text"]:focus,
.tr-field input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,.12);
}

.tr-field input::placeholder {
    color: #bbb;
    font-size: 13px;
}

/* ═══ Remember Me ═══ */
.tr-remember {
    margin-bottom: 22px;
}

.tr-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    font-weight: normal;
}

.tr-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

/* ═══ دکمه‌ها ═══ */
.tr-btn {
    display: inline-block;
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    text-decoration: none;
}

.tr-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 6px 18px rgba(102,126,234,.35);
}

.tr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102,126,234,.45);
    color: #fff;
}

.tr-btn-primary:active {
    transform: translateY(0);
}

.tr-btn-block {
    width: 100%;
    margin-top: 10px;
}

/* ═══ فوتر ═══ */
.tr-login-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
}

.tr-login-footer a {
    color: #667eea;
    text-decoration: none;
    transition: color .2s;
}

.tr-login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ═══ لینک‌های دسترسی سریع ═══ */
.tr-login-links {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #f0f0f0;
}

.tr-login-links-title {
    font-size: 12.5px;
    color: #999;
    margin: 0 0 12px;
    text-align: center;
    font-weight: 600;
}

.tr-login-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tr-login-links-list li {
    margin: 0;
}

.tr-login-links-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fafc;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    transition: all .2s;
}

.tr-login-links-list a:hover {
    background: #eef4ff;
    border-color: #667eea;
    color: #667eea;
    transform: translateX(-3px);
}

/* ═══ کپی‌رایت ═══ */
.tr-login-copyright {
    text-align: center;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}

.tr-login-copyright small {
    color: #bbb;
    font-size: 11.5px;
}

/* ═══ هشدارها ═══ */
.tr-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
    text-align: right;
    line-height: 1.6;
}

.tr-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-right: 4px solid #ef4444;
}

.tr-alert-success {
    background: #f0fdf4;
    color: #166534;
    border-right: 4px solid #22c55e;
}

/* ═══ ریسپانسیو ═══ */
@media (max-width: 480px) {
    .tr-login-wrapper {
        padding: 20px 12px;
    }

    .tr-login-box {
        padding: 30px 22px 25px;
        border-radius: 16px;
    }

    .tr-login-logo {
        font-size: 46px;
    }

    .tr-login-header h2 {
        font-size: 19px;
    }

    .tr-login-header p {
        font-size: 12.5px;
    }

    .tr-field input {
        padding: 12px 14px;
        font-size: 13.5px;
    }
}

/* ═══ حالت Dark Mode (اختیاری) ═══ */
@media (prefers-color-scheme: dark) {
    .tr-login-box {
        background: #1f2937;
        color: #f3f4f6;
    }

    .tr-login-header h2 { color: #f3f4f6; }
    .tr-login-header p { color: #9ca3af; }

    .tr-field label { color: #d1d5db; }

    .tr-field input[type="text"],
    .tr-field input[type="password"] {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .tr-field input:focus {
        border-color: #667eea;
        background: #374151;
    }

    .tr-remember label { color: #d1d5db; }

    .tr-login-links-list a {
        background: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }

    .tr-login-links-list a:hover {
        background: #4b5563;
        border-color: #667eea;
        color: #93c5fd;
    }

    .tr-login-copyright small { color: #6b7280; }
}