﻿/* --- تنظیمات کلی --- */
/* توکن‌های هویت بصری Classic Blue (این صفحه Layout ندارد، پس توکن‌ها اینجا تعریف می‌شوند) */
:root {
    --ip-primary: #0f4c81;
    --ip-primary-600: #1565a0;
    --ip-primary-500: #1a7ac4;
    --ip-primary-700: #0c3f6b;
    --ip-primary-900: #072a48;
    --ip-primary-grad: linear-gradient(135deg, #0f4c81 0%, #072a48 100%);
    --ip-primary-soft: rgba(15, 76, 129, .10);
}
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    overflow: hidden;
    background-color: #f0f2f5;
}

/* --- پس‌زمینه --- */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/login-page-minimal.png') no-repeat center center fixed;
   
    background-size: cover;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.72), rgba(7, 42, 72, 0.58));
    z-index: -1;
}

/* --- هدر --- */
.top-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    height: 85px;
    transition: all 0.3s ease;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
}

.header-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.header-text h1 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 800;
    color: var(--ip-primary);
    line-height: 1.2;
}

.header-text p {
    font-size: 0.85rem;
    margin: 0;
    color: #666;
    font-weight: 500;
}

/* --- کانتینر اصلی --- */
.main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-top: 85px;
}

/* --- کارت لاگین --- */
.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: var(--ip-primary-grad);
    }

.login-icon {
    font-size: 3rem;
    color: var(--ip-primary);
    margin-bottom: 10px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

/* --- ورودی‌های شناور (اصلاح شده) --- */
.input-group {
    position: relative;
    margin-bottom: 25px;
    text-align: right;
}

    .input-group input {
        width: 100%;
        padding: 14px 15px 14px 45px;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        background: #f8f9fa;
        font-family: 'Vazirmatn', sans-serif;
        font-size: 0.95rem;
        transition: all 0.3s ease;  اصلاح شده: 0.3s 
        outline: none;
        color: #333;
        position: relative;
        z-index: 1;
    }

        .input-group input:focus {
            border-color: var(--ip-primary-500);
            background: #fff;
            box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.12);
        }

    .input-group i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #aaa;
        transition: color 0.3s ease;
        font-size: 1.1rem;
        z-index: 2;
    }

    .input-group input:focus + i {
        color: var(--ip-primary);
    }

    .input-group label {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #777;
        pointer-events: none;
        transition: all 0.3s ease; /* اصلاح شده: 0.3s */
        background: #fff;
        padding: 0 5px;
        font-size: 0.95rem;
        z-index: 3;
    }

    /* حالت فعال لیبل */
    .input-group input:focus ~ label,
    .input-group input:not(:placeholder-shown) ~ label {
        top: -10px;
        right: 12px;
        font-size: 0.75rem;
        color: var(--ip-primary);
        background: #fff;
        border-radius: 4px;
        font-weight: 600;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

/* --- کپچا --- */
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 25px;
    transition: border-color 0.3s;
}

    .captcha-box:focus-within {
        border-color: var(--ip-primary-500);
    }

.captcha-img {
    border-radius: 8px; /* اصلاح شده: 8px */
    cursor: pointer;
    height: 45px;
    width: 110px;
    object-fit: cover;
    transition: opacity 0.3s;
}

    .captcha-img:hover {
        opacity: 0.8;
    }

.refresh-icon {
    cursor: pointer;
    color: var(--ip-primary); /* اصلاح شده: color */
    font-size: 1.2rem;
    padding: 0 10px;
    transition: transform 0.4s ease;
}

    .refresh-icon:hover {
        transform: rotate(180deg);
        color: var(--ip-primary-600);
    }

.captcha-input {
    width: 100px !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* --- دکمه ورود --- */
.btn-login {
    background: var(--ip-primary-grad);
    border: none;
    height: 50px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(15, 76, 129, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-login:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(15, 76, 129, 0.38);
        background: linear-gradient(135deg, var(--ip-primary-600), var(--ip-primary-500));
        color: white;
    }

    .btn-login:active {
        transform: translateY(-1px);
    }

/* --- فوتر و خطا --- */
.login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.8rem;
    color: #666;
}

.footer-highlight {
    color: var(--ip-primary);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.alert-custom {
    background-color: #fff5f5;
    color: #c53030;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #feb2b2;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease-in-out;
}

/* --- انیمیشن‌ها --- */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 10px;
    }

    .main-container {
        padding-top: 130px;
    }

    .header-text h1 {
        font-size: 1.1rem;
        text-align: center;
    }

    .header-text p {
        text-align: center;
        font-size: 0.75rem;
    }

    .header-logo {
        height: 50px;
    }
}
