/* ========== LOGIN PAGE - FINAL PROFESSIONAL ========== */

/* ---- Base ---- */
.login-page {
    background: #f0f2f5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Card (Deeper Shadow) ---- */
.login-card-modern {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 28px 28px 24px;
    position: relative;
    transition: all 0.4s ease;
    animation: slideUp 0.5s ease-out;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.login-card-modern:hover {
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
}

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

/* ---- Logo & Title ---- */
.logo-modern {
    margin-bottom: 24px;
}

.logo-wrapper {
    margin-bottom: 16px;
}

.logo-svg {
    width: 90px;
    height: 90px;
    display: block;
    transition: all 0.3s ease;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-svg:hover {
    transform: scale(1.04);
}

/* FNSMH - Main Title (Blue) */
.logo-modern h1 {
    font-size: 30px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Persian Subtitle */
.logo-modern .subtitle-fa {
    font-size: 14px;
    color: #4a5a6e;
    margin-top: 6px;
    font-weight: 500;
}

/* English Subtitle */
.logo-modern .subtitle-en {
    font-size: 12px;
    color: #8a9aaa;
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ---- Form Elements (Wider Inputs) ---- */
.form-group-modern {
    margin-bottom: 14px;
}

.form-label-modern {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 4px;
}

.input-wrapper-modern {
    position: relative;
}

.input-icon-modern {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #7a8a9a;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.input-wrapper-modern input {
    width: 100%;
    padding: 14px 48px 14px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    color: #1a2332;
    font-size: 14px;
    height: 52px;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper-modern input::placeholder {
    color: #8a8a8a;
    font-weight: 400;
    font-size: 14px;
}

.input-wrapper-modern input:focus {
    background: white;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.input-wrapper-modern input:focus + .input-icon-modern,
.input-wrapper-modern input:focus ~ .input-icon-modern {
    color: #2563eb;
}

.input-wrapper-modern input:hover {
    background: white;
    border-color: #d1d5db;
}

/* ============================================ */
/* ===== PASSWORD FIELD WITH EYE ICON ===== */
/* ============================================ */

.password-field {
    position: relative;
}

.password-field input {
    padding-left: 48px !important; /* Space for eye icon */
    padding-right: 18px;
}

/* ---- Eye Toggle Button (Visible) ---- */
.password-toggle-btn {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a9aaa;
    transition: all 0.3s ease;
    z-index: 10; /* HIGHER than input */
    width: 24px;
    height: 24px;
}

.password-toggle-btn:hover {
    color: #2563eb;
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none; /* So clicks go to button, not SVG */
}

/* ---- Remove the old eye icon from password field ---- */
.input-wrapper-modern .input-icon-modern {
    /* This keeps user icon on right, but we don't want it on password */
}

/* Make sure user icon only shows on username, not password */
.input-wrapper-modern:not(.password-field) .input-icon-modern {
    display: block;
}

.password-field .input-icon-modern {
    display: none;
}

/* ---- Form Errors ---- */
.form-error-modern {
    color: #dc2626;
    font-size: 12px;
    margin-top: 3px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* ---- Checkbox ---- */
.form-checkbox-modern {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 2px solid #d1d5db;
    background: white;
    accent-color: #2563eb;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.form-checkbox-modern:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.form-checkbox-modern:hover {
    border-color: #2563eb;
}

/* ---- Button ---- */
.login-btn-modern {
    width: 100%;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    position: relative;
    overflow: hidden;
}

.login-btn-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f5b342;
    opacity: 0;
    transition: all 0.3s ease;
}

.login-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

.login-btn-modern:hover::before {
    opacity: 1;
}

.login-btn-modern span,
.login-btn-modern svg {
    position: relative;
    z-index: 1;
}

.login-btn-modern:active {
    transform: scale(0.97);
}

/* ---- Messages ---- */
.login-message-modern {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideUp 0.3s ease-out;
}

.login-message-success-modern {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    color: #065f46;
}

.login-message-error-modern {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.login-message-info-modern {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

/* ---- Divider ---- */
.login-divider-modern {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .login-card-modern {
        padding: 20px 16px 18px;
        border-radius: 10px;
        margin: 0 8px;
    }

    .logo-svg {
        width: 72px;
        height: 72px;
    }

    .logo-modern h1 {
        font-size: 18px;
    }

    .logo-modern p {
        font-size: 13px;
    }

    .login-btn-modern {
        font-size: 14px;
        height: 46px;
        padding: 10px 16px;
    }

    .input-wrapper-modern input {
        height: 46px;
        padding: 10px 40px 10px 14px;
        font-size: 13px;
    }

    .input-icon-modern {
        width: 16px;
        height: 16px;
        right: 12px;
    }

    .password-field input {
        padding-left: 38px !important;
    }

    .password-toggle-btn {
        left: 10px;
        width: 20px;
        height: 20px;
    }

    .password-toggle-btn svg {
        width: 17px;
        height: 17px;
    }
}