﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 45px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header .logo {
        font-size: 48px;
        margin-bottom: 10px;
    }

    .login-header h1 {
        font-size: 24px;
        color: #1e293b;
        font-weight: 700;
    }

    .login-header p {
        color: #64748b;
        font-size: 14px;
        margin-top: 5px;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #334155;
        margin-bottom: 6px;
    }

        .form-group label .required {
            color: #ef4444;
            margin-left: 2px;
        }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 10px;
        font-size: 14px;
        transition: all 0.3s;
        outline: none;
        background: #f8fafc;
    }

    .form-group input:focus {
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

    .form-group input.error {
        border-color: #ef4444;
        background: #fef2f2;
    }

    .form-group .error-message {
        color: #ef4444;
        font-size: 12px;
        margin-top: 4px;
        display: none;
    }

        .form-group .error-message.show {
            display: block;
        }

/* استایل جدید کپچا - کد بزرگ و ورودی کوچک */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
    flex-wrap: wrap;
}

    .captcha-container:focus-within {
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

    .captcha-container .captcha-code {
        font-size: 36px;
        font-weight: 900;
        color: #1e293b;
        letter-spacing: 12px;
        background: white;
        padding: 8px 20px;
        border-radius: 8px;
        font-family: 'Courier New', monospace;
        min-width: 160px;
        text-align: center;
        user-select: none;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: none;
        flex: 0 0 auto;
    }

    .captcha-container .captcha-input-wrapper {
        flex: 1;
        min-width: 100px;
    }

    .captcha-container .captcha-input {
        width: 100%;
        border: 2px solid #e2e8f0;
        padding: 8px 12px;
        font-size: 20px;
        outline: none;
        background: white;
        border-radius: 8px;
        letter-spacing: 3px;
        font-weight: 700;
        text-align: center;
        transition: all 0.3s;
    }

        .captcha-container .captcha-input:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
        }

.captcha-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 0 0 auto;
}

    .captcha-actions button {
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 6px;
        transition: all 0.2s;
        color: #64748b;
    }

        .captcha-actions button:hover {
            background: #e2e8f0;
            color: #1e293b;
            transform: rotate(45deg);
        }

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #94a3b8;
}

    .login-footer a {
        color: #667eea;
        text-decoration: none;
        font-weight: 500;
    }

        .login-footer a:hover {
            text-decoration: underline;
        }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 10px;
}

    .alert.show {
        display: flex;
    }

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert .alert-icon {
    font-size: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

    .remember-me input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #667eea;
        cursor: pointer;
    }

    .remember-me label {
        font-size: 13px;
        color: #475569;
        cursor: pointer;
        user-select: none;
    }

.attempts-info {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .login-container {
        padding: 25px 20px;
    }

    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }

        .captcha-container .captcha-code {
            font-size: 30px;
            min-width: auto;
            letter-spacing: 10px;
            padding: 6px 12px;
        }

        .captcha-container .captcha-input {
            font-size: 18px;
        }

    .captcha-actions {
        justify-content: center;
    }
}
