* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}

.login-container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #203F80;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9f9f9;
    direction: rtl;
}

.form-control:focus {
    outline: none;
    border-color: #203F80;
    background: white;
    box-shadow: 0 0 0 3px rgba(32, 63, 128, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #203F80;
}

.password-input-wrapper .form-control {
    padding-left: 45px;
}

.checkbox-group {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    cursor: pointer;
    accent-color: #203F80;
}

.checkbox-label span {
    color: #666;
    font-size: 14px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #203F80 0%, #2a4fa0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #2a4fa0 0%, #203F80 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(32, 63, 128, 0.3);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.back-link {
    color: #203F80;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2a4fa0;
    text-decoration: underline;
}

.text-danger {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .form-control {
        font-size: 14px;
        padding: 10px 14px;
    }

    .btn-login {
        padding: 12px;
        font-size: 14px;
    }
}

/* Loading state */
.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-login.loading .btn-loader {
    display: inline-block;
}

